| author | |
| committer | |
| log | f59bd2be539ce736d2ef04d16f48980d9c02a3ab |
| tree | a45a698a1836f350fd7992c7749932e4e1232f73 |
| parent | 6db190cf708d6ddb1c51d294c6f5a9416106277f |
| parent | d65e248ed130da21e554807c8ce6add9773e0670 |
318 files changed, 55069 insertions(+), 84166 deletions(-)
lib/libc/include/aarch64-macos.11-none/arm/_limits.h+4| ... | @@ -4,6 +4,10 @@ | ... | @@ -4,6 +4,10 @@ |
| 4 | #ifndef _ARM__LIMITS_H_ | 4 | #ifndef _ARM__LIMITS_H_ |
| 5 | #define _ARM__LIMITS_H_ | 5 | #define _ARM__LIMITS_H_ |
| 6 | 6 | ||
| 7 | #if defined (__arm__) || defined (__arm64__) | ||
| 8 | |||
| 7 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ | 9 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ |
| 8 | 10 | ||
| 11 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 12 | |||
| 9 | #endif /* _ARM__LIMITS_H_ */ | 13 | #endif /* _ARM__LIMITS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/_mcontext.h+4| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #ifndef __ARM_MCONTEXT_H_ | 29 | #ifndef __ARM_MCONTEXT_H_ |
| 30 | #define __ARM_MCONTEXT_H_ | 30 | #define __ARM_MCONTEXT_H_ |
| 31 | 31 | ||
| 32 | #if defined (__arm__) || defined (__arm64__) | ||
| 33 | |||
| 32 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ | 34 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 33 | #include <sys/appleapiopts.h> | 35 | #include <sys/appleapiopts.h> |
| 34 | #include <mach/machine/_structs.h> | 36 | #include <mach/machine/_structs.h> |
| ... | @@ -88,4 +90,6 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; | ... | @@ -88,4 +90,6 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; |
| 88 | #endif | 90 | #endif |
| 89 | #endif /* _MCONTEXT_T */ | 91 | #endif /* _MCONTEXT_T */ |
| 90 | 92 | ||
| 93 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 94 | |||
| 91 | #endif /* __ARM_MCONTEXT_H_ */ | 95 | #endif /* __ARM_MCONTEXT_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/_param.h+3| ... | @@ -5,6 +5,8 @@ | ... | @@ -5,6 +5,8 @@ |
| 5 | #ifndef _ARM__PARAM_H_ | 5 | #ifndef _ARM__PARAM_H_ |
| 6 | #define _ARM__PARAM_H_ | 6 | #define _ARM__PARAM_H_ |
| 7 | 7 | ||
| 8 | #if defined (__arm__) || defined (__arm64__) | ||
| 9 | |||
| 8 | #include <arm/_types.h> | 10 | #include <arm/_types.h> |
| 9 | 11 | ||
| 10 | /* | 12 | /* |
| ... | @@ -18,5 +20,6 @@ | ... | @@ -18,5 +20,6 @@ |
| 18 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) | 20 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) |
| 19 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) | 21 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) |
| 20 | 22 | ||
| 23 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 21 | 24 | ||
| 22 | #endif /* _ARM__PARAM_H_ */ | 25 | #endif /* _ARM__PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/_types.h+4| ... | @@ -4,6 +4,8 @@ | ... | @@ -4,6 +4,8 @@ |
| 4 | #ifndef _BSD_ARM__TYPES_H_ | 4 | #ifndef _BSD_ARM__TYPES_H_ |
| 5 | #define _BSD_ARM__TYPES_H_ | 5 | #define _BSD_ARM__TYPES_H_ |
| 6 | 6 | ||
| 7 | #if defined (__arm__) || defined (__arm64__) | ||
| 8 | |||
| 7 | /* | 9 | /* |
| 8 | * This header file contains integer types. It's intended to also contain | 10 | * This header file contains integer types. It's intended to also contain |
| 9 | * flotaing point and other arithmetic types, as needed, later. | 11 | * flotaing point and other arithmetic types, as needed, later. |
| ... | @@ -95,4 +97,6 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ | ... | @@ -95,4 +97,6 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ |
| 95 | typedef long __darwin_ssize_t; /* byte count or error */ | 97 | typedef long __darwin_ssize_t; /* byte count or error */ |
| 96 | typedef long __darwin_time_t; /* time() */ | 98 | typedef long __darwin_time_t; /* time() */ |
| 97 | 99 | ||
| 100 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 101 | |||
| 98 | #endif /* _BSD_ARM__TYPES_H_ */ | 102 | #endif /* _BSD_ARM__TYPES_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/arch.h+4| ... | @@ -28,6 +28,8 @@ | ... | @@ -28,6 +28,8 @@ |
| 28 | #ifndef _ARM_ARCH_H | 28 | #ifndef _ARM_ARCH_H |
| 29 | #define _ARM_ARCH_H | 29 | #define _ARM_ARCH_H |
| 30 | 30 | ||
| 31 | #if defined (__arm__) || defined (__arm64__) | ||
| 32 | |||
| 31 | /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */ | 33 | /* Collect the __ARM_ARCH_*__ compiler flags into something easier to use. */ |
| 32 | #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__) | 34 | #if defined (__ARM_ARCH_7A__) || defined (__ARM_ARCH_7S__) || defined (__ARM_ARCH_7F__) || defined (__ARM_ARCH_7K__) |
| 33 | #define _ARM_ARCH_7 | 35 | #define _ARM_ARCH_7 |
| ... | @@ -64,4 +66,6 @@ | ... | @@ -64,4 +66,6 @@ |
| 64 | #define _ARM_ARCH_4 | 66 | #define _ARM_ARCH_4 |
| 65 | #endif | 67 | #endif |
| 66 | 68 | ||
| 69 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 70 | |||
| 67 | #endif | 71 | #endif |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/endian.h+3| ... | @@ -42,6 +42,8 @@ | ... | @@ -42,6 +42,8 @@ |
| 42 | #ifndef _ARM__ENDIAN_H_ | 42 | #ifndef _ARM__ENDIAN_H_ |
| 43 | #define _ARM__ENDIAN_H_ | 43 | #define _ARM__ENDIAN_H_ |
| 44 | 44 | ||
| 45 | #if defined (__arm__) || defined (__arm64__) | ||
| 46 | |||
| 45 | #include <sys/cdefs.h> | 47 | #include <sys/cdefs.h> |
| 46 | /* | 48 | /* |
| 47 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. | 49 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. |
| ... | @@ -75,4 +77,5 @@ | ... | @@ -75,4 +77,5 @@ |
| 75 | #include <sys/_endian.h> | 77 | #include <sys/_endian.h> |
| 76 | 78 | ||
| 77 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ | 79 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ |
| 80 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 78 | #endif /* !_ARM__ENDIAN_H_ */ | 81 | #endif /* !_ARM__ENDIAN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/limits.h+4| ... | @@ -39,6 +39,8 @@ | ... | @@ -39,6 +39,8 @@ |
| 39 | #ifndef _ARM_LIMITS_H_ | 39 | #ifndef _ARM_LIMITS_H_ |
| 40 | #define _ARM_LIMITS_H_ | 40 | #define _ARM_LIMITS_H_ |
| 41 | 41 | ||
| 42 | #if defined (__arm__) || defined (__arm64__) | ||
| 43 | |||
| 42 | #include <sys/cdefs.h> | 44 | #include <sys/cdefs.h> |
| 43 | #include <arm/_limits.h> | 45 | #include <arm/_limits.h> |
| 44 | 46 | ||
| ... | @@ -107,4 +109,6 @@ | ... | @@ -107,4 +109,6 @@ |
| 107 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ | 109 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ |
| 108 | #endif /* !_ANSI_SOURCE */ | 110 | #endif /* !_ANSI_SOURCE */ |
| 109 | 111 | ||
| 112 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 113 | |||
| 110 | #endif /* _ARM_LIMITS_H_ */ | 114 | #endif /* _ARM_LIMITS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/param.h+4| ... | @@ -48,6 +48,8 @@ | ... | @@ -48,6 +48,8 @@ |
| 48 | #ifndef _ARM_PARAM_H_ | 48 | #ifndef _ARM_PARAM_H_ |
| 49 | #define _ARM_PARAM_H_ | 49 | #define _ARM_PARAM_H_ |
| 50 | 50 | ||
| 51 | #if defined (__arm__) || defined (__arm64__) | ||
| 52 | |||
| 51 | #include <arm/_param.h> | 53 | #include <arm/_param.h> |
| 52 | 54 | ||
| 53 | /* | 55 | /* |
| ... | @@ -144,4 +146,6 @@ | ... | @@ -144,4 +146,6 @@ |
| 144 | #define DELAY(n) { int N = (n); while (--N > 0); } | 146 | #define DELAY(n) { int N = (n); while (--N > 0); } |
| 145 | #endif /* defined(KERNEL) || defined(STANDALONE) */ | 147 | #endif /* defined(KERNEL) || defined(STANDALONE) */ |
| 146 | 148 | ||
| 149 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 150 | |||
| 147 | #endif /* _ARM_PARAM_H_ */ | 151 | #endif /* _ARM_PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/signal.h+4| ... | @@ -9,10 +9,14 @@ | ... | @@ -9,10 +9,14 @@ |
| 9 | #ifndef _ARM_SIGNAL_ | 9 | #ifndef _ARM_SIGNAL_ |
| 10 | #define _ARM_SIGNAL_ 1 | 10 | #define _ARM_SIGNAL_ 1 |
| 11 | 11 | ||
| 12 | #if defined (__arm__) || defined (__arm64__) | ||
| 13 | |||
| 12 | #include <sys/cdefs.h> | 14 | #include <sys/cdefs.h> |
| 13 | 15 | ||
| 14 | #ifndef _ANSI_SOURCE | 16 | #ifndef _ANSI_SOURCE |
| 15 | typedef int sig_atomic_t; | 17 | typedef int sig_atomic_t; |
| 16 | #endif /* ! _ANSI_SOURCE */ | 18 | #endif /* ! _ANSI_SOURCE */ |
| 17 | 19 | ||
| 20 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 21 | |||
| 18 | #endif /* _ARM_SIGNAL_ */ | 22 | #endif /* _ARM_SIGNAL_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/arm/types.h+6-2| ... | @@ -39,9 +39,12 @@ | ... | @@ -39,9 +39,12 @@ |
| 39 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 | 39 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 |
| 40 | */ | 40 | */ |
| 41 | 41 | ||
| 42 | #ifndef _MACHTYPES_H_ | 42 | #ifndef _ARM_MACHTYPES_H_ |
| 43 | #define _ARM_MACHTYPES_H_ | ||
| 43 | #define _MACHTYPES_H_ | 44 | #define _MACHTYPES_H_ |
| 44 | 45 | ||
| 46 | #if defined (__arm__) || defined (__arm64__) | ||
| 47 | |||
| 45 | #ifndef __ASSEMBLER__ | 48 | #ifndef __ASSEMBLER__ |
| 46 | #include <arm/_types.h> | 49 | #include <arm/_types.h> |
| 47 | #include <sys/cdefs.h> | 50 | #include <sys/cdefs.h> |
| ... | @@ -104,4 +107,5 @@ typedef u_int64_t syscall_arg_t; | ... | @@ -104,4 +107,5 @@ typedef u_int64_t syscall_arg_t; |
| 104 | #endif | 107 | #endif |
| 105 | 108 | ||
| 106 | #endif /* __ASSEMBLER__ */ | 109 | #endif /* __ASSEMBLER__ */ |
| 107 | #endif /* _MACHTYPES_H_ */ | ||
| \ No newline at end of file | |||
| 110 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 111 | #endif /* _ARM_MACHTYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/_structs.h+4-19| ... | @@ -31,6 +31,8 @@ | ... | @@ -31,6 +31,8 @@ |
| 31 | #ifndef _MACH_ARM__STRUCTS_H_ | 31 | #ifndef _MACH_ARM__STRUCTS_H_ |
| 32 | #define _MACH_ARM__STRUCTS_H_ | 32 | #define _MACH_ARM__STRUCTS_H_ |
| 33 | 33 | ||
| 34 | #if defined (__arm__) || defined (__arm64__) | ||
| 35 | |||
| 34 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ | 36 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 35 | #include <machine/types.h> /* __uint32_t */ | 37 | #include <machine/types.h> /* __uint32_t */ |
| 36 | 38 | ||
| ... | @@ -507,25 +509,6 @@ _STRUCT_ARM_NEON_STATE | ... | @@ -507,25 +509,6 @@ _STRUCT_ARM_NEON_STATE |
| 507 | 509 | ||
| 508 | #endif /* __DARWIN_UNIX03 */ | 510 | #endif /* __DARWIN_UNIX03 */ |
| 509 | 511 | ||
| 510 | #if __DARWIN_UNIX03 | ||
| 511 | #define _STRUCT_ARM_AMX_STATE_V1 struct __darwin_arm_amx_state_v1 | ||
| 512 | _STRUCT_ARM_AMX_STATE_V1 | ||
| 513 | { | ||
| 514 | 	__uint8_t __x[8][64]; /* 8 64-byte registers */ | ||
| 515 | 	__uint8_t __y[8][64]; /* 8 64-byte registers */ | ||
| 516 | 	__uint8_t __z[64][64]; /* 64 64-byte registers in an M-by-N matrix */ | ||
| 517 | 	__uint64_t __amx_state_t_el1; /* AMX_STATE_T_EL1 value */ | ||
| 518 | } __attribute__((aligned(64))); | ||
| 519 | #else /* !__DARWIN_UNIX03 */ | ||
| 520 | #define _STRUCT_ARM_AMX_STATE_V1 struct arm_amx_state_v1 | ||
| 521 | _STRUCT_ARM_AMX_STATE_V1 | ||
| 522 | { | ||
| 523 | 	__uint8_t x[8][64]; /* 8 64-byte registers */ | ||
| 524 | 	__uint8_t y[8][64]; /* 8 64-byte registers */ | ||
| 525 | 	__uint8_t z[64][64]; /* 64 64-byte registers in an M-by-N matrix */ | ||
| 526 | 	__uint64_t amx_state_t_el1; /* AMX_STATE_T_EL1 value. */ | ||
| 527 | } __attribute__((aligned(64))); | ||
| 528 | #endif /* __DARWIN_UNIX03 */ | ||
| 529 | 512 | ||
| 530 | #define _STRUCT_ARM_PAGEIN_STATE struct __arm_pagein_state | 513 | #define _STRUCT_ARM_PAGEIN_STATE struct __arm_pagein_state |
| 531 | _STRUCT_ARM_PAGEIN_STATE | 514 | _STRUCT_ARM_PAGEIN_STATE |
| ... | @@ -642,4 +625,6 @@ _STRUCT_ARM_CPMU_STATE64 | ... | @@ -642,4 +625,6 @@ _STRUCT_ARM_CPMU_STATE64 |
| 642 | }; | 625 | }; |
| 643 | #endif /* !__DARWIN_UNIX03 */ | 626 | #endif /* !__DARWIN_UNIX03 */ |
| 644 | 627 | ||
| 628 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 629 | |||
| 645 | #endif /* _MACH_ARM__STRUCTS_H_ */ | 630 | #endif /* _MACH_ARM__STRUCTS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/boolean.h+4| ... | @@ -65,6 +65,10 @@ | ... | @@ -65,6 +65,10 @@ |
| 65 | #ifndef _MACH_ARM_BOOLEAN_H_ | 65 | #ifndef _MACH_ARM_BOOLEAN_H_ |
| 66 | #define _MACH_ARM_BOOLEAN_H_ | 66 | #define _MACH_ARM_BOOLEAN_H_ |
| 67 | 67 | ||
| 68 | #if defined (__arm__) || defined (__arm64__) | ||
| 69 | |||
| 68 | typedef int boolean_t; | 70 | typedef int boolean_t; |
| 69 | 71 | ||
| 72 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 73 | |||
| 70 | #endif /* _MACH_ARM_BOOLEAN_H_ */ | 74 | #endif /* _MACH_ARM_BOOLEAN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/exception.h+3| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #ifndef _MACH_ARM_EXCEPTION_H_ | 29 | #ifndef _MACH_ARM_EXCEPTION_H_ |
| 30 | #define _MACH_ARM_EXCEPTION_H_ | 30 | #define _MACH_ARM_EXCEPTION_H_ |
| 31 | 31 | ||
| 32 | #if defined (__arm__) || defined (__arm64__) | ||
| 33 | |||
| 32 | #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ | 34 | #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ |
| 33 | 35 | ||
| 34 | #define EXC_MASK_MACHINE 0 | 36 | #define EXC_MASK_MACHINE 0 |
| ... | @@ -75,5 +77,6 @@ | ... | @@ -75,5 +77,6 @@ |
| 75 | 77 | ||
| 76 | #define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */ | 78 | #define EXC_ARM_BREAKPOINT 1 /* breakpoint trap */ |
| 77 | 79 | ||
| 80 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 78 | 81 | ||
| 79 | #endif /* _MACH_ARM_EXCEPTION_H_ */ | 82 | #endif /* _MACH_ARM_EXCEPTION_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/kern_return.h+4| ... | @@ -67,8 +67,12 @@ | ... | @@ -67,8 +67,12 @@ |
| 67 | #ifndef _MACH_ARM_KERN_RETURN_H_ | 67 | #ifndef _MACH_ARM_KERN_RETURN_H_ |
| 68 | #define _MACH_ARM_KERN_RETURN_H_ | 68 | #define _MACH_ARM_KERN_RETURN_H_ |
| 69 | 69 | ||
| 70 | #if defined (__arm__) || defined (__arm64__) | ||
| 71 | |||
| 70 | #ifndef ASSEMBLER | 72 | #ifndef ASSEMBLER |
| 71 | typedef int kern_return_t; | 73 | typedef int kern_return_t; |
| 72 | #endif /* ASSEMBLER */ | 74 | #endif /* ASSEMBLER */ |
| 73 | 75 | ||
| 76 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 77 | |||
| 74 | #endif /* _MACH_ARM_KERN_RETURN_H_ */ | 78 | #endif /* _MACH_ARM_KERN_RETURN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/processor_info.h+4| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #ifndef _MACH_ARM_PROCESSOR_INFO_H_ | 29 | #ifndef _MACH_ARM_PROCESSOR_INFO_H_ |
| 30 | #define _MACH_ARM_PROCESSOR_INFO_H_ | 30 | #define _MACH_ARM_PROCESSOR_INFO_H_ |
| 31 | 31 | ||
| 32 | #if defined (__arm__) || defined (__arm64__) | ||
| 33 | |||
| 32 | #define PROCESSOR_CPU_STAT 0x10000003 /* Low-level CPU statistics */ | 34 | #define PROCESSOR_CPU_STAT 0x10000003 /* Low-level CPU statistics */ |
| 33 | #define PROCESSOR_CPU_STAT64 0x10000004 /* Low-level CPU statistics, in full 64-bit */ | 35 | #define PROCESSOR_CPU_STAT64 0x10000004 /* Low-level CPU statistics, in full 64-bit */ |
| 34 | 36 | ||
| ... | @@ -69,4 +71,6 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t; | ... | @@ -69,4 +71,6 @@ typedef struct processor_cpu_stat64 *processor_cpu_stat64_t; |
| 69 | #define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \ | 71 | #define PROCESSOR_CPU_STAT64_COUNT ((mach_msg_type_number_t) \ |
| 70 | 	 (sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t))) | 72 | 	 (sizeof(processor_cpu_stat64_data_t) / sizeof(integer_t))) |
| 71 | 73 | ||
| 74 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 75 | |||
| 72 | #endif /* _MACH_ARM_PROCESSOR_INFO_H_ */ | 76 | #endif /* _MACH_ARM_PROCESSOR_INFO_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/rpc.h+4| ... | @@ -32,4 +32,8 @@ | ... | @@ -32,4 +32,8 @@ |
| 32 | #ifndef _MACH_ARM_RPC_H_ | 32 | #ifndef _MACH_ARM_RPC_H_ |
| 33 | #define _MACH_ARM_RPC_H_ | 33 | #define _MACH_ARM_RPC_H_ |
| 34 | 34 | ||
| 35 | #if defined (__arm__) || defined (__arm64__) | ||
| 36 | |||
| 37 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 38 | |||
| 35 | #endif /* _MACH_ARM_RPC_H_ */ | 39 | #endif /* _MACH_ARM_RPC_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_state.h+3-5| ... | @@ -32,13 +32,11 @@ | ... | @@ -32,13 +32,11 @@ |
| 32 | #ifndef _MACH_ARM_THREAD_STATE_H_ | 32 | #ifndef _MACH_ARM_THREAD_STATE_H_ |
| 33 | #define _MACH_ARM_THREAD_STATE_H_ | 33 | #define _MACH_ARM_THREAD_STATE_H_ |
| 34 | 34 | ||
| 35 | #if defined (__arm__) || defined (__arm64__) | ||
| 36 | |||
| 35 | /* Size of maximum exported thread state in words */ | 37 | /* Size of maximum exported thread state in words */ |
| 36 | #define ARM_THREAD_STATE_MAX (1296) /* Size of biggest state possible */ | 38 | #define ARM_THREAD_STATE_MAX (1296) /* Size of biggest state possible */ |
| 37 | 39 | ||
| 38 | #if defined (__arm__) || defined(__arm64__) | 40 | #endif /* defined (__arm__) || defined (__arm64__) */ |
| 39 | #define THREAD_STATE_MAX ARM_THREAD_STATE_MAX | ||
| 40 | #else | ||
| 41 | #error Unsupported arch | ||
| 42 | #endif | ||
| 43 | 41 | ||
| 44 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ | 42 | #endif /* _MACH_ARM_THREAD_STATE_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/thread_status.h+9-23| ... | @@ -33,10 +33,12 @@ | ... | @@ -33,10 +33,12 @@ |
| 33 | #ifndef _ARM_THREAD_STATUS_H_ | 33 | #ifndef _ARM_THREAD_STATUS_H_ |
| 34 | #define _ARM_THREAD_STATUS_H_ | 34 | #define _ARM_THREAD_STATUS_H_ |
| 35 | 35 | ||
| 36 | #if defined (__arm__) || defined (__arm64__) | ||
| 37 | |||
| 36 | #include <mach/machine/_structs.h> | 38 | #include <mach/machine/_structs.h> |
| 39 | #include <mach/machine/thread_state.h> | ||
| 37 | #include <mach/message.h> | 40 | #include <mach/message.h> |
| 38 | #include <mach/vm_types.h> | 41 | #include <mach/vm_types.h> |
| 39 | #include <mach/arm/thread_state.h> | ||
| 40 | 42 | ||
| 41 | /* | 43 | /* |
| 42 | * Support for determining the state of a thread | 44 | * Support for determining the state of a thread |
| ... | @@ -67,13 +69,12 @@ | ... | @@ -67,13 +69,12 @@ |
| 67 | #define ARM_CPMU_STATE64 18 | 69 | #define ARM_CPMU_STATE64 18 |
| 68 | 70 | ||
| 69 | 71 | ||
| 70 | /* API */ | ||
| 71 | #define ARM_AMX_STATE 24 | ||
| 72 | #define ARM_AMX_STATE_V1 25 | ||
| 73 | #define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) \ | ||
| 74 | 	((_flavor_) == ARM_AMX_STATE_V1) | ||
| 75 | #define ARM_PAGEIN_STATE 27 | 72 | #define ARM_PAGEIN_STATE 27 |
| 76 | 73 | ||
| 74 | #ifndef ARM_STATE_FLAVOR_IS_OTHER_VALID | ||
| 75 | #define ARM_STATE_FLAVOR_IS_OTHER_VALID(_flavor_) 0 | ||
| 76 | #endif | ||
| 77 | |||
| 77 | #define VALID_THREAD_STATE_FLAVOR(x) \ | 78 | #define VALID_THREAD_STATE_FLAVOR(x) \ |
| 78 | 	((x == ARM_THREAD_STATE) || \ | 79 | 	((x == ARM_THREAD_STATE) || \ |
| 79 | 	 (x == ARM_VFP_STATE) || \ | 80 | 	 (x == ARM_VFP_STATE) || \ |
| ... | @@ -170,7 +171,6 @@ typedef _STRUCT_ARM_NEON_STATE arm_neon_state_t; | ... | @@ -170,7 +171,6 @@ typedef _STRUCT_ARM_NEON_STATE arm_neon_state_t; |
| 170 | typedef _STRUCT_ARM_NEON_STATE arm_neon_state32_t; | 171 | typedef _STRUCT_ARM_NEON_STATE arm_neon_state32_t; |
| 171 | typedef _STRUCT_ARM_NEON_STATE64 arm_neon_state64_t; | 172 | typedef _STRUCT_ARM_NEON_STATE64 arm_neon_state64_t; |
| 172 | 173 | ||
| 173 | typedef _STRUCT_ARM_AMX_STATE_V1 arm_amx_state_v1_t; | ||
| 174 | 174 | ||
| 175 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state_t; | 175 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state_t; |
| 176 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state32_t; | 176 | typedef _STRUCT_ARM_EXCEPTION_STATE arm_exception_state32_t; |
| ... | @@ -224,26 +224,12 @@ typedef _STRUCT_ARM_LEGACY_DEBUG_STATE arm_debug_state_t; | ... | @@ -224,26 +224,12 @@ typedef _STRUCT_ARM_LEGACY_DEBUG_STATE arm_debug_state_t; |
| 224 | #define MACHINE_THREAD_STATE_COUNT ARM_UNIFIED_THREAD_STATE_COUNT | 224 | #define MACHINE_THREAD_STATE_COUNT ARM_UNIFIED_THREAD_STATE_COUNT |
| 225 | 225 | ||
| 226 | 226 | ||
| 227 | struct arm_amx_state { | ||
| 228 | 	arm_state_hdr_t ash; | ||
| 229 | 	union { | ||
| 230 | 		arm_amx_state_v1_t as_v1; | ||
| 231 | 	} uas; | ||
| 232 | }; | ||
| 233 | #define as_v1 uas.as_v1 | ||
| 234 | typedef struct arm_amx_state arm_amx_state_t; | ||
| 235 | |||
| 236 | #define ARM_AMX_STATE_V1_COUNT ((mach_msg_type_number_t) \ | ||
| 237 | 	(sizeof(arm_amx_state_v1_t)/sizeof(unsigned int))) | ||
| 238 | |||
| 239 | #define ARM_AMX_STATE_COUNT ((mach_msg_type_number_t) \ | ||
| 240 | 	(sizeof(arm_amx_state_t)/sizeof(unsigned int))) | ||
| 241 | |||
| 242 | |||
| 243 | /* | 227 | /* |
| 244 | * Largest state on this machine: | 228 | * Largest state on this machine: |
| 245 | */ | 229 | */ |
| 246 | #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX | 230 | #define THREAD_MACHINE_STATE_MAX THREAD_STATE_MAX |
| 247 | 231 | ||
| 248 | 232 | ||
| 233 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 234 | |||
| 249 | #endif /* _ARM_THREAD_STATUS_H_ */ | 235 | #endif /* _ARM_THREAD_STATUS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/vm_param.h+4| ... | @@ -36,6 +36,8 @@ | ... | @@ -36,6 +36,8 @@ |
| 36 | #ifndef _MACH_ARM_VM_PARAM_H_ | 36 | #ifndef _MACH_ARM_VM_PARAM_H_ |
| 37 | #define _MACH_ARM_VM_PARAM_H_ | 37 | #define _MACH_ARM_VM_PARAM_H_ |
| 38 | 38 | ||
| 39 | #if defined (__arm__) || defined (__arm64__) | ||
| 40 | |||
| 39 | 41 | ||
| 40 | #if !defined (KERNEL) && !defined (__ASSEMBLER__) | 42 | #if !defined (KERNEL) && !defined (__ASSEMBLER__) |
| 41 | #include <mach/vm_page_size.h> | 43 | #include <mach/vm_page_size.h> |
| ... | @@ -104,4 +106,6 @@ | ... | @@ -104,4 +106,6 @@ |
| 104 | 106 | ||
| 105 | #define SWI_SYSCALL 0x80 | 107 | #define SWI_SYSCALL 0x80 |
| 106 | 108 | ||
| 109 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 110 | |||
| 107 | #endif /* _MACH_ARM_VM_PARAM_H_ */ | 111 | #endif /* _MACH_ARM_VM_PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.11-none/mach/arm/vm_types.h+15-10| ... | @@ -67,11 +67,14 @@ | ... | @@ -67,11 +67,14 @@ |
| 67 | #ifndef _MACH_ARM_VM_TYPES_H_ | 67 | #ifndef _MACH_ARM_VM_TYPES_H_ |
| 68 | #define _MACH_ARM_VM_TYPES_H_ | 68 | #define _MACH_ARM_VM_TYPES_H_ |
| 69 | 69 | ||
| 70 | #if defined (__arm__) || defined (__arm64__) | ||
| 71 | |||
| 70 | #ifndef ASSEMBLER | 72 | #ifndef ASSEMBLER |
| 71 | 73 | ||
| 72 | #include <arm/_types.h> | 74 | #include <arm/_types.h> |
| 73 | #include <stdint.h> | 75 | #include <stdint.h> |
| 74 | #include <Availability.h> | 76 | #include <Availability.h> |
| 77 | #include <sys/cdefs.h> | ||
| 75 | 78 | ||
| 76 | /* | 79 | /* |
| 77 | * natural_t and integer_t are Mach's legacy types for machine- | 80 | * natural_t and integer_t are Mach's legacy types for machine- |
| ... | @@ -98,18 +101,18 @@ typedef int integer_t; | ... | @@ -98,18 +101,18 @@ typedef int integer_t; |
| 98 | * e.g. an offset into a virtual memory space. | 101 | * e.g. an offset into a virtual memory space. |
| 99 | */ | 102 | */ |
| 100 | #ifdef __LP64__ | 103 | #ifdef __LP64__ |
| 101 | typedef uintptr_t vm_offset_t; | 104 | typedef uintptr_t vm_offset_t __kernel_ptr_semantics; |
| 102 | typedef uintptr_t vm_size_t; | 105 | typedef uintptr_t vm_size_t; |
| 103 | 106 | ||
| 104 | typedef uint64_t mach_vm_address_t; | 107 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; |
| 105 | typedef uint64_t mach_vm_offset_t; | 108 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; |
| 106 | typedef uint64_t mach_vm_size_t; | 109 | typedef uint64_t mach_vm_size_t; |
| 107 | 110 | ||
| 108 | typedef uint64_t vm_map_offset_t; | 111 | typedef uint64_t vm_map_offset_t __kernel_ptr_semantics; |
| 109 | typedef uint64_t vm_map_address_t; | 112 | typedef uint64_t vm_map_address_t __kernel_ptr_semantics; |
| 110 | typedef uint64_t vm_map_size_t; | 113 | typedef uint64_t vm_map_size_t; |
| 111 | #else | 114 | #else |
| 112 | typedef natural_t vm_offset_t; | 115 | typedef natural_t vm_offset_t __kernel_ptr_semantics; |
| 113 | /* | 116 | /* |
| 114 | * A vm_size_t is the proper type for e.g. | 117 | * A vm_size_t is the proper type for e.g. |
| 115 | * expressing the difference between two | 118 | * expressing the difference between two |
| ... | @@ -129,13 +132,13 @@ typedef uint32_t mach_vm_address_t; | ... | @@ -129,13 +132,13 @@ typedef uint32_t mach_vm_address_t; |
| 129 | typedef uint32_t mach_vm_offset_t; | 132 | typedef uint32_t mach_vm_offset_t; |
| 130 | typedef uint32_t mach_vm_size_t; | 133 | typedef uint32_t mach_vm_size_t; |
| 131 | #else | 134 | #else |
| 132 | typedef uint64_t mach_vm_address_t; | 135 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; |
| 133 | typedef uint64_t mach_vm_offset_t; | 136 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; |
| 134 | typedef uint64_t mach_vm_size_t; | 137 | typedef uint64_t mach_vm_size_t; |
| 135 | #endif | 138 | #endif |
| 136 | 139 | ||
| 137 | typedef uint32_t vm_map_offset_t; | 140 | typedef uint32_t vm_map_offset_t __kernel_ptr_semantics; |
| 138 | typedef uint32_t vm_map_address_t; | 141 | typedef uint32_t vm_map_address_t __kernel_ptr_semantics; |
| 139 | typedef uint32_t vm_map_size_t; | 142 | typedef uint32_t vm_map_size_t; |
| 140 | #endif /* __LP64__ */ | 143 | #endif /* __LP64__ */ |
| 141 | 144 | ||
| ... | @@ -154,4 +157,6 @@ typedef vm_offset_t mach_port_context_t; | ... | @@ -154,4 +157,6 @@ typedef vm_offset_t mach_port_context_t; |
| 154 | */ | 157 | */ |
| 155 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 | 158 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 |
| 156 | 159 | ||
| 160 | #endif /* defined (__arm__) || defined (__arm64__) */ | ||
| 161 | |||
| 157 | #endif /* _MACH_ARM_VM_TYPES_H_ */ | 162 | #endif /* _MACH_ARM_VM_TYPES_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/aarch64-macos.12-none/mach/arm/_structs.h+14-5| ... | @@ -184,6 +184,7 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -184,6 +184,7 @@ _STRUCT_ARM_THREAD_STATE64 |
| 184 | 184 | ||
| 185 | #define __DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH 0x1 | 185 | #define __DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH 0x1 |
| 186 | #define __DARWIN_ARM_THREAD_STATE64_FLAGS_IB_SIGNED_LR 0x2 | 186 | #define __DARWIN_ARM_THREAD_STATE64_FLAGS_IB_SIGNED_LR 0x2 |
| 187 | #define __DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED 0x4 | ||
| 187 | 188 | ||
| 188 | /* Return pc field of arm_thread_state64_t as a data pointer value */ | 189 | /* Return pc field of arm_thread_state64_t as a data pointer value */ |
| 189 | #define __darwin_arm_thread_state64_get_pc(ts) \ | 190 | #define __darwin_arm_thread_state64_get_pc(ts) \ |
| ... | @@ -212,7 +213,9 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -212,7 +213,9 @@ _STRUCT_ARM_THREAD_STATE64 |
| 212 | 	ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \ | 213 | 	ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \ |
| 213 | 	ptrauth_key_process_independent_code, \ | 214 | 	ptrauth_key_process_independent_code, \ |
| 214 | 	ptrauth_string_discriminator("pc")) : ptrauth_auth_data(__f, \ | 215 | 	ptrauth_string_discriminator("pc")) : ptrauth_auth_data(__f, \ |
| 215 | 	ptrauth_key_function_pointer, 0)) : __f); }) | 216 | 	ptrauth_key_function_pointer, 0)) : __f); \ |
| 217 | 	__tsp->__opaque_flags &= \ | ||
| 218 | 	~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; }) | ||
| 216 | /* Return lr field of arm_thread_state64_t as a data pointer value */ | 219 | /* Return lr field of arm_thread_state64_t as a data pointer value */ |
| 217 | #define __darwin_arm_thread_state64_get_lr(ts) \ | 220 | #define __darwin_arm_thread_state64_get_lr(ts) \ |
| 218 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ | 221 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ |
| ... | @@ -243,7 +246,8 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -243,7 +246,8 @@ _STRUCT_ARM_THREAD_STATE64 |
| 243 | 	ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \ | 246 | 	ptrauth_auth_and_resign(__f, ptrauth_key_function_pointer, 0, \ |
| 244 | 	ptrauth_key_process_independent_code, \ | 247 | 	ptrauth_key_process_independent_code, \ |
| 245 | 	ptrauth_string_discriminator("lr"))) : ptrauth_auth_data(__f, \ | 248 | 	ptrauth_string_discriminator("lr"))) : ptrauth_auth_data(__f, \ |
| 246 | 	ptrauth_key_function_pointer, 0)) : __f); }) | 249 | 	ptrauth_key_function_pointer, 0)) : __f); __tsp->__opaque_flags &= \ |
| 250 | 	~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; }) | ||
| 247 | /* Return sp field of arm_thread_state64_t as a data pointer value */ | 251 | /* Return sp field of arm_thread_state64_t as a data pointer value */ |
| 248 | #define __darwin_arm_thread_state64_get_sp(ts) \ | 252 | #define __darwin_arm_thread_state64_get_sp(ts) \ |
| 249 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ | 253 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ |
| ... | @@ -260,7 +264,9 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -260,7 +264,9 @@ _STRUCT_ARM_THREAD_STATE64 |
| 260 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \ | 264 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \ |
| 261 | 	ptrauth_sign_unauthenticated(__p, \ | 265 | 	ptrauth_sign_unauthenticated(__p, \ |
| 262 | 	ptrauth_key_process_independent_data, \ | 266 | 	ptrauth_key_process_independent_data, \ |
| 263 | 	ptrauth_string_discriminator("sp")) : __p); }) | 267 | 	ptrauth_string_discriminator("sp")) : __p); \ |
| 268 | 	__tsp->__opaque_flags &= \ | ||
| 269 | 	~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; }) | ||
| 264 | /* Return fp field of arm_thread_state64_t as a data pointer value */ | 270 | /* Return fp field of arm_thread_state64_t as a data pointer value */ |
| 265 | #define __darwin_arm_thread_state64_get_fp(ts) \ | 271 | #define __darwin_arm_thread_state64_get_fp(ts) \ |
| 266 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ | 272 | 	__extension__ ({ const _STRUCT_ARM_THREAD_STATE64 *__tsp = &(ts); \ |
| ... | @@ -277,7 +283,9 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -277,7 +283,9 @@ _STRUCT_ARM_THREAD_STATE64 |
| 277 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \ | 283 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? \ |
| 278 | 	ptrauth_sign_unauthenticated(__p, \ | 284 | 	ptrauth_sign_unauthenticated(__p, \ |
| 279 | 	ptrauth_key_process_independent_data, \ | 285 | 	ptrauth_key_process_independent_data, \ |
| 280 | 	ptrauth_string_discriminator("fp")) : __p); }) | 286 | 	ptrauth_string_discriminator("fp")) : __p); \ |
| 287 | 	__tsp->__opaque_flags &= \ | ||
| 288 | 	~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; }) | ||
| 281 | 289 | ||
| 282 | /* Strip ptr auth bits from pc, lr, sp and fp field of arm_thread_state64_t */ | 290 | /* Strip ptr auth bits from pc, lr, sp and fp field of arm_thread_state64_t */ |
| 283 | #define __darwin_arm_thread_state64_ptrauth_strip(ts) \ | 291 | #define __darwin_arm_thread_state64_ptrauth_strip(ts) \ |
| ... | @@ -296,7 +304,8 @@ _STRUCT_ARM_THREAD_STATE64 | ... | @@ -296,7 +304,8 @@ _STRUCT_ARM_THREAD_STATE64 |
| 296 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? __tsp->__opaque_fp : \ | 304 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH) ? __tsp->__opaque_fp : \ |
| 297 | 	ptrauth_strip(__tsp->__opaque_fp, ptrauth_key_process_independent_data)); \ | 305 | 	ptrauth_strip(__tsp->__opaque_fp, ptrauth_key_process_independent_data)); \ |
| 298 | 	__tsp->__opaque_flags |= \ | 306 | 	__tsp->__opaque_flags |= \ |
| 299 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH; }) | 307 | 	__DARWIN_ARM_THREAD_STATE64_FLAGS_NO_PTRAUTH; __tsp->__opaque_flags &= \ |
| 308 | 	~__DARWIN_ARM_THREAD_STATE64_FLAGS_KERNEL_SIGNED; }) | ||
| 300 | 309 | ||
| 301 | #else /* __has_feature(ptrauth_calls) && defined(__LP64__) */ | 310 | #else /* __has_feature(ptrauth_calls) && defined(__LP64__) */ |
| 302 | 311 |
lib/libc/include/aarch64-macos.12-none/mach/arm/vm_param.h+1| ... | @@ -39,6 +39,7 @@ | ... | @@ -39,6 +39,7 @@ |
| 39 | #if defined (__arm__) || defined (__arm64__) | 39 | #if defined (__arm__) || defined (__arm64__) |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | |||
| 42 | #if !defined (KERNEL) && !defined (__ASSEMBLER__) | 43 | #if !defined (KERNEL) && !defined (__ASSEMBLER__) |
| 43 | #include <mach/vm_page_size.h> | 44 | #include <mach/vm_page_size.h> |
| 44 | #endif | 45 | #endif |
lib/libc/include/any-macos-any/AssertMacros.h+5| ... | @@ -214,10 +214,15 @@ | ... | @@ -214,10 +214,15 @@ |
| 214 | * If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used. | 214 | * If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used. |
| 215 | */ | 215 | */ |
| 216 | #ifndef DEBUG_ASSERT_MESSAGE | 216 | #ifndef DEBUG_ASSERT_MESSAGE |
| 217 | #include <TargetConditionals.h> | ||
| 217 | #ifdef KERNEL | 218 | #ifdef KERNEL |
| 218 | #include <libkern/libkern.h> | 219 | #include <libkern/libkern.h> |
| 219 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | 220 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ |
| 220 | printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | 221 | printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); |
| 222 | #elif TARGET_OS_DRIVERKIT | ||
| 223 | #include <os/log.h> | ||
| 224 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 225 | os_log(OS_LOG_DEFAULT, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 221 | #else | 226 | #else |
| 222 | #include <stdio.h> | 227 | #include <stdio.h> |
| 223 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | 228 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ |
lib/libc/include/any-macos-any/AvailabilityMacros.h created+4016| ... | @@ -0,0 +1,4016 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2001-2010 by Apple Inc.. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | File: AvailabilityMacros.h | ||
| 26 | |||
| 27 | More Info: See the SDK Compatibility Guide | ||
| 28 | |||
| 29 | Contains: Autoconfiguration of AVAILABLE_ macros for Mac OS X | ||
| 30 | |||
| 31 | This header enables a developer to specify build time | ||
| 32 | constraints on what Mac OS X versions the resulting | ||
| 33 | application will be run. There are two bounds a developer | ||
| 34 | can specify: | ||
| 35 | |||
| 36 | MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 37 | MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 38 | |||
| 39 | The lower bound controls which calls to OS functions will | ||
| 40 | be weak-importing (allowed to be unresolved at launch time). | ||
| 41 | The upper bound controls which OS functionality, if used, | ||
| 42 | will result in a compiler error because that functionality is | ||
| 43 | not available on any OS in the specifed range. | ||
| 44 | |||
| 45 | For example, suppose an application is compiled with: | ||
| 46 | |||
| 47 | MAC_OS_X_VERSION_MIN_REQUIRED = MAC_OS_X_VERSION_10_2 | ||
| 48 | MAC_OS_X_VERSION_MAX_ALLOWED = MAC_OS_X_VERSION_10_3 | ||
| 49 | |||
| 50 | and an OS header contains: | ||
| 51 | |||
| 52 | extern void funcA(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 53 | extern void funcB(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2; | ||
| 54 | extern void funcC(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3; | ||
| 55 | extern void funcD(void) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 56 | extern void funcE(void) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 57 | extern void funcF(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 58 | extern void funcG(void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 59 | |||
| 60 | typedef long TypeA DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 61 | typedef long TypeB DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 62 | typedef long TypeC DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 63 | typedef long TypeD DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 64 | typedef long TypeE DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 65 | |||
| 66 | Any application code which uses these declarations will get the following: | ||
| 67 | |||
| 68 | compile link run | ||
| 69 | ------- ------ ------- | ||
| 70 | funcA: normal normal normal | ||
| 71 | funcB: warning normal normal | ||
| 72 | funcC: normal normal normal | ||
| 73 | funcD: normal normal normal | ||
| 74 | funcE: normal normal normal | ||
| 75 | funcF: normal weak on 10.3 normal, on 10.2 (&funcF == NULL) | ||
| 76 | funcG: error error n/a | ||
| 77 | typeA: warning | ||
| 78 | typeB: warning | ||
| 79 | typeC: warning | ||
| 80 | typeD: normal | ||
| 81 | typeE: normal | ||
| 82 | |||
| 83 | |||
| 84 | */ | ||
| 85 | #ifndef __AVAILABILITYMACROS__ | ||
| 86 | #define __AVAILABILITYMACROS__ | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Set up standard Mac OS X versions | ||
| 90 | */ | ||
| 91 | #define MAC_OS_X_VERSION_10_0 1000 | ||
| 92 | #define MAC_OS_X_VERSION_10_1 1010 | ||
| 93 | #define MAC_OS_X_VERSION_10_2 1020 | ||
| 94 | #define MAC_OS_X_VERSION_10_3 1030 | ||
| 95 | #define MAC_OS_X_VERSION_10_4 1040 | ||
| 96 | #define MAC_OS_X_VERSION_10_5 1050 | ||
| 97 | #define MAC_OS_X_VERSION_10_6 1060 | ||
| 98 | #define MAC_OS_X_VERSION_10_7 1070 | ||
| 99 | #define MAC_OS_X_VERSION_10_8 1080 | ||
| 100 | #define MAC_OS_X_VERSION_10_9 1090 | ||
| 101 | #define MAC_OS_X_VERSION_10_10 101000 | ||
| 102 | #define MAC_OS_X_VERSION_10_10_2 101002 | ||
| 103 | #define MAC_OS_X_VERSION_10_10_3 101003 | ||
| 104 | #define MAC_OS_X_VERSION_10_11 101100 | ||
| 105 | #define MAC_OS_X_VERSION_10_11_2 101102 | ||
| 106 | #define MAC_OS_X_VERSION_10_11_3 101103 | ||
| 107 | #define MAC_OS_X_VERSION_10_11_4 101104 | ||
| 108 | #define MAC_OS_X_VERSION_10_12 101200 | ||
| 109 | #define MAC_OS_X_VERSION_10_12_1 101201 | ||
| 110 | #define MAC_OS_X_VERSION_10_12_2 101202 | ||
| 111 | #define MAC_OS_X_VERSION_10_12_4 101204 | ||
| 112 | #define MAC_OS_X_VERSION_10_13 101300 | ||
| 113 | #define MAC_OS_X_VERSION_10_13_1 101301 | ||
| 114 | #define MAC_OS_X_VERSION_10_13_2 101302 | ||
| 115 | #define MAC_OS_X_VERSION_10_13_4 101304 | ||
| 116 | #define MAC_OS_X_VERSION_10_14 101400 | ||
| 117 | #define MAC_OS_X_VERSION_10_14_1 101401 | ||
| 118 | #define MAC_OS_X_VERSION_10_14_4 101404 | ||
| 119 | #define MAC_OS_X_VERSION_10_15 101500 | ||
| 120 | #define MAC_OS_VERSION_11_0 110000 | ||
| 121 | #define MAC_OS_VERSION_11_1 110100 | ||
| 122 | #define MAC_OS_VERSION_11_3 110300 | ||
| 123 | #define MAC_OS_VERSION_12_0 120000 | ||
| 124 | |||
| 125 | /* | ||
| 126 | * If min OS not specified, assume 10.4 for intel | ||
| 127 | * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable | ||
| 128 | */ | ||
| 129 | #ifndef MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 130 | #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 131 | #if (__i386__ || __x86_64__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < MAC_OS_X_VERSION_10_4) | ||
| 132 | #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. | ||
| 133 | #endif | ||
| 134 | #define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 135 | #else | ||
| 136 | #if __i386__ || __x86_64__ | ||
| 137 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 | ||
| 138 | #elif __arm__ || __arm64__ | ||
| 139 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 | ||
| 140 | #else | ||
| 141 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1 | ||
| 142 | #endif | ||
| 143 | #endif | ||
| 144 | #endif | ||
| 145 | |||
| 146 | /* | ||
| 147 | * if max OS not specified, assume larger of (10.15, min) | ||
| 148 | */ | ||
| 149 | #ifndef MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 150 | #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_12_0 | ||
| 151 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 152 | #else | ||
| 153 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_12_0 | ||
| 154 | #endif | ||
| 155 | #endif | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Error on bad values | ||
| 159 | */ | ||
| 160 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 161 | #error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 162 | #endif | ||
| 163 | #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_0 | ||
| 164 | #error MAC_OS_X_VERSION_MIN_REQUIRED must be >= MAC_OS_X_VERSION_10_0 | ||
| 165 | #endif | ||
| 166 | |||
| 167 | /* | ||
| 168 | * only certain compilers support __attribute__((weak_import)) | ||
| 169 | */ | ||
| 170 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) | ||
| 171 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 172 | #elif defined(__MWERKS__) && (__MWERKS__ >= 0x3205) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) && !defined(__INTEL__) | ||
| 173 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 174 | #else | ||
| 175 | #define WEAK_IMPORT_ATTRIBUTE | ||
| 176 | #endif | ||
| 177 | |||
| 178 | /* | ||
| 179 | * only certain compilers support __attribute__((deprecated)) | ||
| 180 | */ | ||
| 181 | #if defined(__has_feature) && defined(__has_attribute) | ||
| 182 | #if __has_attribute(deprecated) | ||
| 183 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 184 | #if __has_feature(attribute_deprecated_with_message) | ||
| 185 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 186 | #else | ||
| 187 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 188 | #endif | ||
| 189 | #else | ||
| 190 | #define DEPRECATED_ATTRIBUTE | ||
| 191 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 192 | #endif | ||
| 193 | #elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 194 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 195 | #if (__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) | ||
| 196 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 197 | #else | ||
| 198 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 199 | #endif | ||
| 200 | #else | ||
| 201 | #define DEPRECATED_ATTRIBUTE | ||
| 202 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 203 | #endif | ||
| 204 | |||
| 205 | /* | ||
| 206 | * only certain compilers support __attribute__((unavailable)) | ||
| 207 | */ | ||
| 208 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 209 | #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable)) | ||
| 210 | #else | ||
| 211 | #define UNAVAILABLE_ATTRIBUTE | ||
| 212 | #endif | ||
| 213 | |||
| 214 | |||
| 215 | /* | ||
| 216 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 217 | * | ||
| 218 | * Used on functions introduced in Mac OS X 10.0 | ||
| 219 | */ | ||
| 220 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 221 | |||
| 222 | /* | ||
| 223 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED | ||
| 224 | * | ||
| 225 | * Used on functions introduced in Mac OS X 10.0, | ||
| 226 | * and deprecated in Mac OS X 10.0 | ||
| 227 | */ | ||
| 228 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 229 | |||
| 230 | /* | ||
| 231 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 232 | * | ||
| 233 | * Used on types deprecated in Mac OS X 10.0 | ||
| 234 | */ | ||
| 235 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 236 | |||
| 237 | #ifndef __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 238 | 	#ifdef __has_attribute | ||
| 239 | 		#if __has_attribute(availability) | ||
| 240 | 			#include <Availability.h> | ||
| 241 | 			#define __AVAILABILITY_MACROS_USES_AVAILABILITY 1 | ||
| 242 | 		#endif | ||
| 243 | 	#endif | ||
| 244 | #endif | ||
| 245 | |||
| 246 | #if TARGET_OS_OSX | ||
| 247 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 248 | #elif TARGET_OS_MACCATALYST | ||
| 249 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 250 | #else | ||
| 251 | #define __IPHONE_COMPAT_VERSION __IPHONE_4_0 | ||
| 252 | #endif | ||
| 253 | |||
| 254 | /* | ||
| 255 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 256 | * | ||
| 257 | * Used on declarations introduced in Mac OS X 10.1 | ||
| 258 | */ | ||
| 259 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 260 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_COMPAT_VERSION) | ||
| 261 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_1 | ||
| 262 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 263 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_1 | ||
| 264 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 265 | #else | ||
| 266 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 267 | #endif | ||
| 268 | |||
| 269 | /* | ||
| 270 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED | ||
| 271 | * | ||
| 272 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 273 | * and deprecated in Mac OS X 10.1 | ||
| 274 | */ | ||
| 275 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 276 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 277 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 278 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 279 | #else | ||
| 280 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 281 | #endif | ||
| 282 | |||
| 283 | /* | ||
| 284 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 | ||
| 285 | * | ||
| 286 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 287 | * but later deprecated in Mac OS X 10.1 | ||
| 288 | */ | ||
| 289 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 290 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 291 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 292 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 DEPRECATED_ATTRIBUTE | ||
| 293 | #else | ||
| 294 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 295 | #endif | ||
| 296 | |||
| 297 | /* | ||
| 298 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 299 | * | ||
| 300 | * Used on declarations introduced in Mac OS X 10.2 | ||
| 301 | */ | ||
| 302 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 303 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_COMPAT_VERSION) | ||
| 304 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 | ||
| 305 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 306 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 | ||
| 307 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 308 | #else | ||
| 309 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 310 | #endif | ||
| 311 | |||
| 312 | /* | ||
| 313 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED | ||
| 314 | * | ||
| 315 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 316 | * and deprecated in Mac OS X 10.2 | ||
| 317 | */ | ||
| 318 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 319 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 320 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 321 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 322 | #else | ||
| 323 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /* | ||
| 327 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 328 | * | ||
| 329 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 330 | * but later deprecated in Mac OS X 10.2 | ||
| 331 | */ | ||
| 332 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 333 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 334 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 335 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 336 | #else | ||
| 337 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 338 | #endif | ||
| 339 | |||
| 340 | /* | ||
| 341 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 342 | * | ||
| 343 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 344 | * but later deprecated in Mac OS X 10.2 | ||
| 345 | */ | ||
| 346 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 347 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 348 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 349 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 350 | #else | ||
| 351 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /* | ||
| 355 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 356 | * | ||
| 357 | * Used on declarations introduced in Mac OS X 10.3 | ||
| 358 | */ | ||
| 359 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 360 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_COMPAT_VERSION) | ||
| 361 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3 | ||
| 362 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 363 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 | ||
| 364 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 365 | #else | ||
| 366 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 367 | #endif | ||
| 368 | |||
| 369 | /* | ||
| 370 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED | ||
| 371 | * | ||
| 372 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 373 | * and deprecated in Mac OS X 10.3 | ||
| 374 | */ | ||
| 375 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 376 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 377 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 378 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 379 | #else | ||
| 380 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 381 | #endif | ||
| 382 | |||
| 383 | /* | ||
| 384 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 385 | * | ||
| 386 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 387 | * but later deprecated in Mac OS X 10.3 | ||
| 388 | */ | ||
| 389 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 390 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 391 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 392 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 393 | #else | ||
| 394 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 395 | #endif | ||
| 396 | |||
| 397 | /* | ||
| 398 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 399 | * | ||
| 400 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 401 | * but later deprecated in Mac OS X 10.3 | ||
| 402 | */ | ||
| 403 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 404 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 405 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 406 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 407 | #else | ||
| 408 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 409 | #endif | ||
| 410 | |||
| 411 | /* | ||
| 412 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 413 | * | ||
| 414 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 415 | * but later deprecated in Mac OS X 10.3 | ||
| 416 | */ | ||
| 417 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 418 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 419 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 420 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 421 | #else | ||
| 422 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 423 | #endif | ||
| 424 | |||
| 425 | /* | ||
| 426 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 427 | * | ||
| 428 | * Used on declarations introduced in Mac OS X 10.4 | ||
| 429 | */ | ||
| 430 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 431 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_COMPAT_VERSION) | ||
| 432 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 | ||
| 433 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 434 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 | ||
| 435 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 436 | #else | ||
| 437 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 438 | #endif | ||
| 439 | |||
| 440 | /* | ||
| 441 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED | ||
| 442 | * | ||
| 443 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 444 | * and deprecated in Mac OS X 10.4 | ||
| 445 | */ | ||
| 446 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 447 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 448 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 449 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 450 | #else | ||
| 451 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 452 | #endif | ||
| 453 | |||
| 454 | /* | ||
| 455 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 456 | * | ||
| 457 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 458 | * but later deprecated in Mac OS X 10.4 | ||
| 459 | */ | ||
| 460 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 461 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 462 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 463 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 464 | #else | ||
| 465 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 466 | #endif | ||
| 467 | |||
| 468 | /* | ||
| 469 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 470 | * | ||
| 471 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 472 | * but later deprecated in Mac OS X 10.4 | ||
| 473 | */ | ||
| 474 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 475 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 476 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 477 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 478 | #else | ||
| 479 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 480 | #endif | ||
| 481 | |||
| 482 | /* | ||
| 483 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 484 | * | ||
| 485 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 486 | * but later deprecated in Mac OS X 10.4 | ||
| 487 | */ | ||
| 488 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 489 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 490 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 491 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 492 | #else | ||
| 493 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 494 | #endif | ||
| 495 | |||
| 496 | /* | ||
| 497 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 498 | * | ||
| 499 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 500 | * but later deprecated in Mac OS X 10.4 | ||
| 501 | */ | ||
| 502 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 503 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 504 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 505 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 506 | #else | ||
| 507 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 508 | #endif | ||
| 509 | |||
| 510 | /* | ||
| 511 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 512 | * | ||
| 513 | * Used on declarations introduced in Mac OS X 10.5 | ||
| 514 | */ | ||
| 515 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 516 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_COMPAT_VERSION) | ||
| 517 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 | ||
| 518 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 519 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | ||
| 520 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 521 | #else | ||
| 522 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 523 | #endif | ||
| 524 | |||
| 525 | /* | ||
| 526 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED | ||
| 527 | * | ||
| 528 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 529 | * and deprecated in Mac OS X 10.5 | ||
| 530 | */ | ||
| 531 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 532 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 533 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 534 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 535 | #else | ||
| 536 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 537 | #endif | ||
| 538 | |||
| 539 | /* | ||
| 540 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 541 | * | ||
| 542 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 543 | * but later deprecated in Mac OS X 10.5 | ||
| 544 | */ | ||
| 545 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 546 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 547 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 548 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 549 | #else | ||
| 550 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 551 | #endif | ||
| 552 | |||
| 553 | /* | ||
| 554 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 555 | * | ||
| 556 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 557 | * but later deprecated in Mac OS X 10.5 | ||
| 558 | */ | ||
| 559 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 560 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 561 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 562 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 563 | #else | ||
| 564 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 565 | #endif | ||
| 566 | |||
| 567 | /* | ||
| 568 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 569 | * | ||
| 570 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 571 | * but later deprecated in Mac OS X 10.5 | ||
| 572 | */ | ||
| 573 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 574 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 575 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 576 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 577 | #else | ||
| 578 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 579 | #endif | ||
| 580 | |||
| 581 | /* | ||
| 582 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 583 | * | ||
| 584 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 585 | * but later deprecated in Mac OS X 10.5 | ||
| 586 | */ | ||
| 587 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 588 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 589 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 590 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 591 | #else | ||
| 592 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 593 | #endif | ||
| 594 | |||
| 595 | /* | ||
| 596 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 597 | * | ||
| 598 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 599 | * but later deprecated in Mac OS X 10.5 | ||
| 600 | */ | ||
| 601 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 602 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 603 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 604 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 605 | #else | ||
| 606 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 607 | #endif | ||
| 608 | |||
| 609 | /* | ||
| 610 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 611 | * | ||
| 612 | * Used on declarations introduced in Mac OS X 10.6 | ||
| 613 | */ | ||
| 614 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 615 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_COMPAT_VERSION) | ||
| 616 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | ||
| 617 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 618 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 | ||
| 619 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 620 | #else | ||
| 621 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 622 | #endif | ||
| 623 | |||
| 624 | /* | ||
| 625 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED | ||
| 626 | * | ||
| 627 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 628 | * and deprecated in Mac OS X 10.6 | ||
| 629 | */ | ||
| 630 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 631 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 632 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 633 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 634 | #else | ||
| 635 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 636 | #endif | ||
| 637 | |||
| 638 | /* | ||
| 639 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 640 | * | ||
| 641 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 642 | * but later deprecated in Mac OS X 10.6 | ||
| 643 | */ | ||
| 644 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 645 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 646 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 647 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 648 | #else | ||
| 649 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 650 | #endif | ||
| 651 | |||
| 652 | /* | ||
| 653 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 654 | * | ||
| 655 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 656 | * but later deprecated in Mac OS X 10.6 | ||
| 657 | */ | ||
| 658 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 659 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 660 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 661 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 662 | #else | ||
| 663 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 664 | #endif | ||
| 665 | |||
| 666 | /* | ||
| 667 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 668 | * | ||
| 669 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 670 | * but later deprecated in Mac OS X 10.6 | ||
| 671 | */ | ||
| 672 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 673 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 674 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 675 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 676 | #else | ||
| 677 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 678 | #endif | ||
| 679 | |||
| 680 | /* | ||
| 681 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 682 | * | ||
| 683 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 684 | * but later deprecated in Mac OS X 10.6 | ||
| 685 | */ | ||
| 686 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 687 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 688 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 689 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 690 | #else | ||
| 691 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 692 | #endif | ||
| 693 | |||
| 694 | /* | ||
| 695 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 696 | * | ||
| 697 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 698 | * but later deprecated in Mac OS X 10.6 | ||
| 699 | */ | ||
| 700 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 701 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 702 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 703 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 704 | #else | ||
| 705 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 706 | #endif | ||
| 707 | |||
| 708 | /* | ||
| 709 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 710 | * | ||
| 711 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 712 | * but later deprecated in Mac OS X 10.6 | ||
| 713 | */ | ||
| 714 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 715 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 716 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 717 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 718 | #else | ||
| 719 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 720 | #endif | ||
| 721 | |||
| 722 | /* | ||
| 723 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 724 | * | ||
| 725 | * Used on declarations introduced in Mac OS X 10.7 | ||
| 726 | */ | ||
| 727 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 728 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_COMPAT_VERSION) | ||
| 729 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | ||
| 730 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 731 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 | ||
| 732 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 733 | #else | ||
| 734 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 735 | #endif | ||
| 736 | |||
| 737 | /* | ||
| 738 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED | ||
| 739 | * | ||
| 740 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 741 | * and deprecated in Mac OS X 10.7 | ||
| 742 | */ | ||
| 743 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 744 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 745 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 746 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 747 | #else | ||
| 748 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 749 | #endif | ||
| 750 | |||
| 751 | /* | ||
| 752 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 753 | * | ||
| 754 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 755 | * but later deprecated in Mac OS X 10.7 | ||
| 756 | */ | ||
| 757 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 758 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 759 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 760 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 761 | #else | ||
| 762 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 763 | #endif | ||
| 764 | |||
| 765 | /* | ||
| 766 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 767 | * | ||
| 768 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 769 | * but later deprecated in Mac OS X 10.7 | ||
| 770 | */ | ||
| 771 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 772 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 773 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 774 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 775 | #else | ||
| 776 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 777 | #endif | ||
| 778 | |||
| 779 | /* | ||
| 780 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 781 | * | ||
| 782 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 783 | * but later deprecated in Mac OS X 10.7 | ||
| 784 | */ | ||
| 785 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 786 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 787 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 788 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 789 | #else | ||
| 790 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 791 | #endif | ||
| 792 | |||
| 793 | /* | ||
| 794 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 795 | * | ||
| 796 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 797 | * but later deprecated in Mac OS X 10.7 | ||
| 798 | */ | ||
| 799 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 800 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 801 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 802 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 803 | #else | ||
| 804 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 805 | #endif | ||
| 806 | |||
| 807 | /* | ||
| 808 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 809 | * | ||
| 810 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 811 | * but later deprecated in Mac OS X 10.7 | ||
| 812 | */ | ||
| 813 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 814 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 815 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 816 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 817 | #else | ||
| 818 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 819 | #endif | ||
| 820 | |||
| 821 | /* | ||
| 822 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 823 | * | ||
| 824 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 825 | * but later deprecated in Mac OS X 10.7 | ||
| 826 | */ | ||
| 827 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 828 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 829 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 830 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 831 | #else | ||
| 832 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 833 | #endif | ||
| 834 | |||
| 835 | /* | ||
| 836 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 837 | * | ||
| 838 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 839 | * but later deprecated in Mac OS X 10.7 | ||
| 840 | */ | ||
| 841 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 842 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 843 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 844 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 845 | #else | ||
| 846 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 847 | #endif | ||
| 848 | |||
| 849 | /* | ||
| 850 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 | ||
| 851 | * | ||
| 852 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 853 | * but later deprecated in Mac OS X 10.13 | ||
| 854 | */ | ||
| 855 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 856 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 857 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 858 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 DEPRECATED_ATTRIBUTE | ||
| 859 | #else | ||
| 860 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 861 | #endif | ||
| 862 | |||
| 863 | /* | ||
| 864 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 865 | * | ||
| 866 | * Used on declarations introduced in Mac OS X 10.8 | ||
| 867 | */ | ||
| 868 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 869 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_COMPAT_VERSION) | ||
| 870 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | ||
| 871 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 872 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 | ||
| 873 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 874 | #else | ||
| 875 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 876 | #endif | ||
| 877 | |||
| 878 | /* | ||
| 879 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED | ||
| 880 | * | ||
| 881 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 882 | * and deprecated in Mac OS X 10.8 | ||
| 883 | */ | ||
| 884 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 885 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 886 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 887 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 888 | #else | ||
| 889 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 890 | #endif | ||
| 891 | |||
| 892 | /* | ||
| 893 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 894 | * | ||
| 895 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 896 | * but later deprecated in Mac OS X 10.8 | ||
| 897 | */ | ||
| 898 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 899 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 900 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 901 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 902 | #else | ||
| 903 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 904 | #endif | ||
| 905 | |||
| 906 | /* | ||
| 907 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 908 | * | ||
| 909 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 910 | * but later deprecated in Mac OS X 10.8 | ||
| 911 | */ | ||
| 912 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 913 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 914 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 915 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 916 | #else | ||
| 917 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 918 | #endif | ||
| 919 | |||
| 920 | /* | ||
| 921 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 922 | * | ||
| 923 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 924 | * but later deprecated in Mac OS X 10.8 | ||
| 925 | */ | ||
| 926 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 927 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 928 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 929 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 930 | #else | ||
| 931 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 932 | #endif | ||
| 933 | |||
| 934 | /* | ||
| 935 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 936 | * | ||
| 937 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 938 | * but later deprecated in Mac OS X 10.8 | ||
| 939 | */ | ||
| 940 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 941 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 942 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 943 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 944 | #else | ||
| 945 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 946 | #endif | ||
| 947 | |||
| 948 | /* | ||
| 949 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 950 | * | ||
| 951 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 952 | * but later deprecated in Mac OS X 10.8 | ||
| 953 | */ | ||
| 954 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 955 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 956 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 957 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 958 | #else | ||
| 959 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 960 | #endif | ||
| 961 | |||
| 962 | /* | ||
| 963 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 964 | * | ||
| 965 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 966 | * but later deprecated in Mac OS X 10.8 | ||
| 967 | */ | ||
| 968 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 969 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 970 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 971 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 972 | #else | ||
| 973 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 974 | #endif | ||
| 975 | |||
| 976 | /* | ||
| 977 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 978 | * | ||
| 979 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 980 | * but later deprecated in Mac OS X 10.8 | ||
| 981 | */ | ||
| 982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 983 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 985 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 986 | #else | ||
| 987 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 988 | #endif | ||
| 989 | |||
| 990 | /* | ||
| 991 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 992 | * | ||
| 993 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 994 | * but later deprecated in Mac OS X 10.8 | ||
| 995 | */ | ||
| 996 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 997 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 998 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 999 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 1000 | #else | ||
| 1001 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1002 | #endif | ||
| 1003 | |||
| 1004 | /* | ||
| 1005 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1006 | * | ||
| 1007 | * Used on declarations introduced in Mac OS X 10.9 | ||
| 1008 | */ | ||
| 1009 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1010 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_COMPAT_VERSION) | ||
| 1011 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 | ||
| 1012 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1013 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 | ||
| 1014 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1015 | #else | ||
| 1016 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1017 | #endif | ||
| 1018 | |||
| 1019 | /* | ||
| 1020 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED | ||
| 1021 | * | ||
| 1022 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1023 | * and deprecated in Mac OS X 10.9 | ||
| 1024 | */ | ||
| 1025 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1026 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1027 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1028 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1029 | #else | ||
| 1030 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1031 | #endif | ||
| 1032 | |||
| 1033 | /* | ||
| 1034 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1035 | * | ||
| 1036 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1037 | * but later deprecated in Mac OS X 10.9 | ||
| 1038 | */ | ||
| 1039 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1040 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1041 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1042 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1043 | #else | ||
| 1044 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1045 | #endif | ||
| 1046 | |||
| 1047 | /* | ||
| 1048 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1049 | * | ||
| 1050 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1051 | * but later deprecated in Mac OS X 10.9 | ||
| 1052 | */ | ||
| 1053 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1054 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1055 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1056 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1057 | #else | ||
| 1058 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1059 | #endif | ||
| 1060 | |||
| 1061 | /* | ||
| 1062 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1063 | * | ||
| 1064 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1065 | * but later deprecated in Mac OS X 10.9 | ||
| 1066 | */ | ||
| 1067 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1068 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1069 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1070 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1071 | #else | ||
| 1072 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1073 | #endif | ||
| 1074 | |||
| 1075 | /* | ||
| 1076 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1077 | * | ||
| 1078 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1079 | * but later deprecated in Mac OS X 10.9 | ||
| 1080 | */ | ||
| 1081 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1082 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1083 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1084 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1085 | #else | ||
| 1086 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1087 | #endif | ||
| 1088 | |||
| 1089 | /* | ||
| 1090 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1091 | * | ||
| 1092 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1093 | * but later deprecated in Mac OS X 10.9 | ||
| 1094 | */ | ||
| 1095 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1096 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1097 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1098 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1099 | #else | ||
| 1100 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1101 | #endif | ||
| 1102 | |||
| 1103 | /* | ||
| 1104 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1105 | * | ||
| 1106 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1107 | * but later deprecated in Mac OS X 10.9 | ||
| 1108 | */ | ||
| 1109 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1110 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1111 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1112 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1113 | #else | ||
| 1114 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1115 | #endif | ||
| 1116 | |||
| 1117 | /* | ||
| 1118 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1119 | * | ||
| 1120 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1121 | * but later deprecated in Mac OS X 10.9 | ||
| 1122 | */ | ||
| 1123 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1124 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1125 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1126 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1127 | #else | ||
| 1128 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1129 | #endif | ||
| 1130 | |||
| 1131 | /* | ||
| 1132 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1133 | * | ||
| 1134 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1135 | * but later deprecated in Mac OS X 10.9 | ||
| 1136 | */ | ||
| 1137 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1138 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1139 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1140 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1141 | #else | ||
| 1142 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1143 | #endif | ||
| 1144 | |||
| 1145 | /* | ||
| 1146 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1147 | * | ||
| 1148 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1149 | * but later deprecated in Mac OS X 10.9 | ||
| 1150 | */ | ||
| 1151 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1152 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1153 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1154 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1155 | #else | ||
| 1156 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1157 | #endif | ||
| 1158 | |||
| 1159 | /* | ||
| 1160 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1161 | * | ||
| 1162 | * Used on declarations introduced in Mac OS X 10.10 | ||
| 1163 | */ | ||
| 1164 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1165 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_COMPAT_VERSION) | ||
| 1166 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 | ||
| 1167 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1168 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 | ||
| 1169 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1170 | #else | ||
| 1171 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1172 | #endif | ||
| 1173 | |||
| 1174 | /* | ||
| 1175 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED | ||
| 1176 | * | ||
| 1177 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1178 | * and deprecated in Mac OS X 10.10 | ||
| 1179 | */ | ||
| 1180 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1181 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1182 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1183 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1184 | #else | ||
| 1185 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1186 | #endif | ||
| 1187 | |||
| 1188 | /* | ||
| 1189 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1190 | * | ||
| 1191 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1192 | * but later deprecated in Mac OS X 10.10 | ||
| 1193 | */ | ||
| 1194 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1195 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1196 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1197 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1198 | #else | ||
| 1199 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1200 | #endif | ||
| 1201 | |||
| 1202 | /* | ||
| 1203 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1204 | * | ||
| 1205 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1206 | * but later deprecated in Mac OS X 10.10 | ||
| 1207 | */ | ||
| 1208 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1209 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1210 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1211 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1212 | #else | ||
| 1213 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1214 | #endif | ||
| 1215 | |||
| 1216 | /* | ||
| 1217 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1218 | * | ||
| 1219 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1220 | * but later deprecated in Mac OS X 10.10 | ||
| 1221 | */ | ||
| 1222 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1223 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1224 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1225 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1226 | #else | ||
| 1227 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1228 | #endif | ||
| 1229 | |||
| 1230 | /* | ||
| 1231 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1232 | * | ||
| 1233 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1234 | * but later deprecated in Mac OS X 10.10 | ||
| 1235 | */ | ||
| 1236 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1237 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1238 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1239 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1240 | #else | ||
| 1241 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1242 | #endif | ||
| 1243 | |||
| 1244 | /* | ||
| 1245 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1246 | * | ||
| 1247 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1248 | * but later deprecated in Mac OS X 10.10 | ||
| 1249 | */ | ||
| 1250 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1251 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1252 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1253 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1254 | #else | ||
| 1255 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1256 | #endif | ||
| 1257 | |||
| 1258 | /* | ||
| 1259 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1260 | * | ||
| 1261 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1262 | * but later deprecated in Mac OS X 10.10 | ||
| 1263 | */ | ||
| 1264 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1265 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1266 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1267 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1268 | #else | ||
| 1269 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1270 | #endif | ||
| 1271 | |||
| 1272 | /* | ||
| 1273 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1274 | * | ||
| 1275 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1276 | * but later deprecated in Mac OS X 10.10 | ||
| 1277 | */ | ||
| 1278 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1279 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1280 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1281 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1282 | #else | ||
| 1283 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1284 | #endif | ||
| 1285 | |||
| 1286 | /* | ||
| 1287 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1288 | * | ||
| 1289 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1290 | * but later deprecated in Mac OS X 10.10 | ||
| 1291 | */ | ||
| 1292 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1293 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1294 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1295 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1296 | #else | ||
| 1297 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | /* | ||
| 1301 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1302 | * | ||
| 1303 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1304 | * but later deprecated in Mac OS X 10.10 | ||
| 1305 | */ | ||
| 1306 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1307 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1308 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1309 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1310 | #else | ||
| 1311 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1312 | #endif | ||
| 1313 | |||
| 1314 | /* | ||
| 1315 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1316 | * | ||
| 1317 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1318 | * but later deprecated in Mac OS X 10.10 | ||
| 1319 | */ | ||
| 1320 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1321 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1322 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1323 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1324 | #else | ||
| 1325 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1326 | #endif | ||
| 1327 | |||
| 1328 | /* | ||
| 1329 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1330 | * | ||
| 1331 | * Used on declarations introduced in Mac OS X 10.10.2 | ||
| 1332 | */ | ||
| 1333 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1334 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_2, __IPHONE_COMPAT_VERSION) | ||
| 1335 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_2 | ||
| 1336 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1337 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_2 | ||
| 1338 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1339 | #else | ||
| 1340 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1341 | #endif | ||
| 1342 | |||
| 1343 | /* | ||
| 1344 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED | ||
| 1345 | * | ||
| 1346 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1347 | * and deprecated in Mac OS X 10.10.2 | ||
| 1348 | */ | ||
| 1349 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1350 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1351 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1352 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1353 | #else | ||
| 1354 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1355 | #endif | ||
| 1356 | |||
| 1357 | /* | ||
| 1358 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1359 | * | ||
| 1360 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1361 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1362 | */ | ||
| 1363 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1364 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1365 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1366 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1367 | #else | ||
| 1368 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1369 | #endif | ||
| 1370 | |||
| 1371 | /* | ||
| 1372 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1373 | * | ||
| 1374 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1375 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1376 | */ | ||
| 1377 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1378 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1379 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1380 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1381 | #else | ||
| 1382 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1383 | #endif | ||
| 1384 | |||
| 1385 | /* | ||
| 1386 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1387 | * | ||
| 1388 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1389 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1390 | */ | ||
| 1391 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1392 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1393 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1394 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1395 | #else | ||
| 1396 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1397 | #endif | ||
| 1398 | |||
| 1399 | /* | ||
| 1400 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1401 | * | ||
| 1402 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1403 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1404 | */ | ||
| 1405 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1406 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1407 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1408 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1409 | #else | ||
| 1410 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1411 | #endif | ||
| 1412 | |||
| 1413 | /* | ||
| 1414 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1415 | * | ||
| 1416 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1417 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1418 | */ | ||
| 1419 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1420 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1421 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1422 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1423 | #else | ||
| 1424 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1425 | #endif | ||
| 1426 | |||
| 1427 | /* | ||
| 1428 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1429 | * | ||
| 1430 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1431 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1432 | */ | ||
| 1433 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1434 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1435 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1436 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1437 | #else | ||
| 1438 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1439 | #endif | ||
| 1440 | |||
| 1441 | /* | ||
| 1442 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1443 | * | ||
| 1444 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1445 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1446 | */ | ||
| 1447 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1448 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1449 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1450 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1451 | #else | ||
| 1452 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1453 | #endif | ||
| 1454 | |||
| 1455 | /* | ||
| 1456 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1457 | * | ||
| 1458 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1459 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1460 | */ | ||
| 1461 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1462 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1463 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1464 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1465 | #else | ||
| 1466 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1467 | #endif | ||
| 1468 | |||
| 1469 | /* | ||
| 1470 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1471 | * | ||
| 1472 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1473 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1474 | */ | ||
| 1475 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1476 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1477 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1478 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1479 | #else | ||
| 1480 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1481 | #endif | ||
| 1482 | |||
| 1483 | /* | ||
| 1484 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1485 | * | ||
| 1486 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1487 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1488 | */ | ||
| 1489 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1490 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1491 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1492 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1493 | #else | ||
| 1494 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1495 | #endif | ||
| 1496 | |||
| 1497 | /* | ||
| 1498 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1499 | * | ||
| 1500 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1501 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1502 | */ | ||
| 1503 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1504 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1505 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1506 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1507 | #else | ||
| 1508 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1509 | #endif | ||
| 1510 | |||
| 1511 | /* | ||
| 1512 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1513 | * | ||
| 1514 | * Used on declarations introduced in Mac OS X 10.10.3 | ||
| 1515 | */ | ||
| 1516 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1517 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_3, __IPHONE_COMPAT_VERSION) | ||
| 1518 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_3 | ||
| 1519 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1520 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_3 | ||
| 1521 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1522 | #else | ||
| 1523 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1524 | #endif | ||
| 1525 | |||
| 1526 | /* | ||
| 1527 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED | ||
| 1528 | * | ||
| 1529 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1530 | * and deprecated in Mac OS X 10.10.3 | ||
| 1531 | */ | ||
| 1532 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1533 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1534 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1535 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1536 | #else | ||
| 1537 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1538 | #endif | ||
| 1539 | |||
| 1540 | /* | ||
| 1541 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1542 | * | ||
| 1543 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1544 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1545 | */ | ||
| 1546 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1547 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1548 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1549 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1550 | #else | ||
| 1551 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1552 | #endif | ||
| 1553 | |||
| 1554 | /* | ||
| 1555 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1556 | * | ||
| 1557 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1558 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1559 | */ | ||
| 1560 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1561 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1562 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1563 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1564 | #else | ||
| 1565 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1566 | #endif | ||
| 1567 | |||
| 1568 | /* | ||
| 1569 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1570 | * | ||
| 1571 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1572 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1573 | */ | ||
| 1574 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1575 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1576 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1577 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1578 | #else | ||
| 1579 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1580 | #endif | ||
| 1581 | |||
| 1582 | /* | ||
| 1583 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1584 | * | ||
| 1585 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1586 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1587 | */ | ||
| 1588 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1589 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1590 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1591 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1592 | #else | ||
| 1593 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1594 | #endif | ||
| 1595 | |||
| 1596 | /* | ||
| 1597 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1598 | * | ||
| 1599 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1600 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1601 | */ | ||
| 1602 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1603 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1604 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1605 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1606 | #else | ||
| 1607 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1608 | #endif | ||
| 1609 | |||
| 1610 | /* | ||
| 1611 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1612 | * | ||
| 1613 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1614 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1615 | */ | ||
| 1616 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1617 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1618 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1619 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1620 | #else | ||
| 1621 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1622 | #endif | ||
| 1623 | |||
| 1624 | /* | ||
| 1625 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1626 | * | ||
| 1627 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1628 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1629 | */ | ||
| 1630 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1631 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1632 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1633 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1634 | #else | ||
| 1635 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1636 | #endif | ||
| 1637 | |||
| 1638 | /* | ||
| 1639 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1640 | * | ||
| 1641 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1642 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1643 | */ | ||
| 1644 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1645 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1646 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1647 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1648 | #else | ||
| 1649 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1650 | #endif | ||
| 1651 | |||
| 1652 | /* | ||
| 1653 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1654 | * | ||
| 1655 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1656 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1657 | */ | ||
| 1658 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1659 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1660 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1661 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1662 | #else | ||
| 1663 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1664 | #endif | ||
| 1665 | |||
| 1666 | /* | ||
| 1667 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1668 | * | ||
| 1669 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1670 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1671 | */ | ||
| 1672 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1673 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1674 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1675 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1676 | #else | ||
| 1677 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1678 | #endif | ||
| 1679 | |||
| 1680 | /* | ||
| 1681 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1682 | * | ||
| 1683 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1684 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1685 | */ | ||
| 1686 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1687 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1688 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1689 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1690 | #else | ||
| 1691 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1692 | #endif | ||
| 1693 | |||
| 1694 | /* | ||
| 1695 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1696 | * | ||
| 1697 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1698 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1699 | */ | ||
| 1700 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1701 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1702 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1703 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1704 | #else | ||
| 1705 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1706 | #endif | ||
| 1707 | |||
| 1708 | /* | ||
| 1709 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1710 | * | ||
| 1711 | * Used on declarations introduced in Mac OS X 10.11 | ||
| 1712 | */ | ||
| 1713 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1714 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_COMPAT_VERSION) | ||
| 1715 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 | ||
| 1716 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1717 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 | ||
| 1718 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1719 | #else | ||
| 1720 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1721 | #endif | ||
| 1722 | |||
| 1723 | /* | ||
| 1724 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED | ||
| 1725 | * | ||
| 1726 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 1727 | * and deprecated in Mac OS X 10.11 | ||
| 1728 | */ | ||
| 1729 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1730 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1731 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1732 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1733 | #else | ||
| 1734 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1735 | #endif | ||
| 1736 | |||
| 1737 | /* | ||
| 1738 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1739 | * | ||
| 1740 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1741 | * but later deprecated in Mac OS X 10.11 | ||
| 1742 | */ | ||
| 1743 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1744 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1745 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1746 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1747 | #else | ||
| 1748 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1749 | #endif | ||
| 1750 | |||
| 1751 | /* | ||
| 1752 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1753 | * | ||
| 1754 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1755 | * but later deprecated in Mac OS X 10.11 | ||
| 1756 | */ | ||
| 1757 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1758 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1759 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1760 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1761 | #else | ||
| 1762 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1763 | #endif | ||
| 1764 | |||
| 1765 | /* | ||
| 1766 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1767 | * | ||
| 1768 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1769 | * but later deprecated in Mac OS X 10.11 | ||
| 1770 | */ | ||
| 1771 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1772 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1773 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1774 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1775 | #else | ||
| 1776 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1777 | #endif | ||
| 1778 | |||
| 1779 | /* | ||
| 1780 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1781 | * | ||
| 1782 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1783 | * but later deprecated in Mac OS X 10.11 | ||
| 1784 | */ | ||
| 1785 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1786 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1787 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1788 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1789 | #else | ||
| 1790 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1791 | #endif | ||
| 1792 | |||
| 1793 | /* | ||
| 1794 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1795 | * | ||
| 1796 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1797 | * but later deprecated in Mac OS X 10.11 | ||
| 1798 | */ | ||
| 1799 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1800 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1801 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1802 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1803 | #else | ||
| 1804 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1805 | #endif | ||
| 1806 | |||
| 1807 | /* | ||
| 1808 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1809 | * | ||
| 1810 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1811 | * but later deprecated in Mac OS X 10.11 | ||
| 1812 | */ | ||
| 1813 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1814 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1815 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1816 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1817 | #else | ||
| 1818 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1819 | #endif | ||
| 1820 | |||
| 1821 | /* | ||
| 1822 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1823 | * | ||
| 1824 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1825 | * but later deprecated in Mac OS X 10.11 | ||
| 1826 | */ | ||
| 1827 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1828 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1829 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1830 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1831 | #else | ||
| 1832 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1833 | #endif | ||
| 1834 | |||
| 1835 | /* | ||
| 1836 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1837 | * | ||
| 1838 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1839 | * but later deprecated in Mac OS X 10.11 | ||
| 1840 | */ | ||
| 1841 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1842 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1843 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1844 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1845 | #else | ||
| 1846 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1847 | #endif | ||
| 1848 | |||
| 1849 | /* | ||
| 1850 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1851 | * | ||
| 1852 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1853 | * but later deprecated in Mac OS X 10.11 | ||
| 1854 | */ | ||
| 1855 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1856 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1857 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1858 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1859 | #else | ||
| 1860 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1861 | #endif | ||
| 1862 | |||
| 1863 | /* | ||
| 1864 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1865 | * | ||
| 1866 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1867 | * but later deprecated in Mac OS X 10.11 | ||
| 1868 | */ | ||
| 1869 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1870 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1871 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1872 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1873 | #else | ||
| 1874 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1875 | #endif | ||
| 1876 | |||
| 1877 | /* | ||
| 1878 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1879 | * | ||
| 1880 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1881 | * but later deprecated in Mac OS X 10.11 | ||
| 1882 | */ | ||
| 1883 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1884 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1885 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1886 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1887 | #else | ||
| 1888 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1889 | #endif | ||
| 1890 | |||
| 1891 | /* | ||
| 1892 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1893 | * | ||
| 1894 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1895 | * but later deprecated in Mac OS X 10.11 | ||
| 1896 | */ | ||
| 1897 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1898 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1899 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1900 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1901 | #else | ||
| 1902 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1903 | #endif | ||
| 1904 | |||
| 1905 | /* | ||
| 1906 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1907 | * | ||
| 1908 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1909 | * but later deprecated in Mac OS X 10.11 | ||
| 1910 | */ | ||
| 1911 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1912 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1913 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1914 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1915 | #else | ||
| 1916 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1917 | #endif | ||
| 1918 | |||
| 1919 | /* | ||
| 1920 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1921 | * | ||
| 1922 | * Used on declarations introduced in Mac OS X 10.11.2 | ||
| 1923 | */ | ||
| 1924 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1925 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_2, __IPHONE_COMPAT_VERSION) | ||
| 1926 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_2 | ||
| 1927 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1928 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_2 | ||
| 1929 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1930 | #else | ||
| 1931 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1932 | #endif | ||
| 1933 | |||
| 1934 | /* | ||
| 1935 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED | ||
| 1936 | * | ||
| 1937 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 1938 | * and deprecated in Mac OS X 10.11.2 | ||
| 1939 | */ | ||
| 1940 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1941 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1942 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1943 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1944 | #else | ||
| 1945 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1946 | #endif | ||
| 1947 | |||
| 1948 | /* | ||
| 1949 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1950 | * | ||
| 1951 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1952 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1953 | */ | ||
| 1954 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1955 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1956 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1957 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1958 | #else | ||
| 1959 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1960 | #endif | ||
| 1961 | |||
| 1962 | /* | ||
| 1963 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1964 | * | ||
| 1965 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1966 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1967 | */ | ||
| 1968 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1969 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1970 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1971 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1972 | #else | ||
| 1973 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1974 | #endif | ||
| 1975 | |||
| 1976 | /* | ||
| 1977 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1978 | * | ||
| 1979 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1980 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1981 | */ | ||
| 1982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1983 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1985 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1986 | #else | ||
| 1987 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1988 | #endif | ||
| 1989 | |||
| 1990 | /* | ||
| 1991 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1992 | * | ||
| 1993 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1994 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1995 | */ | ||
| 1996 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1997 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1998 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1999 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2000 | #else | ||
| 2001 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2002 | #endif | ||
| 2003 | |||
| 2004 | /* | ||
| 2005 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2006 | * | ||
| 2007 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2008 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2009 | */ | ||
| 2010 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2011 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2012 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2013 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2014 | #else | ||
| 2015 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2016 | #endif | ||
| 2017 | |||
| 2018 | /* | ||
| 2019 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2020 | * | ||
| 2021 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2022 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2023 | */ | ||
| 2024 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2025 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2026 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2027 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2028 | #else | ||
| 2029 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2030 | #endif | ||
| 2031 | |||
| 2032 | /* | ||
| 2033 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2034 | * | ||
| 2035 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2036 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2037 | */ | ||
| 2038 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2039 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2040 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2041 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2042 | #else | ||
| 2043 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2044 | #endif | ||
| 2045 | |||
| 2046 | /* | ||
| 2047 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2048 | * | ||
| 2049 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2050 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2051 | */ | ||
| 2052 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2053 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2054 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2055 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2056 | #else | ||
| 2057 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2058 | #endif | ||
| 2059 | |||
| 2060 | /* | ||
| 2061 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2062 | * | ||
| 2063 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2064 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2065 | */ | ||
| 2066 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2067 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2068 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2069 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2070 | #else | ||
| 2071 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2072 | #endif | ||
| 2073 | |||
| 2074 | /* | ||
| 2075 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2076 | * | ||
| 2077 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2078 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2079 | */ | ||
| 2080 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2081 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2082 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2083 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2084 | #else | ||
| 2085 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2086 | #endif | ||
| 2087 | |||
| 2088 | /* | ||
| 2089 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2090 | * | ||
| 2091 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2092 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2093 | */ | ||
| 2094 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2095 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2096 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2097 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2098 | #else | ||
| 2099 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2100 | #endif | ||
| 2101 | |||
| 2102 | /* | ||
| 2103 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2104 | * | ||
| 2105 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2106 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2107 | */ | ||
| 2108 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2109 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2110 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2111 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2112 | #else | ||
| 2113 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2114 | #endif | ||
| 2115 | |||
| 2116 | /* | ||
| 2117 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2118 | * | ||
| 2119 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2120 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2121 | */ | ||
| 2122 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2123 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2124 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2125 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2126 | #else | ||
| 2127 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2128 | #endif | ||
| 2129 | |||
| 2130 | /* | ||
| 2131 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2132 | * | ||
| 2133 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2134 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2135 | */ | ||
| 2136 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2137 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2138 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2139 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2140 | #else | ||
| 2141 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2142 | #endif | ||
| 2143 | |||
| 2144 | /* | ||
| 2145 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2146 | * | ||
| 2147 | * Used on declarations introduced in Mac OS X 10.11.3 | ||
| 2148 | */ | ||
| 2149 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2150 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_3, __IPHONE_COMPAT_VERSION) | ||
| 2151 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_3 | ||
| 2152 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2153 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_3 | ||
| 2154 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2155 | #else | ||
| 2156 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2157 | #endif | ||
| 2158 | |||
| 2159 | /* | ||
| 2160 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED | ||
| 2161 | * | ||
| 2162 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2163 | * and deprecated in Mac OS X 10.11.3 | ||
| 2164 | */ | ||
| 2165 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2166 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2167 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2168 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2169 | #else | ||
| 2170 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2171 | #endif | ||
| 2172 | |||
| 2173 | /* | ||
| 2174 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2175 | * | ||
| 2176 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2177 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2178 | */ | ||
| 2179 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2180 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2181 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2182 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2183 | #else | ||
| 2184 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2185 | #endif | ||
| 2186 | |||
| 2187 | /* | ||
| 2188 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2189 | * | ||
| 2190 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2191 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2192 | */ | ||
| 2193 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2194 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2195 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2196 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2197 | #else | ||
| 2198 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2199 | #endif | ||
| 2200 | |||
| 2201 | /* | ||
| 2202 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2203 | * | ||
| 2204 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2205 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2206 | */ | ||
| 2207 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2208 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2209 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2210 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2211 | #else | ||
| 2212 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2213 | #endif | ||
| 2214 | |||
| 2215 | /* | ||
| 2216 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2217 | * | ||
| 2218 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2219 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2220 | */ | ||
| 2221 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2222 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2223 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2224 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2225 | #else | ||
| 2226 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2227 | #endif | ||
| 2228 | |||
| 2229 | /* | ||
| 2230 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2231 | * | ||
| 2232 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2233 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2234 | */ | ||
| 2235 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2236 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2237 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2238 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2239 | #else | ||
| 2240 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2241 | #endif | ||
| 2242 | |||
| 2243 | /* | ||
| 2244 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2245 | * | ||
| 2246 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2247 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2248 | */ | ||
| 2249 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2250 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2251 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2252 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2253 | #else | ||
| 2254 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2255 | #endif | ||
| 2256 | |||
| 2257 | /* | ||
| 2258 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2259 | * | ||
| 2260 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2261 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2262 | */ | ||
| 2263 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2264 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2265 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2266 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2267 | #else | ||
| 2268 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2269 | #endif | ||
| 2270 | |||
| 2271 | /* | ||
| 2272 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2273 | * | ||
| 2274 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2275 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2276 | */ | ||
| 2277 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2278 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2279 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2280 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2281 | #else | ||
| 2282 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2283 | #endif | ||
| 2284 | |||
| 2285 | /* | ||
| 2286 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2287 | * | ||
| 2288 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2289 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2290 | */ | ||
| 2291 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2292 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2293 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2294 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2295 | #else | ||
| 2296 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2297 | #endif | ||
| 2298 | |||
| 2299 | /* | ||
| 2300 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2301 | * | ||
| 2302 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2303 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2304 | */ | ||
| 2305 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2306 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2307 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2308 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2309 | #else | ||
| 2310 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2311 | #endif | ||
| 2312 | |||
| 2313 | /* | ||
| 2314 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2315 | * | ||
| 2316 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2317 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2318 | */ | ||
| 2319 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2320 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2321 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2322 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2323 | #else | ||
| 2324 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2325 | #endif | ||
| 2326 | |||
| 2327 | /* | ||
| 2328 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2329 | * | ||
| 2330 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2331 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2332 | */ | ||
| 2333 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2334 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2335 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2336 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2337 | #else | ||
| 2338 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2339 | #endif | ||
| 2340 | |||
| 2341 | /* | ||
| 2342 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2343 | * | ||
| 2344 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2345 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2346 | */ | ||
| 2347 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2348 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2349 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2350 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2351 | #else | ||
| 2352 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2353 | #endif | ||
| 2354 | |||
| 2355 | /* | ||
| 2356 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2357 | * | ||
| 2358 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2359 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2360 | */ | ||
| 2361 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2362 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2363 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2364 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2365 | #else | ||
| 2366 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2367 | #endif | ||
| 2368 | |||
| 2369 | /* | ||
| 2370 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2371 | * | ||
| 2372 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2373 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2374 | */ | ||
| 2375 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2376 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2377 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2378 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2379 | #else | ||
| 2380 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2381 | #endif | ||
| 2382 | |||
| 2383 | /* | ||
| 2384 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2385 | * | ||
| 2386 | * Used on declarations introduced in Mac OS X 10.11.4 | ||
| 2387 | */ | ||
| 2388 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2389 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_4, __IPHONE_COMPAT_VERSION) | ||
| 2390 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_4 | ||
| 2391 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2392 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_4 | ||
| 2393 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2394 | #else | ||
| 2395 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2396 | #endif | ||
| 2397 | |||
| 2398 | /* | ||
| 2399 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED | ||
| 2400 | * | ||
| 2401 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2402 | * and deprecated in Mac OS X 10.11.4 | ||
| 2403 | */ | ||
| 2404 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2405 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2406 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2407 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2408 | #else | ||
| 2409 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2410 | #endif | ||
| 2411 | |||
| 2412 | /* | ||
| 2413 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2414 | * | ||
| 2415 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2416 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2417 | */ | ||
| 2418 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2419 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2420 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2421 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2422 | #else | ||
| 2423 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2424 | #endif | ||
| 2425 | |||
| 2426 | /* | ||
| 2427 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2428 | * | ||
| 2429 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2430 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2431 | */ | ||
| 2432 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2433 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2434 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2435 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2436 | #else | ||
| 2437 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2438 | #endif | ||
| 2439 | |||
| 2440 | /* | ||
| 2441 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2442 | * | ||
| 2443 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2444 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2445 | */ | ||
| 2446 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2447 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2448 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2449 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2450 | #else | ||
| 2451 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2452 | #endif | ||
| 2453 | |||
| 2454 | /* | ||
| 2455 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2456 | * | ||
| 2457 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2458 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2459 | */ | ||
| 2460 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2461 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2462 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2463 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2464 | #else | ||
| 2465 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2466 | #endif | ||
| 2467 | |||
| 2468 | /* | ||
| 2469 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2470 | * | ||
| 2471 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2472 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2473 | */ | ||
| 2474 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2475 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2476 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2477 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2478 | #else | ||
| 2479 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2480 | #endif | ||
| 2481 | |||
| 2482 | /* | ||
| 2483 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2484 | * | ||
| 2485 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2486 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2487 | */ | ||
| 2488 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2489 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2490 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2491 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2492 | #else | ||
| 2493 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2494 | #endif | ||
| 2495 | |||
| 2496 | /* | ||
| 2497 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2498 | * | ||
| 2499 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2500 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2501 | */ | ||
| 2502 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2503 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2504 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2505 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2506 | #else | ||
| 2507 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2508 | #endif | ||
| 2509 | |||
| 2510 | /* | ||
| 2511 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2512 | * | ||
| 2513 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2514 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2515 | */ | ||
| 2516 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2517 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2518 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2519 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2520 | #else | ||
| 2521 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2522 | #endif | ||
| 2523 | |||
| 2524 | /* | ||
| 2525 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2526 | * | ||
| 2527 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2528 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2529 | */ | ||
| 2530 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2531 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2532 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2533 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2534 | #else | ||
| 2535 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2536 | #endif | ||
| 2537 | |||
| 2538 | /* | ||
| 2539 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2540 | * | ||
| 2541 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2542 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2543 | */ | ||
| 2544 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2545 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2546 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2547 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2548 | #else | ||
| 2549 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2550 | #endif | ||
| 2551 | |||
| 2552 | /* | ||
| 2553 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2554 | * | ||
| 2555 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2556 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2557 | */ | ||
| 2558 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2559 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2560 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2561 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2562 | #else | ||
| 2563 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2564 | #endif | ||
| 2565 | |||
| 2566 | /* | ||
| 2567 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2568 | * | ||
| 2569 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2570 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2571 | */ | ||
| 2572 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2573 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2574 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2575 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2576 | #else | ||
| 2577 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2578 | #endif | ||
| 2579 | |||
| 2580 | /* | ||
| 2581 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2582 | * | ||
| 2583 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2584 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2585 | */ | ||
| 2586 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2587 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2588 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2589 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2590 | #else | ||
| 2591 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2592 | #endif | ||
| 2593 | |||
| 2594 | /* | ||
| 2595 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2596 | * | ||
| 2597 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2598 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2599 | */ | ||
| 2600 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2601 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2602 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2603 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2604 | #else | ||
| 2605 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2606 | #endif | ||
| 2607 | |||
| 2608 | /* | ||
| 2609 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2610 | * | ||
| 2611 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2612 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2613 | */ | ||
| 2614 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2615 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2616 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2617 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2618 | #else | ||
| 2619 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2620 | #endif | ||
| 2621 | |||
| 2622 | /* | ||
| 2623 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2624 | * | ||
| 2625 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2626 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2627 | */ | ||
| 2628 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2629 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2630 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2631 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2632 | #else | ||
| 2633 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2634 | #endif | ||
| 2635 | |||
| 2636 | /* | ||
| 2637 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2638 | * | ||
| 2639 | * Used on declarations introduced in Mac OS X 10.12 | ||
| 2640 | */ | ||
| 2641 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2642 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_COMPAT_VERSION) | ||
| 2643 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | ||
| 2644 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2645 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12 | ||
| 2646 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2647 | #else | ||
| 2648 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2649 | #endif | ||
| 2650 | |||
| 2651 | /* | ||
| 2652 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED | ||
| 2653 | * | ||
| 2654 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 2655 | * and deprecated in Mac OS X 10.12 | ||
| 2656 | */ | ||
| 2657 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2658 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2659 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2660 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2661 | #else | ||
| 2662 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2663 | #endif | ||
| 2664 | |||
| 2665 | /* | ||
| 2666 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2667 | * | ||
| 2668 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2669 | * but later deprecated in Mac OS X 10.12 | ||
| 2670 | */ | ||
| 2671 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2672 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2673 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2674 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2675 | #else | ||
| 2676 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2677 | #endif | ||
| 2678 | |||
| 2679 | /* | ||
| 2680 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2681 | * | ||
| 2682 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2683 | * but later deprecated in Mac OS X 10.12 | ||
| 2684 | */ | ||
| 2685 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2686 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2687 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2688 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2689 | #else | ||
| 2690 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2691 | #endif | ||
| 2692 | |||
| 2693 | /* | ||
| 2694 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2695 | * | ||
| 2696 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2697 | * but later deprecated in Mac OS X 10.12 | ||
| 2698 | */ | ||
| 2699 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2700 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2701 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2702 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2703 | #else | ||
| 2704 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2705 | #endif | ||
| 2706 | |||
| 2707 | /* | ||
| 2708 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2709 | * | ||
| 2710 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2711 | * but later deprecated in Mac OS X 10.12 | ||
| 2712 | */ | ||
| 2713 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2714 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2715 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2716 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2717 | #else | ||
| 2718 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2719 | #endif | ||
| 2720 | |||
| 2721 | /* | ||
| 2722 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2723 | * | ||
| 2724 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2725 | * but later deprecated in Mac OS X 10.12 | ||
| 2726 | */ | ||
| 2727 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2728 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2729 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2730 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2731 | #else | ||
| 2732 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2733 | #endif | ||
| 2734 | |||
| 2735 | /* | ||
| 2736 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2737 | * | ||
| 2738 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2739 | * but later deprecated in Mac OS X 10.12 | ||
| 2740 | */ | ||
| 2741 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2742 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2743 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2744 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2745 | #else | ||
| 2746 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2747 | #endif | ||
| 2748 | |||
| 2749 | /* | ||
| 2750 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2751 | * | ||
| 2752 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2753 | * but later deprecated in Mac OS X 10.12 | ||
| 2754 | */ | ||
| 2755 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2756 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2757 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2758 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2759 | #else | ||
| 2760 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2761 | #endif | ||
| 2762 | |||
| 2763 | /* | ||
| 2764 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2765 | * | ||
| 2766 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2767 | * but later deprecated in Mac OS X 10.12 | ||
| 2768 | */ | ||
| 2769 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2770 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2771 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2772 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2773 | #else | ||
| 2774 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2775 | #endif | ||
| 2776 | |||
| 2777 | /* | ||
| 2778 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2779 | * | ||
| 2780 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2781 | * but later deprecated in Mac OS X 10.12 | ||
| 2782 | */ | ||
| 2783 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2784 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2785 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2786 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2787 | #else | ||
| 2788 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2789 | #endif | ||
| 2790 | |||
| 2791 | /* | ||
| 2792 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2793 | * | ||
| 2794 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2795 | * but later deprecated in Mac OS X 10.12 | ||
| 2796 | */ | ||
| 2797 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2798 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2799 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2800 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2801 | #else | ||
| 2802 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2803 | #endif | ||
| 2804 | |||
| 2805 | /* | ||
| 2806 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2807 | * | ||
| 2808 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2809 | * but later deprecated in Mac OS X 10.12 | ||
| 2810 | */ | ||
| 2811 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2812 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2813 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2814 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2815 | #else | ||
| 2816 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2817 | #endif | ||
| 2818 | |||
| 2819 | /* | ||
| 2820 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2821 | * | ||
| 2822 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2823 | * but later deprecated in Mac OS X 10.12 | ||
| 2824 | */ | ||
| 2825 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2826 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2827 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2828 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2829 | #else | ||
| 2830 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2831 | #endif | ||
| 2832 | |||
| 2833 | /* | ||
| 2834 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2835 | * | ||
| 2836 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2837 | * but later deprecated in Mac OS X 10.12 | ||
| 2838 | */ | ||
| 2839 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2840 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2841 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2842 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2843 | #else | ||
| 2844 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2845 | #endif | ||
| 2846 | |||
| 2847 | /* | ||
| 2848 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2849 | * | ||
| 2850 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2851 | * but later deprecated in Mac OS X 10.12 | ||
| 2852 | */ | ||
| 2853 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2854 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2855 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2856 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2857 | #else | ||
| 2858 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2859 | #endif | ||
| 2860 | |||
| 2861 | /* | ||
| 2862 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2863 | * | ||
| 2864 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2865 | * but later deprecated in Mac OS X 10.12 | ||
| 2866 | */ | ||
| 2867 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2868 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2869 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2870 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2871 | #else | ||
| 2872 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2873 | #endif | ||
| 2874 | |||
| 2875 | /* | ||
| 2876 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2877 | * | ||
| 2878 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2879 | * but later deprecated in Mac OS X 10.12 | ||
| 2880 | */ | ||
| 2881 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2882 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2883 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2884 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2885 | #else | ||
| 2886 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2887 | #endif | ||
| 2888 | |||
| 2889 | /* | ||
| 2890 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2891 | * | ||
| 2892 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2893 | * but later deprecated in Mac OS X 10.12 | ||
| 2894 | */ | ||
| 2895 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2896 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2897 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2898 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2899 | #else | ||
| 2900 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2901 | #endif | ||
| 2902 | |||
| 2903 | /* | ||
| 2904 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2905 | * | ||
| 2906 | * Used on declarations introduced in Mac OS X 10.12.1 | ||
| 2907 | */ | ||
| 2908 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2909 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_1, __IPHONE_COMPAT_VERSION) | ||
| 2910 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_1 | ||
| 2911 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2912 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_1 | ||
| 2913 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2914 | #else | ||
| 2915 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2916 | #endif | ||
| 2917 | |||
| 2918 | /* | ||
| 2919 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED | ||
| 2920 | * | ||
| 2921 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 2922 | * and deprecated in Mac OS X 10.12.1 | ||
| 2923 | */ | ||
| 2924 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2925 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2926 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2927 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2928 | #else | ||
| 2929 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2930 | #endif | ||
| 2931 | |||
| 2932 | /* | ||
| 2933 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2934 | * | ||
| 2935 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2936 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2937 | */ | ||
| 2938 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2939 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2940 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2941 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2942 | #else | ||
| 2943 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2944 | #endif | ||
| 2945 | |||
| 2946 | /* | ||
| 2947 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2948 | * | ||
| 2949 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2950 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2951 | */ | ||
| 2952 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2953 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2954 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2955 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2956 | #else | ||
| 2957 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2958 | #endif | ||
| 2959 | |||
| 2960 | /* | ||
| 2961 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2962 | * | ||
| 2963 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2964 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2965 | */ | ||
| 2966 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2967 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2968 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2969 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2970 | #else | ||
| 2971 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2972 | #endif | ||
| 2973 | |||
| 2974 | /* | ||
| 2975 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2976 | * | ||
| 2977 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2978 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2979 | */ | ||
| 2980 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2981 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2982 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2983 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2984 | #else | ||
| 2985 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2986 | #endif | ||
| 2987 | |||
| 2988 | /* | ||
| 2989 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2990 | * | ||
| 2991 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2992 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2993 | */ | ||
| 2994 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2995 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2996 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2997 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2998 | #else | ||
| 2999 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3000 | #endif | ||
| 3001 | |||
| 3002 | /* | ||
| 3003 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3004 | * | ||
| 3005 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3006 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3007 | */ | ||
| 3008 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3009 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3010 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3011 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3012 | #else | ||
| 3013 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3014 | #endif | ||
| 3015 | |||
| 3016 | /* | ||
| 3017 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3018 | * | ||
| 3019 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3020 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3021 | */ | ||
| 3022 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3023 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3024 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3025 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3026 | #else | ||
| 3027 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3028 | #endif | ||
| 3029 | |||
| 3030 | /* | ||
| 3031 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3032 | * | ||
| 3033 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3034 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3035 | */ | ||
| 3036 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3037 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3038 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3039 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3040 | #else | ||
| 3041 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3042 | #endif | ||
| 3043 | |||
| 3044 | /* | ||
| 3045 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3046 | * | ||
| 3047 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3048 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3049 | */ | ||
| 3050 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3051 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3052 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3053 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3054 | #else | ||
| 3055 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3056 | #endif | ||
| 3057 | |||
| 3058 | /* | ||
| 3059 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3060 | * | ||
| 3061 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3062 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3063 | */ | ||
| 3064 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3065 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3066 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3067 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3068 | #else | ||
| 3069 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3070 | #endif | ||
| 3071 | |||
| 3072 | /* | ||
| 3073 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3074 | * | ||
| 3075 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3076 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3077 | */ | ||
| 3078 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3079 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3080 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3081 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3082 | #else | ||
| 3083 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3084 | #endif | ||
| 3085 | |||
| 3086 | /* | ||
| 3087 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3088 | * | ||
| 3089 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3090 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3091 | */ | ||
| 3092 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3093 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3094 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3095 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3096 | #else | ||
| 3097 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3098 | #endif | ||
| 3099 | |||
| 3100 | /* | ||
| 3101 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3102 | * | ||
| 3103 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3104 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3105 | */ | ||
| 3106 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3107 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3108 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3109 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3110 | #else | ||
| 3111 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3112 | #endif | ||
| 3113 | |||
| 3114 | /* | ||
| 3115 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3116 | * | ||
| 3117 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3118 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3119 | */ | ||
| 3120 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3121 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3122 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3123 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3124 | #else | ||
| 3125 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3126 | #endif | ||
| 3127 | |||
| 3128 | /* | ||
| 3129 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3130 | * | ||
| 3131 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3132 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3133 | */ | ||
| 3134 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3135 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3136 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3137 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3138 | #else | ||
| 3139 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3140 | #endif | ||
| 3141 | |||
| 3142 | /* | ||
| 3143 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3144 | * | ||
| 3145 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3146 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3147 | */ | ||
| 3148 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3149 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3150 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3151 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3152 | #else | ||
| 3153 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3154 | #endif | ||
| 3155 | |||
| 3156 | /* | ||
| 3157 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3158 | * | ||
| 3159 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3160 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3161 | */ | ||
| 3162 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3163 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3164 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3165 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3166 | #else | ||
| 3167 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3168 | #endif | ||
| 3169 | |||
| 3170 | /* | ||
| 3171 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3172 | * | ||
| 3173 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3174 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3175 | */ | ||
| 3176 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3177 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3178 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3179 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3180 | #else | ||
| 3181 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3182 | #endif | ||
| 3183 | |||
| 3184 | /* | ||
| 3185 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3186 | * | ||
| 3187 | * Used on declarations introduced in Mac OS X 10.12.2 | ||
| 3188 | */ | ||
| 3189 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3190 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_COMPAT_VERSION) | ||
| 3191 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2 | ||
| 3192 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3193 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_2 | ||
| 3194 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3195 | #else | ||
| 3196 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3197 | #endif | ||
| 3198 | |||
| 3199 | /* | ||
| 3200 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED | ||
| 3201 | * | ||
| 3202 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3203 | * and deprecated in Mac OS X 10.12.2 | ||
| 3204 | */ | ||
| 3205 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3206 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3207 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3208 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3209 | #else | ||
| 3210 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3211 | #endif | ||
| 3212 | |||
| 3213 | /* | ||
| 3214 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3215 | * | ||
| 3216 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3217 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3218 | */ | ||
| 3219 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3220 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3221 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3222 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3223 | #else | ||
| 3224 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3225 | #endif | ||
| 3226 | |||
| 3227 | /* | ||
| 3228 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3229 | * | ||
| 3230 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3231 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3232 | */ | ||
| 3233 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3234 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3235 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3236 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3237 | #else | ||
| 3238 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3239 | #endif | ||
| 3240 | |||
| 3241 | /* | ||
| 3242 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3243 | * | ||
| 3244 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3245 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3246 | */ | ||
| 3247 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3248 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3249 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3250 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3251 | #else | ||
| 3252 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3253 | #endif | ||
| 3254 | |||
| 3255 | /* | ||
| 3256 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3257 | * | ||
| 3258 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3259 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3260 | */ | ||
| 3261 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3262 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3263 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3264 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3265 | #else | ||
| 3266 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3267 | #endif | ||
| 3268 | |||
| 3269 | /* | ||
| 3270 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3271 | * | ||
| 3272 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3273 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3274 | */ | ||
| 3275 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3276 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3277 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3278 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3279 | #else | ||
| 3280 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3281 | #endif | ||
| 3282 | |||
| 3283 | /* | ||
| 3284 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3285 | * | ||
| 3286 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3287 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3288 | */ | ||
| 3289 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3290 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3291 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3292 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3293 | #else | ||
| 3294 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3295 | #endif | ||
| 3296 | |||
| 3297 | /* | ||
| 3298 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3299 | * | ||
| 3300 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3301 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3302 | */ | ||
| 3303 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3304 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3305 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3306 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3307 | #else | ||
| 3308 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3309 | #endif | ||
| 3310 | |||
| 3311 | /* | ||
| 3312 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3313 | * | ||
| 3314 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3315 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3316 | */ | ||
| 3317 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3318 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3319 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3320 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3321 | #else | ||
| 3322 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3323 | #endif | ||
| 3324 | |||
| 3325 | /* | ||
| 3326 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3327 | * | ||
| 3328 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3329 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3330 | */ | ||
| 3331 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3332 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3333 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3334 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3335 | #else | ||
| 3336 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3337 | #endif | ||
| 3338 | |||
| 3339 | /* | ||
| 3340 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3341 | * | ||
| 3342 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3343 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3344 | */ | ||
| 3345 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3346 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3347 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3348 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3349 | #else | ||
| 3350 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3351 | #endif | ||
| 3352 | |||
| 3353 | /* | ||
| 3354 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3355 | * | ||
| 3356 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3357 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3358 | */ | ||
| 3359 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3360 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3361 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3362 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3363 | #else | ||
| 3364 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3365 | #endif | ||
| 3366 | |||
| 3367 | /* | ||
| 3368 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3369 | * | ||
| 3370 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3371 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3372 | */ | ||
| 3373 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3374 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3375 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3376 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3377 | #else | ||
| 3378 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3379 | #endif | ||
| 3380 | |||
| 3381 | /* | ||
| 3382 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3383 | * | ||
| 3384 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3385 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3386 | */ | ||
| 3387 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3388 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3389 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3390 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3391 | #else | ||
| 3392 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3393 | #endif | ||
| 3394 | |||
| 3395 | /* | ||
| 3396 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3397 | * | ||
| 3398 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3399 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3400 | */ | ||
| 3401 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3402 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3403 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3404 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3405 | #else | ||
| 3406 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3407 | #endif | ||
| 3408 | |||
| 3409 | /* | ||
| 3410 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3411 | * | ||
| 3412 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3413 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3414 | */ | ||
| 3415 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3416 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3417 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3418 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3419 | #else | ||
| 3420 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3421 | #endif | ||
| 3422 | |||
| 3423 | /* | ||
| 3424 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3425 | * | ||
| 3426 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3427 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3428 | */ | ||
| 3429 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3430 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3431 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3432 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3433 | #else | ||
| 3434 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3435 | #endif | ||
| 3436 | |||
| 3437 | /* | ||
| 3438 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3439 | * | ||
| 3440 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3441 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3442 | */ | ||
| 3443 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3444 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3445 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3446 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3447 | #else | ||
| 3448 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3449 | #endif | ||
| 3450 | |||
| 3451 | /* | ||
| 3452 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3453 | * | ||
| 3454 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3455 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3456 | */ | ||
| 3457 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3458 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3459 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3460 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3461 | #else | ||
| 3462 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3463 | #endif | ||
| 3464 | |||
| 3465 | /* | ||
| 3466 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3467 | * | ||
| 3468 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3469 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3470 | */ | ||
| 3471 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3472 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3473 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3474 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3475 | #else | ||
| 3476 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3477 | #endif | ||
| 3478 | |||
| 3479 | /* | ||
| 3480 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3481 | * | ||
| 3482 | * Used on declarations introduced in Mac OS X 10.12.4 | ||
| 3483 | */ | ||
| 3484 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3485 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_4, __IPHONE_COMPAT_VERSION) | ||
| 3486 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_4 | ||
| 3487 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3488 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_4 | ||
| 3489 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3490 | #else | ||
| 3491 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3492 | #endif | ||
| 3493 | |||
| 3494 | /* | ||
| 3495 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED | ||
| 3496 | * | ||
| 3497 | * Used on declarations introduced in Mac OS X 10.12.4, | ||
| 3498 | * and deprecated in Mac OS X 10.12.4 | ||
| 3499 | */ | ||
| 3500 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3501 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3502 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3503 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3504 | #else | ||
| 3505 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3506 | #endif | ||
| 3507 | |||
| 3508 | /* | ||
| 3509 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3510 | * | ||
| 3511 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3512 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3513 | */ | ||
| 3514 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3515 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3516 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3517 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3518 | #else | ||
| 3519 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3520 | #endif | ||
| 3521 | |||
| 3522 | /* | ||
| 3523 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3524 | * | ||
| 3525 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3526 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3527 | */ | ||
| 3528 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3529 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3530 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3531 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3532 | #else | ||
| 3533 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3534 | #endif | ||
| 3535 | |||
| 3536 | /* | ||
| 3537 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3538 | * | ||
| 3539 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3540 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3541 | */ | ||
| 3542 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3543 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3544 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3545 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3546 | #else | ||
| 3547 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3548 | #endif | ||
| 3549 | |||
| 3550 | /* | ||
| 3551 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3552 | * | ||
| 3553 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3554 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3555 | */ | ||
| 3556 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3557 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3558 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3559 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3560 | #else | ||
| 3561 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3562 | #endif | ||
| 3563 | |||
| 3564 | /* | ||
| 3565 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3566 | * | ||
| 3567 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3568 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3569 | */ | ||
| 3570 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3571 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3572 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3573 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3574 | #else | ||
| 3575 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3576 | #endif | ||
| 3577 | |||
| 3578 | /* | ||
| 3579 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3580 | * | ||
| 3581 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3582 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3583 | */ | ||
| 3584 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3585 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3586 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3587 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3588 | #else | ||
| 3589 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3590 | #endif | ||
| 3591 | |||
| 3592 | /* | ||
| 3593 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3594 | * | ||
| 3595 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3596 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3597 | */ | ||
| 3598 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3599 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3600 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3601 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3602 | #else | ||
| 3603 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3604 | #endif | ||
| 3605 | |||
| 3606 | /* | ||
| 3607 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3608 | * | ||
| 3609 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3610 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3611 | */ | ||
| 3612 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3613 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3614 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3615 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3616 | #else | ||
| 3617 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3618 | #endif | ||
| 3619 | |||
| 3620 | /* | ||
| 3621 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3622 | * | ||
| 3623 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3624 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3625 | */ | ||
| 3626 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3627 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3628 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3629 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3630 | #else | ||
| 3631 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3632 | #endif | ||
| 3633 | |||
| 3634 | /* | ||
| 3635 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3636 | * | ||
| 3637 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3638 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3639 | */ | ||
| 3640 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3641 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3642 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3643 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3644 | #else | ||
| 3645 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3646 | #endif | ||
| 3647 | |||
| 3648 | /* | ||
| 3649 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3650 | * | ||
| 3651 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3652 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3653 | */ | ||
| 3654 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3655 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3656 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3657 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3658 | #else | ||
| 3659 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3660 | #endif | ||
| 3661 | |||
| 3662 | /* | ||
| 3663 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3664 | * | ||
| 3665 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3666 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3667 | */ | ||
| 3668 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3669 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3670 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3671 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3672 | #else | ||
| 3673 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3674 | #endif | ||
| 3675 | |||
| 3676 | /* | ||
| 3677 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3678 | * | ||
| 3679 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3680 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3681 | */ | ||
| 3682 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3683 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3684 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3685 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3686 | #else | ||
| 3687 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3688 | #endif | ||
| 3689 | |||
| 3690 | /* | ||
| 3691 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3692 | * | ||
| 3693 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3694 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3695 | */ | ||
| 3696 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3697 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3698 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3699 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3700 | #else | ||
| 3701 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3702 | #endif | ||
| 3703 | |||
| 3704 | /* | ||
| 3705 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3706 | * | ||
| 3707 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3708 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3709 | */ | ||
| 3710 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3711 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3712 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3713 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3714 | #else | ||
| 3715 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3716 | #endif | ||
| 3717 | |||
| 3718 | /* | ||
| 3719 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3720 | * | ||
| 3721 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3722 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3723 | */ | ||
| 3724 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3725 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3726 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3727 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3728 | #else | ||
| 3729 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3730 | #endif | ||
| 3731 | |||
| 3732 | /* | ||
| 3733 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3734 | * | ||
| 3735 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3736 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3737 | */ | ||
| 3738 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3739 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3740 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3741 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3742 | #else | ||
| 3743 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3744 | #endif | ||
| 3745 | |||
| 3746 | /* | ||
| 3747 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3748 | * | ||
| 3749 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3750 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3751 | */ | ||
| 3752 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3753 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3754 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3755 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3756 | #else | ||
| 3757 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3758 | #endif | ||
| 3759 | |||
| 3760 | /* | ||
| 3761 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3762 | * | ||
| 3763 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3764 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3765 | */ | ||
| 3766 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3767 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3768 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3769 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3770 | #else | ||
| 3771 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3772 | #endif | ||
| 3773 | |||
| 3774 | /* | ||
| 3775 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3776 | * | ||
| 3777 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3778 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3779 | */ | ||
| 3780 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3781 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3782 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3783 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3784 | #else | ||
| 3785 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3786 | #endif | ||
| 3787 | |||
| 3788 | /* | ||
| 3789 | * AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3790 | * | ||
| 3791 | * Used on declarations introduced in Mac OS X 10.13 | ||
| 3792 | */ | ||
| 3793 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3794 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_COMPAT_VERSION) | ||
| 3795 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 | ||
| 3796 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3797 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13 | ||
| 3798 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3799 | #else | ||
| 3800 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3801 | #endif | ||
| 3802 | |||
| 3803 | /* | ||
| 3804 | * AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3805 | * | ||
| 3806 | * Used on declarations introduced in Mac OS X 10.14 | ||
| 3807 | */ | ||
| 3808 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3809 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_14, __IPHONE_COMPAT_VERSION) | ||
| 3810 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_14 | ||
| 3811 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3812 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14 | ||
| 3813 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3814 | #else | ||
| 3815 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3816 | #endif | ||
| 3817 | |||
| 3818 | /* | ||
| 3819 | * AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3820 | * | ||
| 3821 | * Used on declarations introduced in Mac OS X 10.15 | ||
| 3822 | */ | ||
| 3823 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3824 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_15, __IPHONE_COMPAT_VERSION) | ||
| 3825 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15 | ||
| 3826 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3827 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15 | ||
| 3828 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3829 | #else | ||
| 3830 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3831 | #endif | ||
| 3832 | |||
| 3833 | /* | ||
| 3834 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3835 | * | ||
| 3836 | * Used on types deprecated in Mac OS X 10.1 | ||
| 3837 | */ | ||
| 3838 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3839 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3840 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 3841 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3842 | #else | ||
| 3843 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3844 | #endif | ||
| 3845 | |||
| 3846 | /* | ||
| 3847 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3848 | * | ||
| 3849 | * Used on types deprecated in Mac OS X 10.2 | ||
| 3850 | */ | ||
| 3851 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3852 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3853 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 3854 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3855 | #else | ||
| 3856 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3857 | #endif | ||
| 3858 | |||
| 3859 | /* | ||
| 3860 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3861 | * | ||
| 3862 | * Used on types deprecated in Mac OS X 10.3 | ||
| 3863 | */ | ||
| 3864 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3865 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3866 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 3867 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3868 | #else | ||
| 3869 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3870 | #endif | ||
| 3871 | |||
| 3872 | /* | ||
| 3873 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3874 | * | ||
| 3875 | * Used on types deprecated in Mac OS X 10.4 | ||
| 3876 | */ | ||
| 3877 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3878 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3879 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 3880 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3881 | #else | ||
| 3882 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3883 | #endif | ||
| 3884 | |||
| 3885 | |||
| 3886 | /* | ||
| 3887 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3888 | * | ||
| 3889 | * Used on types deprecated in Mac OS X 10.5 | ||
| 3890 | */ | ||
| 3891 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3892 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3893 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 3894 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3895 | #else | ||
| 3896 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3897 | #endif | ||
| 3898 | |||
| 3899 | /* | ||
| 3900 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3901 | * | ||
| 3902 | * Used on types deprecated in Mac OS X 10.6 | ||
| 3903 | */ | ||
| 3904 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3905 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3906 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 3907 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3908 | #else | ||
| 3909 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3910 | #endif | ||
| 3911 | |||
| 3912 | /* | ||
| 3913 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3914 | * | ||
| 3915 | * Used on types deprecated in Mac OS X 10.7 | ||
| 3916 | */ | ||
| 3917 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3918 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3919 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 3920 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3921 | #else | ||
| 3922 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3923 | #endif | ||
| 3924 | |||
| 3925 | /* | ||
| 3926 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3927 | * | ||
| 3928 | * Used on types deprecated in Mac OS X 10.8 | ||
| 3929 | */ | ||
| 3930 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3931 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3932 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 3933 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3934 | #else | ||
| 3935 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3936 | #endif | ||
| 3937 | |||
| 3938 | /* | ||
| 3939 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3940 | * | ||
| 3941 | * Used on types deprecated in Mac OS X 10.9 | ||
| 3942 | */ | ||
| 3943 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3944 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3945 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 3946 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3947 | #else | ||
| 3948 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3949 | #endif | ||
| 3950 | |||
| 3951 | /* | ||
| 3952 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3953 | * | ||
| 3954 | * Used on types deprecated in Mac OS X 10.10 | ||
| 3955 | */ | ||
| 3956 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3957 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3958 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 3959 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3960 | #else | ||
| 3961 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3962 | #endif | ||
| 3963 | |||
| 3964 | /* | ||
| 3965 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3966 | * | ||
| 3967 | * Used on types deprecated in Mac OS X 10.11 | ||
| 3968 | */ | ||
| 3969 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3970 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3971 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 3972 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3973 | #else | ||
| 3974 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3975 | #endif | ||
| 3976 | |||
| 3977 | /* | ||
| 3978 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3979 | * | ||
| 3980 | * Used on types deprecated in Mac OS X 10.12 | ||
| 3981 | */ | ||
| 3982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3983 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3985 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3986 | #else | ||
| 3987 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3988 | #endif | ||
| 3989 | |||
| 3990 | /* | ||
| 3991 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3992 | * | ||
| 3993 | * Used on types deprecated in Mac OS X 10.13 | ||
| 3994 | */ | ||
| 3995 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3996 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3997 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3998 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3999 | #else | ||
| 4000 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 4001 | #endif | ||
| 4002 | |||
| 4003 | /* | ||
| 4004 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4005 | * | ||
| 4006 | * Used on types deprecated in Mac OS X 10.14.4 | ||
| 4007 | */ | ||
| 4008 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 4009 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_14_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 4010 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14_4 | ||
| 4011 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 4012 | #else | ||
| 4013 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4014 | #endif | ||
| 4015 | |||
| 4016 | #endif /* __AVAILABILITYMACROS__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/assert.h+9-3| ... | @@ -56,6 +56,12 @@ | ... | @@ -56,6 +56,12 @@ |
| 56 | #define	assert(e)	((void)0) | 56 | #define	assert(e)	((void)0) |
| 57 | #else | 57 | #else |
| 58 | 58 | ||
| 59 | #ifdef __FILE_NAME__ | ||
| 60 | #define __ASSERT_FILE_NAME __FILE_NAME__ | ||
| 61 | #else /* __FILE_NAME__ */ | ||
| 62 | #define __ASSERT_FILE_NAME __FILE__ | ||
| 63 | #endif /* __FILE_NAME__ */ | ||
| 64 | |||
| 59 | #ifndef __GNUC__ | 65 | #ifndef __GNUC__ |
| 60 | 66 | ||
| 61 | __BEGIN_DECLS | 67 | __BEGIN_DECLS |
| ... | @@ -66,7 +72,7 @@ int printf(const char * __restrict, ...); | ... | @@ -66,7 +72,7 @@ int printf(const char * __restrict, ...); |
| 66 | __END_DECLS | 72 | __END_DECLS |
| 67 | 73 | ||
| 68 | #define assert(e) \ | 74 | #define assert(e) \ |
| 69 | ((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__))) | 75 | ((void) ((e) ? ((void)0) : __assert (#e, __ASSERT_FILE_NAME, __LINE__))) |
| 70 | #define __assert(e, file, line) \ | 76 | #define __assert(e, file, line) \ |
| 71 | ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort()) | 77 | ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort()) |
| 72 | 78 | ||
| ... | @@ -90,10 +96,10 @@ __END_DECLS | ... | @@ -90,10 +96,10 @@ __END_DECLS |
| 90 | 96 | ||
| 91 | #if __DARWIN_UNIX03 | 97 | #if __DARWIN_UNIX03 |
| 92 | #define	assert(e) \ | 98 | #define	assert(e) \ |
| 93 | (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) | 99 | (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0) |
| 94 | #else /* !__DARWIN_UNIX03 */ | 100 | #else /* !__DARWIN_UNIX03 */ |
| 95 | #define assert(e) \ | 101 | #define assert(e) \ |
| 96 | (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0) | 102 | (__builtin_expect(!(e), 0) ? __assert (#e, __ASSERT_FILE_NAME, __LINE__) : (void)0) |
| 97 | #endif /* __DARWIN_UNIX03 */ | 103 | #endif /* __DARWIN_UNIX03 */ |
| 98 | 104 | ||
| 99 | #endif /* __GNUC__ */ | 105 | #endif /* __GNUC__ */ |
lib/libc/include/any-macos-any/device/device_types.h+1-2| ... | @@ -70,6 +70,7 @@ | ... | @@ -70,6 +70,7 @@ |
| 70 | #include <mach/mach_types.h> | 70 | #include <mach/mach_types.h> |
| 71 | #include <mach/message.h> | 71 | #include <mach/message.h> |
| 72 | #include <mach/port.h> | 72 | #include <mach/port.h> |
| 73 | #include <stdint.h> | ||
| 73 | 74 | ||
| 74 | 75 | ||
| 75 | 76 | ||
| ... | @@ -82,7 +83,6 @@ typedef char * io_buf_ptr_t; | ... | @@ -82,7 +83,6 @@ typedef char * io_buf_ptr_t; |
| 82 | * Some types for IOKit. | 83 | * Some types for IOKit. |
| 83 | */ | 84 | */ |
| 84 | 85 | ||
| 85 | #ifdef IOKIT | ||
| 86 | 86 | ||
| 87 | /* must match device_types.defs */ | 87 | /* must match device_types.defs */ |
| 88 | typedef char io_name_t[128]; | 88 | typedef char io_name_t[128]; |
| ... | @@ -113,6 +113,5 @@ typedef mach_port_t io_object_t; | ... | @@ -113,6 +113,5 @@ typedef mach_port_t io_object_t; |
| 113 | #endif /* __IOKIT_PORTS_DEFINED__ */ | 113 | #endif /* __IOKIT_PORTS_DEFINED__ */ |
| 114 | 114 | ||
| 115 | 115 | ||
| 116 | #endif /* IOKIT */ | ||
| 117 | 116 | ||
| 118 | #endif /* DEVICE_TYPES_H */ | 117 | #endif /* DEVICE_TYPES_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/dispatch/base.h+27| ... | @@ -127,6 +127,33 @@ | ... | @@ -127,6 +127,33 @@ |
| 127 | #define DISPATCH_UNAVAILABLE_MSG(msg) | 127 | #define DISPATCH_UNAVAILABLE_MSG(msg) |
| 128 | #endif | 128 | #endif |
| 129 | 129 | ||
| 130 | #if defined(__cplusplus) | ||
| 131 | # if __cplusplus >= 201703L | ||
| 132 | # define DISPATCH_FALLTHROUGH [[fallthrough]] | ||
| 133 | # elif __cplusplus >= 201103L | ||
| 134 | # if defined(__clang__) | ||
| 135 | # define DISPATCH_FALLTHROUGH [[clang::fallthrough]] | ||
| 136 | # elif defined(__GNUC__) && __GNUC__ >= 7 | ||
| 137 | # define DISPATCH_FALLTHROUGH [[gnu::fallthrough]] | ||
| 138 | # else | ||
| 139 | # define DISPATCH_FALLTHROUGH | ||
| 140 | # endif | ||
| 141 | # else | ||
| 142 | # define DISPATCH_FALLTHROUGH | ||
| 143 | # endif | ||
| 144 | #elif defined(__GNUC__) && __GNUC__ >= 7 | ||
| 145 | # define DISPATCH_FALLTHROUGH __attribute__((__fallthrough__)) | ||
| 146 | #elif defined(__clang__) | ||
| 147 | # if __has_attribute(fallthrough) && __clang_major__ >= 5 | ||
| 148 | # define DISPATCH_FALLTHROUGH __attribute__((__fallthrough__)) | ||
| 149 | # else | ||
| 150 | # define DISPATCH_FALLTHROUGH | ||
| 151 | # endif | ||
| 152 | #else | ||
| 153 | # define DISPATCH_FALLTHROUGH | ||
| 154 | #endif | ||
| 155 | |||
| 156 | |||
| 130 | #define DISPATCH_LINUX_UNAVAILABLE() | 157 | #define DISPATCH_LINUX_UNAVAILABLE() |
| 131 | 158 | ||
| 132 | #ifdef __FreeBSD__ | 159 | #ifdef __FreeBSD__ |
lib/libc/include/any-macos-any/execinfo.h+35| ... | @@ -27,6 +27,7 @@ | ... | @@ -27,6 +27,7 @@ |
| 27 | #include <Availability.h> | 27 | #include <Availability.h> |
| 28 | #include <os/base.h> | 28 | #include <os/base.h> |
| 29 | #include <os/availability.h> | 29 | #include <os/availability.h> |
| 30 | #include <stddef.h> | ||
| 30 | #include <stdint.h> | 31 | #include <stdint.h> |
| 31 | #include <uuid/uuid.h> | 32 | #include <uuid/uuid.h> |
| 32 | 33 | ||
| ... | @@ -58,6 +59,40 @@ OS_EXPORT | ... | @@ -58,6 +59,40 @@ OS_EXPORT |
| 58 | void backtrace_image_offsets(void* const* array, | 59 | void backtrace_image_offsets(void* const* array, |
| 59 | 		struct image_offset *image_offsets, int size); | 60 | 		struct image_offset *image_offsets, int size); |
| 60 | 61 | ||
| 62 | /*! | ||
| 63 | * @function backtrace_async | ||
| 64 | * Extracts the function return addresses of the current call stack. While | ||
| 65 | * backtrace() will only follow the OS call stack, backtrace_async() will | ||
| 66 | * prefer the unwind the Swift concurrency continuation stack if invoked | ||
| 67 | * from within an async context. In a non-async context this function is | ||
| 68 | * strictly equivalent to backtrace(). | ||
| 69 | * | ||
| 70 | * @param array | ||
| 71 | * The array of pointers to fill with the return addresses. | ||
| 72 | * | ||
| 73 | * @param length | ||
| 74 | * The maximum number of pointers to write. | ||
| 75 | * | ||
| 76 | * @param task_id | ||
| 77 | * Can be NULL. If non-NULL, the uint32_t pointed to by `task_id` is set to | ||
| 78 | * a non-zero value that for the current process uniquely identifies the async | ||
| 79 | * task currently running. If called from a non-async context, the value is | ||
| 80 | * set to 0 and `array` contains the same values backtrace() would return. | ||
| 81 | * | ||
| 82 | * Note that the continuation addresses provided by backtrace_async() | ||
| 83 | * have an offset of 1 added to them. Most symbolication engines will | ||
| 84 | * substract 1 from the call stack return addresses in order to symbolicate | ||
| 85 | * the call site rather than the return location. With a Swift async | ||
| 86 | * continuation, substracting 1 from its address would result in an address | ||
| 87 | * in a different function. This offset allows the returned addresses to be | ||
| 88 | * handled correctly by most existing symbolication engines. | ||
| 89 | * | ||
| 90 | * @result | ||
| 91 | * The number of pointers actually written. | ||
| 92 | */ | ||
| 93 | API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0), watchos(8.0)) | ||
| 94 | size_t backtrace_async(void** array, size_t length, uint32_t *task_id); | ||
| 95 | |||
| 61 | __END_DECLS | 96 | __END_DECLS |
| 62 | 97 | ||
| 63 | #endif /* !_EXECINFO_H_ */ | 98 | #endif /* !_EXECINFO_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/gethostuuid.h+1-1| ... | @@ -36,7 +36,7 @@ | ... | @@ -36,7 +36,7 @@ |
| 36 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0) | 36 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0) |
| 37 | 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"); | 37 | 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"); |
| 38 | #else | 38 | #else |
| 39 | int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); | 39 | int gethostuuid(uuid_t, const struct timespec *) __API_AVAILABLE(macos(10.5)) __API_UNAVAILABLE(ios, tvos, watchos); |
| 40 | #endif | 40 | #endif |
| 41 | 41 | ||
| 42 | #endif /* __GETHOSTUUID_H */ | 42 | #endif /* __GETHOSTUUID_H */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/libproc.h+4-19| ... | @@ -161,27 +161,12 @@ int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); | ... | @@ -161,27 +161,12 @@ int proc_setthread_csm(uint32_t flags) __API_AVAILABLE(macos(11.0)); |
| 161 | #define PROC_CSM_NOSMT 0x0002 /* Set NO_SMT - see above */ | 161 | #define PROC_CSM_NOSMT 0x0002 /* Set NO_SMT - see above */ |
| 162 | #define PROC_CSM_TECS 0x0004 /* Execute VERW on every return to user mode */ | 162 | #define PROC_CSM_TECS 0x0004 /* Execute VERW on every return to user mode */ |
| 163 | 163 | ||
| 164 | #ifdef PRIVATE | ||
| 165 | #include <sys/event.h> | ||
| 166 | /* | ||
| 167 | * Enumerate potential userspace pointers embedded in kernel data structures. | ||
| 168 | * Currently inspects kqueues only. | ||
| 169 | * | ||
| 170 | * NOTE: returned "pointers" are opaque user-supplied values and thus not | ||
| 171 | * guaranteed to address valid objects or be pointers at all. | ||
| 172 | * | ||
| 173 | * Returns the number of pointers found (which may exceed buffersize), or -1 on | ||
| 174 | * failure and errno set appropriately. | ||
| 175 | */ | ||
| 176 | int proc_list_uptrs(pid_t pid, uint64_t *buffer, uint32_t buffersize); | ||
| 177 | |||
| 178 | int proc_list_dynkqueueids(int pid, kqueue_id_t *buf, uint32_t bufsz); | ||
| 179 | int proc_piddynkqueueinfo(int pid, int flavor, kqueue_id_t kq_id, void *buffer, | ||
| 180 | int buffersize); | ||
| 181 | #endif /* PRIVATE */ | ||
| 182 | |||
| 183 | int proc_udata_info(int pid, int flavor, void *buffer, int buffersize); | 164 | int proc_udata_info(int pid, int flavor, void *buffer, int buffersize); |
| 184 | 165 | ||
| 166 | #if __has_include(<libproc_private.h>) | ||
| 167 | #include <libproc_private.h> | ||
| 168 | #endif | ||
| 169 | |||
| 185 | __END_DECLS | 170 | __END_DECLS |
| 186 | 171 | ||
| 187 | #endif /*_LIBPROC_H_ */ | 172 | #endif /*_LIBPROC_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/clock.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	clock_MSG_COUNT	3 | 52 | #define	clock_MSG_COUNT	3 |
| 53 | #endif	/* clock_MSG_COUNT */ | 53 | #endif	/* clock_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/clock_priv.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	clock_priv_MSG_COUNT	2 | 52 | #define	clock_priv_MSG_COUNT	2 |
| 53 | #endif	/* clock_priv_MSG_COUNT */ | 53 | #endif	/* clock_priv_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/exception_types.h created+211| ... | @@ -0,0 +1,211 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef _MACH_EXCEPTION_TYPES_H_ | ||
| 60 | #define _MACH_EXCEPTION_TYPES_H_ | ||
| 61 | |||
| 62 | #include <mach/machine/exception.h> | ||
| 63 | |||
| 64 | /* | ||
| 65 | *	Machine-independent exception definitions. | ||
| 66 | */ | ||
| 67 | |||
| 68 | #define EXC_BAD_ACCESS 1 /* Could not access memory */ | ||
| 69 | /* Code contains kern_return_t describing error. */ | ||
| 70 | /* Subcode contains bad memory address. */ | ||
| 71 | |||
| 72 | #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ | ||
| 73 | /* Illegal or undefined instruction or operand */ | ||
| 74 | |||
| 75 | #define EXC_ARITHMETIC 3 /* Arithmetic exception */ | ||
| 76 | /* Exact nature of exception is in code field */ | ||
| 77 | |||
| 78 | #define EXC_EMULATION 4 /* Emulation instruction */ | ||
| 79 | /* Emulation support instruction encountered */ | ||
| 80 | /* Details in code and subcode fields	*/ | ||
| 81 | |||
| 82 | #define EXC_SOFTWARE 5 /* Software generated exception */ | ||
| 83 | /* Exact exception is in code field. */ | ||
| 84 | /* Codes 0 - 0xFFFF reserved to hardware */ | ||
| 85 | /* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */ | ||
| 86 | |||
| 87 | #define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */ | ||
| 88 | /* Details in code field. */ | ||
| 89 | |||
| 90 | #define EXC_SYSCALL 7 /* System calls. */ | ||
| 91 | |||
| 92 | #define EXC_MACH_SYSCALL 8 /* Mach system calls. */ | ||
| 93 | |||
| 94 | #define EXC_RPC_ALERT 9 /* RPC alert */ | ||
| 95 | |||
| 96 | #define EXC_CRASH 10 /* Abnormal process exit */ | ||
| 97 | |||
| 98 | #define EXC_RESOURCE 11 /* Hit resource consumption limit */ | ||
| 99 | /* Exact resource is in code field. */ | ||
| 100 | |||
| 101 | #define EXC_GUARD 12 /* Violated guarded resource protections */ | ||
| 102 | |||
| 103 | #define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */ | ||
| 104 | |||
| 105 | #define EXC_CORPSE_VARIANT_BIT 0x100 /* bit set for EXC_*_CORPSE variants of EXC_* */ | ||
| 106 | |||
| 107 | |||
| 108 | /* | ||
| 109 | *	Machine-independent exception behaviors | ||
| 110 | */ | ||
| 111 | |||
| 112 | # define EXCEPTION_DEFAULT 1 | ||
| 113 | /*	Send a catch_exception_raise message including the identity. | ||
| 114 | */ | ||
| 115 | |||
| 116 | # define EXCEPTION_STATE 2 | ||
| 117 | /*	Send a catch_exception_raise_state message including the | ||
| 118 | *	thread state. | ||
| 119 | */ | ||
| 120 | |||
| 121 | # define EXCEPTION_STATE_IDENTITY 3 | ||
| 122 | /*	Send a catch_exception_raise_state_identity message including | ||
| 123 | *	the thread identity and state. | ||
| 124 | */ | ||
| 125 | |||
| 126 | # define EXCEPTION_IDENTITY_PROTECTED 4 | ||
| 127 | /*	Send a catch_exception_raise message including protected task | ||
| 128 | * and thread identity. | ||
| 129 | */ | ||
| 130 | |||
| 131 | #define MACH_EXCEPTION_ERRORS 0x40000000 | ||
| 132 | /*	include additional exception specific errors, not used yet. */ | ||
| 133 | |||
| 134 | #define MACH_EXCEPTION_CODES 0x80000000 | ||
| 135 | /*	Send 64-bit code and subcode in the exception header */ | ||
| 136 | |||
| 137 | #define MACH_EXCEPTION_MASK (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS) | ||
| 138 | /* | ||
| 139 | * Masks for exception definitions, above | ||
| 140 | * bit zero is unused, therefore 1 word = 31 exception types | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS) | ||
| 144 | #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) | ||
| 145 | #define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC) | ||
| 146 | #define EXC_MASK_EMULATION (1 << EXC_EMULATION) | ||
| 147 | #define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE) | ||
| 148 | #define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT) | ||
| 149 | #define EXC_MASK_SYSCALL (1 << EXC_SYSCALL) | ||
| 150 | #define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL) | ||
| 151 | #define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT) | ||
| 152 | #define EXC_MASK_CRASH (1 << EXC_CRASH) | ||
| 153 | #define EXC_MASK_RESOURCE (1 << EXC_RESOURCE) | ||
| 154 | #define EXC_MASK_GUARD (1 << EXC_GUARD) | ||
| 155 | #define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY) | ||
| 156 | |||
| 157 | #define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ | ||
| 158 | 	 EXC_MASK_BAD_INSTRUCTION | \ | ||
| 159 | 	 EXC_MASK_ARITHMETIC | \ | ||
| 160 | 	 EXC_MASK_EMULATION | \ | ||
| 161 | 	 EXC_MASK_SOFTWARE | \ | ||
| 162 | 	 EXC_MASK_BREAKPOINT | \ | ||
| 163 | 	 EXC_MASK_SYSCALL | \ | ||
| 164 | 	 EXC_MASK_MACH_SYSCALL | \ | ||
| 165 | 	 EXC_MASK_RPC_ALERT | \ | ||
| 166 | 	 EXC_MASK_RESOURCE | \ | ||
| 167 | 	 EXC_MASK_GUARD | \ | ||
| 168 | 	 EXC_MASK_MACHINE) | ||
| 169 | |||
| 170 | |||
| 171 | #define FIRST_EXCEPTION 1 /* ZERO is illegal */ | ||
| 172 | |||
| 173 | /* | ||
| 174 | * Machine independent codes for EXC_SOFTWARE | ||
| 175 | * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) | ||
| 176 | * 0x10000 - 0x10002 in use for unix signals | ||
| 177 | * 0x20000 - 0x2FFFF reserved for MACF | ||
| 178 | */ | ||
| 179 | #define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */ | ||
| 180 | |||
| 181 | #define EXC_MACF_MIN 0x20000 /* MACF exceptions */ | ||
| 182 | #define EXC_MACF_MAX 0x2FFFF | ||
| 183 | |||
| 184 | #ifndef ASSEMBLER | ||
| 185 | |||
| 186 | #include <mach/port.h> | ||
| 187 | #include <mach/thread_status.h> | ||
| 188 | #include <mach/machine/vm_types.h> | ||
| 189 | #include <mach_debug/ipc_info.h> | ||
| 190 | /* | ||
| 191 | * Exported types | ||
| 192 | */ | ||
| 193 | |||
| 194 | typedef int exception_type_t; | ||
| 195 | typedef integer_t exception_data_type_t; | ||
| 196 | typedef int64_t mach_exception_data_type_t; | ||
| 197 | typedef int exception_behavior_t; | ||
| 198 | typedef exception_data_type_t *exception_data_t; | ||
| 199 | typedef mach_exception_data_type_t *mach_exception_data_t; | ||
| 200 | typedef unsigned int exception_mask_t; | ||
| 201 | typedef exception_mask_t *exception_mask_array_t; | ||
| 202 | typedef exception_behavior_t *exception_behavior_array_t; | ||
| 203 | typedef thread_state_flavor_t *exception_flavor_array_t; | ||
| 204 | typedef mach_port_t *exception_port_array_t; | ||
| 205 | typedef ipc_info_port_t *exception_port_info_array_t; | ||
| 206 | typedef mach_exception_data_type_t mach_exception_code_t; | ||
| 207 | typedef mach_exception_data_type_t mach_exception_subcode_t; | ||
| 208 | |||
| 209 | #endif /* ASSEMBLER */ | ||
| 210 | |||
| 211 | #endif /* _MACH_EXCEPTION_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/host_priv.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	host_priv_MSG_COUNT	26 | 52 | #define	host_priv_MSG_COUNT	26 |
| 53 | #endif	/* host_priv_MSG_COUNT */ | 53 | #endif	/* host_priv_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/host_security.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	host_security_MSG_COUNT	2 | 52 | #define	host_security_MSG_COUNT	2 |
| 53 | #endif	/* host_security_MSG_COUNT */ | 53 | #endif	/* host_security_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/kern_return.h created+346| ... | @@ -0,0 +1,346 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	h/kern_return.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr. | ||
| 61 | *	Date:	1985 | ||
| 62 | * | ||
| 63 | *	Kernel return codes. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_KERN_RETURN_H_ | ||
| 68 | #define _MACH_KERN_RETURN_H_ | ||
| 69 | |||
| 70 | #include <mach/machine/kern_return.h> | ||
| 71 | |||
| 72 | #define KERN_SUCCESS 0 | ||
| 73 | |||
| 74 | #define KERN_INVALID_ADDRESS 1 | ||
| 75 | /* Specified address is not currently valid. | ||
| 76 | */ | ||
| 77 | |||
| 78 | #define KERN_PROTECTION_FAILURE 2 | ||
| 79 | /* Specified memory is valid, but does not permit the | ||
| 80 | * required forms of access. | ||
| 81 | */ | ||
| 82 | |||
| 83 | #define KERN_NO_SPACE 3 | ||
| 84 | /* The address range specified is already in use, or | ||
| 85 | * no address range of the size specified could be | ||
| 86 | * found. | ||
| 87 | */ | ||
| 88 | |||
| 89 | #define KERN_INVALID_ARGUMENT 4 | ||
| 90 | /* The function requested was not applicable to this | ||
| 91 | * type of argument, or an argument is invalid | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define KERN_FAILURE 5 | ||
| 95 | /* The function could not be performed. A catch-all. | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define KERN_RESOURCE_SHORTAGE 6 | ||
| 99 | /* A system resource could not be allocated to fulfill | ||
| 100 | * this request. This failure may not be permanent. | ||
| 101 | */ | ||
| 102 | |||
| 103 | #define KERN_NOT_RECEIVER 7 | ||
| 104 | /* The task in question does not hold receive rights | ||
| 105 | * for the port argument. | ||
| 106 | */ | ||
| 107 | |||
| 108 | #define KERN_NO_ACCESS 8 | ||
| 109 | /* Bogus access restriction. | ||
| 110 | */ | ||
| 111 | |||
| 112 | #define KERN_MEMORY_FAILURE 9 | ||
| 113 | /* During a page fault, the target address refers to a | ||
| 114 | * memory object that has been destroyed. This | ||
| 115 | * failure is permanent. | ||
| 116 | */ | ||
| 117 | |||
| 118 | #define KERN_MEMORY_ERROR 10 | ||
| 119 | /* During a page fault, the memory object indicated | ||
| 120 | * that the data could not be returned. This failure | ||
| 121 | * may be temporary; future attempts to access this | ||
| 122 | * same data may succeed, as defined by the memory | ||
| 123 | * object. | ||
| 124 | */ | ||
| 125 | |||
| 126 | #define KERN_ALREADY_IN_SET 11 | ||
| 127 | /* The receive right is already a member of the portset. | ||
| 128 | */ | ||
| 129 | |||
| 130 | #define KERN_NOT_IN_SET 12 | ||
| 131 | /* The receive right is not a member of a port set. | ||
| 132 | */ | ||
| 133 | |||
| 134 | #define KERN_NAME_EXISTS 13 | ||
| 135 | /* The name already denotes a right in the task. | ||
| 136 | */ | ||
| 137 | |||
| 138 | #define KERN_ABORTED 14 | ||
| 139 | /* The operation was aborted. Ipc code will | ||
| 140 | * catch this and reflect it as a message error. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define KERN_INVALID_NAME 15 | ||
| 144 | /* The name doesn't denote a right in the task. | ||
| 145 | */ | ||
| 146 | |||
| 147 | #define KERN_INVALID_TASK 16 | ||
| 148 | /* Target task isn't an active task. | ||
| 149 | */ | ||
| 150 | |||
| 151 | #define KERN_INVALID_RIGHT 17 | ||
| 152 | /* The name denotes a right, but not an appropriate right. | ||
| 153 | */ | ||
| 154 | |||
| 155 | #define KERN_INVALID_VALUE 18 | ||
| 156 | /* A blatant range error. | ||
| 157 | */ | ||
| 158 | |||
| 159 | #define KERN_UREFS_OVERFLOW 19 | ||
| 160 | /* Operation would overflow limit on user-references. | ||
| 161 | */ | ||
| 162 | |||
| 163 | #define KERN_INVALID_CAPABILITY 20 | ||
| 164 | /* The supplied (port) capability is improper. | ||
| 165 | */ | ||
| 166 | |||
| 167 | #define KERN_RIGHT_EXISTS 21 | ||
| 168 | /* The task already has send or receive rights | ||
| 169 | * for the port under another name. | ||
| 170 | */ | ||
| 171 | |||
| 172 | #define KERN_INVALID_HOST 22 | ||
| 173 | /* Target host isn't actually a host. | ||
| 174 | */ | ||
| 175 | |||
| 176 | #define KERN_MEMORY_PRESENT 23 | ||
| 177 | /* An attempt was made to supply "precious" data | ||
| 178 | * for memory that is already present in a | ||
| 179 | * memory object. | ||
| 180 | */ | ||
| 181 | |||
| 182 | #define KERN_MEMORY_DATA_MOVED 24 | ||
| 183 | /* A page was requested of a memory manager via | ||
| 184 | * memory_object_data_request for an object using | ||
| 185 | * a MEMORY_OBJECT_COPY_CALL strategy, with the | ||
| 186 | * VM_PROT_WANTS_COPY flag being used to specify | ||
| 187 | * that the page desired is for a copy of the | ||
| 188 | * object, and the memory manager has detected | ||
| 189 | * the page was pushed into a copy of the object | ||
| 190 | * while the kernel was walking the shadow chain | ||
| 191 | * from the copy to the object. This error code | ||
| 192 | * is delivered via memory_object_data_error | ||
| 193 | * and is handled by the kernel (it forces the | ||
| 194 | * kernel to restart the fault). It will not be | ||
| 195 | * seen by users. | ||
| 196 | */ | ||
| 197 | |||
| 198 | #define KERN_MEMORY_RESTART_COPY 25 | ||
| 199 | /* A strategic copy was attempted of an object | ||
| 200 | * upon which a quicker copy is now possible. | ||
| 201 | * The caller should retry the copy using | ||
| 202 | * vm_object_copy_quickly. This error code | ||
| 203 | * is seen only by the kernel. | ||
| 204 | */ | ||
| 205 | |||
| 206 | #define KERN_INVALID_PROCESSOR_SET 26 | ||
| 207 | /* An argument applied to assert processor set privilege | ||
| 208 | * was not a processor set control port. | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define KERN_POLICY_LIMIT 27 | ||
| 212 | /* The specified scheduling attributes exceed the thread's | ||
| 213 | * limits. | ||
| 214 | */ | ||
| 215 | |||
| 216 | #define KERN_INVALID_POLICY 28 | ||
| 217 | /* The specified scheduling policy is not currently | ||
| 218 | * enabled for the processor set. | ||
| 219 | */ | ||
| 220 | |||
| 221 | #define KERN_INVALID_OBJECT 29 | ||
| 222 | /* The external memory manager failed to initialize the | ||
| 223 | * memory object. | ||
| 224 | */ | ||
| 225 | |||
| 226 | #define KERN_ALREADY_WAITING 30 | ||
| 227 | /* A thread is attempting to wait for an event for which | ||
| 228 | * there is already a waiting thread. | ||
| 229 | */ | ||
| 230 | |||
| 231 | #define KERN_DEFAULT_SET 31 | ||
| 232 | /* An attempt was made to destroy the default processor | ||
| 233 | * set. | ||
| 234 | */ | ||
| 235 | |||
| 236 | #define KERN_EXCEPTION_PROTECTED 32 | ||
| 237 | /* An attempt was made to fetch an exception port that is | ||
| 238 | * protected, or to abort a thread while processing a | ||
| 239 | * protected exception. | ||
| 240 | */ | ||
| 241 | |||
| 242 | #define KERN_INVALID_LEDGER 33 | ||
| 243 | /* A ledger was required but not supplied. | ||
| 244 | */ | ||
| 245 | |||
| 246 | #define KERN_INVALID_MEMORY_CONTROL 34 | ||
| 247 | /* The port was not a memory cache control port. | ||
| 248 | */ | ||
| 249 | |||
| 250 | #define KERN_INVALID_SECURITY 35 | ||
| 251 | /* An argument supplied to assert security privilege | ||
| 252 | * was not a host security port. | ||
| 253 | */ | ||
| 254 | |||
| 255 | #define KERN_NOT_DEPRESSED 36 | ||
| 256 | /* thread_depress_abort was called on a thread which | ||
| 257 | * was not currently depressed. | ||
| 258 | */ | ||
| 259 | |||
| 260 | #define KERN_TERMINATED 37 | ||
| 261 | /* Object has been terminated and is no longer available | ||
| 262 | */ | ||
| 263 | |||
| 264 | #define KERN_LOCK_SET_DESTROYED 38 | ||
| 265 | /* Lock set has been destroyed and is no longer available. | ||
| 266 | */ | ||
| 267 | |||
| 268 | #define KERN_LOCK_UNSTABLE 39 | ||
| 269 | /* The thread holding the lock terminated before releasing | ||
| 270 | * the lock | ||
| 271 | */ | ||
| 272 | |||
| 273 | #define KERN_LOCK_OWNED 40 | ||
| 274 | /* The lock is already owned by another thread | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define KERN_LOCK_OWNED_SELF 41 | ||
| 278 | /* The lock is already owned by the calling thread | ||
| 279 | */ | ||
| 280 | |||
| 281 | #define KERN_SEMAPHORE_DESTROYED 42 | ||
| 282 | /* Semaphore has been destroyed and is no longer available. | ||
| 283 | */ | ||
| 284 | |||
| 285 | #define KERN_RPC_SERVER_TERMINATED 43 | ||
| 286 | /* Return from RPC indicating the target server was | ||
| 287 | * terminated before it successfully replied | ||
| 288 | */ | ||
| 289 | |||
| 290 | #define KERN_RPC_TERMINATE_ORPHAN 44 | ||
| 291 | /* Terminate an orphaned activation. | ||
| 292 | */ | ||
| 293 | |||
| 294 | #define KERN_RPC_CONTINUE_ORPHAN 45 | ||
| 295 | /* Allow an orphaned activation to continue executing. | ||
| 296 | */ | ||
| 297 | |||
| 298 | #define KERN_NOT_SUPPORTED 46 | ||
| 299 | /* Empty thread activation (No thread linked to it) | ||
| 300 | */ | ||
| 301 | |||
| 302 | #define KERN_NODE_DOWN 47 | ||
| 303 | /* Remote node down or inaccessible. | ||
| 304 | */ | ||
| 305 | |||
| 306 | #define KERN_NOT_WAITING 48 | ||
| 307 | /* A signalled thread was not actually waiting. */ | ||
| 308 | |||
| 309 | #define KERN_OPERATION_TIMED_OUT 49 | ||
| 310 | /* Some thread-oriented operation (semaphore_wait) timed out | ||
| 311 | */ | ||
| 312 | |||
| 313 | #define KERN_CODESIGN_ERROR 50 | ||
| 314 | /* During a page fault, indicates that the page was rejected | ||
| 315 | * as a result of a signature check. | ||
| 316 | */ | ||
| 317 | |||
| 318 | #define KERN_POLICY_STATIC 51 | ||
| 319 | /* The requested property cannot be changed at this time. | ||
| 320 | */ | ||
| 321 | |||
| 322 | #define KERN_INSUFFICIENT_BUFFER_SIZE 52 | ||
| 323 | /* The provided buffer is of insufficient size for the requested data. | ||
| 324 | */ | ||
| 325 | |||
| 326 | #define KERN_DENIED 53 | ||
| 327 | /* Denied by security policy | ||
| 328 | */ | ||
| 329 | |||
| 330 | #define KERN_MISSING_KC 54 | ||
| 331 | /* The KC on which the function is operating is missing | ||
| 332 | */ | ||
| 333 | |||
| 334 | #define KERN_INVALID_KC 55 | ||
| 335 | /* The KC on which the function is operating is invalid | ||
| 336 | */ | ||
| 337 | |||
| 338 | #define KERN_NOT_FOUND 56 | ||
| 339 | /* A search or query operation did not return a result | ||
| 340 | */ | ||
| 341 | |||
| 342 | #define KERN_RETURN_MAX 0x100 | ||
| 343 | /* Maximum return value allowable | ||
| 344 | */ | ||
| 345 | |||
| 346 | #endif /* _MACH_KERN_RETURN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/lock_set.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	lock_set_MSG_COUNT	6 | 52 | #define	lock_set_MSG_COUNT	6 |
| 53 | #endif	/* lock_set_MSG_COUNT */ | 53 | #endif	/* lock_set_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/mach.h-4| ... | @@ -85,10 +85,6 @@ __BEGIN_DECLS | ... | @@ -85,10 +85,6 @@ __BEGIN_DECLS |
| 85 | extern void panic_init(mach_port_t); | 85 | extern void panic_init(mach_port_t); |
| 86 | extern void panic(const char *, ...); | 86 | extern void panic(const char *, ...); |
| 87 | 87 | ||
| 88 | extern void safe_gets(char *, | ||
| 89 | char *, | ||
| 90 | int); | ||
| 91 | |||
| 92 | extern void slot_name(cpu_type_t, | 88 | extern void slot_name(cpu_type_t, |
| 93 | cpu_subtype_t, | 89 | cpu_subtype_t, |
| 94 | char **, | 90 | char **, |
lib/libc/include/any-macos-any/mach/mach_host.h+8-14| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	mach_host_MSG_COUNT	35 | 52 | #define	mach_host_MSG_COUNT	35 |
| 53 | #endif	/* mach_host_MSG_COUNT */ | 53 | #endif	/* mach_host_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
| ... | @@ -74,8 +75,7 @@ mig_external | ... | @@ -74,8 +75,7 @@ mig_external |
| 74 | #else | 75 | #else |
| 75 | extern | 76 | extern |
| 76 | #endif	/* mig_external */ | 77 | #endif	/* mig_external */ |
| 77 | __WATCHOS_PROHIBITED | 78 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 78 | __TVOS_PROHIBITED | ||
| 79 | kern_return_t host_info | 79 | kern_return_t host_info |
| 80 | ( | 80 | ( |
| 81 | 	host_t host, | 81 | 	host_t host, |
| ... | @@ -251,8 +251,7 @@ mig_external | ... | @@ -251,8 +251,7 @@ mig_external |
| 251 | #else | 251 | #else |
| 252 | extern | 252 | extern |
| 253 | #endif	/* mig_external */ | 253 | #endif	/* mig_external */ |
| 254 | __WATCHOS_PROHIBITED | 254 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 255 | __TVOS_PROHIBITED | ||
| 256 | kern_return_t host_request_notification | 255 | kern_return_t host_request_notification |
| 257 | ( | 256 | ( |
| 258 | 	host_t host, | 257 | 	host_t host, |
| ... | @@ -308,8 +307,7 @@ mig_external | ... | @@ -308,8 +307,7 @@ mig_external |
| 308 | #else | 307 | #else |
| 309 | extern | 308 | extern |
| 310 | #endif	/* mig_external */ | 309 | #endif	/* mig_external */ |
| 311 | __WATCHOS_PROHIBITED | 310 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 312 | __TVOS_PROHIBITED | ||
| 313 | kern_return_t host_create_mach_voucher | 311 | kern_return_t host_create_mach_voucher |
| 314 | ( | 312 | ( |
| 315 | 	host_t host, | 313 | 	host_t host, |
| ... | @@ -324,8 +322,7 @@ mig_external | ... | @@ -324,8 +322,7 @@ mig_external |
| 324 | #else | 322 | #else |
| 325 | extern | 323 | extern |
| 326 | #endif	/* mig_external */ | 324 | #endif	/* mig_external */ |
| 327 | __WATCHOS_PROHIBITED | 325 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 328 | __TVOS_PROHIBITED | ||
| 329 | kern_return_t host_register_mach_voucher_attr_manager | 326 | kern_return_t host_register_mach_voucher_attr_manager |
| 330 | ( | 327 | ( |
| 331 | 	host_t host, | 328 | 	host_t host, |
| ... | @@ -341,8 +338,7 @@ mig_external | ... | @@ -341,8 +338,7 @@ mig_external |
| 341 | #else | 338 | #else |
| 342 | extern | 339 | extern |
| 343 | #endif	/* mig_external */ | 340 | #endif	/* mig_external */ |
| 344 | __WATCHOS_PROHIBITED | 341 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 345 | __TVOS_PROHIBITED | ||
| 346 | kern_return_t host_register_well_known_mach_voucher_attr_manager | 342 | kern_return_t host_register_well_known_mach_voucher_attr_manager |
| 347 | ( | 343 | ( |
| 348 | 	host_t host, | 344 | 	host_t host, |
| ... | @@ -358,8 +354,7 @@ mig_external | ... | @@ -358,8 +354,7 @@ mig_external |
| 358 | #else | 354 | #else |
| 359 | extern | 355 | extern |
| 360 | #endif	/* mig_external */ | 356 | #endif	/* mig_external */ |
| 361 | __WATCHOS_PROHIBITED | 357 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 362 | __TVOS_PROHIBITED | ||
| 363 | kern_return_t host_set_atm_diagnostic_flag | 358 | kern_return_t host_set_atm_diagnostic_flag |
| 364 | ( | 359 | ( |
| 365 | 	host_t host, | 360 | 	host_t host, |
| ... | @@ -372,8 +367,7 @@ mig_external | ... | @@ -372,8 +367,7 @@ mig_external |
| 372 | #else | 367 | #else |
| 373 | extern | 368 | extern |
| 374 | #endif	/* mig_external */ | 369 | #endif	/* mig_external */ |
| 375 | __WATCHOS_PROHIBITED | 370 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 376 | __TVOS_PROHIBITED | ||
| 377 | kern_return_t host_get_atm_diagnostic_flag | 371 | kern_return_t host_get_atm_diagnostic_flag |
| 378 | ( | 372 | ( |
| 379 | 	host_t host, | 373 | 	host_t host, |
lib/libc/include/any-macos-any/mach/mach_init.h deleted-116| ... | @@ -1,116 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Mach Operating System | ||
| 30 | * Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University | ||
| 31 | * All Rights Reserved. | ||
| 32 | * | ||
| 33 | * Permission to use, copy, modify and distribute this software and its | ||
| 34 | * documentation is hereby granted, provided that both the copyright | ||
| 35 | * notice and this permission notice appear in all copies of the | ||
| 36 | * software, derivative works or modified versions, and any portions | ||
| 37 | * thereof, and that both notices appear in supporting documentation. | ||
| 38 | * | ||
| 39 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 40 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 41 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | * Carnegie Mellon requests users of this software to return to | ||
| 44 | * | ||
| 45 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 46 | * School of Computer Science | ||
| 47 | * Carnegie Mellon University | ||
| 48 | * Pittsburgh PA 15213-3890 | ||
| 49 | * | ||
| 50 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 51 | * the rights to redistribute these changes. | ||
| 52 | */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | *	Items provided by the Mach environment initialization. | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _MACH_INIT_ | ||
| 59 | #define _MACH_INIT_ 1 | ||
| 60 | |||
| 61 | #include <mach/mach_types.h> | ||
| 62 | #include <mach/vm_page_size.h> | ||
| 63 | #include <stdarg.h> | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | |||
| 67 | #ifndef KERNEL | ||
| 68 | #include <Availability.h> | ||
| 69 | #endif | ||
| 70 | |||
| 71 | /* | ||
| 72 | *	Kernel-related ports; how a task/thread controls itself | ||
| 73 | */ | ||
| 74 | |||
| 75 | __BEGIN_DECLS | ||
| 76 | extern mach_port_t mach_host_self(void); | ||
| 77 | extern mach_port_t mach_thread_self(void); | ||
| 78 | __API_AVAILABLE(macos(11.3), ios(14.5), tvos(14.5), watchos(7.3)) | ||
| 79 | extern boolean_t mach_task_is_self(task_name_t task); | ||
| 80 | extern kern_return_t host_page_size(host_t, vm_size_t *); | ||
| 81 | |||
| 82 | extern mach_port_t mach_task_self_; | ||
| 83 | #define mach_task_self() mach_task_self_ | ||
| 84 | #define current_task() mach_task_self() | ||
| 85 | |||
| 86 | __END_DECLS | ||
| 87 | #include <mach/mach_traps.h> | ||
| 88 | __BEGIN_DECLS | ||
| 89 | |||
| 90 | /* | ||
| 91 | *	Other important ports in the Mach user environment | ||
| 92 | */ | ||
| 93 | |||
| 94 | extern mach_port_t bootstrap_port; | ||
| 95 | |||
| 96 | /* | ||
| 97 | *	Where these ports occur in the "mach_ports_register" | ||
| 98 | *	collection... only servers or the runtime library need know. | ||
| 99 | */ | ||
| 100 | |||
| 101 | #define NAME_SERVER_SLOT 0 | ||
| 102 | #define ENVIRONMENT_SLOT 1 | ||
| 103 | #define SERVICE_SLOT 2 | ||
| 104 | |||
| 105 | #define MACH_PORTS_SLOTS_USED 3 | ||
| 106 | |||
| 107 | /* | ||
| 108 | *	fprintf_stderr uses vprintf_stderr_func to produce | ||
| 109 | *	error messages, this can be overridden by a user | ||
| 110 | *	application to point to a user-specified output function | ||
| 111 | */ | ||
| 112 | extern int (*vprintf_stderr_func)(const char *format, va_list ap); | ||
| 113 | |||
| 114 | __END_DECLS | ||
| 115 | |||
| 116 | #endif /* _MACH_INIT_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/mach_port.h created+1939| ... | @@ -0,0 +1,1939 @@ | ||
| 1 | #ifndef	_mach_port_user_ | ||
| 2 | #define	_mach_port_user_ | ||
| 3 | |||
| 4 | /* Module mach_port */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	mach_port_MSG_COUNT | ||
| 52 | #define	mach_port_MSG_COUNT	43 | ||
| 53 | #endif	/* mach_port_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine mach_port_names */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t mach_port_names | ||
| 77 | ( | ||
| 78 | 	ipc_space_t task, | ||
| 79 | 	mach_port_name_array_t *names, | ||
| 80 | 	mach_msg_type_number_t *namesCnt, | ||
| 81 | 	mach_port_type_array_t *types, | ||
| 82 | 	mach_msg_type_number_t *typesCnt | ||
| 83 | ); | ||
| 84 | |||
| 85 | /* Routine mach_port_type */ | ||
| 86 | #ifdef	mig_external | ||
| 87 | mig_external | ||
| 88 | #else | ||
| 89 | extern | ||
| 90 | #endif	/* mig_external */ | ||
| 91 | kern_return_t mach_port_type | ||
| 92 | ( | ||
| 93 | 	ipc_space_t task, | ||
| 94 | 	mach_port_name_t name, | ||
| 95 | 	mach_port_type_t *ptype | ||
| 96 | ); | ||
| 97 | |||
| 98 | /* Routine mach_port_rename */ | ||
| 99 | #ifdef	mig_external | ||
| 100 | mig_external | ||
| 101 | #else | ||
| 102 | extern | ||
| 103 | #endif	/* mig_external */ | ||
| 104 | kern_return_t mach_port_rename | ||
| 105 | ( | ||
| 106 | 	ipc_space_t task, | ||
| 107 | 	mach_port_name_t old_name, | ||
| 108 | 	mach_port_name_t new_name | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine mach_port_allocate_name */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 118 | kern_return_t mach_port_allocate_name | ||
| 119 | ( | ||
| 120 | 	ipc_space_t task, | ||
| 121 | 	mach_port_right_t right, | ||
| 122 | 	mach_port_name_t name | ||
| 123 | ); | ||
| 124 | |||
| 125 | /* Routine mach_port_allocate */ | ||
| 126 | #ifdef	mig_external | ||
| 127 | mig_external | ||
| 128 | #else | ||
| 129 | extern | ||
| 130 | #endif	/* mig_external */ | ||
| 131 | kern_return_t mach_port_allocate | ||
| 132 | ( | ||
| 133 | 	ipc_space_t task, | ||
| 134 | 	mach_port_right_t right, | ||
| 135 | 	mach_port_name_t *name | ||
| 136 | ); | ||
| 137 | |||
| 138 | /* Routine mach_port_destroy */ | ||
| 139 | #ifdef	mig_external | ||
| 140 | mig_external | ||
| 141 | #else | ||
| 142 | extern | ||
| 143 | #endif	/* mig_external */ | ||
| 144 | __API_DEPRECATED("Inherently unsafe API: instead manage rights with " | ||
| 145 | "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()", | ||
| 146 | macos(10.0, 12.0), ios(2.0, 15.0), tvos(9.0, 15.0), watchos(2.0, 8.0)) | ||
| 147 | kern_return_t mach_port_destroy | ||
| 148 | ( | ||
| 149 | 	ipc_space_t task, | ||
| 150 | 	mach_port_name_t name | ||
| 151 | ); | ||
| 152 | |||
| 153 | /* Routine mach_port_deallocate */ | ||
| 154 | #ifdef	mig_external | ||
| 155 | mig_external | ||
| 156 | #else | ||
| 157 | extern | ||
| 158 | #endif	/* mig_external */ | ||
| 159 | kern_return_t mach_port_deallocate | ||
| 160 | ( | ||
| 161 | 	ipc_space_t task, | ||
| 162 | 	mach_port_name_t name | ||
| 163 | ); | ||
| 164 | |||
| 165 | /* Routine mach_port_get_refs */ | ||
| 166 | #ifdef	mig_external | ||
| 167 | mig_external | ||
| 168 | #else | ||
| 169 | extern | ||
| 170 | #endif	/* mig_external */ | ||
| 171 | kern_return_t mach_port_get_refs | ||
| 172 | ( | ||
| 173 | 	ipc_space_t task, | ||
| 174 | 	mach_port_name_t name, | ||
| 175 | 	mach_port_right_t right, | ||
| 176 | 	mach_port_urefs_t *refs | ||
| 177 | ); | ||
| 178 | |||
| 179 | /* Routine mach_port_mod_refs */ | ||
| 180 | #ifdef	mig_external | ||
| 181 | mig_external | ||
| 182 | #else | ||
| 183 | extern | ||
| 184 | #endif	/* mig_external */ | ||
| 185 | kern_return_t mach_port_mod_refs | ||
| 186 | ( | ||
| 187 | 	ipc_space_t task, | ||
| 188 | 	mach_port_name_t name, | ||
| 189 | 	mach_port_right_t right, | ||
| 190 | 	mach_port_delta_t delta | ||
| 191 | ); | ||
| 192 | |||
| 193 | /* Routine mach_port_peek */ | ||
| 194 | #ifdef	mig_external | ||
| 195 | mig_external | ||
| 196 | #else | ||
| 197 | extern | ||
| 198 | #endif	/* mig_external */ | ||
| 199 | kern_return_t mach_port_peek | ||
| 200 | ( | ||
| 201 | 	ipc_space_t task, | ||
| 202 | 	mach_port_name_t name, | ||
| 203 | 	mach_msg_trailer_type_t trailer_type, | ||
| 204 | 	mach_port_seqno_t *request_seqnop, | ||
| 205 | 	mach_msg_size_t *msg_sizep, | ||
| 206 | 	mach_msg_id_t *msg_idp, | ||
| 207 | 	mach_msg_trailer_info_t trailer_infop, | ||
| 208 | 	mach_msg_type_number_t *trailer_infopCnt | ||
| 209 | ); | ||
| 210 | |||
| 211 | /* Routine mach_port_set_mscount */ | ||
| 212 | #ifdef	mig_external | ||
| 213 | mig_external | ||
| 214 | #else | ||
| 215 | extern | ||
| 216 | #endif	/* mig_external */ | ||
| 217 | kern_return_t mach_port_set_mscount | ||
| 218 | ( | ||
| 219 | 	ipc_space_t task, | ||
| 220 | 	mach_port_name_t name, | ||
| 221 | 	mach_port_mscount_t mscount | ||
| 222 | ); | ||
| 223 | |||
| 224 | /* Routine mach_port_get_set_status */ | ||
| 225 | #ifdef	mig_external | ||
| 226 | mig_external | ||
| 227 | #else | ||
| 228 | extern | ||
| 229 | #endif	/* mig_external */ | ||
| 230 | kern_return_t mach_port_get_set_status | ||
| 231 | ( | ||
| 232 | 	ipc_space_read_t task, | ||
| 233 | 	mach_port_name_t name, | ||
| 234 | 	mach_port_name_array_t *members, | ||
| 235 | 	mach_msg_type_number_t *membersCnt | ||
| 236 | ); | ||
| 237 | |||
| 238 | /* Routine mach_port_move_member */ | ||
| 239 | #ifdef	mig_external | ||
| 240 | mig_external | ||
| 241 | #else | ||
| 242 | extern | ||
| 243 | #endif	/* mig_external */ | ||
| 244 | kern_return_t mach_port_move_member | ||
| 245 | ( | ||
| 246 | 	ipc_space_t task, | ||
| 247 | 	mach_port_name_t member, | ||
| 248 | 	mach_port_name_t after | ||
| 249 | ); | ||
| 250 | |||
| 251 | /* Routine mach_port_request_notification */ | ||
| 252 | #ifdef	mig_external | ||
| 253 | mig_external | ||
| 254 | #else | ||
| 255 | extern | ||
| 256 | #endif	/* mig_external */ | ||
| 257 | kern_return_t mach_port_request_notification | ||
| 258 | ( | ||
| 259 | 	ipc_space_t task, | ||
| 260 | 	mach_port_name_t name, | ||
| 261 | 	mach_msg_id_t msgid, | ||
| 262 | 	mach_port_mscount_t sync, | ||
| 263 | 	mach_port_t notify, | ||
| 264 | 	mach_msg_type_name_t notifyPoly, | ||
| 265 | 	mach_port_t *previous | ||
| 266 | ); | ||
| 267 | |||
| 268 | /* Routine mach_port_insert_right */ | ||
| 269 | #ifdef	mig_external | ||
| 270 | mig_external | ||
| 271 | #else | ||
| 272 | extern | ||
| 273 | #endif	/* mig_external */ | ||
| 274 | kern_return_t mach_port_insert_right | ||
| 275 | ( | ||
| 276 | 	ipc_space_t task, | ||
| 277 | 	mach_port_name_t name, | ||
| 278 | 	mach_port_t poly, | ||
| 279 | 	mach_msg_type_name_t polyPoly | ||
| 280 | ); | ||
| 281 | |||
| 282 | /* Routine mach_port_extract_right */ | ||
| 283 | #ifdef	mig_external | ||
| 284 | mig_external | ||
| 285 | #else | ||
| 286 | extern | ||
| 287 | #endif	/* mig_external */ | ||
| 288 | kern_return_t mach_port_extract_right | ||
| 289 | ( | ||
| 290 | 	ipc_space_t task, | ||
| 291 | 	mach_port_name_t name, | ||
| 292 | 	mach_msg_type_name_t msgt_name, | ||
| 293 | 	mach_port_t *poly, | ||
| 294 | 	mach_msg_type_name_t *polyPoly | ||
| 295 | ); | ||
| 296 | |||
| 297 | /* Routine mach_port_set_seqno */ | ||
| 298 | #ifdef	mig_external | ||
| 299 | mig_external | ||
| 300 | #else | ||
| 301 | extern | ||
| 302 | #endif	/* mig_external */ | ||
| 303 | kern_return_t mach_port_set_seqno | ||
| 304 | ( | ||
| 305 | 	ipc_space_t task, | ||
| 306 | 	mach_port_name_t name, | ||
| 307 | 	mach_port_seqno_t seqno | ||
| 308 | ); | ||
| 309 | |||
| 310 | /* Routine mach_port_get_attributes */ | ||
| 311 | #ifdef	mig_external | ||
| 312 | mig_external | ||
| 313 | #else | ||
| 314 | extern | ||
| 315 | #endif	/* mig_external */ | ||
| 316 | kern_return_t mach_port_get_attributes | ||
| 317 | ( | ||
| 318 | 	ipc_space_read_t task, | ||
| 319 | 	mach_port_name_t name, | ||
| 320 | 	mach_port_flavor_t flavor, | ||
| 321 | 	mach_port_info_t port_info_out, | ||
| 322 | 	mach_msg_type_number_t *port_info_outCnt | ||
| 323 | ); | ||
| 324 | |||
| 325 | /* Routine mach_port_set_attributes */ | ||
| 326 | #ifdef	mig_external | ||
| 327 | mig_external | ||
| 328 | #else | ||
| 329 | extern | ||
| 330 | #endif	/* mig_external */ | ||
| 331 | kern_return_t mach_port_set_attributes | ||
| 332 | ( | ||
| 333 | 	ipc_space_t task, | ||
| 334 | 	mach_port_name_t name, | ||
| 335 | 	mach_port_flavor_t flavor, | ||
| 336 | 	mach_port_info_t port_info, | ||
| 337 | 	mach_msg_type_number_t port_infoCnt | ||
| 338 | ); | ||
| 339 | |||
| 340 | /* Routine mach_port_allocate_qos */ | ||
| 341 | #ifdef	mig_external | ||
| 342 | mig_external | ||
| 343 | #else | ||
| 344 | extern | ||
| 345 | #endif	/* mig_external */ | ||
| 346 | kern_return_t mach_port_allocate_qos | ||
| 347 | ( | ||
| 348 | 	ipc_space_t task, | ||
| 349 | 	mach_port_right_t right, | ||
| 350 | 	mach_port_qos_t *qos, | ||
| 351 | 	mach_port_name_t *name | ||
| 352 | ); | ||
| 353 | |||
| 354 | /* Routine mach_port_allocate_full */ | ||
| 355 | #ifdef	mig_external | ||
| 356 | mig_external | ||
| 357 | #else | ||
| 358 | extern | ||
| 359 | #endif	/* mig_external */ | ||
| 360 | kern_return_t mach_port_allocate_full | ||
| 361 | ( | ||
| 362 | 	ipc_space_t task, | ||
| 363 | 	mach_port_right_t right, | ||
| 364 | 	mach_port_t proto, | ||
| 365 | 	mach_port_qos_t *qos, | ||
| 366 | 	mach_port_name_t *name | ||
| 367 | ); | ||
| 368 | |||
| 369 | /* Routine task_set_port_space */ | ||
| 370 | #ifdef	mig_external | ||
| 371 | mig_external | ||
| 372 | #else | ||
| 373 | extern | ||
| 374 | #endif	/* mig_external */ | ||
| 375 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 376 | kern_return_t task_set_port_space | ||
| 377 | ( | ||
| 378 | 	ipc_space_t task, | ||
| 379 | 	int table_entries | ||
| 380 | ); | ||
| 381 | |||
| 382 | /* Routine mach_port_get_srights */ | ||
| 383 | #ifdef	mig_external | ||
| 384 | mig_external | ||
| 385 | #else | ||
| 386 | extern | ||
| 387 | #endif	/* mig_external */ | ||
| 388 | kern_return_t mach_port_get_srights | ||
| 389 | ( | ||
| 390 | 	ipc_space_t task, | ||
| 391 | 	mach_port_name_t name, | ||
| 392 | 	mach_port_rights_t *srights | ||
| 393 | ); | ||
| 394 | |||
| 395 | /* Routine mach_port_space_info */ | ||
| 396 | #ifdef	mig_external | ||
| 397 | mig_external | ||
| 398 | #else | ||
| 399 | extern | ||
| 400 | #endif	/* mig_external */ | ||
| 401 | kern_return_t mach_port_space_info | ||
| 402 | ( | ||
| 403 | 	ipc_space_read_t space, | ||
| 404 | 	ipc_info_space_t *space_info, | ||
| 405 | 	ipc_info_name_array_t *table_info, | ||
| 406 | 	mach_msg_type_number_t *table_infoCnt, | ||
| 407 | 	ipc_info_tree_name_array_t *tree_info, | ||
| 408 | 	mach_msg_type_number_t *tree_infoCnt | ||
| 409 | ); | ||
| 410 | |||
| 411 | /* Routine mach_port_dnrequest_info */ | ||
| 412 | #ifdef	mig_external | ||
| 413 | mig_external | ||
| 414 | #else | ||
| 415 | extern | ||
| 416 | #endif	/* mig_external */ | ||
| 417 | kern_return_t mach_port_dnrequest_info | ||
| 418 | ( | ||
| 419 | 	ipc_space_t task, | ||
| 420 | 	mach_port_name_t name, | ||
| 421 | 	unsigned *dnr_total, | ||
| 422 | 	unsigned *dnr_used | ||
| 423 | ); | ||
| 424 | |||
| 425 | /* Routine mach_port_kernel_object */ | ||
| 426 | #ifdef	mig_external | ||
| 427 | mig_external | ||
| 428 | #else | ||
| 429 | extern | ||
| 430 | #endif	/* mig_external */ | ||
| 431 | kern_return_t mach_port_kernel_object | ||
| 432 | ( | ||
| 433 | 	ipc_space_read_t task, | ||
| 434 | 	mach_port_name_t name, | ||
| 435 | 	unsigned *object_type, | ||
| 436 | 	unsigned *object_addr | ||
| 437 | ); | ||
| 438 | |||
| 439 | /* Routine mach_port_insert_member */ | ||
| 440 | #ifdef	mig_external | ||
| 441 | mig_external | ||
| 442 | #else | ||
| 443 | extern | ||
| 444 | #endif	/* mig_external */ | ||
| 445 | kern_return_t mach_port_insert_member | ||
| 446 | ( | ||
| 447 | 	ipc_space_t task, | ||
| 448 | 	mach_port_name_t name, | ||
| 449 | 	mach_port_name_t pset | ||
| 450 | ); | ||
| 451 | |||
| 452 | /* Routine mach_port_extract_member */ | ||
| 453 | #ifdef	mig_external | ||
| 454 | mig_external | ||
| 455 | #else | ||
| 456 | extern | ||
| 457 | #endif	/* mig_external */ | ||
| 458 | kern_return_t mach_port_extract_member | ||
| 459 | ( | ||
| 460 | 	ipc_space_t task, | ||
| 461 | 	mach_port_name_t name, | ||
| 462 | 	mach_port_name_t pset | ||
| 463 | ); | ||
| 464 | |||
| 465 | /* Routine mach_port_get_context */ | ||
| 466 | #ifdef	mig_external | ||
| 467 | mig_external | ||
| 468 | #else | ||
| 469 | extern | ||
| 470 | #endif	/* mig_external */ | ||
| 471 | kern_return_t mach_port_get_context | ||
| 472 | ( | ||
| 473 | 	ipc_space_read_t task, | ||
| 474 | 	mach_port_name_t name, | ||
| 475 | 	mach_port_context_t *context | ||
| 476 | ); | ||
| 477 | |||
| 478 | /* Routine mach_port_set_context */ | ||
| 479 | #ifdef	mig_external | ||
| 480 | mig_external | ||
| 481 | #else | ||
| 482 | extern | ||
| 483 | #endif	/* mig_external */ | ||
| 484 | kern_return_t mach_port_set_context | ||
| 485 | ( | ||
| 486 | 	ipc_space_t task, | ||
| 487 | 	mach_port_name_t name, | ||
| 488 | 	mach_port_context_t context | ||
| 489 | ); | ||
| 490 | |||
| 491 | /* Routine mach_port_kobject */ | ||
| 492 | #ifdef	mig_external | ||
| 493 | mig_external | ||
| 494 | #else | ||
| 495 | extern | ||
| 496 | #endif	/* mig_external */ | ||
| 497 | kern_return_t mach_port_kobject | ||
| 498 | ( | ||
| 499 | 	ipc_space_read_t task, | ||
| 500 | 	mach_port_name_t name, | ||
| 501 | 	natural_t *object_type, | ||
| 502 | 	mach_vm_address_t *object_addr | ||
| 503 | ); | ||
| 504 | |||
| 505 | /* Routine mach_port_construct */ | ||
| 506 | #ifdef	mig_external | ||
| 507 | mig_external | ||
| 508 | #else | ||
| 509 | extern | ||
| 510 | #endif	/* mig_external */ | ||
| 511 | kern_return_t mach_port_construct | ||
| 512 | ( | ||
| 513 | 	ipc_space_t task, | ||
| 514 | 	mach_port_options_ptr_t options, | ||
| 515 | 	mach_port_context_t context, | ||
| 516 | 	mach_port_name_t *name | ||
| 517 | ); | ||
| 518 | |||
| 519 | /* Routine mach_port_destruct */ | ||
| 520 | #ifdef	mig_external | ||
| 521 | mig_external | ||
| 522 | #else | ||
| 523 | extern | ||
| 524 | #endif	/* mig_external */ | ||
| 525 | kern_return_t mach_port_destruct | ||
| 526 | ( | ||
| 527 | 	ipc_space_t task, | ||
| 528 | 	mach_port_name_t name, | ||
| 529 | 	mach_port_delta_t srdelta, | ||
| 530 | 	mach_port_context_t guard | ||
| 531 | ); | ||
| 532 | |||
| 533 | /* Routine mach_port_guard */ | ||
| 534 | #ifdef	mig_external | ||
| 535 | mig_external | ||
| 536 | #else | ||
| 537 | extern | ||
| 538 | #endif	/* mig_external */ | ||
| 539 | kern_return_t mach_port_guard | ||
| 540 | ( | ||
| 541 | 	ipc_space_t task, | ||
| 542 | 	mach_port_name_t name, | ||
| 543 | 	mach_port_context_t guard, | ||
| 544 | 	boolean_t strict | ||
| 545 | ); | ||
| 546 | |||
| 547 | /* Routine mach_port_unguard */ | ||
| 548 | #ifdef	mig_external | ||
| 549 | mig_external | ||
| 550 | #else | ||
| 551 | extern | ||
| 552 | #endif	/* mig_external */ | ||
| 553 | kern_return_t mach_port_unguard | ||
| 554 | ( | ||
| 555 | 	ipc_space_t task, | ||
| 556 | 	mach_port_name_t name, | ||
| 557 | 	mach_port_context_t guard | ||
| 558 | ); | ||
| 559 | |||
| 560 | /* Routine mach_port_space_basic_info */ | ||
| 561 | #ifdef	mig_external | ||
| 562 | mig_external | ||
| 563 | #else | ||
| 564 | extern | ||
| 565 | #endif	/* mig_external */ | ||
| 566 | kern_return_t mach_port_space_basic_info | ||
| 567 | ( | ||
| 568 | 	ipc_space_inspect_t task, | ||
| 569 | 	ipc_info_space_basic_t *basic_info | ||
| 570 | ); | ||
| 571 | |||
| 572 | /* Routine mach_port_guard_with_flags */ | ||
| 573 | #ifdef	mig_external | ||
| 574 | mig_external | ||
| 575 | #else | ||
| 576 | extern | ||
| 577 | #endif	/* mig_external */ | ||
| 578 | kern_return_t mach_port_guard_with_flags | ||
| 579 | ( | ||
| 580 | 	ipc_space_t task, | ||
| 581 | 	mach_port_name_t name, | ||
| 582 | 	mach_port_context_t guard, | ||
| 583 | 	uint64_t flags | ||
| 584 | ); | ||
| 585 | |||
| 586 | /* Routine mach_port_swap_guard */ | ||
| 587 | #ifdef	mig_external | ||
| 588 | mig_external | ||
| 589 | #else | ||
| 590 | extern | ||
| 591 | #endif	/* mig_external */ | ||
| 592 | kern_return_t mach_port_swap_guard | ||
| 593 | ( | ||
| 594 | 	ipc_space_t task, | ||
| 595 | 	mach_port_name_t name, | ||
| 596 | 	mach_port_context_t old_guard, | ||
| 597 | 	mach_port_context_t new_guard | ||
| 598 | ); | ||
| 599 | |||
| 600 | /* Routine mach_port_kobject_description */ | ||
| 601 | #ifdef	mig_external | ||
| 602 | mig_external | ||
| 603 | #else | ||
| 604 | extern | ||
| 605 | #endif	/* mig_external */ | ||
| 606 | kern_return_t mach_port_kobject_description | ||
| 607 | ( | ||
| 608 | 	ipc_space_read_t task, | ||
| 609 | 	mach_port_name_t name, | ||
| 610 | 	natural_t *object_type, | ||
| 611 | 	mach_vm_address_t *object_addr, | ||
| 612 | 	kobject_description_t description | ||
| 613 | ); | ||
| 614 | |||
| 615 | /* Routine mach_port_is_connection_for_service */ | ||
| 616 | #ifdef	mig_external | ||
| 617 | mig_external | ||
| 618 | #else | ||
| 619 | extern | ||
| 620 | #endif	/* mig_external */ | ||
| 621 | kern_return_t mach_port_is_connection_for_service | ||
| 622 | ( | ||
| 623 | 	ipc_space_t task, | ||
| 624 | 	mach_port_name_t connection_port, | ||
| 625 | 	mach_port_name_t service_port, | ||
| 626 | 	uint64_t *filter_policy_id | ||
| 627 | ); | ||
| 628 | |||
| 629 | /* Routine mach_port_get_service_port_info */ | ||
| 630 | #ifdef	mig_external | ||
| 631 | mig_external | ||
| 632 | #else | ||
| 633 | extern | ||
| 634 | #endif	/* mig_external */ | ||
| 635 | kern_return_t mach_port_get_service_port_info | ||
| 636 | ( | ||
| 637 | 	ipc_space_read_t task, | ||
| 638 | 	mach_port_name_t name, | ||
| 639 | 	mach_service_port_info_data_t *sp_info_out | ||
| 640 | ); | ||
| 641 | |||
| 642 | /* Routine mach_port_assert_attributes */ | ||
| 643 | #ifdef	mig_external | ||
| 644 | mig_external | ||
| 645 | #else | ||
| 646 | extern | ||
| 647 | #endif	/* mig_external */ | ||
| 648 | kern_return_t mach_port_assert_attributes | ||
| 649 | ( | ||
| 650 | 	ipc_space_t task, | ||
| 651 | 	mach_port_name_t name, | ||
| 652 | 	mach_port_flavor_t flavor, | ||
| 653 | 	mach_port_info_t info, | ||
| 654 | 	mach_msg_type_number_t infoCnt | ||
| 655 | ); | ||
| 656 | |||
| 657 | __END_DECLS | ||
| 658 | |||
| 659 | /********************** Caution **************************/ | ||
| 660 | /* The following data types should be used to calculate */ | ||
| 661 | /* maximum message sizes only. The actual message may be */ | ||
| 662 | /* smaller, and the position of the arguments within the */ | ||
| 663 | /* message layout may vary from what is presented here. */ | ||
| 664 | /* For example, if any of the arguments are variable- */ | ||
| 665 | /* sized, and less than the maximum is sent, the data */ | ||
| 666 | /* will be packed tight in the actual message to reduce */ | ||
| 667 | /* the presence of holes. */ | ||
| 668 | /********************** Caution **************************/ | ||
| 669 | |||
| 670 | /* typedefs for all requests */ | ||
| 671 | |||
| 672 | #ifndef __Request__mach_port_subsystem__defined | ||
| 673 | #define __Request__mach_port_subsystem__defined | ||
| 674 | |||
| 675 | #ifdef __MigPackStructs | ||
| 676 | #pragma pack(push, 4) | ||
| 677 | #endif | ||
| 678 | 	typedef struct { | ||
| 679 | 		mach_msg_header_t Head; | ||
| 680 | 	} __Request__mach_port_names_t __attribute__((unused)); | ||
| 681 | #ifdef __MigPackStructs | ||
| 682 | #pragma pack(pop) | ||
| 683 | #endif | ||
| 684 | |||
| 685 | #ifdef __MigPackStructs | ||
| 686 | #pragma pack(push, 4) | ||
| 687 | #endif | ||
| 688 | 	typedef struct { | ||
| 689 | 		mach_msg_header_t Head; | ||
| 690 | 		NDR_record_t NDR; | ||
| 691 | 		mach_port_name_t name; | ||
| 692 | 	} __Request__mach_port_type_t __attribute__((unused)); | ||
| 693 | #ifdef __MigPackStructs | ||
| 694 | #pragma pack(pop) | ||
| 695 | #endif | ||
| 696 | |||
| 697 | #ifdef __MigPackStructs | ||
| 698 | #pragma pack(push, 4) | ||
| 699 | #endif | ||
| 700 | 	typedef struct { | ||
| 701 | 		mach_msg_header_t Head; | ||
| 702 | 		NDR_record_t NDR; | ||
| 703 | 		mach_port_name_t old_name; | ||
| 704 | 		mach_port_name_t new_name; | ||
| 705 | 	} __Request__mach_port_rename_t __attribute__((unused)); | ||
| 706 | #ifdef __MigPackStructs | ||
| 707 | #pragma pack(pop) | ||
| 708 | #endif | ||
| 709 | |||
| 710 | #ifdef __MigPackStructs | ||
| 711 | #pragma pack(push, 4) | ||
| 712 | #endif | ||
| 713 | 	typedef struct { | ||
| 714 | 		mach_msg_header_t Head; | ||
| 715 | 		NDR_record_t NDR; | ||
| 716 | 		mach_port_right_t right; | ||
| 717 | 		mach_port_name_t name; | ||
| 718 | 	} __Request__mach_port_allocate_name_t __attribute__((unused)); | ||
| 719 | #ifdef __MigPackStructs | ||
| 720 | #pragma pack(pop) | ||
| 721 | #endif | ||
| 722 | |||
| 723 | #ifdef __MigPackStructs | ||
| 724 | #pragma pack(push, 4) | ||
| 725 | #endif | ||
| 726 | 	typedef struct { | ||
| 727 | 		mach_msg_header_t Head; | ||
| 728 | 		NDR_record_t NDR; | ||
| 729 | 		mach_port_right_t right; | ||
| 730 | 	} __Request__mach_port_allocate_t __attribute__((unused)); | ||
| 731 | #ifdef __MigPackStructs | ||
| 732 | #pragma pack(pop) | ||
| 733 | #endif | ||
| 734 | |||
| 735 | #ifdef __MigPackStructs | ||
| 736 | #pragma pack(push, 4) | ||
| 737 | #endif | ||
| 738 | 	typedef struct { | ||
| 739 | 		mach_msg_header_t Head; | ||
| 740 | 		NDR_record_t NDR; | ||
| 741 | 		mach_port_name_t name; | ||
| 742 | 	} __Request__mach_port_destroy_t __attribute__((unused)); | ||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(pop) | ||
| 745 | #endif | ||
| 746 | |||
| 747 | #ifdef __MigPackStructs | ||
| 748 | #pragma pack(push, 4) | ||
| 749 | #endif | ||
| 750 | 	typedef struct { | ||
| 751 | 		mach_msg_header_t Head; | ||
| 752 | 		NDR_record_t NDR; | ||
| 753 | 		mach_port_name_t name; | ||
| 754 | 	} __Request__mach_port_deallocate_t __attribute__((unused)); | ||
| 755 | #ifdef __MigPackStructs | ||
| 756 | #pragma pack(pop) | ||
| 757 | #endif | ||
| 758 | |||
| 759 | #ifdef __MigPackStructs | ||
| 760 | #pragma pack(push, 4) | ||
| 761 | #endif | ||
| 762 | 	typedef struct { | ||
| 763 | 		mach_msg_header_t Head; | ||
| 764 | 		NDR_record_t NDR; | ||
| 765 | 		mach_port_name_t name; | ||
| 766 | 		mach_port_right_t right; | ||
| 767 | 	} __Request__mach_port_get_refs_t __attribute__((unused)); | ||
| 768 | #ifdef __MigPackStructs | ||
| 769 | #pragma pack(pop) | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #ifdef __MigPackStructs | ||
| 773 | #pragma pack(push, 4) | ||
| 774 | #endif | ||
| 775 | 	typedef struct { | ||
| 776 | 		mach_msg_header_t Head; | ||
| 777 | 		NDR_record_t NDR; | ||
| 778 | 		mach_port_name_t name; | ||
| 779 | 		mach_port_right_t right; | ||
| 780 | 		mach_port_delta_t delta; | ||
| 781 | 	} __Request__mach_port_mod_refs_t __attribute__((unused)); | ||
| 782 | #ifdef __MigPackStructs | ||
| 783 | #pragma pack(pop) | ||
| 784 | #endif | ||
| 785 | |||
| 786 | #ifdef __MigPackStructs | ||
| 787 | #pragma pack(push, 4) | ||
| 788 | #endif | ||
| 789 | 	typedef struct { | ||
| 790 | 		mach_msg_header_t Head; | ||
| 791 | 		NDR_record_t NDR; | ||
| 792 | 		mach_port_name_t name; | ||
| 793 | 		mach_msg_trailer_type_t trailer_type; | ||
| 794 | 		mach_port_seqno_t request_seqnop; | ||
| 795 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 796 | 	} __Request__mach_port_peek_t __attribute__((unused)); | ||
| 797 | #ifdef __MigPackStructs | ||
| 798 | #pragma pack(pop) | ||
| 799 | #endif | ||
| 800 | |||
| 801 | #ifdef __MigPackStructs | ||
| 802 | #pragma pack(push, 4) | ||
| 803 | #endif | ||
| 804 | 	typedef struct { | ||
| 805 | 		mach_msg_header_t Head; | ||
| 806 | 		NDR_record_t NDR; | ||
| 807 | 		mach_port_name_t name; | ||
| 808 | 		mach_port_mscount_t mscount; | ||
| 809 | 	} __Request__mach_port_set_mscount_t __attribute__((unused)); | ||
| 810 | #ifdef __MigPackStructs | ||
| 811 | #pragma pack(pop) | ||
| 812 | #endif | ||
| 813 | |||
| 814 | #ifdef __MigPackStructs | ||
| 815 | #pragma pack(push, 4) | ||
| 816 | #endif | ||
| 817 | 	typedef struct { | ||
| 818 | 		mach_msg_header_t Head; | ||
| 819 | 		NDR_record_t NDR; | ||
| 820 | 		mach_port_name_t name; | ||
| 821 | 	} __Request__mach_port_get_set_status_t __attribute__((unused)); | ||
| 822 | #ifdef __MigPackStructs | ||
| 823 | #pragma pack(pop) | ||
| 824 | #endif | ||
| 825 | |||
| 826 | #ifdef __MigPackStructs | ||
| 827 | #pragma pack(push, 4) | ||
| 828 | #endif | ||
| 829 | 	typedef struct { | ||
| 830 | 		mach_msg_header_t Head; | ||
| 831 | 		NDR_record_t NDR; | ||
| 832 | 		mach_port_name_t member; | ||
| 833 | 		mach_port_name_t after; | ||
| 834 | 	} __Request__mach_port_move_member_t __attribute__((unused)); | ||
| 835 | #ifdef __MigPackStructs | ||
| 836 | #pragma pack(pop) | ||
| 837 | #endif | ||
| 838 | |||
| 839 | #ifdef __MigPackStructs | ||
| 840 | #pragma pack(push, 4) | ||
| 841 | #endif | ||
| 842 | 	typedef struct { | ||
| 843 | 		mach_msg_header_t Head; | ||
| 844 | 		/* start of the kernel processed data */ | ||
| 845 | 		mach_msg_body_t msgh_body; | ||
| 846 | 		mach_msg_port_descriptor_t notify; | ||
| 847 | 		/* end of the kernel processed data */ | ||
| 848 | 		NDR_record_t NDR; | ||
| 849 | 		mach_port_name_t name; | ||
| 850 | 		mach_msg_id_t msgid; | ||
| 851 | 		mach_port_mscount_t sync; | ||
| 852 | 	} __Request__mach_port_request_notification_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		/* start of the kernel processed data */ | ||
| 863 | 		mach_msg_body_t msgh_body; | ||
| 864 | 		mach_msg_port_descriptor_t poly; | ||
| 865 | 		/* end of the kernel processed data */ | ||
| 866 | 		NDR_record_t NDR; | ||
| 867 | 		mach_port_name_t name; | ||
| 868 | 	} __Request__mach_port_insert_right_t __attribute__((unused)); | ||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(pop) | ||
| 871 | #endif | ||
| 872 | |||
| 873 | #ifdef __MigPackStructs | ||
| 874 | #pragma pack(push, 4) | ||
| 875 | #endif | ||
| 876 | 	typedef struct { | ||
| 877 | 		mach_msg_header_t Head; | ||
| 878 | 		NDR_record_t NDR; | ||
| 879 | 		mach_port_name_t name; | ||
| 880 | 		mach_msg_type_name_t msgt_name; | ||
| 881 | 	} __Request__mach_port_extract_right_t __attribute__((unused)); | ||
| 882 | #ifdef __MigPackStructs | ||
| 883 | #pragma pack(pop) | ||
| 884 | #endif | ||
| 885 | |||
| 886 | #ifdef __MigPackStructs | ||
| 887 | #pragma pack(push, 4) | ||
| 888 | #endif | ||
| 889 | 	typedef struct { | ||
| 890 | 		mach_msg_header_t Head; | ||
| 891 | 		NDR_record_t NDR; | ||
| 892 | 		mach_port_name_t name; | ||
| 893 | 		mach_port_seqno_t seqno; | ||
| 894 | 	} __Request__mach_port_set_seqno_t __attribute__((unused)); | ||
| 895 | #ifdef __MigPackStructs | ||
| 896 | #pragma pack(pop) | ||
| 897 | #endif | ||
| 898 | |||
| 899 | #ifdef __MigPackStructs | ||
| 900 | #pragma pack(push, 4) | ||
| 901 | #endif | ||
| 902 | 	typedef struct { | ||
| 903 | 		mach_msg_header_t Head; | ||
| 904 | 		NDR_record_t NDR; | ||
| 905 | 		mach_port_name_t name; | ||
| 906 | 		mach_port_flavor_t flavor; | ||
| 907 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 908 | 	} __Request__mach_port_get_attributes_t __attribute__((unused)); | ||
| 909 | #ifdef __MigPackStructs | ||
| 910 | #pragma pack(pop) | ||
| 911 | #endif | ||
| 912 | |||
| 913 | #ifdef __MigPackStructs | ||
| 914 | #pragma pack(push, 4) | ||
| 915 | #endif | ||
| 916 | 	typedef struct { | ||
| 917 | 		mach_msg_header_t Head; | ||
| 918 | 		NDR_record_t NDR; | ||
| 919 | 		mach_port_name_t name; | ||
| 920 | 		mach_port_flavor_t flavor; | ||
| 921 | 		mach_msg_type_number_t port_infoCnt; | ||
| 922 | 		integer_t port_info[17]; | ||
| 923 | 	} __Request__mach_port_set_attributes_t __attribute__((unused)); | ||
| 924 | #ifdef __MigPackStructs | ||
| 925 | #pragma pack(pop) | ||
| 926 | #endif | ||
| 927 | |||
| 928 | #ifdef __MigPackStructs | ||
| 929 | #pragma pack(push, 4) | ||
| 930 | #endif | ||
| 931 | 	typedef struct { | ||
| 932 | 		mach_msg_header_t Head; | ||
| 933 | 		NDR_record_t NDR; | ||
| 934 | 		mach_port_right_t right; | ||
| 935 | 		mach_port_qos_t qos; | ||
| 936 | 	} __Request__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 937 | #ifdef __MigPackStructs | ||
| 938 | #pragma pack(pop) | ||
| 939 | #endif | ||
| 940 | |||
| 941 | #ifdef __MigPackStructs | ||
| 942 | #pragma pack(push, 4) | ||
| 943 | #endif | ||
| 944 | 	typedef struct { | ||
| 945 | 		mach_msg_header_t Head; | ||
| 946 | 		/* start of the kernel processed data */ | ||
| 947 | 		mach_msg_body_t msgh_body; | ||
| 948 | 		mach_msg_port_descriptor_t proto; | ||
| 949 | 		/* end of the kernel processed data */ | ||
| 950 | 		NDR_record_t NDR; | ||
| 951 | 		mach_port_right_t right; | ||
| 952 | 		mach_port_qos_t qos; | ||
| 953 | 		mach_port_name_t name; | ||
| 954 | 	} __Request__mach_port_allocate_full_t __attribute__((unused)); | ||
| 955 | #ifdef __MigPackStructs | ||
| 956 | #pragma pack(pop) | ||
| 957 | #endif | ||
| 958 | |||
| 959 | #ifdef __MigPackStructs | ||
| 960 | #pragma pack(push, 4) | ||
| 961 | #endif | ||
| 962 | 	typedef struct { | ||
| 963 | 		mach_msg_header_t Head; | ||
| 964 | 		NDR_record_t NDR; | ||
| 965 | 		int table_entries; | ||
| 966 | 	} __Request__task_set_port_space_t __attribute__((unused)); | ||
| 967 | #ifdef __MigPackStructs | ||
| 968 | #pragma pack(pop) | ||
| 969 | #endif | ||
| 970 | |||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(push, 4) | ||
| 973 | #endif | ||
| 974 | 	typedef struct { | ||
| 975 | 		mach_msg_header_t Head; | ||
| 976 | 		NDR_record_t NDR; | ||
| 977 | 		mach_port_name_t name; | ||
| 978 | 	} __Request__mach_port_get_srights_t __attribute__((unused)); | ||
| 979 | #ifdef __MigPackStructs | ||
| 980 | #pragma pack(pop) | ||
| 981 | #endif | ||
| 982 | |||
| 983 | #ifdef __MigPackStructs | ||
| 984 | #pragma pack(push, 4) | ||
| 985 | #endif | ||
| 986 | 	typedef struct { | ||
| 987 | 		mach_msg_header_t Head; | ||
| 988 | 	} __Request__mach_port_space_info_t __attribute__((unused)); | ||
| 989 | #ifdef __MigPackStructs | ||
| 990 | #pragma pack(pop) | ||
| 991 | #endif | ||
| 992 | |||
| 993 | #ifdef __MigPackStructs | ||
| 994 | #pragma pack(push, 4) | ||
| 995 | #endif | ||
| 996 | 	typedef struct { | ||
| 997 | 		mach_msg_header_t Head; | ||
| 998 | 		NDR_record_t NDR; | ||
| 999 | 		mach_port_name_t name; | ||
| 1000 | 	} __Request__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 1001 | #ifdef __MigPackStructs | ||
| 1002 | #pragma pack(pop) | ||
| 1003 | #endif | ||
| 1004 | |||
| 1005 | #ifdef __MigPackStructs | ||
| 1006 | #pragma pack(push, 4) | ||
| 1007 | #endif | ||
| 1008 | 	typedef struct { | ||
| 1009 | 		mach_msg_header_t Head; | ||
| 1010 | 		NDR_record_t NDR; | ||
| 1011 | 		mach_port_name_t name; | ||
| 1012 | 	} __Request__mach_port_kernel_object_t __attribute__((unused)); | ||
| 1013 | #ifdef __MigPackStructs | ||
| 1014 | #pragma pack(pop) | ||
| 1015 | #endif | ||
| 1016 | |||
| 1017 | #ifdef __MigPackStructs | ||
| 1018 | #pragma pack(push, 4) | ||
| 1019 | #endif | ||
| 1020 | 	typedef struct { | ||
| 1021 | 		mach_msg_header_t Head; | ||
| 1022 | 		NDR_record_t NDR; | ||
| 1023 | 		mach_port_name_t name; | ||
| 1024 | 		mach_port_name_t pset; | ||
| 1025 | 	} __Request__mach_port_insert_member_t __attribute__((unused)); | ||
| 1026 | #ifdef __MigPackStructs | ||
| 1027 | #pragma pack(pop) | ||
| 1028 | #endif | ||
| 1029 | |||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(push, 4) | ||
| 1032 | #endif | ||
| 1033 | 	typedef struct { | ||
| 1034 | 		mach_msg_header_t Head; | ||
| 1035 | 		NDR_record_t NDR; | ||
| 1036 | 		mach_port_name_t name; | ||
| 1037 | 		mach_port_name_t pset; | ||
| 1038 | 	} __Request__mach_port_extract_member_t __attribute__((unused)); | ||
| 1039 | #ifdef __MigPackStructs | ||
| 1040 | #pragma pack(pop) | ||
| 1041 | #endif | ||
| 1042 | |||
| 1043 | #ifdef __MigPackStructs | ||
| 1044 | #pragma pack(push, 4) | ||
| 1045 | #endif | ||
| 1046 | 	typedef struct { | ||
| 1047 | 		mach_msg_header_t Head; | ||
| 1048 | 		NDR_record_t NDR; | ||
| 1049 | 		mach_port_name_t name; | ||
| 1050 | 	} __Request__mach_port_get_context_t __attribute__((unused)); | ||
| 1051 | #ifdef __MigPackStructs | ||
| 1052 | #pragma pack(pop) | ||
| 1053 | #endif | ||
| 1054 | |||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(push, 4) | ||
| 1057 | #endif | ||
| 1058 | 	typedef struct { | ||
| 1059 | 		mach_msg_header_t Head; | ||
| 1060 | 		NDR_record_t NDR; | ||
| 1061 | 		mach_port_name_t name; | ||
| 1062 | 		mach_port_context_t context; | ||
| 1063 | 	} __Request__mach_port_set_context_t __attribute__((unused)); | ||
| 1064 | #ifdef __MigPackStructs | ||
| 1065 | #pragma pack(pop) | ||
| 1066 | #endif | ||
| 1067 | |||
| 1068 | #ifdef __MigPackStructs | ||
| 1069 | #pragma pack(push, 4) | ||
| 1070 | #endif | ||
| 1071 | 	typedef struct { | ||
| 1072 | 		mach_msg_header_t Head; | ||
| 1073 | 		NDR_record_t NDR; | ||
| 1074 | 		mach_port_name_t name; | ||
| 1075 | 	} __Request__mach_port_kobject_t __attribute__((unused)); | ||
| 1076 | #ifdef __MigPackStructs | ||
| 1077 | #pragma pack(pop) | ||
| 1078 | #endif | ||
| 1079 | |||
| 1080 | #ifdef __MigPackStructs | ||
| 1081 | #pragma pack(push, 4) | ||
| 1082 | #endif | ||
| 1083 | 	typedef struct { | ||
| 1084 | 		mach_msg_header_t Head; | ||
| 1085 | 		/* start of the kernel processed data */ | ||
| 1086 | 		mach_msg_body_t msgh_body; | ||
| 1087 | 		mach_msg_ool_descriptor_t options; | ||
| 1088 | 		/* end of the kernel processed data */ | ||
| 1089 | 		NDR_record_t NDR; | ||
| 1090 | 		mach_port_context_t context; | ||
| 1091 | 	} __Request__mach_port_construct_t __attribute__((unused)); | ||
| 1092 | #ifdef __MigPackStructs | ||
| 1093 | #pragma pack(pop) | ||
| 1094 | #endif | ||
| 1095 | |||
| 1096 | #ifdef __MigPackStructs | ||
| 1097 | #pragma pack(push, 4) | ||
| 1098 | #endif | ||
| 1099 | 	typedef struct { | ||
| 1100 | 		mach_msg_header_t Head; | ||
| 1101 | 		NDR_record_t NDR; | ||
| 1102 | 		mach_port_name_t name; | ||
| 1103 | 		mach_port_delta_t srdelta; | ||
| 1104 | 		mach_port_context_t guard; | ||
| 1105 | 	} __Request__mach_port_destruct_t __attribute__((unused)); | ||
| 1106 | #ifdef __MigPackStructs | ||
| 1107 | #pragma pack(pop) | ||
| 1108 | #endif | ||
| 1109 | |||
| 1110 | #ifdef __MigPackStructs | ||
| 1111 | #pragma pack(push, 4) | ||
| 1112 | #endif | ||
| 1113 | 	typedef struct { | ||
| 1114 | 		mach_msg_header_t Head; | ||
| 1115 | 		NDR_record_t NDR; | ||
| 1116 | 		mach_port_name_t name; | ||
| 1117 | 		mach_port_context_t guard; | ||
| 1118 | 		boolean_t strict; | ||
| 1119 | 	} __Request__mach_port_guard_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		mach_port_name_t name; | ||
| 1131 | 		mach_port_context_t guard; | ||
| 1132 | 	} __Request__mach_port_unguard_t __attribute__((unused)); | ||
| 1133 | #ifdef __MigPackStructs | ||
| 1134 | #pragma pack(pop) | ||
| 1135 | #endif | ||
| 1136 | |||
| 1137 | #ifdef __MigPackStructs | ||
| 1138 | #pragma pack(push, 4) | ||
| 1139 | #endif | ||
| 1140 | 	typedef struct { | ||
| 1141 | 		mach_msg_header_t Head; | ||
| 1142 | 	} __Request__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1143 | #ifdef __MigPackStructs | ||
| 1144 | #pragma pack(pop) | ||
| 1145 | #endif | ||
| 1146 | |||
| 1147 | #ifdef __MigPackStructs | ||
| 1148 | #pragma pack(push, 4) | ||
| 1149 | #endif | ||
| 1150 | 	typedef struct { | ||
| 1151 | 		mach_msg_header_t Head; | ||
| 1152 | 		NDR_record_t NDR; | ||
| 1153 | 		mach_port_name_t name; | ||
| 1154 | 		mach_port_context_t guard; | ||
| 1155 | 		uint64_t flags; | ||
| 1156 | 	} __Request__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1157 | #ifdef __MigPackStructs | ||
| 1158 | #pragma pack(pop) | ||
| 1159 | #endif | ||
| 1160 | |||
| 1161 | #ifdef __MigPackStructs | ||
| 1162 | #pragma pack(push, 4) | ||
| 1163 | #endif | ||
| 1164 | 	typedef struct { | ||
| 1165 | 		mach_msg_header_t Head; | ||
| 1166 | 		NDR_record_t NDR; | ||
| 1167 | 		mach_port_name_t name; | ||
| 1168 | 		mach_port_context_t old_guard; | ||
| 1169 | 		mach_port_context_t new_guard; | ||
| 1170 | 	} __Request__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1171 | #ifdef __MigPackStructs | ||
| 1172 | #pragma pack(pop) | ||
| 1173 | #endif | ||
| 1174 | |||
| 1175 | #ifdef __MigPackStructs | ||
| 1176 | #pragma pack(push, 4) | ||
| 1177 | #endif | ||
| 1178 | 	typedef struct { | ||
| 1179 | 		mach_msg_header_t Head; | ||
| 1180 | 		NDR_record_t NDR; | ||
| 1181 | 		mach_port_name_t name; | ||
| 1182 | 	} __Request__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1183 | #ifdef __MigPackStructs | ||
| 1184 | #pragma pack(pop) | ||
| 1185 | #endif | ||
| 1186 | |||
| 1187 | #ifdef __MigPackStructs | ||
| 1188 | #pragma pack(push, 4) | ||
| 1189 | #endif | ||
| 1190 | 	typedef struct { | ||
| 1191 | 		mach_msg_header_t Head; | ||
| 1192 | 		NDR_record_t NDR; | ||
| 1193 | 		mach_port_name_t connection_port; | ||
| 1194 | 		mach_port_name_t service_port; | ||
| 1195 | 	} __Request__mach_port_is_connection_for_service_t __attribute__((unused)); | ||
| 1196 | #ifdef __MigPackStructs | ||
| 1197 | #pragma pack(pop) | ||
| 1198 | #endif | ||
| 1199 | |||
| 1200 | #ifdef __MigPackStructs | ||
| 1201 | #pragma pack(push, 4) | ||
| 1202 | #endif | ||
| 1203 | 	typedef struct { | ||
| 1204 | 		mach_msg_header_t Head; | ||
| 1205 | 		NDR_record_t NDR; | ||
| 1206 | 		mach_port_name_t name; | ||
| 1207 | 	} __Request__mach_port_get_service_port_info_t __attribute__((unused)); | ||
| 1208 | #ifdef __MigPackStructs | ||
| 1209 | #pragma pack(pop) | ||
| 1210 | #endif | ||
| 1211 | |||
| 1212 | #ifdef __MigPackStructs | ||
| 1213 | #pragma pack(push, 4) | ||
| 1214 | #endif | ||
| 1215 | 	typedef struct { | ||
| 1216 | 		mach_msg_header_t Head; | ||
| 1217 | 		NDR_record_t NDR; | ||
| 1218 | 		mach_port_name_t name; | ||
| 1219 | 		mach_port_flavor_t flavor; | ||
| 1220 | 		mach_msg_type_number_t infoCnt; | ||
| 1221 | 		integer_t info[17]; | ||
| 1222 | 	} __Request__mach_port_assert_attributes_t __attribute__((unused)); | ||
| 1223 | #ifdef __MigPackStructs | ||
| 1224 | #pragma pack(pop) | ||
| 1225 | #endif | ||
| 1226 | #endif /* !__Request__mach_port_subsystem__defined */ | ||
| 1227 | |||
| 1228 | /* union of all requests */ | ||
| 1229 | |||
| 1230 | #ifndef __RequestUnion__mach_port_subsystem__defined | ||
| 1231 | #define __RequestUnion__mach_port_subsystem__defined | ||
| 1232 | union __RequestUnion__mach_port_subsystem { | ||
| 1233 | 	__Request__mach_port_names_t Request_mach_port_names; | ||
| 1234 | 	__Request__mach_port_type_t Request_mach_port_type; | ||
| 1235 | 	__Request__mach_port_rename_t Request_mach_port_rename; | ||
| 1236 | 	__Request__mach_port_allocate_name_t Request_mach_port_allocate_name; | ||
| 1237 | 	__Request__mach_port_allocate_t Request_mach_port_allocate; | ||
| 1238 | 	__Request__mach_port_destroy_t Request_mach_port_destroy; | ||
| 1239 | 	__Request__mach_port_deallocate_t Request_mach_port_deallocate; | ||
| 1240 | 	__Request__mach_port_get_refs_t Request_mach_port_get_refs; | ||
| 1241 | 	__Request__mach_port_mod_refs_t Request_mach_port_mod_refs; | ||
| 1242 | 	__Request__mach_port_peek_t Request_mach_port_peek; | ||
| 1243 | 	__Request__mach_port_set_mscount_t Request_mach_port_set_mscount; | ||
| 1244 | 	__Request__mach_port_get_set_status_t Request_mach_port_get_set_status; | ||
| 1245 | 	__Request__mach_port_move_member_t Request_mach_port_move_member; | ||
| 1246 | 	__Request__mach_port_request_notification_t Request_mach_port_request_notification; | ||
| 1247 | 	__Request__mach_port_insert_right_t Request_mach_port_insert_right; | ||
| 1248 | 	__Request__mach_port_extract_right_t Request_mach_port_extract_right; | ||
| 1249 | 	__Request__mach_port_set_seqno_t Request_mach_port_set_seqno; | ||
| 1250 | 	__Request__mach_port_get_attributes_t Request_mach_port_get_attributes; | ||
| 1251 | 	__Request__mach_port_set_attributes_t Request_mach_port_set_attributes; | ||
| 1252 | 	__Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; | ||
| 1253 | 	__Request__mach_port_allocate_full_t Request_mach_port_allocate_full; | ||
| 1254 | 	__Request__task_set_port_space_t Request_task_set_port_space; | ||
| 1255 | 	__Request__mach_port_get_srights_t Request_mach_port_get_srights; | ||
| 1256 | 	__Request__mach_port_space_info_t Request_mach_port_space_info; | ||
| 1257 | 	__Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; | ||
| 1258 | 	__Request__mach_port_kernel_object_t Request_mach_port_kernel_object; | ||
| 1259 | 	__Request__mach_port_insert_member_t Request_mach_port_insert_member; | ||
| 1260 | 	__Request__mach_port_extract_member_t Request_mach_port_extract_member; | ||
| 1261 | 	__Request__mach_port_get_context_t Request_mach_port_get_context; | ||
| 1262 | 	__Request__mach_port_set_context_t Request_mach_port_set_context; | ||
| 1263 | 	__Request__mach_port_kobject_t Request_mach_port_kobject; | ||
| 1264 | 	__Request__mach_port_construct_t Request_mach_port_construct; | ||
| 1265 | 	__Request__mach_port_destruct_t Request_mach_port_destruct; | ||
| 1266 | 	__Request__mach_port_guard_t Request_mach_port_guard; | ||
| 1267 | 	__Request__mach_port_unguard_t Request_mach_port_unguard; | ||
| 1268 | 	__Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info; | ||
| 1269 | 	__Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags; | ||
| 1270 | 	__Request__mach_port_swap_guard_t Request_mach_port_swap_guard; | ||
| 1271 | 	__Request__mach_port_kobject_description_t Request_mach_port_kobject_description; | ||
| 1272 | 	__Request__mach_port_is_connection_for_service_t Request_mach_port_is_connection_for_service; | ||
| 1273 | 	__Request__mach_port_get_service_port_info_t Request_mach_port_get_service_port_info; | ||
| 1274 | 	__Request__mach_port_assert_attributes_t Request_mach_port_assert_attributes; | ||
| 1275 | }; | ||
| 1276 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1277 | /* typedefs for all replies */ | ||
| 1278 | |||
| 1279 | #ifndef __Reply__mach_port_subsystem__defined | ||
| 1280 | #define __Reply__mach_port_subsystem__defined | ||
| 1281 | |||
| 1282 | #ifdef __MigPackStructs | ||
| 1283 | #pragma pack(push, 4) | ||
| 1284 | #endif | ||
| 1285 | 	typedef struct { | ||
| 1286 | 		mach_msg_header_t Head; | ||
| 1287 | 		/* start of the kernel processed data */ | ||
| 1288 | 		mach_msg_body_t msgh_body; | ||
| 1289 | 		mach_msg_ool_descriptor_t names; | ||
| 1290 | 		mach_msg_ool_descriptor_t types; | ||
| 1291 | 		/* end of the kernel processed data */ | ||
| 1292 | 		NDR_record_t NDR; | ||
| 1293 | 		mach_msg_type_number_t namesCnt; | ||
| 1294 | 		mach_msg_type_number_t typesCnt; | ||
| 1295 | 	} __Reply__mach_port_names_t __attribute__((unused)); | ||
| 1296 | #ifdef __MigPackStructs | ||
| 1297 | #pragma pack(pop) | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | #ifdef __MigPackStructs | ||
| 1301 | #pragma pack(push, 4) | ||
| 1302 | #endif | ||
| 1303 | 	typedef struct { | ||
| 1304 | 		mach_msg_header_t Head; | ||
| 1305 | 		NDR_record_t NDR; | ||
| 1306 | 		kern_return_t RetCode; | ||
| 1307 | 		mach_port_type_t ptype; | ||
| 1308 | 	} __Reply__mach_port_type_t __attribute__((unused)); | ||
| 1309 | #ifdef __MigPackStructs | ||
| 1310 | #pragma pack(pop) | ||
| 1311 | #endif | ||
| 1312 | |||
| 1313 | #ifdef __MigPackStructs | ||
| 1314 | #pragma pack(push, 4) | ||
| 1315 | #endif | ||
| 1316 | 	typedef struct { | ||
| 1317 | 		mach_msg_header_t Head; | ||
| 1318 | 		NDR_record_t NDR; | ||
| 1319 | 		kern_return_t RetCode; | ||
| 1320 | 	} __Reply__mach_port_rename_t __attribute__((unused)); | ||
| 1321 | #ifdef __MigPackStructs | ||
| 1322 | #pragma pack(pop) | ||
| 1323 | #endif | ||
| 1324 | |||
| 1325 | #ifdef __MigPackStructs | ||
| 1326 | #pragma pack(push, 4) | ||
| 1327 | #endif | ||
| 1328 | 	typedef struct { | ||
| 1329 | 		mach_msg_header_t Head; | ||
| 1330 | 		NDR_record_t NDR; | ||
| 1331 | 		kern_return_t RetCode; | ||
| 1332 | 	} __Reply__mach_port_allocate_name_t __attribute__((unused)); | ||
| 1333 | #ifdef __MigPackStructs | ||
| 1334 | #pragma pack(pop) | ||
| 1335 | #endif | ||
| 1336 | |||
| 1337 | #ifdef __MigPackStructs | ||
| 1338 | #pragma pack(push, 4) | ||
| 1339 | #endif | ||
| 1340 | 	typedef struct { | ||
| 1341 | 		mach_msg_header_t Head; | ||
| 1342 | 		NDR_record_t NDR; | ||
| 1343 | 		kern_return_t RetCode; | ||
| 1344 | 		mach_port_name_t name; | ||
| 1345 | 	} __Reply__mach_port_allocate_t __attribute__((unused)); | ||
| 1346 | #ifdef __MigPackStructs | ||
| 1347 | #pragma pack(pop) | ||
| 1348 | #endif | ||
| 1349 | |||
| 1350 | #ifdef __MigPackStructs | ||
| 1351 | #pragma pack(push, 4) | ||
| 1352 | #endif | ||
| 1353 | 	typedef struct { | ||
| 1354 | 		mach_msg_header_t Head; | ||
| 1355 | 		NDR_record_t NDR; | ||
| 1356 | 		kern_return_t RetCode; | ||
| 1357 | 	} __Reply__mach_port_destroy_t __attribute__((unused)); | ||
| 1358 | #ifdef __MigPackStructs | ||
| 1359 | #pragma pack(pop) | ||
| 1360 | #endif | ||
| 1361 | |||
| 1362 | #ifdef __MigPackStructs | ||
| 1363 | #pragma pack(push, 4) | ||
| 1364 | #endif | ||
| 1365 | 	typedef struct { | ||
| 1366 | 		mach_msg_header_t Head; | ||
| 1367 | 		NDR_record_t NDR; | ||
| 1368 | 		kern_return_t RetCode; | ||
| 1369 | 	} __Reply__mach_port_deallocate_t __attribute__((unused)); | ||
| 1370 | #ifdef __MigPackStructs | ||
| 1371 | #pragma pack(pop) | ||
| 1372 | #endif | ||
| 1373 | |||
| 1374 | #ifdef __MigPackStructs | ||
| 1375 | #pragma pack(push, 4) | ||
| 1376 | #endif | ||
| 1377 | 	typedef struct { | ||
| 1378 | 		mach_msg_header_t Head; | ||
| 1379 | 		NDR_record_t NDR; | ||
| 1380 | 		kern_return_t RetCode; | ||
| 1381 | 		mach_port_urefs_t refs; | ||
| 1382 | 	} __Reply__mach_port_get_refs_t __attribute__((unused)); | ||
| 1383 | #ifdef __MigPackStructs | ||
| 1384 | #pragma pack(pop) | ||
| 1385 | #endif | ||
| 1386 | |||
| 1387 | #ifdef __MigPackStructs | ||
| 1388 | #pragma pack(push, 4) | ||
| 1389 | #endif | ||
| 1390 | 	typedef struct { | ||
| 1391 | 		mach_msg_header_t Head; | ||
| 1392 | 		NDR_record_t NDR; | ||
| 1393 | 		kern_return_t RetCode; | ||
| 1394 | 	} __Reply__mach_port_mod_refs_t __attribute__((unused)); | ||
| 1395 | #ifdef __MigPackStructs | ||
| 1396 | #pragma pack(pop) | ||
| 1397 | #endif | ||
| 1398 | |||
| 1399 | #ifdef __MigPackStructs | ||
| 1400 | #pragma pack(push, 4) | ||
| 1401 | #endif | ||
| 1402 | 	typedef struct { | ||
| 1403 | 		mach_msg_header_t Head; | ||
| 1404 | 		NDR_record_t NDR; | ||
| 1405 | 		kern_return_t RetCode; | ||
| 1406 | 		mach_port_seqno_t request_seqnop; | ||
| 1407 | 		mach_msg_size_t msg_sizep; | ||
| 1408 | 		mach_msg_id_t msg_idp; | ||
| 1409 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 1410 | 		char trailer_infop[68]; | ||
| 1411 | 	} __Reply__mach_port_peek_t __attribute__((unused)); | ||
| 1412 | #ifdef __MigPackStructs | ||
| 1413 | #pragma pack(pop) | ||
| 1414 | #endif | ||
| 1415 | |||
| 1416 | #ifdef __MigPackStructs | ||
| 1417 | #pragma pack(push, 4) | ||
| 1418 | #endif | ||
| 1419 | 	typedef struct { | ||
| 1420 | 		mach_msg_header_t Head; | ||
| 1421 | 		NDR_record_t NDR; | ||
| 1422 | 		kern_return_t RetCode; | ||
| 1423 | 	} __Reply__mach_port_set_mscount_t __attribute__((unused)); | ||
| 1424 | #ifdef __MigPackStructs | ||
| 1425 | #pragma pack(pop) | ||
| 1426 | #endif | ||
| 1427 | |||
| 1428 | #ifdef __MigPackStructs | ||
| 1429 | #pragma pack(push, 4) | ||
| 1430 | #endif | ||
| 1431 | 	typedef struct { | ||
| 1432 | 		mach_msg_header_t Head; | ||
| 1433 | 		/* start of the kernel processed data */ | ||
| 1434 | 		mach_msg_body_t msgh_body; | ||
| 1435 | 		mach_msg_ool_descriptor_t members; | ||
| 1436 | 		/* end of the kernel processed data */ | ||
| 1437 | 		NDR_record_t NDR; | ||
| 1438 | 		mach_msg_type_number_t membersCnt; | ||
| 1439 | 	} __Reply__mach_port_get_set_status_t __attribute__((unused)); | ||
| 1440 | #ifdef __MigPackStructs | ||
| 1441 | #pragma pack(pop) | ||
| 1442 | #endif | ||
| 1443 | |||
| 1444 | #ifdef __MigPackStructs | ||
| 1445 | #pragma pack(push, 4) | ||
| 1446 | #endif | ||
| 1447 | 	typedef struct { | ||
| 1448 | 		mach_msg_header_t Head; | ||
| 1449 | 		NDR_record_t NDR; | ||
| 1450 | 		kern_return_t RetCode; | ||
| 1451 | 	} __Reply__mach_port_move_member_t __attribute__((unused)); | ||
| 1452 | #ifdef __MigPackStructs | ||
| 1453 | #pragma pack(pop) | ||
| 1454 | #endif | ||
| 1455 | |||
| 1456 | #ifdef __MigPackStructs | ||
| 1457 | #pragma pack(push, 4) | ||
| 1458 | #endif | ||
| 1459 | 	typedef struct { | ||
| 1460 | 		mach_msg_header_t Head; | ||
| 1461 | 		/* start of the kernel processed data */ | ||
| 1462 | 		mach_msg_body_t msgh_body; | ||
| 1463 | 		mach_msg_port_descriptor_t previous; | ||
| 1464 | 		/* end of the kernel processed data */ | ||
| 1465 | 	} __Reply__mach_port_request_notification_t __attribute__((unused)); | ||
| 1466 | #ifdef __MigPackStructs | ||
| 1467 | #pragma pack(pop) | ||
| 1468 | #endif | ||
| 1469 | |||
| 1470 | #ifdef __MigPackStructs | ||
| 1471 | #pragma pack(push, 4) | ||
| 1472 | #endif | ||
| 1473 | 	typedef struct { | ||
| 1474 | 		mach_msg_header_t Head; | ||
| 1475 | 		NDR_record_t NDR; | ||
| 1476 | 		kern_return_t RetCode; | ||
| 1477 | 	} __Reply__mach_port_insert_right_t __attribute__((unused)); | ||
| 1478 | #ifdef __MigPackStructs | ||
| 1479 | #pragma pack(pop) | ||
| 1480 | #endif | ||
| 1481 | |||
| 1482 | #ifdef __MigPackStructs | ||
| 1483 | #pragma pack(push, 4) | ||
| 1484 | #endif | ||
| 1485 | 	typedef struct { | ||
| 1486 | 		mach_msg_header_t Head; | ||
| 1487 | 		/* start of the kernel processed data */ | ||
| 1488 | 		mach_msg_body_t msgh_body; | ||
| 1489 | 		mach_msg_port_descriptor_t poly; | ||
| 1490 | 		/* end of the kernel processed data */ | ||
| 1491 | 	} __Reply__mach_port_extract_right_t __attribute__((unused)); | ||
| 1492 | #ifdef __MigPackStructs | ||
| 1493 | #pragma pack(pop) | ||
| 1494 | #endif | ||
| 1495 | |||
| 1496 | #ifdef __MigPackStructs | ||
| 1497 | #pragma pack(push, 4) | ||
| 1498 | #endif | ||
| 1499 | 	typedef struct { | ||
| 1500 | 		mach_msg_header_t Head; | ||
| 1501 | 		NDR_record_t NDR; | ||
| 1502 | 		kern_return_t RetCode; | ||
| 1503 | 	} __Reply__mach_port_set_seqno_t __attribute__((unused)); | ||
| 1504 | #ifdef __MigPackStructs | ||
| 1505 | #pragma pack(pop) | ||
| 1506 | #endif | ||
| 1507 | |||
| 1508 | #ifdef __MigPackStructs | ||
| 1509 | #pragma pack(push, 4) | ||
| 1510 | #endif | ||
| 1511 | 	typedef struct { | ||
| 1512 | 		mach_msg_header_t Head; | ||
| 1513 | 		NDR_record_t NDR; | ||
| 1514 | 		kern_return_t RetCode; | ||
| 1515 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 1516 | 		integer_t port_info_out[17]; | ||
| 1517 | 	} __Reply__mach_port_get_attributes_t __attribute__((unused)); | ||
| 1518 | #ifdef __MigPackStructs | ||
| 1519 | #pragma pack(pop) | ||
| 1520 | #endif | ||
| 1521 | |||
| 1522 | #ifdef __MigPackStructs | ||
| 1523 | #pragma pack(push, 4) | ||
| 1524 | #endif | ||
| 1525 | 	typedef struct { | ||
| 1526 | 		mach_msg_header_t Head; | ||
| 1527 | 		NDR_record_t NDR; | ||
| 1528 | 		kern_return_t RetCode; | ||
| 1529 | 	} __Reply__mach_port_set_attributes_t __attribute__((unused)); | ||
| 1530 | #ifdef __MigPackStructs | ||
| 1531 | #pragma pack(pop) | ||
| 1532 | #endif | ||
| 1533 | |||
| 1534 | #ifdef __MigPackStructs | ||
| 1535 | #pragma pack(push, 4) | ||
| 1536 | #endif | ||
| 1537 | 	typedef struct { | ||
| 1538 | 		mach_msg_header_t Head; | ||
| 1539 | 		NDR_record_t NDR; | ||
| 1540 | 		kern_return_t RetCode; | ||
| 1541 | 		mach_port_qos_t qos; | ||
| 1542 | 		mach_port_name_t name; | ||
| 1543 | 	} __Reply__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 1544 | #ifdef __MigPackStructs | ||
| 1545 | #pragma pack(pop) | ||
| 1546 | #endif | ||
| 1547 | |||
| 1548 | #ifdef __MigPackStructs | ||
| 1549 | #pragma pack(push, 4) | ||
| 1550 | #endif | ||
| 1551 | 	typedef struct { | ||
| 1552 | 		mach_msg_header_t Head; | ||
| 1553 | 		NDR_record_t NDR; | ||
| 1554 | 		kern_return_t RetCode; | ||
| 1555 | 		mach_port_qos_t qos; | ||
| 1556 | 		mach_port_name_t name; | ||
| 1557 | 	} __Reply__mach_port_allocate_full_t __attribute__((unused)); | ||
| 1558 | #ifdef __MigPackStructs | ||
| 1559 | #pragma pack(pop) | ||
| 1560 | #endif | ||
| 1561 | |||
| 1562 | #ifdef __MigPackStructs | ||
| 1563 | #pragma pack(push, 4) | ||
| 1564 | #endif | ||
| 1565 | 	typedef struct { | ||
| 1566 | 		mach_msg_header_t Head; | ||
| 1567 | 		NDR_record_t NDR; | ||
| 1568 | 		kern_return_t RetCode; | ||
| 1569 | 	} __Reply__task_set_port_space_t __attribute__((unused)); | ||
| 1570 | #ifdef __MigPackStructs | ||
| 1571 | #pragma pack(pop) | ||
| 1572 | #endif | ||
| 1573 | |||
| 1574 | #ifdef __MigPackStructs | ||
| 1575 | #pragma pack(push, 4) | ||
| 1576 | #endif | ||
| 1577 | 	typedef struct { | ||
| 1578 | 		mach_msg_header_t Head; | ||
| 1579 | 		NDR_record_t NDR; | ||
| 1580 | 		kern_return_t RetCode; | ||
| 1581 | 		mach_port_rights_t srights; | ||
| 1582 | 	} __Reply__mach_port_get_srights_t __attribute__((unused)); | ||
| 1583 | #ifdef __MigPackStructs | ||
| 1584 | #pragma pack(pop) | ||
| 1585 | #endif | ||
| 1586 | |||
| 1587 | #ifdef __MigPackStructs | ||
| 1588 | #pragma pack(push, 4) | ||
| 1589 | #endif | ||
| 1590 | 	typedef struct { | ||
| 1591 | 		mach_msg_header_t Head; | ||
| 1592 | 		/* start of the kernel processed data */ | ||
| 1593 | 		mach_msg_body_t msgh_body; | ||
| 1594 | 		mach_msg_ool_descriptor_t table_info; | ||
| 1595 | 		mach_msg_ool_descriptor_t tree_info; | ||
| 1596 | 		/* end of the kernel processed data */ | ||
| 1597 | 		NDR_record_t NDR; | ||
| 1598 | 		ipc_info_space_t space_info; | ||
| 1599 | 		mach_msg_type_number_t table_infoCnt; | ||
| 1600 | 		mach_msg_type_number_t tree_infoCnt; | ||
| 1601 | 	} __Reply__mach_port_space_info_t __attribute__((unused)); | ||
| 1602 | #ifdef __MigPackStructs | ||
| 1603 | #pragma pack(pop) | ||
| 1604 | #endif | ||
| 1605 | |||
| 1606 | #ifdef __MigPackStructs | ||
| 1607 | #pragma pack(push, 4) | ||
| 1608 | #endif | ||
| 1609 | 	typedef struct { | ||
| 1610 | 		mach_msg_header_t Head; | ||
| 1611 | 		NDR_record_t NDR; | ||
| 1612 | 		kern_return_t RetCode; | ||
| 1613 | 		unsigned dnr_total; | ||
| 1614 | 		unsigned dnr_used; | ||
| 1615 | 	} __Reply__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 1616 | #ifdef __MigPackStructs | ||
| 1617 | #pragma pack(pop) | ||
| 1618 | #endif | ||
| 1619 | |||
| 1620 | #ifdef __MigPackStructs | ||
| 1621 | #pragma pack(push, 4) | ||
| 1622 | #endif | ||
| 1623 | 	typedef struct { | ||
| 1624 | 		mach_msg_header_t Head; | ||
| 1625 | 		NDR_record_t NDR; | ||
| 1626 | 		kern_return_t RetCode; | ||
| 1627 | 		unsigned object_type; | ||
| 1628 | 		unsigned object_addr; | ||
| 1629 | 	} __Reply__mach_port_kernel_object_t __attribute__((unused)); | ||
| 1630 | #ifdef __MigPackStructs | ||
| 1631 | #pragma pack(pop) | ||
| 1632 | #endif | ||
| 1633 | |||
| 1634 | #ifdef __MigPackStructs | ||
| 1635 | #pragma pack(push, 4) | ||
| 1636 | #endif | ||
| 1637 | 	typedef struct { | ||
| 1638 | 		mach_msg_header_t Head; | ||
| 1639 | 		NDR_record_t NDR; | ||
| 1640 | 		kern_return_t RetCode; | ||
| 1641 | 	} __Reply__mach_port_insert_member_t __attribute__((unused)); | ||
| 1642 | #ifdef __MigPackStructs | ||
| 1643 | #pragma pack(pop) | ||
| 1644 | #endif | ||
| 1645 | |||
| 1646 | #ifdef __MigPackStructs | ||
| 1647 | #pragma pack(push, 4) | ||
| 1648 | #endif | ||
| 1649 | 	typedef struct { | ||
| 1650 | 		mach_msg_header_t Head; | ||
| 1651 | 		NDR_record_t NDR; | ||
| 1652 | 		kern_return_t RetCode; | ||
| 1653 | 	} __Reply__mach_port_extract_member_t __attribute__((unused)); | ||
| 1654 | #ifdef __MigPackStructs | ||
| 1655 | #pragma pack(pop) | ||
| 1656 | #endif | ||
| 1657 | |||
| 1658 | #ifdef __MigPackStructs | ||
| 1659 | #pragma pack(push, 4) | ||
| 1660 | #endif | ||
| 1661 | 	typedef struct { | ||
| 1662 | 		mach_msg_header_t Head; | ||
| 1663 | 		NDR_record_t NDR; | ||
| 1664 | 		kern_return_t RetCode; | ||
| 1665 | 		mach_port_context_t context; | ||
| 1666 | 	} __Reply__mach_port_get_context_t __attribute__((unused)); | ||
| 1667 | #ifdef __MigPackStructs | ||
| 1668 | #pragma pack(pop) | ||
| 1669 | #endif | ||
| 1670 | |||
| 1671 | #ifdef __MigPackStructs | ||
| 1672 | #pragma pack(push, 4) | ||
| 1673 | #endif | ||
| 1674 | 	typedef struct { | ||
| 1675 | 		mach_msg_header_t Head; | ||
| 1676 | 		NDR_record_t NDR; | ||
| 1677 | 		kern_return_t RetCode; | ||
| 1678 | 	} __Reply__mach_port_set_context_t __attribute__((unused)); | ||
| 1679 | #ifdef __MigPackStructs | ||
| 1680 | #pragma pack(pop) | ||
| 1681 | #endif | ||
| 1682 | |||
| 1683 | #ifdef __MigPackStructs | ||
| 1684 | #pragma pack(push, 4) | ||
| 1685 | #endif | ||
| 1686 | 	typedef struct { | ||
| 1687 | 		mach_msg_header_t Head; | ||
| 1688 | 		NDR_record_t NDR; | ||
| 1689 | 		kern_return_t RetCode; | ||
| 1690 | 		natural_t object_type; | ||
| 1691 | 		mach_vm_address_t object_addr; | ||
| 1692 | 	} __Reply__mach_port_kobject_t __attribute__((unused)); | ||
| 1693 | #ifdef __MigPackStructs | ||
| 1694 | #pragma pack(pop) | ||
| 1695 | #endif | ||
| 1696 | |||
| 1697 | #ifdef __MigPackStructs | ||
| 1698 | #pragma pack(push, 4) | ||
| 1699 | #endif | ||
| 1700 | 	typedef struct { | ||
| 1701 | 		mach_msg_header_t Head; | ||
| 1702 | 		NDR_record_t NDR; | ||
| 1703 | 		kern_return_t RetCode; | ||
| 1704 | 		mach_port_name_t name; | ||
| 1705 | 	} __Reply__mach_port_construct_t __attribute__((unused)); | ||
| 1706 | #ifdef __MigPackStructs | ||
| 1707 | #pragma pack(pop) | ||
| 1708 | #endif | ||
| 1709 | |||
| 1710 | #ifdef __MigPackStructs | ||
| 1711 | #pragma pack(push, 4) | ||
| 1712 | #endif | ||
| 1713 | 	typedef struct { | ||
| 1714 | 		mach_msg_header_t Head; | ||
| 1715 | 		NDR_record_t NDR; | ||
| 1716 | 		kern_return_t RetCode; | ||
| 1717 | 	} __Reply__mach_port_destruct_t __attribute__((unused)); | ||
| 1718 | #ifdef __MigPackStructs | ||
| 1719 | #pragma pack(pop) | ||
| 1720 | #endif | ||
| 1721 | |||
| 1722 | #ifdef __MigPackStructs | ||
| 1723 | #pragma pack(push, 4) | ||
| 1724 | #endif | ||
| 1725 | 	typedef struct { | ||
| 1726 | 		mach_msg_header_t Head; | ||
| 1727 | 		NDR_record_t NDR; | ||
| 1728 | 		kern_return_t RetCode; | ||
| 1729 | 	} __Reply__mach_port_guard_t __attribute__((unused)); | ||
| 1730 | #ifdef __MigPackStructs | ||
| 1731 | #pragma pack(pop) | ||
| 1732 | #endif | ||
| 1733 | |||
| 1734 | #ifdef __MigPackStructs | ||
| 1735 | #pragma pack(push, 4) | ||
| 1736 | #endif | ||
| 1737 | 	typedef struct { | ||
| 1738 | 		mach_msg_header_t Head; | ||
| 1739 | 		NDR_record_t NDR; | ||
| 1740 | 		kern_return_t RetCode; | ||
| 1741 | 	} __Reply__mach_port_unguard_t __attribute__((unused)); | ||
| 1742 | #ifdef __MigPackStructs | ||
| 1743 | #pragma pack(pop) | ||
| 1744 | #endif | ||
| 1745 | |||
| 1746 | #ifdef __MigPackStructs | ||
| 1747 | #pragma pack(push, 4) | ||
| 1748 | #endif | ||
| 1749 | 	typedef struct { | ||
| 1750 | 		mach_msg_header_t Head; | ||
| 1751 | 		NDR_record_t NDR; | ||
| 1752 | 		kern_return_t RetCode; | ||
| 1753 | 		ipc_info_space_basic_t basic_info; | ||
| 1754 | 	} __Reply__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1755 | #ifdef __MigPackStructs | ||
| 1756 | #pragma pack(pop) | ||
| 1757 | #endif | ||
| 1758 | |||
| 1759 | #ifdef __MigPackStructs | ||
| 1760 | #pragma pack(push, 4) | ||
| 1761 | #endif | ||
| 1762 | 	typedef struct { | ||
| 1763 | 		mach_msg_header_t Head; | ||
| 1764 | 		NDR_record_t NDR; | ||
| 1765 | 		kern_return_t RetCode; | ||
| 1766 | 	} __Reply__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1767 | #ifdef __MigPackStructs | ||
| 1768 | #pragma pack(pop) | ||
| 1769 | #endif | ||
| 1770 | |||
| 1771 | #ifdef __MigPackStructs | ||
| 1772 | #pragma pack(push, 4) | ||
| 1773 | #endif | ||
| 1774 | 	typedef struct { | ||
| 1775 | 		mach_msg_header_t Head; | ||
| 1776 | 		NDR_record_t NDR; | ||
| 1777 | 		kern_return_t RetCode; | ||
| 1778 | 	} __Reply__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1779 | #ifdef __MigPackStructs | ||
| 1780 | #pragma pack(pop) | ||
| 1781 | #endif | ||
| 1782 | |||
| 1783 | #ifdef __MigPackStructs | ||
| 1784 | #pragma pack(push, 4) | ||
| 1785 | #endif | ||
| 1786 | 	typedef struct { | ||
| 1787 | 		mach_msg_header_t Head; | ||
| 1788 | 		NDR_record_t NDR; | ||
| 1789 | 		kern_return_t RetCode; | ||
| 1790 | 		natural_t object_type; | ||
| 1791 | 		mach_vm_address_t object_addr; | ||
| 1792 | 		mach_msg_type_number_t descriptionOffset; /* MiG doesn't use it */ | ||
| 1793 | 		mach_msg_type_number_t descriptionCnt; | ||
| 1794 | 		char description[512]; | ||
| 1795 | 	} __Reply__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1796 | #ifdef __MigPackStructs | ||
| 1797 | #pragma pack(pop) | ||
| 1798 | #endif | ||
| 1799 | |||
| 1800 | #ifdef __MigPackStructs | ||
| 1801 | #pragma pack(push, 4) | ||
| 1802 | #endif | ||
| 1803 | 	typedef struct { | ||
| 1804 | 		mach_msg_header_t Head; | ||
| 1805 | 		NDR_record_t NDR; | ||
| 1806 | 		kern_return_t RetCode; | ||
| 1807 | 		uint64_t filter_policy_id; | ||
| 1808 | 	} __Reply__mach_port_is_connection_for_service_t __attribute__((unused)); | ||
| 1809 | #ifdef __MigPackStructs | ||
| 1810 | #pragma pack(pop) | ||
| 1811 | #endif | ||
| 1812 | |||
| 1813 | #ifdef __MigPackStructs | ||
| 1814 | #pragma pack(push, 4) | ||
| 1815 | #endif | ||
| 1816 | 	typedef struct { | ||
| 1817 | 		mach_msg_header_t Head; | ||
| 1818 | 		NDR_record_t NDR; | ||
| 1819 | 		kern_return_t RetCode; | ||
| 1820 | 		mach_service_port_info_data_t sp_info_out; | ||
| 1821 | 	} __Reply__mach_port_get_service_port_info_t __attribute__((unused)); | ||
| 1822 | #ifdef __MigPackStructs | ||
| 1823 | #pragma pack(pop) | ||
| 1824 | #endif | ||
| 1825 | |||
| 1826 | #ifdef __MigPackStructs | ||
| 1827 | #pragma pack(push, 4) | ||
| 1828 | #endif | ||
| 1829 | 	typedef struct { | ||
| 1830 | 		mach_msg_header_t Head; | ||
| 1831 | 		NDR_record_t NDR; | ||
| 1832 | 		kern_return_t RetCode; | ||
| 1833 | 	} __Reply__mach_port_assert_attributes_t __attribute__((unused)); | ||
| 1834 | #ifdef __MigPackStructs | ||
| 1835 | #pragma pack(pop) | ||
| 1836 | #endif | ||
| 1837 | #endif /* !__Reply__mach_port_subsystem__defined */ | ||
| 1838 | |||
| 1839 | /* union of all replies */ | ||
| 1840 | |||
| 1841 | #ifndef __ReplyUnion__mach_port_subsystem__defined | ||
| 1842 | #define __ReplyUnion__mach_port_subsystem__defined | ||
| 1843 | union __ReplyUnion__mach_port_subsystem { | ||
| 1844 | 	__Reply__mach_port_names_t Reply_mach_port_names; | ||
| 1845 | 	__Reply__mach_port_type_t Reply_mach_port_type; | ||
| 1846 | 	__Reply__mach_port_rename_t Reply_mach_port_rename; | ||
| 1847 | 	__Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; | ||
| 1848 | 	__Reply__mach_port_allocate_t Reply_mach_port_allocate; | ||
| 1849 | 	__Reply__mach_port_destroy_t Reply_mach_port_destroy; | ||
| 1850 | 	__Reply__mach_port_deallocate_t Reply_mach_port_deallocate; | ||
| 1851 | 	__Reply__mach_port_get_refs_t Reply_mach_port_get_refs; | ||
| 1852 | 	__Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; | ||
| 1853 | 	__Reply__mach_port_peek_t Reply_mach_port_peek; | ||
| 1854 | 	__Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; | ||
| 1855 | 	__Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; | ||
| 1856 | 	__Reply__mach_port_move_member_t Reply_mach_port_move_member; | ||
| 1857 | 	__Reply__mach_port_request_notification_t Reply_mach_port_request_notification; | ||
| 1858 | 	__Reply__mach_port_insert_right_t Reply_mach_port_insert_right; | ||
| 1859 | 	__Reply__mach_port_extract_right_t Reply_mach_port_extract_right; | ||
| 1860 | 	__Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; | ||
| 1861 | 	__Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; | ||
| 1862 | 	__Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; | ||
| 1863 | 	__Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; | ||
| 1864 | 	__Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; | ||
| 1865 | 	__Reply__task_set_port_space_t Reply_task_set_port_space; | ||
| 1866 | 	__Reply__mach_port_get_srights_t Reply_mach_port_get_srights; | ||
| 1867 | 	__Reply__mach_port_space_info_t Reply_mach_port_space_info; | ||
| 1868 | 	__Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; | ||
| 1869 | 	__Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; | ||
| 1870 | 	__Reply__mach_port_insert_member_t Reply_mach_port_insert_member; | ||
| 1871 | 	__Reply__mach_port_extract_member_t Reply_mach_port_extract_member; | ||
| 1872 | 	__Reply__mach_port_get_context_t Reply_mach_port_get_context; | ||
| 1873 | 	__Reply__mach_port_set_context_t Reply_mach_port_set_context; | ||
| 1874 | 	__Reply__mach_port_kobject_t Reply_mach_port_kobject; | ||
| 1875 | 	__Reply__mach_port_construct_t Reply_mach_port_construct; | ||
| 1876 | 	__Reply__mach_port_destruct_t Reply_mach_port_destruct; | ||
| 1877 | 	__Reply__mach_port_guard_t Reply_mach_port_guard; | ||
| 1878 | 	__Reply__mach_port_unguard_t Reply_mach_port_unguard; | ||
| 1879 | 	__Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info; | ||
| 1880 | 	__Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags; | ||
| 1881 | 	__Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard; | ||
| 1882 | 	__Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description; | ||
| 1883 | 	__Reply__mach_port_is_connection_for_service_t Reply_mach_port_is_connection_for_service; | ||
| 1884 | 	__Reply__mach_port_get_service_port_info_t Reply_mach_port_get_service_port_info; | ||
| 1885 | 	__Reply__mach_port_assert_attributes_t Reply_mach_port_assert_attributes; | ||
| 1886 | }; | ||
| 1887 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1888 | |||
| 1889 | #ifndef subsystem_to_name_map_mach_port | ||
| 1890 | #define subsystem_to_name_map_mach_port \ | ||
| 1891 | { "mach_port_names", 3200 },\ | ||
| 1892 | { "mach_port_type", 3201 },\ | ||
| 1893 | { "mach_port_rename", 3202 },\ | ||
| 1894 | { "mach_port_allocate_name", 3203 },\ | ||
| 1895 | { "mach_port_allocate", 3204 },\ | ||
| 1896 | { "mach_port_destroy", 3205 },\ | ||
| 1897 | { "mach_port_deallocate", 3206 },\ | ||
| 1898 | { "mach_port_get_refs", 3207 },\ | ||
| 1899 | { "mach_port_mod_refs", 3208 },\ | ||
| 1900 | { "mach_port_peek", 3209 },\ | ||
| 1901 | { "mach_port_set_mscount", 3210 },\ | ||
| 1902 | { "mach_port_get_set_status", 3211 },\ | ||
| 1903 | { "mach_port_move_member", 3212 },\ | ||
| 1904 | { "mach_port_request_notification", 3213 },\ | ||
| 1905 | { "mach_port_insert_right", 3214 },\ | ||
| 1906 | { "mach_port_extract_right", 3215 },\ | ||
| 1907 | { "mach_port_set_seqno", 3216 },\ | ||
| 1908 | { "mach_port_get_attributes", 3217 },\ | ||
| 1909 | { "mach_port_set_attributes", 3218 },\ | ||
| 1910 | { "mach_port_allocate_qos", 3219 },\ | ||
| 1911 | { "mach_port_allocate_full", 3220 },\ | ||
| 1912 | { "task_set_port_space", 3221 },\ | ||
| 1913 | { "mach_port_get_srights", 3222 },\ | ||
| 1914 | { "mach_port_space_info", 3223 },\ | ||
| 1915 | { "mach_port_dnrequest_info", 3224 },\ | ||
| 1916 | { "mach_port_kernel_object", 3225 },\ | ||
| 1917 | { "mach_port_insert_member", 3226 },\ | ||
| 1918 | { "mach_port_extract_member", 3227 },\ | ||
| 1919 | { "mach_port_get_context", 3228 },\ | ||
| 1920 | { "mach_port_set_context", 3229 },\ | ||
| 1921 | { "mach_port_kobject", 3230 },\ | ||
| 1922 | { "mach_port_construct", 3231 },\ | ||
| 1923 | { "mach_port_destruct", 3232 },\ | ||
| 1924 | { "mach_port_guard", 3233 },\ | ||
| 1925 | { "mach_port_unguard", 3234 },\ | ||
| 1926 | { "mach_port_space_basic_info", 3235 },\ | ||
| 1927 | { "mach_port_guard_with_flags", 3237 },\ | ||
| 1928 | { "mach_port_swap_guard", 3238 },\ | ||
| 1929 | { "mach_port_kobject_description", 3239 },\ | ||
| 1930 | { "mach_port_is_connection_for_service", 3240 },\ | ||
| 1931 | { "mach_port_get_service_port_info", 3241 },\ | ||
| 1932 | { "mach_port_assert_attributes", 3242 } | ||
| 1933 | #endif | ||
| 1934 | |||
| 1935 | #ifdef __AfterMigUserHeader | ||
| 1936 | __AfterMigUserHeader | ||
| 1937 | #endif /* __AfterMigUserHeader */ | ||
| 1938 | |||
| 1939 | #endif	 /* _mach_port_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/mach_voucher_types.h+2-1| ... | @@ -31,6 +31,7 @@ | ... | @@ -31,6 +31,7 @@ |
| 31 | 31 | ||
| 32 | #include <mach/std_types.h> | 32 | #include <mach/std_types.h> |
| 33 | #include <mach/port.h> | 33 | #include <mach/port.h> |
| 34 | #include <mach/message.h> | ||
| 34 | 35 | ||
| 35 | /* | 36 | /* |
| 36 | * Mach Voucher - an immutable collection of attribute value handles. | 37 | * Mach Voucher - an immutable collection of attribute value handles. |
| ... | @@ -212,7 +213,7 @@ typedef mach_port_t ipc_voucher_attr_control_t; | ... | @@ -212,7 +213,7 @@ typedef mach_port_t ipc_voucher_attr_control_t; |
| 212 | * The private handle that the voucher attribute manager provides to | 213 | * The private handle that the voucher attribute manager provides to |
| 213 | * the mach voucher mechanism to represent a given attr content/value. | 214 | * the mach voucher mechanism to represent a given attr content/value. |
| 214 | */ | 215 | */ |
| 215 | typedef uint64_t mach_voucher_attr_value_handle_t; | 216 | typedef uint64_t mach_voucher_attr_value_handle_t __kernel_ptr_semantics; |
| 216 | typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t; | 217 | typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t; |
| 217 | 218 | ||
| 218 | typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t; | 219 | typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t; |
lib/libc/include/any-macos-any/mach/machine.h created+410| ... | @@ -0,0 +1,410 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2007-2016 Apple, Inc. All rights reserved. | ||
| 3 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * This file contains Original Code and/or Modifications of Original Code | ||
| 8 | * as defined in and that are subject to the Apple Public Source License | ||
| 9 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 10 | * compliance with the License. The rights granted to you under the License | ||
| 11 | * may not be used to create, or enable the creation or redistribution of, | ||
| 12 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 13 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 14 | * terms of an Apple operating system software license agreement. | ||
| 15 | * | ||
| 16 | * Please obtain a copy of the License at | ||
| 17 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 18 | * | ||
| 19 | * The Original Code and all software distributed under the License are | ||
| 20 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 21 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 22 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 23 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 24 | * Please see the License for the specific language governing rights and | ||
| 25 | * limitations under the License. | ||
| 26 | * | ||
| 27 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 28 | */ | ||
| 29 | /* | ||
| 30 | * Mach Operating System | ||
| 31 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 32 | * All Rights Reserved. | ||
| 33 | * | ||
| 34 | * Permission to use, copy, modify and distribute this software and its | ||
| 35 | * documentation is hereby granted, provided that both the copyright | ||
| 36 | * notice and this permission notice appear in all copies of the | ||
| 37 | * software, derivative works or modified versions, and any portions | ||
| 38 | * thereof, and that both notices appear in supporting documentation. | ||
| 39 | * | ||
| 40 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 41 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 42 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 43 | * | ||
| 44 | * Carnegie Mellon requests users of this software to return to | ||
| 45 | * | ||
| 46 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 47 | * School of Computer Science | ||
| 48 | * Carnegie Mellon University | ||
| 49 | * Pittsburgh PA 15213-3890 | ||
| 50 | * | ||
| 51 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 52 | * the rights to redistribute these changes. | ||
| 53 | */ | ||
| 54 | /*	File:	machine.h | ||
| 55 | *	Author:	Avadis Tevanian, Jr. | ||
| 56 | *	Date:	1986 | ||
| 57 | * | ||
| 58 | *	Machine independent machine abstraction. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef _MACH_MACHINE_H_ | ||
| 62 | #define _MACH_MACHINE_H_ | ||
| 63 | |||
| 64 | #ifndef __ASSEMBLER__ | ||
| 65 | |||
| 66 | #include <stdint.h> | ||
| 67 | #include <mach/machine/vm_types.h> | ||
| 68 | #include <mach/boolean.h> | ||
| 69 | |||
| 70 | typedef integer_t cpu_type_t; | ||
| 71 | typedef integer_t cpu_subtype_t; | ||
| 72 | typedef integer_t cpu_threadtype_t; | ||
| 73 | |||
| 74 | #define CPU_STATE_MAX 4 | ||
| 75 | |||
| 76 | #define CPU_STATE_USER 0 | ||
| 77 | #define CPU_STATE_SYSTEM 1 | ||
| 78 | #define CPU_STATE_IDLE 2 | ||
| 79 | #define CPU_STATE_NICE 3 | ||
| 80 | |||
| 81 | |||
| 82 | |||
| 83 | /* | ||
| 84 | * Capability bits used in the definition of cpu_type. | ||
| 85 | */ | ||
| 86 | #define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */ | ||
| 87 | #define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */ | ||
| 88 | #define CPU_ARCH_ABI64_32 0x02000000 /* ABI for 64-bit hardware with 32-bit types; LP32 */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | *	Machine types known by all. | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define CPU_TYPE_ANY ((cpu_type_t) -1) | ||
| 95 | |||
| 96 | #define CPU_TYPE_VAX ((cpu_type_t) 1) | ||
| 97 | /* skip				((cpu_type_t) 2)	*/ | ||
| 98 | /* skip				((cpu_type_t) 3)	*/ | ||
| 99 | /* skip				((cpu_type_t) 4)	*/ | ||
| 100 | /* skip				((cpu_type_t) 5)	*/ | ||
| 101 | #define CPU_TYPE_MC680x0 ((cpu_type_t) 6) | ||
| 102 | #define CPU_TYPE_X86 ((cpu_type_t) 7) | ||
| 103 | #define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */ | ||
| 104 | #define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64) | ||
| 105 | |||
| 106 | /* skip CPU_TYPE_MIPS		((cpu_type_t) 8)	*/ | ||
| 107 | /* skip ((cpu_type_t) 9)	*/ | ||
| 108 | #define CPU_TYPE_MC98000 ((cpu_type_t) 10) | ||
| 109 | #define CPU_TYPE_HPPA ((cpu_type_t) 11) | ||
| 110 | #define CPU_TYPE_ARM ((cpu_type_t) 12) | ||
| 111 | #define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) | ||
| 112 | #define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32) | ||
| 113 | #define CPU_TYPE_MC88000 ((cpu_type_t) 13) | ||
| 114 | #define CPU_TYPE_SPARC ((cpu_type_t) 14) | ||
| 115 | #define CPU_TYPE_I860 ((cpu_type_t) 15) | ||
| 116 | /* skip	CPU_TYPE_ALPHA		((cpu_type_t) 16)	*/ | ||
| 117 | /* skip				((cpu_type_t) 17)	*/ | ||
| 118 | #define CPU_TYPE_POWERPC ((cpu_type_t) 18) | ||
| 119 | #define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) | ||
| 120 | /* skip				((cpu_type_t) 19)	*/ | ||
| 121 | /* skip				((cpu_type_t) 20 */ | ||
| 122 | /* skip				((cpu_type_t) 21 */ | ||
| 123 | /* skip				((cpu_type_t) 22 */ | ||
| 124 | |||
| 125 | /* | ||
| 126 | *	Machine subtypes (these are defined here, instead of in a machine | ||
| 127 | *	dependent directory, so that any program can get all definitions | ||
| 128 | *	regardless of where is it compiled). | ||
| 129 | */ | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Capability bits used in the definition of cpu_subtype. | ||
| 133 | */ | ||
| 134 | #define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */ | ||
| 135 | #define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */ | ||
| 136 | #define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */ | ||
| 137 | |||
| 138 | /* | ||
| 139 | * When selecting a slice, ANY will pick the slice with the best | ||
| 140 | * grading for the selected cpu_type_t, unlike the "ALL" subtypes, | ||
| 141 | * which are the slices that can run on any hardware for that cpu type. | ||
| 142 | */ | ||
| 143 | #define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1) | ||
| 144 | |||
| 145 | /* | ||
| 146 | *	Object files that are hand-crafted to run on any | ||
| 147 | *	implementation of an architecture are tagged with | ||
| 148 | *	CPU_SUBTYPE_MULTIPLE. This functions essentially the same as | ||
| 149 | *	the "ALL" subtype of an architecture except that it allows us | ||
| 150 | *	to easily find object files that may need to be modified | ||
| 151 | *	whenever a new implementation of an architecture comes out. | ||
| 152 | * | ||
| 153 | *	It is the responsibility of the implementor to make sure the | ||
| 154 | *	software handles unsupported implementations elegantly. | ||
| 155 | */ | ||
| 156 | #define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) | ||
| 157 | #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) | ||
| 158 | #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Machine threadtypes. | ||
| 162 | * This is none - not defined - for most machine types/subtypes. | ||
| 163 | */ | ||
| 164 | #define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0) | ||
| 165 | |||
| 166 | /* | ||
| 167 | *	VAX subtypes (these do *not* necessary conform to the actual cpu | ||
| 168 | *	ID assigned by DEC available via the SID register). | ||
| 169 | */ | ||
| 170 | |||
| 171 | #define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0) | ||
| 172 | #define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1) | ||
| 173 | #define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2) | ||
| 174 | #define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3) | ||
| 175 | #define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4) | ||
| 176 | #define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5) | ||
| 177 | #define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6) | ||
| 178 | #define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7) | ||
| 179 | #define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8) | ||
| 180 | #define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9) | ||
| 181 | #define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10) | ||
| 182 | #define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11) | ||
| 183 | #define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12) | ||
| 184 | |||
| 185 | /* | ||
| 186 | * 680x0 subtypes | ||
| 187 | * | ||
| 188 | * The subtype definitions here are unusual for historical reasons. | ||
| 189 | * NeXT used to consider 68030 code as generic 68000 code. For | ||
| 190 | * backwards compatability: | ||
| 191 | * | ||
| 192 | *	CPU_SUBTYPE_MC68030 symbol has been preserved for source code | ||
| 193 | *	compatability. | ||
| 194 | * | ||
| 195 | *	CPU_SUBTYPE_MC680x0_ALL has been defined to be the same | ||
| 196 | *	subtype as CPU_SUBTYPE_MC68030 for binary comatability. | ||
| 197 | * | ||
| 198 | *	CPU_SUBTYPE_MC68030_ONLY has been added to allow new object | ||
| 199 | *	files to be tagged as containing 68030-specific instructions. | ||
| 200 | */ | ||
| 201 | |||
| 202 | #define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1) | ||
| 203 | #define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */ | ||
| 204 | #define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2) | ||
| 205 | #define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3) | ||
| 206 | |||
| 207 | /* | ||
| 208 | *	I386 subtypes | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4)) | ||
| 212 | |||
| 213 | #define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0) | ||
| 214 | #define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0) | ||
| 215 | #define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0) | ||
| 216 | #define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128 | ||
| 217 | #define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0) | ||
| 218 | #define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0) | ||
| 219 | #define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1) | ||
| 220 | #define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3) | ||
| 221 | #define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5) | ||
| 222 | #define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6) | ||
| 223 | #define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7) | ||
| 224 | #define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0) | ||
| 225 | #define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1) | ||
| 226 | #define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2) | ||
| 227 | #define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0) | ||
| 228 | #define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0) | ||
| 229 | #define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1) | ||
| 230 | #define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0) | ||
| 231 | #define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1) | ||
| 232 | #define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0) | ||
| 233 | #define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1) | ||
| 234 | |||
| 235 | #define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15) | ||
| 236 | #define CPU_SUBTYPE_INTEL_FAMILY_MAX 15 | ||
| 237 | |||
| 238 | #define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4) | ||
| 239 | #define CPU_SUBTYPE_INTEL_MODEL_ALL 0 | ||
| 240 | |||
| 241 | /* | ||
| 242 | *	X86 subtypes. | ||
| 243 | */ | ||
| 244 | |||
| 245 | #define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) | ||
| 246 | #define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3) | ||
| 247 | #define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4) | ||
| 248 | #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8) /* Haswell feature subset */ | ||
| 249 | |||
| 250 | |||
| 251 | #define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1) | ||
| 252 | |||
| 253 | /* | ||
| 254 | *	Mips subtypes. | ||
| 255 | */ | ||
| 256 | |||
| 257 | #define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0) | ||
| 258 | #define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1) | ||
| 259 | #define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2) | ||
| 260 | #define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3) | ||
| 261 | #define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */ | ||
| 262 | #define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5) | ||
| 263 | #define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */ | ||
| 264 | #define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7) | ||
| 265 | |||
| 266 | /* | ||
| 267 | *	MC98000 (PowerPC) subtypes | ||
| 268 | */ | ||
| 269 | #define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0) | ||
| 270 | #define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1) | ||
| 271 | |||
| 272 | /* | ||
| 273 | *	HPPA subtypes for Hewlett-Packard HP-PA family of | ||
| 274 | *	risc processors. Port by NeXT to 700 series. | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0) | ||
| 278 | #define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */ | ||
| 279 | #define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) | ||
| 280 | |||
| 281 | /* | ||
| 282 | *	MC88000 subtypes. | ||
| 283 | */ | ||
| 284 | #define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0) | ||
| 285 | #define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) | ||
| 286 | #define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) | ||
| 287 | |||
| 288 | /* | ||
| 289 | *	SPARC subtypes | ||
| 290 | */ | ||
| 291 | #define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) | ||
| 292 | |||
| 293 | /* | ||
| 294 | *	I860 subtypes | ||
| 295 | */ | ||
| 296 | #define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0) | ||
| 297 | #define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1) | ||
| 298 | |||
| 299 | /* | ||
| 300 | *	PowerPC subtypes | ||
| 301 | */ | ||
| 302 | #define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0) | ||
| 303 | #define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1) | ||
| 304 | #define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2) | ||
| 305 | #define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3) | ||
| 306 | #define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4) | ||
| 307 | #define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5) | ||
| 308 | #define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6) | ||
| 309 | #define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7) | ||
| 310 | #define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8) | ||
| 311 | #define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9) | ||
| 312 | #define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10) | ||
| 313 | #define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11) | ||
| 314 | #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) | ||
| 315 | |||
| 316 | /* | ||
| 317 | *	ARM subtypes | ||
| 318 | */ | ||
| 319 | #define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) | ||
| 320 | #define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) | ||
| 321 | #define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) | ||
| 322 | #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) | ||
| 323 | #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) | ||
| 324 | #define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) /* ARMv7-A and ARMv7-R */ | ||
| 325 | #define CPU_SUBTYPE_ARM_V7F ((cpu_subtype_t) 10) /* Cortex A9 */ | ||
| 326 | #define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */ | ||
| 327 | #define CPU_SUBTYPE_ARM_V7K ((cpu_subtype_t) 12) | ||
| 328 | #define CPU_SUBTYPE_ARM_V8 ((cpu_subtype_t) 13) | ||
| 329 | #define CPU_SUBTYPE_ARM_V6M ((cpu_subtype_t) 14) /* Not meant to be run under xnu */ | ||
| 330 | #define CPU_SUBTYPE_ARM_V7M ((cpu_subtype_t) 15) /* Not meant to be run under xnu */ | ||
| 331 | #define CPU_SUBTYPE_ARM_V7EM ((cpu_subtype_t) 16) /* Not meant to be run under xnu */ | ||
| 332 | #define CPU_SUBTYPE_ARM_V8M ((cpu_subtype_t) 17) /* Not meant to be run under xnu */ | ||
| 333 | |||
| 334 | /* | ||
| 335 | * ARM64 subtypes | ||
| 336 | */ | ||
| 337 | #define CPU_SUBTYPE_ARM64_ALL ((cpu_subtype_t) 0) | ||
| 338 | #define CPU_SUBTYPE_ARM64_V8 ((cpu_subtype_t) 1) | ||
| 339 | #define CPU_SUBTYPE_ARM64E ((cpu_subtype_t) 2) | ||
| 340 | |||
| 341 | /* CPU subtype feature flags for ptrauth on arm64e platforms */ | ||
| 342 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_MASK 0x0f000000 | ||
| 343 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_VERSION(x) (((x) & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) >> 24) | ||
| 344 | |||
| 345 | /* | ||
| 346 | * ARM64_32 subtypes | ||
| 347 | */ | ||
| 348 | #define CPU_SUBTYPE_ARM64_32_ALL ((cpu_subtype_t) 0) | ||
| 349 | #define CPU_SUBTYPE_ARM64_32_V8 ((cpu_subtype_t) 1) | ||
| 350 | |||
| 351 | #endif /* !__ASSEMBLER__ */ | ||
| 352 | |||
| 353 | /* | ||
| 354 | *	CPU families (sysctl hw.cpufamily) | ||
| 355 | * | ||
| 356 | * These are meant to identify the CPU's marketing name - an | ||
| 357 | * application can map these to (possibly) localized strings. | ||
| 358 | * NB: the encodings of the CPU families are intentionally arbitrary. | ||
| 359 | * There is no ordering, and you should never try to deduce whether | ||
| 360 | * or not some feature is available based on the family. | ||
| 361 | * Use feature flags (eg, hw.optional.altivec) to test for optional | ||
| 362 | * functionality. | ||
| 363 | */ | ||
| 364 | #define CPUFAMILY_UNKNOWN 0 | ||
| 365 | #define CPUFAMILY_POWERPC_G3 0xcee41549 | ||
| 366 | #define CPUFAMILY_POWERPC_G4 0x77c184ae | ||
| 367 | #define CPUFAMILY_POWERPC_G5 0xed76d8aa | ||
| 368 | #define CPUFAMILY_INTEL_6_13 0xaa33392b | ||
| 369 | #define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc | ||
| 370 | #define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2 | ||
| 371 | #define CPUFAMILY_INTEL_WESTMERE 0x573b5eec | ||
| 372 | #define CPUFAMILY_INTEL_SANDYBRIDGE 0x5490b78c | ||
| 373 | #define CPUFAMILY_INTEL_IVYBRIDGE 0x1f65e835 | ||
| 374 | #define CPUFAMILY_INTEL_HASWELL 0x10b282dc | ||
| 375 | #define CPUFAMILY_INTEL_BROADWELL 0x582ed09c | ||
| 376 | #define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f | ||
| 377 | #define CPUFAMILY_INTEL_KABYLAKE 0x0f817246 | ||
| 378 | #define CPUFAMILY_INTEL_ICELAKE 0x38435547 | ||
| 379 | #define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e | ||
| 380 | #define CPUFAMILY_ARM_9 0xe73283ae | ||
| 381 | #define CPUFAMILY_ARM_11 0x8ff620d8 | ||
| 382 | #define CPUFAMILY_ARM_XSCALE 0x53b005f5 | ||
| 383 | #define CPUFAMILY_ARM_12 0xbd1b0ae9 | ||
| 384 | #define CPUFAMILY_ARM_13 0x0cc90e64 | ||
| 385 | #define CPUFAMILY_ARM_14 0x96077ef1 | ||
| 386 | #define CPUFAMILY_ARM_15 0xa8511bca | ||
| 387 | #define CPUFAMILY_ARM_SWIFT 0x1e2d6381 | ||
| 388 | #define CPUFAMILY_ARM_CYCLONE 0x37a09642 | ||
| 389 | #define CPUFAMILY_ARM_TYPHOON 0x2c91a47e | ||
| 390 | #define CPUFAMILY_ARM_TWISTER 0x92fb37c8 | ||
| 391 | #define CPUFAMILY_ARM_HURRICANE 0x67ceee93 | ||
| 392 | #define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6 | ||
| 393 | #define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f | ||
| 394 | #define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2 | ||
| 395 | #define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3 | ||
| 396 | #define CPUFAMILY_ARM_BLIZZARD_AVALANCHE 0xda33d83d | ||
| 397 | |||
| 398 | #define CPUSUBFAMILY_UNKNOWN 0 | ||
| 399 | #define CPUSUBFAMILY_ARM_HP 1 | ||
| 400 | #define CPUSUBFAMILY_ARM_HG 2 | ||
| 401 | #define CPUSUBFAMILY_ARM_M 3 | ||
| 402 | #define CPUSUBFAMILY_ARM_HS 4 | ||
| 403 | #define CPUSUBFAMILY_ARM_HC_HD 5 | ||
| 404 | |||
| 405 | /* The following synonyms are deprecated: */ | ||
| 406 | #define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN | ||
| 407 | #define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM | ||
| 408 | |||
| 409 | |||
| 410 | #endif /* _MACH_MACHINE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/machine/thread_state.h created+44| ... | @@ -0,0 +1,44 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_MACHINE_THREAD_STATE_H_ | ||
| 30 | #define _MACH_MACHINE_THREAD_STATE_H_ | ||
| 31 | |||
| 32 | #if defined (__i386__) || defined(__x86_64__) | ||
| 33 | #include "mach/i386/thread_state.h" | ||
| 34 | #elif defined (__arm__) || defined (__arm64__) | ||
| 35 | #include "mach/arm/thread_state.h" | ||
| 36 | #else | ||
| 37 | #error architecture not supported | ||
| 38 | #endif | ||
| 39 | |||
| 40 | /* Size of maximum exported thread state in 32-bit words */ | ||
| 41 | #define THREAD_STATE_MAX 1296 | ||
| 42 | |||
| 43 | |||
| 44 | #endif /* _MACH_MACHINE_THREAD_STATE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/message.h created+911| ... | @@ -0,0 +1,911 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | * Copyright (c) 2005 SPARTA, Inc. | ||
| 62 | */ | ||
| 63 | /* | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | *	File:	mach/message.h | ||
| 67 | * | ||
| 68 | *	Mach IPC message and primitive function definitions. | ||
| 69 | */ | ||
| 70 | |||
| 71 | #ifndef _MACH_MESSAGE_H_ | ||
| 72 | #define _MACH_MESSAGE_H_ | ||
| 73 | |||
| 74 | #include <stdint.h> | ||
| 75 | #include <mach/port.h> | ||
| 76 | #include <mach/boolean.h> | ||
| 77 | #include <mach/kern_return.h> | ||
| 78 | #include <mach/machine/vm_types.h> | ||
| 79 | |||
| 80 | #include <sys/cdefs.h> | ||
| 81 | #include <sys/appleapiopts.h> | ||
| 82 | #include <Availability.h> | ||
| 83 | |||
| 84 | /* | ||
| 85 | * The timeout mechanism uses mach_msg_timeout_t values, | ||
| 86 | * passed by value. The timeout units are milliseconds. | ||
| 87 | * It is controlled with the MACH_SEND_TIMEOUT | ||
| 88 | * and MACH_RCV_TIMEOUT options. | ||
| 89 | */ | ||
| 90 | |||
| 91 | typedef natural_t mach_msg_timeout_t; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * The value to be used when there is no timeout. | ||
| 95 | * (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.) | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0) | ||
| 99 | |||
| 100 | /* | ||
| 101 | * The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it | ||
| 102 | * assumes the body of the message doesn't contain port rights or OOL | ||
| 103 | * data. The field is set in received messages. A user task must | ||
| 104 | * use caution in interpreting the body of a message if the bit isn't | ||
| 105 | * on, because the mach_msg_type's in the body might "lie" about the | ||
| 106 | * contents. If the bit isn't on, but the mach_msg_types | ||
| 107 | * in the body specify rights or OOL data, the behavior is undefined. | ||
| 108 | * (Ie, an error may or may not be produced.) | ||
| 109 | * | ||
| 110 | * The value of MACH_MSGH_BITS_REMOTE determines the interpretation | ||
| 111 | * of the msgh_remote_port field. It is handled like a msgt_name, | ||
| 112 | * but must result in a send or send-once type right. | ||
| 113 | * | ||
| 114 | * The value of MACH_MSGH_BITS_LOCAL determines the interpretation | ||
| 115 | * of the msgh_local_port field. It is handled like a msgt_name, | ||
| 116 | * and also must result in a send or send-once type right. | ||
| 117 | * | ||
| 118 | * The value of MACH_MSGH_BITS_VOUCHER determines the interpretation | ||
| 119 | * of the msgh_voucher_port field. It is handled like a msgt_name, | ||
| 120 | * but must result in a send right (and the msgh_voucher_port field | ||
| 121 | * must be the name of a send right to a Mach voucher kernel object. | ||
| 122 | * | ||
| 123 | * MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote | ||
| 124 | * and local fields, into a single value suitable for msgh_bits. | ||
| 125 | * | ||
| 126 | * MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally. | ||
| 127 | * | ||
| 128 | * The unused bits should be zero and are reserved for the kernel | ||
| 129 | * or for future interface expansion. | ||
| 130 | */ | ||
| 131 | |||
| 132 | #define MACH_MSGH_BITS_ZERO 0x00000000 | ||
| 133 | |||
| 134 | #define MACH_MSGH_BITS_REMOTE_MASK 0x0000001f | ||
| 135 | #define MACH_MSGH_BITS_LOCAL_MASK 0x00001f00 | ||
| 136 | #define MACH_MSGH_BITS_VOUCHER_MASK 0x001f0000 | ||
| 137 | |||
| 138 | #define MACH_MSGH_BITS_PORTS_MASK \ | ||
| 139 | 	 (MACH_MSGH_BITS_REMOTE_MASK | \ | ||
| 140 | 	 MACH_MSGH_BITS_LOCAL_MASK | \ | ||
| 141 | 	 MACH_MSGH_BITS_VOUCHER_MASK) | ||
| 142 | |||
| 143 | #define MACH_MSGH_BITS_COMPLEX 0x80000000U /* message is complex */ | ||
| 144 | |||
| 145 | #define MACH_MSGH_BITS_USER 0x801f1f1fU /* allowed bits user->kernel */ | ||
| 146 | |||
| 147 | #define MACH_MSGH_BITS_RAISEIMP 0x20000000U /* importance raised due to msg */ | ||
| 148 | #define MACH_MSGH_BITS_DENAP MACH_MSGH_BITS_RAISEIMP | ||
| 149 | |||
| 150 | #define MACH_MSGH_BITS_IMPHOLDASRT 0x10000000U /* assertion help, userland private */ | ||
| 151 | #define MACH_MSGH_BITS_DENAPHOLDASRT MACH_MSGH_BITS_IMPHOLDASRT | ||
| 152 | |||
| 153 | #define MACH_MSGH_BITS_CIRCULAR 0x10000000U /* message circular, kernel private */ | ||
| 154 | |||
| 155 | #define MACH_MSGH_BITS_USED 0xb01f1f1fU | ||
| 156 | |||
| 157 | /* setter macros for the bits */ | ||
| 158 | #define MACH_MSGH_BITS(remote, local) /* legacy */ \ | ||
| 159 | 	 ((remote) | ((local) << 8)) | ||
| 160 | #define MACH_MSGH_BITS_SET_PORTS(remote, local, voucher) \ | ||
| 161 | 	(((remote) & MACH_MSGH_BITS_REMOTE_MASK) | \ | ||
| 162 | 	 (((local) << 8) & MACH_MSGH_BITS_LOCAL_MASK) | \ | ||
| 163 | 	 (((voucher) << 16) & MACH_MSGH_BITS_VOUCHER_MASK)) | ||
| 164 | #define MACH_MSGH_BITS_SET(remote, local, voucher, other) \ | ||
| 165 | 	(MACH_MSGH_BITS_SET_PORTS((remote), (local), (voucher)) \ | ||
| 166 | 	 | ((other) &~ MACH_MSGH_BITS_PORTS_MASK)) | ||
| 167 | |||
| 168 | /* getter macros for pulling values out of the bits field */ | ||
| 169 | #define MACH_MSGH_BITS_REMOTE(bits) \ | ||
| 170 | 	 ((bits) & MACH_MSGH_BITS_REMOTE_MASK) | ||
| 171 | #define MACH_MSGH_BITS_LOCAL(bits) \ | ||
| 172 | 	 (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8) | ||
| 173 | #define MACH_MSGH_BITS_VOUCHER(bits) \ | ||
| 174 | 	 (((bits) & MACH_MSGH_BITS_VOUCHER_MASK) >> 16) | ||
| 175 | #define MACH_MSGH_BITS_PORTS(bits) \ | ||
| 176 | 	((bits) & MACH_MSGH_BITS_PORTS_MASK) | ||
| 177 | #define MACH_MSGH_BITS_OTHER(bits) \ | ||
| 178 | 	 ((bits) &~ MACH_MSGH_BITS_PORTS_MASK) | ||
| 179 | |||
| 180 | /* checking macros */ | ||
| 181 | #define MACH_MSGH_BITS_HAS_REMOTE(bits) \ | ||
| 182 | 	(MACH_MSGH_BITS_REMOTE(bits) != MACH_MSGH_BITS_ZERO) | ||
| 183 | #define MACH_MSGH_BITS_HAS_LOCAL(bits) \ | ||
| 184 | 	(MACH_MSGH_BITS_LOCAL(bits) != MACH_MSGH_BITS_ZERO) | ||
| 185 | #define MACH_MSGH_BITS_HAS_VOUCHER(bits) \ | ||
| 186 | 	(MACH_MSGH_BITS_VOUCHER(bits) != MACH_MSGH_BITS_ZERO) | ||
| 187 | #define MACH_MSGH_BITS_IS_COMPLEX(bits) \ | ||
| 188 | 	(((bits) & MACH_MSGH_BITS_COMPLEX) != MACH_MSGH_BITS_ZERO) | ||
| 189 | |||
| 190 | /* importance checking macros */ | ||
| 191 | #define MACH_MSGH_BITS_RAISED_IMPORTANCE(bits) \ | ||
| 192 | 	(((bits) & MACH_MSGH_BITS_RAISEIMP) != MACH_MSGH_BITS_ZERO) | ||
| 193 | #define MACH_MSGH_BITS_HOLDS_IMPORTANCE_ASSERTION(bits) \ | ||
| 194 | 	(((bits) & MACH_MSGH_BITS_IMPHOLDASRT) != MACH_MSGH_BITS_ZERO) | ||
| 195 | |||
| 196 | /* | ||
| 197 | * Every message starts with a message header. | ||
| 198 | * Following the message header, if the message is complex, are a count | ||
| 199 | * of type descriptors and the type descriptors themselves | ||
| 200 | * (mach_msg_descriptor_t). The size of the message must be specified in | ||
| 201 | * bytes, and includes the message header, descriptor count, descriptors, | ||
| 202 | * and inline data. | ||
| 203 | * | ||
| 204 | * The msgh_remote_port field specifies the destination of the message. | ||
| 205 | * It must specify a valid send or send-once right for a port. | ||
| 206 | * | ||
| 207 | * The msgh_local_port field specifies a "reply port". Normally, | ||
| 208 | * This field carries a send-once right that the receiver will use | ||
| 209 | * to reply to the message. It may carry the values MACH_PORT_NULL, | ||
| 210 | * MACH_PORT_DEAD, a send-once right, or a send right. | ||
| 211 | * | ||
| 212 | * The msgh_voucher_port field specifies a Mach voucher port. Only | ||
| 213 | * send rights to kernel-implemented Mach Voucher kernel objects in | ||
| 214 | * addition to MACH_PORT_NULL or MACH_PORT_DEAD may be passed. | ||
| 215 | * | ||
| 216 | * The msgh_id field is uninterpreted by the message primitives. | ||
| 217 | * It normally carries information specifying the format | ||
| 218 | * or meaning of the message. | ||
| 219 | */ | ||
| 220 | |||
| 221 | typedef unsigned int mach_msg_bits_t; | ||
| 222 | typedef natural_t mach_msg_size_t; | ||
| 223 | typedef integer_t mach_msg_id_t; | ||
| 224 | |||
| 225 | #define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0 | ||
| 226 | |||
| 227 | typedef unsigned int mach_msg_priority_t; | ||
| 228 | |||
| 229 | #define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0 | ||
| 230 | |||
| 231 | |||
| 232 | typedef unsigned int mach_msg_type_name_t; | ||
| 233 | |||
| 234 | #define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */ | ||
| 235 | #define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send right(s) */ | ||
| 236 | #define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce right */ | ||
| 237 | #define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send right(s) */ | ||
| 238 | #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ | ||
| 239 | #define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive right */ | ||
| 240 | #define MACH_MSG_TYPE_COPY_RECEIVE 22 /* NOT VALID */ | ||
| 241 | #define MACH_MSG_TYPE_DISPOSE_RECEIVE 24 /* must hold receive right */ | ||
| 242 | #define MACH_MSG_TYPE_DISPOSE_SEND 25 /* must hold send right(s) */ | ||
| 243 | #define MACH_MSG_TYPE_DISPOSE_SEND_ONCE 26 /* must hold sendonce right */ | ||
| 244 | |||
| 245 | typedef unsigned int mach_msg_copy_options_t; | ||
| 246 | |||
| 247 | #define MACH_MSG_PHYSICAL_COPY 0 | ||
| 248 | #define MACH_MSG_VIRTUAL_COPY 1 | ||
| 249 | #define MACH_MSG_ALLOCATE 2 | ||
| 250 | #define MACH_MSG_OVERWRITE 3 /* deprecated */ | ||
| 251 | #ifdef MACH_KERNEL | ||
| 252 | #define MACH_MSG_KALLOC_COPY_T 4 | ||
| 253 | #endif /* MACH_KERNEL */ | ||
| 254 | |||
| 255 | #define MACH_MSG_GUARD_FLAGS_NONE 0x0000 | ||
| 256 | #define MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE 0x0001 /* Move the receive right and mark it as immovable */ | ||
| 257 | #define MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND 0x0002 /* Verify that the port is unguarded */ | ||
| 258 | #define MACH_MSG_GUARD_FLAGS_MASK 0x0003 /* Valid flag bits */ | ||
| 259 | typedef unsigned int mach_msg_guard_flags_t; | ||
| 260 | |||
| 261 | /* | ||
| 262 | * In a complex mach message, the mach_msg_header_t is followed by | ||
| 263 | * a descriptor count, then an array of that number of descriptors | ||
| 264 | * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t | ||
| 265 | * (which any descriptor can be cast to) indicates the flavor of the | ||
| 266 | * descriptor. | ||
| 267 | * | ||
| 268 | * Note that in LP64, the various types of descriptors are no longer all | ||
| 269 | * the same size as mach_msg_descriptor_t, so the array cannot be indexed | ||
| 270 | * as expected. | ||
| 271 | */ | ||
| 272 | |||
| 273 | typedef unsigned int mach_msg_descriptor_type_t; | ||
| 274 | |||
| 275 | #define MACH_MSG_PORT_DESCRIPTOR 0 | ||
| 276 | #define MACH_MSG_OOL_DESCRIPTOR 1 | ||
| 277 | #define MACH_MSG_OOL_PORTS_DESCRIPTOR 2 | ||
| 278 | #define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3 | ||
| 279 | #define MACH_MSG_GUARDED_PORT_DESCRIPTOR 4 | ||
| 280 | |||
| 281 | #pragma pack(push, 4) | ||
| 282 | |||
| 283 | typedef struct{ | ||
| 284 | 	natural_t pad1; | ||
| 285 | 	mach_msg_size_t pad2; | ||
| 286 | 	unsigned int pad3 : 24; | ||
| 287 | 	mach_msg_descriptor_type_t type : 8; | ||
| 288 | } mach_msg_type_descriptor_t; | ||
| 289 | |||
| 290 | typedef struct{ | ||
| 291 | 	mach_port_t name; | ||
| 292 | // Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes | ||
| 293 | 	mach_msg_size_t pad1; | ||
| 294 | 	unsigned int pad2 : 16; | ||
| 295 | 	mach_msg_type_name_t disposition : 8; | ||
| 296 | 	mach_msg_descriptor_type_t type : 8; | ||
| 297 | } mach_msg_port_descriptor_t; | ||
| 298 | |||
| 299 | |||
| 300 | typedef struct{ | ||
| 301 | 	uint32_t address; | ||
| 302 | 	mach_msg_size_t size; | ||
| 303 | 	boolean_t deallocate: 8; | ||
| 304 | 	mach_msg_copy_options_t copy: 8; | ||
| 305 | 	unsigned int pad1: 8; | ||
| 306 | 	mach_msg_descriptor_type_t type: 8; | ||
| 307 | } mach_msg_ool_descriptor32_t; | ||
| 308 | |||
| 309 | typedef struct{ | ||
| 310 | 	uint64_t address; | ||
| 311 | 	boolean_t deallocate: 8; | ||
| 312 | 	mach_msg_copy_options_t copy: 8; | ||
| 313 | 	unsigned int pad1: 8; | ||
| 314 | 	mach_msg_descriptor_type_t type: 8; | ||
| 315 | 	mach_msg_size_t size; | ||
| 316 | } mach_msg_ool_descriptor64_t; | ||
| 317 | |||
| 318 | typedef struct{ | ||
| 319 | 	void* address; | ||
| 320 | #if !defined(__LP64__) | ||
| 321 | 	mach_msg_size_t size; | ||
| 322 | #endif | ||
| 323 | 	boolean_t deallocate: 8; | ||
| 324 | 	mach_msg_copy_options_t copy: 8; | ||
| 325 | 	unsigned int pad1: 8; | ||
| 326 | 	mach_msg_descriptor_type_t type: 8; | ||
| 327 | #if defined(__LP64__) | ||
| 328 | 	mach_msg_size_t size; | ||
| 329 | #endif | ||
| 330 | } mach_msg_ool_descriptor_t; | ||
| 331 | |||
| 332 | typedef struct{ | ||
| 333 | 	uint32_t address; | ||
| 334 | 	mach_msg_size_t count; | ||
| 335 | 	boolean_t deallocate: 8; | ||
| 336 | 	mach_msg_copy_options_t copy: 8; | ||
| 337 | 	mach_msg_type_name_t disposition : 8; | ||
| 338 | 	mach_msg_descriptor_type_t type : 8; | ||
| 339 | } mach_msg_ool_ports_descriptor32_t; | ||
| 340 | |||
| 341 | typedef struct{ | ||
| 342 | 	uint64_t address; | ||
| 343 | 	boolean_t deallocate: 8; | ||
| 344 | 	mach_msg_copy_options_t copy: 8; | ||
| 345 | 	mach_msg_type_name_t disposition : 8; | ||
| 346 | 	mach_msg_descriptor_type_t type : 8; | ||
| 347 | 	mach_msg_size_t count; | ||
| 348 | } mach_msg_ool_ports_descriptor64_t; | ||
| 349 | |||
| 350 | typedef struct{ | ||
| 351 | 	void* address; | ||
| 352 | #if !defined(__LP64__) | ||
| 353 | 	mach_msg_size_t count; | ||
| 354 | #endif | ||
| 355 | 	boolean_t deallocate: 8; | ||
| 356 | 	mach_msg_copy_options_t copy: 8; | ||
| 357 | 	mach_msg_type_name_t disposition : 8; | ||
| 358 | 	mach_msg_descriptor_type_t type : 8; | ||
| 359 | #if defined(__LP64__) | ||
| 360 | 	mach_msg_size_t count; | ||
| 361 | #endif | ||
| 362 | } mach_msg_ool_ports_descriptor_t; | ||
| 363 | |||
| 364 | typedef struct{ | ||
| 365 | 	uint32_t context; | ||
| 366 | 	mach_port_name_t name; | ||
| 367 | 	mach_msg_guard_flags_t flags : 16; | ||
| 368 | 	mach_msg_type_name_t disposition : 8; | ||
| 369 | 	mach_msg_descriptor_type_t type : 8; | ||
| 370 | } mach_msg_guarded_port_descriptor32_t; | ||
| 371 | |||
| 372 | typedef struct{ | ||
| 373 | 	uint64_t context; | ||
| 374 | 	mach_msg_guard_flags_t flags : 16; | ||
| 375 | 	mach_msg_type_name_t disposition : 8; | ||
| 376 | 	mach_msg_descriptor_type_t type : 8; | ||
| 377 | 	mach_port_name_t name; | ||
| 378 | } mach_msg_guarded_port_descriptor64_t; | ||
| 379 | |||
| 380 | typedef struct{ | ||
| 381 | 	mach_port_context_t context; | ||
| 382 | #if !defined(__LP64__) | ||
| 383 | 	mach_port_name_t name; | ||
| 384 | #endif | ||
| 385 | 	mach_msg_guard_flags_t flags : 16; | ||
| 386 | 	mach_msg_type_name_t disposition : 8; | ||
| 387 | 	mach_msg_descriptor_type_t type : 8; | ||
| 388 | #if defined(__LP64__) | ||
| 389 | 	mach_port_name_t name; | ||
| 390 | #endif /* defined(__LP64__) */ | ||
| 391 | } mach_msg_guarded_port_descriptor_t; | ||
| 392 | |||
| 393 | /* | ||
| 394 | * LP64support - This union definition is not really | ||
| 395 | * appropriate in LP64 mode because not all descriptors | ||
| 396 | * are of the same size in that environment. | ||
| 397 | */ | ||
| 398 | typedef union{ | ||
| 399 | 	mach_msg_port_descriptor_t port; | ||
| 400 | 	mach_msg_ool_descriptor_t out_of_line; | ||
| 401 | 	mach_msg_ool_ports_descriptor_t ool_ports; | ||
| 402 | 	mach_msg_type_descriptor_t type; | ||
| 403 | 	mach_msg_guarded_port_descriptor_t guarded_port; | ||
| 404 | } mach_msg_descriptor_t; | ||
| 405 | |||
| 406 | typedef struct{ | ||
| 407 | 	mach_msg_size_t msgh_descriptor_count; | ||
| 408 | } mach_msg_body_t; | ||
| 409 | |||
| 410 | #define MACH_MSG_BODY_NULL ((mach_msg_body_t *) 0) | ||
| 411 | #define MACH_MSG_DESCRIPTOR_NULL ((mach_msg_descriptor_t *) 0) | ||
| 412 | |||
| 413 | typedef struct{ | ||
| 414 | 	mach_msg_bits_t msgh_bits; | ||
| 415 | 	mach_msg_size_t msgh_size; | ||
| 416 | 	mach_port_t msgh_remote_port; | ||
| 417 | 	mach_port_t msgh_local_port; | ||
| 418 | 	mach_port_name_t msgh_voucher_port; | ||
| 419 | 	mach_msg_id_t msgh_id; | ||
| 420 | } mach_msg_header_t; | ||
| 421 | |||
| 422 | #define msgh_reserved msgh_voucher_port | ||
| 423 | #define MACH_MSG_NULL ((mach_msg_header_t *) 0) | ||
| 424 | |||
| 425 | typedef struct{ | ||
| 426 | 	mach_msg_header_t header; | ||
| 427 | 	mach_msg_body_t body; | ||
| 428 | } mach_msg_base_t; | ||
| 429 | |||
| 430 | |||
| 431 | typedef unsigned int mach_msg_trailer_type_t; | ||
| 432 | |||
| 433 | #define MACH_MSG_TRAILER_FORMAT_0 0 | ||
| 434 | |||
| 435 | typedef unsigned int mach_msg_trailer_size_t; | ||
| 436 | typedef char *mach_msg_trailer_info_t; | ||
| 437 | |||
| 438 | typedef struct{ | ||
| 439 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 440 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 441 | } mach_msg_trailer_t; | ||
| 442 | |||
| 443 | /* | ||
| 444 | * The msgh_seqno field carries a sequence number | ||
| 445 | * associated with the received-from port. A port's | ||
| 446 | * sequence number is incremented every time a message | ||
| 447 | * is received from it and included in the received | ||
| 448 | * trailer to help put messages back in sequence if | ||
| 449 | * multiple threads receive and/or process received | ||
| 450 | * messages. | ||
| 451 | */ | ||
| 452 | typedef struct{ | ||
| 453 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 454 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 455 | 	mach_port_seqno_t msgh_seqno; | ||
| 456 | } mach_msg_seqno_trailer_t; | ||
| 457 | |||
| 458 | typedef struct{ | ||
| 459 | 	unsigned int val[2]; | ||
| 460 | } security_token_t; | ||
| 461 | |||
| 462 | typedef struct{ | ||
| 463 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 464 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 465 | 	mach_port_seqno_t msgh_seqno; | ||
| 466 | 	security_token_t msgh_sender; | ||
| 467 | } mach_msg_security_trailer_t; | ||
| 468 | |||
| 469 | /* | ||
| 470 | * The audit token is an opaque token which identifies | ||
| 471 | * Mach tasks and senders of Mach messages as subjects | ||
| 472 | * to the BSM audit system. Only the appropriate BSM | ||
| 473 | * library routines should be used to interpret the | ||
| 474 | * contents of the audit token as the representation | ||
| 475 | * of the subject identity within the token may change | ||
| 476 | * over time. | ||
| 477 | */ | ||
| 478 | typedef struct{ | ||
| 479 | 	unsigned int val[8]; | ||
| 480 | } audit_token_t; | ||
| 481 | |||
| 482 | typedef struct{ | ||
| 483 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 484 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 485 | 	mach_port_seqno_t msgh_seqno; | ||
| 486 | 	security_token_t msgh_sender; | ||
| 487 | 	audit_token_t msgh_audit; | ||
| 488 | } mach_msg_audit_trailer_t; | ||
| 489 | |||
| 490 | typedef struct{ | ||
| 491 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 492 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 493 | 	mach_port_seqno_t msgh_seqno; | ||
| 494 | 	security_token_t msgh_sender; | ||
| 495 | 	audit_token_t msgh_audit; | ||
| 496 | 	mach_port_context_t msgh_context; | ||
| 497 | } mach_msg_context_trailer_t; | ||
| 498 | |||
| 499 | |||
| 500 | |||
| 501 | typedef struct{ | ||
| 502 | 	mach_port_name_t sender; | ||
| 503 | } msg_labels_t; | ||
| 504 | |||
| 505 | typedef int mach_msg_filter_id; | ||
| 506 | #define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0 | ||
| 507 | |||
| 508 | /* | ||
| 509 | * Trailer type to pass MAC policy label info as a mach message trailer. | ||
| 510 | * | ||
| 511 | */ | ||
| 512 | |||
| 513 | typedef struct{ | ||
| 514 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 515 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 516 | 	mach_port_seqno_t msgh_seqno; | ||
| 517 | 	security_token_t msgh_sender; | ||
| 518 | 	audit_token_t msgh_audit; | ||
| 519 | 	mach_port_context_t msgh_context; | ||
| 520 | 	mach_msg_filter_id msgh_ad; | ||
| 521 | 	msg_labels_t msgh_labels; | ||
| 522 | } mach_msg_mac_trailer_t; | ||
| 523 | |||
| 524 | |||
| 525 | #define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t) | ||
| 526 | |||
| 527 | /* | ||
| 528 | * These values can change from release to release - but clearly | ||
| 529 | * code cannot request additional trailer elements one was not | ||
| 530 | * compiled to understand. Therefore, it is safe to use this | ||
| 531 | * constant when the same module specified the receive options. | ||
| 532 | * Otherwise, you run the risk that the options requested by | ||
| 533 | * another module may exceed the local modules notion of | ||
| 534 | * MAX_TRAILER_SIZE. | ||
| 535 | */ | ||
| 536 | |||
| 537 | typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; | ||
| 538 | #define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t)) | ||
| 539 | |||
| 540 | /* | ||
| 541 | * Legacy requirements keep us from ever updating these defines (even | ||
| 542 | * when the format_0 trailers gain new option data fields in the future). | ||
| 543 | * Therefore, they shouldn't be used going forward. Instead, the sizes | ||
| 544 | * should be compared against the specific element size requested using | ||
| 545 | * REQUESTED_TRAILER_SIZE. | ||
| 546 | */ | ||
| 547 | typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; | ||
| 548 | |||
| 549 | /*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t; | ||
| 550 | */ | ||
| 551 | |||
| 552 | #define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t) | ||
| 553 | |||
| 554 | #define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} } | ||
| 555 | extern const security_token_t KERNEL_SECURITY_TOKEN; | ||
| 556 | |||
| 557 | #define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} } | ||
| 558 | extern const audit_token_t KERNEL_AUDIT_TOKEN; | ||
| 559 | |||
| 560 | typedef integer_t mach_msg_options_t; | ||
| 561 | |||
| 562 | typedef struct{ | ||
| 563 | 	mach_msg_header_t header; | ||
| 564 | } mach_msg_empty_send_t; | ||
| 565 | |||
| 566 | typedef struct{ | ||
| 567 | 	mach_msg_header_t header; | ||
| 568 | 	mach_msg_trailer_t trailer; | ||
| 569 | } mach_msg_empty_rcv_t; | ||
| 570 | |||
| 571 | typedef union{ | ||
| 572 | 	mach_msg_empty_send_t send; | ||
| 573 | 	mach_msg_empty_rcv_t rcv; | ||
| 574 | } mach_msg_empty_t; | ||
| 575 | |||
| 576 | #pragma pack(pop) | ||
| 577 | |||
| 578 | /* utility to round the message size - will become machine dependent */ | ||
| 579 | #define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \ | ||
| 580 | 	 ~(sizeof (natural_t) - 1)) | ||
| 581 | |||
| 582 | |||
| 583 | /* | ||
| 584 | * There is no fixed upper bound to the size of Mach messages. | ||
| 585 | */ | ||
| 586 | #define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0) | ||
| 587 | |||
| 588 | #if defined(__APPLE_API_PRIVATE) | ||
| 589 | /* | ||
| 590 | * But architectural limits of a given implementation, or | ||
| 591 | * temporal conditions may cause unpredictable send failures | ||
| 592 | * for messages larger than MACH_MSG_SIZE_RELIABLE. | ||
| 593 | * | ||
| 594 | * In either case, waiting for memory is [currently] outside | ||
| 595 | * the scope of send timeout values provided to IPC. | ||
| 596 | */ | ||
| 597 | #define MACH_MSG_SIZE_RELIABLE ((mach_msg_size_t) 256 * 1024) | ||
| 598 | #endif | ||
| 599 | /* | ||
| 600 | * Compatibility definitions, for code written | ||
| 601 | * when there was a msgh_kind instead of msgh_seqno. | ||
| 602 | */ | ||
| 603 | #define MACH_MSGH_KIND_NORMAL 0x00000000 | ||
| 604 | #define MACH_MSGH_KIND_NOTIFICATION 0x00000001 | ||
| 605 | #define msgh_kind msgh_seqno | ||
| 606 | #define mach_msg_kind_t mach_port_seqno_t | ||
| 607 | |||
| 608 | typedef natural_t mach_msg_type_size_t; | ||
| 609 | typedef natural_t mach_msg_type_number_t; | ||
| 610 | |||
| 611 | /* | ||
| 612 | * Values received/carried in messages. Tells the receiver what | ||
| 613 | * sort of port right he now has. | ||
| 614 | * | ||
| 615 | * MACH_MSG_TYPE_PORT_NAME is used to transfer a port name | ||
| 616 | * which should remain uninterpreted by the kernel. (Port rights | ||
| 617 | * are not transferred, just the port name.) | ||
| 618 | */ | ||
| 619 | |||
| 620 | #define MACH_MSG_TYPE_PORT_NONE 0 | ||
| 621 | |||
| 622 | #define MACH_MSG_TYPE_PORT_NAME 15 | ||
| 623 | #define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE | ||
| 624 | #define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND | ||
| 625 | #define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE | ||
| 626 | |||
| 627 | #define MACH_MSG_TYPE_LAST 22 /* Last assigned */ | ||
| 628 | |||
| 629 | /* | ||
| 630 | * A dummy value. Mostly used to indicate that the actual value | ||
| 631 | * will be filled in later, dynamically. | ||
| 632 | */ | ||
| 633 | |||
| 634 | #define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1) | ||
| 635 | |||
| 636 | /* | ||
| 637 | *	Is a given item a port type? | ||
| 638 | */ | ||
| 639 | |||
| 640 | #define MACH_MSG_TYPE_PORT_ANY(x) \ | ||
| 641 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 642 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 643 | |||
| 644 | #define MACH_MSG_TYPE_PORT_ANY_SEND(x) \ | ||
| 645 | 	(((x) >= MACH_MSG_TYPE_MOVE_SEND) && \ | ||
| 646 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 647 | |||
| 648 | #define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \ | ||
| 649 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 650 | 	 ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE)) | ||
| 651 | |||
| 652 | typedef integer_t mach_msg_option_t; | ||
| 653 | |||
| 654 | #define MACH_MSG_OPTION_NONE 0x00000000 | ||
| 655 | |||
| 656 | #define MACH_SEND_MSG 0x00000001 | ||
| 657 | #define MACH_RCV_MSG 0x00000002 | ||
| 658 | |||
| 659 | #define MACH_RCV_LARGE 0x00000004 /* report large message sizes */ | ||
| 660 | #define MACH_RCV_LARGE_IDENTITY 0x00000008 /* identify source of large messages */ | ||
| 661 | |||
| 662 | #define MACH_SEND_TIMEOUT 0x00000010 /* timeout value applies to send */ | ||
| 663 | #define MACH_SEND_OVERRIDE 0x00000020 /* priority override for send */ | ||
| 664 | #define MACH_SEND_INTERRUPT 0x00000040 /* don't restart interrupted sends */ | ||
| 665 | #define MACH_SEND_NOTIFY 0x00000080 /* arm send-possible notify */ | ||
| 666 | #define MACH_SEND_ALWAYS 0x00010000 /* ignore qlimits - kernel only */ | ||
| 667 | #define MACH_SEND_FILTER_NONFATAL 0x00010000 /* rejection by message filter should return failure - user only */ | ||
| 668 | #define MACH_SEND_TRAILER 0x00020000 /* sender-provided trailer */ | ||
| 669 | #define MACH_SEND_NOIMPORTANCE 0x00040000 /* msg won't carry importance */ | ||
| 670 | #define MACH_SEND_NODENAP MACH_SEND_NOIMPORTANCE | ||
| 671 | #define MACH_SEND_IMPORTANCE 0x00080000 /* msg carries importance - kernel only */ | ||
| 672 | #define MACH_SEND_SYNC_OVERRIDE 0x00100000 /* msg should do sync IPC override (on legacy kernels) */ | ||
| 673 | #define MACH_SEND_PROPAGATE_QOS 0x00200000 /* IPC should propagate the caller's QoS */ | ||
| 674 | #define MACH_SEND_SYNC_USE_THRPRI MACH_SEND_PROPAGATE_QOS /* obsolete name */ | ||
| 675 | #define MACH_SEND_KERNEL 0x00400000 /* full send from kernel space - kernel only */ | ||
| 676 | #define MACH_SEND_SYNC_BOOTSTRAP_CHECKIN 0x00800000 /* special reply port should boost thread doing sync bootstrap checkin */ | ||
| 677 | |||
| 678 | #define MACH_RCV_TIMEOUT 0x00000100 /* timeout value applies to receive */ | ||
| 679 | #define MACH_RCV_NOTIFY 0x00000000 /* legacy name (value was: 0x00000200) */ | ||
| 680 | #define MACH_RCV_INTERRUPT 0x00000400 /* don't restart interrupted receive */ | ||
| 681 | #define MACH_RCV_VOUCHER 0x00000800 /* willing to receive voucher port */ | ||
| 682 | #define MACH_RCV_OVERWRITE 0x00000000 /* scatter receive (deprecated) */ | ||
| 683 | #define MACH_RCV_GUARDED_DESC 0x00001000 /* Can receive new guarded descriptor */ | ||
| 684 | #define MACH_RCV_SYNC_WAIT 0x00004000 /* sync waiter waiting for rcv */ | ||
| 685 | #define MACH_RCV_SYNC_PEEK 0x00008000 /* sync waiter waiting to peek */ | ||
| 686 | |||
| 687 | #define MACH_MSG_STRICT_REPLY 0x00000200 /* Enforce specific properties about the reply port, and | ||
| 688 | 	 * the context in which a thread replies to a message. | ||
| 689 | 	 * This flag must be passed on both the SEND and RCV */ | ||
| 690 | |||
| 691 | |||
| 692 | /* | ||
| 693 | * NOTE: a 0x00------ RCV mask implies to ask for | ||
| 694 | * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements, | ||
| 695 | * which is equivalent to a mach_msg_trailer_t. | ||
| 696 | * | ||
| 697 | * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS | ||
| 698 | * needs its own private bit since we only calculate its fields when absolutely | ||
| 699 | * required. | ||
| 700 | */ | ||
| 701 | #define MACH_RCV_TRAILER_NULL 0 | ||
| 702 | #define MACH_RCV_TRAILER_SEQNO 1 | ||
| 703 | #define MACH_RCV_TRAILER_SENDER 2 | ||
| 704 | #define MACH_RCV_TRAILER_AUDIT 3 | ||
| 705 | #define MACH_RCV_TRAILER_CTX 4 | ||
| 706 | #define MACH_RCV_TRAILER_AV 7 | ||
| 707 | #define MACH_RCV_TRAILER_LABELS 8 | ||
| 708 | |||
| 709 | #define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28) | ||
| 710 | #define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24) | ||
| 711 | #define MACH_RCV_TRAILER_MASK ((0xf << 24)) | ||
| 712 | |||
| 713 | #define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf) | ||
| 714 | |||
| 715 | |||
| 716 | /* | ||
| 717 | * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS, | ||
| 718 | * we just fall through to mach_msg_max_trailer_t. | ||
| 719 | * This is correct behavior since mach_msg_max_trailer_t is defined as | ||
| 720 | * mac_msg_mac_trailer_t which is used for the LABELS trailer. | ||
| 721 | * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed | ||
| 722 | * with one of the other options. | ||
| 723 | */ | ||
| 724 | |||
| 725 | #define REQUESTED_TRAILER_SIZE_NATIVE(y) \ | ||
| 726 | 	((mach_msg_trailer_size_t) \ | ||
| 727 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ | ||
| 728 | 	 sizeof(mach_msg_trailer_t) : \ | ||
| 729 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \ | ||
| 730 | 	 sizeof(mach_msg_seqno_trailer_t) : \ | ||
| 731 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \ | ||
| 732 | 	 sizeof(mach_msg_security_trailer_t) : \ | ||
| 733 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ | ||
| 734 | 	 sizeof(mach_msg_audit_trailer_t) : \ | ||
| 735 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \ | ||
| 736 | 	 sizeof(mach_msg_context_trailer_t) : \ | ||
| 737 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \ | ||
| 738 | 	 sizeof(mach_msg_mac_trailer_t) : \ | ||
| 739 | 	 sizeof(mach_msg_max_trailer_t)))))))) | ||
| 740 | |||
| 741 | |||
| 742 | #define REQUESTED_TRAILER_SIZE(y) REQUESTED_TRAILER_SIZE_NATIVE(y) | ||
| 743 | |||
| 744 | /* | ||
| 745 | * Much code assumes that mach_msg_return_t == kern_return_t. | ||
| 746 | * This definition is useful for descriptive purposes. | ||
| 747 | * | ||
| 748 | * See <mach/error.h> for the format of error codes. | ||
| 749 | * IPC errors are system 4. Send errors are subsystem 0; | ||
| 750 | * receive errors are subsystem 1. The code field is always non-zero. | ||
| 751 | * The high bits of the code field communicate extra information | ||
| 752 | * for some error codes. MACH_MSG_MASK masks off these special bits. | ||
| 753 | */ | ||
| 754 | |||
| 755 | typedef kern_return_t mach_msg_return_t; | ||
| 756 | |||
| 757 | #define MACH_MSG_SUCCESS 0x00000000 | ||
| 758 | |||
| 759 | |||
| 760 | #define MACH_MSG_MASK 0x00003e00 | ||
| 761 | /* All special error code bits defined below. */ | ||
| 762 | #define MACH_MSG_IPC_SPACE 0x00002000 | ||
| 763 | /* No room in IPC name space for another capability name. */ | ||
| 764 | #define MACH_MSG_VM_SPACE 0x00001000 | ||
| 765 | /* No room in VM address space for out-of-line memory. */ | ||
| 766 | #define MACH_MSG_IPC_KERNEL 0x00000800 | ||
| 767 | /* Kernel resource shortage handling an IPC capability. */ | ||
| 768 | #define MACH_MSG_VM_KERNEL 0x00000400 | ||
| 769 | /* Kernel resource shortage handling out-of-line memory. */ | ||
| 770 | |||
| 771 | #define MACH_SEND_IN_PROGRESS 0x10000001 | ||
| 772 | /* Thread is waiting to send. (Internal use only.) */ | ||
| 773 | #define MACH_SEND_INVALID_DATA 0x10000002 | ||
| 774 | /* Bogus in-line data. */ | ||
| 775 | #define MACH_SEND_INVALID_DEST 0x10000003 | ||
| 776 | /* Bogus destination port. */ | ||
| 777 | #define MACH_SEND_TIMED_OUT 0x10000004 | ||
| 778 | /* Message not sent before timeout expired. */ | ||
| 779 | #define MACH_SEND_INVALID_VOUCHER 0x10000005 | ||
| 780 | /* Bogus voucher port. */ | ||
| 781 | #define MACH_SEND_INTERRUPTED 0x10000007 | ||
| 782 | /* Software interrupt. */ | ||
| 783 | #define MACH_SEND_MSG_TOO_SMALL 0x10000008 | ||
| 784 | /* Data doesn't contain a complete message. */ | ||
| 785 | #define MACH_SEND_INVALID_REPLY 0x10000009 | ||
| 786 | /* Bogus reply port. */ | ||
| 787 | #define MACH_SEND_INVALID_RIGHT 0x1000000a | ||
| 788 | /* Bogus port rights in the message body. */ | ||
| 789 | #define MACH_SEND_INVALID_NOTIFY 0x1000000b | ||
| 790 | /* Bogus notify port argument. */ | ||
| 791 | #define MACH_SEND_INVALID_MEMORY 0x1000000c | ||
| 792 | /* Invalid out-of-line memory pointer. */ | ||
| 793 | #define MACH_SEND_NO_BUFFER 0x1000000d | ||
| 794 | /* No message buffer is available. */ | ||
| 795 | #define MACH_SEND_TOO_LARGE 0x1000000e | ||
| 796 | /* Send is too large for port */ | ||
| 797 | #define MACH_SEND_INVALID_TYPE 0x1000000f | ||
| 798 | /* Invalid msg-type specification. */ | ||
| 799 | #define MACH_SEND_INVALID_HEADER 0x10000010 | ||
| 800 | /* A field in the header had a bad value. */ | ||
| 801 | #define MACH_SEND_INVALID_TRAILER 0x10000011 | ||
| 802 | /* The trailer to be sent does not match kernel format. */ | ||
| 803 | #define MACH_SEND_INVALID_CONTEXT 0x10000012 | ||
| 804 | /* The sending thread context did not match the context on the dest port */ | ||
| 805 | #define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015 | ||
| 806 | /* compatibility: no longer a returned error */ | ||
| 807 | #define MACH_SEND_NO_GRANT_DEST 0x10000016 | ||
| 808 | /* The destination port doesn't accept ports in body */ | ||
| 809 | #define MACH_SEND_MSG_FILTERED 0x10000017 | ||
| 810 | /* Message send was rejected by message filter */ | ||
| 811 | |||
| 812 | #define MACH_RCV_IN_PROGRESS 0x10004001 | ||
| 813 | /* Thread is waiting for receive. (Internal use only.) */ | ||
| 814 | #define MACH_RCV_INVALID_NAME 0x10004002 | ||
| 815 | /* Bogus name for receive port/port-set. */ | ||
| 816 | #define MACH_RCV_TIMED_OUT 0x10004003 | ||
| 817 | /* Didn't get a message within the timeout value. */ | ||
| 818 | #define MACH_RCV_TOO_LARGE 0x10004004 | ||
| 819 | /* Message buffer is not large enough for inline data. */ | ||
| 820 | #define MACH_RCV_INTERRUPTED 0x10004005 | ||
| 821 | /* Software interrupt. */ | ||
| 822 | #define MACH_RCV_PORT_CHANGED 0x10004006 | ||
| 823 | /* compatibility: no longer a returned error */ | ||
| 824 | #define MACH_RCV_INVALID_NOTIFY 0x10004007 | ||
| 825 | /* Bogus notify port argument. */ | ||
| 826 | #define MACH_RCV_INVALID_DATA 0x10004008 | ||
| 827 | /* Bogus message buffer for inline data. */ | ||
| 828 | #define MACH_RCV_PORT_DIED 0x10004009 | ||
| 829 | /* Port/set was sent away/died during receive. */ | ||
| 830 | #define MACH_RCV_IN_SET 0x1000400a | ||
| 831 | /* compatibility: no longer a returned error */ | ||
| 832 | #define MACH_RCV_HEADER_ERROR 0x1000400b | ||
| 833 | /* Error receiving message header. See special bits. */ | ||
| 834 | #define MACH_RCV_BODY_ERROR 0x1000400c | ||
| 835 | /* Error receiving message body. See special bits. */ | ||
| 836 | #define MACH_RCV_INVALID_TYPE 0x1000400d | ||
| 837 | /* Invalid msg-type specification in scatter list. */ | ||
| 838 | #define MACH_RCV_SCATTER_SMALL 0x1000400e | ||
| 839 | /* Out-of-line overwrite region is not large enough */ | ||
| 840 | #define MACH_RCV_INVALID_TRAILER 0x1000400f | ||
| 841 | /* trailer type or number of trailer elements not supported */ | ||
| 842 | #define MACH_RCV_IN_PROGRESS_TIMED 0x10004011 | ||
| 843 | /* Waiting for receive with timeout. (Internal use only.) */ | ||
| 844 | #define MACH_RCV_INVALID_REPLY 0x10004012 | ||
| 845 | /* invalid reply port used in a STRICT_REPLY message */ | ||
| 846 | |||
| 847 | |||
| 848 | |||
| 849 | __BEGIN_DECLS | ||
| 850 | |||
| 851 | /* | ||
| 852 | *	Routine:	mach_msg_overwrite | ||
| 853 | *	Purpose: | ||
| 854 | *		Send and/or receive a message. If the message operation | ||
| 855 | *		is interrupted, and the user did not request an indication | ||
| 856 | *		of that fact, then restart the appropriate parts of the | ||
| 857 | *		operation silently (trap version does not restart). | ||
| 858 | * | ||
| 859 | *		Distinct send and receive buffers may be specified. If | ||
| 860 | *		no separate receive buffer is specified, the msg parameter | ||
| 861 | *		will be used for both send and receive operations. | ||
| 862 | * | ||
| 863 | *		In addition to a distinct receive buffer, that buffer may | ||
| 864 | *		already contain scatter control information to direct the | ||
| 865 | *		receiving of the message. | ||
| 866 | */ | ||
| 867 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 868 | extern mach_msg_return_t mach_msg_overwrite( | ||
| 869 | 	mach_msg_header_t *msg, | ||
| 870 | 	mach_msg_option_t option, | ||
| 871 | 	mach_msg_size_t send_size, | ||
| 872 | 	mach_msg_size_t rcv_size, | ||
| 873 | 	mach_port_name_t rcv_name, | ||
| 874 | 	mach_msg_timeout_t timeout, | ||
| 875 | 	mach_port_name_t notify, | ||
| 876 | 	mach_msg_header_t *rcv_msg, | ||
| 877 | 	mach_msg_size_t rcv_limit); | ||
| 878 | |||
| 879 | |||
| 880 | /* | ||
| 881 | *	Routine:	mach_msg | ||
| 882 | *	Purpose: | ||
| 883 | *		Send and/or receive a message. If the message operation | ||
| 884 | *		is interrupted, and the user did not request an indication | ||
| 885 | *		of that fact, then restart the appropriate parts of the | ||
| 886 | *		operation silently (trap version does not restart). | ||
| 887 | */ | ||
| 888 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 889 | extern mach_msg_return_t mach_msg( | ||
| 890 | 	mach_msg_header_t *msg, | ||
| 891 | 	mach_msg_option_t option, | ||
| 892 | 	mach_msg_size_t send_size, | ||
| 893 | 	mach_msg_size_t rcv_size, | ||
| 894 | 	mach_port_name_t rcv_name, | ||
| 895 | 	mach_msg_timeout_t timeout, | ||
| 896 | 	mach_port_name_t notify); | ||
| 897 | |||
| 898 | /* | ||
| 899 | *	Routine:	mach_voucher_deallocate | ||
| 900 | *	Purpose: | ||
| 901 | *		Deallocate a mach voucher created or received in a message. Drops | ||
| 902 | *		one (send right) reference to the voucher. | ||
| 903 | */ | ||
| 904 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 905 | extern kern_return_t mach_voucher_deallocate( | ||
| 906 | 	mach_port_name_t voucher); | ||
| 907 | |||
| 908 | |||
| 909 | __END_DECLS | ||
| 910 | |||
| 911 | #endif /* _MACH_MESSAGE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/mig.h-1| ... | @@ -151,7 +151,6 @@ typedef struct mig_symtab { | ... | @@ -151,7 +151,6 @@ typedef struct mig_symtab { |
| 151 | #define MIG_SERVER_ROUTINE | 151 | #define MIG_SERVER_ROUTINE |
| 152 | #endif | 152 | #endif |
| 153 | 153 | ||
| 154 | |||
| 155 | __BEGIN_DECLS | 154 | __BEGIN_DECLS |
| 156 | 155 | ||
| 157 | /* Client side reply port allocate */ | 156 | /* Client side reply port allocate */ |
lib/libc/include/any-macos-any/mach/port.h created+477| ... | @@ -0,0 +1,477 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | */ | ||
| 62 | /* | ||
| 63 | */ | ||
| 64 | /* | ||
| 65 | *	File:	mach/port.h | ||
| 66 | * | ||
| 67 | *	Definition of a Mach port | ||
| 68 | * | ||
| 69 | *	Mach ports are the endpoints to Mach-implemented communications | ||
| 70 | *	channels (usually uni-directional message queues, but other types | ||
| 71 | *	also exist). | ||
| 72 | * | ||
| 73 | *	Unique collections of these endpoints are maintained for each | ||
| 74 | *	Mach task. Each Mach port in the task's collection is given a | ||
| 75 | *	[task-local] name to identify it - and the the various "rights" | ||
| 76 | *	held by the task for that specific endpoint. | ||
| 77 | * | ||
| 78 | *	This header defines the types used to identify these Mach ports | ||
| 79 | *	and the various rights associated with them. For more info see: | ||
| 80 | * | ||
| 81 | *	<mach/mach_port.h> - manipulation of port rights in a given space | ||
| 82 | *	<mach/message.h> - message queue [and port right passing] mechanism | ||
| 83 | * | ||
| 84 | */ | ||
| 85 | |||
| 86 | #ifndef _MACH_PORT_H_ | ||
| 87 | #define _MACH_PORT_H_ | ||
| 88 | |||
| 89 | #include <sys/cdefs.h> | ||
| 90 | #include <stdint.h> | ||
| 91 | #include <mach/boolean.h> | ||
| 92 | #include <mach/machine/vm_types.h> | ||
| 93 | |||
| 94 | /* | ||
| 95 | *	mach_port_name_t - the local identity for a Mach port | ||
| 96 | * | ||
| 97 | *	The name is Mach port namespace specific. It is used to | ||
| 98 | *	identify the rights held for that port by the task whose | ||
| 99 | *	namespace is implied [or specifically provided]. | ||
| 100 | * | ||
| 101 | *	Use of this type usually implies just a name - no rights. | ||
| 102 | *	See mach_port_t for a type that implies a "named right." | ||
| 103 | * | ||
| 104 | */ | ||
| 105 | |||
| 106 | typedef natural_t mach_port_name_t; | ||
| 107 | typedef mach_port_name_t *mach_port_name_array_t; | ||
| 108 | |||
| 109 | |||
| 110 | /* | ||
| 111 | *	mach_port_t - a named port right | ||
| 112 | * | ||
| 113 | *	In user-space, "rights" are represented by the name of the | ||
| 114 | *	right in the Mach port namespace. Even so, this type is | ||
| 115 | *	presented as a unique one to more clearly denote the presence | ||
| 116 | *	of a right coming along with the name. | ||
| 117 | * | ||
| 118 | *	Often, various rights for a port held in a single name space | ||
| 119 | *	will coalesce and are, therefore, be identified by a single name | ||
| 120 | *	[this is the case for send and receive rights]. But not | ||
| 121 | *	always [send-once rights currently get a unique name for | ||
| 122 | *	each right]. | ||
| 123 | * | ||
| 124 | */ | ||
| 125 | |||
| 126 | #include <sys/_types.h> | ||
| 127 | #include <sys/_types/_mach_port_t.h> | ||
| 128 | |||
| 129 | |||
| 130 | typedef mach_port_t *mach_port_array_t; | ||
| 131 | |||
| 132 | /* | ||
| 133 | * MACH_PORT_NULL is a legal value that can be carried in messages. | ||
| 134 | * It indicates the absence of any port or port rights. (A port | ||
| 135 | * argument keeps the message from being "simple", even if the | ||
| 136 | * value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal | ||
| 137 | * value that can be carried in messages. It indicates | ||
| 138 | * that a port right was present, but it died. | ||
| 139 | */ | ||
| 140 | |||
| 141 | #define MACH_PORT_NULL 0 /* intentional loose typing */ | ||
| 142 | #define MACH_PORT_DEAD ((mach_port_name_t) ~0) | ||
| 143 | #define MACH_PORT_VALID(name) \ | ||
| 144 | 	 (((name) != MACH_PORT_NULL) && \ | ||
| 145 | 	 ((name) != MACH_PORT_DEAD)) | ||
| 146 | |||
| 147 | |||
| 148 | /* | ||
| 149 | *	For kernel-selected [assigned] port names, the name is | ||
| 150 | *	comprised of two parts: a generation number and an index. | ||
| 151 | *	This approach keeps the exact same name from being generated | ||
| 152 | *	and reused too quickly [to catch right/reference counting bugs]. | ||
| 153 | *	The dividing line between the constituent parts is exposed so | ||
| 154 | *	that efficient "mach_port_name_t to data structure pointer" | ||
| 155 | *	conversion implementation can be made. But it is possible | ||
| 156 | *	for user-level code to assign their own names to Mach ports. | ||
| 157 | *	These are not required to participate in this algorithm. So | ||
| 158 | *	care should be taken before "assuming" this model. | ||
| 159 | * | ||
| 160 | */ | ||
| 161 | |||
| 162 | #ifndef NO_PORT_GEN | ||
| 163 | |||
| 164 | #define MACH_PORT_INDEX(name) ((name) >> 8) | ||
| 165 | #define MACH_PORT_GEN(name) (((name) & 0xff) << 24) | ||
| 166 | #define MACH_PORT_MAKE(index, gen) \ | ||
| 167 | 	 (((index) << 8) | (gen) >> 24) | ||
| 168 | |||
| 169 | #else /* NO_PORT_GEN */ | ||
| 170 | |||
| 171 | #define MACH_PORT_INDEX(name) (name) | ||
| 172 | #define MACH_PORT_GEN(name) (0) | ||
| 173 | #define MACH_PORT_MAKE(index, gen) (index) | ||
| 174 | |||
| 175 | #endif /* NO_PORT_GEN */ | ||
| 176 | |||
| 177 | |||
| 178 | /* | ||
| 179 | * These are the different rights a task may have for a port. | ||
| 180 | * The MACH_PORT_RIGHT_* definitions are used as arguments | ||
| 181 | * to mach_port_allocate, mach_port_get_refs, etc, to specify | ||
| 182 | * a particular right to act upon. The mach_port_names and | ||
| 183 | * mach_port_type calls return bitmasks using the MACH_PORT_TYPE_* | ||
| 184 | * definitions. This is because a single name may denote | ||
| 185 | * multiple rights. | ||
| 186 | */ | ||
| 187 | |||
| 188 | typedef natural_t mach_port_right_t; | ||
| 189 | |||
| 190 | #define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0) | ||
| 191 | #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) | ||
| 192 | #define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2) | ||
| 193 | #define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3) | ||
| 194 | #define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4) | ||
| 195 | #define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) /* obsolete right */ | ||
| 196 | #define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) /* right not implemented */ | ||
| 197 | |||
| 198 | |||
| 199 | typedef natural_t mach_port_type_t; | ||
| 200 | typedef mach_port_type_t *mach_port_type_array_t; | ||
| 201 | |||
| 202 | #define MACH_PORT_TYPE(right) \ | ||
| 203 | 	 ((mach_port_type_t)(((mach_port_type_t) 1) \ | ||
| 204 | 	 << ((right) + ((mach_port_right_t) 16)))) | ||
| 205 | #define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L) | ||
| 206 | #define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND) | ||
| 207 | #define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE) | ||
| 208 | #define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE) | ||
| 209 | #define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET) | ||
| 210 | #define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME) | ||
| 211 | #define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) /* obsolete */ | ||
| 212 | |||
| 213 | |||
| 214 | /* Convenient combinations. */ | ||
| 215 | |||
| 216 | #define MACH_PORT_TYPE_SEND_RECEIVE \ | ||
| 217 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE) | ||
| 218 | #define MACH_PORT_TYPE_SEND_RIGHTS \ | ||
| 219 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE) | ||
| 220 | #define MACH_PORT_TYPE_PORT_RIGHTS \ | ||
| 221 | 	 (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE) | ||
| 222 | #define MACH_PORT_TYPE_PORT_OR_DEAD \ | ||
| 223 | 	 (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME) | ||
| 224 | #define MACH_PORT_TYPE_ALL_RIGHTS \ | ||
| 225 | 	 (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET) | ||
| 226 | |||
| 227 | /* Dummy type bits that mach_port_type/mach_port_names can return. */ | ||
| 228 | |||
| 229 | #define MACH_PORT_TYPE_DNREQUEST 0x80000000 | ||
| 230 | #define MACH_PORT_TYPE_SPREQUEST 0x40000000 | ||
| 231 | #define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000 | ||
| 232 | |||
| 233 | /* User-references for capabilities. */ | ||
| 234 | |||
| 235 | typedef natural_t mach_port_urefs_t; | ||
| 236 | typedef integer_t mach_port_delta_t; /* change in urefs */ | ||
| 237 | |||
| 238 | /* Attributes of ports. (See mach_port_get_receive_status.) */ | ||
| 239 | |||
| 240 | typedef natural_t mach_port_seqno_t; /* sequence number */ | ||
| 241 | typedef natural_t mach_port_mscount_t; /* make-send count */ | ||
| 242 | typedef natural_t mach_port_msgcount_t; /* number of msgs */ | ||
| 243 | typedef natural_t mach_port_rights_t; /* number of rights */ | ||
| 244 | |||
| 245 | /* | ||
| 246 | *	Are there outstanding send rights for a given port? | ||
| 247 | */ | ||
| 248 | #define MACH_PORT_SRIGHTS_NONE 0 /* no srights */ | ||
| 249 | #define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */ | ||
| 250 | typedef unsigned int mach_port_srights_t; /* status of send rights */ | ||
| 251 | |||
| 252 | typedef struct mach_port_status { | ||
| 253 | 	mach_port_rights_t mps_pset; /* count of containing port sets */ | ||
| 254 | 	mach_port_seqno_t mps_seqno; /* sequence number */ | ||
| 255 | 	mach_port_mscount_t mps_mscount; /* make-send count */ | ||
| 256 | 	mach_port_msgcount_t mps_qlimit; /* queue limit */ | ||
| 257 | 	mach_port_msgcount_t mps_msgcount; /* number in the queue */ | ||
| 258 | 	mach_port_rights_t mps_sorights; /* how many send-once rights */ | ||
| 259 | 	boolean_t mps_srights; /* do send rights exist? */ | ||
| 260 | 	boolean_t mps_pdrequest; /* port-deleted requested? */ | ||
| 261 | 	boolean_t mps_nsrequest; /* no-senders requested? */ | ||
| 262 | 	natural_t mps_flags; /* port flags */ | ||
| 263 | } mach_port_status_t; | ||
| 264 | |||
| 265 | /* System-wide values for setting queue limits on a port */ | ||
| 266 | #define MACH_PORT_QLIMIT_ZERO (0) | ||
| 267 | #define MACH_PORT_QLIMIT_BASIC (5) | ||
| 268 | #define MACH_PORT_QLIMIT_SMALL (16) | ||
| 269 | #define MACH_PORT_QLIMIT_LARGE (1024) | ||
| 270 | #define MACH_PORT_QLIMIT_KERNEL (65534) | ||
| 271 | #define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO | ||
| 272 | #define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC | ||
| 273 | #define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE | ||
| 274 | |||
| 275 | typedef struct mach_port_limits { | ||
| 276 | 	mach_port_msgcount_t mpl_qlimit; /* number of msgs */ | ||
| 277 | } mach_port_limits_t; | ||
| 278 | |||
| 279 | /* Possible values for mps_flags (part of mach_port_status_t) */ | ||
| 280 | #define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01 | ||
| 281 | #define MACH_PORT_STATUS_FLAG_GUARDED 0x02 | ||
| 282 | #define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04 | ||
| 283 | #define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08 | ||
| 284 | #define MACH_PORT_STATUS_FLAG_REVIVE 0x10 | ||
| 285 | #define MACH_PORT_STATUS_FLAG_TASKPTR 0x20 | ||
| 286 | #define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40 | ||
| 287 | #define MACH_PORT_STATUS_FLAG_NO_GRANT 0x80 | ||
| 288 | |||
| 289 | typedef struct mach_port_info_ext { | ||
| 290 | 	mach_port_status_t mpie_status; | ||
| 291 | 	mach_port_msgcount_t mpie_boost_cnt; | ||
| 292 | 	uint32_t reserved[6]; | ||
| 293 | } mach_port_info_ext_t; | ||
| 294 | |||
| 295 | typedef struct mach_port_guard_info { | ||
| 296 | 	uint64_t mpgi_guard; /* guard value */ | ||
| 297 | } mach_port_guard_info_t; | ||
| 298 | |||
| 299 | typedef integer_t *mach_port_info_t; /* varying array of natural_t */ | ||
| 300 | |||
| 301 | /* Flavors for mach_port_get/set/assert_attributes() */ | ||
| 302 | typedef int mach_port_flavor_t; | ||
| 303 | #define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_limits_t */ | ||
| 304 | #define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_status_t */ | ||
| 305 | #define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */ | ||
| 306 | #define MACH_PORT_TEMPOWNER 4 /* indicates receive right will be reassigned to another task */ | ||
| 307 | #define MACH_PORT_IMPORTANCE_RECEIVER 5 /* indicates recieve right accepts priority donation */ | ||
| 308 | #define MACH_PORT_DENAP_RECEIVER 6 /* indicates receive right accepts de-nap donation */ | ||
| 309 | #define MACH_PORT_INFO_EXT 7 /* uses mach_port_info_ext_t */ | ||
| 310 | #define MACH_PORT_GUARD_INFO 8 /* asserts if the strict guard value is correct */ | ||
| 311 | |||
| 312 | #define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \ | ||
| 313 | 	(sizeof(mach_port_limits_t)/sizeof(natural_t))) | ||
| 314 | #define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \ | ||
| 315 | 	(sizeof(mach_port_status_t)/sizeof(natural_t))) | ||
| 316 | #define MACH_PORT_DNREQUESTS_SIZE_COUNT 1 | ||
| 317 | #define MACH_PORT_INFO_EXT_COUNT ((natural_t) \ | ||
| 318 | 	(sizeof(mach_port_info_ext_t)/sizeof(natural_t))) | ||
| 319 | #define MACH_PORT_GUARD_INFO_COUNT ((natural_t) \ | ||
| 320 | 	(sizeof(mach_port_guard_info_t)/sizeof(natural_t))) | ||
| 321 | |||
| 322 | /* | ||
| 323 | * Structure used to pass information about port allocation requests. | ||
| 324 | * Must be padded to 64-bits total length. | ||
| 325 | */ | ||
| 326 | typedef struct mach_port_qos { | ||
| 327 | 	unsigned int name:1; /* name given */ | ||
| 328 | 	unsigned int prealloc:1; /* prealloced message */ | ||
| 329 | 	boolean_t pad1:30; | ||
| 330 | 	natural_t len; | ||
| 331 | } mach_port_qos_t; | ||
| 332 | |||
| 333 | /* | ||
| 334 | * Structure used to pass information about the service port | ||
| 335 | */ | ||
| 336 | #define MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN 255 /* Maximum length of the port string name buffer */ | ||
| 337 | |||
| 338 | typedef struct mach_service_port_info { | ||
| 339 | 	char mspi_string_name[MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN]; /* Service port's string name */ | ||
| 340 | 	uint8_t mspi_domain_type; /* Service port domain */ | ||
| 341 | } mach_service_port_info_data_t; | ||
| 342 | |||
| 343 | #define MACH_SERVICE_PORT_INFO_COUNT ((char) \ | ||
| 344 | 	(sizeof(mach_service_port_info_data_t)/sizeof(char))) | ||
| 345 | |||
| 346 | typedef struct mach_service_port_info * mach_service_port_info_t; | ||
| 347 | |||
| 348 | /* | ||
| 349 | * Flags for mach_port_options (used for | ||
| 350 | * invocation of mach_port_construct). | ||
| 351 | * Indicates attributes to be set for the newly | ||
| 352 | * allocated port. | ||
| 353 | */ | ||
| 354 | #define MPO_CONTEXT_AS_GUARD 0x01 /* Add guard to the port */ | ||
| 355 | #define MPO_QLIMIT 0x02 /* Set qlimit for the port msg queue */ | ||
| 356 | #define MPO_TEMPOWNER 0x04 /* Set the tempowner bit of the port */ | ||
| 357 | #define MPO_IMPORTANCE_RECEIVER 0x08 /* Mark the port as importance receiver */ | ||
| 358 | #define MPO_INSERT_SEND_RIGHT 0x10 /* Insert a send right for the port */ | ||
| 359 | #define MPO_STRICT 0x20 /* Apply strict guarding for port */ | ||
| 360 | #define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */ | ||
| 361 | #define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */ | ||
| 362 | #define MPO_FILTER_MSG 0x100 /* Allow message filtering */ | ||
| 363 | #define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */ | ||
| 364 | #define MPO_SERVICE_PORT 0x400 /* Create a service port with the given name; should be used only by launchd */ | ||
| 365 | #define MPO_CONNECTION_PORT 0x800 /* Derive new peer connection port from a given service port */ | ||
| 366 | |||
| 367 | /* | ||
| 368 | * Structure to define optional attributes for a newly | ||
| 369 | * constructed port. | ||
| 370 | */ | ||
| 371 | typedef struct mach_port_options { | ||
| 372 | 	uint32_t flags; /* Flags defining attributes for port */ | ||
| 373 | 	mach_port_limits_t mpl; /* Message queue limit for port */ | ||
| 374 | 	union { | ||
| 375 | 		uint64_t reserved[2]; /* Reserved */ | ||
| 376 | 		mach_port_name_t work_interval_port; /* Work interval port */ | ||
| 377 | 		mach_service_port_info_t service_port_info; /* Service port (MPO_SERVICE_PORT) */ | ||
| 378 | 		mach_port_name_t service_port_name; /* Service port (MPO_CONNECTION_PORT) */ | ||
| 379 | 	}; | ||
| 380 | }mach_port_options_t; | ||
| 381 | |||
| 382 | typedef mach_port_options_t *mach_port_options_ptr_t; | ||
| 383 | |||
| 384 | /* Mach Port Guarding definitions */ | ||
| 385 | |||
| 386 | /* | ||
| 387 | * EXC_GUARD represents a guard violation for both | ||
| 388 | * mach ports and file descriptors. GUARD_TYPE_ is used | ||
| 389 | * to differentiate among them. | ||
| 390 | */ | ||
| 391 | #define GUARD_TYPE_MACH_PORT 0x1 | ||
| 392 | |||
| 393 | /* Reasons for exception for a guarded mach port */ | ||
| 394 | enum mach_port_guard_exception_codes { | ||
| 395 | 	kGUARD_EXC_DESTROY = 1u << 0, | ||
| 396 | 	kGUARD_EXC_MOD_REFS = 1u << 1, | ||
| 397 | 	kGUARD_EXC_SET_CONTEXT = 1u << 2, | ||
| 398 | 	kGUARD_EXC_UNGUARDED = 1u << 3, | ||
| 399 | 	kGUARD_EXC_INCORRECT_GUARD = 1u << 4, | ||
| 400 | 	kGUARD_EXC_IMMOVABLE = 1u << 5, | ||
| 401 | 	kGUARD_EXC_STRICT_REPLY = 1u << 6, | ||
| 402 | 	kGUARD_EXC_MSG_FILTERED = 1u << 7, | ||
| 403 | 	/* start of [optionally] non-fatal guards */ | ||
| 404 | 	kGUARD_EXC_INVALID_RIGHT = 1u << 8, | ||
| 405 | 	kGUARD_EXC_INVALID_NAME = 1u << 9, | ||
| 406 | 	kGUARD_EXC_INVALID_VALUE = 1u << 10, | ||
| 407 | 	kGUARD_EXC_INVALID_ARGUMENT = 1u << 11, | ||
| 408 | 	kGUARD_EXC_RIGHT_EXISTS = 1u << 12, | ||
| 409 | 	kGUARD_EXC_KERN_NO_SPACE = 1u << 13, | ||
| 410 | 	kGUARD_EXC_KERN_FAILURE = 1u << 14, | ||
| 411 | 	kGUARD_EXC_KERN_RESOURCE = 1u << 15, | ||
| 412 | 	kGUARD_EXC_SEND_INVALID_REPLY = 1u << 16, | ||
| 413 | 	kGUARD_EXC_SEND_INVALID_VOUCHER = 1u << 17, | ||
| 414 | 	kGUARD_EXC_SEND_INVALID_RIGHT = 1u << 18, | ||
| 415 | 	kGUARD_EXC_RCV_INVALID_NAME = 1u << 19, | ||
| 416 | 	/* start of always non-fatal guards */ | ||
| 417 | 	kGUARD_EXC_RCV_GUARDED_DESC = 1u << 20, /* for development only */ | ||
| 418 | 	kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21, | ||
| 419 | 	kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22, | ||
| 420 | }; | ||
| 421 | |||
| 422 | #define MAX_FATAL_kGUARD_EXC_CODE (1u << 7) | ||
| 423 | |||
| 424 | /* | ||
| 425 | * Mach port guard flags. | ||
| 426 | */ | ||
| 427 | #define MPG_FLAGS_NONE (0x00ull) | ||
| 428 | |||
| 429 | #define MAX_OPTIONAL_kGUARD_EXC_CODE (1u << 19) | ||
| 430 | |||
| 431 | /* | ||
| 432 | * These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions. | ||
| 433 | */ | ||
| 434 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP (0x01ull << 56) | ||
| 435 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT (0x02ull << 56) | ||
| 436 | #define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER (0x04ull << 56) | ||
| 437 | #define MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR (0x08ull << 56) | ||
| 438 | #define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA (0x10ull << 56) | ||
| 439 | #define MPG_FLAGS_STRICT_REPLY_MASK (0xffull << 56) | ||
| 440 | |||
| 441 | /* | ||
| 442 | * These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions. | ||
| 443 | */ | ||
| 444 | #define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC (0x01ull << 56) | ||
| 445 | #define MPG_FLAGS_MOD_REFS_PINNED_DESTROY (0x02ull << 56) | ||
| 446 | #define MPG_FLAGS_MOD_REFS_PINNED_COPYIN (0x04ull << 56) | ||
| 447 | |||
| 448 | /* | ||
| 449 | * These flags are used as bits in the subcode of kGUARD_EXC_IMMOVABLE exceptions. | ||
| 450 | */ | ||
| 451 | #define MPG_FLAGS_IMMOVABLE_PINNED (0x01ull << 56) | ||
| 452 | |||
| 453 | /* | ||
| 454 | * Flags for mach_port_guard_with_flags. These flags extend | ||
| 455 | * the attributes associated with a guarded port. | ||
| 456 | */ | ||
| 457 | #define MPG_STRICT 0x01 /* Apply strict guarding for a port */ | ||
| 458 | #define MPG_IMMOVABLE_RECEIVE 0x02 /* Receive right cannot be moved out of the space */ | ||
| 459 | |||
| 460 | #if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH) | ||
| 461 | /* | ||
| 462 | * Mach 3.0 renamed everything to have mach_ in front of it. | ||
| 463 | * These types and macros are provided for backward compatibility | ||
| 464 | *	but are deprecated. | ||
| 465 | */ | ||
| 466 | typedef mach_port_t port_t; | ||
| 467 | typedef mach_port_name_t port_name_t; | ||
| 468 | typedef mach_port_name_t *port_name_array_t; | ||
| 469 | |||
| 470 | #define PORT_NULL ((port_t) 0) | ||
| 471 | #define PORT_DEAD ((port_t) ~0) | ||
| 472 | #define PORT_VALID(name) \ | ||
| 473 | 	 ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD) | ||
| 474 | |||
| 475 | #endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ | ||
| 476 | |||
| 477 | #endif /* _MACH_PORT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/processor.h+1| ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -52,6 +52,7 @@ typedef function_table_entry *function_table_t; |
| 52 | #define	processor_MSG_COUNT	6 | 52 | #define	processor_MSG_COUNT	6 |
| 53 | #endif	/* processor_MSG_COUNT */ | 53 | #endif	/* processor_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
lib/libc/include/any-macos-any/mach/processor_set.h created+586| ... | @@ -0,0 +1,586 @@ | ||
| 1 | #ifndef	_processor_set_user_ | ||
| 2 | #define	_processor_set_user_ | ||
| 3 | |||
| 4 | /* Module processor_set */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	processor_set_MSG_COUNT | ||
| 52 | #define	processor_set_MSG_COUNT	11 | ||
| 53 | #endif	/* processor_set_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine processor_set_statistics */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t processor_set_statistics | ||
| 76 | ( | ||
| 77 | 	processor_set_name_t pset, | ||
| 78 | 	processor_set_flavor_t flavor, | ||
| 79 | 	processor_set_info_t info_out, | ||
| 80 | 	mach_msg_type_number_t *info_outCnt | ||
| 81 | ); | ||
| 82 | |||
| 83 | /* Routine processor_set_destroy */ | ||
| 84 | #ifdef	mig_external | ||
| 85 | mig_external | ||
| 86 | #else | ||
| 87 | extern | ||
| 88 | #endif	/* mig_external */ | ||
| 89 | kern_return_t processor_set_destroy | ||
| 90 | ( | ||
| 91 | 	processor_set_t set | ||
| 92 | ); | ||
| 93 | |||
| 94 | /* Routine processor_set_max_priority */ | ||
| 95 | #ifdef	mig_external | ||
| 96 | mig_external | ||
| 97 | #else | ||
| 98 | extern | ||
| 99 | #endif	/* mig_external */ | ||
| 100 | kern_return_t processor_set_max_priority | ||
| 101 | ( | ||
| 102 | 	processor_set_t processor_set, | ||
| 103 | 	int max_priority, | ||
| 104 | 	boolean_t change_threads | ||
| 105 | ); | ||
| 106 | |||
| 107 | /* Routine processor_set_policy_enable */ | ||
| 108 | #ifdef	mig_external | ||
| 109 | mig_external | ||
| 110 | #else | ||
| 111 | extern | ||
| 112 | #endif	/* mig_external */ | ||
| 113 | kern_return_t processor_set_policy_enable | ||
| 114 | ( | ||
| 115 | 	processor_set_t processor_set, | ||
| 116 | 	int policy | ||
| 117 | ); | ||
| 118 | |||
| 119 | /* Routine processor_set_policy_disable */ | ||
| 120 | #ifdef	mig_external | ||
| 121 | mig_external | ||
| 122 | #else | ||
| 123 | extern | ||
| 124 | #endif	/* mig_external */ | ||
| 125 | kern_return_t processor_set_policy_disable | ||
| 126 | ( | ||
| 127 | 	processor_set_t processor_set, | ||
| 128 | 	int policy, | ||
| 129 | 	boolean_t change_threads | ||
| 130 | ); | ||
| 131 | |||
| 132 | /* Routine processor_set_tasks */ | ||
| 133 | #ifdef	mig_external | ||
| 134 | mig_external | ||
| 135 | #else | ||
| 136 | extern | ||
| 137 | #endif	/* mig_external */ | ||
| 138 | kern_return_t processor_set_tasks | ||
| 139 | ( | ||
| 140 | 	processor_set_t processor_set, | ||
| 141 | 	task_array_t *task_list, | ||
| 142 | 	mach_msg_type_number_t *task_listCnt | ||
| 143 | ); | ||
| 144 | |||
| 145 | /* Routine processor_set_threads */ | ||
| 146 | #ifdef	mig_external | ||
| 147 | mig_external | ||
| 148 | #else | ||
| 149 | extern | ||
| 150 | #endif	/* mig_external */ | ||
| 151 | kern_return_t processor_set_threads | ||
| 152 | ( | ||
| 153 | 	processor_set_t processor_set, | ||
| 154 | 	thread_act_array_t *thread_list, | ||
| 155 | 	mach_msg_type_number_t *thread_listCnt | ||
| 156 | ); | ||
| 157 | |||
| 158 | /* Routine processor_set_policy_control */ | ||
| 159 | #ifdef	mig_external | ||
| 160 | mig_external | ||
| 161 | #else | ||
| 162 | extern | ||
| 163 | #endif	/* mig_external */ | ||
| 164 | kern_return_t processor_set_policy_control | ||
| 165 | ( | ||
| 166 | 	processor_set_t pset, | ||
| 167 | 	processor_set_flavor_t flavor, | ||
| 168 | 	processor_set_info_t policy_info, | ||
| 169 | 	mach_msg_type_number_t policy_infoCnt, | ||
| 170 | 	boolean_t change | ||
| 171 | ); | ||
| 172 | |||
| 173 | /* Routine processor_set_stack_usage */ | ||
| 174 | #ifdef	mig_external | ||
| 175 | mig_external | ||
| 176 | #else | ||
| 177 | extern | ||
| 178 | #endif	/* mig_external */ | ||
| 179 | kern_return_t processor_set_stack_usage | ||
| 180 | ( | ||
| 181 | 	processor_set_t pset, | ||
| 182 | 	unsigned *ltotal, | ||
| 183 | 	vm_size_t *space, | ||
| 184 | 	vm_size_t *resident, | ||
| 185 | 	vm_size_t *maxusage, | ||
| 186 | 	vm_offset_t *maxstack | ||
| 187 | ); | ||
| 188 | |||
| 189 | /* Routine processor_set_info */ | ||
| 190 | #ifdef	mig_external | ||
| 191 | mig_external | ||
| 192 | #else | ||
| 193 | extern | ||
| 194 | #endif	/* mig_external */ | ||
| 195 | kern_return_t processor_set_info | ||
| 196 | ( | ||
| 197 | 	processor_set_name_t set_name, | ||
| 198 | 	int flavor, | ||
| 199 | 	host_t *host, | ||
| 200 | 	processor_set_info_t info_out, | ||
| 201 | 	mach_msg_type_number_t *info_outCnt | ||
| 202 | ); | ||
| 203 | |||
| 204 | /* Routine processor_set_tasks_with_flavor */ | ||
| 205 | #ifdef	mig_external | ||
| 206 | mig_external | ||
| 207 | #else | ||
| 208 | extern | ||
| 209 | #endif	/* mig_external */ | ||
| 210 | kern_return_t processor_set_tasks_with_flavor | ||
| 211 | ( | ||
| 212 | 	processor_set_t processor_set, | ||
| 213 | 	mach_task_flavor_t flavor, | ||
| 214 | 	task_array_t *task_list, | ||
| 215 | 	mach_msg_type_number_t *task_listCnt | ||
| 216 | ); | ||
| 217 | |||
| 218 | __END_DECLS | ||
| 219 | |||
| 220 | /********************** Caution **************************/ | ||
| 221 | /* The following data types should be used to calculate */ | ||
| 222 | /* maximum message sizes only. The actual message may be */ | ||
| 223 | /* smaller, and the position of the arguments within the */ | ||
| 224 | /* message layout may vary from what is presented here. */ | ||
| 225 | /* For example, if any of the arguments are variable- */ | ||
| 226 | /* sized, and less than the maximum is sent, the data */ | ||
| 227 | /* will be packed tight in the actual message to reduce */ | ||
| 228 | /* the presence of holes. */ | ||
| 229 | /********************** Caution **************************/ | ||
| 230 | |||
| 231 | /* typedefs for all requests */ | ||
| 232 | |||
| 233 | #ifndef __Request__processor_set_subsystem__defined | ||
| 234 | #define __Request__processor_set_subsystem__defined | ||
| 235 | |||
| 236 | #ifdef __MigPackStructs | ||
| 237 | #pragma pack(push, 4) | ||
| 238 | #endif | ||
| 239 | 	typedef struct { | ||
| 240 | 		mach_msg_header_t Head; | ||
| 241 | 		NDR_record_t NDR; | ||
| 242 | 		processor_set_flavor_t flavor; | ||
| 243 | 		mach_msg_type_number_t info_outCnt; | ||
| 244 | 	} __Request__processor_set_statistics_t __attribute__((unused)); | ||
| 245 | #ifdef __MigPackStructs | ||
| 246 | #pragma pack(pop) | ||
| 247 | #endif | ||
| 248 | |||
| 249 | #ifdef __MigPackStructs | ||
| 250 | #pragma pack(push, 4) | ||
| 251 | #endif | ||
| 252 | 	typedef struct { | ||
| 253 | 		mach_msg_header_t Head; | ||
| 254 | 	} __Request__processor_set_destroy_t __attribute__((unused)); | ||
| 255 | #ifdef __MigPackStructs | ||
| 256 | #pragma pack(pop) | ||
| 257 | #endif | ||
| 258 | |||
| 259 | #ifdef __MigPackStructs | ||
| 260 | #pragma pack(push, 4) | ||
| 261 | #endif | ||
| 262 | 	typedef struct { | ||
| 263 | 		mach_msg_header_t Head; | ||
| 264 | 		NDR_record_t NDR; | ||
| 265 | 		int max_priority; | ||
| 266 | 		boolean_t change_threads; | ||
| 267 | 	} __Request__processor_set_max_priority_t __attribute__((unused)); | ||
| 268 | #ifdef __MigPackStructs | ||
| 269 | #pragma pack(pop) | ||
| 270 | #endif | ||
| 271 | |||
| 272 | #ifdef __MigPackStructs | ||
| 273 | #pragma pack(push, 4) | ||
| 274 | #endif | ||
| 275 | 	typedef struct { | ||
| 276 | 		mach_msg_header_t Head; | ||
| 277 | 		NDR_record_t NDR; | ||
| 278 | 		int policy; | ||
| 279 | 	} __Request__processor_set_policy_enable_t __attribute__((unused)); | ||
| 280 | #ifdef __MigPackStructs | ||
| 281 | #pragma pack(pop) | ||
| 282 | #endif | ||
| 283 | |||
| 284 | #ifdef __MigPackStructs | ||
| 285 | #pragma pack(push, 4) | ||
| 286 | #endif | ||
| 287 | 	typedef struct { | ||
| 288 | 		mach_msg_header_t Head; | ||
| 289 | 		NDR_record_t NDR; | ||
| 290 | 		int policy; | ||
| 291 | 		boolean_t change_threads; | ||
| 292 | 	} __Request__processor_set_policy_disable_t __attribute__((unused)); | ||
| 293 | #ifdef __MigPackStructs | ||
| 294 | #pragma pack(pop) | ||
| 295 | #endif | ||
| 296 | |||
| 297 | #ifdef __MigPackStructs | ||
| 298 | #pragma pack(push, 4) | ||
| 299 | #endif | ||
| 300 | 	typedef struct { | ||
| 301 | 		mach_msg_header_t Head; | ||
| 302 | 	} __Request__processor_set_tasks_t __attribute__((unused)); | ||
| 303 | #ifdef __MigPackStructs | ||
| 304 | #pragma pack(pop) | ||
| 305 | #endif | ||
| 306 | |||
| 307 | #ifdef __MigPackStructs | ||
| 308 | #pragma pack(push, 4) | ||
| 309 | #endif | ||
| 310 | 	typedef struct { | ||
| 311 | 		mach_msg_header_t Head; | ||
| 312 | 	} __Request__processor_set_threads_t __attribute__((unused)); | ||
| 313 | #ifdef __MigPackStructs | ||
| 314 | #pragma pack(pop) | ||
| 315 | #endif | ||
| 316 | |||
| 317 | #ifdef __MigPackStructs | ||
| 318 | #pragma pack(push, 4) | ||
| 319 | #endif | ||
| 320 | 	typedef struct { | ||
| 321 | 		mach_msg_header_t Head; | ||
| 322 | 		NDR_record_t NDR; | ||
| 323 | 		processor_set_flavor_t flavor; | ||
| 324 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 325 | 		integer_t policy_info[5]; | ||
| 326 | 		boolean_t change; | ||
| 327 | 	} __Request__processor_set_policy_control_t __attribute__((unused)); | ||
| 328 | #ifdef __MigPackStructs | ||
| 329 | #pragma pack(pop) | ||
| 330 | #endif | ||
| 331 | |||
| 332 | #ifdef __MigPackStructs | ||
| 333 | #pragma pack(push, 4) | ||
| 334 | #endif | ||
| 335 | 	typedef struct { | ||
| 336 | 		mach_msg_header_t Head; | ||
| 337 | 	} __Request__processor_set_stack_usage_t __attribute__((unused)); | ||
| 338 | #ifdef __MigPackStructs | ||
| 339 | #pragma pack(pop) | ||
| 340 | #endif | ||
| 341 | |||
| 342 | #ifdef __MigPackStructs | ||
| 343 | #pragma pack(push, 4) | ||
| 344 | #endif | ||
| 345 | 	typedef struct { | ||
| 346 | 		mach_msg_header_t Head; | ||
| 347 | 		NDR_record_t NDR; | ||
| 348 | 		int flavor; | ||
| 349 | 		mach_msg_type_number_t info_outCnt; | ||
| 350 | 	} __Request__processor_set_info_t __attribute__((unused)); | ||
| 351 | #ifdef __MigPackStructs | ||
| 352 | #pragma pack(pop) | ||
| 353 | #endif | ||
| 354 | |||
| 355 | #ifdef __MigPackStructs | ||
| 356 | #pragma pack(push, 4) | ||
| 357 | #endif | ||
| 358 | 	typedef struct { | ||
| 359 | 		mach_msg_header_t Head; | ||
| 360 | 		NDR_record_t NDR; | ||
| 361 | 		mach_task_flavor_t flavor; | ||
| 362 | 	} __Request__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 363 | #ifdef __MigPackStructs | ||
| 364 | #pragma pack(pop) | ||
| 365 | #endif | ||
| 366 | #endif /* !__Request__processor_set_subsystem__defined */ | ||
| 367 | |||
| 368 | /* union of all requests */ | ||
| 369 | |||
| 370 | #ifndef __RequestUnion__processor_set_subsystem__defined | ||
| 371 | #define __RequestUnion__processor_set_subsystem__defined | ||
| 372 | union __RequestUnion__processor_set_subsystem { | ||
| 373 | 	__Request__processor_set_statistics_t Request_processor_set_statistics; | ||
| 374 | 	__Request__processor_set_destroy_t Request_processor_set_destroy; | ||
| 375 | 	__Request__processor_set_max_priority_t Request_processor_set_max_priority; | ||
| 376 | 	__Request__processor_set_policy_enable_t Request_processor_set_policy_enable; | ||
| 377 | 	__Request__processor_set_policy_disable_t Request_processor_set_policy_disable; | ||
| 378 | 	__Request__processor_set_tasks_t Request_processor_set_tasks; | ||
| 379 | 	__Request__processor_set_threads_t Request_processor_set_threads; | ||
| 380 | 	__Request__processor_set_policy_control_t Request_processor_set_policy_control; | ||
| 381 | 	__Request__processor_set_stack_usage_t Request_processor_set_stack_usage; | ||
| 382 | 	__Request__processor_set_info_t Request_processor_set_info; | ||
| 383 | 	__Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor; | ||
| 384 | }; | ||
| 385 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 386 | /* typedefs for all replies */ | ||
| 387 | |||
| 388 | #ifndef __Reply__processor_set_subsystem__defined | ||
| 389 | #define __Reply__processor_set_subsystem__defined | ||
| 390 | |||
| 391 | #ifdef __MigPackStructs | ||
| 392 | #pragma pack(push, 4) | ||
| 393 | #endif | ||
| 394 | 	typedef struct { | ||
| 395 | 		mach_msg_header_t Head; | ||
| 396 | 		NDR_record_t NDR; | ||
| 397 | 		kern_return_t RetCode; | ||
| 398 | 		mach_msg_type_number_t info_outCnt; | ||
| 399 | 		integer_t info_out[5]; | ||
| 400 | 	} __Reply__processor_set_statistics_t __attribute__((unused)); | ||
| 401 | #ifdef __MigPackStructs | ||
| 402 | #pragma pack(pop) | ||
| 403 | #endif | ||
| 404 | |||
| 405 | #ifdef __MigPackStructs | ||
| 406 | #pragma pack(push, 4) | ||
| 407 | #endif | ||
| 408 | 	typedef struct { | ||
| 409 | 		mach_msg_header_t Head; | ||
| 410 | 		NDR_record_t NDR; | ||
| 411 | 		kern_return_t RetCode; | ||
| 412 | 	} __Reply__processor_set_destroy_t __attribute__((unused)); | ||
| 413 | #ifdef __MigPackStructs | ||
| 414 | #pragma pack(pop) | ||
| 415 | #endif | ||
| 416 | |||
| 417 | #ifdef __MigPackStructs | ||
| 418 | #pragma pack(push, 4) | ||
| 419 | #endif | ||
| 420 | 	typedef struct { | ||
| 421 | 		mach_msg_header_t Head; | ||
| 422 | 		NDR_record_t NDR; | ||
| 423 | 		kern_return_t RetCode; | ||
| 424 | 	} __Reply__processor_set_max_priority_t __attribute__((unused)); | ||
| 425 | #ifdef __MigPackStructs | ||
| 426 | #pragma pack(pop) | ||
| 427 | #endif | ||
| 428 | |||
| 429 | #ifdef __MigPackStructs | ||
| 430 | #pragma pack(push, 4) | ||
| 431 | #endif | ||
| 432 | 	typedef struct { | ||
| 433 | 		mach_msg_header_t Head; | ||
| 434 | 		NDR_record_t NDR; | ||
| 435 | 		kern_return_t RetCode; | ||
| 436 | 	} __Reply__processor_set_policy_enable_t __attribute__((unused)); | ||
| 437 | #ifdef __MigPackStructs | ||
| 438 | #pragma pack(pop) | ||
| 439 | #endif | ||
| 440 | |||
| 441 | #ifdef __MigPackStructs | ||
| 442 | #pragma pack(push, 4) | ||
| 443 | #endif | ||
| 444 | 	typedef struct { | ||
| 445 | 		mach_msg_header_t Head; | ||
| 446 | 		NDR_record_t NDR; | ||
| 447 | 		kern_return_t RetCode; | ||
| 448 | 	} __Reply__processor_set_policy_disable_t __attribute__((unused)); | ||
| 449 | #ifdef __MigPackStructs | ||
| 450 | #pragma pack(pop) | ||
| 451 | #endif | ||
| 452 | |||
| 453 | #ifdef __MigPackStructs | ||
| 454 | #pragma pack(push, 4) | ||
| 455 | #endif | ||
| 456 | 	typedef struct { | ||
| 457 | 		mach_msg_header_t Head; | ||
| 458 | 		/* start of the kernel processed data */ | ||
| 459 | 		mach_msg_body_t msgh_body; | ||
| 460 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 461 | 		/* end of the kernel processed data */ | ||
| 462 | 		NDR_record_t NDR; | ||
| 463 | 		mach_msg_type_number_t task_listCnt; | ||
| 464 | 	} __Reply__processor_set_tasks_t __attribute__((unused)); | ||
| 465 | #ifdef __MigPackStructs | ||
| 466 | #pragma pack(pop) | ||
| 467 | #endif | ||
| 468 | |||
| 469 | #ifdef __MigPackStructs | ||
| 470 | #pragma pack(push, 4) | ||
| 471 | #endif | ||
| 472 | 	typedef struct { | ||
| 473 | 		mach_msg_header_t Head; | ||
| 474 | 		/* start of the kernel processed data */ | ||
| 475 | 		mach_msg_body_t msgh_body; | ||
| 476 | 		mach_msg_ool_ports_descriptor_t thread_list; | ||
| 477 | 		/* end of the kernel processed data */ | ||
| 478 | 		NDR_record_t NDR; | ||
| 479 | 		mach_msg_type_number_t thread_listCnt; | ||
| 480 | 	} __Reply__processor_set_threads_t __attribute__((unused)); | ||
| 481 | #ifdef __MigPackStructs | ||
| 482 | #pragma pack(pop) | ||
| 483 | #endif | ||
| 484 | |||
| 485 | #ifdef __MigPackStructs | ||
| 486 | #pragma pack(push, 4) | ||
| 487 | #endif | ||
| 488 | 	typedef struct { | ||
| 489 | 		mach_msg_header_t Head; | ||
| 490 | 		NDR_record_t NDR; | ||
| 491 | 		kern_return_t RetCode; | ||
| 492 | 	} __Reply__processor_set_policy_control_t __attribute__((unused)); | ||
| 493 | #ifdef __MigPackStructs | ||
| 494 | #pragma pack(pop) | ||
| 495 | #endif | ||
| 496 | |||
| 497 | #ifdef __MigPackStructs | ||
| 498 | #pragma pack(push, 4) | ||
| 499 | #endif | ||
| 500 | 	typedef struct { | ||
| 501 | 		mach_msg_header_t Head; | ||
| 502 | 		NDR_record_t NDR; | ||
| 503 | 		kern_return_t RetCode; | ||
| 504 | 		unsigned ltotal; | ||
| 505 | 		vm_size_t space; | ||
| 506 | 		vm_size_t resident; | ||
| 507 | 		vm_size_t maxusage; | ||
| 508 | 		vm_offset_t maxstack; | ||
| 509 | 	} __Reply__processor_set_stack_usage_t __attribute__((unused)); | ||
| 510 | #ifdef __MigPackStructs | ||
| 511 | #pragma pack(pop) | ||
| 512 | #endif | ||
| 513 | |||
| 514 | #ifdef __MigPackStructs | ||
| 515 | #pragma pack(push, 4) | ||
| 516 | #endif | ||
| 517 | 	typedef struct { | ||
| 518 | 		mach_msg_header_t Head; | ||
| 519 | 		/* start of the kernel processed data */ | ||
| 520 | 		mach_msg_body_t msgh_body; | ||
| 521 | 		mach_msg_port_descriptor_t host; | ||
| 522 | 		/* end of the kernel processed data */ | ||
| 523 | 		NDR_record_t NDR; | ||
| 524 | 		mach_msg_type_number_t info_outCnt; | ||
| 525 | 		integer_t info_out[5]; | ||
| 526 | 	} __Reply__processor_set_info_t __attribute__((unused)); | ||
| 527 | #ifdef __MigPackStructs | ||
| 528 | #pragma pack(pop) | ||
| 529 | #endif | ||
| 530 | |||
| 531 | #ifdef __MigPackStructs | ||
| 532 | #pragma pack(push, 4) | ||
| 533 | #endif | ||
| 534 | 	typedef struct { | ||
| 535 | 		mach_msg_header_t Head; | ||
| 536 | 		/* start of the kernel processed data */ | ||
| 537 | 		mach_msg_body_t msgh_body; | ||
| 538 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 539 | 		/* end of the kernel processed data */ | ||
| 540 | 		NDR_record_t NDR; | ||
| 541 | 		mach_msg_type_number_t task_listCnt; | ||
| 542 | 	} __Reply__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 543 | #ifdef __MigPackStructs | ||
| 544 | #pragma pack(pop) | ||
| 545 | #endif | ||
| 546 | #endif /* !__Reply__processor_set_subsystem__defined */ | ||
| 547 | |||
| 548 | /* union of all replies */ | ||
| 549 | |||
| 550 | #ifndef __ReplyUnion__processor_set_subsystem__defined | ||
| 551 | #define __ReplyUnion__processor_set_subsystem__defined | ||
| 552 | union __ReplyUnion__processor_set_subsystem { | ||
| 553 | 	__Reply__processor_set_statistics_t Reply_processor_set_statistics; | ||
| 554 | 	__Reply__processor_set_destroy_t Reply_processor_set_destroy; | ||
| 555 | 	__Reply__processor_set_max_priority_t Reply_processor_set_max_priority; | ||
| 556 | 	__Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; | ||
| 557 | 	__Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; | ||
| 558 | 	__Reply__processor_set_tasks_t Reply_processor_set_tasks; | ||
| 559 | 	__Reply__processor_set_threads_t Reply_processor_set_threads; | ||
| 560 | 	__Reply__processor_set_policy_control_t Reply_processor_set_policy_control; | ||
| 561 | 	__Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; | ||
| 562 | 	__Reply__processor_set_info_t Reply_processor_set_info; | ||
| 563 | 	__Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor; | ||
| 564 | }; | ||
| 565 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 566 | |||
| 567 | #ifndef subsystem_to_name_map_processor_set | ||
| 568 | #define subsystem_to_name_map_processor_set \ | ||
| 569 | { "processor_set_statistics", 4000 },\ | ||
| 570 | { "processor_set_destroy", 4001 },\ | ||
| 571 | { "processor_set_max_priority", 4002 },\ | ||
| 572 | { "processor_set_policy_enable", 4003 },\ | ||
| 573 | { "processor_set_policy_disable", 4004 },\ | ||
| 574 | { "processor_set_tasks", 4005 },\ | ||
| 575 | { "processor_set_threads", 4006 },\ | ||
| 576 | { "processor_set_policy_control", 4007 },\ | ||
| 577 | { "processor_set_stack_usage", 4008 },\ | ||
| 578 | { "processor_set_info", 4009 },\ | ||
| 579 | { "processor_set_tasks_with_flavor", 4010 } | ||
| 580 | #endif | ||
| 581 | |||
| 582 | #ifdef __AfterMigUserHeader | ||
| 583 | __AfterMigUserHeader | ||
| 584 | #endif /* __AfterMigUserHeader */ | ||
| 585 | |||
| 586 | #endif	 /* _processor_set_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/sync_policy.h-2| ... | @@ -44,6 +44,4 @@ typedef int sync_policy_t; | ... | @@ -44,6 +44,4 @@ typedef int sync_policy_t; |
| 44 | #define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) | 44 | #define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | #define SYNC_POLICY_MAX 0x7 | ||
| 48 | |||
| 49 | #endif /* _MACH_SYNC_POLICY_H_ */ | 47 | #endif /* _MACH_SYNC_POLICY_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/task_inspect.h+3| ... | @@ -29,6 +29,9 @@ | ... | @@ -29,6 +29,9 @@ |
| 29 | #ifndef MACH_TASK_INSPECT_H | 29 | #ifndef MACH_TASK_INSPECT_H |
| 30 | #define MACH_TASK_INSPECT_H | 30 | #define MACH_TASK_INSPECT_H |
| 31 | 31 | ||
| 32 | #include <stdint.h> | ||
| 33 | #include <mach/vm_types.h> | ||
| 34 | |||
| 32 | /* | 35 | /* |
| 33 | * XXX These interfaces are still in development -- they are subject to change | 36 | * XXX These interfaces are still in development -- they are subject to change |
| 34 | * without notice. | 37 | * without notice. |
lib/libc/include/any-macos-any/mach/task_special_ports.h created+135| ... | @@ -0,0 +1,135 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2010 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/task_special_ports.h | ||
| 60 | * | ||
| 61 | *	Defines codes for special_purpose task ports. These are NOT | ||
| 62 | *	port identifiers - they are only used for the task_get_special_port | ||
| 63 | *	and task_set_special_port routines. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 68 | #define _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 69 | |||
| 70 | typedef int task_special_port_t; | ||
| 71 | |||
| 72 | #define TASK_KERNEL_PORT 1 /* The full task port for task. */ | ||
| 73 | |||
| 74 | #define TASK_HOST_PORT 2 /* The host (priv) port for task. */ | ||
| 75 | |||
| 76 | #define TASK_NAME_PORT 3 /* The name port for task. */ | ||
| 77 | |||
| 78 | #define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */ | ||
| 79 | |||
| 80 | #define TASK_INSPECT_PORT 5 /* The inspect port for task. */ | ||
| 81 | |||
| 82 | #define TASK_READ_PORT 6 /* The read port for task. */ | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Evolving and likely to change. | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* Was TASK_SEATBELT_PORT 7 Seatbelt compiler/DEM port for task. */ | ||
| 89 | |||
| 90 | /* Was TASK_GSSD_PORT 8 which transformed to a host port */ | ||
| 91 | |||
| 92 | #define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */ | ||
| 93 | |||
| 94 | #define TASK_DEBUG_CONTROL_PORT 10 /* debug control port */ | ||
| 95 | |||
| 96 | #define TASK_RESOURCE_NOTIFY_PORT 11 /* overrides host special RN port */ | ||
| 97 | |||
| 98 | #define TASK_MAX_SPECIAL_PORT TASK_RESOURCE_NOTIFY_PORT | ||
| 99 | |||
| 100 | /* | ||
| 101 | *	Definitions for ease of use | ||
| 102 | */ | ||
| 103 | |||
| 104 | #define task_get_kernel_port(task, port) \ | ||
| 105 | 	 (task_get_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 106 | |||
| 107 | #define task_set_kernel_port(task, port) \ | ||
| 108 | 	 (task_set_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 109 | |||
| 110 | #define task_get_host_port(task, port) \ | ||
| 111 | 	 (task_get_special_port((task), TASK_HOST_PORT, (port))) | ||
| 112 | |||
| 113 | #define task_set_host_port(task, port) \ | ||
| 114 | 	 (task_set_special_port((task), TASK_HOST_PORT, (port))) | ||
| 115 | |||
| 116 | #define task_get_bootstrap_port(task, port) \ | ||
| 117 | 	 (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 118 | |||
| 119 | #define task_get_debug_control_port(task, port) \ | ||
| 120 | 	 (task_get_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 121 | |||
| 122 | #define task_set_bootstrap_port(task, port) \ | ||
| 123 | 	 (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 124 | |||
| 125 | #define task_get_task_access_port(task, port) \ | ||
| 126 | 	 (task_get_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 127 | |||
| 128 | #define task_set_task_access_port(task, port) \ | ||
| 129 | 	 (task_set_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 130 | |||
| 131 | #define task_set_task_debug_control_port(task, port) \ | ||
| 132 | 	 (task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 133 | |||
| 134 | |||
| 135 | #endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/thread_act.h created+1424| ... | @@ -0,0 +1,1424 @@ | ||
| 1 | #ifndef	_thread_act_user_ | ||
| 2 | #define	_thread_act_user_ | ||
| 3 | |||
| 4 | /* Module thread_act */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	thread_act_MSG_COUNT | ||
| 52 | #define	thread_act_MSG_COUNT	31 | ||
| 53 | #endif	/* thread_act_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine thread_terminate */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 76 | kern_return_t thread_terminate | ||
| 77 | ( | ||
| 78 | 	thread_act_t target_act | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine act_get_state */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 88 | kern_return_t act_get_state | ||
| 89 | ( | ||
| 90 | 	thread_read_t target_act, | ||
| 91 | 	int flavor, | ||
| 92 | 	thread_state_t old_state, | ||
| 93 | 	mach_msg_type_number_t *old_stateCnt | ||
| 94 | ); | ||
| 95 | |||
| 96 | /* Routine act_set_state */ | ||
| 97 | #ifdef	mig_external | ||
| 98 | mig_external | ||
| 99 | #else | ||
| 100 | extern | ||
| 101 | #endif	/* mig_external */ | ||
| 102 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 103 | kern_return_t act_set_state | ||
| 104 | ( | ||
| 105 | 	thread_act_t target_act, | ||
| 106 | 	int flavor, | ||
| 107 | 	thread_state_t new_state, | ||
| 108 | 	mach_msg_type_number_t new_stateCnt | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine thread_get_state */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | __WATCHOS_PROHIBITED | ||
| 118 | kern_return_t thread_get_state | ||
| 119 | ( | ||
| 120 | 	thread_read_t target_act, | ||
| 121 | 	thread_state_flavor_t flavor, | ||
| 122 | 	thread_state_t old_state, | ||
| 123 | 	mach_msg_type_number_t *old_stateCnt | ||
| 124 | ); | ||
| 125 | |||
| 126 | /* Routine thread_set_state */ | ||
| 127 | #ifdef	mig_external | ||
| 128 | mig_external | ||
| 129 | #else | ||
| 130 | extern | ||
| 131 | #endif	/* mig_external */ | ||
| 132 | __WATCHOS_PROHIBITED | ||
| 133 | kern_return_t thread_set_state | ||
| 134 | ( | ||
| 135 | 	thread_act_t target_act, | ||
| 136 | 	thread_state_flavor_t flavor, | ||
| 137 | 	thread_state_t new_state, | ||
| 138 | 	mach_msg_type_number_t new_stateCnt | ||
| 139 | ); | ||
| 140 | |||
| 141 | /* Routine thread_suspend */ | ||
| 142 | #ifdef	mig_external | ||
| 143 | mig_external | ||
| 144 | #else | ||
| 145 | extern | ||
| 146 | #endif	/* mig_external */ | ||
| 147 | __WATCHOS_PROHIBITED | ||
| 148 | kern_return_t thread_suspend | ||
| 149 | ( | ||
| 150 | 	thread_read_t target_act | ||
| 151 | ); | ||
| 152 | |||
| 153 | /* Routine thread_resume */ | ||
| 154 | #ifdef	mig_external | ||
| 155 | mig_external | ||
| 156 | #else | ||
| 157 | extern | ||
| 158 | #endif	/* mig_external */ | ||
| 159 | __WATCHOS_PROHIBITED | ||
| 160 | kern_return_t thread_resume | ||
| 161 | ( | ||
| 162 | 	thread_read_t target_act | ||
| 163 | ); | ||
| 164 | |||
| 165 | /* Routine thread_abort */ | ||
| 166 | #ifdef	mig_external | ||
| 167 | mig_external | ||
| 168 | #else | ||
| 169 | extern | ||
| 170 | #endif	/* mig_external */ | ||
| 171 | __WATCHOS_PROHIBITED | ||
| 172 | kern_return_t thread_abort | ||
| 173 | ( | ||
| 174 | 	thread_act_t target_act | ||
| 175 | ); | ||
| 176 | |||
| 177 | /* Routine thread_abort_safely */ | ||
| 178 | #ifdef	mig_external | ||
| 179 | mig_external | ||
| 180 | #else | ||
| 181 | extern | ||
| 182 | #endif	/* mig_external */ | ||
| 183 | __WATCHOS_PROHIBITED | ||
| 184 | kern_return_t thread_abort_safely | ||
| 185 | ( | ||
| 186 | 	thread_act_t target_act | ||
| 187 | ); | ||
| 188 | |||
| 189 | /* Routine thread_depress_abort */ | ||
| 190 | #ifdef	mig_external | ||
| 191 | mig_external | ||
| 192 | #else | ||
| 193 | extern | ||
| 194 | #endif	/* mig_external */ | ||
| 195 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 196 | kern_return_t thread_depress_abort | ||
| 197 | ( | ||
| 198 | 	thread_act_t thread | ||
| 199 | ); | ||
| 200 | |||
| 201 | /* Routine thread_get_special_port */ | ||
| 202 | #ifdef	mig_external | ||
| 203 | mig_external | ||
| 204 | #else | ||
| 205 | extern | ||
| 206 | #endif	/* mig_external */ | ||
| 207 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 208 | kern_return_t thread_get_special_port | ||
| 209 | ( | ||
| 210 | 	thread_inspect_t thr_act, | ||
| 211 | 	int which_port, | ||
| 212 | 	mach_port_t *special_port | ||
| 213 | ); | ||
| 214 | |||
| 215 | /* Routine thread_set_special_port */ | ||
| 216 | #ifdef	mig_external | ||
| 217 | mig_external | ||
| 218 | #else | ||
| 219 | extern | ||
| 220 | #endif	/* mig_external */ | ||
| 221 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 222 | kern_return_t thread_set_special_port | ||
| 223 | ( | ||
| 224 | 	thread_act_t thr_act, | ||
| 225 | 	int which_port, | ||
| 226 | 	mach_port_t special_port | ||
| 227 | ); | ||
| 228 | |||
| 229 | /* Routine thread_info */ | ||
| 230 | #ifdef	mig_external | ||
| 231 | mig_external | ||
| 232 | #else | ||
| 233 | extern | ||
| 234 | #endif	/* mig_external */ | ||
| 235 | kern_return_t thread_info | ||
| 236 | ( | ||
| 237 | 	thread_inspect_t target_act, | ||
| 238 | 	thread_flavor_t flavor, | ||
| 239 | 	thread_info_t thread_info_out, | ||
| 240 | 	mach_msg_type_number_t *thread_info_outCnt | ||
| 241 | ); | ||
| 242 | |||
| 243 | /* Routine thread_set_exception_ports */ | ||
| 244 | #ifdef	mig_external | ||
| 245 | mig_external | ||
| 246 | #else | ||
| 247 | extern | ||
| 248 | #endif	/* mig_external */ | ||
| 249 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 250 | kern_return_t thread_set_exception_ports | ||
| 251 | ( | ||
| 252 | 	thread_act_t thread, | ||
| 253 | 	exception_mask_t exception_mask, | ||
| 254 | 	mach_port_t new_port, | ||
| 255 | 	exception_behavior_t behavior, | ||
| 256 | 	thread_state_flavor_t new_flavor | ||
| 257 | ); | ||
| 258 | |||
| 259 | /* Routine thread_get_exception_ports */ | ||
| 260 | #ifdef	mig_external | ||
| 261 | mig_external | ||
| 262 | #else | ||
| 263 | extern | ||
| 264 | #endif	/* mig_external */ | ||
| 265 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 266 | kern_return_t thread_get_exception_ports | ||
| 267 | ( | ||
| 268 | 	thread_act_t thread, | ||
| 269 | 	exception_mask_t exception_mask, | ||
| 270 | 	exception_mask_array_t masks, | ||
| 271 | 	mach_msg_type_number_t *masksCnt, | ||
| 272 | 	exception_handler_array_t old_handlers, | ||
| 273 | 	exception_behavior_array_t old_behaviors, | ||
| 274 | 	exception_flavor_array_t old_flavors | ||
| 275 | ); | ||
| 276 | |||
| 277 | /* Routine thread_swap_exception_ports */ | ||
| 278 | #ifdef	mig_external | ||
| 279 | mig_external | ||
| 280 | #else | ||
| 281 | extern | ||
| 282 | #endif	/* mig_external */ | ||
| 283 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 284 | kern_return_t thread_swap_exception_ports | ||
| 285 | ( | ||
| 286 | 	thread_act_t thread, | ||
| 287 | 	exception_mask_t exception_mask, | ||
| 288 | 	mach_port_t new_port, | ||
| 289 | 	exception_behavior_t behavior, | ||
| 290 | 	thread_state_flavor_t new_flavor, | ||
| 291 | 	exception_mask_array_t masks, | ||
| 292 | 	mach_msg_type_number_t *masksCnt, | ||
| 293 | 	exception_handler_array_t old_handlers, | ||
| 294 | 	exception_behavior_array_t old_behaviors, | ||
| 295 | 	exception_flavor_array_t old_flavors | ||
| 296 | ); | ||
| 297 | |||
| 298 | /* Routine thread_policy */ | ||
| 299 | #ifdef	mig_external | ||
| 300 | mig_external | ||
| 301 | #else | ||
| 302 | extern | ||
| 303 | #endif	/* mig_external */ | ||
| 304 | kern_return_t thread_policy | ||
| 305 | ( | ||
| 306 | 	thread_act_t thr_act, | ||
| 307 | 	policy_t policy, | ||
| 308 | 	policy_base_t base, | ||
| 309 | 	mach_msg_type_number_t baseCnt, | ||
| 310 | 	boolean_t set_limit | ||
| 311 | ); | ||
| 312 | |||
| 313 | /* Routine thread_policy_set */ | ||
| 314 | #ifdef	mig_external | ||
| 315 | mig_external | ||
| 316 | #else | ||
| 317 | extern | ||
| 318 | #endif	/* mig_external */ | ||
| 319 | kern_return_t thread_policy_set | ||
| 320 | ( | ||
| 321 | 	thread_act_t thread, | ||
| 322 | 	thread_policy_flavor_t flavor, | ||
| 323 | 	thread_policy_t policy_info, | ||
| 324 | 	mach_msg_type_number_t policy_infoCnt | ||
| 325 | ); | ||
| 326 | |||
| 327 | /* Routine thread_policy_get */ | ||
| 328 | #ifdef	mig_external | ||
| 329 | mig_external | ||
| 330 | #else | ||
| 331 | extern | ||
| 332 | #endif	/* mig_external */ | ||
| 333 | kern_return_t thread_policy_get | ||
| 334 | ( | ||
| 335 | 	thread_inspect_t thread, | ||
| 336 | 	thread_policy_flavor_t flavor, | ||
| 337 | 	thread_policy_t policy_info, | ||
| 338 | 	mach_msg_type_number_t *policy_infoCnt, | ||
| 339 | 	boolean_t *get_default | ||
| 340 | ); | ||
| 341 | |||
| 342 | /* Routine thread_sample */ | ||
| 343 | #ifdef	mig_external | ||
| 344 | mig_external | ||
| 345 | #else | ||
| 346 | extern | ||
| 347 | #endif	/* mig_external */ | ||
| 348 | kern_return_t thread_sample | ||
| 349 | ( | ||
| 350 | 	thread_act_t thread, | ||
| 351 | 	mach_port_t reply | ||
| 352 | ); | ||
| 353 | |||
| 354 | /* Routine etap_trace_thread */ | ||
| 355 | #ifdef	mig_external | ||
| 356 | mig_external | ||
| 357 | #else | ||
| 358 | extern | ||
| 359 | #endif	/* mig_external */ | ||
| 360 | kern_return_t etap_trace_thread | ||
| 361 | ( | ||
| 362 | 	thread_act_t target_act, | ||
| 363 | 	boolean_t trace_status | ||
| 364 | ); | ||
| 365 | |||
| 366 | /* Routine thread_assign */ | ||
| 367 | #ifdef	mig_external | ||
| 368 | mig_external | ||
| 369 | #else | ||
| 370 | extern | ||
| 371 | #endif	/* mig_external */ | ||
| 372 | kern_return_t thread_assign | ||
| 373 | ( | ||
| 374 | 	thread_act_t thread, | ||
| 375 | 	processor_set_t new_set | ||
| 376 | ); | ||
| 377 | |||
| 378 | /* Routine thread_assign_default */ | ||
| 379 | #ifdef	mig_external | ||
| 380 | mig_external | ||
| 381 | #else | ||
| 382 | extern | ||
| 383 | #endif	/* mig_external */ | ||
| 384 | kern_return_t thread_assign_default | ||
| 385 | ( | ||
| 386 | 	thread_act_t thread | ||
| 387 | ); | ||
| 388 | |||
| 389 | /* Routine thread_get_assignment */ | ||
| 390 | #ifdef	mig_external | ||
| 391 | mig_external | ||
| 392 | #else | ||
| 393 | extern | ||
| 394 | #endif	/* mig_external */ | ||
| 395 | kern_return_t thread_get_assignment | ||
| 396 | ( | ||
| 397 | 	thread_inspect_t thread, | ||
| 398 | 	processor_set_name_t *assigned_set | ||
| 399 | ); | ||
| 400 | |||
| 401 | /* Routine thread_set_policy */ | ||
| 402 | #ifdef	mig_external | ||
| 403 | mig_external | ||
| 404 | #else | ||
| 405 | extern | ||
| 406 | #endif	/* mig_external */ | ||
| 407 | kern_return_t thread_set_policy | ||
| 408 | ( | ||
| 409 | 	thread_act_t thr_act, | ||
| 410 | 	processor_set_t pset, | ||
| 411 | 	policy_t policy, | ||
| 412 | 	policy_base_t base, | ||
| 413 | 	mach_msg_type_number_t baseCnt, | ||
| 414 | 	policy_limit_t limit, | ||
| 415 | 	mach_msg_type_number_t limitCnt | ||
| 416 | ); | ||
| 417 | |||
| 418 | /* Routine thread_get_mach_voucher */ | ||
| 419 | #ifdef	mig_external | ||
| 420 | mig_external | ||
| 421 | #else | ||
| 422 | extern | ||
| 423 | #endif	/* mig_external */ | ||
| 424 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 425 | kern_return_t thread_get_mach_voucher | ||
| 426 | ( | ||
| 427 | 	thread_read_t thr_act, | ||
| 428 | 	mach_voucher_selector_t which, | ||
| 429 | 	ipc_voucher_t *voucher | ||
| 430 | ); | ||
| 431 | |||
| 432 | /* Routine thread_set_mach_voucher */ | ||
| 433 | #ifdef	mig_external | ||
| 434 | mig_external | ||
| 435 | #else | ||
| 436 | extern | ||
| 437 | #endif	/* mig_external */ | ||
| 438 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 439 | kern_return_t thread_set_mach_voucher | ||
| 440 | ( | ||
| 441 | 	thread_act_t thr_act, | ||
| 442 | 	ipc_voucher_t voucher | ||
| 443 | ); | ||
| 444 | |||
| 445 | /* Routine thread_swap_mach_voucher */ | ||
| 446 | #ifdef	mig_external | ||
| 447 | mig_external | ||
| 448 | #else | ||
| 449 | extern | ||
| 450 | #endif	/* mig_external */ | ||
| 451 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 452 | kern_return_t thread_swap_mach_voucher | ||
| 453 | ( | ||
| 454 | 	thread_act_t thr_act, | ||
| 455 | 	ipc_voucher_t new_voucher, | ||
| 456 | 	ipc_voucher_t *old_voucher | ||
| 457 | ); | ||
| 458 | |||
| 459 | /* Routine thread_convert_thread_state */ | ||
| 460 | #ifdef	mig_external | ||
| 461 | mig_external | ||
| 462 | #else | ||
| 463 | extern | ||
| 464 | #endif	/* mig_external */ | ||
| 465 | kern_return_t thread_convert_thread_state | ||
| 466 | ( | ||
| 467 | 	thread_act_t thread, | ||
| 468 | 	int direction, | ||
| 469 | 	thread_state_flavor_t flavor, | ||
| 470 | 	thread_state_t in_state, | ||
| 471 | 	mach_msg_type_number_t in_stateCnt, | ||
| 472 | 	thread_state_t out_state, | ||
| 473 | 	mach_msg_type_number_t *out_stateCnt | ||
| 474 | ); | ||
| 475 | |||
| 476 | /* Routine thread_get_exception_ports_info */ | ||
| 477 | #ifdef	mig_external | ||
| 478 | mig_external | ||
| 479 | #else | ||
| 480 | extern | ||
| 481 | #endif	/* mig_external */ | ||
| 482 | kern_return_t thread_get_exception_ports_info | ||
| 483 | ( | ||
| 484 | 	mach_port_t port, | ||
| 485 | 	exception_mask_t exception_mask, | ||
| 486 | 	exception_mask_array_t masks, | ||
| 487 | 	mach_msg_type_number_t *masksCnt, | ||
| 488 | 	exception_handler_info_array_t old_handlers_info, | ||
| 489 | 	exception_behavior_array_t old_behaviors, | ||
| 490 | 	exception_flavor_array_t old_flavors | ||
| 491 | ); | ||
| 492 | |||
| 493 | __END_DECLS | ||
| 494 | |||
| 495 | /********************** Caution **************************/ | ||
| 496 | /* The following data types should be used to calculate */ | ||
| 497 | /* maximum message sizes only. The actual message may be */ | ||
| 498 | /* smaller, and the position of the arguments within the */ | ||
| 499 | /* message layout may vary from what is presented here. */ | ||
| 500 | /* For example, if any of the arguments are variable- */ | ||
| 501 | /* sized, and less than the maximum is sent, the data */ | ||
| 502 | /* will be packed tight in the actual message to reduce */ | ||
| 503 | /* the presence of holes. */ | ||
| 504 | /********************** Caution **************************/ | ||
| 505 | |||
| 506 | /* typedefs for all requests */ | ||
| 507 | |||
| 508 | #ifndef __Request__thread_act_subsystem__defined | ||
| 509 | #define __Request__thread_act_subsystem__defined | ||
| 510 | |||
| 511 | #ifdef __MigPackStructs | ||
| 512 | #pragma pack(push, 4) | ||
| 513 | #endif | ||
| 514 | 	typedef struct { | ||
| 515 | 		mach_msg_header_t Head; | ||
| 516 | 	} __Request__thread_terminate_t __attribute__((unused)); | ||
| 517 | #ifdef __MigPackStructs | ||
| 518 | #pragma pack(pop) | ||
| 519 | #endif | ||
| 520 | |||
| 521 | #ifdef __MigPackStructs | ||
| 522 | #pragma pack(push, 4) | ||
| 523 | #endif | ||
| 524 | 	typedef struct { | ||
| 525 | 		mach_msg_header_t Head; | ||
| 526 | 		NDR_record_t NDR; | ||
| 527 | 		int flavor; | ||
| 528 | 		mach_msg_type_number_t old_stateCnt; | ||
| 529 | 	} __Request__act_get_state_t __attribute__((unused)); | ||
| 530 | #ifdef __MigPackStructs | ||
| 531 | #pragma pack(pop) | ||
| 532 | #endif | ||
| 533 | |||
| 534 | #ifdef __MigPackStructs | ||
| 535 | #pragma pack(push, 4) | ||
| 536 | #endif | ||
| 537 | 	typedef struct { | ||
| 538 | 		mach_msg_header_t Head; | ||
| 539 | 		NDR_record_t NDR; | ||
| 540 | 		int flavor; | ||
| 541 | 		mach_msg_type_number_t new_stateCnt; | ||
| 542 | 		natural_t new_state[1296]; | ||
| 543 | 	} __Request__act_set_state_t __attribute__((unused)); | ||
| 544 | #ifdef __MigPackStructs | ||
| 545 | #pragma pack(pop) | ||
| 546 | #endif | ||
| 547 | |||
| 548 | #ifdef __MigPackStructs | ||
| 549 | #pragma pack(push, 4) | ||
| 550 | #endif | ||
| 551 | 	typedef struct { | ||
| 552 | 		mach_msg_header_t Head; | ||
| 553 | 		NDR_record_t NDR; | ||
| 554 | 		thread_state_flavor_t flavor; | ||
| 555 | 		mach_msg_type_number_t old_stateCnt; | ||
| 556 | 	} __Request__thread_get_state_t __attribute__((unused)); | ||
| 557 | #ifdef __MigPackStructs | ||
| 558 | #pragma pack(pop) | ||
| 559 | #endif | ||
| 560 | |||
| 561 | #ifdef __MigPackStructs | ||
| 562 | #pragma pack(push, 4) | ||
| 563 | #endif | ||
| 564 | 	typedef struct { | ||
| 565 | 		mach_msg_header_t Head; | ||
| 566 | 		NDR_record_t NDR; | ||
| 567 | 		thread_state_flavor_t flavor; | ||
| 568 | 		mach_msg_type_number_t new_stateCnt; | ||
| 569 | 		natural_t new_state[1296]; | ||
| 570 | 	} __Request__thread_set_state_t __attribute__((unused)); | ||
| 571 | #ifdef __MigPackStructs | ||
| 572 | #pragma pack(pop) | ||
| 573 | #endif | ||
| 574 | |||
| 575 | #ifdef __MigPackStructs | ||
| 576 | #pragma pack(push, 4) | ||
| 577 | #endif | ||
| 578 | 	typedef struct { | ||
| 579 | 		mach_msg_header_t Head; | ||
| 580 | 	} __Request__thread_suspend_t __attribute__((unused)); | ||
| 581 | #ifdef __MigPackStructs | ||
| 582 | #pragma pack(pop) | ||
| 583 | #endif | ||
| 584 | |||
| 585 | #ifdef __MigPackStructs | ||
| 586 | #pragma pack(push, 4) | ||
| 587 | #endif | ||
| 588 | 	typedef struct { | ||
| 589 | 		mach_msg_header_t Head; | ||
| 590 | 	} __Request__thread_resume_t __attribute__((unused)); | ||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(pop) | ||
| 593 | #endif | ||
| 594 | |||
| 595 | #ifdef __MigPackStructs | ||
| 596 | #pragma pack(push, 4) | ||
| 597 | #endif | ||
| 598 | 	typedef struct { | ||
| 599 | 		mach_msg_header_t Head; | ||
| 600 | 	} __Request__thread_abort_t __attribute__((unused)); | ||
| 601 | #ifdef __MigPackStructs | ||
| 602 | #pragma pack(pop) | ||
| 603 | #endif | ||
| 604 | |||
| 605 | #ifdef __MigPackStructs | ||
| 606 | #pragma pack(push, 4) | ||
| 607 | #endif | ||
| 608 | 	typedef struct { | ||
| 609 | 		mach_msg_header_t Head; | ||
| 610 | 	} __Request__thread_abort_safely_t __attribute__((unused)); | ||
| 611 | #ifdef __MigPackStructs | ||
| 612 | #pragma pack(pop) | ||
| 613 | #endif | ||
| 614 | |||
| 615 | #ifdef __MigPackStructs | ||
| 616 | #pragma pack(push, 4) | ||
| 617 | #endif | ||
| 618 | 	typedef struct { | ||
| 619 | 		mach_msg_header_t Head; | ||
| 620 | 	} __Request__thread_depress_abort_t __attribute__((unused)); | ||
| 621 | #ifdef __MigPackStructs | ||
| 622 | #pragma pack(pop) | ||
| 623 | #endif | ||
| 624 | |||
| 625 | #ifdef __MigPackStructs | ||
| 626 | #pragma pack(push, 4) | ||
| 627 | #endif | ||
| 628 | 	typedef struct { | ||
| 629 | 		mach_msg_header_t Head; | ||
| 630 | 		NDR_record_t NDR; | ||
| 631 | 		int which_port; | ||
| 632 | 	} __Request__thread_get_special_port_t __attribute__((unused)); | ||
| 633 | #ifdef __MigPackStructs | ||
| 634 | #pragma pack(pop) | ||
| 635 | #endif | ||
| 636 | |||
| 637 | #ifdef __MigPackStructs | ||
| 638 | #pragma pack(push, 4) | ||
| 639 | #endif | ||
| 640 | 	typedef struct { | ||
| 641 | 		mach_msg_header_t Head; | ||
| 642 | 		/* start of the kernel processed data */ | ||
| 643 | 		mach_msg_body_t msgh_body; | ||
| 644 | 		mach_msg_port_descriptor_t special_port; | ||
| 645 | 		/* end of the kernel processed data */ | ||
| 646 | 		NDR_record_t NDR; | ||
| 647 | 		int which_port; | ||
| 648 | 	} __Request__thread_set_special_port_t __attribute__((unused)); | ||
| 649 | #ifdef __MigPackStructs | ||
| 650 | #pragma pack(pop) | ||
| 651 | #endif | ||
| 652 | |||
| 653 | #ifdef __MigPackStructs | ||
| 654 | #pragma pack(push, 4) | ||
| 655 | #endif | ||
| 656 | 	typedef struct { | ||
| 657 | 		mach_msg_header_t Head; | ||
| 658 | 		NDR_record_t NDR; | ||
| 659 | 		thread_flavor_t flavor; | ||
| 660 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 661 | 	} __Request__thread_info_t __attribute__((unused)); | ||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(pop) | ||
| 664 | #endif | ||
| 665 | |||
| 666 | #ifdef __MigPackStructs | ||
| 667 | #pragma pack(push, 4) | ||
| 668 | #endif | ||
| 669 | 	typedef struct { | ||
| 670 | 		mach_msg_header_t Head; | ||
| 671 | 		/* start of the kernel processed data */ | ||
| 672 | 		mach_msg_body_t msgh_body; | ||
| 673 | 		mach_msg_port_descriptor_t new_port; | ||
| 674 | 		/* end of the kernel processed data */ | ||
| 675 | 		NDR_record_t NDR; | ||
| 676 | 		exception_mask_t exception_mask; | ||
| 677 | 		exception_behavior_t behavior; | ||
| 678 | 		thread_state_flavor_t new_flavor; | ||
| 679 | 	} __Request__thread_set_exception_ports_t __attribute__((unused)); | ||
| 680 | #ifdef __MigPackStructs | ||
| 681 | #pragma pack(pop) | ||
| 682 | #endif | ||
| 683 | |||
| 684 | #ifdef __MigPackStructs | ||
| 685 | #pragma pack(push, 4) | ||
| 686 | #endif | ||
| 687 | 	typedef struct { | ||
| 688 | 		mach_msg_header_t Head; | ||
| 689 | 		NDR_record_t NDR; | ||
| 690 | 		exception_mask_t exception_mask; | ||
| 691 | 	} __Request__thread_get_exception_ports_t __attribute__((unused)); | ||
| 692 | #ifdef __MigPackStructs | ||
| 693 | #pragma pack(pop) | ||
| 694 | #endif | ||
| 695 | |||
| 696 | #ifdef __MigPackStructs | ||
| 697 | #pragma pack(push, 4) | ||
| 698 | #endif | ||
| 699 | 	typedef struct { | ||
| 700 | 		mach_msg_header_t Head; | ||
| 701 | 		/* start of the kernel processed data */ | ||
| 702 | 		mach_msg_body_t msgh_body; | ||
| 703 | 		mach_msg_port_descriptor_t new_port; | ||
| 704 | 		/* end of the kernel processed data */ | ||
| 705 | 		NDR_record_t NDR; | ||
| 706 | 		exception_mask_t exception_mask; | ||
| 707 | 		exception_behavior_t behavior; | ||
| 708 | 		thread_state_flavor_t new_flavor; | ||
| 709 | 	} __Request__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 710 | #ifdef __MigPackStructs | ||
| 711 | #pragma pack(pop) | ||
| 712 | #endif | ||
| 713 | |||
| 714 | #ifdef __MigPackStructs | ||
| 715 | #pragma pack(push, 4) | ||
| 716 | #endif | ||
| 717 | 	typedef struct { | ||
| 718 | 		mach_msg_header_t Head; | ||
| 719 | 		NDR_record_t NDR; | ||
| 720 | 		policy_t policy; | ||
| 721 | 		mach_msg_type_number_t baseCnt; | ||
| 722 | 		integer_t base[5]; | ||
| 723 | 		boolean_t set_limit; | ||
| 724 | 	} __Request__thread_policy_t __attribute__((unused)); | ||
| 725 | #ifdef __MigPackStructs | ||
| 726 | #pragma pack(pop) | ||
| 727 | #endif | ||
| 728 | |||
| 729 | #ifdef __MigPackStructs | ||
| 730 | #pragma pack(push, 4) | ||
| 731 | #endif | ||
| 732 | 	typedef struct { | ||
| 733 | 		mach_msg_header_t Head; | ||
| 734 | 		NDR_record_t NDR; | ||
| 735 | 		thread_policy_flavor_t flavor; | ||
| 736 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 737 | 		integer_t policy_info[16]; | ||
| 738 | 	} __Request__thread_policy_set_t __attribute__((unused)); | ||
| 739 | #ifdef __MigPackStructs | ||
| 740 | #pragma pack(pop) | ||
| 741 | #endif | ||
| 742 | |||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(push, 4) | ||
| 745 | #endif | ||
| 746 | 	typedef struct { | ||
| 747 | 		mach_msg_header_t Head; | ||
| 748 | 		NDR_record_t NDR; | ||
| 749 | 		thread_policy_flavor_t flavor; | ||
| 750 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 751 | 		boolean_t get_default; | ||
| 752 | 	} __Request__thread_policy_get_t __attribute__((unused)); | ||
| 753 | #ifdef __MigPackStructs | ||
| 754 | #pragma pack(pop) | ||
| 755 | #endif | ||
| 756 | |||
| 757 | #ifdef __MigPackStructs | ||
| 758 | #pragma pack(push, 4) | ||
| 759 | #endif | ||
| 760 | 	typedef struct { | ||
| 761 | 		mach_msg_header_t Head; | ||
| 762 | 		/* start of the kernel processed data */ | ||
| 763 | 		mach_msg_body_t msgh_body; | ||
| 764 | 		mach_msg_port_descriptor_t reply; | ||
| 765 | 		/* end of the kernel processed data */ | ||
| 766 | 	} __Request__thread_sample_t __attribute__((unused)); | ||
| 767 | #ifdef __MigPackStructs | ||
| 768 | #pragma pack(pop) | ||
| 769 | #endif | ||
| 770 | |||
| 771 | #ifdef __MigPackStructs | ||
| 772 | #pragma pack(push, 4) | ||
| 773 | #endif | ||
| 774 | 	typedef struct { | ||
| 775 | 		mach_msg_header_t Head; | ||
| 776 | 		NDR_record_t NDR; | ||
| 777 | 		boolean_t trace_status; | ||
| 778 | 	} __Request__etap_trace_thread_t __attribute__((unused)); | ||
| 779 | #ifdef __MigPackStructs | ||
| 780 | #pragma pack(pop) | ||
| 781 | #endif | ||
| 782 | |||
| 783 | #ifdef __MigPackStructs | ||
| 784 | #pragma pack(push, 4) | ||
| 785 | #endif | ||
| 786 | 	typedef struct { | ||
| 787 | 		mach_msg_header_t Head; | ||
| 788 | 		/* start of the kernel processed data */ | ||
| 789 | 		mach_msg_body_t msgh_body; | ||
| 790 | 		mach_msg_port_descriptor_t new_set; | ||
| 791 | 		/* end of the kernel processed data */ | ||
| 792 | 	} __Request__thread_assign_t __attribute__((unused)); | ||
| 793 | #ifdef __MigPackStructs | ||
| 794 | #pragma pack(pop) | ||
| 795 | #endif | ||
| 796 | |||
| 797 | #ifdef __MigPackStructs | ||
| 798 | #pragma pack(push, 4) | ||
| 799 | #endif | ||
| 800 | 	typedef struct { | ||
| 801 | 		mach_msg_header_t Head; | ||
| 802 | 	} __Request__thread_assign_default_t __attribute__((unused)); | ||
| 803 | #ifdef __MigPackStructs | ||
| 804 | #pragma pack(pop) | ||
| 805 | #endif | ||
| 806 | |||
| 807 | #ifdef __MigPackStructs | ||
| 808 | #pragma pack(push, 4) | ||
| 809 | #endif | ||
| 810 | 	typedef struct { | ||
| 811 | 		mach_msg_header_t Head; | ||
| 812 | 	} __Request__thread_get_assignment_t __attribute__((unused)); | ||
| 813 | #ifdef __MigPackStructs | ||
| 814 | #pragma pack(pop) | ||
| 815 | #endif | ||
| 816 | |||
| 817 | #ifdef __MigPackStructs | ||
| 818 | #pragma pack(push, 4) | ||
| 819 | #endif | ||
| 820 | 	typedef struct { | ||
| 821 | 		mach_msg_header_t Head; | ||
| 822 | 		/* start of the kernel processed data */ | ||
| 823 | 		mach_msg_body_t msgh_body; | ||
| 824 | 		mach_msg_port_descriptor_t pset; | ||
| 825 | 		/* end of the kernel processed data */ | ||
| 826 | 		NDR_record_t NDR; | ||
| 827 | 		policy_t policy; | ||
| 828 | 		mach_msg_type_number_t baseCnt; | ||
| 829 | 		integer_t base[5]; | ||
| 830 | 		mach_msg_type_number_t limitCnt; | ||
| 831 | 		integer_t limit[1]; | ||
| 832 | 	} __Request__thread_set_policy_t __attribute__((unused)); | ||
| 833 | #ifdef __MigPackStructs | ||
| 834 | #pragma pack(pop) | ||
| 835 | #endif | ||
| 836 | |||
| 837 | #ifdef __MigPackStructs | ||
| 838 | #pragma pack(push, 4) | ||
| 839 | #endif | ||
| 840 | 	typedef struct { | ||
| 841 | 		mach_msg_header_t Head; | ||
| 842 | 		NDR_record_t NDR; | ||
| 843 | 		mach_voucher_selector_t which; | ||
| 844 | 	} __Request__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 845 | #ifdef __MigPackStructs | ||
| 846 | #pragma pack(pop) | ||
| 847 | #endif | ||
| 848 | |||
| 849 | #ifdef __MigPackStructs | ||
| 850 | #pragma pack(push, 4) | ||
| 851 | #endif | ||
| 852 | 	typedef struct { | ||
| 853 | 		mach_msg_header_t Head; | ||
| 854 | 		/* start of the kernel processed data */ | ||
| 855 | 		mach_msg_body_t msgh_body; | ||
| 856 | 		mach_msg_port_descriptor_t voucher; | ||
| 857 | 		/* end of the kernel processed data */ | ||
| 858 | 	} __Request__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 859 | #ifdef __MigPackStructs | ||
| 860 | #pragma pack(pop) | ||
| 861 | #endif | ||
| 862 | |||
| 863 | #ifdef __MigPackStructs | ||
| 864 | #pragma pack(push, 4) | ||
| 865 | #endif | ||
| 866 | 	typedef struct { | ||
| 867 | 		mach_msg_header_t Head; | ||
| 868 | 		/* start of the kernel processed data */ | ||
| 869 | 		mach_msg_body_t msgh_body; | ||
| 870 | 		mach_msg_port_descriptor_t new_voucher; | ||
| 871 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 872 | 		/* end of the kernel processed data */ | ||
| 873 | 	} __Request__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 874 | #ifdef __MigPackStructs | ||
| 875 | #pragma pack(pop) | ||
| 876 | #endif | ||
| 877 | |||
| 878 | #ifdef __MigPackStructs | ||
| 879 | #pragma pack(push, 4) | ||
| 880 | #endif | ||
| 881 | 	typedef struct { | ||
| 882 | 		mach_msg_header_t Head; | ||
| 883 | 		NDR_record_t NDR; | ||
| 884 | 		int direction; | ||
| 885 | 		thread_state_flavor_t flavor; | ||
| 886 | 		mach_msg_type_number_t in_stateCnt; | ||
| 887 | 		natural_t in_state[1296]; | ||
| 888 | 		mach_msg_type_number_t out_stateCnt; | ||
| 889 | 	} __Request__thread_convert_thread_state_t __attribute__((unused)); | ||
| 890 | #ifdef __MigPackStructs | ||
| 891 | #pragma pack(pop) | ||
| 892 | #endif | ||
| 893 | |||
| 894 | #ifdef __MigPackStructs | ||
| 895 | #pragma pack(push, 4) | ||
| 896 | #endif | ||
| 897 | 	typedef struct { | ||
| 898 | 		mach_msg_header_t Head; | ||
| 899 | 		NDR_record_t NDR; | ||
| 900 | 		exception_mask_t exception_mask; | ||
| 901 | 	} __Request__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 902 | #ifdef __MigPackStructs | ||
| 903 | #pragma pack(pop) | ||
| 904 | #endif | ||
| 905 | #endif /* !__Request__thread_act_subsystem__defined */ | ||
| 906 | |||
| 907 | /* union of all requests */ | ||
| 908 | |||
| 909 | #ifndef __RequestUnion__thread_act_subsystem__defined | ||
| 910 | #define __RequestUnion__thread_act_subsystem__defined | ||
| 911 | union __RequestUnion__thread_act_subsystem { | ||
| 912 | 	__Request__thread_terminate_t Request_thread_terminate; | ||
| 913 | 	__Request__act_get_state_t Request_act_get_state; | ||
| 914 | 	__Request__act_set_state_t Request_act_set_state; | ||
| 915 | 	__Request__thread_get_state_t Request_thread_get_state; | ||
| 916 | 	__Request__thread_set_state_t Request_thread_set_state; | ||
| 917 | 	__Request__thread_suspend_t Request_thread_suspend; | ||
| 918 | 	__Request__thread_resume_t Request_thread_resume; | ||
| 919 | 	__Request__thread_abort_t Request_thread_abort; | ||
| 920 | 	__Request__thread_abort_safely_t Request_thread_abort_safely; | ||
| 921 | 	__Request__thread_depress_abort_t Request_thread_depress_abort; | ||
| 922 | 	__Request__thread_get_special_port_t Request_thread_get_special_port; | ||
| 923 | 	__Request__thread_set_special_port_t Request_thread_set_special_port; | ||
| 924 | 	__Request__thread_info_t Request_thread_info; | ||
| 925 | 	__Request__thread_set_exception_ports_t Request_thread_set_exception_ports; | ||
| 926 | 	__Request__thread_get_exception_ports_t Request_thread_get_exception_ports; | ||
| 927 | 	__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; | ||
| 928 | 	__Request__thread_policy_t Request_thread_policy; | ||
| 929 | 	__Request__thread_policy_set_t Request_thread_policy_set; | ||
| 930 | 	__Request__thread_policy_get_t Request_thread_policy_get; | ||
| 931 | 	__Request__thread_sample_t Request_thread_sample; | ||
| 932 | 	__Request__etap_trace_thread_t Request_etap_trace_thread; | ||
| 933 | 	__Request__thread_assign_t Request_thread_assign; | ||
| 934 | 	__Request__thread_assign_default_t Request_thread_assign_default; | ||
| 935 | 	__Request__thread_get_assignment_t Request_thread_get_assignment; | ||
| 936 | 	__Request__thread_set_policy_t Request_thread_set_policy; | ||
| 937 | 	__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher; | ||
| 938 | 	__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher; | ||
| 939 | 	__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher; | ||
| 940 | 	__Request__thread_convert_thread_state_t Request_thread_convert_thread_state; | ||
| 941 | 	__Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info; | ||
| 942 | }; | ||
| 943 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 944 | /* typedefs for all replies */ | ||
| 945 | |||
| 946 | #ifndef __Reply__thread_act_subsystem__defined | ||
| 947 | #define __Reply__thread_act_subsystem__defined | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		NDR_record_t NDR; | ||
| 955 | 		kern_return_t RetCode; | ||
| 956 | 	} __Reply__thread_terminate_t __attribute__((unused)); | ||
| 957 | #ifdef __MigPackStructs | ||
| 958 | #pragma pack(pop) | ||
| 959 | #endif | ||
| 960 | |||
| 961 | #ifdef __MigPackStructs | ||
| 962 | #pragma pack(push, 4) | ||
| 963 | #endif | ||
| 964 | 	typedef struct { | ||
| 965 | 		mach_msg_header_t Head; | ||
| 966 | 		NDR_record_t NDR; | ||
| 967 | 		kern_return_t RetCode; | ||
| 968 | 		mach_msg_type_number_t old_stateCnt; | ||
| 969 | 		natural_t old_state[1296]; | ||
| 970 | 	} __Reply__act_get_state_t __attribute__((unused)); | ||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(pop) | ||
| 973 | #endif | ||
| 974 | |||
| 975 | #ifdef __MigPackStructs | ||
| 976 | #pragma pack(push, 4) | ||
| 977 | #endif | ||
| 978 | 	typedef struct { | ||
| 979 | 		mach_msg_header_t Head; | ||
| 980 | 		NDR_record_t NDR; | ||
| 981 | 		kern_return_t RetCode; | ||
| 982 | 	} __Reply__act_set_state_t __attribute__((unused)); | ||
| 983 | #ifdef __MigPackStructs | ||
| 984 | #pragma pack(pop) | ||
| 985 | #endif | ||
| 986 | |||
| 987 | #ifdef __MigPackStructs | ||
| 988 | #pragma pack(push, 4) | ||
| 989 | #endif | ||
| 990 | 	typedef struct { | ||
| 991 | 		mach_msg_header_t Head; | ||
| 992 | 		NDR_record_t NDR; | ||
| 993 | 		kern_return_t RetCode; | ||
| 994 | 		mach_msg_type_number_t old_stateCnt; | ||
| 995 | 		natural_t old_state[1296]; | ||
| 996 | 	} __Reply__thread_get_state_t __attribute__((unused)); | ||
| 997 | #ifdef __MigPackStructs | ||
| 998 | #pragma pack(pop) | ||
| 999 | #endif | ||
| 1000 | |||
| 1001 | #ifdef __MigPackStructs | ||
| 1002 | #pragma pack(push, 4) | ||
| 1003 | #endif | ||
| 1004 | 	typedef struct { | ||
| 1005 | 		mach_msg_header_t Head; | ||
| 1006 | 		NDR_record_t NDR; | ||
| 1007 | 		kern_return_t RetCode; | ||
| 1008 | 	} __Reply__thread_set_state_t __attribute__((unused)); | ||
| 1009 | #ifdef __MigPackStructs | ||
| 1010 | #pragma pack(pop) | ||
| 1011 | #endif | ||
| 1012 | |||
| 1013 | #ifdef __MigPackStructs | ||
| 1014 | #pragma pack(push, 4) | ||
| 1015 | #endif | ||
| 1016 | 	typedef struct { | ||
| 1017 | 		mach_msg_header_t Head; | ||
| 1018 | 		NDR_record_t NDR; | ||
| 1019 | 		kern_return_t RetCode; | ||
| 1020 | 	} __Reply__thread_suspend_t __attribute__((unused)); | ||
| 1021 | #ifdef __MigPackStructs | ||
| 1022 | #pragma pack(pop) | ||
| 1023 | #endif | ||
| 1024 | |||
| 1025 | #ifdef __MigPackStructs | ||
| 1026 | #pragma pack(push, 4) | ||
| 1027 | #endif | ||
| 1028 | 	typedef struct { | ||
| 1029 | 		mach_msg_header_t Head; | ||
| 1030 | 		NDR_record_t NDR; | ||
| 1031 | 		kern_return_t RetCode; | ||
| 1032 | 	} __Reply__thread_resume_t __attribute__((unused)); | ||
| 1033 | #ifdef __MigPackStructs | ||
| 1034 | #pragma pack(pop) | ||
| 1035 | #endif | ||
| 1036 | |||
| 1037 | #ifdef __MigPackStructs | ||
| 1038 | #pragma pack(push, 4) | ||
| 1039 | #endif | ||
| 1040 | 	typedef struct { | ||
| 1041 | 		mach_msg_header_t Head; | ||
| 1042 | 		NDR_record_t NDR; | ||
| 1043 | 		kern_return_t RetCode; | ||
| 1044 | 	} __Reply__thread_abort_t __attribute__((unused)); | ||
| 1045 | #ifdef __MigPackStructs | ||
| 1046 | #pragma pack(pop) | ||
| 1047 | #endif | ||
| 1048 | |||
| 1049 | #ifdef __MigPackStructs | ||
| 1050 | #pragma pack(push, 4) | ||
| 1051 | #endif | ||
| 1052 | 	typedef struct { | ||
| 1053 | 		mach_msg_header_t Head; | ||
| 1054 | 		NDR_record_t NDR; | ||
| 1055 | 		kern_return_t RetCode; | ||
| 1056 | 	} __Reply__thread_abort_safely_t __attribute__((unused)); | ||
| 1057 | #ifdef __MigPackStructs | ||
| 1058 | #pragma pack(pop) | ||
| 1059 | #endif | ||
| 1060 | |||
| 1061 | #ifdef __MigPackStructs | ||
| 1062 | #pragma pack(push, 4) | ||
| 1063 | #endif | ||
| 1064 | 	typedef struct { | ||
| 1065 | 		mach_msg_header_t Head; | ||
| 1066 | 		NDR_record_t NDR; | ||
| 1067 | 		kern_return_t RetCode; | ||
| 1068 | 	} __Reply__thread_depress_abort_t __attribute__((unused)); | ||
| 1069 | #ifdef __MigPackStructs | ||
| 1070 | #pragma pack(pop) | ||
| 1071 | #endif | ||
| 1072 | |||
| 1073 | #ifdef __MigPackStructs | ||
| 1074 | #pragma pack(push, 4) | ||
| 1075 | #endif | ||
| 1076 | 	typedef struct { | ||
| 1077 | 		mach_msg_header_t Head; | ||
| 1078 | 		/* start of the kernel processed data */ | ||
| 1079 | 		mach_msg_body_t msgh_body; | ||
| 1080 | 		mach_msg_port_descriptor_t special_port; | ||
| 1081 | 		/* end of the kernel processed data */ | ||
| 1082 | 	} __Reply__thread_get_special_port_t __attribute__((unused)); | ||
| 1083 | #ifdef __MigPackStructs | ||
| 1084 | #pragma pack(pop) | ||
| 1085 | #endif | ||
| 1086 | |||
| 1087 | #ifdef __MigPackStructs | ||
| 1088 | #pragma pack(push, 4) | ||
| 1089 | #endif | ||
| 1090 | 	typedef struct { | ||
| 1091 | 		mach_msg_header_t Head; | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		kern_return_t RetCode; | ||
| 1094 | 	} __Reply__thread_set_special_port_t __attribute__((unused)); | ||
| 1095 | #ifdef __MigPackStructs | ||
| 1096 | #pragma pack(pop) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(push, 4) | ||
| 1101 | #endif | ||
| 1102 | 	typedef struct { | ||
| 1103 | 		mach_msg_header_t Head; | ||
| 1104 | 		NDR_record_t NDR; | ||
| 1105 | 		kern_return_t RetCode; | ||
| 1106 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 1107 | 		integer_t thread_info_out[32]; | ||
| 1108 | 	} __Reply__thread_info_t __attribute__((unused)); | ||
| 1109 | #ifdef __MigPackStructs | ||
| 1110 | #pragma pack(pop) | ||
| 1111 | #endif | ||
| 1112 | |||
| 1113 | #ifdef __MigPackStructs | ||
| 1114 | #pragma pack(push, 4) | ||
| 1115 | #endif | ||
| 1116 | 	typedef struct { | ||
| 1117 | 		mach_msg_header_t Head; | ||
| 1118 | 		NDR_record_t NDR; | ||
| 1119 | 		kern_return_t RetCode; | ||
| 1120 | 	} __Reply__thread_set_exception_ports_t __attribute__((unused)); | ||
| 1121 | #ifdef __MigPackStructs | ||
| 1122 | #pragma pack(pop) | ||
| 1123 | #endif | ||
| 1124 | |||
| 1125 | #ifdef __MigPackStructs | ||
| 1126 | #pragma pack(push, 4) | ||
| 1127 | #endif | ||
| 1128 | 	typedef struct { | ||
| 1129 | 		mach_msg_header_t Head; | ||
| 1130 | 		/* start of the kernel processed data */ | ||
| 1131 | 		mach_msg_body_t msgh_body; | ||
| 1132 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1133 | 		/* end of the kernel processed data */ | ||
| 1134 | 		NDR_record_t NDR; | ||
| 1135 | 		mach_msg_type_number_t masksCnt; | ||
| 1136 | 		exception_mask_t masks[32]; | ||
| 1137 | 		exception_behavior_t old_behaviors[32]; | ||
| 1138 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1139 | 	} __Reply__thread_get_exception_ports_t __attribute__((unused)); | ||
| 1140 | #ifdef __MigPackStructs | ||
| 1141 | #pragma pack(pop) | ||
| 1142 | #endif | ||
| 1143 | |||
| 1144 | #ifdef __MigPackStructs | ||
| 1145 | #pragma pack(push, 4) | ||
| 1146 | #endif | ||
| 1147 | 	typedef struct { | ||
| 1148 | 		mach_msg_header_t Head; | ||
| 1149 | 		/* start of the kernel processed data */ | ||
| 1150 | 		mach_msg_body_t msgh_body; | ||
| 1151 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1152 | 		/* end of the kernel processed data */ | ||
| 1153 | 		NDR_record_t NDR; | ||
| 1154 | 		mach_msg_type_number_t masksCnt; | ||
| 1155 | 		exception_mask_t masks[32]; | ||
| 1156 | 		exception_behavior_t old_behaviors[32]; | ||
| 1157 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1158 | 	} __Reply__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 1159 | #ifdef __MigPackStructs | ||
| 1160 | #pragma pack(pop) | ||
| 1161 | #endif | ||
| 1162 | |||
| 1163 | #ifdef __MigPackStructs | ||
| 1164 | #pragma pack(push, 4) | ||
| 1165 | #endif | ||
| 1166 | 	typedef struct { | ||
| 1167 | 		mach_msg_header_t Head; | ||
| 1168 | 		NDR_record_t NDR; | ||
| 1169 | 		kern_return_t RetCode; | ||
| 1170 | 	} __Reply__thread_policy_t __attribute__((unused)); | ||
| 1171 | #ifdef __MigPackStructs | ||
| 1172 | #pragma pack(pop) | ||
| 1173 | #endif | ||
| 1174 | |||
| 1175 | #ifdef __MigPackStructs | ||
| 1176 | #pragma pack(push, 4) | ||
| 1177 | #endif | ||
| 1178 | 	typedef struct { | ||
| 1179 | 		mach_msg_header_t Head; | ||
| 1180 | 		NDR_record_t NDR; | ||
| 1181 | 		kern_return_t RetCode; | ||
| 1182 | 	} __Reply__thread_policy_set_t __attribute__((unused)); | ||
| 1183 | #ifdef __MigPackStructs | ||
| 1184 | #pragma pack(pop) | ||
| 1185 | #endif | ||
| 1186 | |||
| 1187 | #ifdef __MigPackStructs | ||
| 1188 | #pragma pack(push, 4) | ||
| 1189 | #endif | ||
| 1190 | 	typedef struct { | ||
| 1191 | 		mach_msg_header_t Head; | ||
| 1192 | 		NDR_record_t NDR; | ||
| 1193 | 		kern_return_t RetCode; | ||
| 1194 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 1195 | 		integer_t policy_info[16]; | ||
| 1196 | 		boolean_t get_default; | ||
| 1197 | 	} __Reply__thread_policy_get_t __attribute__((unused)); | ||
| 1198 | #ifdef __MigPackStructs | ||
| 1199 | #pragma pack(pop) | ||
| 1200 | #endif | ||
| 1201 | |||
| 1202 | #ifdef __MigPackStructs | ||
| 1203 | #pragma pack(push, 4) | ||
| 1204 | #endif | ||
| 1205 | 	typedef struct { | ||
| 1206 | 		mach_msg_header_t Head; | ||
| 1207 | 		NDR_record_t NDR; | ||
| 1208 | 		kern_return_t RetCode; | ||
| 1209 | 	} __Reply__thread_sample_t __attribute__((unused)); | ||
| 1210 | #ifdef __MigPackStructs | ||
| 1211 | #pragma pack(pop) | ||
| 1212 | #endif | ||
| 1213 | |||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(push, 4) | ||
| 1216 | #endif | ||
| 1217 | 	typedef struct { | ||
| 1218 | 		mach_msg_header_t Head; | ||
| 1219 | 		NDR_record_t NDR; | ||
| 1220 | 		kern_return_t RetCode; | ||
| 1221 | 	} __Reply__etap_trace_thread_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		NDR_record_t NDR; | ||
| 1232 | 		kern_return_t RetCode; | ||
| 1233 | 	} __Reply__thread_assign_t __attribute__((unused)); | ||
| 1234 | #ifdef __MigPackStructs | ||
| 1235 | #pragma pack(pop) | ||
| 1236 | #endif | ||
| 1237 | |||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(push, 4) | ||
| 1240 | #endif | ||
| 1241 | 	typedef struct { | ||
| 1242 | 		mach_msg_header_t Head; | ||
| 1243 | 		NDR_record_t NDR; | ||
| 1244 | 		kern_return_t RetCode; | ||
| 1245 | 	} __Reply__thread_assign_default_t __attribute__((unused)); | ||
| 1246 | #ifdef __MigPackStructs | ||
| 1247 | #pragma pack(pop) | ||
| 1248 | #endif | ||
| 1249 | |||
| 1250 | #ifdef __MigPackStructs | ||
| 1251 | #pragma pack(push, 4) | ||
| 1252 | #endif | ||
| 1253 | 	typedef struct { | ||
| 1254 | 		mach_msg_header_t Head; | ||
| 1255 | 		/* start of the kernel processed data */ | ||
| 1256 | 		mach_msg_body_t msgh_body; | ||
| 1257 | 		mach_msg_port_descriptor_t assigned_set; | ||
| 1258 | 		/* end of the kernel processed data */ | ||
| 1259 | 	} __Reply__thread_get_assignment_t __attribute__((unused)); | ||
| 1260 | #ifdef __MigPackStructs | ||
| 1261 | #pragma pack(pop) | ||
| 1262 | #endif | ||
| 1263 | |||
| 1264 | #ifdef __MigPackStructs | ||
| 1265 | #pragma pack(push, 4) | ||
| 1266 | #endif | ||
| 1267 | 	typedef struct { | ||
| 1268 | 		mach_msg_header_t Head; | ||
| 1269 | 		NDR_record_t NDR; | ||
| 1270 | 		kern_return_t RetCode; | ||
| 1271 | 	} __Reply__thread_set_policy_t __attribute__((unused)); | ||
| 1272 | #ifdef __MigPackStructs | ||
| 1273 | #pragma pack(pop) | ||
| 1274 | #endif | ||
| 1275 | |||
| 1276 | #ifdef __MigPackStructs | ||
| 1277 | #pragma pack(push, 4) | ||
| 1278 | #endif | ||
| 1279 | 	typedef struct { | ||
| 1280 | 		mach_msg_header_t Head; | ||
| 1281 | 		/* start of the kernel processed data */ | ||
| 1282 | 		mach_msg_body_t msgh_body; | ||
| 1283 | 		mach_msg_port_descriptor_t voucher; | ||
| 1284 | 		/* end of the kernel processed data */ | ||
| 1285 | 	} __Reply__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 1286 | #ifdef __MigPackStructs | ||
| 1287 | #pragma pack(pop) | ||
| 1288 | #endif | ||
| 1289 | |||
| 1290 | #ifdef __MigPackStructs | ||
| 1291 | #pragma pack(push, 4) | ||
| 1292 | #endif | ||
| 1293 | 	typedef struct { | ||
| 1294 | 		mach_msg_header_t Head; | ||
| 1295 | 		NDR_record_t NDR; | ||
| 1296 | 		kern_return_t RetCode; | ||
| 1297 | 	} __Reply__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 1298 | #ifdef __MigPackStructs | ||
| 1299 | #pragma pack(pop) | ||
| 1300 | #endif | ||
| 1301 | |||
| 1302 | #ifdef __MigPackStructs | ||
| 1303 | #pragma pack(push, 4) | ||
| 1304 | #endif | ||
| 1305 | 	typedef struct { | ||
| 1306 | 		mach_msg_header_t Head; | ||
| 1307 | 		/* start of the kernel processed data */ | ||
| 1308 | 		mach_msg_body_t msgh_body; | ||
| 1309 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 1310 | 		/* end of the kernel processed data */ | ||
| 1311 | 	} __Reply__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 1312 | #ifdef __MigPackStructs | ||
| 1313 | #pragma pack(pop) | ||
| 1314 | #endif | ||
| 1315 | |||
| 1316 | #ifdef __MigPackStructs | ||
| 1317 | #pragma pack(push, 4) | ||
| 1318 | #endif | ||
| 1319 | 	typedef struct { | ||
| 1320 | 		mach_msg_header_t Head; | ||
| 1321 | 		NDR_record_t NDR; | ||
| 1322 | 		kern_return_t RetCode; | ||
| 1323 | 		mach_msg_type_number_t out_stateCnt; | ||
| 1324 | 		natural_t out_state[1296]; | ||
| 1325 | 	} __Reply__thread_convert_thread_state_t __attribute__((unused)); | ||
| 1326 | #ifdef __MigPackStructs | ||
| 1327 | #pragma pack(pop) | ||
| 1328 | #endif | ||
| 1329 | |||
| 1330 | #ifdef __MigPackStructs | ||
| 1331 | #pragma pack(push, 4) | ||
| 1332 | #endif | ||
| 1333 | 	typedef struct { | ||
| 1334 | 		mach_msg_header_t Head; | ||
| 1335 | 		NDR_record_t NDR; | ||
| 1336 | 		kern_return_t RetCode; | ||
| 1337 | 		mach_msg_type_number_t masksCnt; | ||
| 1338 | 		exception_mask_t masks[32]; | ||
| 1339 | 		exception_handler_info_t old_handlers_info[32]; | ||
| 1340 | 		exception_behavior_t old_behaviors[32]; | ||
| 1341 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1342 | 	} __Reply__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 1343 | #ifdef __MigPackStructs | ||
| 1344 | #pragma pack(pop) | ||
| 1345 | #endif | ||
| 1346 | #endif /* !__Reply__thread_act_subsystem__defined */ | ||
| 1347 | |||
| 1348 | /* union of all replies */ | ||
| 1349 | |||
| 1350 | #ifndef __ReplyUnion__thread_act_subsystem__defined | ||
| 1351 | #define __ReplyUnion__thread_act_subsystem__defined | ||
| 1352 | union __ReplyUnion__thread_act_subsystem { | ||
| 1353 | 	__Reply__thread_terminate_t Reply_thread_terminate; | ||
| 1354 | 	__Reply__act_get_state_t Reply_act_get_state; | ||
| 1355 | 	__Reply__act_set_state_t Reply_act_set_state; | ||
| 1356 | 	__Reply__thread_get_state_t Reply_thread_get_state; | ||
| 1357 | 	__Reply__thread_set_state_t Reply_thread_set_state; | ||
| 1358 | 	__Reply__thread_suspend_t Reply_thread_suspend; | ||
| 1359 | 	__Reply__thread_resume_t Reply_thread_resume; | ||
| 1360 | 	__Reply__thread_abort_t Reply_thread_abort; | ||
| 1361 | 	__Reply__thread_abort_safely_t Reply_thread_abort_safely; | ||
| 1362 | 	__Reply__thread_depress_abort_t Reply_thread_depress_abort; | ||
| 1363 | 	__Reply__thread_get_special_port_t Reply_thread_get_special_port; | ||
| 1364 | 	__Reply__thread_set_special_port_t Reply_thread_set_special_port; | ||
| 1365 | 	__Reply__thread_info_t Reply_thread_info; | ||
| 1366 | 	__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; | ||
| 1367 | 	__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; | ||
| 1368 | 	__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; | ||
| 1369 | 	__Reply__thread_policy_t Reply_thread_policy; | ||
| 1370 | 	__Reply__thread_policy_set_t Reply_thread_policy_set; | ||
| 1371 | 	__Reply__thread_policy_get_t Reply_thread_policy_get; | ||
| 1372 | 	__Reply__thread_sample_t Reply_thread_sample; | ||
| 1373 | 	__Reply__etap_trace_thread_t Reply_etap_trace_thread; | ||
| 1374 | 	__Reply__thread_assign_t Reply_thread_assign; | ||
| 1375 | 	__Reply__thread_assign_default_t Reply_thread_assign_default; | ||
| 1376 | 	__Reply__thread_get_assignment_t Reply_thread_get_assignment; | ||
| 1377 | 	__Reply__thread_set_policy_t Reply_thread_set_policy; | ||
| 1378 | 	__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher; | ||
| 1379 | 	__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher; | ||
| 1380 | 	__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher; | ||
| 1381 | 	__Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state; | ||
| 1382 | 	__Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info; | ||
| 1383 | }; | ||
| 1384 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 1385 | |||
| 1386 | #ifndef subsystem_to_name_map_thread_act | ||
| 1387 | #define subsystem_to_name_map_thread_act \ | ||
| 1388 | { "thread_terminate", 3600 },\ | ||
| 1389 | { "act_get_state", 3601 },\ | ||
| 1390 | { "act_set_state", 3602 },\ | ||
| 1391 | { "thread_get_state", 3603 },\ | ||
| 1392 | { "thread_set_state", 3604 },\ | ||
| 1393 | { "thread_suspend", 3605 },\ | ||
| 1394 | { "thread_resume", 3606 },\ | ||
| 1395 | { "thread_abort", 3607 },\ | ||
| 1396 | { "thread_abort_safely", 3608 },\ | ||
| 1397 | { "thread_depress_abort", 3609 },\ | ||
| 1398 | { "thread_get_special_port", 3610 },\ | ||
| 1399 | { "thread_set_special_port", 3611 },\ | ||
| 1400 | { "thread_info", 3612 },\ | ||
| 1401 | { "thread_set_exception_ports", 3613 },\ | ||
| 1402 | { "thread_get_exception_ports", 3614 },\ | ||
| 1403 | { "thread_swap_exception_ports", 3615 },\ | ||
| 1404 | { "thread_policy", 3616 },\ | ||
| 1405 | { "thread_policy_set", 3617 },\ | ||
| 1406 | { "thread_policy_get", 3618 },\ | ||
| 1407 | { "thread_sample", 3619 },\ | ||
| 1408 | { "etap_trace_thread", 3620 },\ | ||
| 1409 | { "thread_assign", 3621 },\ | ||
| 1410 | { "thread_assign_default", 3622 },\ | ||
| 1411 | { "thread_get_assignment", 3623 },\ | ||
| 1412 | { "thread_set_policy", 3624 },\ | ||
| 1413 | { "thread_get_mach_voucher", 3625 },\ | ||
| 1414 | { "thread_set_mach_voucher", 3626 },\ | ||
| 1415 | { "thread_swap_mach_voucher", 3627 },\ | ||
| 1416 | { "thread_convert_thread_state", 3628 },\ | ||
| 1417 | { "thread_get_exception_ports_info", 3630 } | ||
| 1418 | #endif | ||
| 1419 | |||
| 1420 | #ifdef __AfterMigUserHeader | ||
| 1421 | __AfterMigUserHeader | ||
| 1422 | #endif /* __AfterMigUserHeader */ | ||
| 1423 | |||
| 1424 | #endif	 /* _thread_act_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/thread_policy.h+8-4| ... | @@ -131,7 +131,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t; | ... | @@ -131,7 +131,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t; |
| 131 | * | 131 | * |
| 132 | * computation: This is the nominal amount of computation | 132 | * computation: This is the nominal amount of computation |
| 133 | * time needed during a separate processing arrival, specified | 133 | * time needed during a separate processing arrival, specified |
| 134 | * in absolute time units. | 134 | * in absolute time units. The thread may be preempted after |
| 135 | * the computation time has elapsed. | ||
| 136 | * If (computation < constraint/2) it will be forced to | ||
| 137 | * constraint/2 to avoid unintended preemption and associated | ||
| 138 | * timer interrupts. | ||
| 135 | * | 139 | * |
| 136 | * constraint: This is the maximum amount of real time that | 140 | * constraint: This is the maximum amount of real time that |
| 137 | * may elapse from the start of a separate processing arrival | 141 | * may elapse from the start of a separate processing arrival |
| ... | @@ -139,11 +143,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t; | ... | @@ -139,11 +143,11 @@ typedef struct thread_extended_policy *thread_extended_policy_t; |
| 139 | * specified in absolute time units. Must be (>= computation). | 143 | * specified in absolute time units. Must be (>= computation). |
| 140 | * Note that latency = (constraint - computation). | 144 | * Note that latency = (constraint - computation). |
| 141 | * | 145 | * |
| 142 | * preemptible: This indicates that the computation may be | 146 | * preemptible: IGNORED (This indicates that the computation may be |
| 143 | * interrupted, subject to the constraint specified above. | 147 | * interrupted, subject to the constraint specified above.) |
| 144 | */ | 148 | */ |
| 145 | 149 | ||
| 146 | #define THREAD_TIME_CONSTRAINT_POLICY 2 | 150 | #define THREAD_TIME_CONSTRAINT_POLICY 2 |
| 147 | 151 | ||
| 148 | struct thread_time_constraint_policy { | 152 | struct thread_time_constraint_policy { |
| 149 | 	uint32_t period; | 153 | 	uint32_t period; |
lib/libc/include/any-macos-any/mach/thread_state.h-2| ... | @@ -32,7 +32,6 @@ | ... | @@ -32,7 +32,6 @@ |
| 32 | #include <Availability.h> | 32 | #include <Availability.h> |
| 33 | #include <mach/mach.h> | 33 | #include <mach/mach.h> |
| 34 | 34 | ||
| 35 | #ifndef KERNEL | ||
| 36 | /* | 35 | /* |
| 37 | * Gets all register values in the target thread with pointer-like contents. | 36 | * Gets all register values in the target thread with pointer-like contents. |
| 38 | * | 37 | * |
| ... | @@ -58,6 +57,5 @@ | ... | @@ -58,6 +57,5 @@ |
| 58 | __API_AVAILABLE(macosx(10.14), ios(12.0), tvos(9.0), watchos(5.0)) | 57 | __API_AVAILABLE(macosx(10.14), ios(12.0), tvos(9.0), watchos(5.0)) |
| 59 | kern_return_t thread_get_register_pointer_values(thread_t thread, | 58 | kern_return_t thread_get_register_pointer_values(thread_t thread, |
| 60 | uintptr_t *sp, size_t *length, uintptr_t *values); | 59 | uintptr_t *sp, size_t *length, uintptr_t *values); |
| 61 | #endif | ||
| 62 | 60 | ||
| 63 | #endif /* _MACH_THREAD_STATE_H_ */ | 61 | #endif /* _MACH_THREAD_STATE_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/vm_map.h created+1503| ... | @@ -0,0 +1,1503 @@ | ||
| 1 | #ifndef	_vm_map_user_ | ||
| 2 | #define	_vm_map_user_ | ||
| 3 | |||
| 4 | /* Module vm_map */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	vm_map_MSG_COUNT | ||
| 52 | #define	vm_map_MSG_COUNT	33 | ||
| 53 | #endif	/* vm_map_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine vm_region */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t vm_region | ||
| 77 | ( | ||
| 78 | 	vm_map_read_t target_task, | ||
| 79 | 	vm_address_t *address, | ||
| 80 | 	vm_size_t *size, | ||
| 81 | 	vm_region_flavor_t flavor, | ||
| 82 | 	vm_region_info_t info, | ||
| 83 | 	mach_msg_type_number_t *infoCnt, | ||
| 84 | 	mach_port_t *object_name | ||
| 85 | ); | ||
| 86 | |||
| 87 | /* Routine vm_allocate */ | ||
| 88 | #ifdef	mig_external | ||
| 89 | mig_external | ||
| 90 | #else | ||
| 91 | extern | ||
| 92 | #endif	/* mig_external */ | ||
| 93 | kern_return_t vm_allocate | ||
| 94 | ( | ||
| 95 | 	vm_map_t target_task, | ||
| 96 | 	vm_address_t *address, | ||
| 97 | 	vm_size_t size, | ||
| 98 | 	int flags | ||
| 99 | ); | ||
| 100 | |||
| 101 | /* Routine vm_deallocate */ | ||
| 102 | #ifdef	mig_external | ||
| 103 | mig_external | ||
| 104 | #else | ||
| 105 | extern | ||
| 106 | #endif	/* mig_external */ | ||
| 107 | kern_return_t vm_deallocate | ||
| 108 | ( | ||
| 109 | 	vm_map_t target_task, | ||
| 110 | 	vm_address_t address, | ||
| 111 | 	vm_size_t size | ||
| 112 | ); | ||
| 113 | |||
| 114 | /* Routine vm_protect */ | ||
| 115 | #ifdef	mig_external | ||
| 116 | mig_external | ||
| 117 | #else | ||
| 118 | extern | ||
| 119 | #endif	/* mig_external */ | ||
| 120 | kern_return_t vm_protect | ||
| 121 | ( | ||
| 122 | 	vm_map_t target_task, | ||
| 123 | 	vm_address_t address, | ||
| 124 | 	vm_size_t size, | ||
| 125 | 	boolean_t set_maximum, | ||
| 126 | 	vm_prot_t new_protection | ||
| 127 | ); | ||
| 128 | |||
| 129 | /* Routine vm_inherit */ | ||
| 130 | #ifdef	mig_external | ||
| 131 | mig_external | ||
| 132 | #else | ||
| 133 | extern | ||
| 134 | #endif	/* mig_external */ | ||
| 135 | kern_return_t vm_inherit | ||
| 136 | ( | ||
| 137 | 	vm_map_t target_task, | ||
| 138 | 	vm_address_t address, | ||
| 139 | 	vm_size_t size, | ||
| 140 | 	vm_inherit_t new_inheritance | ||
| 141 | ); | ||
| 142 | |||
| 143 | /* Routine vm_read */ | ||
| 144 | #ifdef	mig_external | ||
| 145 | mig_external | ||
| 146 | #else | ||
| 147 | extern | ||
| 148 | #endif	/* mig_external */ | ||
| 149 | kern_return_t vm_read | ||
| 150 | ( | ||
| 151 | 	vm_map_read_t target_task, | ||
| 152 | 	vm_address_t address, | ||
| 153 | 	vm_size_t size, | ||
| 154 | 	vm_offset_t *data, | ||
| 155 | 	mach_msg_type_number_t *dataCnt | ||
| 156 | ); | ||
| 157 | |||
| 158 | /* Routine vm_read_list */ | ||
| 159 | #ifdef	mig_external | ||
| 160 | mig_external | ||
| 161 | #else | ||
| 162 | extern | ||
| 163 | #endif	/* mig_external */ | ||
| 164 | kern_return_t vm_read_list | ||
| 165 | ( | ||
| 166 | 	vm_map_read_t target_task, | ||
| 167 | 	vm_read_entry_t data_list, | ||
| 168 | 	natural_t count | ||
| 169 | ); | ||
| 170 | |||
| 171 | /* Routine vm_write */ | ||
| 172 | #ifdef	mig_external | ||
| 173 | mig_external | ||
| 174 | #else | ||
| 175 | extern | ||
| 176 | #endif	/* mig_external */ | ||
| 177 | kern_return_t vm_write | ||
| 178 | ( | ||
| 179 | 	vm_map_t target_task, | ||
| 180 | 	vm_address_t address, | ||
| 181 | 	vm_offset_t data, | ||
| 182 | 	mach_msg_type_number_t dataCnt | ||
| 183 | ); | ||
| 184 | |||
| 185 | /* Routine vm_copy */ | ||
| 186 | #ifdef	mig_external | ||
| 187 | mig_external | ||
| 188 | #else | ||
| 189 | extern | ||
| 190 | #endif	/* mig_external */ | ||
| 191 | kern_return_t vm_copy | ||
| 192 | ( | ||
| 193 | 	vm_map_t target_task, | ||
| 194 | 	vm_address_t source_address, | ||
| 195 | 	vm_size_t size, | ||
| 196 | 	vm_address_t dest_address | ||
| 197 | ); | ||
| 198 | |||
| 199 | /* Routine vm_read_overwrite */ | ||
| 200 | #ifdef	mig_external | ||
| 201 | mig_external | ||
| 202 | #else | ||
| 203 | extern | ||
| 204 | #endif	/* mig_external */ | ||
| 205 | kern_return_t vm_read_overwrite | ||
| 206 | ( | ||
| 207 | 	vm_map_read_t target_task, | ||
| 208 | 	vm_address_t address, | ||
| 209 | 	vm_size_t size, | ||
| 210 | 	vm_address_t data, | ||
| 211 | 	vm_size_t *outsize | ||
| 212 | ); | ||
| 213 | |||
| 214 | /* Routine vm_msync */ | ||
| 215 | #ifdef	mig_external | ||
| 216 | mig_external | ||
| 217 | #else | ||
| 218 | extern | ||
| 219 | #endif	/* mig_external */ | ||
| 220 | kern_return_t vm_msync | ||
| 221 | ( | ||
| 222 | 	vm_map_t target_task, | ||
| 223 | 	vm_address_t address, | ||
| 224 | 	vm_size_t size, | ||
| 225 | 	vm_sync_t sync_flags | ||
| 226 | ); | ||
| 227 | |||
| 228 | /* Routine vm_behavior_set */ | ||
| 229 | #ifdef	mig_external | ||
| 230 | mig_external | ||
| 231 | #else | ||
| 232 | extern | ||
| 233 | #endif	/* mig_external */ | ||
| 234 | kern_return_t vm_behavior_set | ||
| 235 | ( | ||
| 236 | 	vm_map_t target_task, | ||
| 237 | 	vm_address_t address, | ||
| 238 | 	vm_size_t size, | ||
| 239 | 	vm_behavior_t new_behavior | ||
| 240 | ); | ||
| 241 | |||
| 242 | /* Routine vm_map */ | ||
| 243 | #ifdef	mig_external | ||
| 244 | mig_external | ||
| 245 | #else | ||
| 246 | extern | ||
| 247 | #endif	/* mig_external */ | ||
| 248 | kern_return_t vm_map | ||
| 249 | ( | ||
| 250 | 	vm_map_t target_task, | ||
| 251 | 	vm_address_t *address, | ||
| 252 | 	vm_size_t size, | ||
| 253 | 	vm_address_t mask, | ||
| 254 | 	int flags, | ||
| 255 | 	mem_entry_name_port_t object, | ||
| 256 | 	vm_offset_t offset, | ||
| 257 | 	boolean_t copy, | ||
| 258 | 	vm_prot_t cur_protection, | ||
| 259 | 	vm_prot_t max_protection, | ||
| 260 | 	vm_inherit_t inheritance | ||
| 261 | ); | ||
| 262 | |||
| 263 | /* Routine vm_machine_attribute */ | ||
| 264 | #ifdef	mig_external | ||
| 265 | mig_external | ||
| 266 | #else | ||
| 267 | extern | ||
| 268 | #endif	/* mig_external */ | ||
| 269 | kern_return_t vm_machine_attribute | ||
| 270 | ( | ||
| 271 | 	vm_map_t target_task, | ||
| 272 | 	vm_address_t address, | ||
| 273 | 	vm_size_t size, | ||
| 274 | 	vm_machine_attribute_t attribute, | ||
| 275 | 	vm_machine_attribute_val_t *value | ||
| 276 | ); | ||
| 277 | |||
| 278 | /* Routine vm_remap */ | ||
| 279 | #ifdef	mig_external | ||
| 280 | mig_external | ||
| 281 | #else | ||
| 282 | extern | ||
| 283 | #endif	/* mig_external */ | ||
| 284 | kern_return_t vm_remap | ||
| 285 | ( | ||
| 286 | 	vm_map_t target_task, | ||
| 287 | 	vm_address_t *target_address, | ||
| 288 | 	vm_size_t size, | ||
| 289 | 	vm_address_t mask, | ||
| 290 | 	int flags, | ||
| 291 | 	vm_map_t src_task, | ||
| 292 | 	vm_address_t src_address, | ||
| 293 | 	boolean_t copy, | ||
| 294 | 	vm_prot_t *cur_protection, | ||
| 295 | 	vm_prot_t *max_protection, | ||
| 296 | 	vm_inherit_t inheritance | ||
| 297 | ); | ||
| 298 | |||
| 299 | /* Routine task_wire */ | ||
| 300 | #ifdef	mig_external | ||
| 301 | mig_external | ||
| 302 | #else | ||
| 303 | extern | ||
| 304 | #endif	/* mig_external */ | ||
| 305 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 306 | kern_return_t task_wire | ||
| 307 | ( | ||
| 308 | 	vm_map_t target_task, | ||
| 309 | 	boolean_t must_wire | ||
| 310 | ); | ||
| 311 | |||
| 312 | /* Routine mach_make_memory_entry */ | ||
| 313 | #ifdef	mig_external | ||
| 314 | mig_external | ||
| 315 | #else | ||
| 316 | extern | ||
| 317 | #endif	/* mig_external */ | ||
| 318 | kern_return_t mach_make_memory_entry | ||
| 319 | ( | ||
| 320 | 	vm_map_t target_task, | ||
| 321 | 	vm_size_t *size, | ||
| 322 | 	vm_offset_t offset, | ||
| 323 | 	vm_prot_t permission, | ||
| 324 | 	mem_entry_name_port_t *object_handle, | ||
| 325 | 	mem_entry_name_port_t parent_entry | ||
| 326 | ); | ||
| 327 | |||
| 328 | /* Routine vm_map_page_query */ | ||
| 329 | #ifdef	mig_external | ||
| 330 | mig_external | ||
| 331 | #else | ||
| 332 | extern | ||
| 333 | #endif	/* mig_external */ | ||
| 334 | kern_return_t vm_map_page_query | ||
| 335 | ( | ||
| 336 | 	vm_map_read_t target_map, | ||
| 337 | 	vm_offset_t offset, | ||
| 338 | 	integer_t *disposition, | ||
| 339 | 	integer_t *ref_count | ||
| 340 | ); | ||
| 341 | |||
| 342 | /* Routine mach_vm_region_info */ | ||
| 343 | #ifdef	mig_external | ||
| 344 | mig_external | ||
| 345 | #else | ||
| 346 | extern | ||
| 347 | #endif	/* mig_external */ | ||
| 348 | kern_return_t mach_vm_region_info | ||
| 349 | ( | ||
| 350 | 	vm_map_read_t task, | ||
| 351 | 	vm_address_t address, | ||
| 352 | 	vm_info_region_t *region, | ||
| 353 | 	vm_info_object_array_t *objects, | ||
| 354 | 	mach_msg_type_number_t *objectsCnt | ||
| 355 | ); | ||
| 356 | |||
| 357 | /* Routine vm_mapped_pages_info */ | ||
| 358 | #ifdef	mig_external | ||
| 359 | mig_external | ||
| 360 | #else | ||
| 361 | extern | ||
| 362 | #endif	/* mig_external */ | ||
| 363 | kern_return_t vm_mapped_pages_info | ||
| 364 | ( | ||
| 365 | 	vm_map_read_t task, | ||
| 366 | 	page_address_array_t *pages, | ||
| 367 | 	mach_msg_type_number_t *pagesCnt | ||
| 368 | ); | ||
| 369 | |||
| 370 | /* Routine vm_region_recurse */ | ||
| 371 | #ifdef	mig_external | ||
| 372 | mig_external | ||
| 373 | #else | ||
| 374 | extern | ||
| 375 | #endif	/* mig_external */ | ||
| 376 | kern_return_t vm_region_recurse | ||
| 377 | ( | ||
| 378 | 	vm_map_read_t target_task, | ||
| 379 | 	vm_address_t *address, | ||
| 380 | 	vm_size_t *size, | ||
| 381 | 	natural_t *nesting_depth, | ||
| 382 | 	vm_region_recurse_info_t info, | ||
| 383 | 	mach_msg_type_number_t *infoCnt | ||
| 384 | ); | ||
| 385 | |||
| 386 | /* Routine vm_region_recurse_64 */ | ||
| 387 | #ifdef	mig_external | ||
| 388 | mig_external | ||
| 389 | #else | ||
| 390 | extern | ||
| 391 | #endif	/* mig_external */ | ||
| 392 | kern_return_t vm_region_recurse_64 | ||
| 393 | ( | ||
| 394 | 	vm_map_read_t target_task, | ||
| 395 | 	vm_address_t *address, | ||
| 396 | 	vm_size_t *size, | ||
| 397 | 	natural_t *nesting_depth, | ||
| 398 | 	vm_region_recurse_info_t info, | ||
| 399 | 	mach_msg_type_number_t *infoCnt | ||
| 400 | ); | ||
| 401 | |||
| 402 | /* Routine mach_vm_region_info_64 */ | ||
| 403 | #ifdef	mig_external | ||
| 404 | mig_external | ||
| 405 | #else | ||
| 406 | extern | ||
| 407 | #endif	/* mig_external */ | ||
| 408 | kern_return_t mach_vm_region_info_64 | ||
| 409 | ( | ||
| 410 | 	vm_map_read_t task, | ||
| 411 | 	vm_address_t address, | ||
| 412 | 	vm_info_region_64_t *region, | ||
| 413 | 	vm_info_object_array_t *objects, | ||
| 414 | 	mach_msg_type_number_t *objectsCnt | ||
| 415 | ); | ||
| 416 | |||
| 417 | /* Routine vm_region_64 */ | ||
| 418 | #ifdef	mig_external | ||
| 419 | mig_external | ||
| 420 | #else | ||
| 421 | extern | ||
| 422 | #endif	/* mig_external */ | ||
| 423 | kern_return_t vm_region_64 | ||
| 424 | ( | ||
| 425 | 	vm_map_read_t target_task, | ||
| 426 | 	vm_address_t *address, | ||
| 427 | 	vm_size_t *size, | ||
| 428 | 	vm_region_flavor_t flavor, | ||
| 429 | 	vm_region_info_t info, | ||
| 430 | 	mach_msg_type_number_t *infoCnt, | ||
| 431 | 	mach_port_t *object_name | ||
| 432 | ); | ||
| 433 | |||
| 434 | /* Routine mach_make_memory_entry_64 */ | ||
| 435 | #ifdef	mig_external | ||
| 436 | mig_external | ||
| 437 | #else | ||
| 438 | extern | ||
| 439 | #endif	/* mig_external */ | ||
| 440 | kern_return_t mach_make_memory_entry_64 | ||
| 441 | ( | ||
| 442 | 	vm_map_t target_task, | ||
| 443 | 	memory_object_size_t *size, | ||
| 444 | 	memory_object_offset_t offset, | ||
| 445 | 	vm_prot_t permission, | ||
| 446 | 	mach_port_t *object_handle, | ||
| 447 | 	mem_entry_name_port_t parent_entry | ||
| 448 | ); | ||
| 449 | |||
| 450 | /* Routine vm_map_64 */ | ||
| 451 | #ifdef	mig_external | ||
| 452 | mig_external | ||
| 453 | #else | ||
| 454 | extern | ||
| 455 | #endif	/* mig_external */ | ||
| 456 | kern_return_t vm_map_64 | ||
| 457 | ( | ||
| 458 | 	vm_map_t target_task, | ||
| 459 | 	vm_address_t *address, | ||
| 460 | 	vm_size_t size, | ||
| 461 | 	vm_address_t mask, | ||
| 462 | 	int flags, | ||
| 463 | 	mem_entry_name_port_t object, | ||
| 464 | 	memory_object_offset_t offset, | ||
| 465 | 	boolean_t copy, | ||
| 466 | 	vm_prot_t cur_protection, | ||
| 467 | 	vm_prot_t max_protection, | ||
| 468 | 	vm_inherit_t inheritance | ||
| 469 | ); | ||
| 470 | |||
| 471 | /* Routine vm_purgable_control */ | ||
| 472 | #ifdef	mig_external | ||
| 473 | mig_external | ||
| 474 | #else | ||
| 475 | extern | ||
| 476 | #endif	/* mig_external */ | ||
| 477 | kern_return_t vm_purgable_control | ||
| 478 | ( | ||
| 479 | 	vm_map_t target_task, | ||
| 480 | 	vm_address_t address, | ||
| 481 | 	vm_purgable_t control, | ||
| 482 | 	int *state | ||
| 483 | ); | ||
| 484 | |||
| 485 | /* Routine vm_map_exec_lockdown */ | ||
| 486 | #ifdef	mig_external | ||
| 487 | mig_external | ||
| 488 | #else | ||
| 489 | extern | ||
| 490 | #endif	/* mig_external */ | ||
| 491 | kern_return_t vm_map_exec_lockdown | ||
| 492 | ( | ||
| 493 | 	vm_map_t target_task | ||
| 494 | ); | ||
| 495 | |||
| 496 | /* Routine vm_remap_new */ | ||
| 497 | #ifdef	mig_external | ||
| 498 | mig_external | ||
| 499 | #else | ||
| 500 | extern | ||
| 501 | #endif	/* mig_external */ | ||
| 502 | kern_return_t vm_remap_new | ||
| 503 | ( | ||
| 504 | 	vm_map_t target_task, | ||
| 505 | 	vm_address_t *target_address, | ||
| 506 | 	vm_size_t size, | ||
| 507 | 	vm_address_t mask, | ||
| 508 | 	int flags, | ||
| 509 | 	vm_map_read_t src_task, | ||
| 510 | 	vm_address_t src_address, | ||
| 511 | 	boolean_t copy, | ||
| 512 | 	vm_prot_t *cur_protection, | ||
| 513 | 	vm_prot_t *max_protection, | ||
| 514 | 	vm_inherit_t inheritance | ||
| 515 | ); | ||
| 516 | |||
| 517 | __END_DECLS | ||
| 518 | |||
| 519 | /********************** Caution **************************/ | ||
| 520 | /* The following data types should be used to calculate */ | ||
| 521 | /* maximum message sizes only. The actual message may be */ | ||
| 522 | /* smaller, and the position of the arguments within the */ | ||
| 523 | /* message layout may vary from what is presented here. */ | ||
| 524 | /* For example, if any of the arguments are variable- */ | ||
| 525 | /* sized, and less than the maximum is sent, the data */ | ||
| 526 | /* will be packed tight in the actual message to reduce */ | ||
| 527 | /* the presence of holes. */ | ||
| 528 | /********************** Caution **************************/ | ||
| 529 | |||
| 530 | /* typedefs for all requests */ | ||
| 531 | |||
| 532 | #ifndef __Request__vm_map_subsystem__defined | ||
| 533 | #define __Request__vm_map_subsystem__defined | ||
| 534 | |||
| 535 | #ifdef __MigPackStructs | ||
| 536 | #pragma pack(push, 4) | ||
| 537 | #endif | ||
| 538 | 	typedef struct { | ||
| 539 | 		mach_msg_header_t Head; | ||
| 540 | 		NDR_record_t NDR; | ||
| 541 | 		vm_address_t address; | ||
| 542 | 		vm_region_flavor_t flavor; | ||
| 543 | 		mach_msg_type_number_t infoCnt; | ||
| 544 | 	} __Request__vm_region_t __attribute__((unused)); | ||
| 545 | #ifdef __MigPackStructs | ||
| 546 | #pragma pack(pop) | ||
| 547 | #endif | ||
| 548 | |||
| 549 | #ifdef __MigPackStructs | ||
| 550 | #pragma pack(push, 4) | ||
| 551 | #endif | ||
| 552 | 	typedef struct { | ||
| 553 | 		mach_msg_header_t Head; | ||
| 554 | 		NDR_record_t NDR; | ||
| 555 | 		vm_address_t address; | ||
| 556 | 		vm_size_t size; | ||
| 557 | 		int flags; | ||
| 558 | 	} __Request__vm_allocate_t __attribute__((unused)); | ||
| 559 | #ifdef __MigPackStructs | ||
| 560 | #pragma pack(pop) | ||
| 561 | #endif | ||
| 562 | |||
| 563 | #ifdef __MigPackStructs | ||
| 564 | #pragma pack(push, 4) | ||
| 565 | #endif | ||
| 566 | 	typedef struct { | ||
| 567 | 		mach_msg_header_t Head; | ||
| 568 | 		NDR_record_t NDR; | ||
| 569 | 		vm_address_t address; | ||
| 570 | 		vm_size_t size; | ||
| 571 | 	} __Request__vm_deallocate_t __attribute__((unused)); | ||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(pop) | ||
| 574 | #endif | ||
| 575 | |||
| 576 | #ifdef __MigPackStructs | ||
| 577 | #pragma pack(push, 4) | ||
| 578 | #endif | ||
| 579 | 	typedef struct { | ||
| 580 | 		mach_msg_header_t Head; | ||
| 581 | 		NDR_record_t NDR; | ||
| 582 | 		vm_address_t address; | ||
| 583 | 		vm_size_t size; | ||
| 584 | 		boolean_t set_maximum; | ||
| 585 | 		vm_prot_t new_protection; | ||
| 586 | 	} __Request__vm_protect_t __attribute__((unused)); | ||
| 587 | #ifdef __MigPackStructs | ||
| 588 | #pragma pack(pop) | ||
| 589 | #endif | ||
| 590 | |||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(push, 4) | ||
| 593 | #endif | ||
| 594 | 	typedef struct { | ||
| 595 | 		mach_msg_header_t Head; | ||
| 596 | 		NDR_record_t NDR; | ||
| 597 | 		vm_address_t address; | ||
| 598 | 		vm_size_t size; | ||
| 599 | 		vm_inherit_t new_inheritance; | ||
| 600 | 	} __Request__vm_inherit_t __attribute__((unused)); | ||
| 601 | #ifdef __MigPackStructs | ||
| 602 | #pragma pack(pop) | ||
| 603 | #endif | ||
| 604 | |||
| 605 | #ifdef __MigPackStructs | ||
| 606 | #pragma pack(push, 4) | ||
| 607 | #endif | ||
| 608 | 	typedef struct { | ||
| 609 | 		mach_msg_header_t Head; | ||
| 610 | 		NDR_record_t NDR; | ||
| 611 | 		vm_address_t address; | ||
| 612 | 		vm_size_t size; | ||
| 613 | 	} __Request__vm_read_t __attribute__((unused)); | ||
| 614 | #ifdef __MigPackStructs | ||
| 615 | #pragma pack(pop) | ||
| 616 | #endif | ||
| 617 | |||
| 618 | #ifdef __MigPackStructs | ||
| 619 | #pragma pack(push, 4) | ||
| 620 | #endif | ||
| 621 | 	typedef struct { | ||
| 622 | 		mach_msg_header_t Head; | ||
| 623 | 		NDR_record_t NDR; | ||
| 624 | 		vm_read_entry_t data_list; | ||
| 625 | 		natural_t count; | ||
| 626 | 	} __Request__vm_read_list_t __attribute__((unused)); | ||
| 627 | #ifdef __MigPackStructs | ||
| 628 | #pragma pack(pop) | ||
| 629 | #endif | ||
| 630 | |||
| 631 | #ifdef __MigPackStructs | ||
| 632 | #pragma pack(push, 4) | ||
| 633 | #endif | ||
| 634 | 	typedef struct { | ||
| 635 | 		mach_msg_header_t Head; | ||
| 636 | 		/* start of the kernel processed data */ | ||
| 637 | 		mach_msg_body_t msgh_body; | ||
| 638 | 		mach_msg_ool_descriptor_t data; | ||
| 639 | 		/* end of the kernel processed data */ | ||
| 640 | 		NDR_record_t NDR; | ||
| 641 | 		vm_address_t address; | ||
| 642 | 		mach_msg_type_number_t dataCnt; | ||
| 643 | 	} __Request__vm_write_t __attribute__((unused)); | ||
| 644 | #ifdef __MigPackStructs | ||
| 645 | #pragma pack(pop) | ||
| 646 | #endif | ||
| 647 | |||
| 648 | #ifdef __MigPackStructs | ||
| 649 | #pragma pack(push, 4) | ||
| 650 | #endif | ||
| 651 | 	typedef struct { | ||
| 652 | 		mach_msg_header_t Head; | ||
| 653 | 		NDR_record_t NDR; | ||
| 654 | 		vm_address_t source_address; | ||
| 655 | 		vm_size_t size; | ||
| 656 | 		vm_address_t dest_address; | ||
| 657 | 	} __Request__vm_copy_t __attribute__((unused)); | ||
| 658 | #ifdef __MigPackStructs | ||
| 659 | #pragma pack(pop) | ||
| 660 | #endif | ||
| 661 | |||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(push, 4) | ||
| 664 | #endif | ||
| 665 | 	typedef struct { | ||
| 666 | 		mach_msg_header_t Head; | ||
| 667 | 		NDR_record_t NDR; | ||
| 668 | 		vm_address_t address; | ||
| 669 | 		vm_size_t size; | ||
| 670 | 		vm_address_t data; | ||
| 671 | 	} __Request__vm_read_overwrite_t __attribute__((unused)); | ||
| 672 | #ifdef __MigPackStructs | ||
| 673 | #pragma pack(pop) | ||
| 674 | #endif | ||
| 675 | |||
| 676 | #ifdef __MigPackStructs | ||
| 677 | #pragma pack(push, 4) | ||
| 678 | #endif | ||
| 679 | 	typedef struct { | ||
| 680 | 		mach_msg_header_t Head; | ||
| 681 | 		NDR_record_t NDR; | ||
| 682 | 		vm_address_t address; | ||
| 683 | 		vm_size_t size; | ||
| 684 | 		vm_sync_t sync_flags; | ||
| 685 | 	} __Request__vm_msync_t __attribute__((unused)); | ||
| 686 | #ifdef __MigPackStructs | ||
| 687 | #pragma pack(pop) | ||
| 688 | #endif | ||
| 689 | |||
| 690 | #ifdef __MigPackStructs | ||
| 691 | #pragma pack(push, 4) | ||
| 692 | #endif | ||
| 693 | 	typedef struct { | ||
| 694 | 		mach_msg_header_t Head; | ||
| 695 | 		NDR_record_t NDR; | ||
| 696 | 		vm_address_t address; | ||
| 697 | 		vm_size_t size; | ||
| 698 | 		vm_behavior_t new_behavior; | ||
| 699 | 	} __Request__vm_behavior_set_t __attribute__((unused)); | ||
| 700 | #ifdef __MigPackStructs | ||
| 701 | #pragma pack(pop) | ||
| 702 | #endif | ||
| 703 | |||
| 704 | #ifdef __MigPackStructs | ||
| 705 | #pragma pack(push, 4) | ||
| 706 | #endif | ||
| 707 | 	typedef struct { | ||
| 708 | 		mach_msg_header_t Head; | ||
| 709 | 		/* start of the kernel processed data */ | ||
| 710 | 		mach_msg_body_t msgh_body; | ||
| 711 | 		mach_msg_port_descriptor_t object; | ||
| 712 | 		/* end of the kernel processed data */ | ||
| 713 | 		NDR_record_t NDR; | ||
| 714 | 		vm_address_t address; | ||
| 715 | 		vm_size_t size; | ||
| 716 | 		vm_address_t mask; | ||
| 717 | 		int flags; | ||
| 718 | 		vm_offset_t offset; | ||
| 719 | 		boolean_t copy; | ||
| 720 | 		vm_prot_t cur_protection; | ||
| 721 | 		vm_prot_t max_protection; | ||
| 722 | 		vm_inherit_t inheritance; | ||
| 723 | 	} __Request__vm_map_t __attribute__((unused)); | ||
| 724 | #ifdef __MigPackStructs | ||
| 725 | #pragma pack(pop) | ||
| 726 | #endif | ||
| 727 | |||
| 728 | #ifdef __MigPackStructs | ||
| 729 | #pragma pack(push, 4) | ||
| 730 | #endif | ||
| 731 | 	typedef struct { | ||
| 732 | 		mach_msg_header_t Head; | ||
| 733 | 		NDR_record_t NDR; | ||
| 734 | 		vm_address_t address; | ||
| 735 | 		vm_size_t size; | ||
| 736 | 		vm_machine_attribute_t attribute; | ||
| 737 | 		vm_machine_attribute_val_t value; | ||
| 738 | 	} __Request__vm_machine_attribute_t __attribute__((unused)); | ||
| 739 | #ifdef __MigPackStructs | ||
| 740 | #pragma pack(pop) | ||
| 741 | #endif | ||
| 742 | |||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(push, 4) | ||
| 745 | #endif | ||
| 746 | 	typedef struct { | ||
| 747 | 		mach_msg_header_t Head; | ||
| 748 | 		/* start of the kernel processed data */ | ||
| 749 | 		mach_msg_body_t msgh_body; | ||
| 750 | 		mach_msg_port_descriptor_t src_task; | ||
| 751 | 		/* end of the kernel processed data */ | ||
| 752 | 		NDR_record_t NDR; | ||
| 753 | 		vm_address_t target_address; | ||
| 754 | 		vm_size_t size; | ||
| 755 | 		vm_address_t mask; | ||
| 756 | 		int flags; | ||
| 757 | 		vm_address_t src_address; | ||
| 758 | 		boolean_t copy; | ||
| 759 | 		vm_inherit_t inheritance; | ||
| 760 | 	} __Request__vm_remap_t __attribute__((unused)); | ||
| 761 | #ifdef __MigPackStructs | ||
| 762 | #pragma pack(pop) | ||
| 763 | #endif | ||
| 764 | |||
| 765 | #ifdef __MigPackStructs | ||
| 766 | #pragma pack(push, 4) | ||
| 767 | #endif | ||
| 768 | 	typedef struct { | ||
| 769 | 		mach_msg_header_t Head; | ||
| 770 | 		NDR_record_t NDR; | ||
| 771 | 		boolean_t must_wire; | ||
| 772 | 	} __Request__task_wire_t __attribute__((unused)); | ||
| 773 | #ifdef __MigPackStructs | ||
| 774 | #pragma pack(pop) | ||
| 775 | #endif | ||
| 776 | |||
| 777 | #ifdef __MigPackStructs | ||
| 778 | #pragma pack(push, 4) | ||
| 779 | #endif | ||
| 780 | 	typedef struct { | ||
| 781 | 		mach_msg_header_t Head; | ||
| 782 | 		/* start of the kernel processed data */ | ||
| 783 | 		mach_msg_body_t msgh_body; | ||
| 784 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 785 | 		/* end of the kernel processed data */ | ||
| 786 | 		NDR_record_t NDR; | ||
| 787 | 		vm_size_t size; | ||
| 788 | 		vm_offset_t offset; | ||
| 789 | 		vm_prot_t permission; | ||
| 790 | 	} __Request__mach_make_memory_entry_t __attribute__((unused)); | ||
| 791 | #ifdef __MigPackStructs | ||
| 792 | #pragma pack(pop) | ||
| 793 | #endif | ||
| 794 | |||
| 795 | #ifdef __MigPackStructs | ||
| 796 | #pragma pack(push, 4) | ||
| 797 | #endif | ||
| 798 | 	typedef struct { | ||
| 799 | 		mach_msg_header_t Head; | ||
| 800 | 		NDR_record_t NDR; | ||
| 801 | 		vm_offset_t offset; | ||
| 802 | 	} __Request__vm_map_page_query_t __attribute__((unused)); | ||
| 803 | #ifdef __MigPackStructs | ||
| 804 | #pragma pack(pop) | ||
| 805 | #endif | ||
| 806 | |||
| 807 | #ifdef __MigPackStructs | ||
| 808 | #pragma pack(push, 4) | ||
| 809 | #endif | ||
| 810 | 	typedef struct { | ||
| 811 | 		mach_msg_header_t Head; | ||
| 812 | 		NDR_record_t NDR; | ||
| 813 | 		vm_address_t address; | ||
| 814 | 	} __Request__mach_vm_region_info_t __attribute__((unused)); | ||
| 815 | #ifdef __MigPackStructs | ||
| 816 | #pragma pack(pop) | ||
| 817 | #endif | ||
| 818 | |||
| 819 | #ifdef __MigPackStructs | ||
| 820 | #pragma pack(push, 4) | ||
| 821 | #endif | ||
| 822 | 	typedef struct { | ||
| 823 | 		mach_msg_header_t Head; | ||
| 824 | 	} __Request__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 825 | #ifdef __MigPackStructs | ||
| 826 | #pragma pack(pop) | ||
| 827 | #endif | ||
| 828 | |||
| 829 | #ifdef __MigPackStructs | ||
| 830 | #pragma pack(push, 4) | ||
| 831 | #endif | ||
| 832 | 	typedef struct { | ||
| 833 | 		mach_msg_header_t Head; | ||
| 834 | 		NDR_record_t NDR; | ||
| 835 | 		vm_address_t address; | ||
| 836 | 		natural_t nesting_depth; | ||
| 837 | 		mach_msg_type_number_t infoCnt; | ||
| 838 | 	} __Request__vm_region_recurse_t __attribute__((unused)); | ||
| 839 | #ifdef __MigPackStructs | ||
| 840 | #pragma pack(pop) | ||
| 841 | #endif | ||
| 842 | |||
| 843 | #ifdef __MigPackStructs | ||
| 844 | #pragma pack(push, 4) | ||
| 845 | #endif | ||
| 846 | 	typedef struct { | ||
| 847 | 		mach_msg_header_t Head; | ||
| 848 | 		NDR_record_t NDR; | ||
| 849 | 		vm_address_t address; | ||
| 850 | 		natural_t nesting_depth; | ||
| 851 | 		mach_msg_type_number_t infoCnt; | ||
| 852 | 	} __Request__vm_region_recurse_64_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		NDR_record_t NDR; | ||
| 863 | 		vm_address_t address; | ||
| 864 | 	} __Request__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 865 | #ifdef __MigPackStructs | ||
| 866 | #pragma pack(pop) | ||
| 867 | #endif | ||
| 868 | |||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(push, 4) | ||
| 871 | #endif | ||
| 872 | 	typedef struct { | ||
| 873 | 		mach_msg_header_t Head; | ||
| 874 | 		NDR_record_t NDR; | ||
| 875 | 		vm_address_t address; | ||
| 876 | 		vm_region_flavor_t flavor; | ||
| 877 | 		mach_msg_type_number_t infoCnt; | ||
| 878 | 	} __Request__vm_region_64_t __attribute__((unused)); | ||
| 879 | #ifdef __MigPackStructs | ||
| 880 | #pragma pack(pop) | ||
| 881 | #endif | ||
| 882 | |||
| 883 | #ifdef __MigPackStructs | ||
| 884 | #pragma pack(push, 4) | ||
| 885 | #endif | ||
| 886 | 	typedef struct { | ||
| 887 | 		mach_msg_header_t Head; | ||
| 888 | 		/* start of the kernel processed data */ | ||
| 889 | 		mach_msg_body_t msgh_body; | ||
| 890 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 891 | 		/* end of the kernel processed data */ | ||
| 892 | 		NDR_record_t NDR; | ||
| 893 | 		memory_object_size_t size; | ||
| 894 | 		memory_object_offset_t offset; | ||
| 895 | 		vm_prot_t permission; | ||
| 896 | 	} __Request__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(pop) | ||
| 899 | #endif | ||
| 900 | |||
| 901 | #ifdef __MigPackStructs | ||
| 902 | #pragma pack(push, 4) | ||
| 903 | #endif | ||
| 904 | 	typedef struct { | ||
| 905 | 		mach_msg_header_t Head; | ||
| 906 | 		/* start of the kernel processed data */ | ||
| 907 | 		mach_msg_body_t msgh_body; | ||
| 908 | 		mach_msg_port_descriptor_t object; | ||
| 909 | 		/* end of the kernel processed data */ | ||
| 910 | 		NDR_record_t NDR; | ||
| 911 | 		vm_address_t address; | ||
| 912 | 		vm_size_t size; | ||
| 913 | 		vm_address_t mask; | ||
| 914 | 		int flags; | ||
| 915 | 		memory_object_offset_t offset; | ||
| 916 | 		boolean_t copy; | ||
| 917 | 		vm_prot_t cur_protection; | ||
| 918 | 		vm_prot_t max_protection; | ||
| 919 | 		vm_inherit_t inheritance; | ||
| 920 | 	} __Request__vm_map_64_t __attribute__((unused)); | ||
| 921 | #ifdef __MigPackStructs | ||
| 922 | #pragma pack(pop) | ||
| 923 | #endif | ||
| 924 | |||
| 925 | #ifdef __MigPackStructs | ||
| 926 | #pragma pack(push, 4) | ||
| 927 | #endif | ||
| 928 | 	typedef struct { | ||
| 929 | 		mach_msg_header_t Head; | ||
| 930 | 		NDR_record_t NDR; | ||
| 931 | 		vm_address_t address; | ||
| 932 | 		vm_purgable_t control; | ||
| 933 | 		int state; | ||
| 934 | 	} __Request__vm_purgable_control_t __attribute__((unused)); | ||
| 935 | #ifdef __MigPackStructs | ||
| 936 | #pragma pack(pop) | ||
| 937 | #endif | ||
| 938 | |||
| 939 | #ifdef __MigPackStructs | ||
| 940 | #pragma pack(push, 4) | ||
| 941 | #endif | ||
| 942 | 	typedef struct { | ||
| 943 | 		mach_msg_header_t Head; | ||
| 944 | 	} __Request__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 945 | #ifdef __MigPackStructs | ||
| 946 | #pragma pack(pop) | ||
| 947 | #endif | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		/* start of the kernel processed data */ | ||
| 955 | 		mach_msg_body_t msgh_body; | ||
| 956 | 		mach_msg_port_descriptor_t src_task; | ||
| 957 | 		/* end of the kernel processed data */ | ||
| 958 | 		NDR_record_t NDR; | ||
| 959 | 		vm_address_t target_address; | ||
| 960 | 		vm_size_t size; | ||
| 961 | 		vm_address_t mask; | ||
| 962 | 		int flags; | ||
| 963 | 		vm_address_t src_address; | ||
| 964 | 		boolean_t copy; | ||
| 965 | 		vm_prot_t cur_protection; | ||
| 966 | 		vm_prot_t max_protection; | ||
| 967 | 		vm_inherit_t inheritance; | ||
| 968 | 	} __Request__vm_remap_new_t __attribute__((unused)); | ||
| 969 | #ifdef __MigPackStructs | ||
| 970 | #pragma pack(pop) | ||
| 971 | #endif | ||
| 972 | #endif /* !__Request__vm_map_subsystem__defined */ | ||
| 973 | |||
| 974 | /* union of all requests */ | ||
| 975 | |||
| 976 | #ifndef __RequestUnion__vm_map_subsystem__defined | ||
| 977 | #define __RequestUnion__vm_map_subsystem__defined | ||
| 978 | union __RequestUnion__vm_map_subsystem { | ||
| 979 | 	__Request__vm_region_t Request_vm_region; | ||
| 980 | 	__Request__vm_allocate_t Request_vm_allocate; | ||
| 981 | 	__Request__vm_deallocate_t Request_vm_deallocate; | ||
| 982 | 	__Request__vm_protect_t Request_vm_protect; | ||
| 983 | 	__Request__vm_inherit_t Request_vm_inherit; | ||
| 984 | 	__Request__vm_read_t Request_vm_read; | ||
| 985 | 	__Request__vm_read_list_t Request_vm_read_list; | ||
| 986 | 	__Request__vm_write_t Request_vm_write; | ||
| 987 | 	__Request__vm_copy_t Request_vm_copy; | ||
| 988 | 	__Request__vm_read_overwrite_t Request_vm_read_overwrite; | ||
| 989 | 	__Request__vm_msync_t Request_vm_msync; | ||
| 990 | 	__Request__vm_behavior_set_t Request_vm_behavior_set; | ||
| 991 | 	__Request__vm_map_t Request_vm_map; | ||
| 992 | 	__Request__vm_machine_attribute_t Request_vm_machine_attribute; | ||
| 993 | 	__Request__vm_remap_t Request_vm_remap; | ||
| 994 | 	__Request__task_wire_t Request_task_wire; | ||
| 995 | 	__Request__mach_make_memory_entry_t Request_mach_make_memory_entry; | ||
| 996 | 	__Request__vm_map_page_query_t Request_vm_map_page_query; | ||
| 997 | 	__Request__mach_vm_region_info_t Request_mach_vm_region_info; | ||
| 998 | 	__Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; | ||
| 999 | 	__Request__vm_region_recurse_t Request_vm_region_recurse; | ||
| 1000 | 	__Request__vm_region_recurse_64_t Request_vm_region_recurse_64; | ||
| 1001 | 	__Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; | ||
| 1002 | 	__Request__vm_region_64_t Request_vm_region_64; | ||
| 1003 | 	__Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; | ||
| 1004 | 	__Request__vm_map_64_t Request_vm_map_64; | ||
| 1005 | 	__Request__vm_purgable_control_t Request_vm_purgable_control; | ||
| 1006 | 	__Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown; | ||
| 1007 | 	__Request__vm_remap_new_t Request_vm_remap_new; | ||
| 1008 | }; | ||
| 1009 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1010 | /* typedefs for all replies */ | ||
| 1011 | |||
| 1012 | #ifndef __Reply__vm_map_subsystem__defined | ||
| 1013 | #define __Reply__vm_map_subsystem__defined | ||
| 1014 | |||
| 1015 | #ifdef __MigPackStructs | ||
| 1016 | #pragma pack(push, 4) | ||
| 1017 | #endif | ||
| 1018 | 	typedef struct { | ||
| 1019 | 		mach_msg_header_t Head; | ||
| 1020 | 		/* start of the kernel processed data */ | ||
| 1021 | 		mach_msg_body_t msgh_body; | ||
| 1022 | 		mach_msg_port_descriptor_t object_name; | ||
| 1023 | 		/* end of the kernel processed data */ | ||
| 1024 | 		NDR_record_t NDR; | ||
| 1025 | 		vm_address_t address; | ||
| 1026 | 		vm_size_t size; | ||
| 1027 | 		mach_msg_type_number_t infoCnt; | ||
| 1028 | 		int info[10]; | ||
| 1029 | 	} __Reply__vm_region_t __attribute__((unused)); | ||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(pop) | ||
| 1032 | #endif | ||
| 1033 | |||
| 1034 | #ifdef __MigPackStructs | ||
| 1035 | #pragma pack(push, 4) | ||
| 1036 | #endif | ||
| 1037 | 	typedef struct { | ||
| 1038 | 		mach_msg_header_t Head; | ||
| 1039 | 		NDR_record_t NDR; | ||
| 1040 | 		kern_return_t RetCode; | ||
| 1041 | 		vm_address_t address; | ||
| 1042 | 	} __Reply__vm_allocate_t __attribute__((unused)); | ||
| 1043 | #ifdef __MigPackStructs | ||
| 1044 | #pragma pack(pop) | ||
| 1045 | #endif | ||
| 1046 | |||
| 1047 | #ifdef __MigPackStructs | ||
| 1048 | #pragma pack(push, 4) | ||
| 1049 | #endif | ||
| 1050 | 	typedef struct { | ||
| 1051 | 		mach_msg_header_t Head; | ||
| 1052 | 		NDR_record_t NDR; | ||
| 1053 | 		kern_return_t RetCode; | ||
| 1054 | 	} __Reply__vm_deallocate_t __attribute__((unused)); | ||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(pop) | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | #ifdef __MigPackStructs | ||
| 1060 | #pragma pack(push, 4) | ||
| 1061 | #endif | ||
| 1062 | 	typedef struct { | ||
| 1063 | 		mach_msg_header_t Head; | ||
| 1064 | 		NDR_record_t NDR; | ||
| 1065 | 		kern_return_t RetCode; | ||
| 1066 | 	} __Reply__vm_protect_t __attribute__((unused)); | ||
| 1067 | #ifdef __MigPackStructs | ||
| 1068 | #pragma pack(pop) | ||
| 1069 | #endif | ||
| 1070 | |||
| 1071 | #ifdef __MigPackStructs | ||
| 1072 | #pragma pack(push, 4) | ||
| 1073 | #endif | ||
| 1074 | 	typedef struct { | ||
| 1075 | 		mach_msg_header_t Head; | ||
| 1076 | 		NDR_record_t NDR; | ||
| 1077 | 		kern_return_t RetCode; | ||
| 1078 | 	} __Reply__vm_inherit_t __attribute__((unused)); | ||
| 1079 | #ifdef __MigPackStructs | ||
| 1080 | #pragma pack(pop) | ||
| 1081 | #endif | ||
| 1082 | |||
| 1083 | #ifdef __MigPackStructs | ||
| 1084 | #pragma pack(push, 4) | ||
| 1085 | #endif | ||
| 1086 | 	typedef struct { | ||
| 1087 | 		mach_msg_header_t Head; | ||
| 1088 | 		/* start of the kernel processed data */ | ||
| 1089 | 		mach_msg_body_t msgh_body; | ||
| 1090 | 		mach_msg_ool_descriptor_t data; | ||
| 1091 | 		/* end of the kernel processed data */ | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		mach_msg_type_number_t dataCnt; | ||
| 1094 | 	} __Reply__vm_read_t __attribute__((unused)); | ||
| 1095 | #ifdef __MigPackStructs | ||
| 1096 | #pragma pack(pop) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(push, 4) | ||
| 1101 | #endif | ||
| 1102 | 	typedef struct { | ||
| 1103 | 		mach_msg_header_t Head; | ||
| 1104 | 		NDR_record_t NDR; | ||
| 1105 | 		kern_return_t RetCode; | ||
| 1106 | 		vm_read_entry_t data_list; | ||
| 1107 | 	} __Reply__vm_read_list_t __attribute__((unused)); | ||
| 1108 | #ifdef __MigPackStructs | ||
| 1109 | #pragma pack(pop) | ||
| 1110 | #endif | ||
| 1111 | |||
| 1112 | #ifdef __MigPackStructs | ||
| 1113 | #pragma pack(push, 4) | ||
| 1114 | #endif | ||
| 1115 | 	typedef struct { | ||
| 1116 | 		mach_msg_header_t Head; | ||
| 1117 | 		NDR_record_t NDR; | ||
| 1118 | 		kern_return_t RetCode; | ||
| 1119 | 	} __Reply__vm_write_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		kern_return_t RetCode; | ||
| 1131 | 	} __Reply__vm_copy_t __attribute__((unused)); | ||
| 1132 | #ifdef __MigPackStructs | ||
| 1133 | #pragma pack(pop) | ||
| 1134 | #endif | ||
| 1135 | |||
| 1136 | #ifdef __MigPackStructs | ||
| 1137 | #pragma pack(push, 4) | ||
| 1138 | #endif | ||
| 1139 | 	typedef struct { | ||
| 1140 | 		mach_msg_header_t Head; | ||
| 1141 | 		NDR_record_t NDR; | ||
| 1142 | 		kern_return_t RetCode; | ||
| 1143 | 		vm_size_t outsize; | ||
| 1144 | 	} __Reply__vm_read_overwrite_t __attribute__((unused)); | ||
| 1145 | #ifdef __MigPackStructs | ||
| 1146 | #pragma pack(pop) | ||
| 1147 | #endif | ||
| 1148 | |||
| 1149 | #ifdef __MigPackStructs | ||
| 1150 | #pragma pack(push, 4) | ||
| 1151 | #endif | ||
| 1152 | 	typedef struct { | ||
| 1153 | 		mach_msg_header_t Head; | ||
| 1154 | 		NDR_record_t NDR; | ||
| 1155 | 		kern_return_t RetCode; | ||
| 1156 | 	} __Reply__vm_msync_t __attribute__((unused)); | ||
| 1157 | #ifdef __MigPackStructs | ||
| 1158 | #pragma pack(pop) | ||
| 1159 | #endif | ||
| 1160 | |||
| 1161 | #ifdef __MigPackStructs | ||
| 1162 | #pragma pack(push, 4) | ||
| 1163 | #endif | ||
| 1164 | 	typedef struct { | ||
| 1165 | 		mach_msg_header_t Head; | ||
| 1166 | 		NDR_record_t NDR; | ||
| 1167 | 		kern_return_t RetCode; | ||
| 1168 | 	} __Reply__vm_behavior_set_t __attribute__((unused)); | ||
| 1169 | #ifdef __MigPackStructs | ||
| 1170 | #pragma pack(pop) | ||
| 1171 | #endif | ||
| 1172 | |||
| 1173 | #ifdef __MigPackStructs | ||
| 1174 | #pragma pack(push, 4) | ||
| 1175 | #endif | ||
| 1176 | 	typedef struct { | ||
| 1177 | 		mach_msg_header_t Head; | ||
| 1178 | 		NDR_record_t NDR; | ||
| 1179 | 		kern_return_t RetCode; | ||
| 1180 | 		vm_address_t address; | ||
| 1181 | 	} __Reply__vm_map_t __attribute__((unused)); | ||
| 1182 | #ifdef __MigPackStructs | ||
| 1183 | #pragma pack(pop) | ||
| 1184 | #endif | ||
| 1185 | |||
| 1186 | #ifdef __MigPackStructs | ||
| 1187 | #pragma pack(push, 4) | ||
| 1188 | #endif | ||
| 1189 | 	typedef struct { | ||
| 1190 | 		mach_msg_header_t Head; | ||
| 1191 | 		NDR_record_t NDR; | ||
| 1192 | 		kern_return_t RetCode; | ||
| 1193 | 		vm_machine_attribute_val_t value; | ||
| 1194 | 	} __Reply__vm_machine_attribute_t __attribute__((unused)); | ||
| 1195 | #ifdef __MigPackStructs | ||
| 1196 | #pragma pack(pop) | ||
| 1197 | #endif | ||
| 1198 | |||
| 1199 | #ifdef __MigPackStructs | ||
| 1200 | #pragma pack(push, 4) | ||
| 1201 | #endif | ||
| 1202 | 	typedef struct { | ||
| 1203 | 		mach_msg_header_t Head; | ||
| 1204 | 		NDR_record_t NDR; | ||
| 1205 | 		kern_return_t RetCode; | ||
| 1206 | 		vm_address_t target_address; | ||
| 1207 | 		vm_prot_t cur_protection; | ||
| 1208 | 		vm_prot_t max_protection; | ||
| 1209 | 	} __Reply__vm_remap_t __attribute__((unused)); | ||
| 1210 | #ifdef __MigPackStructs | ||
| 1211 | #pragma pack(pop) | ||
| 1212 | #endif | ||
| 1213 | |||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(push, 4) | ||
| 1216 | #endif | ||
| 1217 | 	typedef struct { | ||
| 1218 | 		mach_msg_header_t Head; | ||
| 1219 | 		NDR_record_t NDR; | ||
| 1220 | 		kern_return_t RetCode; | ||
| 1221 | 	} __Reply__task_wire_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		/* start of the kernel processed data */ | ||
| 1232 | 		mach_msg_body_t msgh_body; | ||
| 1233 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1234 | 		/* end of the kernel processed data */ | ||
| 1235 | 		NDR_record_t NDR; | ||
| 1236 | 		vm_size_t size; | ||
| 1237 | 	} __Reply__mach_make_memory_entry_t __attribute__((unused)); | ||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(pop) | ||
| 1240 | #endif | ||
| 1241 | |||
| 1242 | #ifdef __MigPackStructs | ||
| 1243 | #pragma pack(push, 4) | ||
| 1244 | #endif | ||
| 1245 | 	typedef struct { | ||
| 1246 | 		mach_msg_header_t Head; | ||
| 1247 | 		NDR_record_t NDR; | ||
| 1248 | 		kern_return_t RetCode; | ||
| 1249 | 		integer_t disposition; | ||
| 1250 | 		integer_t ref_count; | ||
| 1251 | 	} __Reply__vm_map_page_query_t __attribute__((unused)); | ||
| 1252 | #ifdef __MigPackStructs | ||
| 1253 | #pragma pack(pop) | ||
| 1254 | #endif | ||
| 1255 | |||
| 1256 | #ifdef __MigPackStructs | ||
| 1257 | #pragma pack(push, 4) | ||
| 1258 | #endif | ||
| 1259 | 	typedef struct { | ||
| 1260 | 		mach_msg_header_t Head; | ||
| 1261 | 		/* start of the kernel processed data */ | ||
| 1262 | 		mach_msg_body_t msgh_body; | ||
| 1263 | 		mach_msg_ool_descriptor_t objects; | ||
| 1264 | 		/* end of the kernel processed data */ | ||
| 1265 | 		NDR_record_t NDR; | ||
| 1266 | 		vm_info_region_t region; | ||
| 1267 | 		mach_msg_type_number_t objectsCnt; | ||
| 1268 | 	} __Reply__mach_vm_region_info_t __attribute__((unused)); | ||
| 1269 | #ifdef __MigPackStructs | ||
| 1270 | #pragma pack(pop) | ||
| 1271 | #endif | ||
| 1272 | |||
| 1273 | #ifdef __MigPackStructs | ||
| 1274 | #pragma pack(push, 4) | ||
| 1275 | #endif | ||
| 1276 | 	typedef struct { | ||
| 1277 | 		mach_msg_header_t Head; | ||
| 1278 | 		/* start of the kernel processed data */ | ||
| 1279 | 		mach_msg_body_t msgh_body; | ||
| 1280 | 		mach_msg_ool_descriptor_t pages; | ||
| 1281 | 		/* end of the kernel processed data */ | ||
| 1282 | 		NDR_record_t NDR; | ||
| 1283 | 		mach_msg_type_number_t pagesCnt; | ||
| 1284 | 	} __Reply__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 1285 | #ifdef __MigPackStructs | ||
| 1286 | #pragma pack(pop) | ||
| 1287 | #endif | ||
| 1288 | |||
| 1289 | #ifdef __MigPackStructs | ||
| 1290 | #pragma pack(push, 4) | ||
| 1291 | #endif | ||
| 1292 | 	typedef struct { | ||
| 1293 | 		mach_msg_header_t Head; | ||
| 1294 | 		NDR_record_t NDR; | ||
| 1295 | 		kern_return_t RetCode; | ||
| 1296 | 		vm_address_t address; | ||
| 1297 | 		vm_size_t size; | ||
| 1298 | 		natural_t nesting_depth; | ||
| 1299 | 		mach_msg_type_number_t infoCnt; | ||
| 1300 | 		int info[19]; | ||
| 1301 | 	} __Reply__vm_region_recurse_t __attribute__((unused)); | ||
| 1302 | #ifdef __MigPackStructs | ||
| 1303 | #pragma pack(pop) | ||
| 1304 | #endif | ||
| 1305 | |||
| 1306 | #ifdef __MigPackStructs | ||
| 1307 | #pragma pack(push, 4) | ||
| 1308 | #endif | ||
| 1309 | 	typedef struct { | ||
| 1310 | 		mach_msg_header_t Head; | ||
| 1311 | 		NDR_record_t NDR; | ||
| 1312 | 		kern_return_t RetCode; | ||
| 1313 | 		vm_address_t address; | ||
| 1314 | 		vm_size_t size; | ||
| 1315 | 		natural_t nesting_depth; | ||
| 1316 | 		mach_msg_type_number_t infoCnt; | ||
| 1317 | 		int info[19]; | ||
| 1318 | 	} __Reply__vm_region_recurse_64_t __attribute__((unused)); | ||
| 1319 | #ifdef __MigPackStructs | ||
| 1320 | #pragma pack(pop) | ||
| 1321 | #endif | ||
| 1322 | |||
| 1323 | #ifdef __MigPackStructs | ||
| 1324 | #pragma pack(push, 4) | ||
| 1325 | #endif | ||
| 1326 | 	typedef struct { | ||
| 1327 | 		mach_msg_header_t Head; | ||
| 1328 | 		/* start of the kernel processed data */ | ||
| 1329 | 		mach_msg_body_t msgh_body; | ||
| 1330 | 		mach_msg_ool_descriptor_t objects; | ||
| 1331 | 		/* end of the kernel processed data */ | ||
| 1332 | 		NDR_record_t NDR; | ||
| 1333 | 		vm_info_region_64_t region; | ||
| 1334 | 		mach_msg_type_number_t objectsCnt; | ||
| 1335 | 	} __Reply__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 1336 | #ifdef __MigPackStructs | ||
| 1337 | #pragma pack(pop) | ||
| 1338 | #endif | ||
| 1339 | |||
| 1340 | #ifdef __MigPackStructs | ||
| 1341 | #pragma pack(push, 4) | ||
| 1342 | #endif | ||
| 1343 | 	typedef struct { | ||
| 1344 | 		mach_msg_header_t Head; | ||
| 1345 | 		/* start of the kernel processed data */ | ||
| 1346 | 		mach_msg_body_t msgh_body; | ||
| 1347 | 		mach_msg_port_descriptor_t object_name; | ||
| 1348 | 		/* end of the kernel processed data */ | ||
| 1349 | 		NDR_record_t NDR; | ||
| 1350 | 		vm_address_t address; | ||
| 1351 | 		vm_size_t size; | ||
| 1352 | 		mach_msg_type_number_t infoCnt; | ||
| 1353 | 		int info[10]; | ||
| 1354 | 	} __Reply__vm_region_64_t __attribute__((unused)); | ||
| 1355 | #ifdef __MigPackStructs | ||
| 1356 | #pragma pack(pop) | ||
| 1357 | #endif | ||
| 1358 | |||
| 1359 | #ifdef __MigPackStructs | ||
| 1360 | #pragma pack(push, 4) | ||
| 1361 | #endif | ||
| 1362 | 	typedef struct { | ||
| 1363 | 		mach_msg_header_t Head; | ||
| 1364 | 		/* start of the kernel processed data */ | ||
| 1365 | 		mach_msg_body_t msgh_body; | ||
| 1366 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1367 | 		/* end of the kernel processed data */ | ||
| 1368 | 		NDR_record_t NDR; | ||
| 1369 | 		memory_object_size_t size; | ||
| 1370 | 	} __Reply__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 1371 | #ifdef __MigPackStructs | ||
| 1372 | #pragma pack(pop) | ||
| 1373 | #endif | ||
| 1374 | |||
| 1375 | #ifdef __MigPackStructs | ||
| 1376 | #pragma pack(push, 4) | ||
| 1377 | #endif | ||
| 1378 | 	typedef struct { | ||
| 1379 | 		mach_msg_header_t Head; | ||
| 1380 | 		NDR_record_t NDR; | ||
| 1381 | 		kern_return_t RetCode; | ||
| 1382 | 		vm_address_t address; | ||
| 1383 | 	} __Reply__vm_map_64_t __attribute__((unused)); | ||
| 1384 | #ifdef __MigPackStructs | ||
| 1385 | #pragma pack(pop) | ||
| 1386 | #endif | ||
| 1387 | |||
| 1388 | #ifdef __MigPackStructs | ||
| 1389 | #pragma pack(push, 4) | ||
| 1390 | #endif | ||
| 1391 | 	typedef struct { | ||
| 1392 | 		mach_msg_header_t Head; | ||
| 1393 | 		NDR_record_t NDR; | ||
| 1394 | 		kern_return_t RetCode; | ||
| 1395 | 		int state; | ||
| 1396 | 	} __Reply__vm_purgable_control_t __attribute__((unused)); | ||
| 1397 | #ifdef __MigPackStructs | ||
| 1398 | #pragma pack(pop) | ||
| 1399 | #endif | ||
| 1400 | |||
| 1401 | #ifdef __MigPackStructs | ||
| 1402 | #pragma pack(push, 4) | ||
| 1403 | #endif | ||
| 1404 | 	typedef struct { | ||
| 1405 | 		mach_msg_header_t Head; | ||
| 1406 | 		NDR_record_t NDR; | ||
| 1407 | 		kern_return_t RetCode; | ||
| 1408 | 	} __Reply__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 1409 | #ifdef __MigPackStructs | ||
| 1410 | #pragma pack(pop) | ||
| 1411 | #endif | ||
| 1412 | |||
| 1413 | #ifdef __MigPackStructs | ||
| 1414 | #pragma pack(push, 4) | ||
| 1415 | #endif | ||
| 1416 | 	typedef struct { | ||
| 1417 | 		mach_msg_header_t Head; | ||
| 1418 | 		NDR_record_t NDR; | ||
| 1419 | 		kern_return_t RetCode; | ||
| 1420 | 		vm_address_t target_address; | ||
| 1421 | 		vm_prot_t cur_protection; | ||
| 1422 | 		vm_prot_t max_protection; | ||
| 1423 | 	} __Reply__vm_remap_new_t __attribute__((unused)); | ||
| 1424 | #ifdef __MigPackStructs | ||
| 1425 | #pragma pack(pop) | ||
| 1426 | #endif | ||
| 1427 | #endif /* !__Reply__vm_map_subsystem__defined */ | ||
| 1428 | |||
| 1429 | /* union of all replies */ | ||
| 1430 | |||
| 1431 | #ifndef __ReplyUnion__vm_map_subsystem__defined | ||
| 1432 | #define __ReplyUnion__vm_map_subsystem__defined | ||
| 1433 | union __ReplyUnion__vm_map_subsystem { | ||
| 1434 | 	__Reply__vm_region_t Reply_vm_region; | ||
| 1435 | 	__Reply__vm_allocate_t Reply_vm_allocate; | ||
| 1436 | 	__Reply__vm_deallocate_t Reply_vm_deallocate; | ||
| 1437 | 	__Reply__vm_protect_t Reply_vm_protect; | ||
| 1438 | 	__Reply__vm_inherit_t Reply_vm_inherit; | ||
| 1439 | 	__Reply__vm_read_t Reply_vm_read; | ||
| 1440 | 	__Reply__vm_read_list_t Reply_vm_read_list; | ||
| 1441 | 	__Reply__vm_write_t Reply_vm_write; | ||
| 1442 | 	__Reply__vm_copy_t Reply_vm_copy; | ||
| 1443 | 	__Reply__vm_read_overwrite_t Reply_vm_read_overwrite; | ||
| 1444 | 	__Reply__vm_msync_t Reply_vm_msync; | ||
| 1445 | 	__Reply__vm_behavior_set_t Reply_vm_behavior_set; | ||
| 1446 | 	__Reply__vm_map_t Reply_vm_map; | ||
| 1447 | 	__Reply__vm_machine_attribute_t Reply_vm_machine_attribute; | ||
| 1448 | 	__Reply__vm_remap_t Reply_vm_remap; | ||
| 1449 | 	__Reply__task_wire_t Reply_task_wire; | ||
| 1450 | 	__Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; | ||
| 1451 | 	__Reply__vm_map_page_query_t Reply_vm_map_page_query; | ||
| 1452 | 	__Reply__mach_vm_region_info_t Reply_mach_vm_region_info; | ||
| 1453 | 	__Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; | ||
| 1454 | 	__Reply__vm_region_recurse_t Reply_vm_region_recurse; | ||
| 1455 | 	__Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; | ||
| 1456 | 	__Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; | ||
| 1457 | 	__Reply__vm_region_64_t Reply_vm_region_64; | ||
| 1458 | 	__Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; | ||
| 1459 | 	__Reply__vm_map_64_t Reply_vm_map_64; | ||
| 1460 | 	__Reply__vm_purgable_control_t Reply_vm_purgable_control; | ||
| 1461 | 	__Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown; | ||
| 1462 | 	__Reply__vm_remap_new_t Reply_vm_remap_new; | ||
| 1463 | }; | ||
| 1464 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1465 | |||
| 1466 | #ifndef subsystem_to_name_map_vm_map | ||
| 1467 | #define subsystem_to_name_map_vm_map \ | ||
| 1468 | { "vm_region", 3800 },\ | ||
| 1469 | { "vm_allocate", 3801 },\ | ||
| 1470 | { "vm_deallocate", 3802 },\ | ||
| 1471 | { "vm_protect", 3803 },\ | ||
| 1472 | { "vm_inherit", 3804 },\ | ||
| 1473 | { "vm_read", 3805 },\ | ||
| 1474 | { "vm_read_list", 3806 },\ | ||
| 1475 | { "vm_write", 3807 },\ | ||
| 1476 | { "vm_copy", 3808 },\ | ||
| 1477 | { "vm_read_overwrite", 3809 },\ | ||
| 1478 | { "vm_msync", 3810 },\ | ||
| 1479 | { "vm_behavior_set", 3811 },\ | ||
| 1480 | { "vm_map", 3812 },\ | ||
| 1481 | { "vm_machine_attribute", 3813 },\ | ||
| 1482 | { "vm_remap", 3814 },\ | ||
| 1483 | { "task_wire", 3815 },\ | ||
| 1484 | { "mach_make_memory_entry", 3816 },\ | ||
| 1485 | { "vm_map_page_query", 3817 },\ | ||
| 1486 | { "mach_vm_region_info", 3818 },\ | ||
| 1487 | { "vm_mapped_pages_info", 3819 },\ | ||
| 1488 | { "vm_region_recurse", 3821 },\ | ||
| 1489 | { "vm_region_recurse_64", 3822 },\ | ||
| 1490 | { "mach_vm_region_info_64", 3823 },\ | ||
| 1491 | { "vm_region_64", 3824 },\ | ||
| 1492 | { "mach_make_memory_entry_64", 3825 },\ | ||
| 1493 | { "vm_map_64", 3826 },\ | ||
| 1494 | { "vm_purgable_control", 3830 },\ | ||
| 1495 | { "vm_map_exec_lockdown", 3831 },\ | ||
| 1496 | { "vm_remap_new", 3832 } | ||
| 1497 | #endif | ||
| 1498 | |||
| 1499 | #ifdef __AfterMigUserHeader | ||
| 1500 | __AfterMigUserHeader | ||
| 1501 | #endif /* __AfterMigUserHeader */ | ||
| 1502 | |||
| 1503 | #endif	 /* _vm_map_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/vm_prot.h created+171| ... | @@ -0,0 +1,171 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2021 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_prot.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young | ||
| 61 | * | ||
| 62 | *	Virtual memory protection definitions. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_PROT_H_ | ||
| 67 | #define _MACH_VM_PROT_H_ | ||
| 68 | |||
| 69 | /* | ||
| 70 | *	Types defined: | ||
| 71 | * | ||
| 72 | *	vm_prot_t		VM protection values. | ||
| 73 | */ | ||
| 74 | |||
| 75 | typedef int vm_prot_t; | ||
| 76 | |||
| 77 | /* | ||
| 78 | *	Protection values, defined as bits within the vm_prot_t type | ||
| 79 | */ | ||
| 80 | |||
| 81 | #define VM_PROT_NONE ((vm_prot_t) 0x00) | ||
| 82 | |||
| 83 | #define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ | ||
| 84 | #define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ | ||
| 85 | #define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ | ||
| 86 | |||
| 87 | /* | ||
| 88 | *	The default protection for newly-created virtual memory | ||
| 89 | */ | ||
| 90 | |||
| 91 | #define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE) | ||
| 92 | |||
| 93 | /* | ||
| 94 | *	The maximum privileges possible, for parameter checking. | ||
| 95 | */ | ||
| 96 | |||
| 97 | #define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) | ||
| 98 | |||
| 99 | /* | ||
| 100 | *	An invalid protection value. | ||
| 101 | *	Used only by memory_object_lock_request to indicate no change | ||
| 102 | *	to page locks. Using -1 here is a bad idea because it | ||
| 103 | *	looks like VM_PROT_ALL and then some. | ||
| 104 | */ | ||
| 105 | |||
| 106 | #define VM_PROT_NO_CHANGE_LEGACY ((vm_prot_t) 0x08) | ||
| 107 | #define VM_PROT_NO_CHANGE ((vm_prot_t) 0x01000000) | ||
| 108 | |||
| 109 | /* | ||
| 110 | * When a caller finds that he cannot obtain write permission on a | ||
| 111 | * mapped entry, the following flag can be used. The entry will | ||
| 112 | * be made "needs copy" effectively copying the object (using COW), | ||
| 113 | * and write permission will be added to the maximum protections | ||
| 114 | * for the associated entry. | ||
| 115 | */ | ||
| 116 | |||
| 117 | #define VM_PROT_COPY ((vm_prot_t) 0x10) | ||
| 118 | |||
| 119 | |||
| 120 | /* | ||
| 121 | *	Another invalid protection value. | ||
| 122 | *	Used only by memory_object_data_request upon an object | ||
| 123 | *	which has specified a copy_call copy strategy. It is used | ||
| 124 | *	when the kernel wants a page belonging to a copy of the | ||
| 125 | *	object, and is only asking the object as a result of | ||
| 126 | *	following a shadow chain. This solves the race between pages | ||
| 127 | *	being pushed up by the memory manager and the kernel | ||
| 128 | *	walking down the shadow chain. | ||
| 129 | */ | ||
| 130 | |||
| 131 | #define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10) | ||
| 132 | |||
| 133 | |||
| 134 | /* | ||
| 135 | * Another invalid protection value. | ||
| 136 | *	Indicates that the other protection bits are to be applied as a mask | ||
| 137 | *	against the actual protection bits of the map entry. | ||
| 138 | */ | ||
| 139 | #define VM_PROT_IS_MASK ((vm_prot_t) 0x40) | ||
| 140 | |||
| 141 | /* | ||
| 142 | * Another invalid protection value to support execute-only protection. | ||
| 143 | * VM_PROT_STRIP_READ is a special marker that tells mprotect to not | ||
| 144 | * set VM_PROT_READ. We have to do it this way because existing code | ||
| 145 | * expects the system to set VM_PROT_READ if VM_PROT_EXECUTE is set. | ||
| 146 | * VM_PROT_EXECUTE_ONLY is just a convenience value to indicate that | ||
| 147 | * the memory should be executable and explicitly not readable. It will | ||
| 148 | * be ignored on platforms that do not support this type of protection. | ||
| 149 | */ | ||
| 150 | #define VM_PROT_STRIP_READ ((vm_prot_t) 0x80) | ||
| 151 | #define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ) | ||
| 152 | |||
| 153 | |||
| 154 | #if defined(__x86_64__) | ||
| 155 | /* | ||
| 156 | * Another invalid protection value to support specifying different | ||
| 157 | * execute permissions for user- and supervisor- modes. When | ||
| 158 | * MBE is enabled in a VM, VM_PROT_EXECUTE is used to indicate | ||
| 159 | * supervisor-mode execute permission, and VM_PROT_UEXEC specifies | ||
| 160 | * user-mode execute permission. Currently only used by the | ||
| 161 | * x86 Hypervisor kext. | ||
| 162 | */ | ||
| 163 | #define VM_PROT_UEXEC ((vm_prot_t) 0x8) /* User-mode Execute Permission */ | ||
| 164 | |||
| 165 | #define VM_PROT_ALLEXEC (VM_PROT_EXECUTE | VM_PROT_UEXEC) | ||
| 166 | #else | ||
| 167 | #define VM_PROT_ALLEXEC (VM_PROT_EXECUTE) | ||
| 168 | #endif /* defined(__x86_64__) */ | ||
| 169 | |||
| 170 | |||
| 171 | #endif /* _MACH_VM_PROT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/vm_statistics.h created+556| ... | @@ -0,0 +1,556 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_statistics.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young, David Golub | ||
| 61 | * | ||
| 62 | *	Virtual memory statistics structure. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_STATISTICS_H_ | ||
| 67 | #define _MACH_VM_STATISTICS_H_ | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #include <mach/machine/vm_types.h> | ||
| 74 | #include <mach/machine/kern_return.h> | ||
| 75 | |||
| 76 | /* | ||
| 77 | * vm_statistics | ||
| 78 | * | ||
| 79 | * History: | ||
| 80 | *	rev0 - original structure. | ||
| 81 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 82 | *	rev2 - added speculative_count. | ||
| 83 | * | ||
| 84 | * Note: you cannot add any new fields to this structure. Add them below in | ||
| 85 | * vm_statistics64. | ||
| 86 | */ | ||
| 87 | |||
| 88 | struct vm_statistics { | ||
| 89 | 	natural_t free_count; /* # of pages free */ | ||
| 90 | 	natural_t active_count; /* # of pages active */ | ||
| 91 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 92 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 93 | 	natural_t zero_fill_count; /* # of zero fill pages */ | ||
| 94 | 	natural_t reactivations; /* # of pages reactivated */ | ||
| 95 | 	natural_t pageins; /* # of pageins */ | ||
| 96 | 	natural_t pageouts; /* # of pageouts */ | ||
| 97 | 	natural_t faults; /* # of faults */ | ||
| 98 | 	natural_t cow_faults; /* # of copy-on-writes */ | ||
| 99 | 	natural_t lookups; /* object cache lookups */ | ||
| 100 | 	natural_t hits; /* object cache hits */ | ||
| 101 | |||
| 102 | 	/* added for rev1 */ | ||
| 103 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 104 | 	natural_t purges; /* # of pages purged */ | ||
| 105 | |||
| 106 | 	/* added for rev2 */ | ||
| 107 | 	/* | ||
| 108 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 109 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 110 | 	 * used to hold data that was read speculatively from disk but | ||
| 111 | 	 * haven't actually been used by anyone so far. | ||
| 112 | 	 */ | ||
| 113 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 114 | }; | ||
| 115 | |||
| 116 | /* Used by all architectures */ | ||
| 117 | typedef struct vm_statistics *vm_statistics_t; | ||
| 118 | typedef struct vm_statistics vm_statistics_data_t; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * vm_statistics64 | ||
| 122 | * | ||
| 123 | * History: | ||
| 124 | *	rev0 - original structure. | ||
| 125 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 126 | *	rev2 - added speculative_count. | ||
| 127 | *	 ---- | ||
| 128 | *	rev3 - changed name to vm_statistics64. | ||
| 129 | *		changed some fields in structure to 64-bit on | ||
| 130 | *		arm, i386 and x86_64 architectures. | ||
| 131 | *	rev4 - require 64-bit alignment for efficient access | ||
| 132 | *		in the kernel. No change to reported data. | ||
| 133 | * | ||
| 134 | */ | ||
| 135 | |||
| 136 | struct vm_statistics64 { | ||
| 137 | 	natural_t free_count; /* # of pages free */ | ||
| 138 | 	natural_t active_count; /* # of pages active */ | ||
| 139 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 140 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 141 | 	uint64_t zero_fill_count; /* # of zero fill pages */ | ||
| 142 | 	uint64_t reactivations; /* # of pages reactivated */ | ||
| 143 | 	uint64_t pageins; /* # of pageins */ | ||
| 144 | 	uint64_t pageouts; /* # of pageouts */ | ||
| 145 | 	uint64_t faults; /* # of faults */ | ||
| 146 | 	uint64_t cow_faults; /* # of copy-on-writes */ | ||
| 147 | 	uint64_t lookups; /* object cache lookups */ | ||
| 148 | 	uint64_t hits; /* object cache hits */ | ||
| 149 | 	uint64_t purges; /* # of pages purged */ | ||
| 150 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 151 | 	/* | ||
| 152 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 153 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 154 | 	 * used to hold data that was read speculatively from disk but | ||
| 155 | 	 * haven't actually been used by anyone so far. | ||
| 156 | 	 */ | ||
| 157 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 158 | |||
| 159 | 	/* added for rev1 */ | ||
| 160 | 	uint64_t decompressions; /* # of pages decompressed */ | ||
| 161 | 	uint64_t compressions; /* # of pages compressed */ | ||
| 162 | 	uint64_t swapins; /* # of pages swapped in (via compression segments) */ | ||
| 163 | 	uint64_t swapouts; /* # of pages swapped out (via compression segments) */ | ||
| 164 | 	natural_t compressor_page_count; /* # of pages used by the compressed pager to hold all the compressed data */ | ||
| 165 | 	natural_t throttled_count; /* # of pages throttled */ | ||
| 166 | 	natural_t external_page_count; /* # of pages that are file-backed (non-swap) */ | ||
| 167 | 	natural_t internal_page_count; /* # of pages that are anonymous */ | ||
| 168 | 	uint64_t total_uncompressed_pages_in_compressor; /* # of pages (uncompressed) held within the compressor. */ | ||
| 169 | } __attribute__((aligned(8))); | ||
| 170 | |||
| 171 | typedef struct vm_statistics64 *vm_statistics64_t; | ||
| 172 | typedef struct vm_statistics64 vm_statistics64_data_t; | ||
| 173 | |||
| 174 | kern_return_t vm_stats(void *info, unsigned int *count); | ||
| 175 | |||
| 176 | /* | ||
| 177 | * VM_STATISTICS_TRUNCATE_TO_32_BIT | ||
| 178 | * | ||
| 179 | * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from | ||
| 180 | * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics). | ||
| 181 | */ | ||
| 182 | #define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value))) | ||
| 183 | |||
| 184 | /* | ||
| 185 | * vm_extmod_statistics | ||
| 186 | * | ||
| 187 | * Structure to record modifications to a task by an | ||
| 188 | * external agent. | ||
| 189 | * | ||
| 190 | * History: | ||
| 191 | *	rev0 - original structure. | ||
| 192 | */ | ||
| 193 | |||
| 194 | struct vm_extmod_statistics { | ||
| 195 | 	int64_t task_for_pid_count; /* # of times task port was looked up */ | ||
| 196 | 	int64_t task_for_pid_caller_count; /* # of times this task called task_for_pid */ | ||
| 197 | 	int64_t thread_creation_count; /* # of threads created in task */ | ||
| 198 | 	int64_t thread_creation_caller_count; /* # of threads created by task */ | ||
| 199 | 	int64_t thread_set_state_count; /* # of register state sets in task */ | ||
| 200 | 	int64_t thread_set_state_caller_count; /* # of register state sets by task */ | ||
| 201 | } __attribute__((aligned(8))); | ||
| 202 | |||
| 203 | typedef struct vm_extmod_statistics *vm_extmod_statistics_t; | ||
| 204 | typedef struct vm_extmod_statistics vm_extmod_statistics_data_t; | ||
| 205 | |||
| 206 | typedef struct vm_purgeable_stat { | ||
| 207 | 	uint64_t count; | ||
| 208 | 	uint64_t size; | ||
| 209 | }vm_purgeable_stat_t; | ||
| 210 | |||
| 211 | struct vm_purgeable_info { | ||
| 212 | 	vm_purgeable_stat_t fifo_data[8]; | ||
| 213 | 	vm_purgeable_stat_t obsolete_data; | ||
| 214 | 	vm_purgeable_stat_t lifo_data[8]; | ||
| 215 | }; | ||
| 216 | |||
| 217 | typedef struct vm_purgeable_info *vm_purgeable_info_t; | ||
| 218 | |||
| 219 | /* included for the vm_map_page_query call */ | ||
| 220 | |||
| 221 | #define VM_PAGE_QUERY_PAGE_PRESENT 0x1 | ||
| 222 | #define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2 | ||
| 223 | #define VM_PAGE_QUERY_PAGE_REF 0x4 | ||
| 224 | #define VM_PAGE_QUERY_PAGE_DIRTY 0x8 | ||
| 225 | #define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10 | ||
| 226 | #define VM_PAGE_QUERY_PAGE_COPIED 0x20 | ||
| 227 | #define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40 | ||
| 228 | #define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80 | ||
| 229 | #define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100 | ||
| 230 | #define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200 | ||
| 231 | #define VM_PAGE_QUERY_PAGE_CS_NX 0x400 | ||
| 232 | #define VM_PAGE_QUERY_PAGE_REUSABLE 0x800 | ||
| 233 | |||
| 234 | /* | ||
| 235 | * VM allocation flags: | ||
| 236 | * | ||
| 237 | * VM_FLAGS_FIXED | ||
| 238 | * (really the absence of VM_FLAGS_ANYWHERE) | ||
| 239 | *	Allocate new VM region at the specified virtual address, if possible. | ||
| 240 | * | ||
| 241 | * VM_FLAGS_ANYWHERE | ||
| 242 | *	Allocate new VM region anywhere it would fit in the address space. | ||
| 243 | * | ||
| 244 | * VM_FLAGS_PURGABLE | ||
| 245 | *	Create a purgable VM object for that new VM region. | ||
| 246 | * | ||
| 247 | * VM_FLAGS_4GB_CHUNK | ||
| 248 | *	The new VM region will be chunked up into 4GB sized pieces. | ||
| 249 | * | ||
| 250 | * VM_FLAGS_NO_PMAP_CHECK | ||
| 251 | *	(for DEBUG kernel config only, ignored for other configs) | ||
| 252 | *	Do not check that there is no stale pmap mapping for the new VM region. | ||
| 253 | *	This is useful for kernel memory allocations at bootstrap when building | ||
| 254 | *	the initial kernel address space while some memory is already in use. | ||
| 255 | * | ||
| 256 | * VM_FLAGS_OVERWRITE | ||
| 257 | *	The new VM region can replace existing VM regions if necessary | ||
| 258 | *	(to be used in combination with VM_FLAGS_FIXED). | ||
| 259 | * | ||
| 260 | * VM_FLAGS_NO_CACHE | ||
| 261 | *	Pages brought in to this VM region are placed on the speculative | ||
| 262 | *	queue instead of the active queue. In other words, they are not | ||
| 263 | *	cached so that they will be stolen first if memory runs low. | ||
| 264 | */ | ||
| 265 | |||
| 266 | #define VM_FLAGS_FIXED 0x0000 | ||
| 267 | #define VM_FLAGS_ANYWHERE 0x0001 | ||
| 268 | #define VM_FLAGS_PURGABLE 0x0002 | ||
| 269 | #define VM_FLAGS_4GB_CHUNK 0x0004 | ||
| 270 | #define VM_FLAGS_RANDOM_ADDR 0x0008 | ||
| 271 | #define VM_FLAGS_NO_CACHE 0x0010 | ||
| 272 | #define VM_FLAGS_RESILIENT_CODESIGN 0x0020 | ||
| 273 | #define VM_FLAGS_RESILIENT_MEDIA 0x0040 | ||
| 274 | #define VM_FLAGS_PERMANENT 0x0080 | ||
| 275 | #define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */ | ||
| 276 | /* | ||
| 277 | * VM_FLAGS_SUPERPAGE_MASK | ||
| 278 | *	3 bits that specify whether large pages should be used instead of | ||
| 279 | *	base pages (!=0), as well as the requested page size. | ||
| 280 | */ | ||
| 281 | #define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ | ||
| 282 | #define VM_FLAGS_RETURN_DATA_ADDR 0x100000 /* Return address of target data, rather than base of page */ | ||
| 283 | #define VM_FLAGS_RETURN_4K_DATA_ADDR 0x800000 /* Return 4K aligned address of target data */ | ||
| 284 | #define VM_FLAGS_ALIAS_MASK 0xFF000000 | ||
| 285 | #define VM_GET_FLAGS_ALIAS(flags, alias) \ | ||
| 286 | 	 (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 | ||
| 287 | #define VM_SET_FLAGS_ALIAS(flags, alias) \ | ||
| 288 | 	 (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ | ||
| 289 | 	 (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) | ||
| 290 | |||
| 291 | /* These are the flags that we accept from user-space */ | ||
| 292 | #define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ | ||
| 293 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 294 | 	 VM_FLAGS_PURGABLE | \ | ||
| 295 | 	 VM_FLAGS_4GB_CHUNK | \ | ||
| 296 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 297 | 	 VM_FLAGS_NO_CACHE | \ | ||
| 298 | 	 VM_FLAGS_PERMANENT | \ | ||
| 299 | 	 VM_FLAGS_OVERWRITE | \ | ||
| 300 | 	 VM_FLAGS_SUPERPAGE_MASK | \ | ||
| 301 | 	 VM_FLAGS_ALIAS_MASK) | ||
| 302 | #define VM_FLAGS_USER_MAP (VM_FLAGS_USER_ALLOCATE | \ | ||
| 303 | 	 VM_FLAGS_RETURN_4K_DATA_ADDR | \ | ||
| 304 | 	 VM_FLAGS_RETURN_DATA_ADDR) | ||
| 305 | #define VM_FLAGS_USER_REMAP (VM_FLAGS_FIXED | \ | ||
| 306 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 307 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 308 | 	 VM_FLAGS_OVERWRITE| \ | ||
| 309 | 	 VM_FLAGS_RETURN_DATA_ADDR | \ | ||
| 310 | 	 VM_FLAGS_RESILIENT_CODESIGN | \ | ||
| 311 | 	 VM_FLAGS_RESILIENT_MEDIA) | ||
| 312 | |||
| 313 | #define VM_FLAGS_SUPERPAGE_SHIFT 16 | ||
| 314 | #define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ | ||
| 315 | #define SUPERPAGE_SIZE_ANY 1 | ||
| 316 | #define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 317 | #define VM_FLAGS_SUPERPAGE_SIZE_ANY (SUPERPAGE_SIZE_ANY << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 318 | #define SUPERPAGE_SIZE_2MB 2 | ||
| 319 | #define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * EXC_GUARD definitions for virtual memory. | ||
| 323 | */ | ||
| 324 | #define GUARD_TYPE_VIRT_MEMORY 0x5 | ||
| 325 | |||
| 326 | /* Reasons for exception for virtual memory */ | ||
| 327 | enum virtual_memory_guard_exception_codes { | ||
| 328 | 	kGUARD_EXC_DEALLOC_GAP = 1u << 0 | ||
| 329 | }; | ||
| 330 | |||
| 331 | |||
| 332 | /* current accounting postmark */ | ||
| 333 | #define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600 | ||
| 334 | |||
| 335 | /* discrete values: */ | ||
| 336 | #define VM_LEDGER_TAG_NONE 0x00000000 | ||
| 337 | #define VM_LEDGER_TAG_DEFAULT 0x00000001 | ||
| 338 | #define VM_LEDGER_TAG_NETWORK 0x00000002 | ||
| 339 | #define VM_LEDGER_TAG_MEDIA 0x00000003 | ||
| 340 | #define VM_LEDGER_TAG_GRAPHICS 0x00000004 | ||
| 341 | #define VM_LEDGER_TAG_NEURAL 0x00000005 | ||
| 342 | #define VM_LEDGER_TAG_MAX 0x00000005 | ||
| 343 | /* individual bits: */ | ||
| 344 | #define VM_LEDGER_FLAG_NO_FOOTPRINT (1 << 0) | ||
| 345 | #define VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG (1 << 1) | ||
| 346 | #define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT | VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG) | ||
| 347 | |||
| 348 | |||
| 349 | #define VM_MEMORY_MALLOC 1 | ||
| 350 | #define VM_MEMORY_MALLOC_SMALL 2 | ||
| 351 | #define VM_MEMORY_MALLOC_LARGE 3 | ||
| 352 | #define VM_MEMORY_MALLOC_HUGE 4 | ||
| 353 | #define VM_MEMORY_SBRK 5// uninteresting -- no one should call | ||
| 354 | #define VM_MEMORY_REALLOC 6 | ||
| 355 | #define VM_MEMORY_MALLOC_TINY 7 | ||
| 356 | #define VM_MEMORY_MALLOC_LARGE_REUSABLE 8 | ||
| 357 | #define VM_MEMORY_MALLOC_LARGE_REUSED 9 | ||
| 358 | |||
| 359 | #define VM_MEMORY_ANALYSIS_TOOL 10 | ||
| 360 | |||
| 361 | #define VM_MEMORY_MALLOC_NANO 11 | ||
| 362 | #define VM_MEMORY_MALLOC_MEDIUM 12 | ||
| 363 | #define VM_MEMORY_MALLOC_PGUARD 13 // Will be removed | ||
| 364 | #define VM_MEMORY_MALLOC_PROB_GUARD 13 | ||
| 365 | |||
| 366 | #define VM_MEMORY_MACH_MSG 20 | ||
| 367 | #define VM_MEMORY_IOKIT 21 | ||
| 368 | #define VM_MEMORY_STACK 30 | ||
| 369 | #define VM_MEMORY_GUARD 31 | ||
| 370 | #define VM_MEMORY_SHARED_PMAP 32 | ||
| 371 | /* memory containing a dylib */ | ||
| 372 | #define VM_MEMORY_DYLIB 33 | ||
| 373 | #define VM_MEMORY_OBJC_DISPATCHERS 34 | ||
| 374 | |||
| 375 | /* Was a nested pmap (VM_MEMORY_SHARED_PMAP) which has now been unnested */ | ||
| 376 | #define VM_MEMORY_UNSHARED_PMAP 35 | ||
| 377 | |||
| 378 | |||
| 379 | // Placeholders for now -- as we analyze the libraries and find how they | ||
| 380 | // use memory, we can make these labels more specific. | ||
| 381 | #define VM_MEMORY_APPKIT 40 | ||
| 382 | #define VM_MEMORY_FOUNDATION 41 | ||
| 383 | #define VM_MEMORY_COREGRAPHICS 42 | ||
| 384 | #define VM_MEMORY_CORESERVICES 43 | ||
| 385 | #define VM_MEMORY_CARBON VM_MEMORY_CORESERVICES | ||
| 386 | #define VM_MEMORY_JAVA 44 | ||
| 387 | #define VM_MEMORY_COREDATA 45 | ||
| 388 | #define VM_MEMORY_COREDATA_OBJECTIDS 46 | ||
| 389 | #define VM_MEMORY_ATS 50 | ||
| 390 | #define VM_MEMORY_LAYERKIT 51 | ||
| 391 | #define VM_MEMORY_CGIMAGE 52 | ||
| 392 | #define VM_MEMORY_TCMALLOC 53 | ||
| 393 | |||
| 394 | /* private raster data (i.e. layers, some images, QGL allocator) */ | ||
| 395 | #define VM_MEMORY_COREGRAPHICS_DATA 54 | ||
| 396 | |||
| 397 | /* shared image and font caches */ | ||
| 398 | #define VM_MEMORY_COREGRAPHICS_SHARED 55 | ||
| 399 | |||
| 400 | /* Memory used for virtual framebuffers, shadowing buffers, etc... */ | ||
| 401 | #define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 | ||
| 402 | |||
| 403 | /* Window backing stores, custom shadow data, and compressed backing stores */ | ||
| 404 | #define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 | ||
| 405 | |||
| 406 | /* x-alloc'd memory */ | ||
| 407 | #define VM_MEMORY_COREGRAPHICS_XALLOC 58 | ||
| 408 | |||
| 409 | /* catch-all for other uses, such as the read-only shared data page */ | ||
| 410 | #define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS | ||
| 411 | |||
| 412 | /* memory allocated by the dynamic loader for itself */ | ||
| 413 | #define VM_MEMORY_DYLD 60 | ||
| 414 | /* malloc'd memory created by dyld */ | ||
| 415 | #define VM_MEMORY_DYLD_MALLOC 61 | ||
| 416 | |||
| 417 | /* Used for sqlite page cache */ | ||
| 418 | #define VM_MEMORY_SQLITE 62 | ||
| 419 | |||
| 420 | /* JavaScriptCore heaps */ | ||
| 421 | #define VM_MEMORY_JAVASCRIPT_CORE 63 | ||
| 422 | #define VM_MEMORY_WEBASSEMBLY VM_MEMORY_JAVASCRIPT_CORE | ||
| 423 | /* memory allocated for the JIT */ | ||
| 424 | #define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 | ||
| 425 | #define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 | ||
| 426 | |||
| 427 | /* memory allocated for GLSL */ | ||
| 428 | #define VM_MEMORY_GLSL 66 | ||
| 429 | |||
| 430 | /* memory allocated for OpenCL.framework */ | ||
| 431 | #define VM_MEMORY_OPENCL 67 | ||
| 432 | |||
| 433 | /* memory allocated for QuartzCore.framework */ | ||
| 434 | #define VM_MEMORY_COREIMAGE 68 | ||
| 435 | |||
| 436 | /* memory allocated for WebCore Purgeable Buffers */ | ||
| 437 | #define VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69 | ||
| 438 | |||
| 439 | /* ImageIO memory */ | ||
| 440 | #define VM_MEMORY_IMAGEIO 70 | ||
| 441 | |||
| 442 | /* CoreProfile memory */ | ||
| 443 | #define VM_MEMORY_COREPROFILE 71 | ||
| 444 | |||
| 445 | /* assetsd / MobileSlideShow memory */ | ||
| 446 | #define VM_MEMORY_ASSETSD 72 | ||
| 447 | |||
| 448 | /* libsystem_kernel os_once_alloc */ | ||
| 449 | #define VM_MEMORY_OS_ALLOC_ONCE 73 | ||
| 450 | |||
| 451 | /* libdispatch internal allocator */ | ||
| 452 | #define VM_MEMORY_LIBDISPATCH 74 | ||
| 453 | |||
| 454 | /* Accelerate.framework image backing stores */ | ||
| 455 | #define VM_MEMORY_ACCELERATE 75 | ||
| 456 | |||
| 457 | /* CoreUI image block data */ | ||
| 458 | #define VM_MEMORY_COREUI 76 | ||
| 459 | |||
| 460 | /* CoreUI image file */ | ||
| 461 | #define VM_MEMORY_COREUIFILE 77 | ||
| 462 | |||
| 463 | /* Genealogy buffers */ | ||
| 464 | #define VM_MEMORY_GENEALOGY 78 | ||
| 465 | |||
| 466 | /* RawCamera VM allocated memory */ | ||
| 467 | #define VM_MEMORY_RAWCAMERA 79 | ||
| 468 | |||
| 469 | /* corpse info for dead process */ | ||
| 470 | #define VM_MEMORY_CORPSEINFO 80 | ||
| 471 | |||
| 472 | /* Apple System Logger (ASL) messages */ | ||
| 473 | #define VM_MEMORY_ASL 81 | ||
| 474 | |||
| 475 | /* Swift runtime */ | ||
| 476 | #define VM_MEMORY_SWIFT_RUNTIME 82 | ||
| 477 | |||
| 478 | /* Swift metadata */ | ||
| 479 | #define VM_MEMORY_SWIFT_METADATA 83 | ||
| 480 | |||
| 481 | /* DHMM data */ | ||
| 482 | #define VM_MEMORY_DHMM 84 | ||
| 483 | |||
| 484 | |||
| 485 | /* memory allocated by SceneKit.framework */ | ||
| 486 | #define VM_MEMORY_SCENEKIT 86 | ||
| 487 | |||
| 488 | /* memory allocated by skywalk networking */ | ||
| 489 | #define VM_MEMORY_SKYWALK 87 | ||
| 490 | |||
| 491 | #define VM_MEMORY_IOSURFACE 88 | ||
| 492 | |||
| 493 | #define VM_MEMORY_LIBNETWORK 89 | ||
| 494 | |||
| 495 | #define VM_MEMORY_AUDIO 90 | ||
| 496 | |||
| 497 | #define VM_MEMORY_VIDEOBITSTREAM 91 | ||
| 498 | |||
| 499 | /* memory allocated by CoreMedia */ | ||
| 500 | #define VM_MEMORY_CM_XPC 92 | ||
| 501 | |||
| 502 | #define VM_MEMORY_CM_RPC 93 | ||
| 503 | |||
| 504 | #define VM_MEMORY_CM_MEMORYPOOL 94 | ||
| 505 | |||
| 506 | #define VM_MEMORY_CM_READCACHE 95 | ||
| 507 | |||
| 508 | #define VM_MEMORY_CM_CRABS 96 | ||
| 509 | |||
| 510 | /* memory allocated for QuickLookThumbnailing */ | ||
| 511 | #define VM_MEMORY_QUICKLOOK_THUMBNAILS 97 | ||
| 512 | |||
| 513 | /* memory allocated by Accounts framework */ | ||
| 514 | #define VM_MEMORY_ACCOUNTS 98 | ||
| 515 | |||
| 516 | /* memory allocated by Sanitizer runtime libraries */ | ||
| 517 | #define VM_MEMORY_SANITIZER 99 | ||
| 518 | |||
| 519 | /* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */ | ||
| 520 | #define VM_MEMORY_IOACCELERATOR 100 | ||
| 521 | |||
| 522 | /* memory allocated by CoreMedia for global image registration of frames */ | ||
| 523 | #define VM_MEMORY_CM_REGWARP 101 | ||
| 524 | |||
| 525 | /* memory allocated by EmbeddedAcousticRecognition for speech decoder */ | ||
| 526 | #define VM_MEMORY_EAR_DECODER 102 | ||
| 527 | |||
| 528 | /* CoreUI cached image data */ | ||
| 529 | #define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103 | ||
| 530 | |||
| 531 | /* ColorSync is using mmap for read-only copies of ICC profile data */ | ||
| 532 | #define VM_MEMORY_COLORSYNC 104 | ||
| 533 | |||
| 534 | /* Reserve 230-239 for Rosetta */ | ||
| 535 | #define VM_MEMORY_ROSETTA 230 | ||
| 536 | #define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231 | ||
| 537 | #define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232 | ||
| 538 | #define VM_MEMORY_ROSETTA_RETURN_STACK 233 | ||
| 539 | #define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234 | ||
| 540 | #define VM_MEMORY_ROSETTA_USER_LDT 235 | ||
| 541 | #define VM_MEMORY_ROSETTA_ARENA 236 | ||
| 542 | #define VM_MEMORY_ROSETTA_10 239 | ||
| 543 | |||
| 544 | /* Reserve 240-255 for application */ | ||
| 545 | #define VM_MEMORY_APPLICATION_SPECIFIC_1 240 | ||
| 546 | #define VM_MEMORY_APPLICATION_SPECIFIC_16 255 | ||
| 547 | |||
| 548 | #define VM_MAKE_TAG(tag) ((tag) << 24) | ||
| 549 | |||
| 550 | |||
| 551 | |||
| 552 | #ifdef __cplusplus | ||
| 553 | } | ||
| 554 | #endif | ||
| 555 | |||
| 556 | #endif /* _MACH_VM_STATISTICS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach/vm_types.h created+98| ... | @@ -0,0 +1,98 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | * | ||
| 31 | */ | ||
| 32 | #ifndef _MACH_VM_TYPES_H_ | ||
| 33 | #define _MACH_VM_TYPES_H_ | ||
| 34 | |||
| 35 | #include <mach/port.h> | ||
| 36 | #include <mach/machine/vm_types.h> | ||
| 37 | |||
| 38 | #include <stdint.h> | ||
| 39 | #include <sys/cdefs.h> | ||
| 40 | |||
| 41 | typedef vm_offset_t pointer_t __kernel_ptr_semantics; | ||
| 42 | typedef vm_offset_t vm_address_t __kernel_ptr_semantics; | ||
| 43 | |||
| 44 | /* | ||
| 45 | * We use addr64_t for 64-bit addresses that are used on both | ||
| 46 | * 32 and 64-bit machines. On PPC, they are passed and returned as | ||
| 47 | * two adjacent 32-bit GPRs. We use addr64_t in places where | ||
| 48 | * common code must be useable both on 32 and 64-bit machines. | ||
| 49 | */ | ||
| 50 | typedef uint64_t addr64_t; /* Basic effective address */ | ||
| 51 | |||
| 52 | /* | ||
| 53 | * We use reg64_t for addresses that are 32 bits on a 32-bit | ||
| 54 | * machine, and 64 bits on a 64-bit machine, but are always | ||
| 55 | * passed and returned in a single GPR on PPC. This type | ||
| 56 | * cannot be used in generic 32-bit c, since on a 64-bit | ||
| 57 | * machine the upper half of the register will be ignored | ||
| 58 | * by the c compiler in 32-bit mode. In c, we can only use the | ||
| 59 | * type in prototypes of functions that are written in and called | ||
| 60 | * from assembly language. This type is basically a comment. | ||
| 61 | */ | ||
| 62 | typedef uint32_t reg64_t; | ||
| 63 | |||
| 64 | /* | ||
| 65 | * To minimize the use of 64-bit fields, we keep some physical | ||
| 66 | * addresses (that are page aligned) as 32-bit page numbers. | ||
| 67 | * This limits the physical address space to 16TB of RAM. | ||
| 68 | */ | ||
| 69 | typedef uint32_t ppnum_t; /* Physical page number */ | ||
| 70 | #define PPNUM_MAX UINT32_MAX | ||
| 71 | |||
| 72 | |||
| 73 | |||
| 74 | typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t; | ||
| 75 | |||
| 76 | |||
| 77 | #define VM_MAP_NULL ((vm_map_t) 0) | ||
| 78 | #define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) 0) | ||
| 79 | #define VM_MAP_READ_NULL ((vm_map_read_t) 0) | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Evolving definitions, likely to change. | ||
| 83 | */ | ||
| 84 | |||
| 85 | typedef uint64_t vm_object_offset_t; | ||
| 86 | typedef uint64_t vm_object_size_t; | ||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | typedef mach_port_t upl_t; | ||
| 92 | typedef mach_port_t vm_named_entry_t; | ||
| 93 | |||
| 94 | |||
| 95 | #define UPL_NULL ((upl_t) 0) | ||
| 96 | #define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) | ||
| 97 | |||
| 98 | #endif /* _MACH_VM_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/mach_debug/mach_debug_types.h+106-2| ... | @@ -69,12 +69,51 @@ | ... | @@ -69,12 +69,51 @@ |
| 69 | #include <mach_debug/hash_info.h> | 69 | #include <mach_debug/hash_info.h> |
| 70 | #include <mach_debug/lockgroup_info.h> | 70 | #include <mach_debug/lockgroup_info.h> |
| 71 | 71 | ||
| 72 | #define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL | 72 | #define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL |
| 73 | #define MACH_CORE_FILEHEADER_V2_SIGNATURE 0x63614d2073736f42ULL | ||
| 73 | #define MACH_CORE_FILEHEADER_MAXFILES 16 | 74 | #define MACH_CORE_FILEHEADER_MAXFILES 16 |
| 74 | #define MACH_CORE_FILEHEADER_NAMELEN 16 | 75 | #define MACH_CORE_FILEHEADER_NAMELEN 16 |
| 75 | 76 | ||
| 77 | /* The following are defined for mach_core_fileheader_v2 */ | ||
| 78 | #define MACH_CORE_FILEHEADER_V2_FLAG_LOG_ENCRYPTED_AEA (1ULL << 0) /* The log is encrypted using AEA */ | ||
| 79 | #define MACH_CORE_FILEHEADER_V2_FLAG_EXISTING_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 8) /* The public key is an NIST-P256 ECC key */ | ||
| 80 | #define MACH_CORE_FILEHEADER_V2_FLAG_NEXT_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 16) /* The next public key is an NIST-P256 ECC key */ | ||
| 81 | |||
| 82 | #define MACH_CORE_FILEHEADER_V2_FLAGS_EXISTING_COREFILE_KEY_FORMAT_MASK (0x1ULL << 8) /* A bit-mask for all supported key formats */ | ||
| 83 | #define MACH_CORE_FILEHEADER_V2_FLAGS_NEXT_COREFILE_KEY_FORMAT_MASK (0x1ULL << 16) /* A bit-mask for all supported next key formats */ | ||
| 84 | |||
| 85 | #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) | ||
| 86 | |||
| 87 | /* The following are defined for mach_core_details_v2 */ | ||
| 88 | #define MACH_CORE_DETAILS_V2_FLAG_ENCRYPTED_AEA (1ULL << 0) /* This core is encrypted using AEA */ | ||
| 89 | #define MACH_CORE_DETAILS_V2_FLAG_COMPRESSED_ZLIB (1ULL << 8) /* This core is compressed using ZLib */ | ||
| 90 | |||
| 76 | typedef char symtab_name_t[32]; | 91 | typedef char symtab_name_t[32]; |
| 77 | 92 | ||
| 93 | /* | ||
| 94 | *********************** | ||
| 95 | * | ||
| 96 | * Mach corefile layout | ||
| 97 | * | ||
| 98 | *********************** | ||
| 99 | * | ||
| 100 | * uint64_t signature | ||
| 101 | * uint64_t log_offset >---+ | ||
| 102 | * uint64_t log_length | | ||
| 103 | * mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES] | | ||
| 104 | * |--> uint64_t gzip_offset >---+ | | ||
| 105 | * | uint64_t gzip_length | | | ||
| 106 | * | char core_name[] | | | ||
| 107 | * |--> uint64_t gzip_offset >---+ | | | ||
| 108 | * | uint64_t gzip_length | | | | ||
| 109 | * | char core_name[] | | | | ||
| 110 | * |--> [...] | | | | ||
| 111 | * [log data. Plain-text] | | <---+ | ||
| 112 | * [core #1 data. Zlib compressed] | <---+ | ||
| 113 | * [core #2 data. Zlib compressed] <---+ | ||
| 114 | * [core #x data...] | ||
| 115 | */ | ||
| 116 | |||
| 78 | struct mach_core_details { | 117 | struct mach_core_details { |
| 79 | 	uint64_t gzip_offset; | 118 | 	uint64_t gzip_offset; |
| 80 | 	uint64_t gzip_length; | 119 | 	uint64_t gzip_length; |
| ... | @@ -82,13 +121,78 @@ struct mach_core_details { | ... | @@ -82,13 +121,78 @@ struct mach_core_details { |
| 82 | }; | 121 | }; |
| 83 | 122 | ||
| 84 | struct mach_core_fileheader { | 123 | struct mach_core_fileheader { |
| 85 | 	uint64_t signature; | 124 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_SIGNATURE */ |
| 86 | 	uint64_t log_offset; | 125 | 	uint64_t log_offset; |
| 87 | 	uint64_t log_length; | 126 | 	uint64_t log_length; |
| 88 | 	uint64_t num_files; | 127 | 	uint64_t num_files; |
| 89 | 	struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES]; | 128 | 	struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES]; |
| 90 | }; | 129 | }; |
| 91 | 130 | ||
| 131 | /* | ||
| 132 | * Mach corefile V2 headers are denoted with MACH_CORE_FILEHEADER_V2_SIGNATURE. | ||
| 133 | * Note that the V2 headers contain a version field that further indicates the version of the | ||
| 134 | * header's contents. For example, if a V2 header's 'version' field indicates version 5, then | ||
| 135 | * the header follows the format of the 'mach_core_fileheader_v5' structure. | ||
| 136 | * | ||
| 137 | * Further note that 'mach_core_details_' structures are not bound to the same versioning scheme | ||
| 138 | * as the header itself. This means that it's perfectly acceptable for a 'mach_core_fileheader_v5' header | ||
| 139 | * to make use of 'mach_core_details_v2' | ||
| 140 | * | ||
| 141 | ************************** | ||
| 142 | * | ||
| 143 | * Mach corefile layout V2 (using a version 2 header struct as an example) | ||
| 144 | * | ||
| 145 | ************************** | ||
| 146 | * | ||
| 147 | * uint64_t signature | ||
| 148 | * uint32_t version | ||
| 149 | * uint64_t flags | ||
| 150 | * uint64_t pub_key_offset >---+ | ||
| 151 | * uint16_t pub_key_length | | ||
| 152 | * uint64_t log_offset >---+ | | ||
| 153 | * uint64_t log_length | | | ||
| 154 | * uint64_t num_files | | | ||
| 155 | * mach_core_details_v2 files[] | | | ||
| 156 | * |--> uint64_t flags | | | ||
| 157 | * | uint64_t offset >---+ | | | ||
| 158 | * | uint64_t length | | | | ||
| 159 | * | char core_name[] | | | | ||
| 160 | * |--> uint64_t flags | | | | ||
| 161 | * | uint64_t offset >---+ | | | | ||
| 162 | * | uint64_t length | | | | | ||
| 163 | * | char core_name[] | | | | | ||
| 164 | * |--> [...] | | | | | ||
| 165 | * [public key data] | | | <---+ | ||
| 166 | * [log data. Plain-text or an AEA container] | | <---+ | ||
| 167 | * [core #1 data. Zlib compressed. Possibly in an AEA container] | <---+ | ||
| 168 | * [core #2 data. Zlib compressed. Possibly in an AEA container] <---+ | ||
| 169 | * [core #x data...] | ||
| 170 | */ | ||
| 171 | |||
| 172 | struct mach_core_details_v2 { | ||
| 173 | 	uint64_t flags; /* See the MACH_CORE_DETAILS_V2_FLAG_* definitions */ | ||
| 174 | 	uint64_t offset; | ||
| 175 | 	uint64_t length; | ||
| 176 | 	char core_name[MACH_CORE_FILEHEADER_NAMELEN]; | ||
| 177 | }; | ||
| 178 | |||
| 179 | struct mach_core_fileheader_base { | ||
| 180 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */ | ||
| 181 | 	uint32_t version; | ||
| 182 | }; | ||
| 183 | |||
| 184 | struct mach_core_fileheader_v2 { | ||
| 185 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */ | ||
| 186 | 	uint32_t version; /* 2 */ | ||
| 187 | 	uint64_t flags; /* See the MACH_CORE_FILEHEADER_V2_FLAG_* definitions */ | ||
| 188 | 	uint64_t pub_key_offset; /* Offset of the public key */ | ||
| 189 | 	uint16_t pub_key_length; /* Length of the public key */ | ||
| 190 | 	uint64_t log_offset; | ||
| 191 | 	uint64_t log_length; | ||
| 192 | 	uint64_t num_files; | ||
| 193 | 	struct mach_core_details_v2 files[]; | ||
| 194 | }; | ||
| 195 | |||
| 92 | #define KOBJECT_DESCRIPTION_LENGTH 512 | 196 | #define KOBJECT_DESCRIPTION_LENGTH 512 |
| 93 | typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH]; | 197 | typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH]; |
| 94 | 198 |
lib/libc/include/any-macos-any/machine/_mcontext.h created+39| ... | @@ -0,0 +1,39 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2003-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _BSD_MACHINE__MCONTEXT_H_ | ||
| 29 | #define _BSD_MACHINE__MCONTEXT_H_ | ||
| 30 | |||
| 31 | #if defined (__i386__) || defined (__x86_64__) | ||
| 32 | #include "i386/_mcontext.h" | ||
| 33 | #elif defined (__arm__) || defined (__arm64__) | ||
| 34 | #include "arm/_mcontext.h" | ||
| 35 | #else | ||
| 36 | #error architecture not supported | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #endif /* _BSD_MACHINE__MCONTEXT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/machine/_param.h created+39| ... | @@ -0,0 +1,39 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2004-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _BSD_MACHINE__PARAM_H_ | ||
| 29 | #define _BSD_MACHINE__PARAM_H_ | ||
| 30 | |||
| 31 | #if defined (__i386__) || defined (__x86_64__) | ||
| 32 | #include <i386/_param.h> | ||
| 33 | #elif defined (__arm__) || defined (__arm64__) | ||
| 34 | #include <arm/_param.h> | ||
| 35 | #else | ||
| 36 | #error architecture not supported | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #endif /* _BSD_MACHINE__PARAM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/machine/limits.h created+16| ... | @@ -0,0 +1,16 @@ | ||
| 1 | /* This is the `system' limits.h, independent of any particular | ||
| 2 | * compiler. GCC provides its own limits.h which can be found in | ||
| 3 | * /usr/lib/gcc, although it is not very informative. | ||
| 4 | * This file is public domain. */ | ||
| 5 | #ifndef _BSD_MACHINE_LIMITS_H_ | ||
| 6 | #define _BSD_MACHINE_LIMITS_H_ | ||
| 7 | |||
| 8 | #if defined (__i386__) || defined(__x86_64__) | ||
| 9 | #include <i386/limits.h> | ||
| 10 | #elif defined (__arm__) || defined (__arm64__) | ||
| 11 | #include <arm/limits.h> | ||
| 12 | #else | ||
| 13 | #error architecture not supported | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #endif /* _BSD_MACHINE_LIMITS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/malloc/malloc.h created+341| ... | @@ -0,0 +1,341 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 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 _MALLOC_MALLOC_H_ | ||
| 25 | #define _MALLOC_MALLOC_H_ | ||
| 26 | |||
| 27 | #include <stddef.h> | ||
| 28 | #include <mach/mach_types.h> | ||
| 29 | #include <sys/cdefs.h> | ||
| 30 | #include <Availability.h> | ||
| 31 | |||
| 32 | #if __has_feature(ptrauth_calls) | ||
| 33 | #include <ptrauth.h> | ||
| 34 | |||
| 35 | // Zone function pointer, type-diversified but not address-diversified (because | ||
| 36 | // the zone can be copied). Process-independent because the zone structure may | ||
| 37 | // be in the shared library cache. | ||
| 38 | #define MALLOC_ZONE_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 39 | 		FALSE, ptrauth_string_discriminator("malloc_zone_fn." #fn)) fn | ||
| 40 | |||
| 41 | // Introspection function pointer, address- and type-diversified. | ||
| 42 | // Process-independent because the malloc_introspection_t structure that contains | ||
| 43 | // these pointers may be in the shared library cache. | ||
| 44 | #define MALLOC_INTROSPECT_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 45 | 		TRUE, ptrauth_string_discriminator("malloc_introspect_fn." #fn)) fn | ||
| 46 | |||
| 47 | // Pointer to the introspection pointer table, type-diversified but not | ||
| 48 | // address-diversified (because the zone can be copied). | ||
| 49 | // Process-independent because the table pointer may be in the shared library cache. | ||
| 50 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) __ptrauth(ptrauth_key_process_independent_data,\ | ||
| 51 | 		FALSE, ptrauth_string_discriminator("malloc_introspect_tbl")) ptr | ||
| 52 | |||
| 53 | #endif	// __has_feature(ptrauth_calls) | ||
| 54 | |||
| 55 | #ifndef MALLOC_ZONE_FN_PTR | ||
| 56 | #define MALLOC_ZONE_FN_PTR(fn) fn | ||
| 57 | #define MALLOC_INTROSPECT_FN_PTR(fn) fn | ||
| 58 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) ptr | ||
| 59 | #endif // MALLOC_ZONE_FN_PTR | ||
| 60 | |||
| 61 | __BEGIN_DECLS | ||
| 62 | /*********	Type definitions	************/ | ||
| 63 | |||
| 64 | typedef struct _malloc_zone_t { | ||
| 65 | /* Only zone implementors should depend on the layout of this structure; | ||
| 66 | Regular callers should use the access functions below */ | ||
| 67 | void	*reserved1;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 68 | void	*reserved2;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 69 | size_t 	(* MALLOC_ZONE_FN_PTR(size))(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ | ||
| 70 | void 	*(* MALLOC_ZONE_FN_PTR(malloc))(struct _malloc_zone_t *zone, size_t size); | ||
| 71 | void 	*(* MALLOC_ZONE_FN_PTR(calloc))(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ | ||
| 72 | void 	*(* MALLOC_ZONE_FN_PTR(valloc))(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ | ||
| 73 | void 	(* MALLOC_ZONE_FN_PTR(free))(struct _malloc_zone_t *zone, void *ptr); | ||
| 74 | void 	*(* MALLOC_ZONE_FN_PTR(realloc))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 75 | void 	(* MALLOC_ZONE_FN_PTR(destroy))(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ | ||
| 76 | const char	*zone_name; | ||
| 77 | |||
| 78 | /* Optional batch callbacks; these may be NULL */ | ||
| 79 | unsigned	(* MALLOC_ZONE_FN_PTR(batch_malloc))(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ | ||
| 80 | void	(* MALLOC_ZONE_FN_PTR(batch_free))(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ | ||
| 81 | |||
| 82 | struct malloc_introspection_t	* MALLOC_INTROSPECT_TBL_PTR(introspect); | ||
| 83 | unsigned	version; | ||
| 84 | 	 | ||
| 85 | /* aligned memory allocation. The callback may be NULL. Present in version >= 5. */ | ||
| 86 | void *(* MALLOC_ZONE_FN_PTR(memalign))(struct _malloc_zone_t *zone, size_t alignment, size_t size); | ||
| 87 | |||
| 88 | /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. Present in version >= 6.*/ | ||
| 89 | void (* MALLOC_ZONE_FN_PTR(free_definite_size))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 90 | |||
| 91 | /* Empty out caches in the face of memory pressure. The callback may be NULL. Present in version >= 8. */ | ||
| 92 | size_t 	(* MALLOC_ZONE_FN_PTR(pressure_relief))(struct _malloc_zone_t *zone, size_t goal); | ||
| 93 | |||
| 94 | 	/* | ||
| 95 | 	 * Checks whether an address might belong to the zone. May be NULL. Present in version >= 10. | ||
| 96 | 	 * False positives are allowed (e.g. the pointer was freed, or it's in zone space that has | ||
| 97 | 	 * not yet been allocated. False negatives are not allowed. | ||
| 98 | 	 */ | ||
| 99 | boolean_t (* MALLOC_ZONE_FN_PTR(claimed_address))(struct _malloc_zone_t *zone, void *ptr); | ||
| 100 | } malloc_zone_t; | ||
| 101 | |||
| 102 | /*********	Creation and destruction	************/ | ||
| 103 | |||
| 104 | extern malloc_zone_t *malloc_default_zone(void); | ||
| 105 | /* The initial zone */ | ||
| 106 | |||
| 107 | extern malloc_zone_t *malloc_create_zone(vm_size_t start_size, unsigned flags); | ||
| 108 | /* Creates a new zone with default behavior and registers it */ | ||
| 109 | |||
| 110 | extern void malloc_destroy_zone(malloc_zone_t *zone); | ||
| 111 | /* Destroys zone and everything it allocated */ | ||
| 112 | |||
| 113 | /*********	Block creation and manipulation	************/ | ||
| 114 | |||
| 115 | extern void *malloc_zone_malloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 116 | /* Allocates a new pointer of size size; zone must be non-NULL */ | ||
| 117 | |||
| 118 | extern void *malloc_zone_calloc(malloc_zone_t *zone, size_t num_items, size_t size) __alloc_size(2,3); | ||
| 119 | /* Allocates a new pointer of size num_items * size; block is cleared; zone must be non-NULL */ | ||
| 120 | |||
| 121 | extern void *malloc_zone_valloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 122 | /* Allocates a new pointer of size size; zone must be non-NULL; Pointer is guaranteed to be page-aligned and block is cleared */ | ||
| 123 | |||
| 124 | extern void malloc_zone_free(malloc_zone_t *zone, void *ptr); | ||
| 125 | /* Frees pointer in zone; zone must be non-NULL */ | ||
| 126 | |||
| 127 | extern void *malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size) __alloc_size(3); | ||
| 128 | /* Enlarges block if necessary; zone must be non-NULL */ | ||
| 129 | |||
| 130 | extern malloc_zone_t *malloc_zone_from_ptr(const void *ptr); | ||
| 131 | /* Returns the zone for a pointer, or NULL if not in any zone. | ||
| 132 | The ptr must have been returned from a malloc or realloc call. */ | ||
| 133 | |||
| 134 | extern size_t malloc_size(const void *ptr); | ||
| 135 | /* Returns size of given ptr */ | ||
| 136 | |||
| 137 | extern size_t malloc_good_size(size_t size); | ||
| 138 | /* Returns number of bytes greater than or equal to size that can be allocated without padding */ | ||
| 139 | |||
| 140 | extern void *malloc_zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size) __alloc_size(3) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 141 | /* | ||
| 142 | * Allocates a new pointer of size size whose address is an exact multiple of alignment. | ||
| 143 | * alignment must be a power of two and at least as large as sizeof(void *). | ||
| 144 | * zone must be non-NULL. | ||
| 145 | */ | ||
| 146 | |||
| 147 | /*********	Batch methods	************/ | ||
| 148 | |||
| 149 | extern unsigned malloc_zone_batch_malloc(malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); | ||
| 150 | /* Allocates num blocks of the same size; Returns the number truly allocated (may be 0) */ | ||
| 151 | |||
| 152 | extern void malloc_zone_batch_free(malloc_zone_t *zone, void **to_be_freed, unsigned num); | ||
| 153 | /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process; This function will always free even if the zone has no batch callback */ | ||
| 154 | |||
| 155 | /*********	Functions for libcache	************/ | ||
| 156 | |||
| 157 | extern malloc_zone_t *malloc_default_purgeable_zone(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 158 | /* Returns a pointer to the default purgeable_zone. */ | ||
| 159 | |||
| 160 | extern void malloc_make_purgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 161 | /* Make an allocation from the purgeable zone purgeable if possible. */ | ||
| 162 | |||
| 163 | extern int malloc_make_nonpurgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 164 | /* Makes an allocation from the purgeable zone nonpurgeable. | ||
| 165 | * Returns zero if the contents were not purged since the last | ||
| 166 | * call to malloc_make_purgeable, else returns non-zero. */ | ||
| 167 | |||
| 168 | /*********	Functions for zone implementors	************/ | ||
| 169 | |||
| 170 | extern void malloc_zone_register(malloc_zone_t *zone); | ||
| 171 | /* Registers a custom malloc zone; Should typically be called after a | ||
| 172 | * malloc_zone_t has been filled in with custom methods by a client. See | ||
| 173 | * malloc_create_zone for creating additional malloc zones with the | ||
| 174 | * default allocation and free behavior. */ | ||
| 175 | |||
| 176 | extern void malloc_zone_unregister(malloc_zone_t *zone); | ||
| 177 | /* De-registers a zone | ||
| 178 | Should typically be called before calling the zone destruction routine */ | ||
| 179 | |||
| 180 | extern void malloc_set_zone_name(malloc_zone_t *zone, const char *name); | ||
| 181 | /* Sets the name of a zone */ | ||
| 182 | |||
| 183 | extern const char *malloc_get_zone_name(malloc_zone_t *zone); | ||
| 184 | /* Returns the name of a zone */ | ||
| 185 | |||
| 186 | size_t malloc_zone_pressure_relief(malloc_zone_t *zone, size_t goal) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 187 | /* malloc_zone_pressure_relief() advises the malloc subsystem that the process is under memory pressure and | ||
| 188 | * that the subsystem should make its best effort towards releasing (i.e. munmap()-ing) "goal" bytes from "zone". | ||
| 189 | * If "goal" is passed as zero, the malloc subsystem will attempt to achieve maximal pressure relief in "zone". | ||
| 190 | * If "zone" is passed as NULL, all zones are examined for pressure relief opportunities. | ||
| 191 | * malloc_zone_pressure_relief() returns the number of bytes released. | ||
| 192 | */ | ||
| 193 | |||
| 194 | typedef struct { | ||
| 195 | vm_address_t	address; | ||
| 196 | vm_size_t		size; | ||
| 197 | } vm_range_t; | ||
| 198 | |||
| 199 | typedef struct malloc_statistics_t { | ||
| 200 | unsigned	blocks_in_use; | ||
| 201 | size_t	size_in_use; | ||
| 202 | size_t	max_size_in_use;	/* high water mark of touched memory */ | ||
| 203 | size_t	size_allocated;		/* reserved in memory */ | ||
| 204 | } malloc_statistics_t; | ||
| 205 | |||
| 206 | typedef kern_return_t memory_reader_t(task_t remote_task, vm_address_t remote_address, vm_size_t size, void **local_memory); | ||
| 207 | /* given a task, "reads" the memory at the given address and size | ||
| 208 | local_memory: set to a contiguous chunk of memory; validity of local_memory is assumed to be limited (until next call) */ | ||
| 209 | |||
| 210 | #define MALLOC_PTR_IN_USE_RANGE_TYPE	1	/* for allocated pointers */ | ||
| 211 | #define MALLOC_PTR_REGION_RANGE_TYPE	2	/* for region containing pointers */ | ||
| 212 | #define MALLOC_ADMIN_REGION_RANGE_TYPE	4	/* for region used internally */ | ||
| 213 | #define MALLOC_ZONE_SPECIFIC_FLAGS	0xff00	/* bits reserved for zone-specific purposes */ | ||
| 214 | |||
| 215 | typedef void vm_range_recorder_t(task_t, void *, unsigned type, vm_range_t *, unsigned); | ||
| 216 | /* given a task and context, "records" the specified addresses */ | ||
| 217 | |||
| 218 | /* Print function for the print_task() operation. */ | ||
| 219 | typedef void print_task_printer_t(const char *fmt, ...) __printflike(1,2); | ||
| 220 | |||
| 221 | typedef struct malloc_introspection_t { | ||
| 222 | 	kern_return_t (* MALLOC_INTROSPECT_FN_PTR(enumerator))(task_t task, void *, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder); /* enumerates all the malloc pointers in use */ | ||
| 223 | 	size_t	(* MALLOC_INTROSPECT_FN_PTR(good_size))(malloc_zone_t *zone, size_t size); | ||
| 224 | 	boolean_t 	(* MALLOC_INTROSPECT_FN_PTR(check))(malloc_zone_t *zone); /* Consistency checker */ | ||
| 225 | 	void 	(* MALLOC_INTROSPECT_FN_PTR(print))(malloc_zone_t *zone, boolean_t verbose); /* Prints zone */ | ||
| 226 | 	void	(* MALLOC_INTROSPECT_FN_PTR(log))(malloc_zone_t *zone, void *address); /* Enables logging of activity */ | ||
| 227 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_lock))(malloc_zone_t *zone); /* Forces locking zone */ | ||
| 228 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_unlock))(malloc_zone_t *zone); /* Forces unlocking zone */ | ||
| 229 | 	void	(* MALLOC_INTROSPECT_FN_PTR(statistics))(malloc_zone_t *zone, malloc_statistics_t *stats); /* Fills statistics */ | ||
| 230 | 	boolean_t (* MALLOC_INTROSPECT_FN_PTR(zone_locked))(malloc_zone_t *zone); /* Are any zone locks held */ | ||
| 231 | |||
| 232 | /* Discharge checking. Present in version >= 7. */ | ||
| 233 | 	boolean_t	(* MALLOC_INTROSPECT_FN_PTR(enable_discharge_checking))(malloc_zone_t *zone); | ||
| 234 | 	void	(* MALLOC_INTROSPECT_FN_PTR(disable_discharge_checking))(malloc_zone_t *zone); | ||
| 235 | 	void	(* MALLOC_INTROSPECT_FN_PTR(discharge))(malloc_zone_t *zone, void *memory); | ||
| 236 | #ifdef __BLOCKS__ | ||
| 237 | 	void (* MALLOC_INTROSPECT_FN_PTR(enumerate_discharged_pointers))(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)); | ||
| 238 | 	#else | ||
| 239 | void	*enumerate_unavailable_without_blocks; | ||
| 240 | #endif /* __BLOCKS__ */ | ||
| 241 | 	void	(* MALLOC_INTROSPECT_FN_PTR(reinit_lock))(malloc_zone_t *zone); /* Reinitialize zone locks, called only from atfork_child handler. Present in version >= 9. */ | ||
| 242 | 	void	(* MALLOC_INTROSPECT_FN_PTR(print_task))(task_t task, unsigned level, vm_address_t zone_address, memory_reader_t reader, print_task_printer_t printer); /* debug print for another process. Present in version >= 11. */ | ||
| 243 | 	void (* MALLOC_INTROSPECT_FN_PTR(task_statistics))(task_t task, vm_address_t zone_address, memory_reader_t reader, malloc_statistics_t *stats); /* Present in version >= 12 */ | ||
| 244 | } malloc_introspection_t; | ||
| 245 | |||
| 246 | // The value of "level" when passed to print_task() that corresponds to | ||
| 247 | // verbose passed to print() | ||
| 248 | #define MALLOC_VERBOSE_PRINT_LEVEL	2 | ||
| 249 | |||
| 250 | extern void malloc_printf(const char *format, ...); | ||
| 251 | /* Convenience for logging errors and warnings; | ||
| 252 | No allocation is performed during execution of this function; | ||
| 253 | Only understands usual %p %d %s formats, and %y that expresses a number of bytes (5b,10KB,1MB...) | ||
| 254 | */ | ||
| 255 | |||
| 256 | /*********	Functions for performance tools	************/ | ||
| 257 | |||
| 258 | extern kern_return_t malloc_get_all_zones(task_t task, memory_reader_t reader, vm_address_t **addresses, unsigned *count); | ||
| 259 | /* Fills addresses and count with the addresses of the zones in task; | ||
| 260 | Note that the validity of the addresses returned correspond to the validity of the memory returned by reader */ | ||
| 261 | |||
| 262 | /*********	Debug helpers	************/ | ||
| 263 | |||
| 264 | extern void malloc_zone_print_ptr_info(void *ptr); | ||
| 265 | /* print to stdout if this pointer is in the malloc heap, free status, and size */ | ||
| 266 | |||
| 267 | extern boolean_t malloc_zone_check(malloc_zone_t *zone); | ||
| 268 | /* Checks zone is well formed; if !zone, checks all zones */ | ||
| 269 | |||
| 270 | extern void malloc_zone_print(malloc_zone_t *zone, boolean_t verbose); | ||
| 271 | /* Prints summary on zone; if !zone, prints all zones */ | ||
| 272 | |||
| 273 | extern void malloc_zone_statistics(malloc_zone_t *zone, malloc_statistics_t *stats); | ||
| 274 | /* Fills statistics for zone; if !zone, sums up all zones */ | ||
| 275 | |||
| 276 | extern void malloc_zone_log(malloc_zone_t *zone, void *address); | ||
| 277 | /* Controls logging of all activity; if !zone, for all zones; | ||
| 278 | If address==0 nothing is logged; | ||
| 279 | If address==-1 all activity is logged; | ||
| 280 | Else only the activity regarding address is logged */ | ||
| 281 | |||
| 282 | struct mstats { | ||
| 283 | size_t	bytes_total; | ||
| 284 | size_t	chunks_used; | ||
| 285 | size_t	bytes_used; | ||
| 286 | size_t	chunks_free; | ||
| 287 | size_t	bytes_free; | ||
| 288 | }; | ||
| 289 | |||
| 290 | extern struct mstats mstats(void); | ||
| 291 | |||
| 292 | extern boolean_t malloc_zone_enable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 293 | /* Increment the discharge checking enabled counter for a zone. Returns true if the zone supports checking, false if it does not. */ | ||
| 294 | |||
| 295 | extern void malloc_zone_disable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 296 | /* Decrement the discharge checking enabled counter for a zone. */ | ||
| 297 | |||
| 298 | extern void malloc_zone_discharge(malloc_zone_t *zone, void *memory) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 299 | /* Register memory that the programmer expects to be freed soon. | ||
| 300 | zone may be NULL in which case the zone is determined using malloc_zone_from_ptr(). | ||
| 301 | If discharge checking is off for the zone this function is a no-op. */ | ||
| 302 | |||
| 303 | #ifdef __BLOCKS__ | ||
| 304 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 305 | /* Calls report_discharged for each block that was registered using malloc_zone_discharge() but has not yet been freed. | ||
| 306 | info is used to provide zone defined information about the memory block. | ||
| 307 | If zone is NULL then the enumeration covers all zones. */ | ||
| 308 | #else | ||
| 309 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 310 | #endif /* __BLOCKS__ */ | ||
| 311 | |||
| 312 | /********* Zone version summary ************/ | ||
| 313 | // Version 0, but optional: | ||
| 314 | // malloc_zone_t::batch_malloc | ||
| 315 | // malloc_zone_t::batch_free | ||
| 316 | // Version 5: | ||
| 317 | // malloc_zone_t::memalign | ||
| 318 | // Version 6: | ||
| 319 | // malloc_zone_t::free_definite_size | ||
| 320 | // Version 7: | ||
| 321 | // malloc_introspection_t::enable_discharge_checking | ||
| 322 | // malloc_introspection_t::disable_discharge_checking | ||
| 323 | // malloc_introspection_t::discharge | ||
| 324 | // Version 8: | ||
| 325 | // malloc_zone_t::pressure_relief | ||
| 326 | // Version 9: | ||
| 327 | // malloc_introspection_t::reinit_lock | ||
| 328 | // Version 10: | ||
| 329 | // malloc_zone_t::claimed_address | ||
| 330 | // Version 11: | ||
| 331 | // malloc_introspection_t::print_task | ||
| 332 | // Version 12: | ||
| 333 | // malloc_introspection_t::task_statistics | ||
| 334 | |||
| 335 | // These functions are optional and calling them requires two checks: | ||
| 336 | // * Check zone version to ensure zone struct is large enough to include the member. | ||
| 337 | // * Check that the function pointer is not null. | ||
| 338 | |||
| 339 | __END_DECLS | ||
| 340 | |||
| 341 | #endif /* _MALLOC_MALLOC_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/net/net_kev.h+3-1| ... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
| 74 | #define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20 | 74 | #define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20 |
| 75 | #define KEV_DL_NODE_PRESENCE 21 | 75 | #define KEV_DL_NODE_PRESENCE 21 |
| 76 | #define KEV_DL_NODE_ABSENCE 22 | 76 | #define KEV_DL_NODE_ABSENCE 22 |
| 77 | #define KEV_DL_MASTER_ELECTED 23 | 77 | #define KEV_DL_PRIMARY_ELECTED 23 |
| 78 | #define KEV_DL_ISSUES 24 | 78 | #define KEV_DL_ISSUES 24 |
| 79 | #define KEV_DL_IFDELEGATE_CHANGED 25 | 79 | #define KEV_DL_IFDELEGATE_CHANGED 25 |
| 80 | #define KEV_DL_AWDL_RESTRICTED 26 | 80 | #define KEV_DL_AWDL_RESTRICTED 26 |
| ... | @@ -83,6 +83,8 @@ | ... | @@ -83,6 +83,8 @@ |
| 83 | #define KEV_DL_QOS_MODE_CHANGED 29 | 83 | #define KEV_DL_QOS_MODE_CHANGED 29 |
| 84 | #define KEV_DL_LOW_POWER_MODE_CHANGED 30 | 84 | #define KEV_DL_LOW_POWER_MODE_CHANGED 30 |
| 85 | 85 | ||
| 86 | #define KEV_DL_MASTER_ELECTED (_Pragma("gcc warn Use KEV_DL_PRIMARY_ELECTED instead") KEV_DL_PRIMARY_ELECTED) | ||
| 87 | |||
| 86 | 88 | ||
| 87 | #define KEV_INET6_SUBCLASS 6 /* inet6 subclass */ | 89 | #define KEV_INET6_SUBCLASS 6 /* inet6 subclass */ |
| 88 | /* KEV_INET6_SUBCLASS event codes */ | 90 | /* KEV_INET6_SUBCLASS event codes */ |
lib/libc/include/any-macos-any/net/route.h deleted-258| ... | @@ -1,258 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Copyright (c) 1980, 1986, 1993 | ||
| 30 | *	The Regents of the University of California. All rights reserved. | ||
| 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 | *	@(#)route.h	8.3 (Berkeley) 4/19/94 | ||
| 61 | * $FreeBSD: src/sys/net/route.h,v 1.36.2.1 2000/08/16 06:14:23 jayanth Exp $ | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _NET_ROUTE_H_ | ||
| 65 | #define _NET_ROUTE_H_ | ||
| 66 | #include <sys/appleapiopts.h> | ||
| 67 | #include <stdint.h> | ||
| 68 | #include <sys/types.h> | ||
| 69 | #include <sys/socket.h> | ||
| 70 | |||
| 71 | /* | ||
| 72 | * These numbers are used by reliable protocols for determining | ||
| 73 | * retransmission behavior and are included in the routing structure. | ||
| 74 | */ | ||
| 75 | struct rt_metrics { | ||
| 76 | 	u_int32_t rmx_locks; /* Kernel leaves these values alone */ | ||
| 77 | 	u_int32_t rmx_mtu; /* MTU for this path */ | ||
| 78 | 	u_int32_t rmx_hopcount; /* max hops expected */ | ||
| 79 | 	int32_t rmx_expire; /* lifetime for route, e.g. redirect */ | ||
| 80 | 	u_int32_t rmx_recvpipe; /* inbound delay-bandwidth product */ | ||
| 81 | 	u_int32_t rmx_sendpipe; /* outbound delay-bandwidth product */ | ||
| 82 | 	u_int32_t rmx_ssthresh; /* outbound gateway buffer limit */ | ||
| 83 | 	u_int32_t rmx_rtt; /* estimated round trip time */ | ||
| 84 | 	u_int32_t rmx_rttvar; /* estimated rtt variance */ | ||
| 85 | 	u_int32_t rmx_pksent; /* packets sent using this route */ | ||
| 86 | 	u_int32_t rmx_state; /* route state */ | ||
| 87 | 	u_int32_t rmx_filler[3]; /* will be used for TCP's peer-MSS cache */ | ||
| 88 | }; | ||
| 89 | |||
| 90 | /* | ||
| 91 | * rmx_rtt and rmx_rttvar are stored as microseconds; | ||
| 92 | */ | ||
| 93 | #define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */ | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | #define RTF_UP 0x1 /* route usable */ | ||
| 98 | #define RTF_GATEWAY 0x2 /* destination is a gateway */ | ||
| 99 | #define RTF_HOST 0x4 /* host entry (net otherwise) */ | ||
| 100 | #define RTF_REJECT 0x8 /* host or net unreachable */ | ||
| 101 | #define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */ | ||
| 102 | #define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */ | ||
| 103 | #define RTF_DONE 0x40 /* message confirmed */ | ||
| 104 | #define RTF_DELCLONE 0x80 /* delete cloned route */ | ||
| 105 | #define RTF_CLONING 0x100 /* generate new routes on use */ | ||
| 106 | #define RTF_XRESOLVE 0x200 /* external daemon resolves name */ | ||
| 107 | #define RTF_LLINFO 0x400 /* DEPRECATED - exists ONLY for backward | ||
| 108 | 	 * compatibility */ | ||
| 109 | #define RTF_LLDATA 0x400 /* used by apps to add/del L2 entries */ | ||
| 110 | #define RTF_STATIC 0x800 /* manually added */ | ||
| 111 | #define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ | ||
| 112 | #define RTF_NOIFREF 0x2000 /* not eligible for RTF_IFREF */ | ||
| 113 | #define RTF_PROTO2 0x4000 /* protocol specific routing flag */ | ||
| 114 | #define RTF_PROTO1 0x8000 /* protocol specific routing flag */ | ||
| 115 | |||
| 116 | #define RTF_PRCLONING 0x10000 /* protocol requires cloning */ | ||
| 117 | #define RTF_WASCLONED 0x20000 /* route generated through cloning */ | ||
| 118 | #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ | ||
| 119 | /* 0x80000 unused */ | ||
| 120 | #define RTF_PINNED 0x100000 /* future use */ | ||
| 121 | #define RTF_LOCAL 0x200000 /* route represents a local address */ | ||
| 122 | #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ | ||
| 123 | #define RTF_MULTICAST 0x800000 /* route represents a mcast address */ | ||
| 124 | #define RTF_IFSCOPE 0x1000000 /* has valid interface scope */ | ||
| 125 | #define RTF_CONDEMNED 0x2000000 /* defunct; no longer modifiable */ | ||
| 126 | #define RTF_IFREF 0x4000000 /* route holds a ref to interface */ | ||
| 127 | #define RTF_PROXY 0x8000000 /* proxying, no interface scope */ | ||
| 128 | #define RTF_ROUTER 0x10000000 /* host is a router */ | ||
| 129 | #define RTF_DEAD 0x20000000 /* Route entry is being freed */ | ||
| 130 | #define RTF_GLOBAL 0x40000000 /* route to destination of the global internet */ | ||
| 131 | /* 0x80000000 unassigned */ | ||
| 132 | |||
| 133 | #define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */ | ||
| 134 | #define RTF_BITS \ | ||
| 135 | 	"\020\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" \ | ||
| 136 | 	"\10DELCLONE\11CLONING\12XRESOLVE\13LLINFO\14STATIC\15BLACKHOLE" \ | ||
| 137 | 	"\16NOIFREF\17PROTO2\20PROTO1\21PRCLONING\22WASCLONED\23PROTO3" \ | ||
| 138 | 	"\25PINNED\26LOCAL\27BROADCAST\30MULTICAST\31IFSCOPE\32CONDEMNED" \ | ||
| 139 | 	"\33IFREF\34PROXY\35ROUTER\37GLOBAL" | ||
| 140 | |||
| 141 | #define IS_DIRECT_HOSTROUTE(rt) \ | ||
| 142 | 	(((rt)->rt_flags & (RTF_HOST | RTF_GATEWAY)) == RTF_HOST) | ||
| 143 | /* | ||
| 144 | * Routing statistics. | ||
| 145 | */ | ||
| 146 | struct rtstat { | ||
| 147 | 	short rts_badredirect; /* bogus redirect calls */ | ||
| 148 | 	short rts_dynamic; /* routes created by redirects */ | ||
| 149 | 	short rts_newgateway; /* routes modified by redirects */ | ||
| 150 | 	short rts_unreach; /* lookups which failed */ | ||
| 151 | 	short rts_wildcard; /* lookups satisfied by a wildcard */ | ||
| 152 | 	short rts_badrtgwroute; /* route to gateway is not direct */ | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* | ||
| 156 | * Structures for routing messages. | ||
| 157 | */ | ||
| 158 | struct rt_msghdr { | ||
| 159 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 160 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 161 | 	u_char rtm_type; /* message type */ | ||
| 162 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 163 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 164 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 165 | 	pid_t rtm_pid; /* identify sender */ | ||
| 166 | 	int rtm_seq; /* for sender to identify action */ | ||
| 167 | 	int rtm_errno; /* why failed */ | ||
| 168 | 	int rtm_use; /* from rtentry */ | ||
| 169 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 170 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 171 | }; | ||
| 172 | |||
| 173 | struct rt_msghdr2 { | ||
| 174 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 175 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 176 | 	u_char rtm_type; /* message type */ | ||
| 177 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 178 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 179 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 180 | 	int32_t rtm_refcnt; /* reference count */ | ||
| 181 | 	int rtm_parentflags; /* flags of the parent route */ | ||
| 182 | 	int rtm_reserved; /* reserved field set to 0 */ | ||
| 183 | 	int rtm_use; /* from rtentry */ | ||
| 184 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 185 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 186 | }; | ||
| 187 | |||
| 188 | |||
| 189 | #define RTM_VERSION 5 /* Up the ante and ignore older versions */ | ||
| 190 | |||
| 191 | /* | ||
| 192 | * Message types. | ||
| 193 | */ | ||
| 194 | #define RTM_ADD 0x1 /* Add Route */ | ||
| 195 | #define RTM_DELETE 0x2 /* Delete Route */ | ||
| 196 | #define RTM_CHANGE 0x3 /* Change Metrics or flags */ | ||
| 197 | #define RTM_GET 0x4 /* Report Metrics */ | ||
| 198 | #define RTM_LOSING 0x5 /* RTM_LOSING is no longer generated by xnu | ||
| 199 | 	 * and is deprecated */ | ||
| 200 | #define RTM_REDIRECT 0x6 /* Told to use different route */ | ||
| 201 | #define RTM_MISS 0x7 /* Lookup failed on this address */ | ||
| 202 | #define RTM_LOCK 0x8 /* fix specified metrics */ | ||
| 203 | #define RTM_OLDADD 0x9 /* caused by SIOCADDRT */ | ||
| 204 | #define RTM_OLDDEL 0xa /* caused by SIOCDELRT */ | ||
| 205 | #define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */ | ||
| 206 | #define RTM_NEWADDR 0xc /* address being added to iface */ | ||
| 207 | #define RTM_DELADDR 0xd /* address being removed from iface */ | ||
| 208 | #define RTM_IFINFO 0xe /* iface going up/down etc. */ | ||
| 209 | #define RTM_NEWMADDR 0xf /* mcast group membership being added to if */ | ||
| 210 | #define RTM_DELMADDR 0x10 /* mcast group membership being deleted */ | ||
| 211 | #define RTM_IFINFO2 0x12 /* */ | ||
| 212 | #define RTM_NEWMADDR2 0x13 /* */ | ||
| 213 | #define RTM_GET2 0x14 /* */ | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Bitmask values for rtm_inits and rmx_locks. | ||
| 217 | */ | ||
| 218 | #define RTV_MTU 0x1 /* init or lock _mtu */ | ||
| 219 | #define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */ | ||
| 220 | #define RTV_EXPIRE 0x4 /* init or lock _expire */ | ||
| 221 | #define RTV_RPIPE 0x8 /* init or lock _recvpipe */ | ||
| 222 | #define RTV_SPIPE 0x10 /* init or lock _sendpipe */ | ||
| 223 | #define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */ | ||
| 224 | #define RTV_RTT 0x40 /* init or lock _rtt */ | ||
| 225 | #define RTV_RTTVAR 0x80 /* init or lock _rttvar */ | ||
| 226 | |||
| 227 | /* | ||
| 228 | * Bitmask values for rtm_addrs. | ||
| 229 | */ | ||
| 230 | #define RTA_DST 0x1 /* destination sockaddr present */ | ||
| 231 | #define RTA_GATEWAY 0x2 /* gateway sockaddr present */ | ||
| 232 | #define RTA_NETMASK 0x4 /* netmask sockaddr present */ | ||
| 233 | #define RTA_GENMASK 0x8 /* cloning mask sockaddr present */ | ||
| 234 | #define RTA_IFP 0x10 /* interface name sockaddr present */ | ||
| 235 | #define RTA_IFA 0x20 /* interface addr sockaddr present */ | ||
| 236 | #define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */ | ||
| 237 | #define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Index offsets for sockaddr array for alternate internal encoding. | ||
| 241 | */ | ||
| 242 | #define RTAX_DST 0 /* destination sockaddr present */ | ||
| 243 | #define RTAX_GATEWAY 1 /* gateway sockaddr present */ | ||
| 244 | #define RTAX_NETMASK 2 /* netmask sockaddr present */ | ||
| 245 | #define RTAX_GENMASK 3 /* cloning mask sockaddr present */ | ||
| 246 | #define RTAX_IFP 4 /* interface name sockaddr present */ | ||
| 247 | #define RTAX_IFA 5 /* interface addr sockaddr present */ | ||
| 248 | #define RTAX_AUTHOR 6 /* sockaddr for author of redirect */ | ||
| 249 | #define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 250 | #define RTAX_MAX 8 /* size of array to allocate */ | ||
| 251 | |||
| 252 | struct rt_addrinfo { | ||
| 253 | 	int rti_addrs; | ||
| 254 | 	struct sockaddr *rti_info[RTAX_MAX]; | ||
| 255 | }; | ||
| 256 | |||
| 257 | |||
| 258 | #endif /* _NET_ROUTE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/netinet6/in6.h created+683| ... | @@ -0,0 +1,683 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | ||
| 31 | * All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. Neither the name of the project nor the names of its contributors | ||
| 42 | * may be used to endorse or promote products derived from this software | ||
| 43 | * without specific prior written permission. | ||
| 44 | * | ||
| 45 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | ||
| 46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | ||
| 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 55 | * SUCH DAMAGE. | ||
| 56 | */ | ||
| 57 | |||
| 58 | /* | ||
| 59 | * Copyright (c) 1982, 1986, 1990, 1993 | ||
| 60 | *	The Regents of the University of California. All rights reserved. | ||
| 61 | * | ||
| 62 | * Redistribution and use in source and binary forms, with or without | ||
| 63 | * modification, are permitted provided that the following conditions | ||
| 64 | * are met: | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 68 | * notice, this list of conditions and the following disclaimer in the | ||
| 69 | * documentation and/or other materials provided with the distribution. | ||
| 70 | * 3. All advertising materials mentioning features or use of this software | ||
| 71 | * must display the following acknowledgement: | ||
| 72 | *	This product includes software developed by the University of | ||
| 73 | *	California, Berkeley and its contributors. | ||
| 74 | * 4. Neither the name of the University nor the names of its contributors | ||
| 75 | * may be used to endorse or promote products derived from this software | ||
| 76 | * without specific prior written permission. | ||
| 77 | * | ||
| 78 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 79 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 80 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 81 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 82 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 83 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 84 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 85 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 86 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 87 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 88 | * SUCH DAMAGE. | ||
| 89 | * | ||
| 90 | *	@(#)in.h	8.3 (Berkeley) 1/3/94 | ||
| 91 | */ | ||
| 92 | |||
| 93 | #ifndef __KAME_NETINET_IN_H_INCLUDED_ | ||
| 94 | #error "do not include netinet6/in6.h directly, include netinet/in.h. " \ | ||
| 95 | " see RFC2553" | ||
| 96 | #endif | ||
| 97 | |||
| 98 | #ifndef _NETINET6_IN6_H_ | ||
| 99 | #define _NETINET6_IN6_H_ | ||
| 100 | #include <sys/appleapiopts.h> | ||
| 101 | |||
| 102 | #include <sys/_types.h> | ||
| 103 | #include <sys/_types/_sa_family_t.h> | ||
| 104 | |||
| 105 | /* | ||
| 106 | * Identification of the network protocol stack | ||
| 107 | * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE | ||
| 108 | * has the table of implementation/integration differences. | ||
| 109 | */ | ||
| 110 | #define __KAME__ | ||
| 111 | #define __KAME_VERSION "2009/apple-darwin" | ||
| 112 | |||
| 113 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 114 | /* | ||
| 115 | * Local port number conventions: | ||
| 116 | * | ||
| 117 | * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), | ||
| 118 | * unless a kernel is compiled with IPNOPRIVPORTS defined. | ||
| 119 | * | ||
| 120 | * When a user does a bind(2) or connect(2) with a port number of zero, | ||
| 121 | * a non-conflicting local port address is chosen. | ||
| 122 | * | ||
| 123 | * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although | ||
| 124 | * that is settable by sysctl(3); net.inet.ip.anonportmin and | ||
| 125 | * net.inet.ip.anonportmax respectively. | ||
| 126 | * | ||
| 127 | * A user may set the IPPROTO_IP option IP_PORTRANGE to change this | ||
| 128 | * default assignment range. | ||
| 129 | * | ||
| 130 | * The value IP_PORTRANGE_DEFAULT causes the default behavior. | ||
| 131 | * | ||
| 132 | * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, | ||
| 133 | * and exists only for FreeBSD compatibility purposes. | ||
| 134 | * | ||
| 135 | * The value IP_PORTRANGE_LOW changes the range to the "low" are | ||
| 136 | * that is (by convention) restricted to privileged processes. | ||
| 137 | * This convention is based on "vouchsafe" principles only. | ||
| 138 | * It is only secure if you trust the remote host to restrict these ports. | ||
| 139 | * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. | ||
| 140 | */ | ||
| 141 | |||
| 142 | #define IPV6PORT_RESERVED 1024 | ||
| 143 | #define IPV6PORT_ANONMIN 49152 | ||
| 144 | #define IPV6PORT_ANONMAX 65535 | ||
| 145 | #define IPV6PORT_RESERVEDMIN 600 | ||
| 146 | #define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1) | ||
| 147 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 148 | |||
| 149 | /* | ||
| 150 | * IPv6 address | ||
| 151 | */ | ||
| 152 | typedef struct in6_addr { | ||
| 153 | 	union { | ||
| 154 | 		__uint8_t __u6_addr8[16]; | ||
| 155 | 		__uint16_t __u6_addr16[8]; | ||
| 156 | 		__uint32_t __u6_addr32[4]; | ||
| 157 | 	} __u6_addr; /* 128-bit IP6 address */ | ||
| 158 | } in6_addr_t; | ||
| 159 | |||
| 160 | #define s6_addr __u6_addr.__u6_addr8 | ||
| 161 | |||
| 162 | #define INET6_ADDRSTRLEN 46 | ||
| 163 | |||
| 164 | /* | ||
| 165 | * Socket address for IPv6 | ||
| 166 | */ | ||
| 167 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 168 | #define SIN6_LEN | ||
| 169 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 170 | struct sockaddr_in6 { | ||
| 171 | 	__uint8_t sin6_len; /* length of this struct(sa_family_t) */ | ||
| 172 | 	sa_family_t sin6_family; /* AF_INET6 (sa_family_t) */ | ||
| 173 | 	in_port_t sin6_port; /* Transport layer port # (in_port_t) */ | ||
| 174 | 	__uint32_t sin6_flowinfo; /* IP6 flow information */ | ||
| 175 | 	struct in6_addr sin6_addr; /* IP6 address */ | ||
| 176 | 	__uint32_t sin6_scope_id; /* scope zone index */ | ||
| 177 | }; | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | /* | ||
| 184 | * Definition of some useful macros to handle IP6 addresses | ||
| 185 | */ | ||
| 186 | #define IN6ADDR_ANY_INIT \ | ||
| 187 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 188 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 189 | #define IN6ADDR_LOOPBACK_INIT \ | ||
| 190 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 191 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 192 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 193 | #define IN6ADDR_NODELOCAL_ALLNODES_INIT \ | ||
| 194 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 195 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 196 | #define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \ | ||
| 197 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 198 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 199 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | ||
| 200 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 201 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 202 | #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ | ||
| 203 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 204 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}} | ||
| 205 | #define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \ | ||
| 206 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 207 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}} | ||
| 208 | #define IN6ADDR_V4MAPPED_INIT \ | ||
| 209 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 210 | 	 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 211 | #define IN6ADDR_MULTICAST_PREFIX IN6MASK8 | ||
| 212 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 213 | |||
| 214 | extern const struct in6_addr in6addr_any; | ||
| 215 | extern const struct in6_addr in6addr_loopback; | ||
| 216 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 217 | extern const struct in6_addr in6addr_nodelocal_allnodes; | ||
| 218 | extern const struct in6_addr in6addr_linklocal_allnodes; | ||
| 219 | extern const struct in6_addr in6addr_linklocal_allrouters; | ||
| 220 | extern const struct in6_addr in6addr_linklocal_allv2routers; | ||
| 221 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 222 | |||
| 223 | /* | ||
| 224 | * Equality | ||
| 225 | * NOTE: Some of kernel programming environment (for example, openbsd/sparc) | ||
| 226 | * does not supply memcmp(). For userland memcmp() is preferred as it is | ||
| 227 | * in ANSI standard. | ||
| 228 | */ | ||
| 229 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 230 | #define IN6_ARE_ADDR_EQUAL(a, b) \ | ||
| 231 | 	(memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof (struct in6_addr)) \ | ||
| 232 | 	== 0) | ||
| 233 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 234 | |||
| 235 | |||
| 236 | /* | ||
| 237 | * Unspecified | ||
| 238 | */ | ||
| 239 | #define IN6_IS_ADDR_UNSPECIFIED(a) \ | ||
| 240 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 241 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 242 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 243 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0)) | ||
| 244 | |||
| 245 | /* | ||
| 246 | * Loopback | ||
| 247 | */ | ||
| 248 | #define IN6_IS_ADDR_LOOPBACK(a) \ | ||
| 249 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 250 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 251 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 252 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1))) | ||
| 253 | |||
| 254 | /* | ||
| 255 | * IPv4 compatible | ||
| 256 | */ | ||
| 257 | #define IN6_IS_ADDR_V4COMPAT(a) \ | ||
| 258 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 259 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 260 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 261 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \ | ||
| 262 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1))) | ||
| 263 | |||
| 264 | /* | ||
| 265 | * Mapped | ||
| 266 | */ | ||
| 267 | #define IN6_IS_ADDR_V4MAPPED(a) \ | ||
| 268 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 269 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 270 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == \ | ||
| 271 | 	ntohl(0x0000ffff))) | ||
| 272 | |||
| 273 | /* | ||
| 274 | * 6to4 | ||
| 275 | */ | ||
| 276 | #define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002) | ||
| 277 | |||
| 278 | /* | ||
| 279 | * KAME Scope Values | ||
| 280 | */ | ||
| 281 | |||
| 282 | #define __IPV6_ADDR_SCOPE_NODELOCAL 0x01 | ||
| 283 | #define __IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 | ||
| 284 | #define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02 | ||
| 285 | #define __IPV6_ADDR_SCOPE_SITELOCAL 0x05 | ||
| 286 | #define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */ | ||
| 287 | #define __IPV6_ADDR_SCOPE_GLOBAL 0x0e | ||
| 288 | |||
| 289 | /* | ||
| 290 | * Unicast Scope | ||
| 291 | * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). | ||
| 292 | */ | ||
| 293 | #define IN6_IS_ADDR_LINKLOCAL(a) \ | ||
| 294 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) | ||
| 295 | #define IN6_IS_ADDR_SITELOCAL(a) \ | ||
| 296 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Multicast | ||
| 300 | */ | ||
| 301 | #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) | ||
| 302 | |||
| 303 | #define IPV6_ADDR_MC_FLAGS(a) ((a)->s6_addr[1] & 0xf0) | ||
| 304 | |||
| 305 | #define IPV6_ADDR_MC_FLAGS_TRANSIENT 0x10 | ||
| 306 | #define IPV6_ADDR_MC_FLAGS_PREFIX 0x20 | ||
| 307 | #define IPV6_ADDR_MC_FLAGS_UNICAST_BASED (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX) | ||
| 308 | |||
| 309 | #define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a) \ | ||
| 310 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 311 | 	(IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED)) | ||
| 312 | |||
| 313 | /* | ||
| 314 | * Unique Local IPv6 Unicast Addresses (per RFC 4193) | ||
| 315 | */ | ||
| 316 | #define IN6_IS_ADDR_UNIQUE_LOCAL(a) \ | ||
| 317 | 	(((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd)) | ||
| 318 | |||
| 319 | #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * Multicast Scope | ||
| 323 | */ | ||
| 324 | #define IN6_IS_ADDR_MC_NODELOCAL(a) \ | ||
| 325 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 326 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL)) | ||
| 327 | #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ | ||
| 328 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 329 | 	(IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) && \ | ||
| 330 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL)) | ||
| 331 | #define IN6_IS_ADDR_MC_SITELOCAL(a) \ | ||
| 332 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 333 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) | ||
| 334 | #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ | ||
| 335 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 336 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) | ||
| 337 | #define IN6_IS_ADDR_MC_GLOBAL(a) \ | ||
| 338 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 339 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL)) | ||
| 340 | |||
| 341 | |||
| 342 | |||
| 343 | |||
| 344 | /* | ||
| 345 | * Options for use with [gs]etsockopt at the IPV6 level. | ||
| 346 | * First word of comment is data type; bool is stored in int. | ||
| 347 | */ | ||
| 348 | /* no hdrincl */ | ||
| 349 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 350 | /* | ||
| 351 | * RFC 3542 define the following socket options in a manner incompatible | ||
| 352 | * with RFC 2292: | ||
| 353 | * IPV6_PKTINFO | ||
| 354 | * IPV6_HOPLIMIT | ||
| 355 | * IPV6_NEXTHOP | ||
| 356 | * IPV6_HOPOPTS | ||
| 357 | * IPV6_DSTOPTS | ||
| 358 | * IPV6_RTHDR | ||
| 359 | * | ||
| 360 | * To use the new IPv6 Sockets options introduced by RFC 3542 | ||
| 361 | * the constant __APPLE_USE_RFC_3542 must be defined before | ||
| 362 | * including <netinet/in.h> | ||
| 363 | * | ||
| 364 | * To use the old IPv6 Sockets options from RFC 2292 | ||
| 365 | * the constant __APPLE_USE_RFC_2292 must be defined before | ||
| 366 | * including <netinet/in.h> | ||
| 367 | * | ||
| 368 | * Note that eventually RFC 3542 is going to be the | ||
| 369 | * default and RFC 2292 will be obsolete. | ||
| 370 | */ | ||
| 371 | |||
| 372 | #if defined(__APPLE_USE_RFC_3542) && defined(__APPLE_USE_RFC_2292) | ||
| 373 | #error "__APPLE_USE_RFC_3542 and __APPLE_USE_RFC_2292 cannot be both defined" | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #if 0 /* the followings are relic in IPv4 and hence are disabled */ | ||
| 377 | #define IPV6_OPTIONS 1 /* buf/ip6_opts; set/get IP6 options */ | ||
| 378 | #define IPV6_RECVOPTS 5 /* bool; receive all IP6 opts w/dgram */ | ||
| 379 | #define IPV6_RECVRETOPTS 6 /* bool; receive IP6 opts for response */ | ||
| 380 | #define IPV6_RECVDSTADDR 7 /* bool; receive IP6 dst addr w/dgram */ | ||
| 381 | #define IPV6_RETOPTS 8 /* ip6_opts; set/get IP6 options */ | ||
| 382 | #endif /* 0 */ | ||
| 383 | #define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ | ||
| 384 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 385 | #define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ | ||
| 386 | #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ | ||
| 387 | #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ | ||
| 388 | #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 mcast loopback */ | ||
| 389 | #define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */ | ||
| 390 | #define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ | ||
| 391 | |||
| 392 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 393 | #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ | ||
| 394 | #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ | ||
| 395 | #define IPV6_2292PKTINFO 19 /* bool; send/recv if, src/dst addr */ | ||
| 396 | #define IPV6_2292HOPLIMIT 20 /* bool; hop limit */ | ||
| 397 | #define IPV6_2292NEXTHOP 21 /* bool; next hop addr */ | ||
| 398 | #define IPV6_2292HOPOPTS 22 /* bool; hop-by-hop option */ | ||
| 399 | #define IPV6_2292DSTOPTS 23 /* bool; destinaion option */ | ||
| 400 | #define IPV6_2292RTHDR 24 /* ip6_rthdr: routing header */ | ||
| 401 | |||
| 402 | /* buf/cmsghdr; set/get IPv6 options [obsoleted by RFC3542] */ | ||
| 403 | #define IPV6_2292PKTOPTIONS 25 | ||
| 404 | |||
| 405 | #ifdef __APPLE_USE_RFC_2292 | ||
| 406 | #define IPV6_PKTINFO IPV6_2292PKTINFO | ||
| 407 | #define IPV6_HOPLIMIT IPV6_2292HOPLIMIT | ||
| 408 | #define IPV6_NEXTHOP IPV6_2292NEXTHOP | ||
| 409 | #define IPV6_HOPOPTS IPV6_2292HOPOPTS | ||
| 410 | #define IPV6_DSTOPTS IPV6_2292DSTOPTS | ||
| 411 | #define IPV6_RTHDR IPV6_2292RTHDR | ||
| 412 | #define IPV6_PKTOPTIONS IPV6_2292PKTOPTIONS | ||
| 413 | #endif /* __APPLE_USE_RFC_2292 */ | ||
| 414 | |||
| 415 | #define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */ | ||
| 416 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 417 | #define IPV6_V6ONLY 27 /* bool; only bind INET6 at wildcard bind */ | ||
| 418 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 419 | #define IPV6_BINDV6ONLY IPV6_V6ONLY | ||
| 420 | |||
| 421 | |||
| 422 | #if 1 /* IPSEC */ | ||
| 423 | #define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ | ||
| 424 | #endif /* 1 */ | ||
| 425 | #define IPV6_FAITH 29 /* deprecated */ | ||
| 426 | |||
| 427 | #if 1 /* IPV6FIREWALL */ | ||
| 428 | #define IPV6_FW_ADD 30 /* add a firewall rule to chain */ | ||
| 429 | #define IPV6_FW_DEL 31 /* delete a firewall rule from chain */ | ||
| 430 | #define IPV6_FW_FLUSH 32 /* flush firewall rule chain */ | ||
| 431 | #define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */ | ||
| 432 | #define IPV6_FW_GET 34 /* get entire firewall rule chain */ | ||
| 433 | #endif /* 1 */ | ||
| 434 | |||
| 435 | /* | ||
| 436 | * APPLE: NOTE the value of those 2 options is kept unchanged from | ||
| 437 | * previous version of darwin/OS X for binary compatibility reasons | ||
| 438 | * and differ from FreeBSD (values 57 and 61). See below. | ||
| 439 | */ | ||
| 440 | #define IPV6_RECVTCLASS 35 /* bool; recv traffic class values */ | ||
| 441 | #define IPV6_TCLASS 36 /* int; send traffic class value */ | ||
| 442 | |||
| 443 | #ifdef __APPLE_USE_RFC_3542 | ||
| 444 | /* new socket options introduced in RFC3542 */ | ||
| 445 | /* | ||
| 446 | * ip6_dest; send dst option before rthdr | ||
| 447 | * APPLE: Value purposely different than FreeBSD (35) to avoid | ||
| 448 | * collision with definition of IPV6_RECVTCLASS in previous | ||
| 449 | * darwin implementations | ||
| 450 | */ | ||
| 451 | #define IPV6_RTHDRDSTOPTS 57 | ||
| 452 | |||
| 453 | /* | ||
| 454 | * bool; recv if, dst addr | ||
| 455 | * APPLE: Value purposely different than FreeBSD(36) to avoid | ||
| 456 | * collision with definition of IPV6_TCLASS in previous | ||
| 457 | * darwin implementations | ||
| 458 | */ | ||
| 459 | #define IPV6_RECVPKTINFO 61 | ||
| 460 | |||
| 461 | #define IPV6_RECVHOPLIMIT 37 /* bool; recv hop limit */ | ||
| 462 | #define IPV6_RECVRTHDR 38 /* bool; recv routing header */ | ||
| 463 | #define IPV6_RECVHOPOPTS 39 /* bool; recv hop-by-hop option */ | ||
| 464 | #define IPV6_RECVDSTOPTS 40 /* bool; recv dst option after rthdr */ | ||
| 465 | |||
| 466 | #define IPV6_USE_MIN_MTU 42 /* bool; send packets at the minimum MTU */ | ||
| 467 | #define IPV6_RECVPATHMTU 43 /* bool; notify an according MTU */ | ||
| 468 | |||
| 469 | /* | ||
| 470 | * mtuinfo; get the current path MTU (sopt), 4 bytes int; | ||
| 471 | * MTU notification (cmsg) | ||
| 472 | */ | ||
| 473 | #define IPV6_PATHMTU 44 | ||
| 474 | |||
| 475 | #if 0 /* obsoleted during 2292bis -> 3542 */ | ||
| 476 | /* no data; ND reachability confirm (cmsg only/not in of RFC3542) */ | ||
| 477 | #define IPV6_REACHCONF 45 | ||
| 478 | #endif | ||
| 479 | /* more new socket options introduced in RFC3542 */ | ||
| 480 | #define IPV6_3542PKTINFO 46 /* in6_pktinfo; send if, src addr */ | ||
| 481 | #define IPV6_3542HOPLIMIT 47 /* int; send hop limit */ | ||
| 482 | #define IPV6_3542NEXTHOP 48 /* sockaddr; next hop addr */ | ||
| 483 | #define IPV6_3542HOPOPTS 49 /* ip6_hbh; send hop-by-hop option */ | ||
| 484 | #define IPV6_3542DSTOPTS 50 /* ip6_dest; send dst option befor rthdr */ | ||
| 485 | #define IPV6_3542RTHDR 51 /* ip6_rthdr; send routing header */ | ||
| 486 | |||
| 487 | #define IPV6_PKTINFO IPV6_3542PKTINFO | ||
| 488 | #define IPV6_HOPLIMIT IPV6_3542HOPLIMIT | ||
| 489 | #define IPV6_NEXTHOP IPV6_3542NEXTHOP | ||
| 490 | #define IPV6_HOPOPTS IPV6_3542HOPOPTS | ||
| 491 | #define IPV6_DSTOPTS IPV6_3542DSTOPTS | ||
| 492 | #define IPV6_RTHDR IPV6_3542RTHDR | ||
| 493 | |||
| 494 | #define IPV6_AUTOFLOWLABEL 59 /* bool; attach flowlabel automagically */ | ||
| 495 | |||
| 496 | #define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */ | ||
| 497 | |||
| 498 | /* int; prefer temporary addresses as the source address. */ | ||
| 499 | #define IPV6_PREFER_TEMPADDR 63 | ||
| 500 | |||
| 501 | /* | ||
| 502 | * The following option is private; do not use it from user applications. | ||
| 503 | * It is deliberately defined to the same value as IP_MSFILTER. | ||
| 504 | */ | ||
| 505 | #define IPV6_MSFILTER 74 /* struct __msfilterreq; */ | ||
| 506 | #endif /* __APPLE_USE_RFC_3542 */ | ||
| 507 | |||
| 508 | #define IPV6_BOUND_IF 125 /* int; set/get bound interface */ | ||
| 509 | |||
| 510 | |||
| 511 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 512 | |||
| 513 | #define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. */ | ||
| 514 | #define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. */ | ||
| 515 | #define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */ | ||
| 516 | |||
| 517 | /* | ||
| 518 | * Defaults and limits for options | ||
| 519 | */ | ||
| 520 | #define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */ | ||
| 521 | #define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ | ||
| 522 | |||
| 523 | /* | ||
| 524 | * The im6o_membership vector for each socket is now dynamically allocated at | ||
| 525 | * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized | ||
| 526 | * according to a power-of-two increment. | ||
| 527 | */ | ||
| 528 | #define IPV6_MIN_MEMBERSHIPS 31 | ||
| 529 | #define IPV6_MAX_MEMBERSHIPS 4095 | ||
| 530 | |||
| 531 | /* | ||
| 532 | * Default resource limits for IPv6 multicast source filtering. | ||
| 533 | * These may be modified by sysctl. | ||
| 534 | */ | ||
| 535 | #define IPV6_MAX_GROUP_SRC_FILTER 512 /* sources per group */ | ||
| 536 | #define IPV6_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ | ||
| 537 | |||
| 538 | /* | ||
| 539 | * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. | ||
| 540 | */ | ||
| 541 | struct ipv6_mreq { | ||
| 542 | 	struct in6_addr ipv6mr_multiaddr; | ||
| 543 | 	unsigned int ipv6mr_interface; | ||
| 544 | }; | ||
| 545 | |||
| 546 | /* | ||
| 547 | * IPV6_2292PKTINFO: Packet information(RFC2292 sec 5) | ||
| 548 | */ | ||
| 549 | struct in6_pktinfo { | ||
| 550 | 	struct in6_addr ipi6_addr; /* src/dst IPv6 address */ | ||
| 551 | 	unsigned int ipi6_ifindex; /* send/recv interface index */ | ||
| 552 | }; | ||
| 553 | |||
| 554 | /* | ||
| 555 | * Control structure for IPV6_RECVPATHMTU socket option. | ||
| 556 | */ | ||
| 557 | struct ip6_mtuinfo { | ||
| 558 | 	struct sockaddr_in6 ip6m_addr; /* or sockaddr_storage? */ | ||
| 559 | 	uint32_t ip6m_mtu; | ||
| 560 | }; | ||
| 561 | |||
| 562 | /* | ||
| 563 | * Argument for IPV6_PORTRANGE: | ||
| 564 | * - which range to search when port is unspecified at bind() or connect() | ||
| 565 | */ | ||
| 566 | #define IPV6_PORTRANGE_DEFAULT 0 /* default range */ | ||
| 567 | #define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ | ||
| 568 | #define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ | ||
| 569 | |||
| 570 | /* | ||
| 571 | * Definitions for inet6 sysctl operations. | ||
| 572 | * | ||
| 573 | * Third level is protocol number. | ||
| 574 | * Fourth level is desired variable within that protocol. | ||
| 575 | */ | ||
| 576 | #define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */ | ||
| 577 | |||
| 578 | /* | ||
| 579 | * Names for IP sysctl objects | ||
| 580 | */ | ||
| 581 | #define IPV6CTL_FORWARDING 1 /* act as router */ | ||
| 582 | #define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ | ||
| 583 | #define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ | ||
| 584 | #ifdef notyet | ||
| 585 | #define IPV6CTL_DEFMTU 4 /* default MTU */ | ||
| 586 | #endif | ||
| 587 | #define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ | ||
| 588 | #define IPV6CTL_STATS 6 /* stats */ | ||
| 589 | #define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ | ||
| 590 | #define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */ | ||
| 591 | #define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */ | ||
| 592 | #define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */ | ||
| 593 | #define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */ | ||
| 594 | #define IPV6CTL_ACCEPT_RTADV 12 | ||
| 595 | #define IPV6CTL_KEEPFAITH 13 /* deprecated */ | ||
| 596 | #define IPV6CTL_LOG_INTERVAL 14 | ||
| 597 | #define IPV6CTL_HDRNESTLIMIT 15 | ||
| 598 | #define IPV6CTL_DAD_COUNT 16 | ||
| 599 | #define IPV6CTL_AUTO_FLOWLABEL 17 | ||
| 600 | #define IPV6CTL_DEFMCASTHLIM 18 | ||
| 601 | #define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */ | ||
| 602 | #define IPV6CTL_KAME_VERSION 20 | ||
| 603 | #define IPV6CTL_USE_DEPRECATED 21 /* use deprec addr (RFC2462 5.5.4) */ | ||
| 604 | #define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ | ||
| 605 | #if 0 /* obsolete */ | ||
| 606 | #define IPV6CTL_MAPPED_ADDR 23 | ||
| 607 | #endif | ||
| 608 | #define IPV6CTL_V6ONLY 24 | ||
| 609 | #define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */ | ||
| 610 | #define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */ | ||
| 611 | #define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */ | ||
| 612 | |||
| 613 | #define IPV6CTL_USETEMPADDR 32 /* use temporary addresses [RFC 4941] */ | ||
| 614 | #define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ | ||
| 615 | #define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ | ||
| 616 | #define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */ | ||
| 617 | #define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */ | ||
| 618 | #define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ | ||
| 619 | #define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ | ||
| 620 | #define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ | ||
| 621 | |||
| 622 | #define IPV6CTL_MAXFRAGS 41 /* max fragments */ | ||
| 623 | #define IPV6CTL_MCAST_PMTU 44 /* enable pMTU discovery for mcast? */ | ||
| 624 | |||
| 625 | #define IPV6CTL_NEIGHBORGCTHRESH 46 | ||
| 626 | #define IPV6CTL_MAXIFPREFIXES 47 | ||
| 627 | #define IPV6CTL_MAXIFDEFROUTERS 48 | ||
| 628 | #define IPV6CTL_MAXDYNROUTES 49 | ||
| 629 | #define ICMPV6CTL_ND6_ONLINKNSRFC4861 50 | ||
| 630 | #define IPV6CTL_ULA_USETEMPADDR 51 | ||
| 631 | |||
| 632 | |||
| 633 | /* New entries should be added here from current IPV6CTL_MAXID value. */ | ||
| 634 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 635 | #define IPV6CTL_MAXID 51 | ||
| 636 | |||
| 637 | |||
| 638 | |||
| 639 | |||
| 640 | |||
| 641 | __BEGIN_DECLS | ||
| 642 | struct cmsghdr; | ||
| 643 | |||
| 644 | extern int inet6_option_space(int); | ||
| 645 | extern int inet6_option_init(void *, struct cmsghdr **, int); | ||
| 646 | extern int inet6_option_append(struct cmsghdr *, const __uint8_t *, int, int); | ||
| 647 | extern __uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); | ||
| 648 | extern int inet6_option_next(const struct cmsghdr *, __uint8_t **); | ||
| 649 | extern int inet6_option_find(const struct cmsghdr *, __uint8_t **, int); | ||
| 650 | |||
| 651 | extern size_t inet6_rthdr_space(int, int); | ||
| 652 | extern struct cmsghdr *inet6_rthdr_init(void *, int); | ||
| 653 | extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, | ||
| 654 | unsigned int); | ||
| 655 | extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); | ||
| 656 | #if 0 /* not implemented yet */ | ||
| 657 | extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); | ||
| 658 | #endif | ||
| 659 | extern int inet6_rthdr_segments(const struct cmsghdr *); | ||
| 660 | extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); | ||
| 661 | extern int inet6_rthdr_getflags(const struct cmsghdr *, int); | ||
| 662 | |||
| 663 | extern int inet6_opt_init(void *, socklen_t); | ||
| 664 | extern int inet6_opt_append(void *, socklen_t, int, __uint8_t, socklen_t, | ||
| 665 | __uint8_t, void **); | ||
| 666 | extern int inet6_opt_finish(void *, socklen_t, int); | ||
| 667 | extern int inet6_opt_set_val(void *, int, void *, socklen_t); | ||
| 668 | |||
| 669 | extern int inet6_opt_next(void *, socklen_t, int, __uint8_t *, socklen_t *, | ||
| 670 | void **); | ||
| 671 | extern int inet6_opt_find(void *, socklen_t, int, __uint8_t, socklen_t *, | ||
| 672 | void **); | ||
| 673 | extern int inet6_opt_get_val(void *, int, void *, socklen_t); | ||
| 674 | extern socklen_t inet6_rth_space(int, int); | ||
| 675 | extern void *inet6_rth_init(void *, socklen_t, int, int); | ||
| 676 | extern int inet6_rth_add(void *, const struct in6_addr *); | ||
| 677 | extern int inet6_rth_reverse(const void *, void *); | ||
| 678 | extern int inet6_rth_segments(const void *); | ||
| 679 | extern struct in6_addr *inet6_rth_getaddr(const void *, int); | ||
| 680 | |||
| 681 | __END_DECLS | ||
| 682 | #endif /* PLATFORM_DriverKit */ | ||
| 683 | #endif /* !_NETINET6_IN6_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/objc/NSObjCRuntime.h+1-1| ... | @@ -8,7 +8,7 @@ | ... | @@ -8,7 +8,7 @@ |
| 8 | #include <TargetConditionals.h> | 8 | #include <TargetConditionals.h> |
| 9 | #include <objc/objc.h> | 9 | #include <objc/objc.h> |
| 10 | 10 | ||
| 11 | #if __LP64__ || 0 || NS_BUILD_32_LIKE_64 | 11 | #if __LP64__ || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 |
| 12 | typedef long NSInteger; | 12 | typedef long NSInteger; |
| 13 | typedef unsigned long NSUInteger; | 13 | typedef unsigned long NSUInteger; |
| 14 | #else | 14 | #else |
lib/libc/include/any-macos-any/objc/message.h-69| ... | @@ -316,73 +316,4 @@ _objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) | ... | @@ -316,73 +316,4 @@ _objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) |
| 316 | OBJC_ARM64_UNAVAILABLE; | 316 | OBJC_ARM64_UNAVAILABLE; |
| 317 | #endif | 317 | #endif |
| 318 | 318 | ||
| 319 | |||
| 320 | /* Variable-argument Messaging Primitives | ||
| 321 | * | ||
| 322 | * Use these functions to call methods with a list of arguments, such | ||
| 323 | * as the one passed to forward:: . | ||
| 324 | * | ||
| 325 | * The contents of the argument list are architecture-specific. | ||
| 326 | * Consult your local function call ABI documentation for details. | ||
| 327 | * | ||
| 328 | * These functions must be cast to an appropriate function pointer type | ||
| 329 | * before being called, except for objc_msgSendv_stret() which must not | ||
| 330 | * be cast to a struct-returning type. | ||
| 331 | */ | ||
| 332 | |||
| 333 | typedef void* marg_list; | ||
| 334 | |||
| 335 | OBJC_EXPORT id _Nullable | ||
| 336 | objc_msgSendv(id _Nullable self, SEL _Nonnull op, size_t arg_size, | ||
| 337 | marg_list _Nonnull arg_frame) | ||
| 338 | OBJC2_UNAVAILABLE; | ||
| 339 | |||
| 340 | OBJC_EXPORT void | ||
| 341 | objc_msgSendv_stret(void * _Nonnull stretAddr, id _Nullable self, | ||
| 342 | SEL _Nonnull op, size_t arg_size, | ||
| 343 | marg_list _Nullable arg_frame) | ||
| 344 | OBJC2_UNAVAILABLE; | ||
| 345 | /* Note that objc_msgSendv_stret() does not return a structure type, | ||
| 346 | * and should not be cast to do so. This is unlike objc_msgSend_stret() | ||
| 347 | * and objc_msgSendSuper_stret(). | ||
| 348 | */ | ||
| 349 | #if defined(__i386__) | ||
| 350 | OBJC_EXPORT double | ||
| 351 | objc_msgSendv_fpret(id _Nullable self, SEL _Nonnull op, | ||
| 352 | unsigned arg_size, marg_list _Nullable arg_frame) | ||
| 353 | OBJC2_UNAVAILABLE; | ||
| 354 | #endif | ||
| 355 | |||
| 356 | |||
| 357 | /* The following marg_list macros are of marginal utility. They | ||
| 358 | * are included for compatibility with the old objc-class.h header. */ | ||
| 359 | |||
| 360 | #if !__OBJC2__ | ||
| 361 | |||
| 362 | #define marg_prearg_size	0 | ||
| 363 | |||
| 364 | #define marg_malloc(margs, method) \ | ||
| 365 | 	do { \ | ||
| 366 | 		margs = (marg_list *)malloc (marg_prearg_size + ((7 + method_getSizeOfArguments(method)) & ~7)); \ | ||
| 367 | 	} while (0) | ||
| 368 | |||
| 369 | #define marg_free(margs) \ | ||
| 370 | 	do { \ | ||
| 371 | 		free(margs); \ | ||
| 372 | 	} while (0) | ||
| 373 | 	 | ||
| 374 | #define marg_adjustedOffset(method, offset) \ | ||
| 375 | 	(marg_prearg_size + offset) | ||
| 376 | |||
| 377 | #define marg_getRef(margs, offset, type) \ | ||
| 378 | 	( (type *)((char *)margs + marg_adjustedOffset(method,offset) ) ) | ||
| 379 | |||
| 380 | #define marg_getValue(margs, offset, type) \ | ||
| 381 | 	( *marg_getRef(margs, offset, type) ) | ||
| 382 | |||
| 383 | #define marg_setValue(margs, offset, type, value) \ | ||
| 384 | 	( marg_getValue(margs, offset, type) = (value) ) | ||
| 385 | |||
| 386 | #endif | ||
| 387 | |||
| 388 | #endif | 319 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/objc/objc-api.h created+296| ... | @@ -0,0 +1,296 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2006 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 | // Copyright 1988-1996 NeXT Software, Inc. | ||
| 24 | |||
| 25 | #ifndef _OBJC_OBJC_API_H_ | ||
| 26 | #define _OBJC_OBJC_API_H_ | ||
| 27 | |||
| 28 | #include <Availability.h> | ||
| 29 | #include <AvailabilityMacros.h> | ||
| 30 | #include <TargetConditionals.h> | ||
| 31 | #include <sys/types.h> | ||
| 32 | |||
| 33 | #ifndef __has_feature | ||
| 34 | # define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef __has_extension | ||
| 38 | # define __has_extension __has_feature | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifndef __has_attribute | ||
| 42 | # define __has_attribute(x) 0 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #if !__has_feature(nullability) | ||
| 46 | # ifndef _Nullable | ||
| 47 | # define _Nullable | ||
| 48 | # endif | ||
| 49 | # ifndef _Nonnull | ||
| 50 | # define _Nonnull | ||
| 51 | # endif | ||
| 52 | # ifndef _Null_unspecified | ||
| 53 | # define _Null_unspecified | ||
| 54 | # endif | ||
| 55 | #endif | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | /* | ||
| 60 | * OBJC_API_VERSION 0 or undef: Tiger and earlier API only | ||
| 61 | * OBJC_API_VERSION 2: Leopard and later API available | ||
| 62 | */ | ||
| 63 | #if !defined(OBJC_API_VERSION) | ||
| 64 | # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5 | ||
| 65 | # define OBJC_API_VERSION 0 | ||
| 66 | # else | ||
| 67 | # define OBJC_API_VERSION 2 | ||
| 68 | # endif | ||
| 69 | #endif | ||
| 70 | |||
| 71 | |||
| 72 | /* | ||
| 73 | * OBJC_NO_GC 1: GC is not supported | ||
| 74 | * OBJC_NO_GC undef: GC is supported. This SDK no longer supports this mode. | ||
| 75 | * | ||
| 76 | * OBJC_NO_GC_API undef: Libraries must export any symbols that | ||
| 77 | * dual-mode code may links to. | ||
| 78 | * OBJC_NO_GC_API 1: Libraries need not export GC-related symbols. | ||
| 79 | */ | ||
| 80 | #if defined(__OBJC_GC__) | ||
| 81 | # error Objective-C garbage collection is not supported. | ||
| 82 | #elif TARGET_OS_OSX | ||
| 83 | /* GC is unsupported. GC API symbols are exported. */ | ||
| 84 | # define OBJC_NO_GC 1 | ||
| 85 | # undef OBJC_NO_GC_API | ||
| 86 | #else | ||
| 87 | /* GC is unsupported. GC API symbols are not exported. */ | ||
| 88 | # define OBJC_NO_GC 1 | ||
| 89 | # define OBJC_NO_GC_API 1 | ||
| 90 | #endif | ||
| 91 | |||
| 92 | |||
| 93 | /* NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER == 1 | ||
| 94 | * marks -[NSObject init] as a designated initializer. */ | ||
| 95 | #if !defined(NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER) | ||
| 96 | # define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1 | ||
| 97 | #endif | ||
| 98 | |||
| 99 | /* The arm64 ABI requires proper casting to ensure arguments are passed | ||
| 100 | * * correctly. */ | ||
| 101 | #if defined(__arm64__) && !__swift__ | ||
| 102 | # undef OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 103 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch | ||
| 107 | * functions must be cast to an appropriate function pointer type. */ | ||
| 108 | #if !defined(OBJC_OLD_DISPATCH_PROTOTYPES) | ||
| 109 | # if __swift__ | ||
| 110 | // Existing Swift code expects IMP to be Comparable. | ||
| 111 | // Variadic IMP is comparable via OpaquePointer; non-variadic IMP isn't. | ||
| 112 | # define OBJC_OLD_DISPATCH_PROTOTYPES 1 | ||
| 113 | # else | ||
| 114 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 115 | # endif | ||
| 116 | #endif | ||
| 117 | |||
| 118 | |||
| 119 | /* OBJC_AVAILABLE: shorthand for all-OS availability */ | ||
| 120 | |||
| 121 | # if !defined(OBJC_AVAILABLE) | ||
| 122 | # define OBJC_AVAILABLE(x, i, t, w, b) \ | ||
| 123 | __OSX_AVAILABLE(x) __IOS_AVAILABLE(i) __TVOS_AVAILABLE(t) \ | ||
| 124 | __WATCHOS_AVAILABLE(w) | ||
| 125 | # endif | ||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | /* OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE: Deprecated on OS X, | ||
| 130 | * unavailable everywhere else. */ | ||
| 131 | |||
| 132 | # if !defined(OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE) | ||
| 133 | # define OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(_start, _dep, _msg) \ | ||
| 134 | __OSX_DEPRECATED(_start, _dep, _msg) \ | ||
| 135 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 136 | __WATCHOS_UNAVAILABLE | ||
| 137 | # endif | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | /* OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE: Available on OS X, | ||
| 142 | * unavailable everywhere else. */ | ||
| 143 | |||
| 144 | # if !defined(OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE) | ||
| 145 | # define OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE(vers) \ | ||
| 146 | __OSX_AVAILABLE(vers) \ | ||
| 147 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 148 | __WATCHOS_UNAVAILABLE | ||
| 149 | # endif | ||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | /* OBJC_ISA_AVAILABILITY: `isa` will be deprecated or unavailable | ||
| 154 | * in the future */ | ||
| 155 | #if !defined(OBJC_ISA_AVAILABILITY) | ||
| 156 | # if __OBJC2__ | ||
| 157 | # define OBJC_ISA_AVAILABILITY __attribute__((deprecated)) | ||
| 158 | # else | ||
| 159 | # define OBJC_ISA_AVAILABILITY /* still available */ | ||
| 160 | # endif | ||
| 161 | #endif | ||
| 162 | |||
| 163 | /* OBJC_UNAVAILABLE: unavailable, with a message where supported */ | ||
| 164 | #if !defined(OBJC_UNAVAILABLE) | ||
| 165 | # if __has_extension(attribute_unavailable_with_message) | ||
| 166 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable(_msg))) | ||
| 167 | # else | ||
| 168 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable)) | ||
| 169 | # endif | ||
| 170 | #endif | ||
| 171 | |||
| 172 | /* OBJC_DEPRECATED: deprecated, with a message where supported */ | ||
| 173 | #if !defined(OBJC_DEPRECATED) | ||
| 174 | # if __has_extension(attribute_deprecated_with_message) | ||
| 175 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated(_msg))) | ||
| 176 | # else | ||
| 177 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated)) | ||
| 178 | # endif | ||
| 179 | #endif | ||
| 180 | |||
| 181 | /* OBJC_ARC_UNAVAILABLE: unavailable with -fobjc-arc */ | ||
| 182 | #if !defined(OBJC_ARC_UNAVAILABLE) | ||
| 183 | # if __has_feature(objc_arc) | ||
| 184 | # define OBJC_ARC_UNAVAILABLE OBJC_UNAVAILABLE("not available in automatic reference counting mode") | ||
| 185 | # else | ||
| 186 | # define OBJC_ARC_UNAVAILABLE | ||
| 187 | # endif | ||
| 188 | #endif | ||
| 189 | |||
| 190 | /* OBJC_SWIFT_UNAVAILABLE: unavailable in Swift */ | ||
| 191 | #if !defined(OBJC_SWIFT_UNAVAILABLE) | ||
| 192 | # if __has_feature(attribute_availability_swift) | ||
| 193 | # define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg))) | ||
| 194 | # else | ||
| 195 | # define OBJC_SWIFT_UNAVAILABLE(_msg) | ||
| 196 | # endif | ||
| 197 | #endif | ||
| 198 | |||
| 199 | /* OBJC_ARM64_UNAVAILABLE: unavailable on arm64 (i.e. stret dispatch) */ | ||
| 200 | #if !defined(OBJC_ARM64_UNAVAILABLE) | ||
| 201 | # if defined(__arm64__) | ||
| 202 | # define OBJC_ARM64_UNAVAILABLE OBJC_UNAVAILABLE("not available in arm64") | ||
| 203 | # else | ||
| 204 | # define OBJC_ARM64_UNAVAILABLE | ||
| 205 | # endif | ||
| 206 | #endif | ||
| 207 | |||
| 208 | /* OBJC_GC_UNAVAILABLE: unavailable with -fobjc-gc or -fobjc-gc-only */ | ||
| 209 | #if !defined(OBJC_GC_UNAVAILABLE) | ||
| 210 | # define OBJC_GC_UNAVAILABLE | ||
| 211 | #endif | ||
| 212 | |||
| 213 | #if !defined(OBJC_EXTERN) | ||
| 214 | # if defined(__cplusplus) | ||
| 215 | # define OBJC_EXTERN extern "C" | ||
| 216 | # else | ||
| 217 | # define OBJC_EXTERN extern | ||
| 218 | # endif | ||
| 219 | #endif | ||
| 220 | |||
| 221 | #if !defined(OBJC_VISIBLE) | ||
| 222 | # if TARGET_OS_WIN32 | ||
| 223 | # if defined(BUILDING_OBJC) | ||
| 224 | # define OBJC_VISIBLE __declspec(dllexport) | ||
| 225 | # else | ||
| 226 | # define OBJC_VISIBLE __declspec(dllimport) | ||
| 227 | # endif | ||
| 228 | # else | ||
| 229 | # define OBJC_VISIBLE __attribute__((visibility("default"))) | ||
| 230 | # endif | ||
| 231 | #endif | ||
| 232 | |||
| 233 | #if !defined(OBJC_EXPORT) | ||
| 234 | # define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE | ||
| 235 | #endif | ||
| 236 | |||
| 237 | #if !defined(OBJC_IMPORT) | ||
| 238 | # define OBJC_IMPORT extern | ||
| 239 | #endif | ||
| 240 | |||
| 241 | #if !defined(OBJC_ROOT_CLASS) | ||
| 242 | # if __has_attribute(objc_root_class) | ||
| 243 | # define OBJC_ROOT_CLASS __attribute__((objc_root_class)) | ||
| 244 | # else | ||
| 245 | # define OBJC_ROOT_CLASS | ||
| 246 | # endif | ||
| 247 | #endif | ||
| 248 | |||
| 249 | #ifndef __DARWIN_NULL | ||
| 250 | #define __DARWIN_NULL NULL | ||
| 251 | #endif | ||
| 252 | |||
| 253 | #if !defined(OBJC_INLINE) | ||
| 254 | # define OBJC_INLINE __inline | ||
| 255 | #endif | ||
| 256 | |||
| 257 | // Declares an enum type or option bits type as appropriate for each language. | ||
| 258 | #if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum)) | ||
| 259 | #define OBJC_ENUM(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 260 | #if (__cplusplus) | ||
| 261 | #define OBJC_OPTIONS(_type, _name) _type _name; enum : _type | ||
| 262 | #else | ||
| 263 | #define OBJC_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 264 | #endif | ||
| 265 | #else | ||
| 266 | #define OBJC_ENUM(_type, _name) _type _name; enum | ||
| 267 | #define OBJC_OPTIONS(_type, _name) _type _name; enum | ||
| 268 | #endif | ||
| 269 | |||
| 270 | #if !defined(OBJC_RETURNS_RETAINED) | ||
| 271 | # if __OBJC__ && __has_attribute(ns_returns_retained) | ||
| 272 | # define OBJC_RETURNS_RETAINED __attribute__((ns_returns_retained)) | ||
| 273 | # else | ||
| 274 | # define OBJC_RETURNS_RETAINED | ||
| 275 | # endif | ||
| 276 | #endif | ||
| 277 | |||
| 278 | /* OBJC_COLD: very rarely called, e.g. on error path */ | ||
| 279 | #if !defined(OBJC_COLD) | ||
| 280 | # if __OBJC__ && __has_attribute(cold) | ||
| 281 | # define OBJC_COLD __attribute__((cold)) | ||
| 282 | # else | ||
| 283 | # define OBJC_COLD | ||
| 284 | # endif | ||
| 285 | #endif | ||
| 286 | |||
| 287 | /* OBJC_NORETURN: does not return normally, but may throw */ | ||
| 288 | #if !defined(OBJC_NORETURN) | ||
| 289 | # if __OBJC__ && __has_attribute(noreturn) | ||
| 290 | # define OBJC_NORETURN __attribute__((noreturn)) | ||
| 291 | # else | ||
| 292 | # define OBJC_NORETURN | ||
| 293 | # endif | ||
| 294 | #endif | ||
| 295 | |||
| 296 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/os/base.h created+328| ... | @@ -0,0 +1,328 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 7 | * you may not use this file except in compliance with the License. | ||
| 8 | * You may obtain a copy of the License at | ||
| 9 | * | ||
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 11 | * | ||
| 12 | * Unless required by applicable law or agreed to in writing, software | ||
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 15 | * See the License for the specific language governing permissions and | ||
| 16 | * limitations under the License. | ||
| 17 | * | ||
| 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __OS_BASE__ | ||
| 22 | #define __OS_BASE__ | ||
| 23 | |||
| 24 | #include <sys/cdefs.h> | ||
| 25 | |||
| 26 | |||
| 27 | #ifndef __has_builtin | ||
| 28 | #define __has_builtin(x) 0 | ||
| 29 | #endif | ||
| 30 | #ifndef __has_include | ||
| 31 | #define __has_include(x) 0 | ||
| 32 | #endif | ||
| 33 | #ifndef __has_feature | ||
| 34 | #define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | #ifndef __has_attribute | ||
| 37 | #define __has_attribute(x) 0 | ||
| 38 | #endif | ||
| 39 | #ifndef __has_extension | ||
| 40 | #define __has_extension(x) 0 | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #undef OS_INLINE // <sys/_types/_os_inline.h> | ||
| 44 | #if __GNUC__ | ||
| 45 | #define OS_NORETURN __attribute__((__noreturn__)) | ||
| 46 | #define OS_NOTHROW __attribute__((__nothrow__)) | ||
| 47 | #define OS_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 48 | #define OS_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 49 | #define OS_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 50 | #define OS_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 51 | #define OS_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 52 | #define OS_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 53 | #define OS_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 54 | #define OS_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 55 | #define OS_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 56 | #define OS_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 57 | #define OS_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 58 | #define OS_NONNULL12 __attribute__((__nonnull__(12))) | ||
| 59 | #define OS_NONNULL13 __attribute__((__nonnull__(13))) | ||
| 60 | #define OS_NONNULL14 __attribute__((__nonnull__(14))) | ||
| 61 | #define OS_NONNULL15 __attribute__((__nonnull__(15))) | ||
| 62 | #define OS_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 63 | #define OS_SENTINEL __attribute__((__sentinel__)) | ||
| 64 | #define OS_PURE __attribute__((__pure__)) | ||
| 65 | #define OS_CONST __attribute__((__const__)) | ||
| 66 | #define OS_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 67 | #define OS_MALLOC __attribute__((__malloc__)) | ||
| 68 | #define OS_USED __attribute__((__used__)) | ||
| 69 | #define OS_UNUSED __attribute__((__unused__)) | ||
| 70 | #define OS_COLD __attribute__((__cold__)) | ||
| 71 | #define OS_WEAK __attribute__((__weak__)) | ||
| 72 | #define OS_WEAK_IMPORT __attribute__((__weak_import__)) | ||
| 73 | #define OS_NOINLINE __attribute__((__noinline__)) | ||
| 74 | #define OS_ALWAYS_INLINE __attribute__((__always_inline__)) | ||
| 75 | #define OS_TRANSPARENT_UNION __attribute__((__transparent_union__)) | ||
| 76 | #define OS_ALIGNED(n) __attribute__((__aligned__((n)))) | ||
| 77 | #define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y))) | ||
| 78 | #define OS_EXPORT extern __attribute__((__visibility__("default"))) | ||
| 79 | #define OS_INLINE static __inline__ | ||
| 80 | #define OS_EXPECT(x, v) __builtin_expect((x), (v)) | ||
| 81 | #else | ||
| 82 | #define OS_NORETURN | ||
| 83 | #define OS_NOTHROW | ||
| 84 | #define OS_NONNULL1 | ||
| 85 | #define OS_NONNULL2 | ||
| 86 | #define OS_NONNULL3 | ||
| 87 | #define OS_NONNULL4 | ||
| 88 | #define OS_NONNULL5 | ||
| 89 | #define OS_NONNULL6 | ||
| 90 | #define OS_NONNULL7 | ||
| 91 | #define OS_NONNULL8 | ||
| 92 | #define OS_NONNULL9 | ||
| 93 | #define OS_NONNULL10 | ||
| 94 | #define OS_NONNULL11 | ||
| 95 | #define OS_NONNULL12 | ||
| 96 | #define OS_NONNULL13 | ||
| 97 | #define OS_NONNULL14 | ||
| 98 | #define OS_NONNULL15 | ||
| 99 | #define OS_NONNULL_ALL | ||
| 100 | #define OS_SENTINEL | ||
| 101 | #define OS_PURE | ||
| 102 | #define OS_CONST | ||
| 103 | #define OS_WARN_RESULT | ||
| 104 | #define OS_MALLOC | ||
| 105 | #define OS_USED | ||
| 106 | #define OS_UNUSED | ||
| 107 | #define OS_COLD | ||
| 108 | #define OS_WEAK | ||
| 109 | #define OS_WEAK_IMPORT | ||
| 110 | #define OS_NOINLINE | ||
| 111 | #define OS_ALWAYS_INLINE | ||
| 112 | #define OS_TRANSPARENT_UNION | ||
| 113 | #define OS_ALIGNED(n) | ||
| 114 | #define OS_FORMAT_PRINTF(x, y) | ||
| 115 | #define OS_EXPORT extern | ||
| 116 | #define OS_INLINE static inline | ||
| 117 | #define OS_EXPECT(x, v) (x) | ||
| 118 | #endif | ||
| 119 | |||
| 120 | #if __has_attribute(noescape) | ||
| 121 | #define OS_NOESCAPE __attribute__((__noescape__)) | ||
| 122 | #else | ||
| 123 | #define OS_NOESCAPE | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #if defined(__cplusplus) && defined(__clang__) | ||
| 127 | #define OS_FALLTHROUGH [[clang::fallthrough]] | ||
| 128 | #elif __has_attribute(fallthrough) | ||
| 129 | #define OS_FALLTHROUGH __attribute__((__fallthrough__)) | ||
| 130 | #else | ||
| 131 | #define OS_FALLTHROUGH | ||
| 132 | #endif | ||
| 133 | |||
| 134 | #if __has_feature(assume_nonnull) | ||
| 135 | #define OS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 136 | #define OS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 137 | #else | ||
| 138 | #define OS_ASSUME_NONNULL_BEGIN | ||
| 139 | #define OS_ASSUME_NONNULL_END | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #if __has_builtin(__builtin_assume) | ||
| 143 | #define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | ||
| 144 | #else | ||
| 145 | #define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | ||
| 146 | #endif | ||
| 147 | |||
| 148 | #if __has_extension(attribute_overloadable) | ||
| 149 | #define OS_OVERLOADABLE __attribute__((__overloadable__)) | ||
| 150 | #else | ||
| 151 | #define OS_OVERLOADABLE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #if __has_attribute(analyzer_suppress) | ||
| 155 | #define OS_ANALYZER_SUPPRESS(RADAR) __attribute__((analyzer_suppress)) | ||
| 156 | #else | ||
| 157 | #define OS_ANALYZER_SUPPRESS(RADAR) | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #if __has_attribute(enum_extensibility) | ||
| 161 | #define __OS_ENUM_ATTR __attribute__((enum_extensibility(open))) | ||
| 162 | #define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed))) | ||
| 163 | #else | ||
| 164 | #define __OS_ENUM_ATTR | ||
| 165 | #define __OS_ENUM_ATTR_CLOSED | ||
| 166 | #endif // __has_attribute(enum_extensibility) | ||
| 167 | |||
| 168 | #if __has_attribute(flag_enum) | ||
| 169 | /*! | ||
| 170 | * Compile with -Wflag-enum and -Wassign-enum to enforce at definition and | ||
| 171 | * assignment, respectively, i.e. -Wflag-enum prevents you from creating new | ||
| 172 | * enumeration values from illegal values within the enum definition, and | ||
| 173 | * -Wassign-enum prevents you from assigning illegal values to a variable of the | ||
| 174 | * enum type. | ||
| 175 | */ | ||
| 176 | #define __OS_OPTIONS_ATTR __attribute__((flag_enum)) | ||
| 177 | #else | ||
| 178 | #define __OS_OPTIONS_ATTR | ||
| 179 | #endif // __has_attribute(flag_enum) | ||
| 180 | |||
| 181 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \ | ||
| 182 | __has_extension(cxx_strong_enums) | ||
| 183 | #define OS_ENUM(_name, _type, ...) \ | ||
| 184 | 	typedef enum : _type { __VA_ARGS__ } _name##_t | ||
| 185 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 186 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t | ||
| 187 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 188 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t | ||
| 189 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 190 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t | ||
| 191 | #else | ||
| 192 | /*! | ||
| 193 | * There is unfortunately no good way in plain C to have both fixed-type enums | ||
| 194 | * and enforcement for clang's enum_extensibility extensions. The primary goal | ||
| 195 | * of these macros is to allow you to define an enum and specify its width in a | ||
| 196 | * single statement, and for plain C that is accomplished by defining an | ||
| 197 | * anonymous enum and then separately typedef'ing the requested type name to the | ||
| 198 | * requested underlying integer type. So the type emitted actually has no | ||
| 199 | * relationship at all to the enum, and therefore while the compiler could | ||
| 200 | * enforce enum extensibility if you used the enum type, it cannot do so if you | ||
| 201 | * use the "_t" type resulting from this expression. | ||
| 202 | * | ||
| 203 | * But we still define a named enum type and decorate it appropriately for you, | ||
| 204 | * so if you really want the enum extensibility enforcement, you can use the | ||
| 205 | * enum type yourself, i.e. when compiling with a C compiler: | ||
| 206 | * | ||
| 207 | * OS_CLOSED_ENUM(my_type, uint64_t, | ||
| 208 | * FOO, | ||
| 209 | * BAR, | ||
| 210 | * BAZ, | ||
| 211 | * ); | ||
| 212 | * | ||
| 213 | * my_type_t mt = 98; // legal | ||
| 214 | * enum my_type emt = 98; // illegal | ||
| 215 | * | ||
| 216 | * But be aware that the underlying enum type's width is subject only to the C | ||
| 217 | * language's guarantees -- namely that it will be compatible with int, char, | ||
| 218 | * and unsigned char. It is not safe to rely on the size of this type. | ||
| 219 | * | ||
| 220 | * When compiling in ObjC or C++, both of the above assignments are illegal. | ||
| 221 | */ | ||
| 222 | #define __OS_ENUM_C_FALLBACK(_name, _type, ...) \ | ||
| 223 | 	typedef _type _name##_t; enum _name { __VA_ARGS__ } | ||
| 224 | |||
| 225 | #define OS_ENUM(_name, _type, ...) \ | ||
| 226 | 	typedef _type _name##_t; enum { __VA_ARGS__ } | ||
| 227 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 228 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 229 | 	__OS_ENUM_ATTR_CLOSED | ||
| 230 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 231 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 232 | 	__OS_ENUM_ATTR __OS_OPTIONS_ATTR | ||
| 233 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 234 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 235 | 	__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR | ||
| 236 | #endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) | ||
| 237 | |||
| 238 | #if __has_feature(attribute_availability_swift) | ||
| 239 | // equivalent to __SWIFT_UNAVAILABLE from Availability.h | ||
| 240 | #define OS_SWIFT_UNAVAILABLE(_msg) \ | ||
| 241 | 	__attribute__((__availability__(swift, unavailable, message=_msg))) | ||
| 242 | #else | ||
| 243 | #define OS_SWIFT_UNAVAILABLE(_msg) | ||
| 244 | #endif | ||
| 245 | |||
| 246 | #if __has_attribute(swift_private) | ||
| 247 | # define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | ||
| 248 | #else | ||
| 249 | # define OS_REFINED_FOR_SWIFT | ||
| 250 | #endif | ||
| 251 | |||
| 252 | #if __has_attribute(swift_name) | ||
| 253 | # define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | ||
| 254 | #else | ||
| 255 | # define OS_SWIFT_NAME(_name) | ||
| 256 | #endif | ||
| 257 | |||
| 258 | #define __OS_STRINGIFY(s) #s | ||
| 259 | #define OS_STRINGIFY(s) __OS_STRINGIFY(s) | ||
| 260 | #define __OS_CONCAT(x, y) x ## y | ||
| 261 | #define OS_CONCAT(x, y) __OS_CONCAT(x, y) | ||
| 262 | |||
| 263 | #ifdef __GNUC__ | ||
| 264 | #define os_prevent_tail_call_optimization() __asm__("") | ||
| 265 | #define os_is_compile_time_constant(expr) __builtin_constant_p(expr) | ||
| 266 | #define os_compiler_barrier() __asm__ __volatile__("" ::: "memory") | ||
| 267 | #else | ||
| 268 | #define os_prevent_tail_call_optimization() do { } while (0) | ||
| 269 | #define os_is_compile_time_constant(expr) 0 | ||
| 270 | #define os_compiler_barrier() do { } while (0) | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #if __has_attribute(not_tail_called) | ||
| 274 | #define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | ||
| 275 | #else | ||
| 276 | #define OS_NOT_TAIL_CALLED | ||
| 277 | #endif | ||
| 278 | |||
| 279 | |||
| 280 | typedef void (*os_function_t)(void *_Nullable); | ||
| 281 | |||
| 282 | #ifdef __BLOCKS__ | ||
| 283 | /*! | ||
| 284 | * @typedef os_block_t | ||
| 285 | * | ||
| 286 | * @abstract | ||
| 287 | * Generic type for a block taking no arguments and returning no value. | ||
| 288 | * | ||
| 289 | * @discussion | ||
| 290 | * When not building with Objective-C ARC, a block object allocated on or | ||
| 291 | * copied to the heap must be released with a -[release] message or the | ||
| 292 | * Block_release() function. | ||
| 293 | * | ||
| 294 | * The declaration of a block literal allocates storage on the stack. | ||
| 295 | * Therefore, this is an invalid construct: | ||
| 296 | * <code> | ||
| 297 | * os_block_t block; | ||
| 298 | * if (x) { | ||
| 299 | * block = ^{ printf("true\n"); }; | ||
| 300 | * } else { | ||
| 301 | * block = ^{ printf("false\n"); }; | ||
| 302 | * } | ||
| 303 | * block(); // unsafe!!! | ||
| 304 | * </code> | ||
| 305 | * | ||
| 306 | * What is happening behind the scenes: | ||
| 307 | * <code> | ||
| 308 | * if (x) { | ||
| 309 | * struct Block __tmp_1 = ...; // setup details | ||
| 310 | * block = &__tmp_1; | ||
| 311 | * } else { | ||
| 312 | * struct Block __tmp_2 = ...; // setup details | ||
| 313 | * block = &__tmp_2; | ||
| 314 | * } | ||
| 315 | * </code> | ||
| 316 | * | ||
| 317 | * As the example demonstrates, the address of a stack variable is escaping the | ||
| 318 | * scope in which it is allocated. That is a classic C bug. | ||
| 319 | * | ||
| 320 | * Instead, the block literal must be copied to the heap with the Block_copy() | ||
| 321 | * function or by sending it a -[copy] message. | ||
| 322 | */ | ||
| 323 | typedef void (^os_block_t)(void); | ||
| 324 | #endif | ||
| 325 | |||
| 326 | |||
| 327 | |||
| 328 | #endif // __OS_BASE__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/pthread.h created+727| ... | @@ -0,0 +1,727 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2012 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 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991 | ||
| 25 | * All Rights Reserved | ||
| 26 | * | ||
| 27 | * Permission to use, copy, modify, and distribute this software and | ||
| 28 | * its documentation for any purpose and without fee is hereby granted, | ||
| 29 | * provided that the above copyright notice appears in all copies and | ||
| 30 | * that both the copyright notice and this permission notice appear in | ||
| 31 | * supporting documentation. | ||
| 32 | * | ||
| 33 | * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE | ||
| 34 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 35 | * FOR A PARTICULAR PURPOSE. | ||
| 36 | * | ||
| 37 | * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR | ||
| 38 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| 39 | * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, | ||
| 40 | * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION | ||
| 41 | * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | */ | ||
| 44 | /* | ||
| 45 | * MkLinux | ||
| 46 | */ | ||
| 47 | |||
| 48 | /* | ||
| 49 | * POSIX Threads - IEEE 1003.1c | ||
| 50 | */ | ||
| 51 | |||
| 52 | #ifndef _PTHREAD_H | ||
| 53 | #define _PTHREAD_H | ||
| 54 | |||
| 55 | #include <_types.h> | ||
| 56 | #include <pthread/sched.h> | ||
| 57 | #include <time.h> | ||
| 58 | #include <sys/_pthread/_pthread_types.h> | ||
| 59 | #include <sys/_pthread/_pthread_attr_t.h> | ||
| 60 | #include <sys/_pthread/_pthread_cond_t.h> | ||
| 61 | #include <sys/_pthread/_pthread_condattr_t.h> | ||
| 62 | #include <sys/_pthread/_pthread_key_t.h> | ||
| 63 | #include <sys/_pthread/_pthread_mutex_t.h> | ||
| 64 | #include <sys/_pthread/_pthread_mutexattr_t.h> | ||
| 65 | #include <sys/_pthread/_pthread_once_t.h> | ||
| 66 | #include <sys/_pthread/_pthread_rwlock_t.h> | ||
| 67 | #include <sys/_pthread/_pthread_rwlockattr_t.h> | ||
| 68 | #include <sys/_pthread/_pthread_t.h> | ||
| 69 | |||
| 70 | #include <pthread/qos.h> | ||
| 71 | |||
| 72 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 73 | |||
| 74 | #include <sys/_types/_mach_port_t.h> | ||
| 75 | #include <sys/_types/_sigset_t.h> | ||
| 76 | |||
| 77 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 78 | |||
| 79 | /* | ||
| 80 | * These symbols indicate which [optional] features are available | ||
| 81 | * They can be tested at compile time via '#ifdef XXX' | ||
| 82 | * The way to check for pthreads is like so: | ||
| 83 | |||
| 84 | * #include <unistd.h> | ||
| 85 | * #ifdef _POSIX_THREADS | ||
| 86 | * #include <pthread.h> | ||
| 87 | * #endif | ||
| 88 | |||
| 89 | */ | ||
| 90 | |||
| 91 | /* These will be moved to unistd.h */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Note: These data structures are meant to be opaque. Only enough | ||
| 95 | * structure is exposed to support initializers. | ||
| 96 | * All of the typedefs will be moved to <sys/types.h> | ||
| 97 | */ | ||
| 98 | |||
| 99 | #include <sys/cdefs.h> | ||
| 100 | #include <Availability.h> | ||
| 101 | |||
| 102 | #if __has_feature(assume_nonnull) | ||
| 103 | _Pragma("clang assume_nonnull begin") | ||
| 104 | #endif | ||
| 105 | __BEGIN_DECLS | ||
| 106 | /* | ||
| 107 | * Threads | ||
| 108 | */ | ||
| 109 | |||
| 110 | |||
| 111 | /* | ||
| 112 | * Cancel cleanup handler management. Note, since these are implemented as macros, | ||
| 113 | * they *MUST* occur in matched pairs! | ||
| 114 | */ | ||
| 115 | |||
| 116 | #define pthread_cleanup_push(func, val) \ | ||
| 117 | { \ | ||
| 118 | 	 struct __darwin_pthread_handler_rec __handler; \ | ||
| 119 | 	 pthread_t __self = pthread_self(); \ | ||
| 120 | 	 __handler.__routine = func; \ | ||
| 121 | 	 __handler.__arg = val; \ | ||
| 122 | 	 __handler.__next = __self->__cleanup_stack; \ | ||
| 123 | 	 __self->__cleanup_stack = &__handler; | ||
| 124 | |||
| 125 | #define pthread_cleanup_pop(execute) \ | ||
| 126 | 	 /* Note: 'handler' must be in this same lexical context! */ \ | ||
| 127 | 	 __self->__cleanup_stack = __handler.__next; \ | ||
| 128 | 	 if (execute) (__handler.__routine)(__handler.__arg); \ | ||
| 129 | } | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Thread attributes | ||
| 133 | */ | ||
| 134 | |||
| 135 | #define PTHREAD_CREATE_JOINABLE 1 | ||
| 136 | #define PTHREAD_CREATE_DETACHED 2 | ||
| 137 | |||
| 138 | #define PTHREAD_INHERIT_SCHED 1 | ||
| 139 | #define PTHREAD_EXPLICIT_SCHED 2 | ||
| 140 | |||
| 141 | #define PTHREAD_CANCEL_ENABLE 0x01 /* Cancel takes place at next cancellation point */ | ||
| 142 | #define PTHREAD_CANCEL_DISABLE 0x00 /* Cancel postponed */ | ||
| 143 | #define PTHREAD_CANCEL_DEFERRED 0x02 /* Cancel waits until cancellation point */ | ||
| 144 | #define PTHREAD_CANCEL_ASYNCHRONOUS 0x00 /* Cancel occurs immediately */ | ||
| 145 | |||
| 146 | /* Value returned from pthread_join() when a thread is canceled */ | ||
| 147 | #define PTHREAD_CANCELED	 ((void *) 1) | ||
| 148 | |||
| 149 | /* We only support PTHREAD_SCOPE_SYSTEM */ | ||
| 150 | #define PTHREAD_SCOPE_SYSTEM 1 | ||
| 151 | #define PTHREAD_SCOPE_PROCESS 2 | ||
| 152 | |||
| 153 | #define PTHREAD_PROCESS_SHARED 1 | ||
| 154 | #define PTHREAD_PROCESS_PRIVATE 2 | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Mutex protocol attributes | ||
| 158 | */ | ||
| 159 | #define PTHREAD_PRIO_NONE 0 | ||
| 160 | #define PTHREAD_PRIO_INHERIT 1 | ||
| 161 | #define PTHREAD_PRIO_PROTECT 2 | ||
| 162 | |||
| 163 | /* | ||
| 164 | * Mutex type attributes | ||
| 165 | */ | ||
| 166 | #define PTHREAD_MUTEX_NORMAL		0 | ||
| 167 | #define PTHREAD_MUTEX_ERRORCHECK	1 | ||
| 168 | #define PTHREAD_MUTEX_RECURSIVE		2 | ||
| 169 | #define PTHREAD_MUTEX_DEFAULT		PTHREAD_MUTEX_NORMAL | ||
| 170 | |||
| 171 | /* | ||
| 172 | * Mutex policy attributes | ||
| 173 | */ | ||
| 174 | #define PTHREAD_MUTEX_POLICY_FAIRSHARE_NP 1 | ||
| 175 | #define PTHREAD_MUTEX_POLICY_FIRSTFIT_NP 3 | ||
| 176 | |||
| 177 | /* | ||
| 178 | * RWLock variables | ||
| 179 | */ | ||
| 180 | #define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWLOCK_SIG_init, {0}} | ||
| 181 | |||
| 182 | /* | ||
| 183 | * Mutex variables | ||
| 184 | */ | ||
| 185 | #define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}} | ||
| 186 | |||
| 187 | /* <rdar://problem/10854763> */ | ||
| 188 | #if ((__MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) | ||
| 189 | #	if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) | ||
| 190 | #		define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {_PTHREAD_ERRORCHECK_MUTEX_SIG_init, {0}} | ||
| 191 | #		define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {_PTHREAD_RECURSIVE_MUTEX_SIG_init, {0}} | ||
| 192 | #	endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ | ||
| 193 | #endif | ||
| 194 | |||
| 195 | /* <rdar://problem/25944576> */ | ||
| 196 | #define _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT \ | ||
| 197 | 	defined(SWIFT_CLASS_EXTRA) && (!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH < 1)) | ||
| 198 | |||
| 199 | /* | ||
| 200 | * Condition variable attributes | ||
| 201 | */ | ||
| 202 | |||
| 203 | /* | ||
| 204 | * Condition variables | ||
| 205 | */ | ||
| 206 | |||
| 207 | #define PTHREAD_COND_INITIALIZER {_PTHREAD_COND_SIG_init, {0}} | ||
| 208 | |||
| 209 | /* | ||
| 210 | * Initialization control (once) variables | ||
| 211 | */ | ||
| 212 | |||
| 213 | #define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}} | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Prototypes for all PTHREAD interfaces | ||
| 217 | */ | ||
| 218 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 219 | int pthread_atfork(void (* _Nullable)(void), void (* _Nullable)(void), | ||
| 220 | 		void (* _Nullable)(void)); | ||
| 221 | |||
| 222 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 223 | int pthread_attr_destroy(pthread_attr_t *); | ||
| 224 | |||
| 225 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 226 | int pthread_attr_getdetachstate(const pthread_attr_t *, int *); | ||
| 227 | |||
| 228 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 229 | int pthread_attr_getguardsize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 230 | |||
| 231 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 232 | int pthread_attr_getinheritsched(const pthread_attr_t * __restrict, int * __restrict); | ||
| 233 | |||
| 234 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 235 | int pthread_attr_getschedparam(const pthread_attr_t * __restrict, | ||
| 236 | 		struct sched_param * __restrict); | ||
| 237 | |||
| 238 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 239 | int pthread_attr_getschedpolicy(const pthread_attr_t * __restrict, int * __restrict); | ||
| 240 | |||
| 241 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 242 | int pthread_attr_getscope(const pthread_attr_t * __restrict, int * __restrict); | ||
| 243 | |||
| 244 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 245 | int pthread_attr_getstack(const pthread_attr_t * __restrict, | ||
| 246 | 		void * _Nullable * _Nonnull __restrict, size_t * __restrict); | ||
| 247 | |||
| 248 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 249 | int pthread_attr_getstackaddr(const pthread_attr_t * __restrict, | ||
| 250 | 		void * _Nullable * _Nonnull __restrict); | ||
| 251 | |||
| 252 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 253 | int pthread_attr_getstacksize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 254 | |||
| 255 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 256 | int pthread_attr_init(pthread_attr_t *); | ||
| 257 | |||
| 258 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 259 | int pthread_attr_setdetachstate(pthread_attr_t *, int); | ||
| 260 | |||
| 261 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 262 | int pthread_attr_setguardsize(pthread_attr_t *, size_t); | ||
| 263 | |||
| 264 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 265 | int pthread_attr_setinheritsched(pthread_attr_t *, int); | ||
| 266 | |||
| 267 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 268 | int pthread_attr_setschedparam(pthread_attr_t * __restrict, | ||
| 269 | 		const struct sched_param * __restrict); | ||
| 270 | |||
| 271 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 272 | int pthread_attr_setschedpolicy(pthread_attr_t *, int); | ||
| 273 | |||
| 274 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 275 | int pthread_attr_setscope(pthread_attr_t *, int); | ||
| 276 | |||
| 277 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 278 | int pthread_attr_setstack(pthread_attr_t *, void *, size_t); | ||
| 279 | |||
| 280 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 281 | int pthread_attr_setstackaddr(pthread_attr_t *, void *); | ||
| 282 | |||
| 283 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 284 | int pthread_attr_setstacksize(pthread_attr_t *, size_t); | ||
| 285 | |||
| 286 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 287 | int pthread_cancel(pthread_t) __DARWIN_ALIAS(pthread_cancel); | ||
| 288 | |||
| 289 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 290 | int pthread_cond_broadcast(pthread_cond_t *); | ||
| 291 | |||
| 292 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 293 | int pthread_cond_destroy(pthread_cond_t *); | ||
| 294 | |||
| 295 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 296 | int pthread_cond_init( | ||
| 297 | 		pthread_cond_t * __restrict, | ||
| 298 | 		const pthread_condattr_t * _Nullable __restrict) | ||
| 299 | 		__DARWIN_ALIAS(pthread_cond_init); | ||
| 300 | |||
| 301 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 302 | int pthread_cond_signal(pthread_cond_t *); | ||
| 303 | |||
| 304 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 305 | int pthread_cond_timedwait( | ||
| 306 | 		pthread_cond_t * __restrict, pthread_mutex_t * __restrict, | ||
| 307 | 		const struct timespec * _Nullable __restrict) | ||
| 308 | 		__DARWIN_ALIAS_C(pthread_cond_timedwait); | ||
| 309 | |||
| 310 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 311 | int pthread_cond_wait(pthread_cond_t * __restrict, | ||
| 312 | 		pthread_mutex_t * __restrict) __DARWIN_ALIAS_C(pthread_cond_wait); | ||
| 313 | |||
| 314 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 315 | int pthread_condattr_destroy(pthread_condattr_t *); | ||
| 316 | |||
| 317 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 318 | int pthread_condattr_init(pthread_condattr_t *); | ||
| 319 | |||
| 320 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 321 | int pthread_condattr_getpshared(const pthread_condattr_t * __restrict, | ||
| 322 | 		int * __restrict); | ||
| 323 | |||
| 324 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 325 | int pthread_condattr_setpshared(pthread_condattr_t *, int); | ||
| 326 | |||
| 327 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 328 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 329 | int pthread_create(pthread_t _Nullable * _Nonnull __restrict, | ||
| 330 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 331 | 		void * _Nullable (* _Nonnull)(void * _Nullable), | ||
| 332 | 		void * _Nullable __restrict); | ||
| 333 | #else | ||
| 334 | int pthread_create(pthread_t * __restrict, | ||
| 335 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 336 | 		void *(* _Nonnull)(void *), void * _Nullable __restrict); | ||
| 337 | #endif // _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 338 | |||
| 339 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 340 | int pthread_detach(pthread_t); | ||
| 341 | |||
| 342 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 343 | int pthread_equal(pthread_t _Nullable, pthread_t _Nullable); | ||
| 344 | |||
| 345 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 346 | void pthread_exit(void * _Nullable) __dead2; | ||
| 347 | |||
| 348 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 349 | int pthread_getconcurrency(void); | ||
| 350 | |||
| 351 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 352 | int pthread_getschedparam(pthread_t , int * _Nullable __restrict, | ||
| 353 | 		struct sched_param * _Nullable __restrict); | ||
| 354 | |||
| 355 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 356 | void* _Nullable pthread_getspecific(pthread_key_t); | ||
| 357 | |||
| 358 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 359 | int pthread_join(pthread_t , void * _Nullable * _Nullable) | ||
| 360 | 		__DARWIN_ALIAS_C(pthread_join); | ||
| 361 | |||
| 362 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 363 | int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *)); | ||
| 364 | |||
| 365 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 366 | int pthread_key_delete(pthread_key_t); | ||
| 367 | |||
| 368 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 369 | int pthread_mutex_destroy(pthread_mutex_t *); | ||
| 370 | |||
| 371 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 372 | int pthread_mutex_getprioceiling(const pthread_mutex_t * __restrict, | ||
| 373 | 		int * __restrict); | ||
| 374 | |||
| 375 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 376 | int pthread_mutex_init(pthread_mutex_t * __restrict, | ||
| 377 | 		const pthread_mutexattr_t * _Nullable __restrict); | ||
| 378 | |||
| 379 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 380 | int pthread_mutex_lock(pthread_mutex_t *); | ||
| 381 | |||
| 382 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 383 | int pthread_mutex_setprioceiling(pthread_mutex_t * __restrict, int, | ||
| 384 | 		int * __restrict); | ||
| 385 | |||
| 386 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 387 | int pthread_mutex_trylock(pthread_mutex_t *); | ||
| 388 | |||
| 389 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 390 | int pthread_mutex_unlock(pthread_mutex_t *); | ||
| 391 | |||
| 392 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 393 | int pthread_mutexattr_destroy(pthread_mutexattr_t *) __DARWIN_ALIAS(pthread_mutexattr_destroy); | ||
| 394 | |||
| 395 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 396 | int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t * __restrict, | ||
| 397 | 		int * __restrict); | ||
| 398 | |||
| 399 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 400 | int pthread_mutexattr_getprotocol(const pthread_mutexattr_t * __restrict, | ||
| 401 | 		int * __restrict); | ||
| 402 | |||
| 403 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 404 | int pthread_mutexattr_getpshared(const pthread_mutexattr_t * __restrict, | ||
| 405 | 		int * __restrict); | ||
| 406 | |||
| 407 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 408 | int pthread_mutexattr_gettype(const pthread_mutexattr_t * __restrict, | ||
| 409 | 		int * __restrict); | ||
| 410 | |||
| 411 | __API_AVAILABLE(macos(10.13.4), ios(11.3), watchos(4.3), tvos(11.3)) | ||
| 412 | int pthread_mutexattr_getpolicy_np(const pthread_mutexattr_t * __restrict, | ||
| 413 | 		int * __restrict); | ||
| 414 | |||
| 415 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 416 | int pthread_mutexattr_init(pthread_mutexattr_t *); | ||
| 417 | |||
| 418 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 419 | int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int); | ||
| 420 | |||
| 421 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 422 | int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int); | ||
| 423 | |||
| 424 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 425 | int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); | ||
| 426 | |||
| 427 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 428 | int pthread_mutexattr_settype(pthread_mutexattr_t *, int); | ||
| 429 | |||
| 430 | __API_AVAILABLE(macos(10.7), ios(5.0)) | ||
| 431 | int pthread_mutexattr_setpolicy_np(pthread_mutexattr_t *, int); | ||
| 432 | |||
| 433 | __SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead") | ||
| 434 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 435 | int pthread_once(pthread_once_t *, void (* _Nonnull)(void)); | ||
| 436 | |||
| 437 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 438 | int pthread_rwlock_destroy(pthread_rwlock_t * ) __DARWIN_ALIAS(pthread_rwlock_destroy); | ||
| 439 | |||
| 440 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 441 | int pthread_rwlock_init(pthread_rwlock_t * __restrict, | ||
| 442 | 		const pthread_rwlockattr_t * _Nullable __restrict) | ||
| 443 | 		__DARWIN_ALIAS(pthread_rwlock_init); | ||
| 444 | |||
| 445 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 446 | int pthread_rwlock_rdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_rdlock); | ||
| 447 | |||
| 448 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 449 | int pthread_rwlock_tryrdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_tryrdlock); | ||
| 450 | |||
| 451 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 452 | int pthread_rwlock_trywrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_trywrlock); | ||
| 453 | |||
| 454 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 455 | int pthread_rwlock_wrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_wrlock); | ||
| 456 | |||
| 457 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 458 | int pthread_rwlock_unlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_unlock); | ||
| 459 | |||
| 460 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 461 | int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); | ||
| 462 | |||
| 463 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 464 | int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t * __restrict, | ||
| 465 | 		int * __restrict); | ||
| 466 | |||
| 467 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 468 | int pthread_rwlockattr_init(pthread_rwlockattr_t *); | ||
| 469 | |||
| 470 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 471 | int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); | ||
| 472 | |||
| 473 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 474 | pthread_t pthread_self(void); | ||
| 475 | |||
| 476 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 477 | int pthread_setcancelstate(int , int * _Nullable) | ||
| 478 | 		__DARWIN_ALIAS(pthread_setcancelstate); | ||
| 479 | |||
| 480 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 481 | int pthread_setcanceltype(int , int * _Nullable) | ||
| 482 | 		__DARWIN_ALIAS(pthread_setcanceltype); | ||
| 483 | |||
| 484 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 485 | int pthread_setconcurrency(int); | ||
| 486 | |||
| 487 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 488 | int pthread_setschedparam(pthread_t, int, const struct sched_param *); | ||
| 489 | |||
| 490 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 491 | int pthread_setspecific(pthread_key_t , const void * _Nullable); | ||
| 492 | |||
| 493 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 494 | void pthread_testcancel(void) __DARWIN_ALIAS(pthread_testcancel); | ||
| 495 | |||
| 496 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 497 | |||
| 498 | /* returns non-zero if pthread_create or cthread_fork have been called */ | ||
| 499 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 500 | int pthread_is_threaded_np(void); | ||
| 501 | |||
| 502 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 503 | int pthread_threadid_np(pthread_t _Nullable,__uint64_t* _Nullable); | ||
| 504 | |||
| 505 | /*SPI to set and get pthread name*/ | ||
| 506 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 507 | int	pthread_getname_np(pthread_t,char*,size_t); | ||
| 508 | |||
| 509 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 510 | int	pthread_setname_np(const char*); | ||
| 511 | |||
| 512 | /* returns non-zero if the current thread is the main thread */ | ||
| 513 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 514 | int	pthread_main_np(void); | ||
| 515 | |||
| 516 | /* return the mach thread bound to the pthread */ | ||
| 517 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 518 | mach_port_t pthread_mach_thread_np(pthread_t); | ||
| 519 | |||
| 520 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 521 | size_t pthread_get_stacksize_np(pthread_t); | ||
| 522 | |||
| 523 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 524 | void* pthread_get_stackaddr_np(pthread_t); | ||
| 525 | |||
| 526 | /* Like pthread_cond_signal(), but only wake up the specified pthread */ | ||
| 527 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 528 | int pthread_cond_signal_thread_np(pthread_cond_t *, pthread_t _Nullable); | ||
| 529 | |||
| 530 | /* Like pthread_cond_timedwait, but use a relative timeout */ | ||
| 531 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 532 | int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *, | ||
| 533 | 		const struct timespec * _Nullable); | ||
| 534 | |||
| 535 | /* Like pthread_create(), but leaves the thread suspended */ | ||
| 536 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 537 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 538 | int pthread_create_suspended_np( | ||
| 539 | 		pthread_t _Nullable * _Nonnull, const pthread_attr_t * _Nullable, | ||
| 540 | 		void * _Nullable (* _Nonnull)(void * _Nullable), void * _Nullable); | ||
| 541 | #else | ||
| 542 | int pthread_create_suspended_np(pthread_t *, const pthread_attr_t * _Nullable, | ||
| 543 | 		void *(* _Nonnull)(void *), void * _Nullable); | ||
| 544 | #endif | ||
| 545 | |||
| 546 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 547 | int pthread_kill(pthread_t, int); | ||
| 548 | |||
| 549 | __API_AVAILABLE(macos(10.5), ios(2.0)) | ||
| 550 | _Nullable pthread_t pthread_from_mach_thread_np(mach_port_t); | ||
| 551 | |||
| 552 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 553 | int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable) | ||
| 554 | 		__DARWIN_ALIAS(pthread_sigmask); | ||
| 555 | |||
| 556 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 557 | void pthread_yield_np(void); | ||
| 558 | |||
| 559 | __API_AVAILABLE(macos(11.0)) | ||
| 560 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 561 | void pthread_jit_write_protect_np(int enabled); | ||
| 562 | |||
| 563 | __API_AVAILABLE(macos(11.0)) | ||
| 564 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 565 | int pthread_jit_write_protect_supported_np(void); | ||
| 566 | |||
| 567 | /*! | ||
| 568 | * @typedef pthread_jit_write_callback_t | ||
| 569 | * The type of a function that can be supplied to {@link | ||
| 570 | * pthread_jit_write_with_callback_np} to write to the MAP_JIT region while it | ||
| 571 | * is writeable. | ||
| 572 | * | ||
| 573 | * @param ctx | ||
| 574 | * A pointer to context that will be passed through to the callback function. | ||
| 575 | * | ||
| 576 | * @result | ||
| 577 | * A result code to be returned to the caller of @{link | ||
| 578 | * pthread_jit_write_with_callback_np}. The system does not interpret/act on | ||
| 579 | * the value of this result. | ||
| 580 | */ | ||
| 581 | typedef int (*pthread_jit_write_callback_t)(void * _Nullable ctx); | ||
| 582 | |||
| 583 | /*! | ||
| 584 | * @define PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP | ||
| 585 | * A macro to be used at file scope to list the functions allowed to be passed | ||
| 586 | * to {@link pthread_jit_write_with_callback_np} to write to the MAP_JIT region | ||
| 587 | * while it is writeable. It may be invoked only once per executable/library. | ||
| 588 | * | ||
| 589 | * @param callbacks | ||
| 590 | * The pthread_jit_write_callback_t functions to allow. They should be supplied | ||
| 591 | * as a comma-delimited list. | ||
| 592 | */ | ||
| 593 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__OBJC__) || defined(__cplusplus) | ||
| 594 | #define PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP(...) \ | ||
| 595 | 		__attribute__((__used__, __section__("__DATA_CONST,__pth_jit_func"))) \ | ||
| 596 | 		static const pthread_jit_write_callback_t __pthread_jit_write_callback_allowlist[] = { \ | ||
| 597 | 			__VA_ARGS__, NULL \ | ||
| 598 | 		} | ||
| 599 | #endif /* (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__OBJC__) || defined(__cplusplus) */ | ||
| 600 | |||
| 601 | /*! | ||
| 602 | * @function pthread_jit_write_with_callback_np | ||
| 603 | * | ||
| 604 | * @abstract | ||
| 605 | * Toggles per-thread write-protection of the MAP_JIT region to writeable, | ||
| 606 | * invokes an allowed callback function to write to it, and toggles protection | ||
| 607 | * back to executable. | ||
| 608 | * | ||
| 609 | * @param callback | ||
| 610 | * The callback function to invoke to write to the MAP_JIT region. It must be | ||
| 611 | * statically allowed using {@link PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP}. | ||
| 612 | * | ||
| 613 | * @param ctx | ||
| 614 | * Context to pass through to the invocation of the callback function. | ||
| 615 | * | ||
| 616 | * @result | ||
| 617 | * The result code returned by the callback function. | ||
| 618 | * | ||
| 619 | * @discussion | ||
| 620 | * This function assumes that the MAP_JIT region has executable protection when | ||
| 621 | * called. It is therefore invalid to call it recursively from within a write | ||
| 622 | * callback. The implementation does not detect such invalid recursive calls, | ||
| 623 | * so the client is responsible for preventing them. | ||
| 624 | * | ||
| 625 | * Callbacks _must not_ perform any non-local transfer of control flow (e.g. | ||
| 626 | * throw an exception, longjmp(3)), as doing so would leave the MAP_JIT region | ||
| 627 | * writeable. | ||
| 628 | * | ||
| 629 | * On systems where pthread_jit_write_protect_supported_np(3) is false, this | ||
| 630 | * function calls @callback directly and does nothing else. | ||
| 631 | * | ||
| 632 | * This function only enforces that @callback is allowed if the caller has the | ||
| 633 | * com.apple.security.cs.jit-write-allowlist entitlement. That entitlement also | ||
| 634 | * disallows use of pthread_jit_write_protect_np(3). Adopting the entitlement | ||
| 635 | * is therefore crucial in realizing the security benefits of this interface. | ||
| 636 | * | ||
| 637 | * If the entitlement is not present then this function toggles protection of | ||
| 638 | * the MAP_JIT to writeable, calls @callback and then toggles protection back to | ||
| 639 | * executable, without validating that @callback is an allowed function. This | ||
| 640 | * behavior is intended to permit independent adoption of this interface by | ||
| 641 | * libraries - once all libraries in an application have adopted, the | ||
| 642 | * application should add the entitlement. | ||
| 643 | * | ||
| 644 | * By default, only callbacks in libraries/images present at process start-up | ||
| 645 | * are allowed - callbacks in images loaded dynamically via dlopen(3)/etc. are | ||
| 646 | * not permitted. However, if the additional entitlement | ||
| 647 | * com.apple.security.cs.jit-write-allowlist-freeze-late is _also_ present, any | ||
| 648 | * callbacks in dlopen'd libraries are also added to the set of allowed | ||
| 649 | * callbacks until the {@link pthread_jit_write_freeze_callbacks_np} function is | ||
| 650 | * called. | ||
| 651 | * | ||
| 652 | * The goal of this interface is to allow applications that execute JIT-compiled | ||
| 653 | * code to mitigate against attempts from attackers to escalate to code | ||
| 654 | * execution by getting their own instructions written to the MAP_JIT region. | ||
| 655 | * | ||
| 656 | * Callbacks should assume an attacker can control the input to this function. | ||
| 657 | * They must therefore carefully validate the data that they are passed and do | ||
| 658 | * so using as little attackable state as possible. This means simplifying | ||
| 659 | * control flow and avoiding spills of sensitive registers (e.g. those used for | ||
| 660 | * validation or control flow). | ||
| 661 | * | ||
| 662 | * In the event a callback detects that its input is invalid, it should either | ||
| 663 | * abort in the simplest fashion possible (preferring e.g. __builtin_trap() over | ||
| 664 | * abort(3), the latter being encumbered by various conformance requirements) or | ||
| 665 | * return a result indicating failure. | ||
| 666 | */ | ||
| 667 | __API_AVAILABLE(macos(11.4)) | ||
| 668 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 669 | __SWIFT_UNAVAILABLE_MSG("This interface cannot be safely used from Swift") | ||
| 670 | int pthread_jit_write_with_callback_np( | ||
| 671 | 		pthread_jit_write_callback_t _Nonnull callback, void * _Nullable ctx); | ||
| 672 | |||
| 673 | /*! | ||
| 674 | * @function pthread_jit_write_freeze_callbacks_np | ||
| 675 | * | ||
| 676 | * @abstract | ||
| 677 | * Freezes the set of allowed pthread JIT write callbacks, preventing any | ||
| 678 | * callbacks in subsequently dlopen'd libraries from being allowed as arguments | ||
| 679 | * to {@link pthread_jit_write_with_callback_np} | ||
| 680 | * | ||
| 681 | * @discussion | ||
| 682 | * If the com.apple.security.cs.jit-write-allowlist-freeze-late entitlement is | ||
| 683 | * present, this function must be called exactly once after all libraries | ||
| 684 | * containing JIT write callbacks have been loaded to prevent any further | ||
| 685 | * runtime modifications to the set of allowed callbacks. Failing to call this | ||
| 686 | * function before calling pthread_jit_write_with_callback_np(3) for the first | ||
| 687 | * time is an error, as is calling it multiple times. | ||
| 688 | * | ||
| 689 | * If the jit-write-allowlist-freeze-late entitlement is not present, calling | ||
| 690 | * this function is an error. | ||
| 691 | * | ||
| 692 | * If an application does not need to dlopen(3) any libraries or frameworks | ||
| 693 | * containing needed JIT write callbacks, it is best to avoid the | ||
| 694 | * jit-write-allowlist-freeze-late entitlement and accompanying need to call | ||
| 695 | * this function, as this allows the runtime to automatically freeze the set of | ||
| 696 | * allowed callbacks early in process initialization. | ||
| 697 | */ | ||
| 698 | __API_AVAILABLE(macos(12.1)) | ||
| 699 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 700 | void pthread_jit_write_freeze_callbacks_np(void); | ||
| 701 | |||
| 702 | /*! | ||
| 703 | * @function pthread_cpu_number_np | ||
| 704 | * | ||
| 705 | * @param cpu_number_out | ||
| 706 | * The CPU number that the thread was running on at the time of query. | ||
| 707 | * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu")) | ||
| 708 | * | ||
| 709 | * @result | ||
| 710 | * This function returns 0 or the value of errno if an error occurred. | ||
| 711 | * | ||
| 712 | * @note | ||
| 713 | * Optimizations of per-CPU datastructures based on the result of this function | ||
| 714 | * still require synchronization since it is not guaranteed that the thread will | ||
| 715 | * still be on the same CPU by the time the function returns. | ||
| 716 | */ | ||
| 717 | __API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1)) | ||
| 718 | int | ||
| 719 | pthread_cpu_number_np(size_t *cpu_number_out); | ||
| 720 | |||
| 721 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 722 | __END_DECLS | ||
| 723 | #if __has_feature(assume_nonnull) | ||
| 724 | _Pragma("clang assume_nonnull end") | ||
| 725 | #endif | ||
| 726 | |||
| 727 | #endif /* _PTHREAD_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/simd/base.h+8-1| ... | @@ -41,7 +41,14 @@ | ... | @@ -41,7 +41,14 @@ |
| 41 | * way in which simd functions are overloaded, the usual weak-linking tricks | 41 | * way in which simd functions are overloaded, the usual weak-linking tricks |
| 42 | * do not work; these functions are simply unavailable when targeting older | 42 | * do not work; these functions are simply unavailable when targeting older |
| 43 | * versions of the library. */ | 43 | * versions of the library. */ |
| 44 | # if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \ | 44 | # if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_12_0 || \ |
| 45 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_15_0 || \ | ||
| 46 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_8_0 || \ | ||
| 47 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_15_0 || \ | ||
| 48 | __BRIDGE_OS_VERSION_MIN_REQUIRED >= 60000 || \ | ||
| 49 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_21_0 | ||
| 50 | # define SIMD_LIBRARY_VERSION 4 | ||
| 51 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \ | ||
| 45 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \ | 52 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \ |
| 46 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \ | 53 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \ |
| 47 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \ | 54 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \ |
lib/libc/include/any-macos-any/simd/common.h created+4461| ... | @@ -0,0 +1,4461 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide "common" elementwise | ||
| 3 | * operations that are neither math nor logic functions. These are available | ||
| 4 | * only for floating-point vectors and scalars, except for min, max, abs, | ||
| 5 | * clamp, and the reduce operations, which also support integer vectors. | ||
| 6 | * | ||
| 7 | * simd_abs(x) Absolute value of x. Also available as fabs | ||
| 8 | * for floating-point vectors. If x is the | ||
| 9 | * smallest signed integer, x is returned. | ||
| 10 | * | ||
| 11 | * simd_max(x,y) Returns the maximum of x and y. Also available | ||
| 12 | * as fmax for floating-point vectors. | ||
| 13 | * | ||
| 14 | * simd_min(x,y) Returns the minimum of x and y. Also available | ||
| 15 | * as fmin for floating-point vectors. | ||
| 16 | * | ||
| 17 | * simd_clamp(x,min,max) x clamped to the range [min, max]. | ||
| 18 | * | ||
| 19 | * simd_sign(x) -1 if x is less than zero, 0 if x is zero or | ||
| 20 | * NaN, and +1 if x is greater than zero. | ||
| 21 | * | ||
| 22 | * simd_mix(x,y,t) If t is not in the range [0,1], the result is | ||
| 23 | * simd_lerp(x,y,t) undefined. Otherwise the result is x+(y-x)*t, | ||
| 24 | * which linearly interpolates between x and y. | ||
| 25 | * | ||
| 26 | * simd_recip(x) An approximation to 1/x. If x is very near the | ||
| 27 | * limits of representable values, or is infinity | ||
| 28 | * or NaN, the result is undefined. There are | ||
| 29 | * two variants of this function: | ||
| 30 | * | ||
| 31 | * simd_precise_recip(x) | ||
| 32 | * | ||
| 33 | * and | ||
| 34 | * | ||
| 35 | * simd_fast_recip(x). | ||
| 36 | * | ||
| 37 | * The "precise" variant is accurate to a few ULPs, | ||
| 38 | * whereas the "fast" variant may have as little | ||
| 39 | * as 11 bits of accuracy in float and about 22 | ||
| 40 | * bits in double. | ||
| 41 | * | ||
| 42 | * The function simd_recip(x) resolves to | ||
| 43 | * simd_precise_recip(x) ordinarily, but to | ||
| 44 | * simd_fast_recip(x) when used in a translation | ||
| 45 | * unit compiled with -ffast-math (when | ||
| 46 | * -ffast-math is in effect, you may still use the | ||
| 47 | * precise version of this function by calling it | ||
| 48 | * explicitly by name). | ||
| 49 | * | ||
| 50 | * simd_rsqrt(x) An approximation to 1/sqrt(x). If x is | ||
| 51 | * infinity or NaN, the result is undefined. | ||
| 52 | * There are two variants of this function: | ||
| 53 | * | ||
| 54 | * simd_precise_rsqrt(x) | ||
| 55 | * | ||
| 56 | * and | ||
| 57 | * | ||
| 58 | * simd_fast_rsqrt(x). | ||
| 59 | * | ||
| 60 | * The "precise" variant is accurate to a few ULPs, | ||
| 61 | * whereas the "fast" variant may have as little | ||
| 62 | * as 11 bits of accuracy in float and about 22 | ||
| 63 | * bits in double. | ||
| 64 | * | ||
| 65 | * The function simd_rsqrt(x) resolves to | ||
| 66 | * simd_precise_rsqrt(x) ordinarily, but to | ||
| 67 | * simd_fast_rsqrt(x) when used in a translation | ||
| 68 | * unit compiled with -ffast-math (when | ||
| 69 | * -ffast-math is in effect, you may still use the | ||
| 70 | * precise version of this function by calling it | ||
| 71 | * explicitly by name). | ||
| 72 | * | ||
| 73 | * simd_fract(x) The "fractional part" of x, which lies strictly | ||
| 74 | * in the range [0, 0x1.fffffep-1]. | ||
| 75 | * | ||
| 76 | * simd_step(edge,x) 0 if x < edge, and 1 otherwise. | ||
| 77 | * | ||
| 78 | * simd_smoothstep(edge0,edge1,x) 0 if x <= edge0, 1 if x >= edge1, and | ||
| 79 | * a Hermite interpolation between 0 and 1 if | ||
| 80 | * edge0 < x < edge1. | ||
| 81 | * | ||
| 82 | * simd_reduce_add(x) Sum of the elements of x. | ||
| 83 | * | ||
| 84 | * simd_reduce_min(x) Minimum of the elements of x. | ||
| 85 | * | ||
| 86 | * simd_reduce_max(x) Maximum of the elements of x. | ||
| 87 | * | ||
| 88 | * simd_equal(x,y) True if and only if every lane of x is equal | ||
| 89 | * to the corresponding lane of y. | ||
| 90 | * | ||
| 91 | * The following common functions are available in the simd:: namespace: | ||
| 92 | * | ||
| 93 | * C++ Function Equivalent C Function | ||
| 94 | * -------------------------------------------------------------------- | ||
| 95 | * simd::abs(x) simd_abs(x) | ||
| 96 | * simd::max(x,y) simd_max(x,y) | ||
| 97 | * simd::min(x,y) simd_min(x,y) | ||
| 98 | * simd::clamp(x,min,max) simd_clamp(x,min,max) | ||
| 99 | * simd::sign(x) simd_sign(x) | ||
| 100 | * simd::mix(x,y,t) simd_mix(x,y,t) | ||
| 101 | * simd::lerp(x,y,t) simd_lerp(x,y,t) | ||
| 102 | * simd::recip(x) simd_recip(x) | ||
| 103 | * simd::rsqrt(x) simd_rsqrt(x) | ||
| 104 | * simd::fract(x) simd_fract(x) | ||
| 105 | * simd::step(edge,x) simd_step(edge,x) | ||
| 106 | * simd::smoothstep(e0,e1,x) simd_smoothstep(e0,e1,x) | ||
| 107 | * simd::reduce_add(x) simd_reduce_add(x) | ||
| 108 | * simd::reduce_max(x) simd_reduce_max(x) | ||
| 109 | * simd::reduce_min(x) simd_reduce_min(x) | ||
| 110 | * simd::equal(x,y) simd_equal(x,y) | ||
| 111 | * | ||
| 112 | * simd::precise::recip(x) simd_precise_recip(x) | ||
| 113 | * simd::precise::rsqrt(x) simd_precise_rsqrt(x) | ||
| 114 | * | ||
| 115 | * simd::fast::recip(x) simd_fast_recip(x) | ||
| 116 | * simd::fast::rsqrt(x) simd_fast_rsqrt(x) | ||
| 117 | * | ||
| 118 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 119 | * @unsorted */ | ||
| 120 | |||
| 121 | #ifndef SIMD_COMMON_HEADER | ||
| 122 | #define SIMD_COMMON_HEADER | ||
| 123 | |||
| 124 | #include <simd/base.h> | ||
| 125 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 126 | #include <simd/vector_make.h> | ||
| 127 | #include <simd/logic.h> | ||
| 128 | #include <simd/math.h> | ||
| 129 | |||
| 130 | #ifdef __cplusplus | ||
| 131 | extern "C" { | ||
| 132 | #endif | ||
| 133 | |||
| 134 | /*! @abstract The elementwise absolute value of x. */ | ||
| 135 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x); | ||
| 136 | /*! @abstract The elementwise absolute value of x. */ | ||
| 137 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x); | ||
| 138 | /*! @abstract The elementwise absolute value of x. */ | ||
| 139 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x); | ||
| 140 | /*! @abstract The elementwise absolute value of x. */ | ||
| 141 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x); | ||
| 142 | /*! @abstract The elementwise absolute value of x. */ | ||
| 143 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x); | ||
| 144 | /*! @abstract The elementwise absolute value of x. */ | ||
| 145 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x); | ||
| 146 | /*! @abstract The elementwise absolute value of x. */ | ||
| 147 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x); | ||
| 148 | /*! @abstract The elementwise absolute value of x. */ | ||
| 149 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x); | ||
| 150 | /*! @abstract The elementwise absolute value of x. */ | ||
| 151 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x); | ||
| 152 | /*! @abstract The elementwise absolute value of x. */ | ||
| 153 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x); | ||
| 154 | /*! @abstract The elementwise absolute value of x. */ | ||
| 155 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x); | ||
| 156 | /*! @abstract The elementwise absolute value of x. */ | ||
| 157 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x); | ||
| 158 | /*! @abstract The elementwise absolute value of x. */ | ||
| 159 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x); | ||
| 160 | /*! @abstract The elementwise absolute value of x. */ | ||
| 161 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x); | ||
| 162 | /*! @abstract The elementwise absolute value of x. */ | ||
| 163 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x); | ||
| 164 | /*! @abstract The elementwise absolute value of x. */ | ||
| 165 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x); | ||
| 166 | /*! @abstract The elementwise absolute value of x. */ | ||
| 167 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x); | ||
| 168 | /*! @abstract The elementwise absolute value of x. */ | ||
| 169 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x); | ||
| 170 | /*! @abstract The elementwise absolute value of x. */ | ||
| 171 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x); | ||
| 172 | /*! @abstract The elementwise absolute value of x. */ | ||
| 173 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x); | ||
| 174 | /*! @abstract The elementwise absolute value of x. */ | ||
| 175 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x); | ||
| 176 | /*! @abstract The elementwise absolute value of x. */ | ||
| 177 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x); | ||
| 178 | /*! @abstract The elementwise absolute value of x. */ | ||
| 179 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x); | ||
| 180 | /*! @abstract The elementwise absolute value of x. */ | ||
| 181 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x); | ||
| 182 | /*! @abstract The elementwise absolute value of x. */ | ||
| 183 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x); | ||
| 184 | /*! @abstract The elementwise absolute value of x. */ | ||
| 185 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x); | ||
| 186 | /*! @abstract The elementwise absolute value of x. */ | ||
| 187 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x); | ||
| 188 | /*! @abstract The elementwise absolute value of x. */ | ||
| 189 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x); | ||
| 190 | /*! @abstract The elementwise absolute value of x. */ | ||
| 191 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x); | ||
| 192 | /*! @abstract The elementwise absolute value of x. */ | ||
| 193 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x); | ||
| 194 | /*! @abstract The elementwise absolute value of x. */ | ||
| 195 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x); | ||
| 196 | /*! @abstract The elementwise absolute value of x. | ||
| 197 | * @discussion Deprecated. Use simd_abs(x) instead. */ | ||
| 198 | #define vector_abs simd_abs | ||
| 199 | |||
| 200 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 201 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y); | ||
| 202 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 203 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y); | ||
| 204 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 205 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y); | ||
| 206 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 207 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y); | ||
| 208 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 209 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y); | ||
| 210 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 211 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y); | ||
| 212 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 213 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y); | ||
| 214 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 215 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y); | ||
| 216 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 217 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y); | ||
| 218 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 219 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y); | ||
| 220 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 221 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y); | ||
| 222 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 223 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y); | ||
| 224 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 225 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y); | ||
| 226 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 227 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y); | ||
| 228 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 229 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y); | ||
| 230 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 231 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y); | ||
| 232 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 233 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y); | ||
| 234 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 235 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y); | ||
| 236 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 237 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y); | ||
| 238 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 239 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y); | ||
| 240 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 241 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y); | ||
| 242 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 243 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y); | ||
| 244 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 245 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y); | ||
| 246 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 247 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y); | ||
| 248 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 249 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y); | ||
| 250 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 251 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y); | ||
| 252 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 253 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y); | ||
| 254 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 255 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y); | ||
| 256 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 257 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y); | ||
| 258 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 259 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y); | ||
| 260 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 261 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y); | ||
| 262 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 263 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y); | ||
| 264 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 265 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y); | ||
| 266 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 267 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y); | ||
| 268 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 269 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y); | ||
| 270 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 271 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y); | ||
| 272 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 273 | static inline SIMD_CFUNC float simd_max(float x, float y); | ||
| 274 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 275 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y); | ||
| 276 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 277 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y); | ||
| 278 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 279 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y); | ||
| 280 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 281 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y); | ||
| 282 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 283 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y); | ||
| 284 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 285 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y); | ||
| 286 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 287 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y); | ||
| 288 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 289 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y); | ||
| 290 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 291 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y); | ||
| 292 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 293 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y); | ||
| 294 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 295 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y); | ||
| 296 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 297 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y); | ||
| 298 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 299 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y); | ||
| 300 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 301 | static inline SIMD_CFUNC double simd_max(double x, double y); | ||
| 302 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 303 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y); | ||
| 304 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 305 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y); | ||
| 306 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 307 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y); | ||
| 308 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 309 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y); | ||
| 310 | /*! @abstract The elementwise maximum of x and y. | ||
| 311 | * @discussion Deprecated. Use simd_max(x,y) instead. */ | ||
| 312 | #define vector_max simd_max | ||
| 313 | |||
| 314 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 315 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y); | ||
| 316 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 317 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y); | ||
| 318 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 319 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y); | ||
| 320 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 321 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y); | ||
| 322 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 323 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y); | ||
| 324 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 325 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y); | ||
| 326 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 327 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y); | ||
| 328 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 329 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y); | ||
| 330 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 331 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y); | ||
| 332 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 333 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y); | ||
| 334 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 335 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y); | ||
| 336 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 337 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y); | ||
| 338 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 339 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y); | ||
| 340 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 341 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y); | ||
| 342 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 343 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y); | ||
| 344 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 345 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y); | ||
| 346 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 347 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y); | ||
| 348 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 349 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y); | ||
| 350 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 351 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y); | ||
| 352 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 353 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y); | ||
| 354 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 355 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y); | ||
| 356 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 357 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y); | ||
| 358 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 359 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y); | ||
| 360 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 361 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y); | ||
| 362 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 363 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y); | ||
| 364 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 365 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y); | ||
| 366 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 367 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y); | ||
| 368 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 369 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y); | ||
| 370 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 371 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y); | ||
| 372 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 373 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y); | ||
| 374 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 375 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y); | ||
| 376 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 377 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y); | ||
| 378 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 379 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y); | ||
| 380 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 381 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y); | ||
| 382 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 383 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y); | ||
| 384 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 385 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y); | ||
| 386 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 387 | static inline SIMD_CFUNC float simd_min(float x, float y); | ||
| 388 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 389 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y); | ||
| 390 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 391 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y); | ||
| 392 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 393 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y); | ||
| 394 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 395 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y); | ||
| 396 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 397 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y); | ||
| 398 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 399 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y); | ||
| 400 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 401 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y); | ||
| 402 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 403 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y); | ||
| 404 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 405 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y); | ||
| 406 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 407 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y); | ||
| 408 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 409 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y); | ||
| 410 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 411 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y); | ||
| 412 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 413 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y); | ||
| 414 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 415 | static inline SIMD_CFUNC double simd_min(double x, double y); | ||
| 416 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 417 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y); | ||
| 418 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 419 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y); | ||
| 420 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 421 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y); | ||
| 422 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 423 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y); | ||
| 424 | /*! @abstract The elementwise minimum of x and y. | ||
| 425 | * @discussion Deprecated. Use simd_min(x,y) instead. */ | ||
| 426 | #define vector_min simd_min | ||
| 427 | |||
| 428 | |||
| 429 | /*! @abstract x clamped to the range [min, max]. | ||
| 430 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 431 | * you can use a scalar value for min and max. */ | ||
| 432 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max); | ||
| 433 | /*! @abstract x clamped to the range [min, max]. | ||
| 434 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 435 | * you can use a scalar value for min and max. */ | ||
| 436 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max); | ||
| 437 | /*! @abstract x clamped to the range [min, max]. | ||
| 438 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 439 | * you can use a scalar value for min and max. */ | ||
| 440 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max); | ||
| 441 | /*! @abstract x clamped to the range [min, max]. | ||
| 442 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 443 | * you can use a scalar value for min and max. */ | ||
| 444 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max); | ||
| 445 | /*! @abstract x clamped to the range [min, max]. | ||
| 446 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 447 | * you can use a scalar value for min and max. */ | ||
| 448 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max); | ||
| 449 | /*! @abstract x clamped to the range [min, max]. | ||
| 450 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 451 | * you can use a scalar value for min and max. */ | ||
| 452 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max); | ||
| 453 | /*! @abstract x clamped to the range [min, max]. | ||
| 454 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 455 | * you can use a scalar value for min and max. */ | ||
| 456 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max); | ||
| 457 | /*! @abstract x clamped to the range [min, max]. | ||
| 458 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 459 | * you can use a scalar value for min and max. */ | ||
| 460 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max); | ||
| 461 | /*! @abstract x clamped to the range [min, max]. | ||
| 462 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 463 | * you can use a scalar value for min and max. */ | ||
| 464 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max); | ||
| 465 | /*! @abstract x clamped to the range [min, max]. | ||
| 466 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 467 | * you can use a scalar value for min and max. */ | ||
| 468 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max); | ||
| 469 | /*! @abstract x clamped to the range [min, max]. | ||
| 470 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 471 | * you can use a scalar value for min and max. */ | ||
| 472 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max); | ||
| 473 | /*! @abstract x clamped to the range [min, max]. | ||
| 474 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 475 | * you can use a scalar value for min and max. */ | ||
| 476 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max); | ||
| 477 | /*! @abstract x clamped to the range [min, max]. | ||
| 478 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 479 | * you can use a scalar value for min and max. */ | ||
| 480 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max); | ||
| 481 | /*! @abstract x clamped to the range [min, max]. | ||
| 482 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 483 | * you can use a scalar value for min and max. */ | ||
| 484 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max); | ||
| 485 | /*! @abstract x clamped to the range [min, max]. | ||
| 486 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 487 | * you can use a scalar value for min and max. */ | ||
| 488 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max); | ||
| 489 | /*! @abstract x clamped to the range [min, max]. | ||
| 490 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 491 | * you can use a scalar value for min and max. */ | ||
| 492 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max); | ||
| 493 | /*! @abstract x clamped to the range [min, max]. | ||
| 494 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 495 | * you can use a scalar value for min and max. */ | ||
| 496 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max); | ||
| 497 | /*! @abstract x clamped to the range [min, max]. | ||
| 498 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 499 | * you can use a scalar value for min and max. */ | ||
| 500 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max); | ||
| 501 | /*! @abstract x clamped to the range [min, max]. | ||
| 502 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 503 | * you can use a scalar value for min and max. */ | ||
| 504 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max); | ||
| 505 | /*! @abstract x clamped to the range [min, max]. | ||
| 506 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 507 | * you can use a scalar value for min and max. */ | ||
| 508 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max); | ||
| 509 | /*! @abstract x clamped to the range [min, max]. | ||
| 510 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 511 | * you can use a scalar value for min and max. */ | ||
| 512 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max); | ||
| 513 | /*! @abstract x clamped to the range [min, max]. | ||
| 514 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 515 | * you can use a scalar value for min and max. */ | ||
| 516 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max); | ||
| 517 | /*! @abstract x clamped to the range [min, max]. | ||
| 518 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 519 | * you can use a scalar value for min and max. */ | ||
| 520 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max); | ||
| 521 | /*! @abstract x clamped to the range [min, max]. | ||
| 522 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 523 | * you can use a scalar value for min and max. */ | ||
| 524 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max); | ||
| 525 | /*! @abstract x clamped to the range [min, max]. | ||
| 526 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 527 | * you can use a scalar value for min and max. */ | ||
| 528 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max); | ||
| 529 | /*! @abstract x clamped to the range [min, max]. | ||
| 530 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 531 | * you can use a scalar value for min and max. */ | ||
| 532 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max); | ||
| 533 | /*! @abstract x clamped to the range [min, max]. | ||
| 534 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 535 | * you can use a scalar value for min and max. */ | ||
| 536 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max); | ||
| 537 | /*! @abstract x clamped to the range [min, max]. | ||
| 538 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 539 | * you can use a scalar value for min and max. */ | ||
| 540 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max); | ||
| 541 | /*! @abstract x clamped to the range [min, max]. | ||
| 542 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 543 | * you can use a scalar value for min and max. */ | ||
| 544 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max); | ||
| 545 | /*! @abstract x clamped to the range [min, max]. | ||
| 546 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 547 | * you can use a scalar value for min and max. */ | ||
| 548 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max); | ||
| 549 | /*! @abstract x clamped to the range [min, max]. | ||
| 550 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 551 | * you can use a scalar value for min and max. */ | ||
| 552 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max); | ||
| 553 | /*! @abstract x clamped to the range [min, max]. | ||
| 554 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 555 | * you can use a scalar value for min and max. */ | ||
| 556 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max); | ||
| 557 | /*! @abstract x clamped to the range [min, max]. | ||
| 558 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 559 | * you can use a scalar value for min and max. */ | ||
| 560 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max); | ||
| 561 | /*! @abstract x clamped to the range [min, max]. | ||
| 562 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 563 | * you can use a scalar value for min and max. */ | ||
| 564 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max); | ||
| 565 | /*! @abstract x clamped to the range [min, max]. | ||
| 566 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 567 | * you can use a scalar value for min and max. */ | ||
| 568 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max); | ||
| 569 | /*! @abstract x clamped to the range [min, max]. | ||
| 570 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 571 | * you can use a scalar value for min and max. */ | ||
| 572 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max); | ||
| 573 | /*! @abstract x clamped to the range [min, max]. | ||
| 574 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 575 | * you can use a scalar value for min and max. */ | ||
| 576 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max); | ||
| 577 | /*! @abstract x clamped to the range [min, max]. | ||
| 578 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 579 | * you can use a scalar value for min and max. */ | ||
| 580 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max); | ||
| 581 | /*! @abstract x clamped to the range [min, max]. | ||
| 582 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 583 | * you can use a scalar value for min and max. */ | ||
| 584 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max); | ||
| 585 | /*! @abstract x clamped to the range [min, max]. | ||
| 586 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 587 | * you can use a scalar value for min and max. */ | ||
| 588 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max); | ||
| 589 | /*! @abstract x clamped to the range [min, max]. | ||
| 590 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 591 | * you can use a scalar value for min and max. */ | ||
| 592 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max); | ||
| 593 | /*! @abstract x clamped to the range [min, max]. | ||
| 594 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 595 | * you can use a scalar value for min and max. */ | ||
| 596 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max); | ||
| 597 | /*! @abstract x clamped to the range [min, max]. | ||
| 598 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 599 | * you can use a scalar value for min and max. */ | ||
| 600 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max); | ||
| 601 | /*! @abstract x clamped to the range [min, max]. | ||
| 602 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 603 | * you can use a scalar value for min and max. */ | ||
| 604 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max); | ||
| 605 | /*! @abstract x clamped to the range [min, max]. | ||
| 606 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 607 | * you can use a scalar value for min and max. */ | ||
| 608 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max); | ||
| 609 | /*! @abstract x clamped to the range [min, max]. | ||
| 610 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 611 | * you can use a scalar value for min and max. */ | ||
| 612 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max); | ||
| 613 | /*! @abstract x clamped to the range [min, max]. | ||
| 614 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 615 | * you can use a scalar value for min and max. */ | ||
| 616 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max); | ||
| 617 | /*! @abstract x clamped to the range [min, max]. | ||
| 618 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 619 | * you can use a scalar value for min and max. */ | ||
| 620 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max); | ||
| 621 | /*! @abstract x clamped to the range [min, max]. | ||
| 622 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 623 | * you can use a scalar value for min and max. */ | ||
| 624 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max); | ||
| 625 | /*! @abstract x clamped to the range [min, max]. | ||
| 626 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 627 | * you can use a scalar value for min and max. */ | ||
| 628 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max); | ||
| 629 | /*! @abstract x clamped to the range [min, max]. | ||
| 630 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 631 | * you can use a scalar value for min and max. */ | ||
| 632 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max); | ||
| 633 | /*! @abstract x clamped to the range [min, max]. | ||
| 634 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 635 | * you can use a scalar value for min and max. */ | ||
| 636 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max); | ||
| 637 | /*! @abstract x clamped to the range [min, max]. | ||
| 638 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 639 | * you can use a scalar value for min and max. */ | ||
| 640 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max); | ||
| 641 | /*! @abstract x clamped to the range [min, max]. | ||
| 642 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 643 | * you can use a scalar value for min and max. */ | ||
| 644 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max); | ||
| 645 | /*! @abstract x clamped to the range [min, max]. | ||
| 646 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 647 | * you can use a scalar value for min and max. */ | ||
| 648 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max); | ||
| 649 | /*! @abstract x clamped to the range [min, max]. | ||
| 650 | * @discussion Deprecated. Use simd_clamp(x,min,max) instead. */ | ||
| 651 | #define vector_clamp simd_clamp | ||
| 652 | |||
| 653 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 654 | static inline SIMD_CFUNC float simd_sign(float x); | ||
| 655 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 656 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x); | ||
| 657 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 658 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x); | ||
| 659 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 660 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x); | ||
| 661 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 662 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x); | ||
| 663 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 664 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x); | ||
| 665 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 666 | static inline SIMD_CFUNC double simd_sign(double x); | ||
| 667 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 668 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x); | ||
| 669 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 670 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x); | ||
| 671 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 672 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x); | ||
| 673 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 674 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x); | ||
| 675 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. | ||
| 676 | * @discussion Deprecated. Use simd_sign(x) instead. */ | ||
| 677 | #define vector_sign simd_sign | ||
| 678 | |||
| 679 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 680 | * t=0 and y when t=1 */ | ||
| 681 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t); | ||
| 682 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 683 | * t=0 and y when t=1 */ | ||
| 684 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t); | ||
| 685 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 686 | * t=0 and y when t=1 */ | ||
| 687 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t); | ||
| 688 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 689 | * t=0 and y when t=1 */ | ||
| 690 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t); | ||
| 691 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 692 | * t=0 and y when t=1 */ | ||
| 693 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t); | ||
| 694 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 695 | * t=0 and y when t=1 */ | ||
| 696 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t); | ||
| 697 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 698 | * t=0 and y when t=1 */ | ||
| 699 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t); | ||
| 700 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 701 | * t=0 and y when t=1 */ | ||
| 702 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t); | ||
| 703 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 704 | * t=0 and y when t=1 */ | ||
| 705 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t); | ||
| 706 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 707 | * t=0 and y when t=1 */ | ||
| 708 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t); | ||
| 709 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 710 | * t=0 and y when t=1 */ | ||
| 711 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t); | ||
| 712 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 713 | * t=0 and y when t=1 | ||
| 714 | * @discussion Deprecated. Use simd_mix(x, y, t) instead. */ | ||
| 715 | #define vector_mix simd_mix | ||
| 716 | #define simd_lerp simd_mix | ||
| 717 | |||
| 718 | /*! @abstract A good approximation to 1/x. | ||
| 719 | * @discussion If x is very close to the limits of representation, the | ||
| 720 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 721 | * a few units in the last place (ULPs). */ | ||
| 722 | static inline SIMD_CFUNC float simd_precise_recip(float x); | ||
| 723 | /*! @abstract A good approximation to 1/x. | ||
| 724 | * @discussion If x is very close to the limits of representation, the | ||
| 725 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 726 | * a few units in the last place (ULPs). */ | ||
| 727 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x); | ||
| 728 | /*! @abstract A good approximation to 1/x. | ||
| 729 | * @discussion If x is very close to the limits of representation, the | ||
| 730 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 731 | * a few units in the last place (ULPs). */ | ||
| 732 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x); | ||
| 733 | /*! @abstract A good approximation to 1/x. | ||
| 734 | * @discussion If x is very close to the limits of representation, the | ||
| 735 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 736 | * a few units in the last place (ULPs). */ | ||
| 737 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x); | ||
| 738 | /*! @abstract A good approximation to 1/x. | ||
| 739 | * @discussion If x is very close to the limits of representation, the | ||
| 740 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 741 | * a few units in the last place (ULPs). */ | ||
| 742 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x); | ||
| 743 | /*! @abstract A good approximation to 1/x. | ||
| 744 | * @discussion If x is very close to the limits of representation, the | ||
| 745 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 746 | * a few units in the last place (ULPs). */ | ||
| 747 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x); | ||
| 748 | /*! @abstract A good approximation to 1/x. | ||
| 749 | * @discussion If x is very close to the limits of representation, the | ||
| 750 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 751 | * a few units in the last place (ULPs). */ | ||
| 752 | static inline SIMD_CFUNC double simd_precise_recip(double x); | ||
| 753 | /*! @abstract A good approximation to 1/x. | ||
| 754 | * @discussion If x is very close to the limits of representation, the | ||
| 755 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 756 | * a few units in the last place (ULPs). */ | ||
| 757 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x); | ||
| 758 | /*! @abstract A good approximation to 1/x. | ||
| 759 | * @discussion If x is very close to the limits of representation, the | ||
| 760 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 761 | * a few units in the last place (ULPs). */ | ||
| 762 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x); | ||
| 763 | /*! @abstract A good approximation to 1/x. | ||
| 764 | * @discussion If x is very close to the limits of representation, the | ||
| 765 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 766 | * a few units in the last place (ULPs). */ | ||
| 767 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x); | ||
| 768 | /*! @abstract A good approximation to 1/x. | ||
| 769 | * @discussion If x is very close to the limits of representation, the | ||
| 770 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 771 | * a few units in the last place (ULPs). */ | ||
| 772 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x); | ||
| 773 | /*! @abstract A good approximation to 1/x. | ||
| 774 | * @discussion Deprecated. Use simd_precise_recip(x) instead. */ | ||
| 775 | #define vector_precise_recip simd_precise_recip | ||
| 776 | |||
| 777 | /*! @abstract A fast approximation to 1/x. | ||
| 778 | * @discussion If x is very close to the limits of representation, the | ||
| 779 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 780 | * at least 11 bits for float and 22 bits for double. */ | ||
| 781 | static inline SIMD_CFUNC float simd_fast_recip(float x); | ||
| 782 | /*! @abstract A fast approximation to 1/x. | ||
| 783 | * @discussion If x is very close to the limits of representation, the | ||
| 784 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 785 | * at least 11 bits for float and 22 bits for double. */ | ||
| 786 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x); | ||
| 787 | /*! @abstract A fast approximation to 1/x. | ||
| 788 | * @discussion If x is very close to the limits of representation, the | ||
| 789 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 790 | * at least 11 bits for float and 22 bits for double. */ | ||
| 791 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x); | ||
| 792 | /*! @abstract A fast approximation to 1/x. | ||
| 793 | * @discussion If x is very close to the limits of representation, the | ||
| 794 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 795 | * at least 11 bits for float and 22 bits for double. */ | ||
| 796 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x); | ||
| 797 | /*! @abstract A fast approximation to 1/x. | ||
| 798 | * @discussion If x is very close to the limits of representation, the | ||
| 799 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 800 | * at least 11 bits for float and 22 bits for double. */ | ||
| 801 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x); | ||
| 802 | /*! @abstract A fast approximation to 1/x. | ||
| 803 | * @discussion If x is very close to the limits of representation, the | ||
| 804 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 805 | * at least 11 bits for float and 22 bits for double. */ | ||
| 806 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x); | ||
| 807 | /*! @abstract A fast approximation to 1/x. | ||
| 808 | * @discussion If x is very close to the limits of representation, the | ||
| 809 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 810 | * at least 11 bits for float and 22 bits for double. */ | ||
| 811 | static inline SIMD_CFUNC double simd_fast_recip(double x); | ||
| 812 | /*! @abstract A fast approximation to 1/x. | ||
| 813 | * @discussion If x is very close to the limits of representation, the | ||
| 814 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 815 | * at least 11 bits for float and 22 bits for double. */ | ||
| 816 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x); | ||
| 817 | /*! @abstract A fast approximation to 1/x. | ||
| 818 | * @discussion If x is very close to the limits of representation, the | ||
| 819 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 820 | * at least 11 bits for float and 22 bits for double. */ | ||
| 821 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x); | ||
| 822 | /*! @abstract A fast approximation to 1/x. | ||
| 823 | * @discussion If x is very close to the limits of representation, the | ||
| 824 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 825 | * at least 11 bits for float and 22 bits for double. */ | ||
| 826 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x); | ||
| 827 | /*! @abstract A fast approximation to 1/x. | ||
| 828 | * @discussion If x is very close to the limits of representation, the | ||
| 829 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 830 | * at least 11 bits for float and 22 bits for double. */ | ||
| 831 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x); | ||
| 832 | /*! @abstract A fast approximation to 1/x. | ||
| 833 | * @discussion Deprecated. Use simd_fast_recip(x) instead. */ | ||
| 834 | #define vector_fast_recip simd_fast_recip | ||
| 835 | |||
| 836 | /*! @abstract An approximation to 1/x. | ||
| 837 | * @discussion If x is very close to the limits of representation, the | ||
| 838 | * result may overflow or underflow. This function maps to | ||
| 839 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 840 | * simd_precise_recip(x) otherwise. */ | ||
| 841 | static inline SIMD_CFUNC float simd_recip(float x); | ||
| 842 | /*! @abstract An approximation to 1/x. | ||
| 843 | * @discussion If x is very close to the limits of representation, the | ||
| 844 | * result may overflow or underflow. This function maps to | ||
| 845 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 846 | * simd_precise_recip(x) otherwise. */ | ||
| 847 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x); | ||
| 848 | /*! @abstract An approximation to 1/x. | ||
| 849 | * @discussion If x is very close to the limits of representation, the | ||
| 850 | * result may overflow or underflow. This function maps to | ||
| 851 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 852 | * simd_precise_recip(x) otherwise. */ | ||
| 853 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x); | ||
| 854 | /*! @abstract An approximation to 1/x. | ||
| 855 | * @discussion If x is very close to the limits of representation, the | ||
| 856 | * result may overflow or underflow. This function maps to | ||
| 857 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 858 | * simd_precise_recip(x) otherwise. */ | ||
| 859 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x); | ||
| 860 | /*! @abstract An approximation to 1/x. | ||
| 861 | * @discussion If x is very close to the limits of representation, the | ||
| 862 | * result may overflow or underflow. This function maps to | ||
| 863 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 864 | * simd_precise_recip(x) otherwise. */ | ||
| 865 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x); | ||
| 866 | /*! @abstract An approximation to 1/x. | ||
| 867 | * @discussion If x is very close to the limits of representation, the | ||
| 868 | * result may overflow or underflow. This function maps to | ||
| 869 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 870 | * simd_precise_recip(x) otherwise. */ | ||
| 871 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x); | ||
| 872 | /*! @abstract An approximation to 1/x. | ||
| 873 | * @discussion If x is very close to the limits of representation, the | ||
| 874 | * result may overflow or underflow. This function maps to | ||
| 875 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 876 | * simd_precise_recip(x) otherwise. */ | ||
| 877 | static inline SIMD_CFUNC double simd_recip(double x); | ||
| 878 | /*! @abstract An approximation to 1/x. | ||
| 879 | * @discussion If x is very close to the limits of representation, the | ||
| 880 | * result may overflow or underflow. This function maps to | ||
| 881 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 882 | * simd_precise_recip(x) otherwise. */ | ||
| 883 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x); | ||
| 884 | /*! @abstract An approximation to 1/x. | ||
| 885 | * @discussion If x is very close to the limits of representation, the | ||
| 886 | * result may overflow or underflow. This function maps to | ||
| 887 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 888 | * simd_precise_recip(x) otherwise. */ | ||
| 889 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x); | ||
| 890 | /*! @abstract An approximation to 1/x. | ||
| 891 | * @discussion If x is very close to the limits of representation, the | ||
| 892 | * result may overflow or underflow. This function maps to | ||
| 893 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 894 | * simd_precise_recip(x) otherwise. */ | ||
| 895 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x); | ||
| 896 | /*! @abstract An approximation to 1/x. | ||
| 897 | * @discussion If x is very close to the limits of representation, the | ||
| 898 | * result may overflow or underflow. This function maps to | ||
| 899 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 900 | * simd_precise_recip(x) otherwise. */ | ||
| 901 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x); | ||
| 902 | /*! @abstract An approximation to 1/x. | ||
| 903 | * @discussion Deprecated. Use simd_recip(x) instead. */ | ||
| 904 | #define vector_recip simd_recip | ||
| 905 | |||
| 906 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 907 | * @discussion This function is accurate to a few units in the last place | ||
| 908 | * (ULPs). */ | ||
| 909 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x); | ||
| 910 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 911 | * @discussion This function is accurate to a few units in the last place | ||
| 912 | * (ULPs). */ | ||
| 913 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x); | ||
| 914 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 915 | * @discussion This function is accurate to a few units in the last place | ||
| 916 | * (ULPs). */ | ||
| 917 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x); | ||
| 918 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 919 | * @discussion This function is accurate to a few units in the last place | ||
| 920 | * (ULPs). */ | ||
| 921 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x); | ||
| 922 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 923 | * @discussion This function is accurate to a few units in the last place | ||
| 924 | * (ULPs). */ | ||
| 925 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x); | ||
| 926 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 927 | * @discussion This function is accurate to a few units in the last place | ||
| 928 | * (ULPs). */ | ||
| 929 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x); | ||
| 930 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 931 | * @discussion This function is accurate to a few units in the last place | ||
| 932 | * (ULPs). */ | ||
| 933 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x); | ||
| 934 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 935 | * @discussion This function is accurate to a few units in the last place | ||
| 936 | * (ULPs). */ | ||
| 937 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x); | ||
| 938 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 939 | * @discussion This function is accurate to a few units in the last place | ||
| 940 | * (ULPs). */ | ||
| 941 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x); | ||
| 942 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 943 | * @discussion This function is accurate to a few units in the last place | ||
| 944 | * (ULPs). */ | ||
| 945 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x); | ||
| 946 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 947 | * @discussion This function is accurate to a few units in the last place | ||
| 948 | * (ULPs). */ | ||
| 949 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x); | ||
| 950 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 951 | * @discussion Deprecated. Use simd_precise_rsqrt(x) instead. */ | ||
| 952 | #define vector_precise_rsqrt simd_precise_rsqrt | ||
| 953 | |||
| 954 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 955 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 956 | * 22 bits for double. */ | ||
| 957 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x); | ||
| 958 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 959 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 960 | * 22 bits for double. */ | ||
| 961 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x); | ||
| 962 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 963 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 964 | * 22 bits for double. */ | ||
| 965 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x); | ||
| 966 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 967 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 968 | * 22 bits for double. */ | ||
| 969 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x); | ||
| 970 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 971 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 972 | * 22 bits for double. */ | ||
| 973 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x); | ||
| 974 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 975 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 976 | * 22 bits for double. */ | ||
| 977 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x); | ||
| 978 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 979 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 980 | * 22 bits for double. */ | ||
| 981 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x); | ||
| 982 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 983 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 984 | * 22 bits for double. */ | ||
| 985 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x); | ||
| 986 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 987 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 988 | * 22 bits for double. */ | ||
| 989 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x); | ||
| 990 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 991 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 992 | * 22 bits for double. */ | ||
| 993 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x); | ||
| 994 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 995 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 996 | * 22 bits for double. */ | ||
| 997 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x); | ||
| 998 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 999 | * @discussion Deprecated. Use simd_fast_rsqrt(x) instead. */ | ||
| 1000 | #define vector_fast_rsqrt simd_fast_rsqrt | ||
| 1001 | |||
| 1002 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1003 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1004 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1005 | static inline SIMD_CFUNC float simd_rsqrt(float x); | ||
| 1006 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1007 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1008 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1009 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x); | ||
| 1010 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1011 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1012 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1013 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x); | ||
| 1014 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1015 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1016 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1017 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x); | ||
| 1018 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1019 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1020 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1021 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x); | ||
| 1022 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1023 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1024 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1025 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x); | ||
| 1026 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1027 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1028 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1029 | static inline SIMD_CFUNC double simd_rsqrt(double x); | ||
| 1030 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1031 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1032 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1033 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x); | ||
| 1034 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1035 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1036 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1037 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x); | ||
| 1038 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1039 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1040 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1041 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x); | ||
| 1042 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1043 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1044 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1045 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x); | ||
| 1046 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1047 | * @discussion Deprecated. Use simd_rsqrt(x) instead. */ | ||
| 1048 | #define vector_rsqrt simd_rsqrt | ||
| 1049 | |||
| 1050 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1051 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1052 | * positive and finite, then the two values are exactly equal. */ | ||
| 1053 | static inline SIMD_CFUNC float simd_fract(float x); | ||
| 1054 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1055 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1056 | * positive and finite, then the two values are exactly equal. */ | ||
| 1057 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x); | ||
| 1058 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1059 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1060 | * positive and finite, then the two values are exactly equal. */ | ||
| 1061 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x); | ||
| 1062 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1063 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1064 | * positive and finite, then the two values are exactly equal. */ | ||
| 1065 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x); | ||
| 1066 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1067 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1068 | * positive and finite, then the two values are exactly equal. */ | ||
| 1069 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x); | ||
| 1070 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1071 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1072 | * positive and finite, then the two values are exactly equal. */ | ||
| 1073 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x); | ||
| 1074 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1075 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1076 | * positive and finite, then the two values are exactly equal. */ | ||
| 1077 | static inline SIMD_CFUNC double simd_fract(double x); | ||
| 1078 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1079 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1080 | * positive and finite, then the two values are exactly equal. */ | ||
| 1081 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x); | ||
| 1082 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1083 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1084 | * positive and finite, then the two values are exactly equal. */ | ||
| 1085 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x); | ||
| 1086 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1087 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1088 | * positive and finite, then the two values are exactly equal. */ | ||
| 1089 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x); | ||
| 1090 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1091 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1092 | * positive and finite, then the two values are exactly equal. */ | ||
| 1093 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x); | ||
| 1094 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1095 | * @discussion Deprecated. Use simd_fract(x) instead. */ | ||
| 1096 | #define vector_fract simd_fract | ||
| 1097 | |||
| 1098 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1099 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1100 | * threshold to all lanes. */ | ||
| 1101 | static inline SIMD_CFUNC float simd_step(float edge, float x); | ||
| 1102 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1103 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1104 | * threshold to all lanes. */ | ||
| 1105 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x); | ||
| 1106 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1107 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1108 | * threshold to all lanes. */ | ||
| 1109 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x); | ||
| 1110 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1111 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1112 | * threshold to all lanes. */ | ||
| 1113 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x); | ||
| 1114 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1115 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1116 | * threshold to all lanes. */ | ||
| 1117 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x); | ||
| 1118 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1119 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1120 | * threshold to all lanes. */ | ||
| 1121 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x); | ||
| 1122 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1123 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1124 | * threshold to all lanes. */ | ||
| 1125 | static inline SIMD_CFUNC double simd_step(double edge, double x); | ||
| 1126 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1127 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1128 | * threshold to all lanes. */ | ||
| 1129 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x); | ||
| 1130 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1131 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1132 | * threshold to all lanes. */ | ||
| 1133 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x); | ||
| 1134 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1135 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1136 | * threshold to all lanes. */ | ||
| 1137 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x); | ||
| 1138 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1139 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1140 | * threshold to all lanes. */ | ||
| 1141 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x); | ||
| 1142 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1143 | * @discussion Deprecated. Use simd_step(edge, x) instead. */ | ||
| 1144 | #define vector_step simd_step | ||
| 1145 | |||
| 1146 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1147 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1148 | * to clamp all lanes at the same points. */ | ||
| 1149 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x); | ||
| 1150 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1151 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1152 | * to clamp all lanes at the same points. */ | ||
| 1153 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x); | ||
| 1154 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1155 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1156 | * to clamp all lanes at the same points. */ | ||
| 1157 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x); | ||
| 1158 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1159 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1160 | * to clamp all lanes at the same points. */ | ||
| 1161 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x); | ||
| 1162 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1163 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1164 | * to clamp all lanes at the same points. */ | ||
| 1165 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x); | ||
| 1166 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1167 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1168 | * to clamp all lanes at the same points. */ | ||
| 1169 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x); | ||
| 1170 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1171 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1172 | * to clamp all lanes at the same points. */ | ||
| 1173 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x); | ||
| 1174 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1175 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1176 | * to clamp all lanes at the same points. */ | ||
| 1177 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x); | ||
| 1178 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1179 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1180 | * to clamp all lanes at the same points. */ | ||
| 1181 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x); | ||
| 1182 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1183 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1184 | * to clamp all lanes at the same points. */ | ||
| 1185 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x); | ||
| 1186 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1187 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1188 | * to clamp all lanes at the same points. */ | ||
| 1189 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x); | ||
| 1190 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1191 | * @discussion Deprecated. Use simd_smoothstep(edge0, edge1, x) instead. */ | ||
| 1192 | #define vector_smoothstep simd_smoothstep | ||
| 1193 | |||
| 1194 | /*! @abstract Sum of elements in x. | ||
| 1195 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1196 | * may need to convert to a wider type before reducing. */ | ||
| 1197 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x); | ||
| 1198 | /*! @abstract Sum of elements in x. | ||
| 1199 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1200 | * may need to convert to a wider type before reducing. */ | ||
| 1201 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x); | ||
| 1202 | /*! @abstract Sum of elements in x. | ||
| 1203 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1204 | * may need to convert to a wider type before reducing. */ | ||
| 1205 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x); | ||
| 1206 | /*! @abstract Sum of elements in x. | ||
| 1207 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1208 | * may need to convert to a wider type before reducing. */ | ||
| 1209 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x); | ||
| 1210 | /*! @abstract Sum of elements in x. | ||
| 1211 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1212 | * may need to convert to a wider type before reducing. */ | ||
| 1213 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x); | ||
| 1214 | /*! @abstract Sum of elements in x. | ||
| 1215 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1216 | * may need to convert to a wider type before reducing. */ | ||
| 1217 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x); | ||
| 1218 | /*! @abstract Sum of elements in x. | ||
| 1219 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1220 | * may need to convert to a wider type before reducing. */ | ||
| 1221 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x); | ||
| 1222 | /*! @abstract Sum of elements in x. | ||
| 1223 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1224 | * may need to convert to a wider type before reducing. */ | ||
| 1225 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x); | ||
| 1226 | /*! @abstract Sum of elements in x. | ||
| 1227 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1228 | * may need to convert to a wider type before reducing. */ | ||
| 1229 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x); | ||
| 1230 | /*! @abstract Sum of elements in x. | ||
| 1231 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1232 | * may need to convert to a wider type before reducing. */ | ||
| 1233 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x); | ||
| 1234 | /*! @abstract Sum of elements in x. | ||
| 1235 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1236 | * may need to convert to a wider type before reducing. */ | ||
| 1237 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x); | ||
| 1238 | /*! @abstract Sum of elements in x. | ||
| 1239 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1240 | * may need to convert to a wider type before reducing. */ | ||
| 1241 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x); | ||
| 1242 | /*! @abstract Sum of elements in x. | ||
| 1243 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1244 | * may need to convert to a wider type before reducing. */ | ||
| 1245 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x); | ||
| 1246 | /*! @abstract Sum of elements in x. | ||
| 1247 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1248 | * may need to convert to a wider type before reducing. */ | ||
| 1249 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x); | ||
| 1250 | /*! @abstract Sum of elements in x. | ||
| 1251 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1252 | * may need to convert to a wider type before reducing. */ | ||
| 1253 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x); | ||
| 1254 | /*! @abstract Sum of elements in x. | ||
| 1255 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1256 | * may need to convert to a wider type before reducing. */ | ||
| 1257 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x); | ||
| 1258 | /*! @abstract Sum of elements in x. | ||
| 1259 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1260 | * may need to convert to a wider type before reducing. */ | ||
| 1261 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x); | ||
| 1262 | /*! @abstract Sum of elements in x. | ||
| 1263 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1264 | * may need to convert to a wider type before reducing. */ | ||
| 1265 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x); | ||
| 1266 | /*! @abstract Sum of elements in x. | ||
| 1267 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1268 | * may need to convert to a wider type before reducing. */ | ||
| 1269 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x); | ||
| 1270 | /*! @abstract Sum of elements in x. | ||
| 1271 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1272 | * may need to convert to a wider type before reducing. */ | ||
| 1273 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x); | ||
| 1274 | /*! @abstract Sum of elements in x. | ||
| 1275 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1276 | * may need to convert to a wider type before reducing. */ | ||
| 1277 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x); | ||
| 1278 | /*! @abstract Sum of elements in x. | ||
| 1279 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1280 | * may need to convert to a wider type before reducing. */ | ||
| 1281 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x); | ||
| 1282 | /*! @abstract Sum of elements in x. | ||
| 1283 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1284 | * may need to convert to a wider type before reducing. */ | ||
| 1285 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x); | ||
| 1286 | /*! @abstract Sum of elements in x. | ||
| 1287 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1288 | * may need to convert to a wider type before reducing. */ | ||
| 1289 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x); | ||
| 1290 | /*! @abstract Sum of elements in x. | ||
| 1291 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1292 | * may need to convert to a wider type before reducing. */ | ||
| 1293 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x); | ||
| 1294 | /*! @abstract Sum of elements in x. | ||
| 1295 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1296 | * may need to convert to a wider type before reducing. */ | ||
| 1297 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x); | ||
| 1298 | /*! @abstract Sum of elements in x. | ||
| 1299 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1300 | * may need to convert to a wider type before reducing. */ | ||
| 1301 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x); | ||
| 1302 | /*! @abstract Sum of elements in x. | ||
| 1303 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1304 | * may need to convert to a wider type before reducing. */ | ||
| 1305 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x); | ||
| 1306 | /*! @abstract Sum of elements in x. | ||
| 1307 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1308 | * may need to convert to a wider type before reducing. */ | ||
| 1309 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x); | ||
| 1310 | /*! @abstract Sum of elements in x. | ||
| 1311 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1312 | * may need to convert to a wider type before reducing. */ | ||
| 1313 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x); | ||
| 1314 | /*! @abstract Sum of elements in x. | ||
| 1315 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1316 | * may need to convert to a wider type before reducing. */ | ||
| 1317 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x); | ||
| 1318 | /*! @abstract Sum of elements in x. | ||
| 1319 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1320 | * may need to convert to a wider type before reducing. */ | ||
| 1321 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x); | ||
| 1322 | /*! @abstract Sum of elements in x. | ||
| 1323 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1324 | * may need to convert to a wider type before reducing. */ | ||
| 1325 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x); | ||
| 1326 | /*! @abstract Sum of elements in x. | ||
| 1327 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1328 | * may need to convert to a wider type before reducing. */ | ||
| 1329 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x); | ||
| 1330 | /*! @abstract Sum of elements in x. | ||
| 1331 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1332 | * may need to convert to a wider type before reducing. */ | ||
| 1333 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x); | ||
| 1334 | /*! @abstract Sum of elements in x. | ||
| 1335 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1336 | * may need to convert to a wider type before reducing. */ | ||
| 1337 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x); | ||
| 1338 | /*! @abstract Sum of elements in x. | ||
| 1339 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1340 | * may need to convert to a wider type before reducing. */ | ||
| 1341 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x); | ||
| 1342 | /*! @abstract Sum of elements in x. | ||
| 1343 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1344 | * may need to convert to a wider type before reducing. */ | ||
| 1345 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x); | ||
| 1346 | /*! @abstract Sum of elements in x. | ||
| 1347 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1348 | * may need to convert to a wider type before reducing. */ | ||
| 1349 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x); | ||
| 1350 | /*! @abstract Sum of elements in x. | ||
| 1351 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1352 | * may need to convert to a wider type before reducing. */ | ||
| 1353 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x); | ||
| 1354 | /*! @abstract Sum of elements in x. | ||
| 1355 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1356 | * may need to convert to a wider type before reducing. */ | ||
| 1357 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x); | ||
| 1358 | /*! @abstract Sum of elements in x. | ||
| 1359 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1360 | * may need to convert to a wider type before reducing. */ | ||
| 1361 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x); | ||
| 1362 | /*! @abstract Sum of elements in x. | ||
| 1363 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1364 | * may need to convert to a wider type before reducing. */ | ||
| 1365 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x); | ||
| 1366 | /*! @abstract Sum of elements in x. | ||
| 1367 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1368 | * may need to convert to a wider type before reducing. */ | ||
| 1369 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x); | ||
| 1370 | /*! @abstract Sum of elements in x. | ||
| 1371 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1372 | * may need to convert to a wider type before reducing. */ | ||
| 1373 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x); | ||
| 1374 | /*! @abstract Sum of elements in x. | ||
| 1375 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1376 | * may need to convert to a wider type before reducing. */ | ||
| 1377 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x); | ||
| 1378 | /*! @abstract Sum of elements in x. | ||
| 1379 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1380 | * may need to convert to a wider type before reducing. */ | ||
| 1381 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x); | ||
| 1382 | /*! @abstract Sum of elements in x. | ||
| 1383 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1384 | * may need to convert to a wider type before reducing. */ | ||
| 1385 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x); | ||
| 1386 | /*! @abstract Sum of elements in x. | ||
| 1387 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1388 | * may need to convert to a wider type before reducing. */ | ||
| 1389 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x); | ||
| 1390 | /*! @abstract Sum of elements in x. | ||
| 1391 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1392 | * may need to convert to a wider type before reducing. */ | ||
| 1393 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x); | ||
| 1394 | /*! @abstract Sum of elements in x. | ||
| 1395 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1396 | * may need to convert to a wider type before reducing. */ | ||
| 1397 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x); | ||
| 1398 | /*! @abstract Sum of elements in x. | ||
| 1399 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1400 | * may need to convert to a wider type before reducing. */ | ||
| 1401 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x); | ||
| 1402 | /*! @abstract Sum of elements in x. | ||
| 1403 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1404 | * may need to convert to a wider type before reducing. */ | ||
| 1405 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x); | ||
| 1406 | /*! @abstract Sum of elements in x. | ||
| 1407 | * @discussion Deprecated. Use simd_add(x) instead. */ | ||
| 1408 | #define vector_reduce_add simd_reduce_add | ||
| 1409 | |||
| 1410 | /*! @abstract Minimum of elements in x. */ | ||
| 1411 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x); | ||
| 1412 | /*! @abstract Minimum of elements in x. */ | ||
| 1413 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x); | ||
| 1414 | /*! @abstract Minimum of elements in x. */ | ||
| 1415 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x); | ||
| 1416 | /*! @abstract Minimum of elements in x. */ | ||
| 1417 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x); | ||
| 1418 | /*! @abstract Minimum of elements in x. */ | ||
| 1419 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x); | ||
| 1420 | /*! @abstract Minimum of elements in x. */ | ||
| 1421 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x); | ||
| 1422 | /*! @abstract Minimum of elements in x. */ | ||
| 1423 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x); | ||
| 1424 | /*! @abstract Minimum of elements in x. */ | ||
| 1425 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x); | ||
| 1426 | /*! @abstract Minimum of elements in x. */ | ||
| 1427 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x); | ||
| 1428 | /*! @abstract Minimum of elements in x. */ | ||
| 1429 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x); | ||
| 1430 | /*! @abstract Minimum of elements in x. */ | ||
| 1431 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x); | ||
| 1432 | /*! @abstract Minimum of elements in x. */ | ||
| 1433 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x); | ||
| 1434 | /*! @abstract Minimum of elements in x. */ | ||
| 1435 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x); | ||
| 1436 | /*! @abstract Minimum of elements in x. */ | ||
| 1437 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x); | ||
| 1438 | /*! @abstract Minimum of elements in x. */ | ||
| 1439 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x); | ||
| 1440 | /*! @abstract Minimum of elements in x. */ | ||
| 1441 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x); | ||
| 1442 | /*! @abstract Minimum of elements in x. */ | ||
| 1443 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x); | ||
| 1444 | /*! @abstract Minimum of elements in x. */ | ||
| 1445 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x); | ||
| 1446 | /*! @abstract Minimum of elements in x. */ | ||
| 1447 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x); | ||
| 1448 | /*! @abstract Minimum of elements in x. */ | ||
| 1449 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x); | ||
| 1450 | /*! @abstract Minimum of elements in x. */ | ||
| 1451 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x); | ||
| 1452 | /*! @abstract Minimum of elements in x. */ | ||
| 1453 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x); | ||
| 1454 | /*! @abstract Minimum of elements in x. */ | ||
| 1455 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x); | ||
| 1456 | /*! @abstract Minimum of elements in x. */ | ||
| 1457 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x); | ||
| 1458 | /*! @abstract Minimum of elements in x. */ | ||
| 1459 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x); | ||
| 1460 | /*! @abstract Minimum of elements in x. */ | ||
| 1461 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x); | ||
| 1462 | /*! @abstract Minimum of elements in x. */ | ||
| 1463 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x); | ||
| 1464 | /*! @abstract Minimum of elements in x. */ | ||
| 1465 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x); | ||
| 1466 | /*! @abstract Minimum of elements in x. */ | ||
| 1467 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x); | ||
| 1468 | /*! @abstract Minimum of elements in x. */ | ||
| 1469 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x); | ||
| 1470 | /*! @abstract Minimum of elements in x. */ | ||
| 1471 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x); | ||
| 1472 | /*! @abstract Minimum of elements in x. */ | ||
| 1473 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x); | ||
| 1474 | /*! @abstract Minimum of elements in x. */ | ||
| 1475 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x); | ||
| 1476 | /*! @abstract Minimum of elements in x. */ | ||
| 1477 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x); | ||
| 1478 | /*! @abstract Minimum of elements in x. */ | ||
| 1479 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x); | ||
| 1480 | /*! @abstract Minimum of elements in x. */ | ||
| 1481 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x); | ||
| 1482 | /*! @abstract Minimum of elements in x. */ | ||
| 1483 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x); | ||
| 1484 | /*! @abstract Minimum of elements in x. */ | ||
| 1485 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x); | ||
| 1486 | /*! @abstract Minimum of elements in x. */ | ||
| 1487 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x); | ||
| 1488 | /*! @abstract Minimum of elements in x. */ | ||
| 1489 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x); | ||
| 1490 | /*! @abstract Minimum of elements in x. */ | ||
| 1491 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x); | ||
| 1492 | /*! @abstract Minimum of elements in x. */ | ||
| 1493 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x); | ||
| 1494 | /*! @abstract Minimum of elements in x. */ | ||
| 1495 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x); | ||
| 1496 | /*! @abstract Minimum of elements in x. */ | ||
| 1497 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x); | ||
| 1498 | /*! @abstract Minimum of elements in x. */ | ||
| 1499 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x); | ||
| 1500 | /*! @abstract Minimum of elements in x. */ | ||
| 1501 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x); | ||
| 1502 | /*! @abstract Minimum of elements in x. */ | ||
| 1503 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x); | ||
| 1504 | /*! @abstract Minimum of elements in x. */ | ||
| 1505 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x); | ||
| 1506 | /*! @abstract Minimum of elements in x. */ | ||
| 1507 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x); | ||
| 1508 | /*! @abstract Minimum of elements in x. */ | ||
| 1509 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x); | ||
| 1510 | /*! @abstract Minimum of elements in x. */ | ||
| 1511 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x); | ||
| 1512 | /*! @abstract Minimum of elements in x. */ | ||
| 1513 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x); | ||
| 1514 | /*! @abstract Minimum of elements in x. */ | ||
| 1515 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x); | ||
| 1516 | /*! @abstract Minimum of elements in x. | ||
| 1517 | * @discussion Deprecated. Use simd_min(x) instead. */ | ||
| 1518 | #define vector_reduce_min simd_reduce_min | ||
| 1519 | |||
| 1520 | /*! @abstract Maximum of elements in x. */ | ||
| 1521 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x); | ||
| 1522 | /*! @abstract Maximum of elements in x. */ | ||
| 1523 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x); | ||
| 1524 | /*! @abstract Maximum of elements in x. */ | ||
| 1525 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x); | ||
| 1526 | /*! @abstract Maximum of elements in x. */ | ||
| 1527 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x); | ||
| 1528 | /*! @abstract Maximum of elements in x. */ | ||
| 1529 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x); | ||
| 1530 | /*! @abstract Maximum of elements in x. */ | ||
| 1531 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x); | ||
| 1532 | /*! @abstract Maximum of elements in x. */ | ||
| 1533 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x); | ||
| 1534 | /*! @abstract Maximum of elements in x. */ | ||
| 1535 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x); | ||
| 1536 | /*! @abstract Maximum of elements in x. */ | ||
| 1537 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x); | ||
| 1538 | /*! @abstract Maximum of elements in x. */ | ||
| 1539 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x); | ||
| 1540 | /*! @abstract Maximum of elements in x. */ | ||
| 1541 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x); | ||
| 1542 | /*! @abstract Maximum of elements in x. */ | ||
| 1543 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x); | ||
| 1544 | /*! @abstract Maximum of elements in x. */ | ||
| 1545 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x); | ||
| 1546 | /*! @abstract Maximum of elements in x. */ | ||
| 1547 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x); | ||
| 1548 | /*! @abstract Maximum of elements in x. */ | ||
| 1549 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x); | ||
| 1550 | /*! @abstract Maximum of elements in x. */ | ||
| 1551 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x); | ||
| 1552 | /*! @abstract Maximum of elements in x. */ | ||
| 1553 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x); | ||
| 1554 | /*! @abstract Maximum of elements in x. */ | ||
| 1555 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x); | ||
| 1556 | /*! @abstract Maximum of elements in x. */ | ||
| 1557 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x); | ||
| 1558 | /*! @abstract Maximum of elements in x. */ | ||
| 1559 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x); | ||
| 1560 | /*! @abstract Maximum of elements in x. */ | ||
| 1561 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x); | ||
| 1562 | /*! @abstract Maximum of elements in x. */ | ||
| 1563 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x); | ||
| 1564 | /*! @abstract Maximum of elements in x. */ | ||
| 1565 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x); | ||
| 1566 | /*! @abstract Maximum of elements in x. */ | ||
| 1567 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x); | ||
| 1568 | /*! @abstract Maximum of elements in x. */ | ||
| 1569 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x); | ||
| 1570 | /*! @abstract Maximum of elements in x. */ | ||
| 1571 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x); | ||
| 1572 | /*! @abstract Maximum of elements in x. */ | ||
| 1573 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x); | ||
| 1574 | /*! @abstract Maximum of elements in x. */ | ||
| 1575 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x); | ||
| 1576 | /*! @abstract Maximum of elements in x. */ | ||
| 1577 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x); | ||
| 1578 | /*! @abstract Maximum of elements in x. */ | ||
| 1579 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x); | ||
| 1580 | /*! @abstract Maximum of elements in x. */ | ||
| 1581 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x); | ||
| 1582 | /*! @abstract Maximum of elements in x. */ | ||
| 1583 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x); | ||
| 1584 | /*! @abstract Maximum of elements in x. */ | ||
| 1585 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x); | ||
| 1586 | /*! @abstract Maximum of elements in x. */ | ||
| 1587 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x); | ||
| 1588 | /*! @abstract Maximum of elements in x. */ | ||
| 1589 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x); | ||
| 1590 | /*! @abstract Maximum of elements in x. */ | ||
| 1591 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x); | ||
| 1592 | /*! @abstract Maximum of elements in x. */ | ||
| 1593 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x); | ||
| 1594 | /*! @abstract Maximum of elements in x. */ | ||
| 1595 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x); | ||
| 1596 | /*! @abstract Maximum of elements in x. */ | ||
| 1597 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x); | ||
| 1598 | /*! @abstract Maximum of elements in x. */ | ||
| 1599 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x); | ||
| 1600 | /*! @abstract Maximum of elements in x. */ | ||
| 1601 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x); | ||
| 1602 | /*! @abstract Maximum of elements in x. */ | ||
| 1603 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x); | ||
| 1604 | /*! @abstract Maximum of elements in x. */ | ||
| 1605 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x); | ||
| 1606 | /*! @abstract Maximum of elements in x. */ | ||
| 1607 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x); | ||
| 1608 | /*! @abstract Maximum of elements in x. */ | ||
| 1609 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x); | ||
| 1610 | /*! @abstract Maximum of elements in x. */ | ||
| 1611 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x); | ||
| 1612 | /*! @abstract Maximum of elements in x. */ | ||
| 1613 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x); | ||
| 1614 | /*! @abstract Maximum of elements in x. */ | ||
| 1615 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x); | ||
| 1616 | /*! @abstract Maximum of elements in x. */ | ||
| 1617 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x); | ||
| 1618 | /*! @abstract Maximum of elements in x. */ | ||
| 1619 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x); | ||
| 1620 | /*! @abstract Maximum of elements in x. */ | ||
| 1621 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x); | ||
| 1622 | /*! @abstract Maximum of elements in x. */ | ||
| 1623 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x); | ||
| 1624 | /*! @abstract Maximum of elements in x. */ | ||
| 1625 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x); | ||
| 1626 | /*! @abstract Maximum of elements in x. | ||
| 1627 | * @discussion Deprecated. Use simd_max(x) instead. */ | ||
| 1628 | #define vector_reduce_max simd_reduce_max | ||
| 1629 | |||
| 1630 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1631 | * corresponding lane of y. */ | ||
| 1632 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char2 x, simd_char2 y) { | ||
| 1633 | return simd_all(x == y); | ||
| 1634 | } | ||
| 1635 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1636 | * corresponding lane of y. */ | ||
| 1637 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char3 x, simd_char3 y) { | ||
| 1638 | return simd_all(x == y); | ||
| 1639 | } | ||
| 1640 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1641 | * corresponding lane of y. */ | ||
| 1642 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char4 x, simd_char4 y) { | ||
| 1643 | return simd_all(x == y); | ||
| 1644 | } | ||
| 1645 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1646 | * corresponding lane of y. */ | ||
| 1647 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char8 x, simd_char8 y) { | ||
| 1648 | return simd_all(x == y); | ||
| 1649 | } | ||
| 1650 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1651 | * corresponding lane of y. */ | ||
| 1652 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char16 x, simd_char16 y) { | ||
| 1653 | return simd_all(x == y); | ||
| 1654 | } | ||
| 1655 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1656 | * corresponding lane of y. */ | ||
| 1657 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char32 x, simd_char32 y) { | ||
| 1658 | return simd_all(x == y); | ||
| 1659 | } | ||
| 1660 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1661 | * corresponding lane of y. */ | ||
| 1662 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char64 x, simd_char64 y) { | ||
| 1663 | return simd_all(x == y); | ||
| 1664 | } | ||
| 1665 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1666 | * corresponding lane of y. */ | ||
| 1667 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar2 x, simd_uchar2 y) { | ||
| 1668 | return simd_all(x == y); | ||
| 1669 | } | ||
| 1670 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1671 | * corresponding lane of y. */ | ||
| 1672 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar3 x, simd_uchar3 y) { | ||
| 1673 | return simd_all(x == y); | ||
| 1674 | } | ||
| 1675 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1676 | * corresponding lane of y. */ | ||
| 1677 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar4 x, simd_uchar4 y) { | ||
| 1678 | return simd_all(x == y); | ||
| 1679 | } | ||
| 1680 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1681 | * corresponding lane of y. */ | ||
| 1682 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar8 x, simd_uchar8 y) { | ||
| 1683 | return simd_all(x == y); | ||
| 1684 | } | ||
| 1685 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1686 | * corresponding lane of y. */ | ||
| 1687 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar16 x, simd_uchar16 y) { | ||
| 1688 | return simd_all(x == y); | ||
| 1689 | } | ||
| 1690 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1691 | * corresponding lane of y. */ | ||
| 1692 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar32 x, simd_uchar32 y) { | ||
| 1693 | return simd_all(x == y); | ||
| 1694 | } | ||
| 1695 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1696 | * corresponding lane of y. */ | ||
| 1697 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar64 x, simd_uchar64 y) { | ||
| 1698 | return simd_all(x == y); | ||
| 1699 | } | ||
| 1700 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1701 | * corresponding lane of y. */ | ||
| 1702 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short2 x, simd_short2 y) { | ||
| 1703 | return simd_all(x == y); | ||
| 1704 | } | ||
| 1705 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1706 | * corresponding lane of y. */ | ||
| 1707 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short3 x, simd_short3 y) { | ||
| 1708 | return simd_all(x == y); | ||
| 1709 | } | ||
| 1710 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1711 | * corresponding lane of y. */ | ||
| 1712 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short4 x, simd_short4 y) { | ||
| 1713 | return simd_all(x == y); | ||
| 1714 | } | ||
| 1715 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1716 | * corresponding lane of y. */ | ||
| 1717 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short8 x, simd_short8 y) { | ||
| 1718 | return simd_all(x == y); | ||
| 1719 | } | ||
| 1720 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1721 | * corresponding lane of y. */ | ||
| 1722 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short16 x, simd_short16 y) { | ||
| 1723 | return simd_all(x == y); | ||
| 1724 | } | ||
| 1725 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1726 | * corresponding lane of y. */ | ||
| 1727 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short32 x, simd_short32 y) { | ||
| 1728 | return simd_all(x == y); | ||
| 1729 | } | ||
| 1730 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1731 | * corresponding lane of y. */ | ||
| 1732 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort2 x, simd_ushort2 y) { | ||
| 1733 | return simd_all(x == y); | ||
| 1734 | } | ||
| 1735 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1736 | * corresponding lane of y. */ | ||
| 1737 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort3 x, simd_ushort3 y) { | ||
| 1738 | return simd_all(x == y); | ||
| 1739 | } | ||
| 1740 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1741 | * corresponding lane of y. */ | ||
| 1742 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort4 x, simd_ushort4 y) { | ||
| 1743 | return simd_all(x == y); | ||
| 1744 | } | ||
| 1745 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1746 | * corresponding lane of y. */ | ||
| 1747 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort8 x, simd_ushort8 y) { | ||
| 1748 | return simd_all(x == y); | ||
| 1749 | } | ||
| 1750 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1751 | * corresponding lane of y. */ | ||
| 1752 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort16 x, simd_ushort16 y) { | ||
| 1753 | return simd_all(x == y); | ||
| 1754 | } | ||
| 1755 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1756 | * corresponding lane of y. */ | ||
| 1757 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort32 x, simd_ushort32 y) { | ||
| 1758 | return simd_all(x == y); | ||
| 1759 | } | ||
| 1760 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1761 | * corresponding lane of y. */ | ||
| 1762 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int2 x, simd_int2 y) { | ||
| 1763 | return simd_all(x == y); | ||
| 1764 | } | ||
| 1765 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1766 | * corresponding lane of y. */ | ||
| 1767 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int3 x, simd_int3 y) { | ||
| 1768 | return simd_all(x == y); | ||
| 1769 | } | ||
| 1770 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1771 | * corresponding lane of y. */ | ||
| 1772 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int4 x, simd_int4 y) { | ||
| 1773 | return simd_all(x == y); | ||
| 1774 | } | ||
| 1775 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1776 | * corresponding lane of y. */ | ||
| 1777 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int8 x, simd_int8 y) { | ||
| 1778 | return simd_all(x == y); | ||
| 1779 | } | ||
| 1780 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1781 | * corresponding lane of y. */ | ||
| 1782 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int16 x, simd_int16 y) { | ||
| 1783 | return simd_all(x == y); | ||
| 1784 | } | ||
| 1785 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1786 | * corresponding lane of y. */ | ||
| 1787 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint2 x, simd_uint2 y) { | ||
| 1788 | return simd_all(x == y); | ||
| 1789 | } | ||
| 1790 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1791 | * corresponding lane of y. */ | ||
| 1792 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint3 x, simd_uint3 y) { | ||
| 1793 | return simd_all(x == y); | ||
| 1794 | } | ||
| 1795 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1796 | * corresponding lane of y. */ | ||
| 1797 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint4 x, simd_uint4 y) { | ||
| 1798 | return simd_all(x == y); | ||
| 1799 | } | ||
| 1800 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1801 | * corresponding lane of y. */ | ||
| 1802 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint8 x, simd_uint8 y) { | ||
| 1803 | return simd_all(x == y); | ||
| 1804 | } | ||
| 1805 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1806 | * corresponding lane of y. */ | ||
| 1807 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint16 x, simd_uint16 y) { | ||
| 1808 | return simd_all(x == y); | ||
| 1809 | } | ||
| 1810 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1811 | * corresponding lane of y. */ | ||
| 1812 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float2 x, simd_float2 y) { | ||
| 1813 | return simd_all(x == y); | ||
| 1814 | } | ||
| 1815 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1816 | * corresponding lane of y. */ | ||
| 1817 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float3 x, simd_float3 y) { | ||
| 1818 | return simd_all(x == y); | ||
| 1819 | } | ||
| 1820 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1821 | * corresponding lane of y. */ | ||
| 1822 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float4 x, simd_float4 y) { | ||
| 1823 | return simd_all(x == y); | ||
| 1824 | } | ||
| 1825 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1826 | * corresponding lane of y. */ | ||
| 1827 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float8 x, simd_float8 y) { | ||
| 1828 | return simd_all(x == y); | ||
| 1829 | } | ||
| 1830 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1831 | * corresponding lane of y. */ | ||
| 1832 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float16 x, simd_float16 y) { | ||
| 1833 | return simd_all(x == y); | ||
| 1834 | } | ||
| 1835 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1836 | * corresponding lane of y. */ | ||
| 1837 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long2 x, simd_long2 y) { | ||
| 1838 | return simd_all(x == y); | ||
| 1839 | } | ||
| 1840 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1841 | * corresponding lane of y. */ | ||
| 1842 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long3 x, simd_long3 y) { | ||
| 1843 | return simd_all(x == y); | ||
| 1844 | } | ||
| 1845 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1846 | * corresponding lane of y. */ | ||
| 1847 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long4 x, simd_long4 y) { | ||
| 1848 | return simd_all(x == y); | ||
| 1849 | } | ||
| 1850 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1851 | * corresponding lane of y. */ | ||
| 1852 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long8 x, simd_long8 y) { | ||
| 1853 | return simd_all(x == y); | ||
| 1854 | } | ||
| 1855 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1856 | * corresponding lane of y. */ | ||
| 1857 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong2 x, simd_ulong2 y) { | ||
| 1858 | return simd_all(x == y); | ||
| 1859 | } | ||
| 1860 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1861 | * corresponding lane of y. */ | ||
| 1862 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong3 x, simd_ulong3 y) { | ||
| 1863 | return simd_all(x == y); | ||
| 1864 | } | ||
| 1865 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1866 | * corresponding lane of y. */ | ||
| 1867 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong4 x, simd_ulong4 y) { | ||
| 1868 | return simd_all(x == y); | ||
| 1869 | } | ||
| 1870 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1871 | * corresponding lane of y. */ | ||
| 1872 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong8 x, simd_ulong8 y) { | ||
| 1873 | return simd_all(x == y); | ||
| 1874 | } | ||
| 1875 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1876 | * corresponding lane of y. */ | ||
| 1877 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double2 x, simd_double2 y) { | ||
| 1878 | return simd_all(x == y); | ||
| 1879 | } | ||
| 1880 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1881 | * corresponding lane of y. */ | ||
| 1882 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double3 x, simd_double3 y) { | ||
| 1883 | return simd_all(x == y); | ||
| 1884 | } | ||
| 1885 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1886 | * corresponding lane of y. */ | ||
| 1887 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double4 x, simd_double4 y) { | ||
| 1888 | return simd_all(x == y); | ||
| 1889 | } | ||
| 1890 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1891 | * corresponding lane of y. */ | ||
| 1892 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double8 x, simd_double8 y) { | ||
| 1893 | return simd_all(x == y); | ||
| 1894 | } | ||
| 1895 | |||
| 1896 | #ifdef __cplusplus | ||
| 1897 | } /* extern "C" */ | ||
| 1898 | |||
| 1899 | namespace simd { | ||
| 1900 | /*! @abstract The lanewise absolute value of x. */ | ||
| 1901 | template <typename typeN> static SIMD_CPPFUNC typeN abs(const typeN x) { return ::simd_abs(x); } | ||
| 1902 | /*! @abstract The lanewise maximum of x and y. */ | ||
| 1903 | template <typename typeN> static SIMD_CPPFUNC typeN max(const typeN x, const typeN y) { return ::simd_max(x,y); } | ||
| 1904 | /*! @abstract The lanewise minimum of x and y. */ | ||
| 1905 | template <typename typeN> static SIMD_CPPFUNC typeN min(const typeN x, const typeN y) { return ::simd_min(x,y); } | ||
| 1906 | /*! @abstract x clamped to the interval [min, max]. */ | ||
| 1907 | template <typename typeN> static SIMD_CPPFUNC typeN clamp(const typeN x, const typeN min, const typeN max) { return ::simd_clamp(x,min,max); } | ||
| 1908 | /*! @abstract -1 if x < 0, +1 if x > 0, and 0 otherwise. */ | ||
| 1909 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN sign(const fptypeN x) { return ::simd_sign(x); } | ||
| 1910 | /*! @abstract Linearly interpolates between x and y, taking the value x when t=0 and y when t=1 */ | ||
| 1911 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN mix(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); } | ||
| 1912 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN lerp(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); } | ||
| 1913 | /*! @abstract An approximation to 1/x. */ | ||
| 1914 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return simd_recip(x); } | ||
| 1915 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1916 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return simd_rsqrt(x); } | ||
| 1917 | /*! @abstract The "fracional part" of x, in the range [0,1). */ | ||
| 1918 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN fract(const fptypeN x) { return ::simd_fract(x); } | ||
| 1919 | /*! @abstract 0 if x < edge, 1 otherwise. */ | ||
| 1920 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN step(const fptypeN edge, const fptypeN x) { return ::simd_step(edge,x); } | ||
| 1921 | /*! @abstract smoothly interpolates from 0 at edge0 to 1 at edge1. */ | ||
| 1922 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN smoothstep(const fptypeN edge0, const fptypeN edge1, const fptypeN x) { return ::simd_smoothstep(edge0,edge1,x); } | ||
| 1923 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1924 | * corresponding lane of y. | ||
| 1925 | * | ||
| 1926 | * @discussion This isn't operator== because that's already defined by | ||
| 1927 | * the compiler to return a lane mask. */ | ||
| 1928 | template <typename fptypeN> static SIMD_CPPFUNC simd_bool equal(const fptypeN x, const fptypeN y) { return ::simd_equal(x, y); } | ||
| 1929 | #if __cpp_decltype_auto | ||
| 1930 | /* If you are targeting an earlier version of the C++ standard that lacks | ||
| 1931 | decltype_auto support, you may use the C-style simd_reduce_* functions | ||
| 1932 | instead. */ | ||
| 1933 | /*! @abstract The sum of the elements in x. May overflow. */ | ||
| 1934 | template <typename typeN> static SIMD_CPPFUNC auto reduce_add(typeN x) { return ::simd_reduce_add(x); } | ||
| 1935 | /*! @abstract The least element in x. */ | ||
| 1936 | template <typename typeN> static SIMD_CPPFUNC auto reduce_min(typeN x) { return ::simd_reduce_min(x); } | ||
| 1937 | /*! @abstract The greatest element in x. */ | ||
| 1938 | template <typename typeN> static SIMD_CPPFUNC auto reduce_max(typeN x) { return ::simd_reduce_max(x); } | ||
| 1939 | #endif | ||
| 1940 | namespace precise { | ||
| 1941 | /*! @abstract An approximation to 1/x. */ | ||
| 1942 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_precise_recip(x); } | ||
| 1943 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1944 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_precise_rsqrt(x); } | ||
| 1945 | } | ||
| 1946 | namespace fast { | ||
| 1947 | /*! @abstract An approximation to 1/x. */ | ||
| 1948 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_fast_recip(x); } | ||
| 1949 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1950 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_fast_rsqrt(x); } | ||
| 1951 | } | ||
| 1952 | } | ||
| 1953 | |||
| 1954 | extern "C" { | ||
| 1955 | #endif /* __cplusplus */ | ||
| 1956 | |||
| 1957 | #pragma mark - Implementation | ||
| 1958 | |||
| 1959 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x) { | ||
| 1960 | return simd_make_char2(simd_abs(simd_make_char8_undef(x))); | ||
| 1961 | } | ||
| 1962 | |||
| 1963 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x) { | ||
| 1964 | return simd_make_char3(simd_abs(simd_make_char8_undef(x))); | ||
| 1965 | } | ||
| 1966 | |||
| 1967 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x) { | ||
| 1968 | return simd_make_char4(simd_abs(simd_make_char8_undef(x))); | ||
| 1969 | } | ||
| 1970 | |||
| 1971 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x) { | ||
| 1972 | #if defined __arm__ || defined __arm64__ | ||
| 1973 | return vabs_s8(x); | ||
| 1974 | #else | ||
| 1975 | return simd_make_char8(simd_abs(simd_make_char16_undef(x))); | ||
| 1976 | #endif | ||
| 1977 | } | ||
| 1978 | |||
| 1979 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) { | ||
| 1980 | #if defined __arm__ || defined __arm64__ | ||
| 1981 | return vabsq_s8(x); | ||
| 1982 | #elif defined __SSE4_1__ | ||
| 1983 | return (simd_char16) _mm_abs_epi8((__m128i)x); | ||
| 1984 | #else | ||
| 1985 | simd_char16 mask = x >> 7; return (x ^ mask) - mask; | ||
| 1986 | #endif | ||
| 1987 | } | ||
| 1988 | |||
| 1989 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x) { | ||
| 1990 | #if defined __AVX2__ | ||
| 1991 | return _mm256_abs_epi8(x); | ||
| 1992 | #else | ||
| 1993 | return simd_make_char32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 1994 | #endif | ||
| 1995 | } | ||
| 1996 | |||
| 1997 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x) { | ||
| 1998 | #if defined __AVX512BW__ | ||
| 1999 | return _mm512_abs_epi8(x); | ||
| 2000 | #else | ||
| 2001 | return simd_make_char64(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2002 | #endif | ||
| 2003 | } | ||
| 2004 | |||
| 2005 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x) { | ||
| 2006 | return simd_make_short2(simd_abs(simd_make_short4_undef(x))); | ||
| 2007 | } | ||
| 2008 | |||
| 2009 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x) { | ||
| 2010 | return simd_make_short3(simd_abs(simd_make_short4_undef(x))); | ||
| 2011 | } | ||
| 2012 | |||
| 2013 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x) { | ||
| 2014 | #if defined __arm__ || defined __arm64__ | ||
| 2015 | return vabs_s16(x); | ||
| 2016 | #else | ||
| 2017 | return simd_make_short4(simd_abs(simd_make_short8_undef(x))); | ||
| 2018 | #endif | ||
| 2019 | } | ||
| 2020 | |||
| 2021 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) { | ||
| 2022 | #if defined __arm__ || defined __arm64__ | ||
| 2023 | return vabsq_s16(x); | ||
| 2024 | #elif defined __SSE4_1__ | ||
| 2025 | return (simd_short8) _mm_abs_epi16((__m128i)x); | ||
| 2026 | #else | ||
| 2027 | simd_short8 mask = x >> 15; return (x ^ mask) - mask; | ||
| 2028 | #endif | ||
| 2029 | } | ||
| 2030 | |||
| 2031 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x) { | ||
| 2032 | #if defined __AVX2__ | ||
| 2033 | return _mm256_abs_epi16(x); | ||
| 2034 | #else | ||
| 2035 | return simd_make_short16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2036 | #endif | ||
| 2037 | } | ||
| 2038 | |||
| 2039 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x) { | ||
| 2040 | #if defined __AVX512BW__ | ||
| 2041 | return _mm512_abs_epi16(x); | ||
| 2042 | #else | ||
| 2043 | return simd_make_short32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2044 | #endif | ||
| 2045 | } | ||
| 2046 | |||
| 2047 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x) { | ||
| 2048 | #if defined __arm__ || defined __arm64__ | ||
| 2049 | return vabs_s32(x); | ||
| 2050 | #else | ||
| 2051 | return simd_make_int2(simd_abs(simd_make_int4_undef(x))); | ||
| 2052 | #endif | ||
| 2053 | } | ||
| 2054 | |||
| 2055 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x) { | ||
| 2056 | return simd_make_int3(simd_abs(simd_make_int4_undef(x))); | ||
| 2057 | } | ||
| 2058 | |||
| 2059 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) { | ||
| 2060 | #if defined __arm__ || defined __arm64__ | ||
| 2061 | return vabsq_s32(x); | ||
| 2062 | #elif defined __SSE4_1__ | ||
| 2063 | return (simd_int4) _mm_abs_epi32((__m128i)x); | ||
| 2064 | #else | ||
| 2065 | simd_int4 mask = x >> 31; return (x ^ mask) - mask; | ||
| 2066 | #endif | ||
| 2067 | } | ||
| 2068 | |||
| 2069 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x) { | ||
| 2070 | #if defined __AVX2__ | ||
| 2071 | return _mm256_abs_epi32(x); | ||
| 2072 | #else | ||
| 2073 | return simd_make_int8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2074 | #endif | ||
| 2075 | } | ||
| 2076 | |||
| 2077 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x) { | ||
| 2078 | #if defined __AVX512F__ | ||
| 2079 | return _mm512_abs_epi32(x); | ||
| 2080 | #else | ||
| 2081 | return simd_make_int16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2082 | #endif | ||
| 2083 | } | ||
| 2084 | |||
| 2085 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x) { | ||
| 2086 | return __tg_fabs(x); | ||
| 2087 | } | ||
| 2088 | |||
| 2089 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x) { | ||
| 2090 | return __tg_fabs(x); | ||
| 2091 | } | ||
| 2092 | |||
| 2093 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x) { | ||
| 2094 | return __tg_fabs(x); | ||
| 2095 | } | ||
| 2096 | |||
| 2097 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x) { | ||
| 2098 | return __tg_fabs(x); | ||
| 2099 | } | ||
| 2100 | |||
| 2101 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x) { | ||
| 2102 | return __tg_fabs(x); | ||
| 2103 | } | ||
| 2104 | |||
| 2105 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) { | ||
| 2106 | #if defined __arm64__ | ||
| 2107 | return vabsq_s64(x); | ||
| 2108 | #elif defined __AVX512VL__ | ||
| 2109 | return (simd_long2) _mm_abs_epi64((__m128i)x); | ||
| 2110 | #else | ||
| 2111 | simd_long2 mask = x >> 63; return (x ^ mask) - mask; | ||
| 2112 | #endif | ||
| 2113 | } | ||
| 2114 | |||
| 2115 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x) { | ||
| 2116 | return simd_make_long3(simd_abs(simd_make_long4_undef(x))); | ||
| 2117 | } | ||
| 2118 | |||
| 2119 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x) { | ||
| 2120 | #if defined __AVX512VL__ | ||
| 2121 | return _mm256_abs_epi64(x); | ||
| 2122 | #else | ||
| 2123 | return simd_make_long4(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2124 | #endif | ||
| 2125 | } | ||
| 2126 | |||
| 2127 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x) { | ||
| 2128 | #if defined __AVX512F__ | ||
| 2129 | return _mm512_abs_epi64(x); | ||
| 2130 | #else | ||
| 2131 | return simd_make_long8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2132 | #endif | ||
| 2133 | } | ||
| 2134 | |||
| 2135 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x) { | ||
| 2136 | return __tg_fabs(x); | ||
| 2137 | } | ||
| 2138 | |||
| 2139 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x) { | ||
| 2140 | return __tg_fabs(x); | ||
| 2141 | } | ||
| 2142 | |||
| 2143 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x) { | ||
| 2144 | return __tg_fabs(x); | ||
| 2145 | } | ||
| 2146 | |||
| 2147 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x) { | ||
| 2148 | return __tg_fabs(x); | ||
| 2149 | } | ||
| 2150 | |||
| 2151 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y) { | ||
| 2152 | return simd_make_char2(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2153 | } | ||
| 2154 | |||
| 2155 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y) { | ||
| 2156 | return simd_make_char3(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2157 | } | ||
| 2158 | |||
| 2159 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y) { | ||
| 2160 | return simd_make_char4(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2161 | } | ||
| 2162 | |||
| 2163 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y) { | ||
| 2164 | #if defined __arm__ || defined __arm64__ | ||
| 2165 | return vmin_s8(x, y); | ||
| 2166 | #else | ||
| 2167 | return simd_make_char8(simd_min(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2168 | #endif | ||
| 2169 | |||
| 2170 | } | ||
| 2171 | |||
| 2172 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) { | ||
| 2173 | #if defined __arm__ || defined __arm64__ | ||
| 2174 | return vminq_s8(x, y); | ||
| 2175 | #elif defined __SSE4_1__ | ||
| 2176 | return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y); | ||
| 2177 | #else | ||
| 2178 | return simd_bitselect(x, y, y < x); | ||
| 2179 | #endif | ||
| 2180 | } | ||
| 2181 | |||
| 2182 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y) { | ||
| 2183 | #if defined __AVX2__ | ||
| 2184 | return _mm256_min_epi8(x, y); | ||
| 2185 | #else | ||
| 2186 | return simd_bitselect(x, y, y < x); | ||
| 2187 | #endif | ||
| 2188 | } | ||
| 2189 | |||
| 2190 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y) { | ||
| 2191 | #if defined __AVX512BW__ | ||
| 2192 | return _mm512_min_epi8(x, y); | ||
| 2193 | #else | ||
| 2194 | return simd_bitselect(x, y, y < x); | ||
| 2195 | #endif | ||
| 2196 | } | ||
| 2197 | |||
| 2198 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y) { | ||
| 2199 | return simd_make_uchar2(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2200 | } | ||
| 2201 | |||
| 2202 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y) { | ||
| 2203 | return simd_make_uchar3(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2204 | } | ||
| 2205 | |||
| 2206 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y) { | ||
| 2207 | return simd_make_uchar4(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2208 | } | ||
| 2209 | |||
| 2210 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y) { | ||
| 2211 | #if defined __arm__ || defined __arm64__ | ||
| 2212 | return vmin_u8(x, y); | ||
| 2213 | #else | ||
| 2214 | return simd_make_uchar8(simd_min(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2215 | #endif | ||
| 2216 | |||
| 2217 | } | ||
| 2218 | |||
| 2219 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) { | ||
| 2220 | #if defined __arm__ || defined __arm64__ | ||
| 2221 | return vminq_u8(x, y); | ||
| 2222 | #elif defined __SSE4_1__ | ||
| 2223 | return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y); | ||
| 2224 | #else | ||
| 2225 | return simd_bitselect(x, y, y < x); | ||
| 2226 | #endif | ||
| 2227 | } | ||
| 2228 | |||
| 2229 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y) { | ||
| 2230 | #if defined __AVX2__ | ||
| 2231 | return _mm256_min_epu8(x, y); | ||
| 2232 | #else | ||
| 2233 | return simd_bitselect(x, y, y < x); | ||
| 2234 | #endif | ||
| 2235 | } | ||
| 2236 | |||
| 2237 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y) { | ||
| 2238 | #if defined __AVX512BW__ | ||
| 2239 | return _mm512_min_epu8(x, y); | ||
| 2240 | #else | ||
| 2241 | return simd_bitselect(x, y, y < x); | ||
| 2242 | #endif | ||
| 2243 | } | ||
| 2244 | |||
| 2245 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y) { | ||
| 2246 | return simd_make_short2(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2247 | } | ||
| 2248 | |||
| 2249 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y) { | ||
| 2250 | return simd_make_short3(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2251 | } | ||
| 2252 | |||
| 2253 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y) { | ||
| 2254 | #if defined __arm__ || defined __arm64__ | ||
| 2255 | return vmin_s16(x, y); | ||
| 2256 | #else | ||
| 2257 | return simd_make_short4(simd_min(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2258 | #endif | ||
| 2259 | |||
| 2260 | } | ||
| 2261 | |||
| 2262 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) { | ||
| 2263 | #if defined __arm__ || defined __arm64__ | ||
| 2264 | return vminq_s16(x, y); | ||
| 2265 | #elif defined __SSE4_1__ | ||
| 2266 | return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y); | ||
| 2267 | #else | ||
| 2268 | return simd_bitselect(x, y, y < x); | ||
| 2269 | #endif | ||
| 2270 | } | ||
| 2271 | |||
| 2272 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y) { | ||
| 2273 | #if defined __AVX2__ | ||
| 2274 | return _mm256_min_epi16(x, y); | ||
| 2275 | #else | ||
| 2276 | return simd_bitselect(x, y, y < x); | ||
| 2277 | #endif | ||
| 2278 | } | ||
| 2279 | |||
| 2280 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y) { | ||
| 2281 | #if defined __AVX512BW__ | ||
| 2282 | return _mm512_min_epi16(x, y); | ||
| 2283 | #else | ||
| 2284 | return simd_bitselect(x, y, y < x); | ||
| 2285 | #endif | ||
| 2286 | } | ||
| 2287 | |||
| 2288 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y) { | ||
| 2289 | return simd_make_ushort2(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2290 | } | ||
| 2291 | |||
| 2292 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y) { | ||
| 2293 | return simd_make_ushort3(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2294 | } | ||
| 2295 | |||
| 2296 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y) { | ||
| 2297 | #if defined __arm__ || defined __arm64__ | ||
| 2298 | return vmin_u16(x, y); | ||
| 2299 | #else | ||
| 2300 | return simd_make_ushort4(simd_min(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2301 | #endif | ||
| 2302 | |||
| 2303 | } | ||
| 2304 | |||
| 2305 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) { | ||
| 2306 | #if defined __arm__ || defined __arm64__ | ||
| 2307 | return vminq_u16(x, y); | ||
| 2308 | #elif defined __SSE4_1__ | ||
| 2309 | return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y); | ||
| 2310 | #else | ||
| 2311 | return simd_bitselect(x, y, y < x); | ||
| 2312 | #endif | ||
| 2313 | } | ||
| 2314 | |||
| 2315 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y) { | ||
| 2316 | #if defined __AVX2__ | ||
| 2317 | return _mm256_min_epu16(x, y); | ||
| 2318 | #else | ||
| 2319 | return simd_bitselect(x, y, y < x); | ||
| 2320 | #endif | ||
| 2321 | } | ||
| 2322 | |||
| 2323 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y) { | ||
| 2324 | #if defined __AVX512BW__ | ||
| 2325 | return _mm512_min_epu16(x, y); | ||
| 2326 | #else | ||
| 2327 | return simd_bitselect(x, y, y < x); | ||
| 2328 | #endif | ||
| 2329 | } | ||
| 2330 | |||
| 2331 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y) { | ||
| 2332 | #if defined __arm__ || defined __arm64__ | ||
| 2333 | return vmin_s32(x, y); | ||
| 2334 | #else | ||
| 2335 | return simd_make_int2(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2336 | #endif | ||
| 2337 | |||
| 2338 | } | ||
| 2339 | |||
| 2340 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y) { | ||
| 2341 | return simd_make_int3(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2342 | } | ||
| 2343 | |||
| 2344 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) { | ||
| 2345 | #if defined __arm__ || defined __arm64__ | ||
| 2346 | return vminq_s32(x, y); | ||
| 2347 | #elif defined __SSE4_1__ | ||
| 2348 | return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y); | ||
| 2349 | #else | ||
| 2350 | return simd_bitselect(x, y, y < x); | ||
| 2351 | #endif | ||
| 2352 | } | ||
| 2353 | |||
| 2354 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y) { | ||
| 2355 | #if defined __AVX2__ | ||
| 2356 | return _mm256_min_epi32(x, y); | ||
| 2357 | #else | ||
| 2358 | return simd_bitselect(x, y, y < x); | ||
| 2359 | #endif | ||
| 2360 | } | ||
| 2361 | |||
| 2362 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y) { | ||
| 2363 | #if defined __AVX512F__ | ||
| 2364 | return _mm512_min_epi32(x, y); | ||
| 2365 | #else | ||
| 2366 | return simd_bitselect(x, y, y < x); | ||
| 2367 | #endif | ||
| 2368 | } | ||
| 2369 | |||
| 2370 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y) { | ||
| 2371 | #if defined __arm__ || defined __arm64__ | ||
| 2372 | return vmin_u32(x, y); | ||
| 2373 | #else | ||
| 2374 | return simd_make_uint2(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2375 | #endif | ||
| 2376 | |||
| 2377 | } | ||
| 2378 | |||
| 2379 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y) { | ||
| 2380 | return simd_make_uint3(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2381 | } | ||
| 2382 | |||
| 2383 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) { | ||
| 2384 | #if defined __arm__ || defined __arm64__ | ||
| 2385 | return vminq_u32(x, y); | ||
| 2386 | #elif defined __SSE4_1__ | ||
| 2387 | return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y); | ||
| 2388 | #else | ||
| 2389 | return simd_bitselect(x, y, y < x); | ||
| 2390 | #endif | ||
| 2391 | } | ||
| 2392 | |||
| 2393 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y) { | ||
| 2394 | #if defined __AVX2__ | ||
| 2395 | return _mm256_min_epu32(x, y); | ||
| 2396 | #else | ||
| 2397 | return simd_bitselect(x, y, y < x); | ||
| 2398 | #endif | ||
| 2399 | } | ||
| 2400 | |||
| 2401 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y) { | ||
| 2402 | #if defined __AVX512F__ | ||
| 2403 | return _mm512_min_epu32(x, y); | ||
| 2404 | #else | ||
| 2405 | return simd_bitselect(x, y, y < x); | ||
| 2406 | #endif | ||
| 2407 | } | ||
| 2408 | |||
| 2409 | static inline SIMD_CFUNC float simd_min(float x, float y) { | ||
| 2410 | return __tg_fmin(x,y); | ||
| 2411 | } | ||
| 2412 | |||
| 2413 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y) { | ||
| 2414 | return __tg_fmin(x,y); | ||
| 2415 | } | ||
| 2416 | |||
| 2417 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y) { | ||
| 2418 | return __tg_fmin(x,y); | ||
| 2419 | } | ||
| 2420 | |||
| 2421 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y) { | ||
| 2422 | return __tg_fmin(x,y); | ||
| 2423 | } | ||
| 2424 | |||
| 2425 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y) { | ||
| 2426 | return __tg_fmin(x,y); | ||
| 2427 | } | ||
| 2428 | |||
| 2429 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y) { | ||
| 2430 | return __tg_fmin(x,y); | ||
| 2431 | } | ||
| 2432 | |||
| 2433 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y) { | ||
| 2434 | #if defined __AVX512VL__ | ||
| 2435 | return _mm_min_epi64(x, y); | ||
| 2436 | #else | ||
| 2437 | return simd_bitselect(x, y, y < x); | ||
| 2438 | #endif | ||
| 2439 | } | ||
| 2440 | |||
| 2441 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y) { | ||
| 2442 | return simd_make_long3(simd_min(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2443 | } | ||
| 2444 | |||
| 2445 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y) { | ||
| 2446 | #if defined __AVX512VL__ | ||
| 2447 | return _mm256_min_epi64(x, y); | ||
| 2448 | #else | ||
| 2449 | return simd_bitselect(x, y, y < x); | ||
| 2450 | #endif | ||
| 2451 | } | ||
| 2452 | |||
| 2453 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y) { | ||
| 2454 | #if defined __AVX512F__ | ||
| 2455 | return _mm512_min_epi64(x, y); | ||
| 2456 | #else | ||
| 2457 | return simd_bitselect(x, y, y < x); | ||
| 2458 | #endif | ||
| 2459 | } | ||
| 2460 | |||
| 2461 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y) { | ||
| 2462 | #if defined __AVX512VL__ | ||
| 2463 | return _mm_min_epu64(x, y); | ||
| 2464 | #else | ||
| 2465 | return simd_bitselect(x, y, y < x); | ||
| 2466 | #endif | ||
| 2467 | } | ||
| 2468 | |||
| 2469 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y) { | ||
| 2470 | return simd_make_ulong3(simd_min(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2471 | } | ||
| 2472 | |||
| 2473 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y) { | ||
| 2474 | #if defined __AVX512VL__ | ||
| 2475 | return _mm256_min_epu64(x, y); | ||
| 2476 | #else | ||
| 2477 | return simd_bitselect(x, y, y < x); | ||
| 2478 | #endif | ||
| 2479 | } | ||
| 2480 | |||
| 2481 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y) { | ||
| 2482 | #if defined __AVX512F__ | ||
| 2483 | return _mm512_min_epu64(x, y); | ||
| 2484 | #else | ||
| 2485 | return simd_bitselect(x, y, y < x); | ||
| 2486 | #endif | ||
| 2487 | } | ||
| 2488 | |||
| 2489 | static inline SIMD_CFUNC double simd_min(double x, double y) { | ||
| 2490 | return __tg_fmin(x,y); | ||
| 2491 | } | ||
| 2492 | |||
| 2493 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y) { | ||
| 2494 | return __tg_fmin(x,y); | ||
| 2495 | } | ||
| 2496 | |||
| 2497 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y) { | ||
| 2498 | return __tg_fmin(x,y); | ||
| 2499 | } | ||
| 2500 | |||
| 2501 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y) { | ||
| 2502 | return __tg_fmin(x,y); | ||
| 2503 | } | ||
| 2504 | |||
| 2505 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y) { | ||
| 2506 | return __tg_fmin(x,y); | ||
| 2507 | } | ||
| 2508 | |||
| 2509 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y) { | ||
| 2510 | return simd_make_char2(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2511 | } | ||
| 2512 | |||
| 2513 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y) { | ||
| 2514 | return simd_make_char3(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2515 | } | ||
| 2516 | |||
| 2517 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y) { | ||
| 2518 | return simd_make_char4(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2519 | } | ||
| 2520 | |||
| 2521 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y) { | ||
| 2522 | #if defined __arm__ || defined __arm64__ | ||
| 2523 | return vmax_s8(x, y); | ||
| 2524 | #else | ||
| 2525 | return simd_make_char8(simd_max(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2526 | #endif | ||
| 2527 | |||
| 2528 | } | ||
| 2529 | |||
| 2530 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) { | ||
| 2531 | #if defined __arm__ || defined __arm64__ | ||
| 2532 | return vmaxq_s8(x, y); | ||
| 2533 | #elif defined __SSE4_1__ | ||
| 2534 | return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y); | ||
| 2535 | #else | ||
| 2536 | return simd_bitselect(x, y, x < y); | ||
| 2537 | #endif | ||
| 2538 | } | ||
| 2539 | |||
| 2540 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y) { | ||
| 2541 | #if defined __AVX2__ | ||
| 2542 | return _mm256_max_epi8(x, y); | ||
| 2543 | #else | ||
| 2544 | return simd_bitselect(x, y, x < y); | ||
| 2545 | #endif | ||
| 2546 | } | ||
| 2547 | |||
| 2548 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y) { | ||
| 2549 | #if defined __AVX512BW__ | ||
| 2550 | return _mm512_max_epi8(x, y); | ||
| 2551 | #else | ||
| 2552 | return simd_bitselect(x, y, x < y); | ||
| 2553 | #endif | ||
| 2554 | } | ||
| 2555 | |||
| 2556 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y) { | ||
| 2557 | return simd_make_uchar2(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2558 | } | ||
| 2559 | |||
| 2560 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y) { | ||
| 2561 | return simd_make_uchar3(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2562 | } | ||
| 2563 | |||
| 2564 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y) { | ||
| 2565 | return simd_make_uchar4(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2566 | } | ||
| 2567 | |||
| 2568 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y) { | ||
| 2569 | #if defined __arm__ || defined __arm64__ | ||
| 2570 | return vmax_u8(x, y); | ||
| 2571 | #else | ||
| 2572 | return simd_make_uchar8(simd_max(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2573 | #endif | ||
| 2574 | |||
| 2575 | } | ||
| 2576 | |||
| 2577 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) { | ||
| 2578 | #if defined __arm__ || defined __arm64__ | ||
| 2579 | return vmaxq_u8(x, y); | ||
| 2580 | #elif defined __SSE4_1__ | ||
| 2581 | return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y); | ||
| 2582 | #else | ||
| 2583 | return simd_bitselect(x, y, x < y); | ||
| 2584 | #endif | ||
| 2585 | } | ||
| 2586 | |||
| 2587 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y) { | ||
| 2588 | #if defined __AVX2__ | ||
| 2589 | return _mm256_max_epu8(x, y); | ||
| 2590 | #else | ||
| 2591 | return simd_bitselect(x, y, x < y); | ||
| 2592 | #endif | ||
| 2593 | } | ||
| 2594 | |||
| 2595 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y) { | ||
| 2596 | #if defined __AVX512BW__ | ||
| 2597 | return _mm512_max_epu8(x, y); | ||
| 2598 | #else | ||
| 2599 | return simd_bitselect(x, y, x < y); | ||
| 2600 | #endif | ||
| 2601 | } | ||
| 2602 | |||
| 2603 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y) { | ||
| 2604 | return simd_make_short2(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2605 | } | ||
| 2606 | |||
| 2607 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y) { | ||
| 2608 | return simd_make_short3(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2609 | } | ||
| 2610 | |||
| 2611 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y) { | ||
| 2612 | #if defined __arm__ || defined __arm64__ | ||
| 2613 | return vmax_s16(x, y); | ||
| 2614 | #else | ||
| 2615 | return simd_make_short4(simd_max(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2616 | #endif | ||
| 2617 | |||
| 2618 | } | ||
| 2619 | |||
| 2620 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) { | ||
| 2621 | #if defined __arm__ || defined __arm64__ | ||
| 2622 | return vmaxq_s16(x, y); | ||
| 2623 | #elif defined __SSE4_1__ | ||
| 2624 | return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y); | ||
| 2625 | #else | ||
| 2626 | return simd_bitselect(x, y, x < y); | ||
| 2627 | #endif | ||
| 2628 | } | ||
| 2629 | |||
| 2630 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y) { | ||
| 2631 | #if defined __AVX2__ | ||
| 2632 | return _mm256_max_epi16(x, y); | ||
| 2633 | #else | ||
| 2634 | return simd_bitselect(x, y, x < y); | ||
| 2635 | #endif | ||
| 2636 | } | ||
| 2637 | |||
| 2638 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y) { | ||
| 2639 | #if defined __AVX512BW__ | ||
| 2640 | return _mm512_max_epi16(x, y); | ||
| 2641 | #else | ||
| 2642 | return simd_bitselect(x, y, x < y); | ||
| 2643 | #endif | ||
| 2644 | } | ||
| 2645 | |||
| 2646 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y) { | ||
| 2647 | return simd_make_ushort2(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2648 | } | ||
| 2649 | |||
| 2650 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y) { | ||
| 2651 | return simd_make_ushort3(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2652 | } | ||
| 2653 | |||
| 2654 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y) { | ||
| 2655 | #if defined __arm__ || defined __arm64__ | ||
| 2656 | return vmax_u16(x, y); | ||
| 2657 | #else | ||
| 2658 | return simd_make_ushort4(simd_max(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2659 | #endif | ||
| 2660 | |||
| 2661 | } | ||
| 2662 | |||
| 2663 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) { | ||
| 2664 | #if defined __arm__ || defined __arm64__ | ||
| 2665 | return vmaxq_u16(x, y); | ||
| 2666 | #elif defined __SSE4_1__ | ||
| 2667 | return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y); | ||
| 2668 | #else | ||
| 2669 | return simd_bitselect(x, y, x < y); | ||
| 2670 | #endif | ||
| 2671 | } | ||
| 2672 | |||
| 2673 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y) { | ||
| 2674 | #if defined __AVX2__ | ||
| 2675 | return _mm256_max_epu16(x, y); | ||
| 2676 | #else | ||
| 2677 | return simd_bitselect(x, y, x < y); | ||
| 2678 | #endif | ||
| 2679 | } | ||
| 2680 | |||
| 2681 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y) { | ||
| 2682 | #if defined __AVX512BW__ | ||
| 2683 | return _mm512_max_epu16(x, y); | ||
| 2684 | #else | ||
| 2685 | return simd_bitselect(x, y, x < y); | ||
| 2686 | #endif | ||
| 2687 | } | ||
| 2688 | |||
| 2689 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y) { | ||
| 2690 | #if defined __arm__ || defined __arm64__ | ||
| 2691 | return vmax_s32(x, y); | ||
| 2692 | #else | ||
| 2693 | return simd_make_int2(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2694 | #endif | ||
| 2695 | |||
| 2696 | } | ||
| 2697 | |||
| 2698 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y) { | ||
| 2699 | return simd_make_int3(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2700 | } | ||
| 2701 | |||
| 2702 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) { | ||
| 2703 | #if defined __arm__ || defined __arm64__ | ||
| 2704 | return vmaxq_s32(x, y); | ||
| 2705 | #elif defined __SSE4_1__ | ||
| 2706 | return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y); | ||
| 2707 | #else | ||
| 2708 | return simd_bitselect(x, y, x < y); | ||
| 2709 | #endif | ||
| 2710 | } | ||
| 2711 | |||
| 2712 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y) { | ||
| 2713 | #if defined __AVX2__ | ||
| 2714 | return _mm256_max_epi32(x, y); | ||
| 2715 | #else | ||
| 2716 | return simd_bitselect(x, y, x < y); | ||
| 2717 | #endif | ||
| 2718 | } | ||
| 2719 | |||
| 2720 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y) { | ||
| 2721 | #if defined __AVX512F__ | ||
| 2722 | return _mm512_max_epi32(x, y); | ||
| 2723 | #else | ||
| 2724 | return simd_bitselect(x, y, x < y); | ||
| 2725 | #endif | ||
| 2726 | } | ||
| 2727 | |||
| 2728 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y) { | ||
| 2729 | #if defined __arm__ || defined __arm64__ | ||
| 2730 | return vmax_u32(x, y); | ||
| 2731 | #else | ||
| 2732 | return simd_make_uint2(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2733 | #endif | ||
| 2734 | |||
| 2735 | } | ||
| 2736 | |||
| 2737 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y) { | ||
| 2738 | return simd_make_uint3(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2739 | } | ||
| 2740 | |||
| 2741 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) { | ||
| 2742 | #if defined __arm__ || defined __arm64__ | ||
| 2743 | return vmaxq_u32(x, y); | ||
| 2744 | #elif defined __SSE4_1__ | ||
| 2745 | return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y); | ||
| 2746 | #else | ||
| 2747 | return simd_bitselect(x, y, x < y); | ||
| 2748 | #endif | ||
| 2749 | } | ||
| 2750 | |||
| 2751 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y) { | ||
| 2752 | #if defined __AVX2__ | ||
| 2753 | return _mm256_max_epu32(x, y); | ||
| 2754 | #else | ||
| 2755 | return simd_bitselect(x, y, x < y); | ||
| 2756 | #endif | ||
| 2757 | } | ||
| 2758 | |||
| 2759 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y) { | ||
| 2760 | #if defined __AVX512F__ | ||
| 2761 | return _mm512_max_epu32(x, y); | ||
| 2762 | #else | ||
| 2763 | return simd_bitselect(x, y, x < y); | ||
| 2764 | #endif | ||
| 2765 | } | ||
| 2766 | |||
| 2767 | static inline SIMD_CFUNC float simd_max(float x, float y) { | ||
| 2768 | return __tg_fmax(x,y); | ||
| 2769 | } | ||
| 2770 | |||
| 2771 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y) { | ||
| 2772 | return __tg_fmax(x,y); | ||
| 2773 | } | ||
| 2774 | |||
| 2775 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y) { | ||
| 2776 | return __tg_fmax(x,y); | ||
| 2777 | } | ||
| 2778 | |||
| 2779 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y) { | ||
| 2780 | return __tg_fmax(x,y); | ||
| 2781 | } | ||
| 2782 | |||
| 2783 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y) { | ||
| 2784 | return __tg_fmax(x,y); | ||
| 2785 | } | ||
| 2786 | |||
| 2787 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y) { | ||
| 2788 | return __tg_fmax(x,y); | ||
| 2789 | } | ||
| 2790 | |||
| 2791 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y) { | ||
| 2792 | #if defined __AVX512VL__ | ||
| 2793 | return _mm_max_epi64(x, y); | ||
| 2794 | #else | ||
| 2795 | return simd_bitselect(x, y, x < y); | ||
| 2796 | #endif | ||
| 2797 | } | ||
| 2798 | |||
| 2799 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y) { | ||
| 2800 | return simd_make_long3(simd_max(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2801 | } | ||
| 2802 | |||
| 2803 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y) { | ||
| 2804 | #if defined __AVX512VL__ | ||
| 2805 | return _mm256_max_epi64(x, y); | ||
| 2806 | #else | ||
| 2807 | return simd_bitselect(x, y, x < y); | ||
| 2808 | #endif | ||
| 2809 | } | ||
| 2810 | |||
| 2811 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y) { | ||
| 2812 | #if defined __AVX512F__ | ||
| 2813 | return _mm512_max_epi64(x, y); | ||
| 2814 | #else | ||
| 2815 | return simd_bitselect(x, y, x < y); | ||
| 2816 | #endif | ||
| 2817 | } | ||
| 2818 | |||
| 2819 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y) { | ||
| 2820 | #if defined __AVX512VL__ | ||
| 2821 | return _mm_max_epu64(x, y); | ||
| 2822 | #else | ||
| 2823 | return simd_bitselect(x, y, x < y); | ||
| 2824 | #endif | ||
| 2825 | } | ||
| 2826 | |||
| 2827 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y) { | ||
| 2828 | return simd_make_ulong3(simd_max(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2829 | } | ||
| 2830 | |||
| 2831 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y) { | ||
| 2832 | #if defined __AVX512VL__ | ||
| 2833 | return _mm256_max_epu64(x, y); | ||
| 2834 | #else | ||
| 2835 | return simd_bitselect(x, y, x < y); | ||
| 2836 | #endif | ||
| 2837 | } | ||
| 2838 | |||
| 2839 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y) { | ||
| 2840 | #if defined __AVX512F__ | ||
| 2841 | return _mm512_max_epu64(x, y); | ||
| 2842 | #else | ||
| 2843 | return simd_bitselect(x, y, x < y); | ||
| 2844 | #endif | ||
| 2845 | } | ||
| 2846 | |||
| 2847 | static inline SIMD_CFUNC double simd_max(double x, double y) { | ||
| 2848 | return __tg_fmax(x,y); | ||
| 2849 | } | ||
| 2850 | |||
| 2851 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y) { | ||
| 2852 | return __tg_fmax(x,y); | ||
| 2853 | } | ||
| 2854 | |||
| 2855 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y) { | ||
| 2856 | return __tg_fmax(x,y); | ||
| 2857 | } | ||
| 2858 | |||
| 2859 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y) { | ||
| 2860 | return __tg_fmax(x,y); | ||
| 2861 | } | ||
| 2862 | |||
| 2863 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y) { | ||
| 2864 | return __tg_fmax(x,y); | ||
| 2865 | } | ||
| 2866 | |||
| 2867 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max) { | ||
| 2868 | return simd_min(simd_max(x, min), max); | ||
| 2869 | } | ||
| 2870 | |||
| 2871 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max) { | ||
| 2872 | return simd_min(simd_max(x, min), max); | ||
| 2873 | } | ||
| 2874 | |||
| 2875 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max) { | ||
| 2876 | return simd_min(simd_max(x, min), max); | ||
| 2877 | } | ||
| 2878 | |||
| 2879 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max) { | ||
| 2880 | return simd_min(simd_max(x, min), max); | ||
| 2881 | } | ||
| 2882 | |||
| 2883 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max) { | ||
| 2884 | return simd_min(simd_max(x, min), max); | ||
| 2885 | } | ||
| 2886 | |||
| 2887 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max) { | ||
| 2888 | return simd_min(simd_max(x, min), max); | ||
| 2889 | } | ||
| 2890 | |||
| 2891 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max) { | ||
| 2892 | return simd_min(simd_max(x, min), max); | ||
| 2893 | } | ||
| 2894 | |||
| 2895 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max) { | ||
| 2896 | return simd_min(simd_max(x, min), max); | ||
| 2897 | } | ||
| 2898 | |||
| 2899 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max) { | ||
| 2900 | return simd_min(simd_max(x, min), max); | ||
| 2901 | } | ||
| 2902 | |||
| 2903 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max) { | ||
| 2904 | return simd_min(simd_max(x, min), max); | ||
| 2905 | } | ||
| 2906 | |||
| 2907 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max) { | ||
| 2908 | return simd_min(simd_max(x, min), max); | ||
| 2909 | } | ||
| 2910 | |||
| 2911 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max) { | ||
| 2912 | return simd_min(simd_max(x, min), max); | ||
| 2913 | } | ||
| 2914 | |||
| 2915 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max) { | ||
| 2916 | return simd_min(simd_max(x, min), max); | ||
| 2917 | } | ||
| 2918 | |||
| 2919 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max) { | ||
| 2920 | return simd_min(simd_max(x, min), max); | ||
| 2921 | } | ||
| 2922 | |||
| 2923 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max) { | ||
| 2924 | return simd_min(simd_max(x, min), max); | ||
| 2925 | } | ||
| 2926 | |||
| 2927 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max) { | ||
| 2928 | return simd_min(simd_max(x, min), max); | ||
| 2929 | } | ||
| 2930 | |||
| 2931 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max) { | ||
| 2932 | return simd_min(simd_max(x, min), max); | ||
| 2933 | } | ||
| 2934 | |||
| 2935 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max) { | ||
| 2936 | return simd_min(simd_max(x, min), max); | ||
| 2937 | } | ||
| 2938 | |||
| 2939 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max) { | ||
| 2940 | return simd_min(simd_max(x, min), max); | ||
| 2941 | } | ||
| 2942 | |||
| 2943 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max) { | ||
| 2944 | return simd_min(simd_max(x, min), max); | ||
| 2945 | } | ||
| 2946 | |||
| 2947 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max) { | ||
| 2948 | return simd_min(simd_max(x, min), max); | ||
| 2949 | } | ||
| 2950 | |||
| 2951 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max) { | ||
| 2952 | return simd_min(simd_max(x, min), max); | ||
| 2953 | } | ||
| 2954 | |||
| 2955 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max) { | ||
| 2956 | return simd_min(simd_max(x, min), max); | ||
| 2957 | } | ||
| 2958 | |||
| 2959 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max) { | ||
| 2960 | return simd_min(simd_max(x, min), max); | ||
| 2961 | } | ||
| 2962 | |||
| 2963 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max) { | ||
| 2964 | return simd_min(simd_max(x, min), max); | ||
| 2965 | } | ||
| 2966 | |||
| 2967 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max) { | ||
| 2968 | return simd_min(simd_max(x, min), max); | ||
| 2969 | } | ||
| 2970 | |||
| 2971 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max) { | ||
| 2972 | return simd_min(simd_max(x, min), max); | ||
| 2973 | } | ||
| 2974 | |||
| 2975 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max) { | ||
| 2976 | return simd_min(simd_max(x, min), max); | ||
| 2977 | } | ||
| 2978 | |||
| 2979 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max) { | ||
| 2980 | return simd_min(simd_max(x, min), max); | ||
| 2981 | } | ||
| 2982 | |||
| 2983 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max) { | ||
| 2984 | return simd_min(simd_max(x, min), max); | ||
| 2985 | } | ||
| 2986 | |||
| 2987 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max) { | ||
| 2988 | return simd_min(simd_max(x, min), max); | ||
| 2989 | } | ||
| 2990 | |||
| 2991 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max) { | ||
| 2992 | return simd_min(simd_max(x, min), max); | ||
| 2993 | } | ||
| 2994 | |||
| 2995 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max) { | ||
| 2996 | return simd_min(simd_max(x, min), max); | ||
| 2997 | } | ||
| 2998 | |||
| 2999 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max) { | ||
| 3000 | return simd_min(simd_max(x, min), max); | ||
| 3001 | } | ||
| 3002 | |||
| 3003 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max) { | ||
| 3004 | return simd_min(simd_max(x, min), max); | ||
| 3005 | } | ||
| 3006 | |||
| 3007 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max) { | ||
| 3008 | return simd_min(simd_max(x, min), max); | ||
| 3009 | } | ||
| 3010 | |||
| 3011 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max) { | ||
| 3012 | return simd_min(simd_max(x, min), max); | ||
| 3013 | } | ||
| 3014 | |||
| 3015 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max) { | ||
| 3016 | return simd_min(simd_max(x, min), max); | ||
| 3017 | } | ||
| 3018 | |||
| 3019 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max) { | ||
| 3020 | return simd_min(simd_max(x, min), max); | ||
| 3021 | } | ||
| 3022 | |||
| 3023 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max) { | ||
| 3024 | return simd_min(simd_max(x, min), max); | ||
| 3025 | } | ||
| 3026 | |||
| 3027 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max) { | ||
| 3028 | return simd_min(simd_max(x, min), max); | ||
| 3029 | } | ||
| 3030 | |||
| 3031 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max) { | ||
| 3032 | return simd_min(simd_max(x, min), max); | ||
| 3033 | } | ||
| 3034 | |||
| 3035 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max) { | ||
| 3036 | return simd_min(simd_max(x, min), max); | ||
| 3037 | } | ||
| 3038 | |||
| 3039 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max) { | ||
| 3040 | return simd_min(simd_max(x, min), max); | ||
| 3041 | } | ||
| 3042 | |||
| 3043 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max) { | ||
| 3044 | return simd_min(simd_max(x, min), max); | ||
| 3045 | } | ||
| 3046 | |||
| 3047 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max) { | ||
| 3048 | return simd_min(simd_max(x, min), max); | ||
| 3049 | } | ||
| 3050 | |||
| 3051 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max) { | ||
| 3052 | return simd_min(simd_max(x, min), max); | ||
| 3053 | } | ||
| 3054 | |||
| 3055 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max) { | ||
| 3056 | return simd_min(simd_max(x, min), max); | ||
| 3057 | } | ||
| 3058 | |||
| 3059 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max) { | ||
| 3060 | return simd_min(simd_max(x, min), max); | ||
| 3061 | } | ||
| 3062 | |||
| 3063 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max) { | ||
| 3064 | return simd_min(simd_max(x, min), max); | ||
| 3065 | } | ||
| 3066 | |||
| 3067 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max) { | ||
| 3068 | return simd_min(simd_max(x, min), max); | ||
| 3069 | } | ||
| 3070 | |||
| 3071 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max) { | ||
| 3072 | return simd_min(simd_max(x, min), max); | ||
| 3073 | } | ||
| 3074 | |||
| 3075 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max) { | ||
| 3076 | return simd_min(simd_max(x, min), max); | ||
| 3077 | } | ||
| 3078 | |||
| 3079 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max) { | ||
| 3080 | return simd_min(simd_max(x, min), max); | ||
| 3081 | } | ||
| 3082 | |||
| 3083 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max) { | ||
| 3084 | return simd_min(simd_max(x, min), max); | ||
| 3085 | } | ||
| 3086 | |||
| 3087 | |||
| 3088 | static inline SIMD_CFUNC float simd_sign(float x) { | ||
| 3089 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3090 | } | ||
| 3091 | |||
| 3092 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) { | ||
| 3093 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3094 | } | ||
| 3095 | |||
| 3096 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x) { | ||
| 3097 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3098 | } | ||
| 3099 | |||
| 3100 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x) { | ||
| 3101 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3102 | } | ||
| 3103 | |||
| 3104 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x) { | ||
| 3105 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3106 | } | ||
| 3107 | |||
| 3108 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) { | ||
| 3109 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3110 | } | ||
| 3111 | |||
| 3112 | static inline SIMD_CFUNC double simd_sign(double x) { | ||
| 3113 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3114 | } | ||
| 3115 | |||
| 3116 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) { | ||
| 3117 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3118 | } | ||
| 3119 | |||
| 3120 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x) { | ||
| 3121 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3122 | } | ||
| 3123 | |||
| 3124 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x) { | ||
| 3125 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3126 | } | ||
| 3127 | |||
| 3128 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x) { | ||
| 3129 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3130 | } | ||
| 3131 | |||
| 3132 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t) { | ||
| 3133 | return x + t*(y - x); | ||
| 3134 | } | ||
| 3135 | |||
| 3136 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t) { | ||
| 3137 | return x + t*(y - x); | ||
| 3138 | } | ||
| 3139 | |||
| 3140 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t) { | ||
| 3141 | return x + t*(y - x); | ||
| 3142 | } | ||
| 3143 | |||
| 3144 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t) { | ||
| 3145 | return x + t*(y - x); | ||
| 3146 | } | ||
| 3147 | |||
| 3148 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t) { | ||
| 3149 | return x + t*(y - x); | ||
| 3150 | } | ||
| 3151 | |||
| 3152 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t) { | ||
| 3153 | return x + t*(y - x); | ||
| 3154 | } | ||
| 3155 | |||
| 3156 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t) { | ||
| 3157 | return x + t*(y - x); | ||
| 3158 | } | ||
| 3159 | |||
| 3160 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t) { | ||
| 3161 | return x + t*(y - x); | ||
| 3162 | } | ||
| 3163 | |||
| 3164 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t) { | ||
| 3165 | return x + t*(y - x); | ||
| 3166 | } | ||
| 3167 | |||
| 3168 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t) { | ||
| 3169 | return x + t*(y - x); | ||
| 3170 | } | ||
| 3171 | |||
| 3172 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t) { | ||
| 3173 | return x + t*(y - x); | ||
| 3174 | } | ||
| 3175 | |||
| 3176 | static inline SIMD_CFUNC float simd_recip(float x) { | ||
| 3177 | #if __FAST_MATH__ | ||
| 3178 | return simd_fast_recip(x); | ||
| 3179 | #else | ||
| 3180 | return simd_precise_recip(x); | ||
| 3181 | #endif | ||
| 3182 | } | ||
| 3183 | |||
| 3184 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x) { | ||
| 3185 | #if __FAST_MATH__ | ||
| 3186 | return simd_fast_recip(x); | ||
| 3187 | #else | ||
| 3188 | return simd_precise_recip(x); | ||
| 3189 | #endif | ||
| 3190 | } | ||
| 3191 | |||
| 3192 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x) { | ||
| 3193 | #if __FAST_MATH__ | ||
| 3194 | return simd_fast_recip(x); | ||
| 3195 | #else | ||
| 3196 | return simd_precise_recip(x); | ||
| 3197 | #endif | ||
| 3198 | } | ||
| 3199 | |||
| 3200 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x) { | ||
| 3201 | #if __FAST_MATH__ | ||
| 3202 | return simd_fast_recip(x); | ||
| 3203 | #else | ||
| 3204 | return simd_precise_recip(x); | ||
| 3205 | #endif | ||
| 3206 | } | ||
| 3207 | |||
| 3208 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x) { | ||
| 3209 | #if __FAST_MATH__ | ||
| 3210 | return simd_fast_recip(x); | ||
| 3211 | #else | ||
| 3212 | return simd_precise_recip(x); | ||
| 3213 | #endif | ||
| 3214 | } | ||
| 3215 | |||
| 3216 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x) { | ||
| 3217 | #if __FAST_MATH__ | ||
| 3218 | return simd_fast_recip(x); | ||
| 3219 | #else | ||
| 3220 | return simd_precise_recip(x); | ||
| 3221 | #endif | ||
| 3222 | } | ||
| 3223 | |||
| 3224 | static inline SIMD_CFUNC double simd_recip(double x) { | ||
| 3225 | #if __FAST_MATH__ | ||
| 3226 | return simd_fast_recip(x); | ||
| 3227 | #else | ||
| 3228 | return simd_precise_recip(x); | ||
| 3229 | #endif | ||
| 3230 | } | ||
| 3231 | |||
| 3232 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x) { | ||
| 3233 | #if __FAST_MATH__ | ||
| 3234 | return simd_fast_recip(x); | ||
| 3235 | #else | ||
| 3236 | return simd_precise_recip(x); | ||
| 3237 | #endif | ||
| 3238 | } | ||
| 3239 | |||
| 3240 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x) { | ||
| 3241 | #if __FAST_MATH__ | ||
| 3242 | return simd_fast_recip(x); | ||
| 3243 | #else | ||
| 3244 | return simd_precise_recip(x); | ||
| 3245 | #endif | ||
| 3246 | } | ||
| 3247 | |||
| 3248 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x) { | ||
| 3249 | #if __FAST_MATH__ | ||
| 3250 | return simd_fast_recip(x); | ||
| 3251 | #else | ||
| 3252 | return simd_precise_recip(x); | ||
| 3253 | #endif | ||
| 3254 | } | ||
| 3255 | |||
| 3256 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x) { | ||
| 3257 | #if __FAST_MATH__ | ||
| 3258 | return simd_fast_recip(x); | ||
| 3259 | #else | ||
| 3260 | return simd_precise_recip(x); | ||
| 3261 | #endif | ||
| 3262 | } | ||
| 3263 | |||
| 3264 | static inline SIMD_CFUNC float simd_fast_recip(float x) { | ||
| 3265 | #if defined __AVX512VL__ | ||
| 3266 | simd_float4 x4 = simd_make_float4(x); | ||
| 3267 | return ((simd_float4)_mm_rcp14_ss(x4, x4)).x; | ||
| 3268 | #elif defined __SSE__ | ||
| 3269 | return ((simd_float4)_mm_rcp_ss(simd_make_float4(x))).x; | ||
| 3270 | #elif defined __ARM_NEON__ | ||
| 3271 | return simd_fast_recip(simd_make_float2_undef(x)).x; | ||
| 3272 | #else | ||
| 3273 | return simd_precise_recip(x); | ||
| 3274 | #endif | ||
| 3275 | } | ||
| 3276 | |||
| 3277 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x) { | ||
| 3278 | #if defined __SSE__ | ||
| 3279 | return simd_make_float2(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3280 | #elif defined __ARM_NEON__ | ||
| 3281 | simd_float2 r = vrecpe_f32(x); | ||
| 3282 | return r * vrecps_f32(x, r); | ||
| 3283 | #else | ||
| 3284 | return simd_precise_recip(x); | ||
| 3285 | #endif | ||
| 3286 | } | ||
| 3287 | |||
| 3288 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x) { | ||
| 3289 | return simd_make_float3(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3290 | } | ||
| 3291 | |||
| 3292 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x) { | ||
| 3293 | #if defined __AVX512VL__ | ||
| 3294 | return _mm_rcp14_ps(x); | ||
| 3295 | #elif defined __SSE__ | ||
| 3296 | return _mm_rcp_ps(x); | ||
| 3297 | #elif defined __ARM_NEON__ | ||
| 3298 | simd_float4 r = vrecpeq_f32(x); | ||
| 3299 | return r * vrecpsq_f32(x, r); | ||
| 3300 | #else | ||
| 3301 | return simd_precise_recip(x); | ||
| 3302 | #endif | ||
| 3303 | } | ||
| 3304 | |||
| 3305 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x) { | ||
| 3306 | #if defined __AVX512VL__ | ||
| 3307 | return _mm256_rcp14_ps(x); | ||
| 3308 | #elif defined __AVX__ | ||
| 3309 | return _mm256_rcp_ps(x); | ||
| 3310 | #else | ||
| 3311 | return simd_make_float8(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3312 | #endif | ||
| 3313 | } | ||
| 3314 | |||
| 3315 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x) { | ||
| 3316 | #if defined __AVX512F__ | ||
| 3317 | return _mm512_rcp14_ps(x); | ||
| 3318 | #else | ||
| 3319 | return simd_make_float16(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3320 | #endif | ||
| 3321 | } | ||
| 3322 | |||
| 3323 | static inline SIMD_CFUNC double simd_fast_recip(double x) { | ||
| 3324 | return simd_precise_recip(x); | ||
| 3325 | } | ||
| 3326 | |||
| 3327 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x) { | ||
| 3328 | return simd_precise_recip(x); | ||
| 3329 | } | ||
| 3330 | |||
| 3331 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x) { | ||
| 3332 | return simd_precise_recip(x); | ||
| 3333 | } | ||
| 3334 | |||
| 3335 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x) { | ||
| 3336 | return simd_precise_recip(x); | ||
| 3337 | } | ||
| 3338 | |||
| 3339 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x) { | ||
| 3340 | return simd_precise_recip(x); | ||
| 3341 | } | ||
| 3342 | |||
| 3343 | static inline SIMD_CFUNC float simd_precise_recip(float x) { | ||
| 3344 | #if defined __SSE__ | ||
| 3345 | float r = simd_fast_recip(x); | ||
| 3346 | return r*(2 - (x == 0 ? -INFINITY : x)*r); | ||
| 3347 | #elif defined __ARM_NEON__ | ||
| 3348 | return simd_precise_recip(simd_make_float2_undef(x)).x; | ||
| 3349 | #else | ||
| 3350 | return 1/x; | ||
| 3351 | #endif | ||
| 3352 | } | ||
| 3353 | |||
| 3354 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x) { | ||
| 3355 | #if defined __SSE__ | ||
| 3356 | return simd_make_float2(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3357 | #elif defined __ARM_NEON__ | ||
| 3358 | simd_float2 r = simd_fast_recip(x); | ||
| 3359 | return r*vrecps_f32(x, r); | ||
| 3360 | #else | ||
| 3361 | return 1/x; | ||
| 3362 | #endif | ||
| 3363 | } | ||
| 3364 | |||
| 3365 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x) { | ||
| 3366 | return simd_make_float3(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3367 | } | ||
| 3368 | |||
| 3369 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x) { | ||
| 3370 | #if defined __SSE__ | ||
| 3371 | simd_float4 r = simd_fast_recip(x); | ||
| 3372 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3373 | #elif defined __ARM_NEON__ | ||
| 3374 | simd_float4 r = simd_fast_recip(x); | ||
| 3375 | return r*vrecpsq_f32(x, r); | ||
| 3376 | #else | ||
| 3377 | return 1/x; | ||
| 3378 | #endif | ||
| 3379 | } | ||
| 3380 | |||
| 3381 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x) { | ||
| 3382 | #if defined __AVX__ | ||
| 3383 | simd_float8 r = simd_fast_recip(x); | ||
| 3384 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3385 | #else | ||
| 3386 | return simd_make_float8(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3387 | #endif | ||
| 3388 | } | ||
| 3389 | |||
| 3390 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x) { | ||
| 3391 | #if defined __AVX512F__ | ||
| 3392 | simd_float16 r = simd_fast_recip(x); | ||
| 3393 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3394 | #else | ||
| 3395 | return simd_make_float16(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3396 | #endif | ||
| 3397 | } | ||
| 3398 | |||
| 3399 | static inline SIMD_CFUNC double simd_precise_recip(double x) { | ||
| 3400 | return 1/x; | ||
| 3401 | } | ||
| 3402 | |||
| 3403 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x) { | ||
| 3404 | return 1/x; | ||
| 3405 | } | ||
| 3406 | |||
| 3407 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x) { | ||
| 3408 | return 1/x; | ||
| 3409 | } | ||
| 3410 | |||
| 3411 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x) { | ||
| 3412 | return 1/x; | ||
| 3413 | } | ||
| 3414 | |||
| 3415 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x) { | ||
| 3416 | return 1/x; | ||
| 3417 | } | ||
| 3418 | |||
| 3419 | static inline SIMD_CFUNC float simd_rsqrt(float x) { | ||
| 3420 | #if __FAST_MATH__ | ||
| 3421 | return simd_fast_rsqrt(x); | ||
| 3422 | #else | ||
| 3423 | return simd_precise_rsqrt(x); | ||
| 3424 | #endif | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x) { | ||
| 3428 | #if __FAST_MATH__ | ||
| 3429 | return simd_fast_rsqrt(x); | ||
| 3430 | #else | ||
| 3431 | return simd_precise_rsqrt(x); | ||
| 3432 | #endif | ||
| 3433 | } | ||
| 3434 | |||
| 3435 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x) { | ||
| 3436 | #if __FAST_MATH__ | ||
| 3437 | return simd_fast_rsqrt(x); | ||
| 3438 | #else | ||
| 3439 | return simd_precise_rsqrt(x); | ||
| 3440 | #endif | ||
| 3441 | } | ||
| 3442 | |||
| 3443 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x) { | ||
| 3444 | #if __FAST_MATH__ | ||
| 3445 | return simd_fast_rsqrt(x); | ||
| 3446 | #else | ||
| 3447 | return simd_precise_rsqrt(x); | ||
| 3448 | #endif | ||
| 3449 | } | ||
| 3450 | |||
| 3451 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x) { | ||
| 3452 | #if __FAST_MATH__ | ||
| 3453 | return simd_fast_rsqrt(x); | ||
| 3454 | #else | ||
| 3455 | return simd_precise_rsqrt(x); | ||
| 3456 | #endif | ||
| 3457 | } | ||
| 3458 | |||
| 3459 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x) { | ||
| 3460 | #if __FAST_MATH__ | ||
| 3461 | return simd_fast_rsqrt(x); | ||
| 3462 | #else | ||
| 3463 | return simd_precise_rsqrt(x); | ||
| 3464 | #endif | ||
| 3465 | } | ||
| 3466 | |||
| 3467 | static inline SIMD_CFUNC double simd_rsqrt(double x) { | ||
| 3468 | #if __FAST_MATH__ | ||
| 3469 | return simd_fast_rsqrt(x); | ||
| 3470 | #else | ||
| 3471 | return simd_precise_rsqrt(x); | ||
| 3472 | #endif | ||
| 3473 | } | ||
| 3474 | |||
| 3475 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x) { | ||
| 3476 | #if __FAST_MATH__ | ||
| 3477 | return simd_fast_rsqrt(x); | ||
| 3478 | #else | ||
| 3479 | return simd_precise_rsqrt(x); | ||
| 3480 | #endif | ||
| 3481 | } | ||
| 3482 | |||
| 3483 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x) { | ||
| 3484 | #if __FAST_MATH__ | ||
| 3485 | return simd_fast_rsqrt(x); | ||
| 3486 | #else | ||
| 3487 | return simd_precise_rsqrt(x); | ||
| 3488 | #endif | ||
| 3489 | } | ||
| 3490 | |||
| 3491 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x) { | ||
| 3492 | #if __FAST_MATH__ | ||
| 3493 | return simd_fast_rsqrt(x); | ||
| 3494 | #else | ||
| 3495 | return simd_precise_rsqrt(x); | ||
| 3496 | #endif | ||
| 3497 | } | ||
| 3498 | |||
| 3499 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x) { | ||
| 3500 | #if __FAST_MATH__ | ||
| 3501 | return simd_fast_rsqrt(x); | ||
| 3502 | #else | ||
| 3503 | return simd_precise_rsqrt(x); | ||
| 3504 | #endif | ||
| 3505 | } | ||
| 3506 | |||
| 3507 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x) { | ||
| 3508 | #if defined __AVX512VL__ | ||
| 3509 | simd_float4 x4 = simd_make_float4(x); | ||
| 3510 | return ((simd_float4)_mm_rsqrt14_ss(x4, x4)).x; | ||
| 3511 | #elif defined __SSE__ | ||
| 3512 | return ((simd_float4)_mm_rsqrt_ss(simd_make_float4(x))).x; | ||
| 3513 | #elif defined __ARM_NEON__ | ||
| 3514 | return simd_fast_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3515 | #else | ||
| 3516 | return simd_precise_rsqrt(x); | ||
| 3517 | #endif | ||
| 3518 | } | ||
| 3519 | |||
| 3520 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x) { | ||
| 3521 | #if defined __SSE__ | ||
| 3522 | return simd_make_float2(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3523 | #elif defined __ARM_NEON__ | ||
| 3524 | simd_float2 r = vrsqrte_f32(x); | ||
| 3525 | return r * vrsqrts_f32(x, r*r); | ||
| 3526 | #else | ||
| 3527 | return simd_precise_rsqrt(x); | ||
| 3528 | #endif | ||
| 3529 | } | ||
| 3530 | |||
| 3531 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x) { | ||
| 3532 | return simd_make_float3(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3533 | } | ||
| 3534 | |||
| 3535 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x) { | ||
| 3536 | #if defined __AVX512VL__ | ||
| 3537 | return _mm_rsqrt14_ps(x); | ||
| 3538 | #elif defined __SSE__ | ||
| 3539 | return _mm_rsqrt_ps(x); | ||
| 3540 | #elif defined __ARM_NEON__ | ||
| 3541 | simd_float4 r = vrsqrteq_f32(x); | ||
| 3542 | return r * vrsqrtsq_f32(x, r*r); | ||
| 3543 | #else | ||
| 3544 | return simd_precise_rsqrt(x); | ||
| 3545 | #endif | ||
| 3546 | } | ||
| 3547 | |||
| 3548 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x) { | ||
| 3549 | #if defined __AVX512VL__ | ||
| 3550 | return _mm256_rsqrt14_ps(x); | ||
| 3551 | #elif defined __AVX__ | ||
| 3552 | return _mm256_rsqrt_ps(x); | ||
| 3553 | #else | ||
| 3554 | return simd_make_float8(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3555 | #endif | ||
| 3556 | } | ||
| 3557 | |||
| 3558 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x) { | ||
| 3559 | #if defined __AVX512F__ | ||
| 3560 | return _mm512_rsqrt14_ps(x); | ||
| 3561 | #else | ||
| 3562 | return simd_make_float16(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3563 | #endif | ||
| 3564 | } | ||
| 3565 | |||
| 3566 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x) { | ||
| 3567 | return simd_precise_rsqrt(x); | ||
| 3568 | } | ||
| 3569 | |||
| 3570 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x) { | ||
| 3571 | return simd_precise_rsqrt(x); | ||
| 3572 | } | ||
| 3573 | |||
| 3574 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x) { | ||
| 3575 | return simd_precise_rsqrt(x); | ||
| 3576 | } | ||
| 3577 | |||
| 3578 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x) { | ||
| 3579 | return simd_precise_rsqrt(x); | ||
| 3580 | } | ||
| 3581 | |||
| 3582 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x) { | ||
| 3583 | return simd_precise_rsqrt(x); | ||
| 3584 | } | ||
| 3585 | |||
| 3586 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x) { | ||
| 3587 | #if defined __SSE__ | ||
| 3588 | float r = simd_fast_rsqrt(x); | ||
| 3589 | return r*(1.5f - 0.5f*(r == INFINITY ? -INFINITY : x)*r*r); | ||
| 3590 | #elif defined __ARM_NEON__ | ||
| 3591 | return simd_precise_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3592 | #else | ||
| 3593 | return 1/sqrt(x); | ||
| 3594 | #endif | ||
| 3595 | } | ||
| 3596 | |||
| 3597 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x) { | ||
| 3598 | #if defined __SSE__ | ||
| 3599 | return simd_make_float2(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3600 | #elif defined __ARM_NEON__ | ||
| 3601 | simd_float2 r = simd_fast_rsqrt(x); | ||
| 3602 | return r*vrsqrts_f32(x, r*r); | ||
| 3603 | #else | ||
| 3604 | return 1/__tg_sqrt(x); | ||
| 3605 | #endif | ||
| 3606 | } | ||
| 3607 | |||
| 3608 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x) { | ||
| 3609 | return simd_make_float3(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3610 | } | ||
| 3611 | |||
| 3612 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x) { | ||
| 3613 | #if defined __SSE__ | ||
| 3614 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3615 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3616 | #elif defined __ARM_NEON__ | ||
| 3617 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3618 | return r*vrsqrtsq_f32(x, r*r); | ||
| 3619 | #else | ||
| 3620 | return 1/__tg_sqrt(x); | ||
| 3621 | #endif | ||
| 3622 | } | ||
| 3623 | |||
| 3624 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x) { | ||
| 3625 | #if defined __AVX__ | ||
| 3626 | simd_float8 r = simd_fast_rsqrt(x); | ||
| 3627 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3628 | #else | ||
| 3629 | return simd_make_float8(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3630 | #endif | ||
| 3631 | } | ||
| 3632 | |||
| 3633 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x) { | ||
| 3634 | #if defined __AVX512F__ | ||
| 3635 | simd_float16 r = simd_fast_rsqrt(x); | ||
| 3636 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3637 | #else | ||
| 3638 | return simd_make_float16(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3639 | #endif | ||
| 3640 | } | ||
| 3641 | |||
| 3642 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x) { | ||
| 3643 | return 1/sqrt(x); | ||
| 3644 | } | ||
| 3645 | |||
| 3646 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x) { | ||
| 3647 | return 1/__tg_sqrt(x); | ||
| 3648 | } | ||
| 3649 | |||
| 3650 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x) { | ||
| 3651 | return 1/__tg_sqrt(x); | ||
| 3652 | } | ||
| 3653 | |||
| 3654 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x) { | ||
| 3655 | return 1/__tg_sqrt(x); | ||
| 3656 | } | ||
| 3657 | |||
| 3658 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x) { | ||
| 3659 | return 1/__tg_sqrt(x); | ||
| 3660 | } | ||
| 3661 | |||
| 3662 | static inline SIMD_CFUNC float simd_fract(float x) { | ||
| 3663 | return fmin(x - floor(x), 0x1.fffffep-1f); | ||
| 3664 | } | ||
| 3665 | |||
| 3666 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x) { | ||
| 3667 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3668 | } | ||
| 3669 | |||
| 3670 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x) { | ||
| 3671 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3672 | } | ||
| 3673 | |||
| 3674 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x) { | ||
| 3675 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3676 | } | ||
| 3677 | |||
| 3678 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x) { | ||
| 3679 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3680 | } | ||
| 3681 | |||
| 3682 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x) { | ||
| 3683 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3684 | } | ||
| 3685 | |||
| 3686 | static inline SIMD_CFUNC double simd_fract(double x) { | ||
| 3687 | return fmin(x - floor(x), 0x1.fffffffffffffp-1); | ||
| 3688 | } | ||
| 3689 | |||
| 3690 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x) { | ||
| 3691 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3692 | } | ||
| 3693 | |||
| 3694 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x) { | ||
| 3695 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3696 | } | ||
| 3697 | |||
| 3698 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x) { | ||
| 3699 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3700 | } | ||
| 3701 | |||
| 3702 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x) { | ||
| 3703 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3704 | } | ||
| 3705 | |||
| 3706 | static inline SIMD_CFUNC float simd_step(float edge, float x) { | ||
| 3707 | return !(x < edge); | ||
| 3708 | } | ||
| 3709 | |||
| 3710 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x) { | ||
| 3711 | return simd_bitselect((simd_float2)1, 0, x < edge); | ||
| 3712 | } | ||
| 3713 | |||
| 3714 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x) { | ||
| 3715 | return simd_bitselect((simd_float3)1, 0, x < edge); | ||
| 3716 | } | ||
| 3717 | |||
| 3718 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x) { | ||
| 3719 | return simd_bitselect((simd_float4)1, 0, x < edge); | ||
| 3720 | } | ||
| 3721 | |||
| 3722 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x) { | ||
| 3723 | return simd_bitselect((simd_float8)1, 0, x < edge); | ||
| 3724 | } | ||
| 3725 | |||
| 3726 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x) { | ||
| 3727 | return simd_bitselect((simd_float16)1, 0, x < edge); | ||
| 3728 | } | ||
| 3729 | |||
| 3730 | static inline SIMD_CFUNC double simd_step(double edge, double x) { | ||
| 3731 | return !(x < edge); | ||
| 3732 | } | ||
| 3733 | |||
| 3734 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x) { | ||
| 3735 | return simd_bitselect((simd_double2)1, 0, x < edge); | ||
| 3736 | } | ||
| 3737 | |||
| 3738 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x) { | ||
| 3739 | return simd_bitselect((simd_double3)1, 0, x < edge); | ||
| 3740 | } | ||
| 3741 | |||
| 3742 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x) { | ||
| 3743 | return simd_bitselect((simd_double4)1, 0, x < edge); | ||
| 3744 | } | ||
| 3745 | |||
| 3746 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x) { | ||
| 3747 | return simd_bitselect((simd_double8)1, 0, x < edge); | ||
| 3748 | } | ||
| 3749 | |||
| 3750 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x) { | ||
| 3751 | float t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3752 | return t*t*(3 - 2*t); | ||
| 3753 | } | ||
| 3754 | |||
| 3755 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x) { | ||
| 3756 | simd_float2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3757 | return t*t*(3 - 2*t); | ||
| 3758 | } | ||
| 3759 | |||
| 3760 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x) { | ||
| 3761 | simd_float3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3762 | return t*t*(3 - 2*t); | ||
| 3763 | } | ||
| 3764 | |||
| 3765 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x) { | ||
| 3766 | simd_float4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3767 | return t*t*(3 - 2*t); | ||
| 3768 | } | ||
| 3769 | |||
| 3770 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x) { | ||
| 3771 | simd_float8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3772 | return t*t*(3 - 2*t); | ||
| 3773 | } | ||
| 3774 | |||
| 3775 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x) { | ||
| 3776 | simd_float16 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3777 | return t*t*(3 - 2*t); | ||
| 3778 | } | ||
| 3779 | |||
| 3780 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x) { | ||
| 3781 | double t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3782 | return t*t*(3 - 2*t); | ||
| 3783 | } | ||
| 3784 | |||
| 3785 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x) { | ||
| 3786 | simd_double2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3787 | return t*t*(3 - 2*t); | ||
| 3788 | } | ||
| 3789 | |||
| 3790 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x) { | ||
| 3791 | simd_double3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3792 | return t*t*(3 - 2*t); | ||
| 3793 | } | ||
| 3794 | |||
| 3795 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x) { | ||
| 3796 | simd_double4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3797 | return t*t*(3 - 2*t); | ||
| 3798 | } | ||
| 3799 | |||
| 3800 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x) { | ||
| 3801 | simd_double8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3802 | return t*t*(3 - 2*t); | ||
| 3803 | } | ||
| 3804 | |||
| 3805 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x) { | ||
| 3806 | return x.x + x.y; | ||
| 3807 | } | ||
| 3808 | |||
| 3809 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x) { | ||
| 3810 | return x.x + x.y + x.z; | ||
| 3811 | } | ||
| 3812 | |||
| 3813 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x) { | ||
| 3814 | return simd_reduce_add(x.lo + x.hi); | ||
| 3815 | } | ||
| 3816 | |||
| 3817 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x) { | ||
| 3818 | return simd_reduce_add(x.lo + x.hi); | ||
| 3819 | } | ||
| 3820 | |||
| 3821 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x) { | ||
| 3822 | return simd_reduce_add(x.lo + x.hi); | ||
| 3823 | } | ||
| 3824 | |||
| 3825 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x) { | ||
| 3826 | return simd_reduce_add(x.lo + x.hi); | ||
| 3827 | } | ||
| 3828 | |||
| 3829 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x) { | ||
| 3830 | return simd_reduce_add(x.lo + x.hi); | ||
| 3831 | } | ||
| 3832 | |||
| 3833 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x) { | ||
| 3834 | return x.x + x.y; | ||
| 3835 | } | ||
| 3836 | |||
| 3837 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x) { | ||
| 3838 | return x.x + x.y + x.z; | ||
| 3839 | } | ||
| 3840 | |||
| 3841 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x) { | ||
| 3842 | return simd_reduce_add(x.lo + x.hi); | ||
| 3843 | } | ||
| 3844 | |||
| 3845 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x) { | ||
| 3846 | return simd_reduce_add(x.lo + x.hi); | ||
| 3847 | } | ||
| 3848 | |||
| 3849 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x) { | ||
| 3850 | return simd_reduce_add(x.lo + x.hi); | ||
| 3851 | } | ||
| 3852 | |||
| 3853 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x) { | ||
| 3854 | return simd_reduce_add(x.lo + x.hi); | ||
| 3855 | } | ||
| 3856 | |||
| 3857 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x) { | ||
| 3858 | return simd_reduce_add(x.lo + x.hi); | ||
| 3859 | } | ||
| 3860 | |||
| 3861 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x) { | ||
| 3862 | return x.x + x.y; | ||
| 3863 | } | ||
| 3864 | |||
| 3865 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x) { | ||
| 3866 | return x.x + x.y + x.z; | ||
| 3867 | } | ||
| 3868 | |||
| 3869 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x) { | ||
| 3870 | return simd_reduce_add(x.lo + x.hi); | ||
| 3871 | } | ||
| 3872 | |||
| 3873 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x) { | ||
| 3874 | return simd_reduce_add(x.lo + x.hi); | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x) { | ||
| 3878 | return simd_reduce_add(x.lo + x.hi); | ||
| 3879 | } | ||
| 3880 | |||
| 3881 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x) { | ||
| 3882 | return simd_reduce_add(x.lo + x.hi); | ||
| 3883 | } | ||
| 3884 | |||
| 3885 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x) { | ||
| 3886 | return x.x + x.y; | ||
| 3887 | } | ||
| 3888 | |||
| 3889 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x) { | ||
| 3890 | return x.x + x.y + x.z; | ||
| 3891 | } | ||
| 3892 | |||
| 3893 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x) { | ||
| 3894 | return simd_reduce_add(x.lo + x.hi); | ||
| 3895 | } | ||
| 3896 | |||
| 3897 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x) { | ||
| 3898 | return simd_reduce_add(x.lo + x.hi); | ||
| 3899 | } | ||
| 3900 | |||
| 3901 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x) { | ||
| 3902 | return simd_reduce_add(x.lo + x.hi); | ||
| 3903 | } | ||
| 3904 | |||
| 3905 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x) { | ||
| 3906 | return simd_reduce_add(x.lo + x.hi); | ||
| 3907 | } | ||
| 3908 | |||
| 3909 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x) { | ||
| 3910 | return x.x + x.y; | ||
| 3911 | } | ||
| 3912 | |||
| 3913 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x) { | ||
| 3914 | return x.x + x.y + x.z; | ||
| 3915 | } | ||
| 3916 | |||
| 3917 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x) { | ||
| 3918 | return simd_reduce_add(x.lo + x.hi); | ||
| 3919 | } | ||
| 3920 | |||
| 3921 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x) { | ||
| 3922 | return simd_reduce_add(x.lo + x.hi); | ||
| 3923 | } | ||
| 3924 | |||
| 3925 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x) { | ||
| 3926 | return simd_reduce_add(x.lo + x.hi); | ||
| 3927 | } | ||
| 3928 | |||
| 3929 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x) { | ||
| 3930 | return x.x + x.y; | ||
| 3931 | } | ||
| 3932 | |||
| 3933 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x) { | ||
| 3934 | return x.x + x.y + x.z; | ||
| 3935 | } | ||
| 3936 | |||
| 3937 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x) { | ||
| 3938 | return simd_reduce_add(x.lo + x.hi); | ||
| 3939 | } | ||
| 3940 | |||
| 3941 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x) { | ||
| 3942 | return simd_reduce_add(x.lo + x.hi); | ||
| 3943 | } | ||
| 3944 | |||
| 3945 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x) { | ||
| 3946 | return simd_reduce_add(x.lo + x.hi); | ||
| 3947 | } | ||
| 3948 | |||
| 3949 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x) { | ||
| 3950 | return x.x + x.y; | ||
| 3951 | } | ||
| 3952 | |||
| 3953 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x) { | ||
| 3954 | return x.x + x.y + x.z; | ||
| 3955 | } | ||
| 3956 | |||
| 3957 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x) { | ||
| 3958 | return simd_reduce_add(x.lo + x.hi); | ||
| 3959 | } | ||
| 3960 | |||
| 3961 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x) { | ||
| 3962 | return simd_reduce_add(x.lo + x.hi); | ||
| 3963 | } | ||
| 3964 | |||
| 3965 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x) { | ||
| 3966 | return simd_reduce_add(x.lo + x.hi); | ||
| 3967 | } | ||
| 3968 | |||
| 3969 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x) { | ||
| 3970 | return x.x + x.y; | ||
| 3971 | } | ||
| 3972 | |||
| 3973 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x) { | ||
| 3974 | return x.x + x.y + x.z; | ||
| 3975 | } | ||
| 3976 | |||
| 3977 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x) { | ||
| 3978 | return simd_reduce_add(x.lo + x.hi); | ||
| 3979 | } | ||
| 3980 | |||
| 3981 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x) { | ||
| 3982 | return simd_reduce_add(x.lo + x.hi); | ||
| 3983 | } | ||
| 3984 | |||
| 3985 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x) { | ||
| 3986 | return x.x + x.y; | ||
| 3987 | } | ||
| 3988 | |||
| 3989 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x) { | ||
| 3990 | return x.x + x.y + x.z; | ||
| 3991 | } | ||
| 3992 | |||
| 3993 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x) { | ||
| 3994 | return simd_reduce_add(x.lo + x.hi); | ||
| 3995 | } | ||
| 3996 | |||
| 3997 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x) { | ||
| 3998 | return simd_reduce_add(x.lo + x.hi); | ||
| 3999 | } | ||
| 4000 | |||
| 4001 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x) { | ||
| 4002 | return x.x + x.y; | ||
| 4003 | } | ||
| 4004 | |||
| 4005 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x) { | ||
| 4006 | return x.x + x.y + x.z; | ||
| 4007 | } | ||
| 4008 | |||
| 4009 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x) { | ||
| 4010 | return simd_reduce_add(x.lo + x.hi); | ||
| 4011 | } | ||
| 4012 | |||
| 4013 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x) { | ||
| 4014 | return simd_reduce_add(x.lo + x.hi); | ||
| 4015 | } | ||
| 4016 | |||
| 4017 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x) { | ||
| 4018 | return x.y < x.x ? x.y : x.x; | ||
| 4019 | } | ||
| 4020 | |||
| 4021 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x) { | ||
| 4022 | char t = x.z < x.x ? x.z : x.x; | ||
| 4023 | return x.y < t ? x.y : t; | ||
| 4024 | } | ||
| 4025 | |||
| 4026 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x) { | ||
| 4027 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4028 | } | ||
| 4029 | |||
| 4030 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x) { | ||
| 4031 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4032 | } | ||
| 4033 | |||
| 4034 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x) { | ||
| 4035 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4036 | } | ||
| 4037 | |||
| 4038 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x) { | ||
| 4039 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4040 | } | ||
| 4041 | |||
| 4042 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x) { | ||
| 4043 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4044 | } | ||
| 4045 | |||
| 4046 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x) { | ||
| 4047 | return x.y < x.x ? x.y : x.x; | ||
| 4048 | } | ||
| 4049 | |||
| 4050 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x) { | ||
| 4051 | unsigned char t = x.z < x.x ? x.z : x.x; | ||
| 4052 | return x.y < t ? x.y : t; | ||
| 4053 | } | ||
| 4054 | |||
| 4055 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x) { | ||
| 4056 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4057 | } | ||
| 4058 | |||
| 4059 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x) { | ||
| 4060 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4061 | } | ||
| 4062 | |||
| 4063 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x) { | ||
| 4064 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4065 | } | ||
| 4066 | |||
| 4067 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x) { | ||
| 4068 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4069 | } | ||
| 4070 | |||
| 4071 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x) { | ||
| 4072 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4073 | } | ||
| 4074 | |||
| 4075 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x) { | ||
| 4076 | return x.y < x.x ? x.y : x.x; | ||
| 4077 | } | ||
| 4078 | |||
| 4079 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x) { | ||
| 4080 | short t = x.z < x.x ? x.z : x.x; | ||
| 4081 | return x.y < t ? x.y : t; | ||
| 4082 | } | ||
| 4083 | |||
| 4084 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x) { | ||
| 4085 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4086 | } | ||
| 4087 | |||
| 4088 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x) { | ||
| 4089 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4090 | } | ||
| 4091 | |||
| 4092 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x) { | ||
| 4093 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4094 | } | ||
| 4095 | |||
| 4096 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x) { | ||
| 4097 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4098 | } | ||
| 4099 | |||
| 4100 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x) { | ||
| 4101 | return x.y < x.x ? x.y : x.x; | ||
| 4102 | } | ||
| 4103 | |||
| 4104 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x) { | ||
| 4105 | unsigned short t = x.z < x.x ? x.z : x.x; | ||
| 4106 | return x.y < t ? x.y : t; | ||
| 4107 | } | ||
| 4108 | |||
| 4109 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x) { | ||
| 4110 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4111 | } | ||
| 4112 | |||
| 4113 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x) { | ||
| 4114 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4115 | } | ||
| 4116 | |||
| 4117 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x) { | ||
| 4118 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4119 | } | ||
| 4120 | |||
| 4121 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x) { | ||
| 4122 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4123 | } | ||
| 4124 | |||
| 4125 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x) { | ||
| 4126 | return x.y < x.x ? x.y : x.x; | ||
| 4127 | } | ||
| 4128 | |||
| 4129 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x) { | ||
| 4130 | int t = x.z < x.x ? x.z : x.x; | ||
| 4131 | return x.y < t ? x.y : t; | ||
| 4132 | } | ||
| 4133 | |||
| 4134 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x) { | ||
| 4135 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4136 | } | ||
| 4137 | |||
| 4138 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x) { | ||
| 4139 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4140 | } | ||
| 4141 | |||
| 4142 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x) { | ||
| 4143 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4144 | } | ||
| 4145 | |||
| 4146 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x) { | ||
| 4147 | return x.y < x.x ? x.y : x.x; | ||
| 4148 | } | ||
| 4149 | |||
| 4150 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x) { | ||
| 4151 | unsigned int t = x.z < x.x ? x.z : x.x; | ||
| 4152 | return x.y < t ? x.y : t; | ||
| 4153 | } | ||
| 4154 | |||
| 4155 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x) { | ||
| 4156 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4157 | } | ||
| 4158 | |||
| 4159 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x) { | ||
| 4160 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4161 | } | ||
| 4162 | |||
| 4163 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x) { | ||
| 4164 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4165 | } | ||
| 4166 | |||
| 4167 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x) { | ||
| 4168 | return fmin(x.x, x.y); | ||
| 4169 | } | ||
| 4170 | |||
| 4171 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x) { | ||
| 4172 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4173 | } | ||
| 4174 | |||
| 4175 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x) { | ||
| 4176 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4177 | } | ||
| 4178 | |||
| 4179 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x) { | ||
| 4180 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4181 | } | ||
| 4182 | |||
| 4183 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x) { | ||
| 4184 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4185 | } | ||
| 4186 | |||
| 4187 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x) { | ||
| 4188 | return x.y < x.x ? x.y : x.x; | ||
| 4189 | } | ||
| 4190 | |||
| 4191 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x) { | ||
| 4192 | simd_long1 t = x.z < x.x ? x.z : x.x; | ||
| 4193 | return x.y < t ? x.y : t; | ||
| 4194 | } | ||
| 4195 | |||
| 4196 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x) { | ||
| 4197 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4198 | } | ||
| 4199 | |||
| 4200 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x) { | ||
| 4201 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4202 | } | ||
| 4203 | |||
| 4204 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x) { | ||
| 4205 | return x.y < x.x ? x.y : x.x; | ||
| 4206 | } | ||
| 4207 | |||
| 4208 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x) { | ||
| 4209 | simd_ulong1 t = x.z < x.x ? x.z : x.x; | ||
| 4210 | return x.y < t ? x.y : t; | ||
| 4211 | } | ||
| 4212 | |||
| 4213 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x) { | ||
| 4214 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4215 | } | ||
| 4216 | |||
| 4217 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x) { | ||
| 4218 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4219 | } | ||
| 4220 | |||
| 4221 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x) { | ||
| 4222 | return fmin(x.x, x.y); | ||
| 4223 | } | ||
| 4224 | |||
| 4225 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x) { | ||
| 4226 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4227 | } | ||
| 4228 | |||
| 4229 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x) { | ||
| 4230 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4231 | } | ||
| 4232 | |||
| 4233 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x) { | ||
| 4234 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4235 | } | ||
| 4236 | |||
| 4237 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x) { | ||
| 4238 | return x.y > x.x ? x.y : x.x; | ||
| 4239 | } | ||
| 4240 | |||
| 4241 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x) { | ||
| 4242 | char t = x.z > x.x ? x.z : x.x; | ||
| 4243 | return x.y > t ? x.y : t; | ||
| 4244 | } | ||
| 4245 | |||
| 4246 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x) { | ||
| 4247 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4248 | } | ||
| 4249 | |||
| 4250 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x) { | ||
| 4251 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4252 | } | ||
| 4253 | |||
| 4254 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x) { | ||
| 4255 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4256 | } | ||
| 4257 | |||
| 4258 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x) { | ||
| 4259 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4260 | } | ||
| 4261 | |||
| 4262 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x) { | ||
| 4263 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4264 | } | ||
| 4265 | |||
| 4266 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x) { | ||
| 4267 | return x.y > x.x ? x.y : x.x; | ||
| 4268 | } | ||
| 4269 | |||
| 4270 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x) { | ||
| 4271 | unsigned char t = x.z > x.x ? x.z : x.x; | ||
| 4272 | return x.y > t ? x.y : t; | ||
| 4273 | } | ||
| 4274 | |||
| 4275 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x) { | ||
| 4276 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4277 | } | ||
| 4278 | |||
| 4279 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x) { | ||
| 4280 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4281 | } | ||
| 4282 | |||
| 4283 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x) { | ||
| 4284 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4285 | } | ||
| 4286 | |||
| 4287 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x) { | ||
| 4288 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4289 | } | ||
| 4290 | |||
| 4291 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x) { | ||
| 4292 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4293 | } | ||
| 4294 | |||
| 4295 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x) { | ||
| 4296 | return x.y > x.x ? x.y : x.x; | ||
| 4297 | } | ||
| 4298 | |||
| 4299 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x) { | ||
| 4300 | short t = x.z > x.x ? x.z : x.x; | ||
| 4301 | return x.y > t ? x.y : t; | ||
| 4302 | } | ||
| 4303 | |||
| 4304 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x) { | ||
| 4305 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4306 | } | ||
| 4307 | |||
| 4308 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x) { | ||
| 4309 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4310 | } | ||
| 4311 | |||
| 4312 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x) { | ||
| 4313 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4314 | } | ||
| 4315 | |||
| 4316 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x) { | ||
| 4317 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4318 | } | ||
| 4319 | |||
| 4320 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x) { | ||
| 4321 | return x.y > x.x ? x.y : x.x; | ||
| 4322 | } | ||
| 4323 | |||
| 4324 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x) { | ||
| 4325 | unsigned short t = x.z > x.x ? x.z : x.x; | ||
| 4326 | return x.y > t ? x.y : t; | ||
| 4327 | } | ||
| 4328 | |||
| 4329 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x) { | ||
| 4330 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4331 | } | ||
| 4332 | |||
| 4333 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x) { | ||
| 4334 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4335 | } | ||
| 4336 | |||
| 4337 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x) { | ||
| 4338 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4339 | } | ||
| 4340 | |||
| 4341 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x) { | ||
| 4342 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4343 | } | ||
| 4344 | |||
| 4345 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x) { | ||
| 4346 | return x.y > x.x ? x.y : x.x; | ||
| 4347 | } | ||
| 4348 | |||
| 4349 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x) { | ||
| 4350 | int t = x.z > x.x ? x.z : x.x; | ||
| 4351 | return x.y > t ? x.y : t; | ||
| 4352 | } | ||
| 4353 | |||
| 4354 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x) { | ||
| 4355 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4356 | } | ||
| 4357 | |||
| 4358 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x) { | ||
| 4359 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4360 | } | ||
| 4361 | |||
| 4362 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x) { | ||
| 4363 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4364 | } | ||
| 4365 | |||
| 4366 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x) { | ||
| 4367 | return x.y > x.x ? x.y : x.x; | ||
| 4368 | } | ||
| 4369 | |||
| 4370 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x) { | ||
| 4371 | unsigned int t = x.z > x.x ? x.z : x.x; | ||
| 4372 | return x.y > t ? x.y : t; | ||
| 4373 | } | ||
| 4374 | |||
| 4375 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x) { | ||
| 4376 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4377 | } | ||
| 4378 | |||
| 4379 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x) { | ||
| 4380 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4381 | } | ||
| 4382 | |||
| 4383 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x) { | ||
| 4384 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4385 | } | ||
| 4386 | |||
| 4387 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x) { | ||
| 4388 | return fmax(x.x, x.y); | ||
| 4389 | } | ||
| 4390 | |||
| 4391 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x) { | ||
| 4392 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4393 | } | ||
| 4394 | |||
| 4395 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x) { | ||
| 4396 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4397 | } | ||
| 4398 | |||
| 4399 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x) { | ||
| 4400 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4401 | } | ||
| 4402 | |||
| 4403 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x) { | ||
| 4404 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4405 | } | ||
| 4406 | |||
| 4407 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x) { | ||
| 4408 | return x.y > x.x ? x.y : x.x; | ||
| 4409 | } | ||
| 4410 | |||
| 4411 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x) { | ||
| 4412 | simd_long1 t = x.z > x.x ? x.z : x.x; | ||
| 4413 | return x.y > t ? x.y : t; | ||
| 4414 | } | ||
| 4415 | |||
| 4416 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x) { | ||
| 4417 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4418 | } | ||
| 4419 | |||
| 4420 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x) { | ||
| 4421 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4422 | } | ||
| 4423 | |||
| 4424 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x) { | ||
| 4425 | return x.y > x.x ? x.y : x.x; | ||
| 4426 | } | ||
| 4427 | |||
| 4428 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x) { | ||
| 4429 | simd_ulong1 t = x.z > x.x ? x.z : x.x; | ||
| 4430 | return x.y > t ? x.y : t; | ||
| 4431 | } | ||
| 4432 | |||
| 4433 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x) { | ||
| 4434 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4435 | } | ||
| 4436 | |||
| 4437 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x) { | ||
| 4438 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4439 | } | ||
| 4440 | |||
| 4441 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x) { | ||
| 4442 | return fmax(x.x, x.y); | ||
| 4443 | } | ||
| 4444 | |||
| 4445 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x) { | ||
| 4446 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4447 | } | ||
| 4448 | |||
| 4449 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x) { | ||
| 4450 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4451 | } | ||
| 4452 | |||
| 4453 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x) { | ||
| 4454 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4455 | } | ||
| 4456 | |||
| 4457 | #ifdef __cplusplus | ||
| 4458 | } | ||
| 4459 | #endif | ||
| 4460 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 4461 | #endif /* SIMD_COMMON_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/simd/conversion.h created+2031| ... | @@ -0,0 +1,2031 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * The interfaces declared in this header provide conversions between vector | ||
| 4 | * types. The following functions are available: | ||
| 5 | * | ||
| 6 | * simd_char(x) simd_uchar(x) | ||
| 7 | * simd_short(x) simd_ushort(x) | ||
| 8 | * simd_int(x) simd_uint(x) | ||
| 9 | * simd_long(x) simd_ulong(x) | ||
| 10 | * simd_float(x) | ||
| 11 | * simd_double(x) | ||
| 12 | * | ||
| 13 | * Each of these functions converts x to a vector whose elements have the | ||
| 14 | * type named by the function, with the same number of elements as x. Unlike | ||
| 15 | * a vector cast, these functions convert the elements to the new element | ||
| 16 | * type. These conversions behave exactly as C scalar conversions, except | ||
| 17 | * that conversions from integer vector types to signed integer vector types | ||
| 18 | * are guaranteed to wrap modulo 2^N (where N is the number of bits in an | ||
| 19 | * element of the result type). | ||
| 20 | * | ||
| 21 | * For integer vector types, saturating conversions are also available: | ||
| 22 | * | ||
| 23 | * simd_char_sat(x) simd_uchar_sat(x) | ||
| 24 | * simd_short_sat(x) simd_ushort_sat(x) | ||
| 25 | * simd_int_sat(x) simd_uint_sat(x) | ||
| 26 | * simd_long_sat(x) simd_ulong_sat(x) | ||
| 27 | * | ||
| 28 | * These conversions clamp x to the representable range of the result type | ||
| 29 | * before converting. | ||
| 30 | * | ||
| 31 | * In C++ the conversion functions are templated in the simd:: namespace. | ||
| 32 | * | ||
| 33 | * C++ Function Equivalent C Function | ||
| 34 | * ------------------------------------------------------------------- | ||
| 35 | * simd::convert<ScalarType>(x) simd_ScalarType(x) | ||
| 36 | * simd::convert_sat<ScalarType>(x) simd_ScalarType_sat(x) | ||
| 37 | */ | ||
| 38 | |||
| 39 | #ifndef __SIMD_CONVERSION_HEADER__ | ||
| 40 | #define __SIMD_CONVERSION_HEADER__ | ||
| 41 | |||
| 42 | #include <simd/base.h> | ||
| 43 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 44 | #include <simd/vector_types.h> | ||
| 45 | #include <simd/common.h> | ||
| 46 | #include <simd/logic.h> | ||
| 47 | |||
| 48 | #ifdef __cplusplus | ||
| 49 | extern "C" { | ||
| 50 | #endif | ||
| 51 | |||
| 52 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x); | ||
| 53 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x); | ||
| 54 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x); | ||
| 55 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x); | ||
| 56 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x); | ||
| 57 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x); | ||
| 58 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x); | ||
| 59 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x); | ||
| 60 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x); | ||
| 61 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x); | ||
| 62 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x); | ||
| 63 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x); | ||
| 64 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x); | ||
| 65 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x); | ||
| 66 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x); | ||
| 67 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x); | ||
| 68 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x); | ||
| 69 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x); | ||
| 70 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x); | ||
| 71 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x); | ||
| 72 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x); | ||
| 73 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x); | ||
| 74 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x); | ||
| 75 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x); | ||
| 76 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x); | ||
| 77 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x); | ||
| 78 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x); | ||
| 79 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x); | ||
| 80 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x); | ||
| 81 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x); | ||
| 82 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x); | ||
| 83 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x); | ||
| 84 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x); | ||
| 85 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x); | ||
| 86 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x); | ||
| 87 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x); | ||
| 88 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x); | ||
| 89 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x); | ||
| 90 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x); | ||
| 91 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x); | ||
| 92 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x); | ||
| 93 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x); | ||
| 94 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x); | ||
| 95 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x); | ||
| 96 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x); | ||
| 97 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x); | ||
| 98 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x); | ||
| 99 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x); | ||
| 100 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x); | ||
| 101 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x); | ||
| 102 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x); | ||
| 103 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x); | ||
| 104 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x); | ||
| 105 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x); | ||
| 106 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x); | ||
| 107 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x); | ||
| 108 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x); | ||
| 109 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x); | ||
| 110 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x); | ||
| 111 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x); | ||
| 112 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x); | ||
| 113 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x); | ||
| 114 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x); | ||
| 115 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x); | ||
| 116 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x); | ||
| 117 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x); | ||
| 118 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x); | ||
| 119 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x); | ||
| 120 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x); | ||
| 121 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x); | ||
| 122 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x); | ||
| 123 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x); | ||
| 124 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x); | ||
| 125 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x); | ||
| 126 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x); | ||
| 127 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x); | ||
| 128 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x); | ||
| 129 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x); | ||
| 130 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x); | ||
| 131 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x); | ||
| 132 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x); | ||
| 133 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x); | ||
| 134 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x); | ||
| 135 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x); | ||
| 136 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x); | ||
| 137 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x); | ||
| 138 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x); | ||
| 139 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x); | ||
| 140 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x); | ||
| 141 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x); | ||
| 142 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x); | ||
| 143 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x); | ||
| 144 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x); | ||
| 145 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x); | ||
| 146 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x); | ||
| 147 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x); | ||
| 148 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x); | ||
| 149 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x); | ||
| 150 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x); | ||
| 151 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x); | ||
| 152 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x); | ||
| 153 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x); | ||
| 154 | #define vector_char simd_char | ||
| 155 | #define vector_char_sat simd_char_sat | ||
| 156 | |||
| 157 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x); | ||
| 158 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x); | ||
| 159 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x); | ||
| 160 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x); | ||
| 161 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x); | ||
| 162 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x); | ||
| 163 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x); | ||
| 164 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x); | ||
| 165 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x); | ||
| 166 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x); | ||
| 167 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x); | ||
| 168 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x); | ||
| 169 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x); | ||
| 170 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x); | ||
| 171 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x); | ||
| 172 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x); | ||
| 173 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x); | ||
| 174 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x); | ||
| 175 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x); | ||
| 176 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x); | ||
| 177 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x); | ||
| 178 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x); | ||
| 179 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x); | ||
| 180 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x); | ||
| 181 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x); | ||
| 182 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x); | ||
| 183 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x); | ||
| 184 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x); | ||
| 185 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x); | ||
| 186 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x); | ||
| 187 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x); | ||
| 188 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x); | ||
| 189 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x); | ||
| 190 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x); | ||
| 191 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x); | ||
| 192 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x); | ||
| 193 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x); | ||
| 194 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x); | ||
| 195 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x); | ||
| 196 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x); | ||
| 197 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x); | ||
| 198 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x); | ||
| 199 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x); | ||
| 200 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x); | ||
| 201 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x); | ||
| 202 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x); | ||
| 203 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x); | ||
| 204 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x); | ||
| 205 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x); | ||
| 206 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x); | ||
| 207 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x); | ||
| 208 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x); | ||
| 209 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x); | ||
| 210 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x); | ||
| 211 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x); | ||
| 212 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x); | ||
| 213 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x); | ||
| 214 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x); | ||
| 215 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x); | ||
| 216 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x); | ||
| 217 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x); | ||
| 218 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x); | ||
| 219 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x); | ||
| 220 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x); | ||
| 221 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x); | ||
| 222 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x); | ||
| 223 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x); | ||
| 224 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x); | ||
| 225 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x); | ||
| 226 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x); | ||
| 227 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x); | ||
| 228 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x); | ||
| 229 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x); | ||
| 230 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x); | ||
| 231 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x); | ||
| 232 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x); | ||
| 233 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x); | ||
| 234 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x); | ||
| 235 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x); | ||
| 236 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x); | ||
| 237 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x); | ||
| 238 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x); | ||
| 239 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x); | ||
| 240 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x); | ||
| 241 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x); | ||
| 242 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x); | ||
| 243 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x); | ||
| 244 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x); | ||
| 245 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x); | ||
| 246 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x); | ||
| 247 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x); | ||
| 248 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x); | ||
| 249 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x); | ||
| 250 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x); | ||
| 251 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x); | ||
| 252 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x); | ||
| 253 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x); | ||
| 254 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x); | ||
| 255 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x); | ||
| 256 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x); | ||
| 257 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x); | ||
| 258 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x); | ||
| 259 | #define vector_uchar simd_uchar | ||
| 260 | #define vector_uchar_sat simd_uchar_sat | ||
| 261 | |||
| 262 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x); | ||
| 263 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x); | ||
| 264 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x); | ||
| 265 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x); | ||
| 266 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x); | ||
| 267 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x); | ||
| 268 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x); | ||
| 269 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x); | ||
| 270 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x); | ||
| 271 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x); | ||
| 272 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x); | ||
| 273 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x); | ||
| 274 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x); | ||
| 275 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x); | ||
| 276 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x); | ||
| 277 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x); | ||
| 278 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x); | ||
| 279 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x); | ||
| 280 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x); | ||
| 281 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x); | ||
| 282 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x); | ||
| 283 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x); | ||
| 284 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x); | ||
| 285 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x); | ||
| 286 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x); | ||
| 287 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x); | ||
| 288 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x); | ||
| 289 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x); | ||
| 290 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x); | ||
| 291 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x); | ||
| 292 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x); | ||
| 293 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x); | ||
| 294 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x); | ||
| 295 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x); | ||
| 296 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x); | ||
| 297 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x); | ||
| 298 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x); | ||
| 299 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x); | ||
| 300 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x); | ||
| 301 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x); | ||
| 302 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x); | ||
| 303 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x); | ||
| 304 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x); | ||
| 305 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x); | ||
| 306 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x); | ||
| 307 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x); | ||
| 308 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x); | ||
| 309 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x); | ||
| 310 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x); | ||
| 311 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x); | ||
| 312 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x); | ||
| 313 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x); | ||
| 314 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x); | ||
| 315 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x); | ||
| 316 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x); | ||
| 317 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x); | ||
| 318 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x); | ||
| 319 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x); | ||
| 320 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x); | ||
| 321 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x); | ||
| 322 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x); | ||
| 323 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x); | ||
| 324 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x); | ||
| 325 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x); | ||
| 326 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x); | ||
| 327 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x); | ||
| 328 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x); | ||
| 329 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x); | ||
| 330 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x); | ||
| 331 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x); | ||
| 332 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x); | ||
| 333 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x); | ||
| 334 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x); | ||
| 335 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x); | ||
| 336 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x); | ||
| 337 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x); | ||
| 338 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x); | ||
| 339 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x); | ||
| 340 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x); | ||
| 341 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x); | ||
| 342 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x); | ||
| 343 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x); | ||
| 344 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x); | ||
| 345 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x); | ||
| 346 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x); | ||
| 347 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x); | ||
| 348 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x); | ||
| 349 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x); | ||
| 350 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x); | ||
| 351 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x); | ||
| 352 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x); | ||
| 353 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x); | ||
| 354 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x); | ||
| 355 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x); | ||
| 356 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x); | ||
| 357 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x); | ||
| 358 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x); | ||
| 359 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x); | ||
| 360 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x); | ||
| 361 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x); | ||
| 362 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x); | ||
| 363 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x); | ||
| 364 | #define vector_short simd_short | ||
| 365 | #define vector_short_sat simd_short_sat | ||
| 366 | |||
| 367 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x); | ||
| 368 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x); | ||
| 369 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x); | ||
| 370 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x); | ||
| 371 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x); | ||
| 372 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x); | ||
| 373 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x); | ||
| 374 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x); | ||
| 375 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x); | ||
| 376 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x); | ||
| 377 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x); | ||
| 378 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x); | ||
| 379 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x); | ||
| 380 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x); | ||
| 381 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x); | ||
| 382 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x); | ||
| 383 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x); | ||
| 384 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x); | ||
| 385 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x); | ||
| 386 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x); | ||
| 387 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x); | ||
| 388 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x); | ||
| 389 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x); | ||
| 390 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x); | ||
| 391 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x); | ||
| 392 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x); | ||
| 393 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x); | ||
| 394 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x); | ||
| 395 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x); | ||
| 396 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x); | ||
| 397 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x); | ||
| 398 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x); | ||
| 399 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x); | ||
| 400 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x); | ||
| 401 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x); | ||
| 402 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x); | ||
| 403 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x); | ||
| 404 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x); | ||
| 405 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x); | ||
| 406 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x); | ||
| 407 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x); | ||
| 408 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x); | ||
| 409 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x); | ||
| 410 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x); | ||
| 411 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x); | ||
| 412 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x); | ||
| 413 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x); | ||
| 414 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x); | ||
| 415 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x); | ||
| 416 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x); | ||
| 417 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x); | ||
| 418 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x); | ||
| 419 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x); | ||
| 420 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x); | ||
| 421 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x); | ||
| 422 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x); | ||
| 423 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x); | ||
| 424 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x); | ||
| 425 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x); | ||
| 426 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x); | ||
| 427 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x); | ||
| 428 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x); | ||
| 429 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x); | ||
| 430 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x); | ||
| 431 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x); | ||
| 432 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x); | ||
| 433 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x); | ||
| 434 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x); | ||
| 435 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x); | ||
| 436 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x); | ||
| 437 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x); | ||
| 438 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x); | ||
| 439 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x); | ||
| 440 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x); | ||
| 441 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x); | ||
| 442 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x); | ||
| 443 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x); | ||
| 444 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x); | ||
| 445 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x); | ||
| 446 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x); | ||
| 447 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x); | ||
| 448 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x); | ||
| 449 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x); | ||
| 450 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x); | ||
| 451 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x); | ||
| 452 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x); | ||
| 453 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x); | ||
| 454 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x); | ||
| 455 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x); | ||
| 456 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x); | ||
| 457 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x); | ||
| 458 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x); | ||
| 459 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x); | ||
| 460 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x); | ||
| 461 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x); | ||
| 462 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x); | ||
| 463 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x); | ||
| 464 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x); | ||
| 465 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x); | ||
| 466 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x); | ||
| 467 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x); | ||
| 468 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x); | ||
| 469 | #define vector_ushort simd_ushort | ||
| 470 | #define vector_ushort_sat simd_ushort_sat | ||
| 471 | |||
| 472 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x); | ||
| 473 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x); | ||
| 474 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x); | ||
| 475 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x); | ||
| 476 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x); | ||
| 477 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x); | ||
| 478 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x); | ||
| 479 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x); | ||
| 480 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x); | ||
| 481 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x); | ||
| 482 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x); | ||
| 483 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x); | ||
| 484 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x); | ||
| 485 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x); | ||
| 486 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x); | ||
| 487 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x); | ||
| 488 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x); | ||
| 489 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x); | ||
| 490 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x); | ||
| 491 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x); | ||
| 492 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x); | ||
| 493 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x); | ||
| 494 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x); | ||
| 495 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x); | ||
| 496 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x); | ||
| 497 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x); | ||
| 498 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x); | ||
| 499 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x); | ||
| 500 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x); | ||
| 501 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x); | ||
| 502 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x); | ||
| 503 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x); | ||
| 504 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x); | ||
| 505 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x); | ||
| 506 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x); | ||
| 507 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x); | ||
| 508 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x); | ||
| 509 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x); | ||
| 510 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x); | ||
| 511 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x); | ||
| 512 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x); | ||
| 513 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x); | ||
| 514 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x); | ||
| 515 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x); | ||
| 516 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x); | ||
| 517 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x); | ||
| 518 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x); | ||
| 519 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x); | ||
| 520 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x); | ||
| 521 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x); | ||
| 522 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x); | ||
| 523 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x); | ||
| 524 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x); | ||
| 525 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x); | ||
| 526 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x); | ||
| 527 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x); | ||
| 528 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x); | ||
| 529 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x); | ||
| 530 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x); | ||
| 531 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x); | ||
| 532 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x); | ||
| 533 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x); | ||
| 534 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x); | ||
| 535 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x); | ||
| 536 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x); | ||
| 537 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x); | ||
| 538 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x); | ||
| 539 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x); | ||
| 540 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x); | ||
| 541 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x); | ||
| 542 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x); | ||
| 543 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x); | ||
| 544 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x); | ||
| 545 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x); | ||
| 546 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x); | ||
| 547 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x); | ||
| 548 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x); | ||
| 549 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x); | ||
| 550 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x); | ||
| 551 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x); | ||
| 552 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x); | ||
| 553 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x); | ||
| 554 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x); | ||
| 555 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x); | ||
| 556 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x); | ||
| 557 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x); | ||
| 558 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x); | ||
| 559 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x); | ||
| 560 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x); | ||
| 561 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x); | ||
| 562 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x); | ||
| 563 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x); | ||
| 564 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x); | ||
| 565 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x); | ||
| 566 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x); | ||
| 567 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x); | ||
| 568 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x); | ||
| 569 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x); | ||
| 570 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x); | ||
| 571 | #define vector_int simd_int | ||
| 572 | #define vector_int_sat simd_int_sat | ||
| 573 | |||
| 574 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x); | ||
| 575 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x); | ||
| 576 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x); | ||
| 577 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x); | ||
| 578 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x); | ||
| 579 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x); | ||
| 580 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x); | ||
| 581 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x); | ||
| 582 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x); | ||
| 583 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x); | ||
| 584 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x); | ||
| 585 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x); | ||
| 586 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x); | ||
| 587 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x); | ||
| 588 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x); | ||
| 589 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x); | ||
| 590 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x); | ||
| 591 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x); | ||
| 592 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x); | ||
| 593 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x); | ||
| 594 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x); | ||
| 595 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x); | ||
| 596 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x); | ||
| 597 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x); | ||
| 598 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x); | ||
| 599 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x); | ||
| 600 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x); | ||
| 601 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x); | ||
| 602 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x); | ||
| 603 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x); | ||
| 604 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x); | ||
| 605 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x); | ||
| 606 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x); | ||
| 607 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x); | ||
| 608 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x); | ||
| 609 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x); | ||
| 610 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x); | ||
| 611 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x); | ||
| 612 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x); | ||
| 613 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x); | ||
| 614 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x); | ||
| 615 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x); | ||
| 616 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x); | ||
| 617 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x); | ||
| 618 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x); | ||
| 619 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x); | ||
| 620 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x); | ||
| 621 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x); | ||
| 622 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x); | ||
| 623 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x); | ||
| 624 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x); | ||
| 625 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x); | ||
| 626 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x); | ||
| 627 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x); | ||
| 628 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x); | ||
| 629 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x); | ||
| 630 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x); | ||
| 631 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x); | ||
| 632 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x); | ||
| 633 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x); | ||
| 634 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x); | ||
| 635 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x); | ||
| 636 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x); | ||
| 637 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x); | ||
| 638 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x); | ||
| 639 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x); | ||
| 640 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x); | ||
| 641 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x); | ||
| 642 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x); | ||
| 643 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x); | ||
| 644 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x); | ||
| 645 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x); | ||
| 646 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x); | ||
| 647 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x); | ||
| 648 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x); | ||
| 649 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x); | ||
| 650 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x); | ||
| 651 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x); | ||
| 652 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x); | ||
| 653 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x); | ||
| 654 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x); | ||
| 655 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x); | ||
| 656 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x); | ||
| 657 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x); | ||
| 658 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x); | ||
| 659 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x); | ||
| 660 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x); | ||
| 661 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x); | ||
| 662 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x); | ||
| 663 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x); | ||
| 664 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x); | ||
| 665 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x); | ||
| 666 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x); | ||
| 667 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x); | ||
| 668 | #define vector_uint simd_uint | ||
| 669 | #define vector_uint_sat simd_uint_sat | ||
| 670 | |||
| 671 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x); | ||
| 672 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x); | ||
| 673 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x); | ||
| 674 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x); | ||
| 675 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x); | ||
| 676 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x); | ||
| 677 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x); | ||
| 678 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x); | ||
| 679 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x); | ||
| 680 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x); | ||
| 681 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x); | ||
| 682 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x); | ||
| 683 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x); | ||
| 684 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x); | ||
| 685 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x); | ||
| 686 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x); | ||
| 687 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x); | ||
| 688 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x); | ||
| 689 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x); | ||
| 690 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x); | ||
| 691 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x); | ||
| 692 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x); | ||
| 693 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x); | ||
| 694 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x); | ||
| 695 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x); | ||
| 696 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x); | ||
| 697 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x); | ||
| 698 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x); | ||
| 699 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x); | ||
| 700 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x); | ||
| 701 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x); | ||
| 702 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x); | ||
| 703 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x); | ||
| 704 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x); | ||
| 705 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x); | ||
| 706 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x); | ||
| 707 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x); | ||
| 708 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x); | ||
| 709 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x); | ||
| 710 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x); | ||
| 711 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x); | ||
| 712 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x); | ||
| 713 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x); | ||
| 714 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x); | ||
| 715 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x); | ||
| 716 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x); | ||
| 717 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x); | ||
| 718 | #define vector_float simd_float | ||
| 719 | |||
| 720 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x); | ||
| 721 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x); | ||
| 722 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x); | ||
| 723 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x); | ||
| 724 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x); | ||
| 725 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x); | ||
| 726 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x); | ||
| 727 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x); | ||
| 728 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x); | ||
| 729 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x); | ||
| 730 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x); | ||
| 731 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x); | ||
| 732 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x); | ||
| 733 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x); | ||
| 734 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x); | ||
| 735 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x); | ||
| 736 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x); | ||
| 737 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x); | ||
| 738 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x); | ||
| 739 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x); | ||
| 740 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x); | ||
| 741 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x); | ||
| 742 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x); | ||
| 743 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x); | ||
| 744 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x); | ||
| 745 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x); | ||
| 746 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x); | ||
| 747 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x); | ||
| 748 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x); | ||
| 749 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x); | ||
| 750 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x); | ||
| 751 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x); | ||
| 752 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x); | ||
| 753 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x); | ||
| 754 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x); | ||
| 755 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x); | ||
| 756 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x); | ||
| 757 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x); | ||
| 758 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x); | ||
| 759 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x); | ||
| 760 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x); | ||
| 761 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x); | ||
| 762 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x); | ||
| 763 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x); | ||
| 764 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x); | ||
| 765 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x); | ||
| 766 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x); | ||
| 767 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x); | ||
| 768 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x); | ||
| 769 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x); | ||
| 770 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x); | ||
| 771 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x); | ||
| 772 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x); | ||
| 773 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x); | ||
| 774 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x); | ||
| 775 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x); | ||
| 776 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x); | ||
| 777 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x); | ||
| 778 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x); | ||
| 779 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x); | ||
| 780 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x); | ||
| 781 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x); | ||
| 782 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x); | ||
| 783 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x); | ||
| 784 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x); | ||
| 785 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x); | ||
| 786 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x); | ||
| 787 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x); | ||
| 788 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x); | ||
| 789 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x); | ||
| 790 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x); | ||
| 791 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x); | ||
| 792 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x); | ||
| 793 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x); | ||
| 794 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x); | ||
| 795 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x); | ||
| 796 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x); | ||
| 797 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x); | ||
| 798 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x); | ||
| 799 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x); | ||
| 800 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x); | ||
| 801 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x); | ||
| 802 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x); | ||
| 803 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x); | ||
| 804 | #define vector_long simd_long | ||
| 805 | #define vector_long_sat simd_long_sat | ||
| 806 | |||
| 807 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x); | ||
| 808 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x); | ||
| 809 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x); | ||
| 810 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x); | ||
| 811 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x); | ||
| 812 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x); | ||
| 813 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x); | ||
| 814 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x); | ||
| 815 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x); | ||
| 816 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x); | ||
| 817 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x); | ||
| 818 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x); | ||
| 819 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x); | ||
| 820 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x); | ||
| 821 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x); | ||
| 822 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x); | ||
| 823 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x); | ||
| 824 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x); | ||
| 825 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x); | ||
| 826 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x); | ||
| 827 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x); | ||
| 828 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x); | ||
| 829 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x); | ||
| 830 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x); | ||
| 831 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x); | ||
| 832 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x); | ||
| 833 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x); | ||
| 834 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x); | ||
| 835 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x); | ||
| 836 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x); | ||
| 837 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x); | ||
| 838 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x); | ||
| 839 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x); | ||
| 840 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x); | ||
| 841 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x); | ||
| 842 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x); | ||
| 843 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x); | ||
| 844 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x); | ||
| 845 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x); | ||
| 846 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x); | ||
| 847 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x); | ||
| 848 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x); | ||
| 849 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x); | ||
| 850 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x); | ||
| 851 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x); | ||
| 852 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x); | ||
| 853 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x); | ||
| 854 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x); | ||
| 855 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x); | ||
| 856 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x); | ||
| 857 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x); | ||
| 858 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x); | ||
| 859 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x); | ||
| 860 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x); | ||
| 861 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x); | ||
| 862 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x); | ||
| 863 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x); | ||
| 864 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x); | ||
| 865 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x); | ||
| 866 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x); | ||
| 867 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x); | ||
| 868 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x); | ||
| 869 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x); | ||
| 870 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x); | ||
| 871 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x); | ||
| 872 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x); | ||
| 873 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x); | ||
| 874 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x); | ||
| 875 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x); | ||
| 876 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x); | ||
| 877 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x); | ||
| 878 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x); | ||
| 879 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x); | ||
| 880 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x); | ||
| 881 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x); | ||
| 882 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x); | ||
| 883 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x); | ||
| 884 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x); | ||
| 885 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x); | ||
| 886 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x); | ||
| 887 | #define vector_ulong simd_ulong | ||
| 888 | #define vector_ulong_sat simd_ulong_sat | ||
| 889 | |||
| 890 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x); | ||
| 891 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x); | ||
| 892 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x); | ||
| 893 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x); | ||
| 894 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x); | ||
| 895 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x); | ||
| 896 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x); | ||
| 897 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x); | ||
| 898 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x); | ||
| 899 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x); | ||
| 900 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x); | ||
| 901 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x); | ||
| 902 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x); | ||
| 903 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x); | ||
| 904 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x); | ||
| 905 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x); | ||
| 906 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x); | ||
| 907 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x); | ||
| 908 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x); | ||
| 909 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x); | ||
| 910 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x); | ||
| 911 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x); | ||
| 912 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x); | ||
| 913 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x); | ||
| 914 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x); | ||
| 915 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x); | ||
| 916 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x); | ||
| 917 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x); | ||
| 918 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x); | ||
| 919 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x); | ||
| 920 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x); | ||
| 921 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x); | ||
| 922 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x); | ||
| 923 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x); | ||
| 924 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x); | ||
| 925 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x); | ||
| 926 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x); | ||
| 927 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x); | ||
| 928 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x); | ||
| 929 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x); | ||
| 930 | #define vector_double simd_double | ||
| 931 | |||
| 932 | static simd_char2 SIMD_CFUNC vector2(char __x, char __y) { return ( simd_char2){__x, __y}; } | ||
| 933 | static simd_uchar2 SIMD_CFUNC vector2(unsigned char __x, unsigned char __y) { return ( simd_uchar2){__x, __y}; } | ||
| 934 | static simd_short2 SIMD_CFUNC vector2(short __x, short __y) { return ( simd_short2){__x, __y}; } | ||
| 935 | static simd_ushort2 SIMD_CFUNC vector2(unsigned short __x, unsigned short __y) { return (simd_ushort2){__x, __y}; } | ||
| 936 | static simd_int2 SIMD_CFUNC vector2(int __x, int __y) { return ( simd_int2){__x, __y}; } | ||
| 937 | static simd_uint2 SIMD_CFUNC vector2(unsigned int __x, unsigned int __y) { return ( simd_uint2){__x, __y}; } | ||
| 938 | static simd_float2 SIMD_CFUNC vector2(float __x, float __y) { return ( simd_float2){__x, __y}; } | ||
| 939 | static simd_long2 SIMD_CFUNC vector2(simd_long1 __x, simd_long1 __y) { return ( simd_long2){__x, __y}; } | ||
| 940 | static simd_ulong2 SIMD_CFUNC vector2(simd_ulong1 __x, simd_ulong1 __y) { return ( simd_ulong2){__x, __y}; } | ||
| 941 | static simd_double2 SIMD_CFUNC vector2(double __x, double __y) { return (simd_double2){__x, __y}; } | ||
| 942 | |||
| 943 | static simd_char3 SIMD_CFUNC vector3(char __x, char __y, char __z) { return ( simd_char3){__x, __y, __z}; } | ||
| 944 | static simd_uchar3 SIMD_CFUNC vector3(unsigned char __x, unsigned char __y, unsigned char __z) { return ( simd_uchar3){__x, __y, __z}; } | ||
| 945 | static simd_short3 SIMD_CFUNC vector3(short __x, short __y, short __z) { return ( simd_short3){__x, __y, __z}; } | ||
| 946 | static simd_ushort3 SIMD_CFUNC vector3(unsigned short __x, unsigned short __y, unsigned short __z) { return (simd_ushort3){__x, __y, __z}; } | ||
| 947 | static simd_int3 SIMD_CFUNC vector3(int __x, int __y, int __z) { return ( simd_int3){__x, __y, __z}; } | ||
| 948 | static simd_uint3 SIMD_CFUNC vector3(unsigned int __x, unsigned int __y, unsigned int __z) { return ( simd_uint3){__x, __y, __z}; } | ||
| 949 | static simd_float3 SIMD_CFUNC vector3(float __x, float __y, float __z) { return ( simd_float3){__x, __y, __z}; } | ||
| 950 | static simd_long3 SIMD_CFUNC vector3(simd_long1 __x, simd_long1 __y, simd_long1 __z) { return ( simd_long3){__x, __y, __z}; } | ||
| 951 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z) { return ( simd_ulong3){__x, __y, __z}; } | ||
| 952 | static simd_double3 SIMD_CFUNC vector3(double __x, double __y, double __z) { return (simd_double3){__x, __y, __z}; } | ||
| 953 | |||
| 954 | static simd_char3 SIMD_CFUNC vector3(simd_char2 __xy, char __z) { simd_char3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 955 | static simd_uchar3 SIMD_CFUNC vector3(simd_uchar2 __xy, unsigned char __z) { simd_uchar3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 956 | static simd_short3 SIMD_CFUNC vector3(simd_short2 __xy, short __z) { simd_short3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 957 | static simd_ushort3 SIMD_CFUNC vector3(simd_ushort2 __xy, unsigned short __z) { simd_ushort3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 958 | static simd_int3 SIMD_CFUNC vector3(simd_int2 __xy, int __z) { simd_int3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 959 | static simd_uint3 SIMD_CFUNC vector3(simd_uint2 __xy, unsigned int __z) { simd_uint3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 960 | static simd_float3 SIMD_CFUNC vector3(simd_float2 __xy, float __z) { simd_float3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 961 | static simd_long3 SIMD_CFUNC vector3(simd_long2 __xy, simd_long1 __z) { simd_long3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 962 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong2 __xy, simd_ulong1 __z) { simd_ulong3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 963 | static simd_double3 SIMD_CFUNC vector3(simd_double2 __xy, double __z) { simd_double3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 964 | |||
| 965 | static simd_char4 SIMD_CFUNC vector4(char __x, char __y, char __z, char __w) { return ( simd_char4){__x, __y, __z, __w}; } | ||
| 966 | static simd_uchar4 SIMD_CFUNC vector4(unsigned char __x, unsigned char __y, unsigned char __z, unsigned char __w) { return ( simd_uchar4){__x, __y, __z, __w}; } | ||
| 967 | static simd_short4 SIMD_CFUNC vector4(short __x, short __y, short __z, short __w) { return ( simd_short4){__x, __y, __z, __w}; } | ||
| 968 | static simd_ushort4 SIMD_CFUNC vector4(unsigned short __x, unsigned short __y, unsigned short __z, unsigned short __w) { return (simd_ushort4){__x, __y, __z, __w}; } | ||
| 969 | static simd_int4 SIMD_CFUNC vector4(int __x, int __y, int __z, int __w) { return ( simd_int4){__x, __y, __z, __w}; } | ||
| 970 | static simd_uint4 SIMD_CFUNC vector4(unsigned int __x, unsigned int __y, unsigned int __z, unsigned int __w) { return ( simd_uint4){__x, __y, __z, __w}; } | ||
| 971 | static simd_float4 SIMD_CFUNC vector4(float __x, float __y, float __z, float __w) { return ( simd_float4){__x, __y, __z, __w}; } | ||
| 972 | static simd_long4 SIMD_CFUNC vector4(simd_long1 __x, simd_long1 __y, simd_long1 __z, simd_long1 __w) { return ( simd_long4){__x, __y, __z, __w}; } | ||
| 973 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z, simd_ulong1 __w) { return ( simd_ulong4){__x, __y, __z, __w}; } | ||
| 974 | static simd_double4 SIMD_CFUNC vector4(double __x, double __y, double __z, double __w) { return (simd_double4){__x, __y, __z, __w}; } | ||
| 975 | |||
| 976 | static simd_char4 SIMD_CFUNC vector4(simd_char2 __xy, simd_char2 __zw) { simd_char4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 977 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar2 __xy, simd_uchar2 __zw) { simd_uchar4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 978 | static simd_short4 SIMD_CFUNC vector4(simd_short2 __xy, simd_short2 __zw) { simd_short4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 979 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort2 __xy, simd_ushort2 __zw) { simd_ushort4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 980 | static simd_int4 SIMD_CFUNC vector4(simd_int2 __xy, simd_int2 __zw) { simd_int4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 981 | static simd_uint4 SIMD_CFUNC vector4(simd_uint2 __xy, simd_uint2 __zw) { simd_uint4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 982 | static simd_float4 SIMD_CFUNC vector4(simd_float2 __xy, simd_float2 __zw) { simd_float4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 983 | static simd_long4 SIMD_CFUNC vector4(simd_long2 __xy, simd_long2 __zw) { simd_long4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 984 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong2 __xy, simd_ulong2 __zw) { simd_ulong4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 985 | static simd_double4 SIMD_CFUNC vector4(simd_double2 __xy, simd_double2 __zw) { simd_double4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 986 | |||
| 987 | static simd_char4 SIMD_CFUNC vector4(simd_char3 __xyz, char __w) { simd_char4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 988 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar3 __xyz, unsigned char __w) { simd_uchar4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 989 | static simd_short4 SIMD_CFUNC vector4(simd_short3 __xyz, short __w) { simd_short4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 990 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort3 __xyz, unsigned short __w) { simd_ushort4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 991 | static simd_int4 SIMD_CFUNC vector4(simd_int3 __xyz, int __w) { simd_int4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 992 | static simd_uint4 SIMD_CFUNC vector4(simd_uint3 __xyz, unsigned int __w) { simd_uint4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 993 | static simd_float4 SIMD_CFUNC vector4(simd_float3 __xyz, float __w) { simd_float4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 994 | static simd_long4 SIMD_CFUNC vector4(simd_long3 __xyz, simd_long1 __w) { simd_long4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 995 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong3 __xyz, simd_ulong1 __w) { simd_ulong4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 996 | static simd_double4 SIMD_CFUNC vector4(simd_double3 __xyz, double __w) { simd_double4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 997 | |||
| 998 | static simd_char8 SIMD_CFUNC vector8(simd_char4 __lo, simd_char4 __hi) { simd_char8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 999 | static simd_uchar8 SIMD_CFUNC vector8(simd_uchar4 __lo, simd_uchar4 __hi) { simd_uchar8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1000 | static simd_short8 SIMD_CFUNC vector8(simd_short4 __lo, simd_short4 __hi) { simd_short8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1001 | static simd_ushort8 SIMD_CFUNC vector8(simd_ushort4 __lo, simd_ushort4 __hi) { simd_ushort8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1002 | static simd_int8 SIMD_CFUNC vector8(simd_int4 __lo, simd_int4 __hi) { simd_int8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1003 | static simd_uint8 SIMD_CFUNC vector8(simd_uint4 __lo, simd_uint4 __hi) { simd_uint8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1004 | static simd_float8 SIMD_CFUNC vector8(simd_float4 __lo, simd_float4 __hi) { simd_float8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1005 | static simd_long8 SIMD_CFUNC vector8(simd_long4 __lo, simd_long4 __hi) { simd_long8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1006 | static simd_ulong8 SIMD_CFUNC vector8(simd_ulong4 __lo, simd_ulong4 __hi) { simd_ulong8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1007 | static simd_double8 SIMD_CFUNC vector8(simd_double4 __lo, simd_double4 __hi) { simd_double8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1008 | |||
| 1009 | static simd_char16 SIMD_CFUNC vector16(simd_char8 __lo, simd_char8 __hi) { simd_char16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1010 | static simd_uchar16 SIMD_CFUNC vector16(simd_uchar8 __lo, simd_uchar8 __hi) { simd_uchar16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1011 | static simd_short16 SIMD_CFUNC vector16(simd_short8 __lo, simd_short8 __hi) { simd_short16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1012 | static simd_ushort16 SIMD_CFUNC vector16(simd_ushort8 __lo, simd_ushort8 __hi) { simd_ushort16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1013 | static simd_int16 SIMD_CFUNC vector16(simd_int8 __lo, simd_int8 __hi) { simd_int16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1014 | static simd_uint16 SIMD_CFUNC vector16(simd_uint8 __lo, simd_uint8 __hi) { simd_uint16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1015 | static simd_float16 SIMD_CFUNC vector16(simd_float8 __lo, simd_float8 __hi) { simd_float16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1016 | |||
| 1017 | static simd_char32 SIMD_CFUNC vector32(simd_char16 __lo, simd_char16 __hi) { simd_char32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1018 | static simd_uchar32 SIMD_CFUNC vector32(simd_uchar16 __lo, simd_uchar16 __hi) { simd_uchar32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1019 | static simd_short32 SIMD_CFUNC vector32(simd_short16 __lo, simd_short16 __hi) { simd_short32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1020 | static simd_ushort32 SIMD_CFUNC vector32(simd_ushort16 __lo, simd_ushort16 __hi) { simd_ushort32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1021 | |||
| 1022 | #pragma mark - Implementation | ||
| 1023 | |||
| 1024 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x) { return __x; } | ||
| 1025 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x) { return __x; } | ||
| 1026 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x) { return __x; } | ||
| 1027 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x) { return __x; } | ||
| 1028 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x) { return __x; } | ||
| 1029 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x) { return __x; } | ||
| 1030 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x) { return (simd_char2)__x; } | ||
| 1031 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x) { return (simd_char3)__x; } | ||
| 1032 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x) { return (simd_char4)__x; } | ||
| 1033 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x) { return (simd_char8)__x; } | ||
| 1034 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x) { return (simd_char16)__x; } | ||
| 1035 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x) { return (simd_char32)__x; } | ||
| 1036 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x) { return __builtin_convertvector(__x & 0xff, simd_char2); } | ||
| 1037 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x) { return __builtin_convertvector(__x & 0xff, simd_char3); } | ||
| 1038 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x) { return __builtin_convertvector(__x & 0xff, simd_char4); } | ||
| 1039 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x) { return __builtin_convertvector(__x & 0xff, simd_char8); } | ||
| 1040 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x) { return __builtin_convertvector(__x & 0xff, simd_char16); } | ||
| 1041 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x) { return __builtin_convertvector(__x & 0xff, simd_char32); } | ||
| 1042 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x) { return simd_char(simd_short(__x)); } | ||
| 1043 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x) { return simd_char(simd_short(__x)); } | ||
| 1044 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x) { return simd_char(simd_short(__x)); } | ||
| 1045 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x) { return simd_char(simd_short(__x)); } | ||
| 1046 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x) { return simd_char(simd_short(__x)); } | ||
| 1047 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x) { return simd_char(simd_short(__x)); } | ||
| 1048 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x) { return simd_char(simd_short(__x)); } | ||
| 1049 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x) { return simd_char(simd_short(__x)); } | ||
| 1050 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x) { return simd_char(simd_short(__x)); } | ||
| 1051 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x) { return simd_char(simd_short(__x)); } | ||
| 1052 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x) { return simd_char(simd_short(__x)); } | ||
| 1053 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x) { return simd_char(simd_short(__x)); } | ||
| 1054 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x) { return simd_char(simd_short(__x)); } | ||
| 1055 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x) { return simd_char(simd_short(__x)); } | ||
| 1056 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x) { return simd_char(simd_short(__x)); } | ||
| 1057 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x) { return simd_char(simd_short(__x)); } | ||
| 1058 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x) { return simd_char(simd_short(__x)); } | ||
| 1059 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x) { return simd_char(simd_short(__x)); } | ||
| 1060 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x) { return simd_char(simd_short(__x)); } | ||
| 1061 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x) { return simd_char(simd_short(__x)); } | ||
| 1062 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x) { return simd_char(simd_short(__x)); } | ||
| 1063 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x) { return simd_char(simd_short(__x)); } | ||
| 1064 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x) { return simd_char(simd_short(__x)); } | ||
| 1065 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x) { return simd_char(simd_short(__x)); } | ||
| 1066 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x) { return simd_char(simd_short(__x)); } | ||
| 1067 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x) { return simd_char(simd_short(__x)); } | ||
| 1068 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x) { return simd_char(simd_short(__x)); } | ||
| 1069 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x) { return simd_char(simd_short(__x)); } | ||
| 1070 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x) { return simd_char(simd_short(__x)); } | ||
| 1071 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x) { return simd_char(simd_short(__x)); } | ||
| 1072 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x) { return simd_char(simd_short(__x)); } | ||
| 1073 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x) { return simd_char(simd_short(__x)); } | ||
| 1074 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x) { return simd_char(simd_short(__x)); } | ||
| 1075 | |||
| 1076 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x) { return __x; } | ||
| 1077 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x) { return __x; } | ||
| 1078 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x) { return __x; } | ||
| 1079 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x) { return __x; } | ||
| 1080 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x) { return __x; } | ||
| 1081 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x) { return __x; } | ||
| 1082 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1083 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1084 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1085 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1086 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1087 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1088 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1089 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1090 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1091 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1092 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1093 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1094 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1095 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1096 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1097 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1098 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1099 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1100 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1101 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1102 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1103 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1104 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1105 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1106 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1107 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1108 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1109 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1110 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1111 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1112 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1113 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1114 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1115 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1116 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1117 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1118 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1119 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1120 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1121 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1122 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1123 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1124 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1125 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1126 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1127 | |||
| 1128 | |||
| 1129 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; } | ||
| 1130 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; } | ||
| 1131 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x) { return (simd_uchar4)__x; } | ||
| 1132 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x) { return (simd_uchar8)__x; } | ||
| 1133 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x) { return (simd_uchar16)__x; } | ||
| 1134 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x) { return (simd_uchar32)__x; } | ||
| 1135 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x) { return __x; } | ||
| 1136 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x) { return __x; } | ||
| 1137 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x) { return __x; } | ||
| 1138 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x) { return __x; } | ||
| 1139 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x) { return __x; } | ||
| 1140 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x) { return __x; } | ||
| 1141 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1142 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1143 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1144 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1145 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1146 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1147 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1148 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1149 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1150 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1151 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1152 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1153 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1154 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1155 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1156 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1157 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1158 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1159 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1160 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1161 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1162 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1163 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1164 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1165 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1166 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1167 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1168 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1169 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1170 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1171 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1172 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1173 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1174 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1175 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1176 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1177 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1178 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1179 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1180 | |||
| 1181 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1182 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1183 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1184 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1185 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1186 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1187 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1188 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1189 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1190 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1191 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1192 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1193 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1194 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1195 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1196 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1197 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1198 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1199 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1200 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1201 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1202 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1203 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1204 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1205 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1206 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1207 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1208 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1209 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1210 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1211 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x) { return __x; } | ||
| 1212 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x) { return __x; } | ||
| 1213 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x) { return __x; } | ||
| 1214 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x) { return __x; } | ||
| 1215 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x) { return __x; } | ||
| 1216 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x) { return __x; } | ||
| 1217 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1218 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1219 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1220 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1221 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1222 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1223 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1224 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1225 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1226 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1227 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1228 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1229 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1230 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1231 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1232 | |||
| 1233 | |||
| 1234 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1235 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1236 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1237 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1238 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1239 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1240 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1241 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1242 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1243 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1244 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1245 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1246 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x) { return __x; } | ||
| 1247 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x) { return __x; } | ||
| 1248 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x) { return __x; } | ||
| 1249 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x) { return __x; } | ||
| 1250 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x) { return __x; } | ||
| 1251 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x) { return __x; } | ||
| 1252 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x) { return (simd_short2)__x; } | ||
| 1253 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x) { return (simd_short3)__x; } | ||
| 1254 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x) { return (simd_short4)__x; } | ||
| 1255 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x) { return (simd_short8)__x; } | ||
| 1256 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x) { return (simd_short16)__x; } | ||
| 1257 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x) { return (simd_short32)__x; } | ||
| 1258 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x) { return __builtin_convertvector(__x & 0xffff, simd_short2); } | ||
| 1259 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x) { return __builtin_convertvector(__x & 0xffff, simd_short3); } | ||
| 1260 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x) { return __builtin_convertvector(__x & 0xffff, simd_short4); } | ||
| 1261 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x) { return __builtin_convertvector(__x & 0xffff, simd_short8); } | ||
| 1262 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x) { return __builtin_convertvector(__x & 0xffff, simd_short16); } | ||
| 1263 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x) { return simd_short(simd_int(__x)); } | ||
| 1264 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x) { return simd_short(simd_int(__x)); } | ||
| 1265 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x) { return simd_short(simd_int(__x)); } | ||
| 1266 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x) { return simd_short(simd_int(__x)); } | ||
| 1267 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x) { return simd_short(simd_int(__x)); } | ||
| 1268 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x) { return simd_short(simd_int(__x)); } | ||
| 1269 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x) { return simd_short(simd_int(__x)); } | ||
| 1270 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x) { return simd_short(simd_int(__x)); } | ||
| 1271 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x) { return simd_short(simd_int(__x)); } | ||
| 1272 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x) { return simd_short(simd_int(__x)); } | ||
| 1273 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x) { return simd_short(simd_int(__x)); } | ||
| 1274 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x) { return simd_short(simd_int(__x)); } | ||
| 1275 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x) { return simd_short(simd_int(__x)); } | ||
| 1276 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x) { return simd_short(simd_int(__x)); } | ||
| 1277 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x) { return simd_short(simd_int(__x)); } | ||
| 1278 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x) { return simd_short(simd_int(__x)); } | ||
| 1279 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x) { return simd_short(simd_int(__x)); } | ||
| 1280 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x) { return simd_short(simd_int(__x)); } | ||
| 1281 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x) { return simd_short(simd_int(__x)); } | ||
| 1282 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x) { return simd_short(simd_int(__x)); } | ||
| 1283 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x) { return simd_short(simd_int(__x)); } | ||
| 1284 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x) { return simd_short(simd_int(__x)); } | ||
| 1285 | |||
| 1286 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x) { return simd_short(__x); } | ||
| 1287 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x) { return simd_short(__x); } | ||
| 1288 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x) { return simd_short(__x); } | ||
| 1289 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x) { return simd_short(__x); } | ||
| 1290 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x) { return simd_short(__x); } | ||
| 1291 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x) { return simd_short(__x); } | ||
| 1292 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x) { return __x; } | ||
| 1293 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x) { return __x; } | ||
| 1294 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x) { return __x; } | ||
| 1295 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x) { return __x; } | ||
| 1296 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x) { return __x; } | ||
| 1297 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x) { return __x; } | ||
| 1298 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1299 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1300 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1301 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1302 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1303 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1304 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1305 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1306 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1307 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1308 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1309 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1310 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1311 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1312 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1313 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1314 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1315 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1316 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x) { return simd_short(__x); } | ||
| 1317 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x) { return simd_short(__x); } | ||
| 1318 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x) { return simd_short(__x); } | ||
| 1319 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x) { return simd_short(__x); } | ||
| 1320 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x) { return simd_short(__x); } | ||
| 1321 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x) { return simd_short(__x); } | ||
| 1322 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1323 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1324 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1325 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1326 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1327 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1328 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1329 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1330 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1331 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1332 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1333 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1334 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1335 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1336 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1337 | |||
| 1338 | |||
| 1339 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1340 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1341 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1342 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1343 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1344 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1345 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1346 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1347 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1348 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1349 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1350 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1351 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x) { return (simd_ushort2)__x; } | ||
| 1352 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x) { return (simd_ushort3)__x; } | ||
| 1353 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x) { return (simd_ushort4)__x; } | ||
| 1354 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x) { return (simd_ushort8)__x; } | ||
| 1355 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x) { return (simd_ushort16)__x; } | ||
| 1356 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x) { return (simd_ushort32)__x; } | ||
| 1357 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x) { return __x; } | ||
| 1358 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x) { return __x; } | ||
| 1359 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x) { return __x; } | ||
| 1360 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x) { return __x; } | ||
| 1361 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x) { return __x; } | ||
| 1362 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x) { return __x; } | ||
| 1363 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1364 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1365 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1366 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1367 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1368 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1369 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1370 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1371 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1372 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1373 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1374 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1375 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1376 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1377 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1378 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1379 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1380 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1381 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1382 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1383 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1384 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1385 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1386 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1387 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1388 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1389 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1390 | |||
| 1391 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1392 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1393 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1394 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1395 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1396 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1397 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1398 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1399 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1400 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1401 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1402 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1403 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1404 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1405 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1406 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1407 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1408 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1409 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1410 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1411 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1412 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1413 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1414 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1415 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1416 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1417 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1418 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1419 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1420 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1421 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x) { return simd_ushort(__x); } | ||
| 1422 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x) { return simd_ushort(__x); } | ||
| 1423 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x) { return simd_ushort(__x); } | ||
| 1424 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x) { return simd_ushort(__x); } | ||
| 1425 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x) { return simd_ushort(__x); } | ||
| 1426 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x) { return simd_ushort(__x); } | ||
| 1427 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x) { return __x; } | ||
| 1428 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x) { return __x; } | ||
| 1429 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x) { return __x; } | ||
| 1430 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x) { return __x; } | ||
| 1431 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x) { return __x; } | ||
| 1432 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x) { return __x; } | ||
| 1433 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1434 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1435 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1436 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1437 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1438 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1439 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1440 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1441 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1442 | |||
| 1443 | |||
| 1444 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1445 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1446 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1447 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1448 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1449 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1450 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1451 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1452 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1453 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1454 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1455 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1456 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1457 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1458 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1459 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1460 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1461 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1462 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1463 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1464 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x) { return __x; } | ||
| 1465 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x) { return __x; } | ||
| 1466 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x) { return __x; } | ||
| 1467 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x) { return __x; } | ||
| 1468 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x) { return __x; } | ||
| 1469 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x) { return (simd_int2)__x; } | ||
| 1470 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x) { return (simd_int3)__x; } | ||
| 1471 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x) { return (simd_int4)__x; } | ||
| 1472 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x) { return (simd_int8)__x; } | ||
| 1473 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x) { return (simd_int16)__x; } | ||
| 1474 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1475 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1476 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1477 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1478 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1479 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int2); } | ||
| 1480 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int3); } | ||
| 1481 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int4); } | ||
| 1482 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int8); } | ||
| 1483 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x) { return simd_int(simd_long(__x)); } | ||
| 1484 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x) { return simd_int(simd_long(__x)); } | ||
| 1485 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x) { return simd_int(simd_long(__x)); } | ||
| 1486 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x) { return simd_int(simd_long(__x)); } | ||
| 1487 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1488 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1489 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1490 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1491 | |||
| 1492 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x) { return simd_int(__x); } | ||
| 1493 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x) { return simd_int(__x); } | ||
| 1494 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x) { return simd_int(__x); } | ||
| 1495 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x) { return simd_int(__x); } | ||
| 1496 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x) { return simd_int(__x); } | ||
| 1497 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x) { return simd_int(__x); } | ||
| 1498 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x) { return simd_int(__x); } | ||
| 1499 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x) { return simd_int(__x); } | ||
| 1500 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x) { return simd_int(__x); } | ||
| 1501 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x) { return simd_int(__x); } | ||
| 1502 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x) { return __x; } | ||
| 1503 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x) { return __x; } | ||
| 1504 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x) { return __x; } | ||
| 1505 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x) { return __x; } | ||
| 1506 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x) { return __x; } | ||
| 1507 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1508 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1509 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1510 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1511 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1512 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1513 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1514 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1515 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1516 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1517 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1518 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1519 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1520 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x) { return simd_int(__x); } | ||
| 1521 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x) { return simd_int(__x); } | ||
| 1522 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x) { return simd_int(__x); } | ||
| 1523 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x) { return simd_int(__x); } | ||
| 1524 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x) { return simd_int(__x); } | ||
| 1525 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x) { return simd_int(__x); } | ||
| 1526 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x) { return simd_int(__x); } | ||
| 1527 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x) { return simd_int(__x); } | ||
| 1528 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x) { return simd_int(__x); } | ||
| 1529 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x) { return simd_int(__x); } | ||
| 1530 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1531 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1532 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1533 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1534 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1535 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1536 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1537 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1538 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1539 | |||
| 1540 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) { | ||
| 1541 | #if defined __arm64__ | ||
| 1542 | return vcvtn_s32_f32(__x); | ||
| 1543 | #else | ||
| 1544 | return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1545 | #endif | ||
| 1546 | } | ||
| 1547 | |||
| 1548 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) { | ||
| 1549 | return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) { | ||
| 1553 | #if defined __SSE2__ | ||
| 1554 | return _mm_cvtps_epi32(__x); | ||
| 1555 | #elif defined __arm64__ | ||
| 1556 | return vcvtnq_s32_f32(__x); | ||
| 1557 | #else | ||
| 1558 | simd_float4 magic = __tg_copysign(0x1.0p23, __x); | ||
| 1559 | simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23; | ||
| 1560 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4); | ||
| 1561 | #endif | ||
| 1562 | } | ||
| 1563 | |||
| 1564 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) { | ||
| 1565 | #if defined __AVX__ | ||
| 1566 | return _mm256_cvtps_epi32(__x); | ||
| 1567 | #else | ||
| 1568 | return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1569 | #endif | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) { | ||
| 1573 | #if defined __AVX512F__ | ||
| 1574 | return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT); | ||
| 1575 | #else | ||
| 1576 | return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1577 | #endif | ||
| 1578 | } | ||
| 1579 | |||
| 1580 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1581 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1582 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1583 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1584 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1585 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1586 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1587 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1588 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1589 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1590 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1591 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1592 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1593 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1594 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1595 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1596 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1597 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1598 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1599 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1600 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x) { return (simd_uint2)__x; } | ||
| 1601 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x) { return (simd_uint3)__x; } | ||
| 1602 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x) { return (simd_uint4)__x; } | ||
| 1603 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x) { return (simd_uint8)__x; } | ||
| 1604 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x) { return (simd_uint16)__x; } | ||
| 1605 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x) { return __x; } | ||
| 1606 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x) { return __x; } | ||
| 1607 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x) { return __x; } | ||
| 1608 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x) { return __x; } | ||
| 1609 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x) { return __x; } | ||
| 1610 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x) { simd_int2 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float2)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint2)0,0x80000000,__big); } | ||
| 1611 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x) { simd_int3 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float3)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint3)0,0x80000000,__big); } | ||
| 1612 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x) { simd_int4 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float4)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint4)0,0x80000000,__big); } | ||
| 1613 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x) { simd_int8 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float8)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint8)0,0x80000000,__big); } | ||
| 1614 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x) { simd_int16 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float16)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint16)0,0x80000000,__big); } | ||
| 1615 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1616 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1617 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1618 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1619 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1620 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1621 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1622 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1623 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x) { simd_long2 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double2)0,0x1.0p31,__big))) + simd_bitselect((simd_uint2)0,0x80000000,simd_int(__big)); } | ||
| 1624 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x) { simd_long3 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double3)0,0x1.0p31,__big))) + simd_bitselect((simd_uint3)0,0x80000000,simd_int(__big)); } | ||
| 1625 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x) { simd_long4 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double4)0,0x1.0p31,__big))) + simd_bitselect((simd_uint4)0,0x80000000,simd_int(__big)); } | ||
| 1626 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x) { simd_long8 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double8)0,0x1.0p31,__big))) + simd_bitselect((simd_uint8)0,0x80000000,simd_int(__big)); } | ||
| 1627 | |||
| 1628 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1629 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1630 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1631 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1632 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1633 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1634 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1635 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1636 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1637 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1638 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1639 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1640 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1641 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1642 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1643 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1644 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1645 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1646 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1647 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1648 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1649 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1650 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1651 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1652 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1653 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1654 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1655 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1656 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x) { return simd_uint(__x); } | ||
| 1657 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x) { return simd_uint(__x); } | ||
| 1658 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x) { return simd_uint(__x); } | ||
| 1659 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x) { return simd_uint(__x); } | ||
| 1660 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x) { return simd_uint(__x); } | ||
| 1661 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x) { return simd_uint(__x); } | ||
| 1662 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x) { return simd_uint(__x); } | ||
| 1663 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x) { return simd_uint(__x); } | ||
| 1664 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x) { return simd_uint(__x); } | ||
| 1665 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x) { return simd_uint(__x); } | ||
| 1666 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x) { return __x; } | ||
| 1667 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x) { return __x; } | ||
| 1668 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x) { return __x; } | ||
| 1669 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x) { return __x; } | ||
| 1670 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x) { return __x; } | ||
| 1671 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1672 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1673 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1674 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1675 | |||
| 1676 | |||
| 1677 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1678 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1679 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1680 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1681 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1682 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1683 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1684 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1685 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1686 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1687 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1688 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1689 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1690 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1691 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1692 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1693 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1694 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1695 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1696 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1697 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1698 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1699 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1700 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1701 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1702 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1703 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1704 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1705 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1706 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1707 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x) { return __x; } | ||
| 1708 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x) { return __x; } | ||
| 1709 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x) { return __x; } | ||
| 1710 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x) { return __x; } | ||
| 1711 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x) { return __x; } | ||
| 1712 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1713 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1714 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1715 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1716 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1717 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1718 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1719 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1720 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1721 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1722 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1723 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1724 | |||
| 1725 | |||
| 1726 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1727 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1728 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1729 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1730 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1731 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1732 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1733 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1734 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1735 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1736 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1737 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1738 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1739 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1740 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1741 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1742 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1743 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1744 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1745 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1746 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1747 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1748 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1749 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1750 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1751 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1752 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1753 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1754 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x) { return __x; } | ||
| 1755 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x) { return __x; } | ||
| 1756 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x) { return __x; } | ||
| 1757 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x) { return __x; } | ||
| 1758 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x) { return (simd_long2)__x; } | ||
| 1759 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x) { return (simd_long3)__x; } | ||
| 1760 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x) { return (simd_long4)__x; } | ||
| 1761 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x) { return (simd_long8)__x; } | ||
| 1762 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1763 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1764 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1765 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1766 | |||
| 1767 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x) { return simd_long(__x); } | ||
| 1768 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x) { return simd_long(__x); } | ||
| 1769 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x) { return simd_long(__x); } | ||
| 1770 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x) { return simd_long(__x); } | ||
| 1771 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x) { return simd_long(__x); } | ||
| 1772 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x) { return simd_long(__x); } | ||
| 1773 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x) { return simd_long(__x); } | ||
| 1774 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x) { return simd_long(__x); } | ||
| 1775 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x) { return simd_long(__x); } | ||
| 1776 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x) { return simd_long(__x); } | ||
| 1777 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x) { return simd_long(__x); } | ||
| 1778 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x) { return simd_long(__x); } | ||
| 1779 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1780 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1781 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1782 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1783 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x) { return __x; } | ||
| 1784 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x) { return __x; } | ||
| 1785 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x) { return __x; } | ||
| 1786 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x) { return __x; } | ||
| 1787 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1788 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1789 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1790 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1791 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x) { return simd_long(__x); } | ||
| 1792 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x) { return simd_long(__x); } | ||
| 1793 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x) { return simd_long(__x); } | ||
| 1794 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x) { return simd_long(__x); } | ||
| 1795 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x) { return simd_long(__x); } | ||
| 1796 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x) { return simd_long(__x); } | ||
| 1797 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x) { return simd_long(__x); } | ||
| 1798 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x) { return simd_long(__x); } | ||
| 1799 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x) { return simd_long(__x); } | ||
| 1800 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x) { return simd_long(__x); } | ||
| 1801 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x) { return simd_long(__x); } | ||
| 1802 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x) { return simd_long(__x); } | ||
| 1803 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1804 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1805 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1806 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1807 | |||
| 1808 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) { | ||
| 1809 | #if defined __AVX512F__ | ||
| 1810 | return _mm_cvtpd_epi64(__x); | ||
| 1811 | #elif defined __arm64__ | ||
| 1812 | return vcvtnq_s64_f64(__x); | ||
| 1813 | #else | ||
| 1814 | simd_double2 magic = __tg_copysign(0x1.0p52, __x); | ||
| 1815 | simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52; | ||
| 1816 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2); | ||
| 1817 | #endif | ||
| 1818 | } | ||
| 1819 | |||
| 1820 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) { | ||
| 1821 | return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x))); | ||
| 1822 | } | ||
| 1823 | |||
| 1824 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) { | ||
| 1825 | #if defined __AVX512F__ | ||
| 1826 | return _mm256_cvtpd_epi64(__x); | ||
| 1827 | #else | ||
| 1828 | return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1829 | #endif | ||
| 1830 | } | ||
| 1831 | |||
| 1832 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) { | ||
| 1833 | #if defined __AVX512F__ | ||
| 1834 | return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT); | ||
| 1835 | #else | ||
| 1836 | return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1837 | #endif | ||
| 1838 | } | ||
| 1839 | |||
| 1840 | |||
| 1841 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1842 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1843 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1844 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1845 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1846 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1847 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1848 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1849 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1850 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1851 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1852 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1853 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1854 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1855 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1856 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1857 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1858 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1859 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1860 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1861 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1862 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1863 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1864 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1865 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x) { simd_int2 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float2)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,simd_long(__big)); } | ||
| 1866 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x) { simd_int3 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float3)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,simd_long(__big)); } | ||
| 1867 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x) { simd_int4 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float4)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,simd_long(__big)); } | ||
| 1868 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x) { simd_int8 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float8)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,simd_long(__big)); } | ||
| 1869 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x) { return (simd_ulong2)__x; } | ||
| 1870 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x) { return (simd_ulong3)__x; } | ||
| 1871 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x) { return (simd_ulong4)__x; } | ||
| 1872 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x) { return (simd_ulong8)__x; } | ||
| 1873 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x) { return __x; } | ||
| 1874 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x) { return __x; } | ||
| 1875 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x) { return __x; } | ||
| 1876 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x) { return __x; } | ||
| 1877 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x) { simd_long2 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double2)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,__big); } | ||
| 1878 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x) { simd_long3 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double3)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,__big); } | ||
| 1879 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x) { simd_long4 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double4)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,__big); } | ||
| 1880 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x) { simd_long8 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double8)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,__big); } | ||
| 1881 | |||
| 1882 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1883 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1884 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1885 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1886 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1887 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1888 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1889 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1890 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1891 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1892 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1893 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1894 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1895 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1896 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1897 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1898 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1899 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1900 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1901 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1902 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1903 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1904 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1905 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1906 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x) { return simd_ulong(__x); } | ||
| 1907 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x) { return simd_ulong(__x); } | ||
| 1908 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x) { return simd_ulong(__x); } | ||
| 1909 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x) { return simd_ulong(__x); } | ||
| 1910 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x) { return simd_ulong(__x); } | ||
| 1911 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x) { return simd_ulong(__x); } | ||
| 1912 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x) { return simd_ulong(__x); } | ||
| 1913 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x) { return simd_ulong(__x); } | ||
| 1914 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x) { return simd_ulong(__x); } | ||
| 1915 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x) { return simd_ulong(__x); } | ||
| 1916 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x) { return simd_ulong(__x); } | ||
| 1917 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x) { return simd_ulong(__x); } | ||
| 1918 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; } | ||
| 1919 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; } | ||
| 1920 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; } | ||
| 1921 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; } | ||
| 1922 | |||
| 1923 | |||
| 1924 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); } | ||
| 1925 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); } | ||
| 1926 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x) { return simd_double(simd_int(__x)); } | ||
| 1927 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x) { return simd_double(simd_int(__x)); } | ||
| 1928 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x) { return simd_double(simd_int(__x)); } | ||
| 1929 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x) { return simd_double(simd_int(__x)); } | ||
| 1930 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x) { return simd_double(simd_int(__x)); } | ||
| 1931 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x) { return simd_double(simd_int(__x)); } | ||
| 1932 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x) { return simd_double(simd_int(__x)); } | ||
| 1933 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x) { return simd_double(simd_int(__x)); } | ||
| 1934 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x) { return simd_double(simd_int(__x)); } | ||
| 1935 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x) { return simd_double(simd_int(__x)); } | ||
| 1936 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x) { return simd_double(simd_int(__x)); } | ||
| 1937 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x) { return simd_double(simd_int(__x)); } | ||
| 1938 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x) { return simd_double(simd_int(__x)); } | ||
| 1939 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x) { return simd_double(simd_int(__x)); } | ||
| 1940 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1941 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1942 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1943 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1944 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1945 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1946 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1947 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1948 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1949 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1950 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1951 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1952 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1953 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1954 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1955 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1956 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1957 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1958 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1959 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1960 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1961 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1962 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1963 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1964 | |||
| 1965 | |||
| 1966 | #ifdef __cplusplus | ||
| 1967 | } // extern "C" | ||
| 1968 | |||
| 1969 | namespace simd { | ||
| 1970 | |||
| 1971 | #if __has_feature(cxx_constexpr) | ||
| 1972 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements. */ | ||
| 1973 | template<typename ScalarType, typename typeN> | ||
| 1974 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert(typeN vector) | ||
| 1975 | { | ||
| 1976 | if constexpr (traits<typeN>::count == 1) | ||
| 1977 | return static_cast<Vector_t<ScalarType, traits<typeN>::count>>(vector); | ||
| 1978 | else if constexpr (std::is_same<ScalarType, char1>::value) | ||
| 1979 | return simd_char(vector); | ||
| 1980 | else if constexpr (std::is_same<ScalarType, uchar1>::value) | ||
| 1981 | return simd_uchar(vector); | ||
| 1982 | else if constexpr (std::is_same<ScalarType, short1>::value) | ||
| 1983 | return simd_short(vector); | ||
| 1984 | else if constexpr (std::is_same<ScalarType, ushort1>::value) | ||
| 1985 | return simd_ushort(vector); | ||
| 1986 | else if constexpr (std::is_same<ScalarType, int1>::value) | ||
| 1987 | return simd_int(vector); | ||
| 1988 | else if constexpr (std::is_same<ScalarType, uint1>::value) | ||
| 1989 | return simd_uint(vector); | ||
| 1990 | else if constexpr (std::is_same<ScalarType, long1>::value) | ||
| 1991 | return simd_long(vector); | ||
| 1992 | else if constexpr (std::is_same<ScalarType, ulong1>::value) | ||
| 1993 | return simd_ulong(vector); | ||
| 1994 | else if constexpr (std::is_same<ScalarType, float1>::value) | ||
| 1995 | return simd_float(vector); | ||
| 1996 | else if constexpr (std::is_same<ScalarType, double1>::value) | ||
| 1997 | return simd_double(vector); | ||
| 1998 | } | ||
| 1999 | |||
| 2000 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements with saturation. | ||
| 2001 | * @discussion When the input value is too large to be represented in the return type, the input value | ||
| 2002 | * will be saturated to the maximum value of the return type. */ | ||
| 2003 | template<typename ScalarType, typename typeN> | ||
| 2004 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert_sat(typeN vector) | ||
| 2005 | { | ||
| 2006 | static_assert(traits<typeN>::count != 1); | ||
| 2007 | if constexpr (std::is_same<ScalarType, char1>::value) | ||
| 2008 | return simd_char_sat(vector); | ||
| 2009 | else if constexpr (std::is_same<ScalarType, uchar1>::value) | ||
| 2010 | return simd_uchar_sat(vector); | ||
| 2011 | else if constexpr (std::is_same<ScalarType, short1>::value) | ||
| 2012 | return simd_short_sat(vector); | ||
| 2013 | else if constexpr (std::is_same<ScalarType, ushort1>::value) | ||
| 2014 | return simd_ushort_sat(vector); | ||
| 2015 | else if constexpr (std::is_same<ScalarType, int1>::value) | ||
| 2016 | return simd_int_sat(vector); | ||
| 2017 | else if constexpr (std::is_same<ScalarType, uint1>::value) | ||
| 2018 | return simd_uint_sat(vector); | ||
| 2019 | else if constexpr (std::is_same<ScalarType, long1>::value) | ||
| 2020 | return simd_long_sat(vector); | ||
| 2021 | else if constexpr (std::is_same<ScalarType, ulong1>::value) | ||
| 2022 | return simd_ulong_sat(vector); | ||
| 2023 | else | ||
| 2024 | return convert<ScalarType, typeN>(vector); | ||
| 2025 | } | ||
| 2026 | #endif /* __has_feature(cxx_constexpr) */ | ||
| 2027 | |||
| 2028 | } /* namespace simd */ | ||
| 2029 | #endif // __cplusplus | ||
| 2030 | #endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 2031 | #endif // __SIMD_CONVERSION_HEADER__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/simd/math.h created+5783| ... | @@ -0,0 +1,5783 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide elementwise math operations | ||
| 3 | * on vectors; each lane of the result vector depends only on the data in the | ||
| 4 | * corresponding lane of the argument(s) to the function. | ||
| 5 | * | ||
| 6 | * You should not use the C functions declared in this header directly (these | ||
| 7 | * are functions with names like `__tg_cos(x)`). These are merely | ||
| 8 | * implementation details of <tgmath.h> overloading; instead of calling | ||
| 9 | * `__tg_cos(x)`, call `cos(x)`. If you are writing C++, use `simd::cos(x)`. | ||
| 10 | * | ||
| 11 | * Note that while these vector functions are relatively recent additions, | ||
| 12 | * scalar fallback is provided for all of them, so they are available even | ||
| 13 | * when targeting older OS versions. | ||
| 14 | * | ||
| 15 | * The following functions are available: | ||
| 16 | * | ||
| 17 | * C name C++ name Notes | ||
| 18 | * ---------------------------------------------------------------------- | ||
| 19 | * acos(x) simd::acos(x) | ||
| 20 | * asin(x) simd::asin(x) | ||
| 21 | * atan(x) simd::atan(x) | ||
| 22 | * atan2(y,x) simd::atan2(y,x) The argument order matches the scalar | ||
| 23 | * atan2 function, which gives the angle | ||
| 24 | * of a line with slope y/x. | ||
| 25 | * cos(x) simd::cos(x) | ||
| 26 | * sin(x) simd::sin(x) | ||
| 27 | * tan(x) simd::tan(x) | ||
| 28 | * | ||
| 29 | * cospi(x) simd::cospi(x) Returns cos(pi*x), sin(pi*x), tan(pi*x) | ||
| 30 | * sinpi(x) simd::sinpi(x) more efficiently and accurately than | ||
| 31 | * tanpi(x) simd::tanpi(x) would otherwise be possible | ||
| 32 | * | ||
| 33 | * acosh(x) simd::acosh(x) | ||
| 34 | * asinh(x) simd::asinh(x) | ||
| 35 | * atanh(x) simd::atanh(x) | ||
| 36 | * | ||
| 37 | * cosh(x) simd::cosh(x) | ||
| 38 | * sinh(x) simd::sinh(x) | ||
| 39 | * tanh(x) simd::tanh(x) | ||
| 40 | * | ||
| 41 | * exp(x) simd::exp(x) | ||
| 42 | * exp2(x) simd::exp2(x) | ||
| 43 | * exp10(x) simd::exp10(x) More efficient that pow(10,x). | ||
| 44 | * expm1(x) simd::expm1(x) exp(x)-1, accurate even for tiny x. | ||
| 45 | * | ||
| 46 | * log(x) simd::log(x) | ||
| 47 | * log2(x) simd::log2(x) | ||
| 48 | * log10(x) simd::log10(x) | ||
| 49 | * log1p(x) simd::log1p(x) log(1+x), accurate even for tiny x. | ||
| 50 | * | ||
| 51 | * fabs(x) simd::fabs(x) | ||
| 52 | * cbrt(x) simd::cbrt(x) | ||
| 53 | * sqrt(x) simd::sqrt(x) | ||
| 54 | * pow(x,y) simd::pow(x,y) | ||
| 55 | * copysign(x,y) simd::copysign(x,y) | ||
| 56 | * hypot(x,y) simd::hypot(x,y) sqrt(x*x + y*y), computed without | ||
| 57 | * overflow.1 | ||
| 58 | * erf(x) simd::erf(x) | ||
| 59 | * erfc(x) simd::erfc(x) | ||
| 60 | * tgamma(x) simd::tgamma(x) | ||
| 61 | * lgamma(x) simd::lgamma(x) | ||
| 62 | * | ||
| 63 | * fmod(x,y) simd::fmod(x,y) | ||
| 64 | * remainder(x,y) simd::remainder(x,y) | ||
| 65 | * | ||
| 66 | * ceil(x) simd::ceil(x) | ||
| 67 | * floor(x) simd::floor(x) | ||
| 68 | * rint(x) simd::rint(x) | ||
| 69 | * round(x) simd::round(x) | ||
| 70 | * trunc(x) simd::trunc(x) | ||
| 71 | * | ||
| 72 | * fdim(x,y) simd::fdim(x,y) | ||
| 73 | * fmax(x,y) simd::fmax(x,y) When one argument to fmin or fmax is | ||
| 74 | * fmin(x,y) simd::fmin(x,y) constant, use it as the *second* (y) | ||
| 75 | * argument to get better codegen on some | ||
| 76 | * architectures. E.g., write fmin(x,2) | ||
| 77 | * instead of fmin(2,x). | ||
| 78 | * fma(x,y,z) simd::fma(x,y,z) Fast on arm64 and when targeting AVX2 | ||
| 79 | * and later; may be quite expensive on | ||
| 80 | * older hardware. | ||
| 81 | * simd_muladd(x,y,z) simd::muladd(x,y,z) | ||
| 82 | * | ||
| 83 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 84 | * @unsorted */ | ||
| 85 | |||
| 86 | #ifndef SIMD_MATH_HEADER | ||
| 87 | #define SIMD_MATH_HEADER | ||
| 88 | |||
| 89 | #include <simd/base.h> | ||
| 90 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 91 | #include <simd/vector_make.h> | ||
| 92 | #include <simd/logic.h> | ||
| 93 | |||
| 94 | #ifdef __cplusplus | ||
| 95 | extern "C" { | ||
| 96 | #endif | ||
| 97 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 98 | * Objective-C, and `simd::acos` in C++. */ | ||
| 99 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x); | ||
| 100 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 101 | * Objective-C, and `simd::acos` in C++. */ | ||
| 102 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x); | ||
| 103 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 104 | * Objective-C, and `simd::acos` in C++. */ | ||
| 105 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x); | ||
| 106 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 107 | * Objective-C, and `simd::acos` in C++. */ | ||
| 108 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x); | ||
| 109 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 110 | * Objective-C, and `simd::acos` in C++. */ | ||
| 111 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x); | ||
| 112 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 113 | * Objective-C, and `simd::acos` in C++. */ | ||
| 114 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x); | ||
| 115 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 116 | * Objective-C, and `simd::acos` in C++. */ | ||
| 117 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x); | ||
| 118 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 119 | * Objective-C, and `simd::acos` in C++. */ | ||
| 120 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x); | ||
| 121 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 122 | * Objective-C, and `simd::acos` in C++. */ | ||
| 123 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x); | ||
| 124 | |||
| 125 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 126 | * Objective-C, and `simd::asin` in C++. */ | ||
| 127 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x); | ||
| 128 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 129 | * Objective-C, and `simd::asin` in C++. */ | ||
| 130 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x); | ||
| 131 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 132 | * Objective-C, and `simd::asin` in C++. */ | ||
| 133 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x); | ||
| 134 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 135 | * Objective-C, and `simd::asin` in C++. */ | ||
| 136 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x); | ||
| 137 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 138 | * Objective-C, and `simd::asin` in C++. */ | ||
| 139 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x); | ||
| 140 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 141 | * Objective-C, and `simd::asin` in C++. */ | ||
| 142 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x); | ||
| 143 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 144 | * Objective-C, and `simd::asin` in C++. */ | ||
| 145 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x); | ||
| 146 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 147 | * Objective-C, and `simd::asin` in C++. */ | ||
| 148 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x); | ||
| 149 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 150 | * Objective-C, and `simd::asin` in C++. */ | ||
| 151 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x); | ||
| 152 | |||
| 153 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 154 | * Objective-C, and `simd::atan` in C++. */ | ||
| 155 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x); | ||
| 156 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 157 | * Objective-C, and `simd::atan` in C++. */ | ||
| 158 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x); | ||
| 159 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 160 | * Objective-C, and `simd::atan` in C++. */ | ||
| 161 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x); | ||
| 162 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 163 | * Objective-C, and `simd::atan` in C++. */ | ||
| 164 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x); | ||
| 165 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 166 | * Objective-C, and `simd::atan` in C++. */ | ||
| 167 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x); | ||
| 168 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 169 | * Objective-C, and `simd::atan` in C++. */ | ||
| 170 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x); | ||
| 171 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 172 | * Objective-C, and `simd::atan` in C++. */ | ||
| 173 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x); | ||
| 174 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 175 | * Objective-C, and `simd::atan` in C++. */ | ||
| 176 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x); | ||
| 177 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 178 | * Objective-C, and `simd::atan` in C++. */ | ||
| 179 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x); | ||
| 180 | |||
| 181 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 182 | * Objective-C, and `simd::cos` in C++. */ | ||
| 183 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x); | ||
| 184 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 185 | * Objective-C, and `simd::cos` in C++. */ | ||
| 186 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x); | ||
| 187 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 188 | * Objective-C, and `simd::cos` in C++. */ | ||
| 189 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x); | ||
| 190 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 191 | * Objective-C, and `simd::cos` in C++. */ | ||
| 192 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x); | ||
| 193 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 194 | * Objective-C, and `simd::cos` in C++. */ | ||
| 195 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x); | ||
| 196 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 197 | * Objective-C, and `simd::cos` in C++. */ | ||
| 198 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x); | ||
| 199 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 200 | * Objective-C, and `simd::cos` in C++. */ | ||
| 201 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x); | ||
| 202 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 203 | * Objective-C, and `simd::cos` in C++. */ | ||
| 204 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x); | ||
| 205 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 206 | * Objective-C, and `simd::cos` in C++. */ | ||
| 207 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x); | ||
| 208 | |||
| 209 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 210 | * Objective-C, and `simd::sin` in C++. */ | ||
| 211 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x); | ||
| 212 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 213 | * Objective-C, and `simd::sin` in C++. */ | ||
| 214 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x); | ||
| 215 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 216 | * Objective-C, and `simd::sin` in C++. */ | ||
| 217 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x); | ||
| 218 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 219 | * Objective-C, and `simd::sin` in C++. */ | ||
| 220 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x); | ||
| 221 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 222 | * Objective-C, and `simd::sin` in C++. */ | ||
| 223 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x); | ||
| 224 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 225 | * Objective-C, and `simd::sin` in C++. */ | ||
| 226 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x); | ||
| 227 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 228 | * Objective-C, and `simd::sin` in C++. */ | ||
| 229 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x); | ||
| 230 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 231 | * Objective-C, and `simd::sin` in C++. */ | ||
| 232 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x); | ||
| 233 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 234 | * Objective-C, and `simd::sin` in C++. */ | ||
| 235 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x); | ||
| 236 | |||
| 237 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 238 | * Objective-C, and `simd::tan` in C++. */ | ||
| 239 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x); | ||
| 240 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 241 | * Objective-C, and `simd::tan` in C++. */ | ||
| 242 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x); | ||
| 243 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 244 | * Objective-C, and `simd::tan` in C++. */ | ||
| 245 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x); | ||
| 246 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 247 | * Objective-C, and `simd::tan` in C++. */ | ||
| 248 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x); | ||
| 249 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 250 | * Objective-C, and `simd::tan` in C++. */ | ||
| 251 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x); | ||
| 252 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 253 | * Objective-C, and `simd::tan` in C++. */ | ||
| 254 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x); | ||
| 255 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 256 | * Objective-C, and `simd::tan` in C++. */ | ||
| 257 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x); | ||
| 258 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 259 | * Objective-C, and `simd::tan` in C++. */ | ||
| 260 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x); | ||
| 261 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 262 | * Objective-C, and `simd::tan` in C++. */ | ||
| 263 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x); | ||
| 264 | |||
| 265 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 266 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 267 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 268 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x); | ||
| 269 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 270 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 271 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x); | ||
| 272 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 273 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 274 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x); | ||
| 275 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 276 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 277 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x); | ||
| 278 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 279 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 280 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x); | ||
| 281 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 282 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 283 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x); | ||
| 284 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 285 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 286 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x); | ||
| 287 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 288 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 289 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x); | ||
| 290 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 291 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 292 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x); | ||
| 293 | #endif | ||
| 294 | |||
| 295 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 296 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 297 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 298 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x); | ||
| 299 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 300 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 301 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x); | ||
| 302 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 303 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 304 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x); | ||
| 305 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 306 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 307 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x); | ||
| 308 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 309 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 310 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x); | ||
| 311 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 312 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 313 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x); | ||
| 314 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 315 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 316 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x); | ||
| 317 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 318 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 319 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x); | ||
| 320 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 321 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 322 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x); | ||
| 323 | #endif | ||
| 324 | |||
| 325 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 326 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 327 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 328 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x); | ||
| 329 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 330 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 331 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x); | ||
| 332 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 333 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 334 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x); | ||
| 335 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 336 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 337 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x); | ||
| 338 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 339 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 340 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x); | ||
| 341 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 342 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 343 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x); | ||
| 344 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 345 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 346 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x); | ||
| 347 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 348 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 349 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x); | ||
| 350 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 351 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 352 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x); | ||
| 353 | #endif | ||
| 354 | |||
| 355 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 356 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 357 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x); | ||
| 358 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 359 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 360 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x); | ||
| 361 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 362 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 363 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x); | ||
| 364 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 365 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 366 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x); | ||
| 367 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 368 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 369 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x); | ||
| 370 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 371 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 372 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x); | ||
| 373 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 374 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 375 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x); | ||
| 376 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 377 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 378 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x); | ||
| 379 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 380 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 381 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x); | ||
| 382 | |||
| 383 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 384 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 385 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x); | ||
| 386 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 387 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 388 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x); | ||
| 389 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 390 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 391 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x); | ||
| 392 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 393 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 394 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x); | ||
| 395 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 396 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 397 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x); | ||
| 398 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 399 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 400 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x); | ||
| 401 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 402 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 403 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x); | ||
| 404 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 405 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 406 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x); | ||
| 407 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 408 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 409 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x); | ||
| 410 | |||
| 411 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 412 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 413 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x); | ||
| 414 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 415 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 416 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x); | ||
| 417 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 418 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 419 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x); | ||
| 420 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 421 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 422 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x); | ||
| 423 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 424 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 425 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x); | ||
| 426 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 427 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 428 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x); | ||
| 429 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 430 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 431 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x); | ||
| 432 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 433 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 434 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x); | ||
| 435 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 436 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 437 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x); | ||
| 438 | |||
| 439 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 440 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 441 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x); | ||
| 442 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 443 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 444 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x); | ||
| 445 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 446 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 447 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x); | ||
| 448 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 449 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 450 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x); | ||
| 451 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 452 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 453 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x); | ||
| 454 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 455 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 456 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x); | ||
| 457 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 458 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 459 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x); | ||
| 460 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 461 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 462 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x); | ||
| 463 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 464 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 465 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x); | ||
| 466 | |||
| 467 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 468 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 469 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x); | ||
| 470 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 471 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 472 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x); | ||
| 473 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 474 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 475 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x); | ||
| 476 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 477 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 478 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x); | ||
| 479 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 480 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 481 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x); | ||
| 482 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 483 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 484 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x); | ||
| 485 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 486 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 487 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x); | ||
| 488 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 489 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 490 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x); | ||
| 491 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 492 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 493 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x); | ||
| 494 | |||
| 495 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 496 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 497 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x); | ||
| 498 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 499 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 500 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x); | ||
| 501 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 502 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 503 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x); | ||
| 504 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 505 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 506 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x); | ||
| 507 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 508 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 509 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x); | ||
| 510 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 511 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 512 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x); | ||
| 513 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 514 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 515 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x); | ||
| 516 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 517 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 518 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x); | ||
| 519 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 520 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 521 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x); | ||
| 522 | |||
| 523 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 524 | * Objective-C, and `simd::exp` in C++. */ | ||
| 525 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x); | ||
| 526 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 527 | * Objective-C, and `simd::exp` in C++. */ | ||
| 528 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x); | ||
| 529 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 530 | * Objective-C, and `simd::exp` in C++. */ | ||
| 531 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x); | ||
| 532 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 533 | * Objective-C, and `simd::exp` in C++. */ | ||
| 534 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x); | ||
| 535 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 536 | * Objective-C, and `simd::exp` in C++. */ | ||
| 537 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x); | ||
| 538 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 539 | * Objective-C, and `simd::exp` in C++. */ | ||
| 540 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x); | ||
| 541 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 542 | * Objective-C, and `simd::exp` in C++. */ | ||
| 543 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x); | ||
| 544 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 545 | * Objective-C, and `simd::exp` in C++. */ | ||
| 546 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x); | ||
| 547 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 548 | * Objective-C, and `simd::exp` in C++. */ | ||
| 549 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x); | ||
| 550 | |||
| 551 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 552 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 553 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x); | ||
| 554 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 555 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 556 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x); | ||
| 557 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 558 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 559 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x); | ||
| 560 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 561 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 562 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x); | ||
| 563 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 564 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 565 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x); | ||
| 566 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 567 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 568 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x); | ||
| 569 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 570 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 571 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x); | ||
| 572 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 573 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 574 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x); | ||
| 575 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 576 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 577 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x); | ||
| 578 | |||
| 579 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 580 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 581 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 582 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x); | ||
| 583 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 584 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 585 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x); | ||
| 586 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 587 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 588 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x); | ||
| 589 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 590 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 591 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x); | ||
| 592 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 593 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 594 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x); | ||
| 595 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 596 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 597 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x); | ||
| 598 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 599 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 600 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x); | ||
| 601 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 602 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 603 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x); | ||
| 604 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 605 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 606 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x); | ||
| 607 | #endif | ||
| 608 | |||
| 609 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 610 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 611 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x); | ||
| 612 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 613 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 614 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x); | ||
| 615 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 616 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 617 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x); | ||
| 618 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 619 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 620 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x); | ||
| 621 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 622 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 623 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x); | ||
| 624 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 625 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 626 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x); | ||
| 627 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 628 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 629 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x); | ||
| 630 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 631 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 632 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x); | ||
| 633 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 634 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 635 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x); | ||
| 636 | |||
| 637 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 638 | * Objective-C, and `simd::log` in C++. */ | ||
| 639 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x); | ||
| 640 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 641 | * Objective-C, and `simd::log` in C++. */ | ||
| 642 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x); | ||
| 643 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 644 | * Objective-C, and `simd::log` in C++. */ | ||
| 645 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x); | ||
| 646 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 647 | * Objective-C, and `simd::log` in C++. */ | ||
| 648 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x); | ||
| 649 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 650 | * Objective-C, and `simd::log` in C++. */ | ||
| 651 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x); | ||
| 652 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 653 | * Objective-C, and `simd::log` in C++. */ | ||
| 654 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x); | ||
| 655 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 656 | * Objective-C, and `simd::log` in C++. */ | ||
| 657 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x); | ||
| 658 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 659 | * Objective-C, and `simd::log` in C++. */ | ||
| 660 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x); | ||
| 661 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 662 | * Objective-C, and `simd::log` in C++. */ | ||
| 663 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x); | ||
| 664 | |||
| 665 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 666 | * Objective-C, and `simd::log2` in C++. */ | ||
| 667 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x); | ||
| 668 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 669 | * Objective-C, and `simd::log2` in C++. */ | ||
| 670 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x); | ||
| 671 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 672 | * Objective-C, and `simd::log2` in C++. */ | ||
| 673 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x); | ||
| 674 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 675 | * Objective-C, and `simd::log2` in C++. */ | ||
| 676 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x); | ||
| 677 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 678 | * Objective-C, and `simd::log2` in C++. */ | ||
| 679 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x); | ||
| 680 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 681 | * Objective-C, and `simd::log2` in C++. */ | ||
| 682 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x); | ||
| 683 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 684 | * Objective-C, and `simd::log2` in C++. */ | ||
| 685 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x); | ||
| 686 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 687 | * Objective-C, and `simd::log2` in C++. */ | ||
| 688 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x); | ||
| 689 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 690 | * Objective-C, and `simd::log2` in C++. */ | ||
| 691 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x); | ||
| 692 | |||
| 693 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 694 | * Objective-C, and `simd::log10` in C++. */ | ||
| 695 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x); | ||
| 696 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 697 | * Objective-C, and `simd::log10` in C++. */ | ||
| 698 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x); | ||
| 699 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 700 | * Objective-C, and `simd::log10` in C++. */ | ||
| 701 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x); | ||
| 702 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 703 | * Objective-C, and `simd::log10` in C++. */ | ||
| 704 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x); | ||
| 705 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 706 | * Objective-C, and `simd::log10` in C++. */ | ||
| 707 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x); | ||
| 708 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 709 | * Objective-C, and `simd::log10` in C++. */ | ||
| 710 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x); | ||
| 711 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 712 | * Objective-C, and `simd::log10` in C++. */ | ||
| 713 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x); | ||
| 714 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 715 | * Objective-C, and `simd::log10` in C++. */ | ||
| 716 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x); | ||
| 717 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 718 | * Objective-C, and `simd::log10` in C++. */ | ||
| 719 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x); | ||
| 720 | |||
| 721 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 722 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 723 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x); | ||
| 724 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 725 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 726 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x); | ||
| 727 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 728 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 729 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x); | ||
| 730 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 731 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 732 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x); | ||
| 733 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 734 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 735 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x); | ||
| 736 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 737 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 738 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x); | ||
| 739 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 740 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 741 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x); | ||
| 742 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 743 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 744 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x); | ||
| 745 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 746 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 747 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x); | ||
| 748 | |||
| 749 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 750 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 751 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x); | ||
| 752 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 753 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 754 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x); | ||
| 755 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 756 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 757 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x); | ||
| 758 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 759 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 760 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x); | ||
| 761 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 762 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 763 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x); | ||
| 764 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 765 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 766 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x); | ||
| 767 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 768 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 769 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x); | ||
| 770 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 771 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 772 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x); | ||
| 773 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 774 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 775 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x); | ||
| 776 | |||
| 777 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 778 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 779 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x); | ||
| 780 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 781 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 782 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x); | ||
| 783 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 784 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 785 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x); | ||
| 786 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 787 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 788 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x); | ||
| 789 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 790 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 791 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x); | ||
| 792 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 793 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 794 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x); | ||
| 795 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 796 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 797 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x); | ||
| 798 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 799 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 800 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x); | ||
| 801 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 802 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 803 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x); | ||
| 804 | |||
| 805 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 806 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 807 | static inline SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x); | ||
| 808 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 809 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 810 | static inline SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x); | ||
| 811 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 812 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 813 | static inline SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x); | ||
| 814 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 815 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 816 | static inline SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x); | ||
| 817 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 818 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 819 | static inline SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x); | ||
| 820 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 821 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 822 | static inline SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x); | ||
| 823 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 824 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 825 | static inline SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x); | ||
| 826 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 827 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 828 | static inline SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x); | ||
| 829 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 830 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 831 | static inline SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x); | ||
| 832 | |||
| 833 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 834 | * Objective-C, and `simd::erf` in C++. */ | ||
| 835 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x); | ||
| 836 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 837 | * Objective-C, and `simd::erf` in C++. */ | ||
| 838 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x); | ||
| 839 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 840 | * Objective-C, and `simd::erf` in C++. */ | ||
| 841 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x); | ||
| 842 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 843 | * Objective-C, and `simd::erf` in C++. */ | ||
| 844 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x); | ||
| 845 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 846 | * Objective-C, and `simd::erf` in C++. */ | ||
| 847 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x); | ||
| 848 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 849 | * Objective-C, and `simd::erf` in C++. */ | ||
| 850 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x); | ||
| 851 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 852 | * Objective-C, and `simd::erf` in C++. */ | ||
| 853 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x); | ||
| 854 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 855 | * Objective-C, and `simd::erf` in C++. */ | ||
| 856 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x); | ||
| 857 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 858 | * Objective-C, and `simd::erf` in C++. */ | ||
| 859 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x); | ||
| 860 | |||
| 861 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 862 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 863 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x); | ||
| 864 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 865 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 866 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x); | ||
| 867 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 868 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 869 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x); | ||
| 870 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 871 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 872 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x); | ||
| 873 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 874 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 875 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x); | ||
| 876 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 877 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 878 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x); | ||
| 879 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 880 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 881 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x); | ||
| 882 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 883 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 884 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x); | ||
| 885 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 886 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 887 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x); | ||
| 888 | |||
| 889 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 890 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 891 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x); | ||
| 892 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 893 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 894 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x); | ||
| 895 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 896 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 897 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x); | ||
| 898 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 899 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 900 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x); | ||
| 901 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 902 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 903 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x); | ||
| 904 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 905 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 906 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x); | ||
| 907 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 908 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 909 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x); | ||
| 910 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 911 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 912 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x); | ||
| 913 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 914 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 915 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x); | ||
| 916 | |||
| 917 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 918 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 919 | static inline SIMD_CFUNC simd_float2 __tg_lgamma(simd_float2 x); | ||
| 920 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 921 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 922 | static inline SIMD_CFUNC simd_float3 __tg_lgamma(simd_float3 x); | ||
| 923 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 924 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 925 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x); | ||
| 926 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 927 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 928 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x); | ||
| 929 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 930 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 931 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x); | ||
| 932 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 933 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 934 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x); | ||
| 935 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 936 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 937 | static inline SIMD_CFUNC simd_double3 __tg_lgamma(simd_double3 x); | ||
| 938 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 939 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 940 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x); | ||
| 941 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 942 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 943 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x); | ||
| 944 | |||
| 945 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 946 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 947 | static inline SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x); | ||
| 948 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 949 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 950 | static inline SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x); | ||
| 951 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 952 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 953 | static inline SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x); | ||
| 954 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 955 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 956 | static inline SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x); | ||
| 957 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 958 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 959 | static inline SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x); | ||
| 960 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 961 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 962 | static inline SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x); | ||
| 963 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 964 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 965 | static inline SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x); | ||
| 966 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 967 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 968 | static inline SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x); | ||
| 969 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 970 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 971 | static inline SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x); | ||
| 972 | |||
| 973 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 974 | * Objective-C, and `simd::floor` in C++. */ | ||
| 975 | static inline SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x); | ||
| 976 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 977 | * Objective-C, and `simd::floor` in C++. */ | ||
| 978 | static inline SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x); | ||
| 979 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 980 | * Objective-C, and `simd::floor` in C++. */ | ||
| 981 | static inline SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x); | ||
| 982 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 983 | * Objective-C, and `simd::floor` in C++. */ | ||
| 984 | static inline SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x); | ||
| 985 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 986 | * Objective-C, and `simd::floor` in C++. */ | ||
| 987 | static inline SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x); | ||
| 988 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 989 | * Objective-C, and `simd::floor` in C++. */ | ||
| 990 | static inline SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x); | ||
| 991 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 992 | * Objective-C, and `simd::floor` in C++. */ | ||
| 993 | static inline SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x); | ||
| 994 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 995 | * Objective-C, and `simd::floor` in C++. */ | ||
| 996 | static inline SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x); | ||
| 997 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 998 | * Objective-C, and `simd::floor` in C++. */ | ||
| 999 | static inline SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x); | ||
| 1000 | |||
| 1001 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1002 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1003 | static inline SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x); | ||
| 1004 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1005 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1006 | static inline SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x); | ||
| 1007 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1008 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1009 | static inline SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x); | ||
| 1010 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1011 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1012 | static inline SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x); | ||
| 1013 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1014 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1015 | static inline SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x); | ||
| 1016 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1017 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1018 | static inline SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x); | ||
| 1019 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1020 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1021 | static inline SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x); | ||
| 1022 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1023 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1024 | static inline SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x); | ||
| 1025 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1026 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1027 | static inline SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x); | ||
| 1028 | |||
| 1029 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1030 | * Objective-C, and `simd::round` in C++. */ | ||
| 1031 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x); | ||
| 1032 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1033 | * Objective-C, and `simd::round` in C++. */ | ||
| 1034 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x); | ||
| 1035 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1036 | * Objective-C, and `simd::round` in C++. */ | ||
| 1037 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x); | ||
| 1038 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1039 | * Objective-C, and `simd::round` in C++. */ | ||
| 1040 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x); | ||
| 1041 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1042 | * Objective-C, and `simd::round` in C++. */ | ||
| 1043 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x); | ||
| 1044 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1045 | * Objective-C, and `simd::round` in C++. */ | ||
| 1046 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x); | ||
| 1047 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1048 | * Objective-C, and `simd::round` in C++. */ | ||
| 1049 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x); | ||
| 1050 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1051 | * Objective-C, and `simd::round` in C++. */ | ||
| 1052 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x); | ||
| 1053 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1054 | * Objective-C, and `simd::round` in C++. */ | ||
| 1055 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x); | ||
| 1056 | |||
| 1057 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1058 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1059 | static inline SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x); | ||
| 1060 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1061 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1062 | static inline SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x); | ||
| 1063 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1064 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1065 | static inline SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x); | ||
| 1066 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1067 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1068 | static inline SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x); | ||
| 1069 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1070 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1071 | static inline SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x); | ||
| 1072 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1073 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1074 | static inline SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x); | ||
| 1075 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1076 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1077 | static inline SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x); | ||
| 1078 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1079 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1080 | static inline SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x); | ||
| 1081 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1082 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1083 | static inline SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x); | ||
| 1084 | |||
| 1085 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1086 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1087 | static inline SIMD_CFUNC simd_int2 __tg_isfinite(simd_float2 x); | ||
| 1088 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1089 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1090 | static inline SIMD_CFUNC simd_int3 __tg_isfinite(simd_float3 x); | ||
| 1091 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1092 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1093 | static inline SIMD_CFUNC simd_int4 __tg_isfinite(simd_float4 x); | ||
| 1094 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1095 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1096 | static inline SIMD_CFUNC simd_int8 __tg_isfinite(simd_float8 x); | ||
| 1097 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1098 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1099 | static inline SIMD_CFUNC simd_int16 __tg_isfinite(simd_float16 x); | ||
| 1100 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1101 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1102 | static inline SIMD_CFUNC simd_long2 __tg_isfinite(simd_double2 x); | ||
| 1103 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1104 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1105 | static inline SIMD_CFUNC simd_long3 __tg_isfinite(simd_double3 x); | ||
| 1106 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1107 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1108 | static inline SIMD_CFUNC simd_long4 __tg_isfinite(simd_double4 x); | ||
| 1109 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1110 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1111 | static inline SIMD_CFUNC simd_long8 __tg_isfinite(simd_double8 x); | ||
| 1112 | |||
| 1113 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1114 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1115 | static inline SIMD_CFUNC simd_int2 __tg_isinf(simd_float2 x); | ||
| 1116 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1117 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1118 | static inline SIMD_CFUNC simd_int3 __tg_isinf(simd_float3 x); | ||
| 1119 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1120 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1121 | static inline SIMD_CFUNC simd_int4 __tg_isinf(simd_float4 x); | ||
| 1122 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1123 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1124 | static inline SIMD_CFUNC simd_int8 __tg_isinf(simd_float8 x); | ||
| 1125 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1126 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1127 | static inline SIMD_CFUNC simd_int16 __tg_isinf(simd_float16 x); | ||
| 1128 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1129 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1130 | static inline SIMD_CFUNC simd_long2 __tg_isinf(simd_double2 x); | ||
| 1131 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1132 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1133 | static inline SIMD_CFUNC simd_long3 __tg_isinf(simd_double3 x); | ||
| 1134 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1135 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1136 | static inline SIMD_CFUNC simd_long4 __tg_isinf(simd_double4 x); | ||
| 1137 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1138 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1139 | static inline SIMD_CFUNC simd_long8 __tg_isinf(simd_double8 x); | ||
| 1140 | |||
| 1141 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1142 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1143 | static inline SIMD_CFUNC simd_int2 __tg_isnan(simd_float2 x); | ||
| 1144 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1145 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1146 | static inline SIMD_CFUNC simd_int3 __tg_isnan(simd_float3 x); | ||
| 1147 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1148 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1149 | static inline SIMD_CFUNC simd_int4 __tg_isnan(simd_float4 x); | ||
| 1150 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1151 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1152 | static inline SIMD_CFUNC simd_int8 __tg_isnan(simd_float8 x); | ||
| 1153 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1154 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1155 | static inline SIMD_CFUNC simd_int16 __tg_isnan(simd_float16 x); | ||
| 1156 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1157 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1158 | static inline SIMD_CFUNC simd_long2 __tg_isnan(simd_double2 x); | ||
| 1159 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1160 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1161 | static inline SIMD_CFUNC simd_long3 __tg_isnan(simd_double3 x); | ||
| 1162 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1163 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1164 | static inline SIMD_CFUNC simd_long4 __tg_isnan(simd_double4 x); | ||
| 1165 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1166 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1167 | static inline SIMD_CFUNC simd_long8 __tg_isnan(simd_double8 x); | ||
| 1168 | |||
| 1169 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1170 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1171 | static inline SIMD_CFUNC simd_int2 __tg_isnormal(simd_float2 x); | ||
| 1172 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1173 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1174 | static inline SIMD_CFUNC simd_int3 __tg_isnormal(simd_float3 x); | ||
| 1175 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1176 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1177 | static inline SIMD_CFUNC simd_int4 __tg_isnormal(simd_float4 x); | ||
| 1178 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1179 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1180 | static inline SIMD_CFUNC simd_int8 __tg_isnormal(simd_float8 x); | ||
| 1181 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1182 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1183 | static inline SIMD_CFUNC simd_int16 __tg_isnormal(simd_float16 x); | ||
| 1184 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1185 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1186 | static inline SIMD_CFUNC simd_long2 __tg_isnormal(simd_double2 x); | ||
| 1187 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1188 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1189 | static inline SIMD_CFUNC simd_long3 __tg_isnormal(simd_double3 x); | ||
| 1190 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1191 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1192 | static inline SIMD_CFUNC simd_long4 __tg_isnormal(simd_double4 x); | ||
| 1193 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1194 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1195 | static inline SIMD_CFUNC simd_long8 __tg_isnormal(simd_double8 x); | ||
| 1196 | |||
| 1197 | |||
| 1198 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1199 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1200 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x); | ||
| 1201 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1202 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1203 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x); | ||
| 1204 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1205 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1206 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x); | ||
| 1207 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1208 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1209 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x); | ||
| 1210 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1211 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1212 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x); | ||
| 1213 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1214 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1215 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x); | ||
| 1216 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1217 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1218 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x); | ||
| 1219 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1220 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1221 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x); | ||
| 1222 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1223 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1224 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x); | ||
| 1225 | |||
| 1226 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1227 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1228 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y); | ||
| 1229 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1230 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1231 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y); | ||
| 1232 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1233 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1234 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y); | ||
| 1235 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1236 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1237 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y); | ||
| 1238 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1239 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1240 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y); | ||
| 1241 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1242 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1243 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y); | ||
| 1244 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1245 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1246 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y); | ||
| 1247 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1248 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1249 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y); | ||
| 1250 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1251 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1252 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y); | ||
| 1253 | |||
| 1254 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1255 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1256 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y); | ||
| 1257 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1258 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1259 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y); | ||
| 1260 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1261 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1262 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y); | ||
| 1263 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1264 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1265 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y); | ||
| 1266 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1267 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1268 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y); | ||
| 1269 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1270 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1271 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y); | ||
| 1272 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1273 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1274 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y); | ||
| 1275 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1276 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1277 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y); | ||
| 1278 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1279 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1280 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y); | ||
| 1281 | |||
| 1282 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1283 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1284 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y); | ||
| 1285 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1286 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1287 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y); | ||
| 1288 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1289 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1290 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y); | ||
| 1291 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1292 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1293 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y); | ||
| 1294 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1295 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1296 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y); | ||
| 1297 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1298 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1299 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y); | ||
| 1300 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1301 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1302 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y); | ||
| 1303 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1304 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1305 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y); | ||
| 1306 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1307 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1308 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y); | ||
| 1309 | |||
| 1310 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1311 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1312 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y); | ||
| 1313 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1314 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1315 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y); | ||
| 1316 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1317 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1318 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y); | ||
| 1319 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1320 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1321 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y); | ||
| 1322 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1323 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1324 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y); | ||
| 1325 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1326 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1327 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y); | ||
| 1328 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1329 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1330 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y); | ||
| 1331 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1332 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1333 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y); | ||
| 1334 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1335 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1336 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y); | ||
| 1337 | |||
| 1338 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1339 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1340 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y); | ||
| 1341 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1342 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1343 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y); | ||
| 1344 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1345 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1346 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y); | ||
| 1347 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1348 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1349 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y); | ||
| 1350 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1351 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1352 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y); | ||
| 1353 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1354 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1355 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y); | ||
| 1356 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1357 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1358 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y); | ||
| 1359 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1360 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1361 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y); | ||
| 1362 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1363 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1364 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y); | ||
| 1365 | |||
| 1366 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1367 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1368 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y); | ||
| 1369 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1370 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1371 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y); | ||
| 1372 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1373 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1374 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y); | ||
| 1375 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1376 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1377 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y); | ||
| 1378 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1379 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1380 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y); | ||
| 1381 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1382 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1383 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y); | ||
| 1384 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1385 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1386 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y); | ||
| 1387 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1388 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1389 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y); | ||
| 1390 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1391 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1392 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y); | ||
| 1393 | |||
| 1394 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1395 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1396 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y); | ||
| 1397 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1398 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1399 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y); | ||
| 1400 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1401 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1402 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y); | ||
| 1403 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1404 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1405 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y); | ||
| 1406 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1407 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1408 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y); | ||
| 1409 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1410 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1411 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y); | ||
| 1412 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1413 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1414 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y); | ||
| 1415 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1416 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1417 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y); | ||
| 1418 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1419 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1420 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y); | ||
| 1421 | |||
| 1422 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1423 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1424 | static inline SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y); | ||
| 1425 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1426 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1427 | static inline SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y); | ||
| 1428 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1429 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1430 | static inline SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y); | ||
| 1431 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1432 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1433 | static inline SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y); | ||
| 1434 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1435 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1436 | static inline SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y); | ||
| 1437 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1438 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1439 | static inline SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y); | ||
| 1440 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1441 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1442 | static inline SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y); | ||
| 1443 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1444 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1445 | static inline SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y); | ||
| 1446 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1447 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1448 | static inline SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y); | ||
| 1449 | |||
| 1450 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1451 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1452 | static inline SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y); | ||
| 1453 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1454 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1455 | static inline SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y); | ||
| 1456 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1457 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1458 | static inline SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y); | ||
| 1459 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1460 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1461 | static inline SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y); | ||
| 1462 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1463 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1464 | static inline SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y); | ||
| 1465 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1466 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1467 | static inline SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y); | ||
| 1468 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1469 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1470 | static inline SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y); | ||
| 1471 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1472 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1473 | static inline SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y); | ||
| 1474 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1475 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1476 | static inline SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y); | ||
| 1477 | |||
| 1478 | |||
| 1479 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1480 | * and `simd::fma` in C++. */ | ||
| 1481 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1482 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1483 | * and `simd::fma` in C++. */ | ||
| 1484 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1485 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1486 | * and `simd::fma` in C++. */ | ||
| 1487 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1488 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1489 | * and `simd::fma` in C++. */ | ||
| 1490 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1491 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1492 | * and `simd::fma` in C++. */ | ||
| 1493 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1494 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1495 | * and `simd::fma` in C++. */ | ||
| 1496 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1497 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1498 | * and `simd::fma` in C++. */ | ||
| 1499 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1500 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1501 | * and `simd::fma` in C++. */ | ||
| 1502 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1503 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1504 | * and `simd::fma` in C++. */ | ||
| 1505 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1506 | |||
| 1507 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1508 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1509 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z); | ||
| 1510 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1511 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1512 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1513 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1514 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1515 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1516 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1517 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1518 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1519 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1520 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1521 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1522 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1523 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1524 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1525 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1526 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1527 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z); | ||
| 1528 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1529 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1530 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1531 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1532 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1533 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1534 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1535 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1536 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1537 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1538 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1539 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1540 | |||
| 1541 | #ifdef __cplusplus | ||
| 1542 | } /* extern "C" */ | ||
| 1543 | |||
| 1544 | #include <cmath> | ||
| 1545 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1546 | static SIMD_CPPFUNC float __tg_acos(float x) { return ::acos(x); } | ||
| 1547 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1548 | static SIMD_CPPFUNC double __tg_acos(double x) { return ::acos(x); } | ||
| 1549 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1550 | static SIMD_CPPFUNC float __tg_asin(float x) { return ::asin(x); } | ||
| 1551 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1552 | static SIMD_CPPFUNC double __tg_asin(double x) { return ::asin(x); } | ||
| 1553 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1554 | static SIMD_CPPFUNC float __tg_atan(float x) { return ::atan(x); } | ||
| 1555 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1556 | static SIMD_CPPFUNC double __tg_atan(double x) { return ::atan(x); } | ||
| 1557 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1558 | static SIMD_CPPFUNC float __tg_cos(float x) { return ::cos(x); } | ||
| 1559 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1560 | static SIMD_CPPFUNC double __tg_cos(double x) { return ::cos(x); } | ||
| 1561 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1562 | static SIMD_CPPFUNC float __tg_sin(float x) { return ::sin(x); } | ||
| 1563 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1564 | static SIMD_CPPFUNC double __tg_sin(double x) { return ::sin(x); } | ||
| 1565 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1566 | static SIMD_CPPFUNC float __tg_tan(float x) { return ::tan(x); } | ||
| 1567 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1568 | static SIMD_CPPFUNC double __tg_tan(double x) { return ::tan(x); } | ||
| 1569 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1570 | static SIMD_CPPFUNC float __tg_cospi(float x) { return ::__cospi(x); } | ||
| 1571 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1572 | static SIMD_CPPFUNC double __tg_cospi(double x) { return ::__cospi(x); } | ||
| 1573 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1574 | static SIMD_CPPFUNC float __tg_sinpi(float x) { return ::__sinpi(x); } | ||
| 1575 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1576 | static SIMD_CPPFUNC double __tg_sinpi(double x) { return ::__sinpi(x); } | ||
| 1577 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1578 | static SIMD_CPPFUNC float __tg_tanpi(float x) { return ::__tanpi(x); } | ||
| 1579 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1580 | static SIMD_CPPFUNC double __tg_tanpi(double x) { return ::__tanpi(x); } | ||
| 1581 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1582 | static SIMD_CPPFUNC float __tg_acosh(float x) { return ::acosh(x); } | ||
| 1583 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1584 | static SIMD_CPPFUNC double __tg_acosh(double x) { return ::acosh(x); } | ||
| 1585 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1586 | static SIMD_CPPFUNC float __tg_asinh(float x) { return ::asinh(x); } | ||
| 1587 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1588 | static SIMD_CPPFUNC double __tg_asinh(double x) { return ::asinh(x); } | ||
| 1589 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1590 | static SIMD_CPPFUNC float __tg_atanh(float x) { return ::atanh(x); } | ||
| 1591 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1592 | static SIMD_CPPFUNC double __tg_atanh(double x) { return ::atanh(x); } | ||
| 1593 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1594 | static SIMD_CPPFUNC float __tg_cosh(float x) { return ::cosh(x); } | ||
| 1595 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1596 | static SIMD_CPPFUNC double __tg_cosh(double x) { return ::cosh(x); } | ||
| 1597 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1598 | static SIMD_CPPFUNC float __tg_sinh(float x) { return ::sinh(x); } | ||
| 1599 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1600 | static SIMD_CPPFUNC double __tg_sinh(double x) { return ::sinh(x); } | ||
| 1601 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1602 | static SIMD_CPPFUNC float __tg_tanh(float x) { return ::tanh(x); } | ||
| 1603 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1604 | static SIMD_CPPFUNC double __tg_tanh(double x) { return ::tanh(x); } | ||
| 1605 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1606 | static SIMD_CPPFUNC float __tg_exp(float x) { return ::exp(x); } | ||
| 1607 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1608 | static SIMD_CPPFUNC double __tg_exp(double x) { return ::exp(x); } | ||
| 1609 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1610 | static SIMD_CPPFUNC float __tg_exp2(float x) { return ::exp2(x); } | ||
| 1611 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1612 | static SIMD_CPPFUNC double __tg_exp2(double x) { return ::exp2(x); } | ||
| 1613 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1614 | static SIMD_CPPFUNC float __tg_exp10(float x) { return ::__exp10(x); } | ||
| 1615 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1616 | static SIMD_CPPFUNC double __tg_exp10(double x) { return ::__exp10(x); } | ||
| 1617 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1618 | static SIMD_CPPFUNC float __tg_expm1(float x) { return ::expm1(x); } | ||
| 1619 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1620 | static SIMD_CPPFUNC double __tg_expm1(double x) { return ::expm1(x); } | ||
| 1621 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1622 | static SIMD_CPPFUNC float __tg_log(float x) { return ::log(x); } | ||
| 1623 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1624 | static SIMD_CPPFUNC double __tg_log(double x) { return ::log(x); } | ||
| 1625 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1626 | static SIMD_CPPFUNC float __tg_log2(float x) { return ::log2(x); } | ||
| 1627 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1628 | static SIMD_CPPFUNC double __tg_log2(double x) { return ::log2(x); } | ||
| 1629 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1630 | static SIMD_CPPFUNC float __tg_log10(float x) { return ::log10(x); } | ||
| 1631 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1632 | static SIMD_CPPFUNC double __tg_log10(double x) { return ::log10(x); } | ||
| 1633 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1634 | static SIMD_CPPFUNC float __tg_log1p(float x) { return ::log1p(x); } | ||
| 1635 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1636 | static SIMD_CPPFUNC double __tg_log1p(double x) { return ::log1p(x); } | ||
| 1637 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1638 | static SIMD_CPPFUNC float __tg_fabs(float x) { return ::fabs(x); } | ||
| 1639 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1640 | static SIMD_CPPFUNC double __tg_fabs(double x) { return ::fabs(x); } | ||
| 1641 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1642 | static SIMD_CPPFUNC float __tg_cbrt(float x) { return ::cbrt(x); } | ||
| 1643 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1644 | static SIMD_CPPFUNC double __tg_cbrt(double x) { return ::cbrt(x); } | ||
| 1645 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1646 | static SIMD_CPPFUNC float __tg_sqrt(float x) { return ::sqrt(x); } | ||
| 1647 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1648 | static SIMD_CPPFUNC double __tg_sqrt(double x) { return ::sqrt(x); } | ||
| 1649 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1650 | static SIMD_CPPFUNC float __tg_erf(float x) { return ::erf(x); } | ||
| 1651 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1652 | static SIMD_CPPFUNC double __tg_erf(double x) { return ::erf(x); } | ||
| 1653 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1654 | static SIMD_CPPFUNC float __tg_erfc(float x) { return ::erfc(x); } | ||
| 1655 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1656 | static SIMD_CPPFUNC double __tg_erfc(double x) { return ::erfc(x); } | ||
| 1657 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1658 | static SIMD_CPPFUNC float __tg_tgamma(float x) { return ::tgamma(x); } | ||
| 1659 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1660 | static SIMD_CPPFUNC double __tg_tgamma(double x) { return ::tgamma(x); } | ||
| 1661 | /*! @abstract Do not call this function directly; use simd::lgamma instead. */ | ||
| 1662 | static SIMD_CPPFUNC float __tg_lgamma(float x) { return ::lgamma(x); } | ||
| 1663 | /*! @abstract Do not call this function directly; use simd::lgamma instead. */ | ||
| 1664 | static SIMD_CPPFUNC double __tg_lgamma(double x) { return ::lgamma(x); } | ||
| 1665 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1666 | static SIMD_CPPFUNC float __tg_ceil(float x) { return ::ceil(x); } | ||
| 1667 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1668 | static SIMD_CPPFUNC double __tg_ceil(double x) { return ::ceil(x); } | ||
| 1669 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1670 | static SIMD_CPPFUNC float __tg_floor(float x) { return ::floor(x); } | ||
| 1671 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1672 | static SIMD_CPPFUNC double __tg_floor(double x) { return ::floor(x); } | ||
| 1673 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1674 | static SIMD_CPPFUNC float __tg_rint(float x) { return ::rint(x); } | ||
| 1675 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1676 | static SIMD_CPPFUNC double __tg_rint(double x) { return ::rint(x); } | ||
| 1677 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1678 | static SIMD_CPPFUNC float __tg_round(float x) { return ::round(x); } | ||
| 1679 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1680 | static SIMD_CPPFUNC double __tg_round(double x) { return ::round(x); } | ||
| 1681 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1682 | static SIMD_CPPFUNC float __tg_trunc(float x) { return ::trunc(x); } | ||
| 1683 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1684 | static SIMD_CPPFUNC double __tg_trunc(double x) { return ::trunc(x); } | ||
| 1685 | /*! @abstract Do not call this function directly; use simd::isfinite | ||
| 1686 | * instead. */ | ||
| 1687 | static SIMD_CPPFUNC float __tg_isfinite(float x) { return ::isfinite(x); } | ||
| 1688 | /*! @abstract Do not call this function directly; use simd::isfinite | ||
| 1689 | * instead. */ | ||
| 1690 | static SIMD_CPPFUNC double __tg_isfinite(double x) { return ::isfinite(x); } | ||
| 1691 | /*! @abstract Do not call this function directly; use simd::isinf instead. */ | ||
| 1692 | static SIMD_CPPFUNC float __tg_isinf(float x) { return ::isinf(x); } | ||
| 1693 | /*! @abstract Do not call this function directly; use simd::isinf instead. */ | ||
| 1694 | static SIMD_CPPFUNC double __tg_isinf(double x) { return ::isinf(x); } | ||
| 1695 | /*! @abstract Do not call this function directly; use simd::isnan instead. */ | ||
| 1696 | static SIMD_CPPFUNC float __tg_isnan(float x) { return ::isnan(x); } | ||
| 1697 | /*! @abstract Do not call this function directly; use simd::isnan instead. */ | ||
| 1698 | static SIMD_CPPFUNC double __tg_isnan(double x) { return ::isnan(x); } | ||
| 1699 | /*! @abstract Do not call this function directly; use simd::isnormal | ||
| 1700 | * instead. */ | ||
| 1701 | static SIMD_CPPFUNC float __tg_isnormal(float x) { return ::isnormal(x); } | ||
| 1702 | /*! @abstract Do not call this function directly; use simd::isnormal | ||
| 1703 | * instead. */ | ||
| 1704 | static SIMD_CPPFUNC double __tg_isnormal(double x) { return ::isnormal(x); } | ||
| 1705 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1706 | static SIMD_CPPFUNC float __tg_atan2(float x, float y) { return ::atan2(x, y); } | ||
| 1707 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1708 | static SIMD_CPPFUNC double __tg_atan2(double x, double y) { return ::atan2(x, y); } | ||
| 1709 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1710 | static SIMD_CPPFUNC float __tg_hypot(float x, float y) { return ::hypot(x, y); } | ||
| 1711 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1712 | static SIMD_CPPFUNC double __tg_hypot(double x, double y) { return ::hypot(x, y); } | ||
| 1713 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1714 | static SIMD_CPPFUNC float __tg_pow(float x, float y) { return ::pow(x, y); } | ||
| 1715 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1716 | static SIMD_CPPFUNC double __tg_pow(double x, double y) { return ::pow(x, y); } | ||
| 1717 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1718 | static SIMD_CPPFUNC float __tg_fmod(float x, float y) { return ::fmod(x, y); } | ||
| 1719 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1720 | static SIMD_CPPFUNC double __tg_fmod(double x, double y) { return ::fmod(x, y); } | ||
| 1721 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1722 | * instead. */ | ||
| 1723 | static SIMD_CPPFUNC float __tg_remainder(float x, float y) { return ::remainder(x, y); } | ||
| 1724 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1725 | * instead. */ | ||
| 1726 | static SIMD_CPPFUNC double __tg_remainder(double x, double y) { return ::remainder(x, y); } | ||
| 1727 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1728 | * instead. */ | ||
| 1729 | static SIMD_CPPFUNC float __tg_copysign(float x, float y) { return ::copysign(x, y); } | ||
| 1730 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1731 | * instead. */ | ||
| 1732 | static SIMD_CPPFUNC double __tg_copysign(double x, double y) { return ::copysign(x, y); } | ||
| 1733 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1734 | * instead. */ | ||
| 1735 | static SIMD_CPPFUNC float __tg_nextafter(float x, float y) { return ::nextafter(x, y); } | ||
| 1736 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1737 | * instead. */ | ||
| 1738 | static SIMD_CPPFUNC double __tg_nextafter(double x, double y) { return ::nextafter(x, y); } | ||
| 1739 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1740 | static SIMD_CPPFUNC float __tg_fdim(float x, float y) { return ::fdim(x, y); } | ||
| 1741 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1742 | static SIMD_CPPFUNC double __tg_fdim(double x, double y) { return ::fdim(x, y); } | ||
| 1743 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1744 | static SIMD_CPPFUNC float __tg_fmax(float x, float y) { return ::fmax(x, y); } | ||
| 1745 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1746 | static SIMD_CPPFUNC double __tg_fmax(double x, double y) { return ::fmax(x, y); } | ||
| 1747 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1748 | static SIMD_CPPFUNC float __tg_fmin(float x, float y) { return ::fmin(x, y); } | ||
| 1749 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1750 | static SIMD_CPPFUNC double __tg_fmin(double x, double y) { return ::fmin(x, y); } | ||
| 1751 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1752 | static SIMD_CPPFUNC float __tg_fma(float x, float y, float z) { return ::fma(x, y, z); } | ||
| 1753 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1754 | static SIMD_CPPFUNC double __tg_fma(double x, double y, double z) { return ::fma(x, y, z); } | ||
| 1755 | |||
| 1756 | namespace simd { | ||
| 1757 | /*! @abstract Generalizes the <cmath> function acos to operate on vectors of | ||
| 1758 | * floats and doubles. */ | ||
| 1759 | template <typename fptypeN> | ||
| 1760 | static SIMD_CPPFUNC fptypeN acos(fptypeN x) { return ::__tg_acos(x); } | ||
| 1761 | |||
| 1762 | /*! @abstract Generalizes the <cmath> function asin to operate on vectors of | ||
| 1763 | * floats and doubles. */ | ||
| 1764 | template <typename fptypeN> | ||
| 1765 | static SIMD_CPPFUNC fptypeN asin(fptypeN x) { return ::__tg_asin(x); } | ||
| 1766 | |||
| 1767 | /*! @abstract Generalizes the <cmath> function atan to operate on vectors of | ||
| 1768 | * floats and doubles. */ | ||
| 1769 | template <typename fptypeN> | ||
| 1770 | static SIMD_CPPFUNC fptypeN atan(fptypeN x) { return ::__tg_atan(x); } | ||
| 1771 | |||
| 1772 | /*! @abstract Generalizes the <cmath> function cos to operate on vectors of | ||
| 1773 | * floats and doubles. */ | ||
| 1774 | template <typename fptypeN> | ||
| 1775 | static SIMD_CPPFUNC fptypeN cos(fptypeN x) { return ::__tg_cos(x); } | ||
| 1776 | |||
| 1777 | /*! @abstract Generalizes the <cmath> function sin to operate on vectors of | ||
| 1778 | * floats and doubles. */ | ||
| 1779 | template <typename fptypeN> | ||
| 1780 | static SIMD_CPPFUNC fptypeN sin(fptypeN x) { return ::__tg_sin(x); } | ||
| 1781 | |||
| 1782 | /*! @abstract Generalizes the <cmath> function tan to operate on vectors of | ||
| 1783 | * floats and doubles. */ | ||
| 1784 | template <typename fptypeN> | ||
| 1785 | static SIMD_CPPFUNC fptypeN tan(fptypeN x) { return ::__tg_tan(x); } | ||
| 1786 | |||
| 1787 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1788 | /*! @abstract Generalizes the <cmath> function cospi to operate on vectors | ||
| 1789 | * of floats and doubles. */ | ||
| 1790 | template <typename fptypeN> | ||
| 1791 | static SIMD_CPPFUNC fptypeN cospi(fptypeN x) { return ::__tg_cospi(x); } | ||
| 1792 | #endif | ||
| 1793 | |||
| 1794 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1795 | /*! @abstract Generalizes the <cmath> function sinpi to operate on vectors | ||
| 1796 | * of floats and doubles. */ | ||
| 1797 | template <typename fptypeN> | ||
| 1798 | static SIMD_CPPFUNC fptypeN sinpi(fptypeN x) { return ::__tg_sinpi(x); } | ||
| 1799 | #endif | ||
| 1800 | |||
| 1801 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1802 | /*! @abstract Generalizes the <cmath> function tanpi to operate on vectors | ||
| 1803 | * of floats and doubles. */ | ||
| 1804 | template <typename fptypeN> | ||
| 1805 | static SIMD_CPPFUNC fptypeN tanpi(fptypeN x) { return ::__tg_tanpi(x); } | ||
| 1806 | #endif | ||
| 1807 | |||
| 1808 | /*! @abstract Generalizes the <cmath> function acosh to operate on vectors | ||
| 1809 | * of floats and doubles. */ | ||
| 1810 | template <typename fptypeN> | ||
| 1811 | static SIMD_CPPFUNC fptypeN acosh(fptypeN x) { return ::__tg_acosh(x); } | ||
| 1812 | |||
| 1813 | /*! @abstract Generalizes the <cmath> function asinh to operate on vectors | ||
| 1814 | * of floats and doubles. */ | ||
| 1815 | template <typename fptypeN> | ||
| 1816 | static SIMD_CPPFUNC fptypeN asinh(fptypeN x) { return ::__tg_asinh(x); } | ||
| 1817 | |||
| 1818 | /*! @abstract Generalizes the <cmath> function atanh to operate on vectors | ||
| 1819 | * of floats and doubles. */ | ||
| 1820 | template <typename fptypeN> | ||
| 1821 | static SIMD_CPPFUNC fptypeN atanh(fptypeN x) { return ::__tg_atanh(x); } | ||
| 1822 | |||
| 1823 | /*! @abstract Generalizes the <cmath> function cosh to operate on vectors of | ||
| 1824 | * floats and doubles. */ | ||
| 1825 | template <typename fptypeN> | ||
| 1826 | static SIMD_CPPFUNC fptypeN cosh(fptypeN x) { return ::__tg_cosh(x); } | ||
| 1827 | |||
| 1828 | /*! @abstract Generalizes the <cmath> function sinh to operate on vectors of | ||
| 1829 | * floats and doubles. */ | ||
| 1830 | template <typename fptypeN> | ||
| 1831 | static SIMD_CPPFUNC fptypeN sinh(fptypeN x) { return ::__tg_sinh(x); } | ||
| 1832 | |||
| 1833 | /*! @abstract Generalizes the <cmath> function tanh to operate on vectors of | ||
| 1834 | * floats and doubles. */ | ||
| 1835 | template <typename fptypeN> | ||
| 1836 | static SIMD_CPPFUNC fptypeN tanh(fptypeN x) { return ::__tg_tanh(x); } | ||
| 1837 | |||
| 1838 | /*! @abstract Generalizes the <cmath> function exp to operate on vectors of | ||
| 1839 | * floats and doubles. */ | ||
| 1840 | template <typename fptypeN> | ||
| 1841 | static SIMD_CPPFUNC fptypeN exp(fptypeN x) { return ::__tg_exp(x); } | ||
| 1842 | |||
| 1843 | /*! @abstract Generalizes the <cmath> function exp2 to operate on vectors of | ||
| 1844 | * floats and doubles. */ | ||
| 1845 | template <typename fptypeN> | ||
| 1846 | static SIMD_CPPFUNC fptypeN exp2(fptypeN x) { return ::__tg_exp2(x); } | ||
| 1847 | |||
| 1848 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1849 | /*! @abstract Generalizes the <cmath> function exp10 to operate on vectors | ||
| 1850 | * of floats and doubles. */ | ||
| 1851 | template <typename fptypeN> | ||
| 1852 | static SIMD_CPPFUNC fptypeN exp10(fptypeN x) { return ::__tg_exp10(x); } | ||
| 1853 | #endif | ||
| 1854 | |||
| 1855 | /*! @abstract Generalizes the <cmath> function expm1 to operate on vectors | ||
| 1856 | * of floats and doubles. */ | ||
| 1857 | template <typename fptypeN> | ||
| 1858 | static SIMD_CPPFUNC fptypeN expm1(fptypeN x) { return ::__tg_expm1(x); } | ||
| 1859 | |||
| 1860 | /*! @abstract Generalizes the <cmath> function log to operate on vectors of | ||
| 1861 | * floats and doubles. */ | ||
| 1862 | template <typename fptypeN> | ||
| 1863 | static SIMD_CPPFUNC fptypeN log(fptypeN x) { return ::__tg_log(x); } | ||
| 1864 | |||
| 1865 | /*! @abstract Generalizes the <cmath> function log2 to operate on vectors of | ||
| 1866 | * floats and doubles. */ | ||
| 1867 | template <typename fptypeN> | ||
| 1868 | static SIMD_CPPFUNC fptypeN log2(fptypeN x) { return ::__tg_log2(x); } | ||
| 1869 | |||
| 1870 | /*! @abstract Generalizes the <cmath> function log10 to operate on vectors | ||
| 1871 | * of floats and doubles. */ | ||
| 1872 | template <typename fptypeN> | ||
| 1873 | static SIMD_CPPFUNC fptypeN log10(fptypeN x) { return ::__tg_log10(x); } | ||
| 1874 | |||
| 1875 | /*! @abstract Generalizes the <cmath> function log1p to operate on vectors | ||
| 1876 | * of floats and doubles. */ | ||
| 1877 | template <typename fptypeN> | ||
| 1878 | static SIMD_CPPFUNC fptypeN log1p(fptypeN x) { return ::__tg_log1p(x); } | ||
| 1879 | |||
| 1880 | /*! @abstract Generalizes the <cmath> function fabs to operate on vectors of | ||
| 1881 | * floats and doubles. */ | ||
| 1882 | template <typename fptypeN> | ||
| 1883 | static SIMD_CPPFUNC fptypeN fabs(fptypeN x) { return ::__tg_fabs(x); } | ||
| 1884 | |||
| 1885 | /*! @abstract Generalizes the <cmath> function cbrt to operate on vectors of | ||
| 1886 | * floats and doubles. */ | ||
| 1887 | template <typename fptypeN> | ||
| 1888 | static SIMD_CPPFUNC fptypeN cbrt(fptypeN x) { return ::__tg_cbrt(x); } | ||
| 1889 | |||
| 1890 | /*! @abstract Generalizes the <cmath> function sqrt to operate on vectors of | ||
| 1891 | * floats and doubles. */ | ||
| 1892 | template <typename fptypeN> | ||
| 1893 | static SIMD_CPPFUNC fptypeN sqrt(fptypeN x) { return ::__tg_sqrt(x); } | ||
| 1894 | |||
| 1895 | /*! @abstract Generalizes the <cmath> function erf to operate on vectors of | ||
| 1896 | * floats and doubles. */ | ||
| 1897 | template <typename fptypeN> | ||
| 1898 | static SIMD_CPPFUNC fptypeN erf(fptypeN x) { return ::__tg_erf(x); } | ||
| 1899 | |||
| 1900 | /*! @abstract Generalizes the <cmath> function erfc to operate on vectors of | ||
| 1901 | * floats and doubles. */ | ||
| 1902 | template <typename fptypeN> | ||
| 1903 | static SIMD_CPPFUNC fptypeN erfc(fptypeN x) { return ::__tg_erfc(x); } | ||
| 1904 | |||
| 1905 | /*! @abstract Generalizes the <cmath> function tgamma to operate on vectors | ||
| 1906 | * of floats and doubles. */ | ||
| 1907 | template <typename fptypeN> | ||
| 1908 | static SIMD_CPPFUNC fptypeN tgamma(fptypeN x) { return ::__tg_tgamma(x); } | ||
| 1909 | |||
| 1910 | /*! @abstract Generalizes the <cmath> function lgamma to operate on vectors | ||
| 1911 | * of floats and doubles. */ | ||
| 1912 | template <typename fptypeN> | ||
| 1913 | static SIMD_CPPFUNC fptypeN lgamma(fptypeN x) { return ::__tg_lgamma(x); } | ||
| 1914 | |||
| 1915 | /*! @abstract Generalizes the <cmath> function ceil to operate on vectors of | ||
| 1916 | * floats and doubles. */ | ||
| 1917 | template <typename fptypeN> | ||
| 1918 | static SIMD_CPPFUNC fptypeN ceil(fptypeN x) { return ::__tg_ceil(x); } | ||
| 1919 | |||
| 1920 | /*! @abstract Generalizes the <cmath> function floor to operate on vectors | ||
| 1921 | * of floats and doubles. */ | ||
| 1922 | template <typename fptypeN> | ||
| 1923 | static SIMD_CPPFUNC fptypeN floor(fptypeN x) { return ::__tg_floor(x); } | ||
| 1924 | |||
| 1925 | /*! @abstract Generalizes the <cmath> function rint to operate on vectors of | ||
| 1926 | * floats and doubles. */ | ||
| 1927 | template <typename fptypeN> | ||
| 1928 | static SIMD_CPPFUNC fptypeN rint(fptypeN x) { return ::__tg_rint(x); } | ||
| 1929 | |||
| 1930 | /*! @abstract Generalizes the <cmath> function round to operate on vectors | ||
| 1931 | * of floats and doubles. */ | ||
| 1932 | template <typename fptypeN> | ||
| 1933 | static SIMD_CPPFUNC fptypeN round(fptypeN x) { return ::__tg_round(x); } | ||
| 1934 | |||
| 1935 | /*! @abstract Generalizes the <cmath> function trunc to operate on vectors | ||
| 1936 | * of floats and doubles. */ | ||
| 1937 | template <typename fptypeN> | ||
| 1938 | static SIMD_CPPFUNC fptypeN trunc(fptypeN x) { return ::__tg_trunc(x); } | ||
| 1939 | |||
| 1940 | /*! @abstract Generalizes the <cmath> function isfinite to operate on | ||
| 1941 | * vectors of floats and doubles. */ | ||
| 1942 | template <typename fptypeN> | ||
| 1943 | static SIMD_CPPFUNC | ||
| 1944 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1945 | isfinite(fptypeN x) { return ::__tg_isfinite(x); } | ||
| 1946 | |||
| 1947 | /*! @abstract Generalizes the <cmath> function isinf to operate on vectors | ||
| 1948 | * of floats and doubles. */ | ||
| 1949 | template <typename fptypeN> | ||
| 1950 | static SIMD_CPPFUNC | ||
| 1951 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1952 | isinf(fptypeN x) { return ::__tg_isinf(x); } | ||
| 1953 | |||
| 1954 | /*! @abstract Generalizes the <cmath> function isnan to operate on vectors | ||
| 1955 | * of floats and doubles. */ | ||
| 1956 | template <typename fptypeN> | ||
| 1957 | static SIMD_CPPFUNC | ||
| 1958 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1959 | isnan(fptypeN x) { return ::__tg_isnan(x); } | ||
| 1960 | |||
| 1961 | /*! @abstract Generalizes the <cmath> function isnormal to operate on | ||
| 1962 | * vectors of floats and doubles. */ | ||
| 1963 | template <typename fptypeN> | ||
| 1964 | static SIMD_CPPFUNC | ||
| 1965 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1966 | isnormal(fptypeN x) { return ::__tg_isnormal(x); } | ||
| 1967 | |||
| 1968 | /*! @abstract Generalizes the <cmath> function atan2 to operate on vectors | ||
| 1969 | * of floats and doubles. */ | ||
| 1970 | template <typename fptypeN> | ||
| 1971 | static SIMD_CPPFUNC fptypeN atan2(fptypeN y, fptypeN x) { return ::__tg_atan2(y, x); } | ||
| 1972 | |||
| 1973 | /*! @abstract Generalizes the <cmath> function hypot to operate on vectors | ||
| 1974 | * of floats and doubles. */ | ||
| 1975 | template <typename fptypeN> | ||
| 1976 | static SIMD_CPPFUNC fptypeN hypot(fptypeN x, fptypeN y) { return ::__tg_hypot(x, y); } | ||
| 1977 | |||
| 1978 | /*! @abstract Generalizes the <cmath> function pow to operate on vectors of | ||
| 1979 | * floats and doubles. */ | ||
| 1980 | template <typename fptypeN> | ||
| 1981 | static SIMD_CPPFUNC fptypeN pow(fptypeN x, fptypeN y) { return ::__tg_pow(x, y); } | ||
| 1982 | |||
| 1983 | /*! @abstract Generalizes the <cmath> function fmod to operate on vectors of | ||
| 1984 | * floats and doubles. */ | ||
| 1985 | template <typename fptypeN> | ||
| 1986 | static SIMD_CPPFUNC fptypeN fmod(fptypeN x, fptypeN y) { return ::__tg_fmod(x, y); } | ||
| 1987 | |||
| 1988 | /*! @abstract Generalizes the <cmath> function remainder to operate on | ||
| 1989 | * vectors of floats and doubles. */ | ||
| 1990 | template <typename fptypeN> | ||
| 1991 | static SIMD_CPPFUNC fptypeN remainder(fptypeN x, fptypeN y) { return ::__tg_remainder(x, y); } | ||
| 1992 | |||
| 1993 | /*! @abstract Generalizes the <cmath> function copysign to operate on | ||
| 1994 | * vectors of floats and doubles. */ | ||
| 1995 | template <typename fptypeN> | ||
| 1996 | static SIMD_CPPFUNC fptypeN copysign(fptypeN x, fptypeN y) { return ::__tg_copysign(x, y); } | ||
| 1997 | |||
| 1998 | /*! @abstract Generalizes the <cmath> function nextafter to operate on | ||
| 1999 | * vectors of floats and doubles. */ | ||
| 2000 | template <typename fptypeN> | ||
| 2001 | static SIMD_CPPFUNC fptypeN nextafter(fptypeN x, fptypeN y) { return ::__tg_nextafter(x, y); } | ||
| 2002 | |||
| 2003 | /*! @abstract Generalizes the <cmath> function fdim to operate on vectors of | ||
| 2004 | * floats and doubles. */ | ||
| 2005 | template <typename fptypeN> | ||
| 2006 | static SIMD_CPPFUNC fptypeN fdim(fptypeN x, fptypeN y) { return ::__tg_fdim(x, y); } | ||
| 2007 | |||
| 2008 | /*! @abstract Generalizes the <cmath> function fmax to operate on vectors of | ||
| 2009 | * floats and doubles. */ | ||
| 2010 | template <typename fptypeN> | ||
| 2011 | static SIMD_CPPFUNC fptypeN fmax(fptypeN x, fptypeN y) { return ::__tg_fmax(x, y); } | ||
| 2012 | |||
| 2013 | /*! @abstract Generalizes the <cmath> function fmin to operate on vectors of | ||
| 2014 | * floats and doubles. */ | ||
| 2015 | template <typename fptypeN> | ||
| 2016 | static SIMD_CPPFUNC fptypeN fmin(fptypeN x, fptypeN y) { return ::__tg_fmin(x, y); } | ||
| 2017 | |||
| 2018 | /*! @abstract Generalizes the <cmath> function fma to operate on vectors of | ||
| 2019 | * floats and doubles. */ | ||
| 2020 | template <typename fptypeN> | ||
| 2021 | static SIMD_CPPFUNC fptypeN fma(fptypeN x, fptypeN y, fptypeN z) { return ::__tg_fma(x, y, z); } | ||
| 2022 | |||
| 2023 | /*! @abstract Computes x*y + z by the most efficient means available; either | ||
| 2024 | * a fused multiply add or separate multiply and add. */ | ||
| 2025 | template <typename fptypeN> | ||
| 2026 | static SIMD_CPPFUNC fptypeN muladd(fptypeN x, fptypeN y, fptypeN z) { return ::simd_muladd(x, y, z); } | ||
| 2027 | }; | ||
| 2028 | |||
| 2029 | extern "C" { | ||
| 2030 | #else | ||
| 2031 | #include <tgmath.h> | ||
| 2032 | /* C and Objective-C, we need some infrastructure to piggyback on tgmath.h */ | ||
| 2033 | static SIMD_OVERLOAD simd_float2 __tg_promote(simd_float2); | ||
| 2034 | static SIMD_OVERLOAD simd_float3 __tg_promote(simd_float3); | ||
| 2035 | static SIMD_OVERLOAD simd_float4 __tg_promote(simd_float4); | ||
| 2036 | static SIMD_OVERLOAD simd_float8 __tg_promote(simd_float8); | ||
| 2037 | static SIMD_OVERLOAD simd_float16 __tg_promote(simd_float16); | ||
| 2038 | static SIMD_OVERLOAD simd_double2 __tg_promote(simd_double2); | ||
| 2039 | static SIMD_OVERLOAD simd_double3 __tg_promote(simd_double3); | ||
| 2040 | static SIMD_OVERLOAD simd_double4 __tg_promote(simd_double4); | ||
| 2041 | static SIMD_OVERLOAD simd_double8 __tg_promote(simd_double8); | ||
| 2042 | |||
| 2043 | /* Apple extensions to <math.h>, added in macOS 10.9 and iOS 7.0 */ | ||
| 2044 | #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 || \ | ||
| 2045 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || \ | ||
| 2046 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 | ||
| 2047 | static inline SIMD_CFUNC float __tg_cospi(float x) { return __cospif(x); } | ||
| 2048 | static inline SIMD_CFUNC double __tg_cospi(double x) { return __cospi(x); } | ||
| 2049 | #undef cospi | ||
| 2050 | /*! @abstract `cospi(x)` computes `cos(pi * x)` without intermediate rounding. | ||
| 2051 | * | ||
| 2052 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2053 | * calling `cos`. Defined for `float` and `double` as well as vectors of | ||
| 2054 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2055 | #define cospi(__x) __tg_cospi(__tg_promote1((__x))(__x)) | ||
| 2056 | |||
| 2057 | static inline SIMD_CFUNC float __tg_sinpi(float x) { return __sinpif(x); } | ||
| 2058 | static inline SIMD_CFUNC double __tg_sinpi(double x) { return __sinpi(x); } | ||
| 2059 | #undef sinpi | ||
| 2060 | /*! @abstract `sinpi(x)` computes `sin(pi * x)` without intermediate rounding. | ||
| 2061 | * | ||
| 2062 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2063 | * calling `sin`. Defined for `float` and `double` as well as vectors | ||
| 2064 | * of floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2065 | #define sinpi(__x) __tg_sinpi(__tg_promote1((__x))(__x)) | ||
| 2066 | |||
| 2067 | static inline SIMD_CFUNC float __tg_tanpi(float x) { return __tanpif(x); } | ||
| 2068 | static inline SIMD_CFUNC double __tg_tanpi(double x) { return __tanpi(x); } | ||
| 2069 | #undef tanpi | ||
| 2070 | /*! @abstract `tanpi(x)` computes `tan(pi * x)` without intermediate rounding. | ||
| 2071 | * | ||
| 2072 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2073 | * calling `tan`. Defined for `float` and `double` as well as vectors of | ||
| 2074 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2075 | #define tanpi(__x) __tg_tanpi(__tg_promote1((__x))(__x)) | ||
| 2076 | |||
| 2077 | static inline SIMD_CFUNC float __tg_exp10(float x) { return __exp10f(x); } | ||
| 2078 | static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); } | ||
| 2079 | #undef exp10 | ||
| 2080 | /*! @abstract `exp10(x)` computes `10**x` more efficiently and accurately | ||
| 2081 | * than `pow(10, x)`. | ||
| 2082 | * | ||
| 2083 | * @discussion Defined for `float` and `double` as well as vectors of floats | ||
| 2084 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2085 | #define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x)) | ||
| 2086 | #endif | ||
| 2087 | |||
| 2088 | #if (defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__) | ||
| 2089 | static inline SIMD_CFUNC int __tg_isfinite(float x) { return __inline_isfinitef(x); } | ||
| 2090 | static inline SIMD_CFUNC int __tg_isfinite(double x) { return __inline_isfinited(x); } | ||
| 2091 | static inline SIMD_CFUNC int __tg_isfinite(long double x) { return __inline_isfinitel(x); } | ||
| 2092 | #undef isfinite | ||
| 2093 | /*! @abstract `__tg_isfinite(x)` determines if x is a finite value. | ||
| 2094 | * | ||
| 2095 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2096 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2097 | #define isfinite(__x) __tg_isfinite(__tg_promote1((__x))(__x)) | ||
| 2098 | |||
| 2099 | static inline SIMD_CFUNC int __tg_isinf(float x) { return __inline_isinff(x); } | ||
| 2100 | static inline SIMD_CFUNC int __tg_isinf(double x) { return __inline_isinfd(x); } | ||
| 2101 | static inline SIMD_CFUNC int __tg_isinf(long double x) { return __inline_isinfl(x); } | ||
| 2102 | #undef isinf | ||
| 2103 | /*! @abstract `__tg_isinf(x)` determines if x is positive or negative infinity. | ||
| 2104 | * | ||
| 2105 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2106 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2107 | #define isinf(__x) __tg_isinf(__tg_promote1((__x))(__x)) | ||
| 2108 | |||
| 2109 | static inline SIMD_CFUNC int __tg_isnan(float x) { return __inline_isnanf(x); } | ||
| 2110 | static inline SIMD_CFUNC int __tg_isnan(double x) { return __inline_isnand(x); } | ||
| 2111 | static inline SIMD_CFUNC int __tg_isnan(long double x) { return __inline_isnanl(x); } | ||
| 2112 | #undef isnan | ||
| 2113 | /*! @abstract `__tg_isnan(x)` determines if x is a not-a-number (NaN) value. | ||
| 2114 | * | ||
| 2115 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2116 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2117 | #define isnan(__x) __tg_isnan(__tg_promote1((__x))(__x)) | ||
| 2118 | |||
| 2119 | static inline SIMD_CFUNC int __tg_isnormal(float x) { return __inline_isnormalf(x); } | ||
| 2120 | static inline SIMD_CFUNC int __tg_isnormal(double x) { return __inline_isnormald(x); } | ||
| 2121 | static inline SIMD_CFUNC int __tg_isnormal(long double x) { return __inline_isnormall(x); } | ||
| 2122 | #undef isnormal | ||
| 2123 | /*! @abstract `__tg_isnormal(x)` determines if x is a normal value. | ||
| 2124 | * | ||
| 2125 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2126 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2127 | #define isnormal(__x) __tg_isnormal(__tg_promote1((__x))(__x)) | ||
| 2128 | |||
| 2129 | #else /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */ | ||
| 2130 | |||
| 2131 | static inline SIMD_CFUNC int __tg_isfinite(float x) { return __isfinitef(x); } | ||
| 2132 | static inline SIMD_CFUNC int __tg_isfinite(double x) { return __isfinited(x); } | ||
| 2133 | static inline SIMD_CFUNC int __tg_isfinite(long double x) { return __isfinitel(x); } | ||
| 2134 | #undef isfinite | ||
| 2135 | /*! @abstract `__tg_isfinite(x)` determines if x is a finite value. | ||
| 2136 | * | ||
| 2137 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2138 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2139 | #define isfinite(__x) __tg_isfinite(__tg_promote1((__x))(__x)) | ||
| 2140 | |||
| 2141 | static inline SIMD_CFUNC int __tg_isinf(float x) { return __isinff(x); } | ||
| 2142 | static inline SIMD_CFUNC int __tg_isinf(double x) { return __isinfd(x); } | ||
| 2143 | static inline SIMD_CFUNC int __tg_isinf(long double x) { return __isinfl(x); } | ||
| 2144 | #undef isinf | ||
| 2145 | /*! @abstract `__tg_isinf(x)` determines if x is positive or negative infinity. | ||
| 2146 | * | ||
| 2147 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2148 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2149 | #define isinf(__x) __tg_isinf(__tg_promote1((__x))(__x)) | ||
| 2150 | |||
| 2151 | static inline SIMD_CFUNC int __tg_isnan(float x) { return __isnanf(x); } | ||
| 2152 | static inline SIMD_CFUNC int __tg_isnan(double x) { return __isnand(x); } | ||
| 2153 | static inline SIMD_CFUNC int __tg_isnan(long double x) { return __isnanl(x); } | ||
| 2154 | #undef isnan | ||
| 2155 | /*! @abstract `__tg_isnan(x)` determines if x is a not-a-number (NaN) value. | ||
| 2156 | * | ||
| 2157 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2158 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2159 | #define isnan(__x) __tg_isnan(__tg_promote1((__x))(__x)) | ||
| 2160 | |||
| 2161 | static inline SIMD_CFUNC int __tg_isnormal(float x) { return __isnormalf(x); } | ||
| 2162 | static inline SIMD_CFUNC int __tg_isnormal(double x) { return __isnormald(x); } | ||
| 2163 | static inline SIMD_CFUNC int __tg_isnormal(long double x) { return __isnormall(x); } | ||
| 2164 | #undef isnormal | ||
| 2165 | /*! @abstract `__tg_isnormal(x)` determines if x is a normal value. | ||
| 2166 | * | ||
| 2167 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2168 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2169 | #define isnormal(__x) __tg_isnormal(__tg_promote1((__x))(__x)) | ||
| 2170 | #endif /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */ | ||
| 2171 | #endif /* !__cplusplus */ | ||
| 2172 | |||
| 2173 | #pragma mark - fabs implementation | ||
| 2174 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2175 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2176 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2177 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2178 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2179 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2180 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2181 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2182 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2183 | |||
| 2184 | #pragma mark - isfinite implementation | ||
| 2185 | static inline SIMD_CFUNC simd_int2 __tg_isfinite(simd_float2 x) { return x == x && __tg_fabs(x) != (simd_float2)INFINITY; } | ||
| 2186 | static inline SIMD_CFUNC simd_int3 __tg_isfinite(simd_float3 x) { return x == x && __tg_fabs(x) != (simd_float3)INFINITY; } | ||
| 2187 | static inline SIMD_CFUNC simd_int4 __tg_isfinite(simd_float4 x) { return x == x && __tg_fabs(x) != (simd_float4)INFINITY; } | ||
| 2188 | static inline SIMD_CFUNC simd_int8 __tg_isfinite(simd_float8 x) { return x == x && __tg_fabs(x) != (simd_float8)INFINITY; } | ||
| 2189 | static inline SIMD_CFUNC simd_int16 __tg_isfinite(simd_float16 x) { return x == x && __tg_fabs(x) != (simd_float16)INFINITY; } | ||
| 2190 | static inline SIMD_CFUNC simd_long2 __tg_isfinite(simd_double2 x) { return x == x && __tg_fabs(x) != (simd_double2)INFINITY; } | ||
| 2191 | static inline SIMD_CFUNC simd_long3 __tg_isfinite(simd_double3 x) { return x == x && __tg_fabs(x) != (simd_double3)INFINITY; } | ||
| 2192 | static inline SIMD_CFUNC simd_long4 __tg_isfinite(simd_double4 x) { return x == x && __tg_fabs(x) != (simd_double4)INFINITY; } | ||
| 2193 | static inline SIMD_CFUNC simd_long8 __tg_isfinite(simd_double8 x) { return x == x && __tg_fabs(x) != (simd_double8)INFINITY; } | ||
| 2194 | |||
| 2195 | #pragma mark - isinf implementation | ||
| 2196 | static inline SIMD_CFUNC simd_int2 __tg_isinf(simd_float2 x) { return __tg_fabs(x) == (simd_float2)INFINITY; } | ||
| 2197 | static inline SIMD_CFUNC simd_int3 __tg_isinf(simd_float3 x) { return __tg_fabs(x) == (simd_float3)INFINITY; } | ||
| 2198 | static inline SIMD_CFUNC simd_int4 __tg_isinf(simd_float4 x) { return __tg_fabs(x) == (simd_float4)INFINITY; } | ||
| 2199 | static inline SIMD_CFUNC simd_int8 __tg_isinf(simd_float8 x) { return __tg_fabs(x) == (simd_float8)INFINITY; } | ||
| 2200 | static inline SIMD_CFUNC simd_int16 __tg_isinf(simd_float16 x) { return __tg_fabs(x) == (simd_float16)INFINITY; } | ||
| 2201 | static inline SIMD_CFUNC simd_long2 __tg_isinf(simd_double2 x) { return __tg_fabs(x) == (simd_double2)INFINITY; } | ||
| 2202 | static inline SIMD_CFUNC simd_long3 __tg_isinf(simd_double3 x) { return __tg_fabs(x) == (simd_double3)INFINITY; } | ||
| 2203 | static inline SIMD_CFUNC simd_long4 __tg_isinf(simd_double4 x) { return __tg_fabs(x) == (simd_double4)INFINITY; } | ||
| 2204 | static inline SIMD_CFUNC simd_long8 __tg_isinf(simd_double8 x) { return __tg_fabs(x) == (simd_double8)INFINITY; } | ||
| 2205 | |||
| 2206 | #pragma mark - isnan implementation | ||
| 2207 | static inline SIMD_CFUNC simd_int2 __tg_isnan(simd_float2 x) { return x != x; } | ||
| 2208 | static inline SIMD_CFUNC simd_int3 __tg_isnan(simd_float3 x) { return x != x; } | ||
| 2209 | static inline SIMD_CFUNC simd_int4 __tg_isnan(simd_float4 x) { return x != x; } | ||
| 2210 | static inline SIMD_CFUNC simd_int8 __tg_isnan(simd_float8 x) { return x != x; } | ||
| 2211 | static inline SIMD_CFUNC simd_int16 __tg_isnan(simd_float16 x) { return x != x; } | ||
| 2212 | static inline SIMD_CFUNC simd_long2 __tg_isnan(simd_double2 x) { return x != x; } | ||
| 2213 | static inline SIMD_CFUNC simd_long3 __tg_isnan(simd_double3 x) { return x != x; } | ||
| 2214 | static inline SIMD_CFUNC simd_long4 __tg_isnan(simd_double4 x) { return x != x; } | ||
| 2215 | static inline SIMD_CFUNC simd_long8 __tg_isnan(simd_double8 x) { return x != x; } | ||
| 2216 | |||
| 2217 | #pragma mark - isnormal implementation | ||
| 2218 | static inline SIMD_CFUNC simd_int2 __tg_isnormal(simd_float2 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float2)__FLT_MIN__; } | ||
| 2219 | static inline SIMD_CFUNC simd_int3 __tg_isnormal(simd_float3 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float3)__FLT_MIN__; } | ||
| 2220 | static inline SIMD_CFUNC simd_int4 __tg_isnormal(simd_float4 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float4)__FLT_MIN__; } | ||
| 2221 | static inline SIMD_CFUNC simd_int8 __tg_isnormal(simd_float8 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float8)__FLT_MIN__; } | ||
| 2222 | static inline SIMD_CFUNC simd_int16 __tg_isnormal(simd_float16 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float16)__FLT_MIN__; } | ||
| 2223 | static inline SIMD_CFUNC simd_long2 __tg_isnormal(simd_double2 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double2)__DBL_MIN__; } | ||
| 2224 | static inline SIMD_CFUNC simd_long3 __tg_isnormal(simd_double3 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double3)__DBL_MIN__; } | ||
| 2225 | static inline SIMD_CFUNC simd_long4 __tg_isnormal(simd_double4 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double4)__DBL_MIN__; } | ||
| 2226 | static inline SIMD_CFUNC simd_long8 __tg_isnormal(simd_double8 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double8)__DBL_MIN__; } | ||
| 2227 | |||
| 2228 | #pragma mark - fmin, fmax implementation | ||
| 2229 | static SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y) { | ||
| 2230 | #if defined __SSE2__ | ||
| 2231 | return simd_make_float2(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2232 | #elif defined __arm64__ | ||
| 2233 | return vminnm_f32(x, y); | ||
| 2234 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2235 | return vmin_f32(x, y); | ||
| 2236 | #else | ||
| 2237 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2238 | #endif | ||
| 2239 | } | ||
| 2240 | |||
| 2241 | static SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y) { | ||
| 2242 | return simd_make_float3(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2243 | } | ||
| 2244 | |||
| 2245 | static SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y) { | ||
| 2246 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2247 | return _mm_range_ps(x, y, 4); | ||
| 2248 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2249 | return _mm_min_ps(x, y); | ||
| 2250 | #elif defined __SSE2__ | ||
| 2251 | return simd_bitselect(_mm_min_ps(x, y), x, y != y); | ||
| 2252 | #elif defined __arm64__ | ||
| 2253 | return vminnmq_f32(x, y); | ||
| 2254 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2255 | return vminq_f32(x, y); | ||
| 2256 | #else | ||
| 2257 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2258 | #endif | ||
| 2259 | } | ||
| 2260 | |||
| 2261 | static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) { | ||
| 2262 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2263 | return _mm256_range_ps(x, y, 4); | ||
| 2264 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2265 | return _mm256_min_ps(x, y); | ||
| 2266 | #elif defined __AVX__ | ||
| 2267 | return simd_bitselect(_mm256_min_ps(x, y), x, y != y); | ||
| 2268 | #else | ||
| 2269 | return simd_make_float8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2270 | #endif | ||
| 2271 | } | ||
| 2272 | |||
| 2273 | static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) { | ||
| 2274 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 2275 | return _mm512_range_ps(x, y, 4); | ||
| 2276 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2277 | return _mm512_min_ps(x, y); | ||
| 2278 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2279 | return simd_bitselect(_mm512_min_ps(x, y), x, y != y); | ||
| 2280 | #else | ||
| 2281 | return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2282 | #endif | ||
| 2283 | } | ||
| 2284 | |||
| 2285 | static SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y) { | ||
| 2286 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2287 | return _mm_range_pd(x, y, 4); | ||
| 2288 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2289 | return _mm_min_pd(x, y); | ||
| 2290 | #elif defined __SSE2__ | ||
| 2291 | return simd_bitselect(_mm_min_pd(x, y), x, y != y); | ||
| 2292 | #elif defined __arm64__ | ||
| 2293 | return vminnmq_f64(x, y); | ||
| 2294 | #else | ||
| 2295 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2296 | #endif | ||
| 2297 | } | ||
| 2298 | |||
| 2299 | static SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y) { | ||
| 2300 | return simd_make_double3(__tg_fmin(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 2301 | } | ||
| 2302 | |||
| 2303 | static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) { | ||
| 2304 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2305 | return _mm256_range_pd(x, y, 4); | ||
| 2306 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2307 | return _mm256_min_pd(x, y); | ||
| 2308 | #elif defined __AVX__ | ||
| 2309 | return simd_bitselect(_mm256_min_pd(x, y), x, y != y); | ||
| 2310 | #else | ||
| 2311 | return simd_make_double4(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2312 | #endif | ||
| 2313 | } | ||
| 2314 | |||
| 2315 | static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) { | ||
| 2316 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 2317 | return _mm512_range_pd(x, y, 4); | ||
| 2318 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2319 | return _mm512_min_pd(x, y); | ||
| 2320 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2321 | return simd_bitselect(_mm512_min_pd(x, y), x, y != y); | ||
| 2322 | #else | ||
| 2323 | return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2324 | #endif | ||
| 2325 | } | ||
| 2326 | |||
| 2327 | static SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y) { | ||
| 2328 | #if defined __SSE2__ | ||
| 2329 | return simd_make_float2(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2330 | #elif defined __arm64__ | ||
| 2331 | return vmaxnm_f32(x, y); | ||
| 2332 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2333 | return vmax_f32(x, y); | ||
| 2334 | #else | ||
| 2335 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2336 | #endif | ||
| 2337 | } | ||
| 2338 | |||
| 2339 | static SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y) { | ||
| 2340 | return simd_make_float3(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2341 | } | ||
| 2342 | |||
| 2343 | static SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y) { | ||
| 2344 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2345 | return _mm_range_ps(x, y, 5); | ||
| 2346 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2347 | return _mm_max_ps(x, y); | ||
| 2348 | #elif defined __SSE2__ | ||
| 2349 | return simd_bitselect(_mm_max_ps(x, y), x, y != y); | ||
| 2350 | #elif defined __arm64__ | ||
| 2351 | return vmaxnmq_f32(x, y); | ||
| 2352 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2353 | return vmaxq_f32(x, y); | ||
| 2354 | #else | ||
| 2355 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2356 | #endif | ||
| 2357 | } | ||
| 2358 | |||
| 2359 | static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) { | ||
| 2360 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2361 | return _mm256_range_ps(x, y, 5); | ||
| 2362 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2363 | return _mm256_max_ps(x, y); | ||
| 2364 | #elif defined __AVX__ | ||
| 2365 | return simd_bitselect(_mm256_max_ps(x, y), x, y != y); | ||
| 2366 | #else | ||
| 2367 | return simd_make_float8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2368 | #endif | ||
| 2369 | } | ||
| 2370 | |||
| 2371 | static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) { | ||
| 2372 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 2373 | return _mm512_range_ps(x, y, 5); | ||
| 2374 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2375 | return _mm512_max_ps(x, y); | ||
| 2376 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2377 | return simd_bitselect(_mm512_max_ps(x, y), x, y != y); | ||
| 2378 | #else | ||
| 2379 | return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2380 | #endif | ||
| 2381 | } | ||
| 2382 | |||
| 2383 | static SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y) { | ||
| 2384 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2385 | return _mm_range_pd(x, y, 5); | ||
| 2386 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2387 | return _mm_max_pd(x, y); | ||
| 2388 | #elif defined __SSE2__ | ||
| 2389 | return simd_bitselect(_mm_max_pd(x, y), x, y != y); | ||
| 2390 | #elif defined __arm64__ | ||
| 2391 | return vmaxnmq_f64(x, y); | ||
| 2392 | #else | ||
| 2393 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2394 | #endif | ||
| 2395 | } | ||
| 2396 | |||
| 2397 | static SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y) { | ||
| 2398 | return simd_make_double3(__tg_fmax(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 2399 | } | ||
| 2400 | |||
| 2401 | static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) { | ||
| 2402 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2403 | return _mm256_range_pd(x, y, 5); | ||
| 2404 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2405 | return _mm256_max_pd(x, y); | ||
| 2406 | #elif defined __AVX__ | ||
| 2407 | return simd_bitselect(_mm256_max_pd(x, y), x, y != y); | ||
| 2408 | #else | ||
| 2409 | return simd_make_double4(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2410 | #endif | ||
| 2411 | } | ||
| 2412 | |||
| 2413 | static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) { | ||
| 2414 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 2415 | return _mm512_range_pd(x, y, 5); | ||
| 2416 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2417 | return _mm512_max_pd(x, y); | ||
| 2418 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2419 | return simd_bitselect(_mm512_max_pd(x, y), x, y != y); | ||
| 2420 | #else | ||
| 2421 | return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2422 | #endif | ||
| 2423 | } | ||
| 2424 | |||
| 2425 | #pragma mark - copysign implementation | ||
| 2426 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2427 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2428 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2429 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2430 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2431 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2432 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2433 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2434 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2435 | |||
| 2436 | #pragma mark - sqrt implementation | ||
| 2437 | static SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x) { | ||
| 2438 | #if defined __SSE2__ | ||
| 2439 | return simd_make_float2(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2440 | #elif defined __arm64__ | ||
| 2441 | return vsqrt_f32(x); | ||
| 2442 | #else | ||
| 2443 | return simd_make_float2(sqrt(x.x), sqrt(x.y)); | ||
| 2444 | #endif | ||
| 2445 | } | ||
| 2446 | |||
| 2447 | static SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x) { | ||
| 2448 | return simd_make_float3(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2449 | } | ||
| 2450 | |||
| 2451 | static SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x) { | ||
| 2452 | #if defined __SSE2__ | ||
| 2453 | return _mm_sqrt_ps(x); | ||
| 2454 | #elif defined __arm64__ | ||
| 2455 | return vsqrtq_f32(x); | ||
| 2456 | #else | ||
| 2457 | return simd_make_float4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2458 | #endif | ||
| 2459 | } | ||
| 2460 | |||
| 2461 | static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) { | ||
| 2462 | #if defined __AVX__ | ||
| 2463 | return _mm256_sqrt_ps(x); | ||
| 2464 | #else | ||
| 2465 | return simd_make_float8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2466 | #endif | ||
| 2467 | } | ||
| 2468 | |||
| 2469 | static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) { | ||
| 2470 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2471 | return _mm512_sqrt_ps(x); | ||
| 2472 | #else | ||
| 2473 | return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2474 | #endif | ||
| 2475 | } | ||
| 2476 | |||
| 2477 | static SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x) { | ||
| 2478 | #if defined __SSE2__ | ||
| 2479 | return _mm_sqrt_pd(x); | ||
| 2480 | #elif defined __arm64__ | ||
| 2481 | return vsqrtq_f64(x); | ||
| 2482 | #else | ||
| 2483 | return simd_make_double2(sqrt(x.x), sqrt(x.y)); | ||
| 2484 | #endif | ||
| 2485 | } | ||
| 2486 | |||
| 2487 | static SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x) { | ||
| 2488 | return simd_make_double3(__tg_sqrt(simd_make_double4_undef(x))); | ||
| 2489 | } | ||
| 2490 | |||
| 2491 | static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) { | ||
| 2492 | #if defined __AVX__ | ||
| 2493 | return _mm256_sqrt_pd(x); | ||
| 2494 | #else | ||
| 2495 | return simd_make_double4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2496 | #endif | ||
| 2497 | } | ||
| 2498 | |||
| 2499 | static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) { | ||
| 2500 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2501 | return _mm512_sqrt_pd(x); | ||
| 2502 | #else | ||
| 2503 | return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2504 | #endif | ||
| 2505 | } | ||
| 2506 | |||
| 2507 | #pragma mark - ceil, floor, rint, trunc implementation | ||
| 2508 | static SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x) { | ||
| 2509 | #if defined __arm64__ | ||
| 2510 | return vrndp_f32(x); | ||
| 2511 | #else | ||
| 2512 | return simd_make_float2(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2513 | #endif | ||
| 2514 | } | ||
| 2515 | |||
| 2516 | static SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x) { | ||
| 2517 | return simd_make_float3(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2518 | } | ||
| 2519 | |||
| 2520 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2521 | extern simd_float4 _simd_ceil_f4(simd_float4 x); | ||
| 2522 | #endif | ||
| 2523 | |||
| 2524 | static SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x) { | ||
| 2525 | #if defined __SSE4_1__ | ||
| 2526 | return _mm_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2527 | #elif defined __arm64__ | ||
| 2528 | return vrndpq_f32(x); | ||
| 2529 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2530 | return _simd_ceil_f4(x); | ||
| 2531 | #else | ||
| 2532 | simd_float4 truncated = __tg_trunc(x); | ||
| 2533 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated < x); | ||
| 2534 | return __tg_copysign(truncated + adjust, x); | ||
| 2535 | #endif | ||
| 2536 | } | ||
| 2537 | |||
| 2538 | static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) { | ||
| 2539 | #if defined __AVX__ | ||
| 2540 | return _mm256_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2541 | #else | ||
| 2542 | return simd_make_float8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2543 | #endif | ||
| 2544 | } | ||
| 2545 | |||
| 2546 | static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) { | ||
| 2547 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2548 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2549 | #else | ||
| 2550 | return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2551 | #endif | ||
| 2552 | } | ||
| 2553 | |||
| 2554 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2555 | extern simd_double2 _simd_ceil_d2(simd_double2 x); | ||
| 2556 | #endif | ||
| 2557 | |||
| 2558 | static SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x) { | ||
| 2559 | #if defined __SSE4_1__ | ||
| 2560 | return _mm_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2561 | #elif defined __arm64__ | ||
| 2562 | return vrndpq_f64(x); | ||
| 2563 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2564 | return _simd_ceil_d2(x); | ||
| 2565 | #else | ||
| 2566 | simd_double2 truncated = __tg_trunc(x); | ||
| 2567 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated < x); | ||
| 2568 | return __tg_copysign(truncated + adjust, x); | ||
| 2569 | #endif | ||
| 2570 | } | ||
| 2571 | |||
| 2572 | static SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x) { | ||
| 2573 | return simd_make_double3(__tg_ceil(simd_make_double4_undef(x))); | ||
| 2574 | } | ||
| 2575 | |||
| 2576 | static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) { | ||
| 2577 | #if defined __AVX__ | ||
| 2578 | return _mm256_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2579 | #else | ||
| 2580 | return simd_make_double4(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2581 | #endif | ||
| 2582 | } | ||
| 2583 | |||
| 2584 | static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) { | ||
| 2585 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2586 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2587 | #else | ||
| 2588 | return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2589 | #endif | ||
| 2590 | } | ||
| 2591 | |||
| 2592 | static SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x) { | ||
| 2593 | #if defined __arm64__ | ||
| 2594 | return vrndm_f32(x); | ||
| 2595 | #else | ||
| 2596 | return simd_make_float2(__tg_floor(simd_make_float4_undef(x))); | ||
| 2597 | #endif | ||
| 2598 | } | ||
| 2599 | |||
| 2600 | static SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x) { | ||
| 2601 | return simd_make_float3(__tg_floor(simd_make_float4_undef(x))); | ||
| 2602 | } | ||
| 2603 | |||
| 2604 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2605 | extern simd_float4 _simd_floor_f4(simd_float4 x); | ||
| 2606 | #endif | ||
| 2607 | |||
| 2608 | static SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x) { | ||
| 2609 | #if defined __SSE4_1__ | ||
| 2610 | return _mm_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2611 | #elif defined __arm64__ | ||
| 2612 | return vrndmq_f32(x); | ||
| 2613 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2614 | return _simd_floor_f4(x); | ||
| 2615 | #else | ||
| 2616 | simd_float4 truncated = __tg_trunc(x); | ||
| 2617 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated > x); | ||
| 2618 | return truncated - adjust; | ||
| 2619 | #endif | ||
| 2620 | } | ||
| 2621 | |||
| 2622 | static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) { | ||
| 2623 | #if defined __AVX__ | ||
| 2624 | return _mm256_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2625 | #else | ||
| 2626 | return simd_make_float8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2627 | #endif | ||
| 2628 | } | ||
| 2629 | |||
| 2630 | static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) { | ||
| 2631 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2632 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2633 | #else | ||
| 2634 | return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2635 | #endif | ||
| 2636 | } | ||
| 2637 | |||
| 2638 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2639 | extern simd_double2 _simd_floor_d2(simd_double2 x); | ||
| 2640 | #endif | ||
| 2641 | |||
| 2642 | static SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x) { | ||
| 2643 | #if defined __SSE4_1__ | ||
| 2644 | return _mm_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2645 | #elif defined __arm64__ | ||
| 2646 | return vrndmq_f64(x); | ||
| 2647 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2648 | return _simd_floor_d2(x); | ||
| 2649 | #else | ||
| 2650 | simd_double2 truncated = __tg_trunc(x); | ||
| 2651 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated > x); | ||
| 2652 | return truncated - adjust; | ||
| 2653 | #endif | ||
| 2654 | } | ||
| 2655 | |||
| 2656 | static SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x) { | ||
| 2657 | return simd_make_double3(__tg_floor(simd_make_double4_undef(x))); | ||
| 2658 | } | ||
| 2659 | |||
| 2660 | static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) { | ||
| 2661 | #if defined __AVX__ | ||
| 2662 | return _mm256_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2663 | #else | ||
| 2664 | return simd_make_double4(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2665 | #endif | ||
| 2666 | } | ||
| 2667 | |||
| 2668 | static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) { | ||
| 2669 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2670 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2671 | #else | ||
| 2672 | return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2673 | #endif | ||
| 2674 | } | ||
| 2675 | |||
| 2676 | static SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x) { | ||
| 2677 | #if defined __arm64__ | ||
| 2678 | return vrndx_f32(x); | ||
| 2679 | #else | ||
| 2680 | return simd_make_float2(__tg_rint(simd_make_float4_undef(x))); | ||
| 2681 | #endif | ||
| 2682 | } | ||
| 2683 | |||
| 2684 | static SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x) { | ||
| 2685 | return simd_make_float3(__tg_rint(simd_make_float4_undef(x))); | ||
| 2686 | } | ||
| 2687 | |||
| 2688 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2689 | extern simd_float4 _simd_rint_f4(simd_float4 x); | ||
| 2690 | #endif | ||
| 2691 | |||
| 2692 | static SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x) { | ||
| 2693 | #if defined __SSE4_1__ | ||
| 2694 | return _mm_round_ps(x, _MM_FROUND_RINT); | ||
| 2695 | #elif defined __arm64__ | ||
| 2696 | return vrndxq_f32(x); | ||
| 2697 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2698 | return _simd_rint_f4(x); | ||
| 2699 | #else | ||
| 2700 | simd_float4 magic = __tg_copysign(0x1.0p23, x); | ||
| 2701 | simd_int4 x_is_small = __tg_fabs(x) < 0x1.0p23; | ||
| 2702 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffff); | ||
| 2703 | #endif | ||
| 2704 | } | ||
| 2705 | |||
| 2706 | static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) { | ||
| 2707 | #if defined __AVX__ | ||
| 2708 | return _mm256_round_ps(x, _MM_FROUND_RINT); | ||
| 2709 | #else | ||
| 2710 | return simd_make_float8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2711 | #endif | ||
| 2712 | } | ||
| 2713 | |||
| 2714 | static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) { | ||
| 2715 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2716 | return _mm512_roundscale_ps(x, _MM_FROUND_RINT); | ||
| 2717 | #else | ||
| 2718 | return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2719 | #endif | ||
| 2720 | } | ||
| 2721 | |||
| 2722 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2723 | extern simd_double2 _simd_rint_d2(simd_double2 x); | ||
| 2724 | #endif | ||
| 2725 | |||
| 2726 | static SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x) { | ||
| 2727 | #if defined __SSE4_1__ | ||
| 2728 | return _mm_round_pd(x, _MM_FROUND_RINT); | ||
| 2729 | #elif defined __arm64__ | ||
| 2730 | return vrndxq_f64(x); | ||
| 2731 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2732 | return _simd_rint_d2(x); | ||
| 2733 | #else | ||
| 2734 | simd_double2 magic = __tg_copysign(0x1.0p52, x); | ||
| 2735 | simd_long2 x_is_small = __tg_fabs(x) < 0x1.0p52; | ||
| 2736 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffffffffffff); | ||
| 2737 | #endif | ||
| 2738 | } | ||
| 2739 | |||
| 2740 | static SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x) { | ||
| 2741 | return simd_make_double3(__tg_rint(simd_make_double4_undef(x))); | ||
| 2742 | } | ||
| 2743 | |||
| 2744 | static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) { | ||
| 2745 | #if defined __AVX__ | ||
| 2746 | return _mm256_round_pd(x, _MM_FROUND_RINT); | ||
| 2747 | #else | ||
| 2748 | return simd_make_double4(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2749 | #endif | ||
| 2750 | } | ||
| 2751 | |||
| 2752 | static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) { | ||
| 2753 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2754 | return _mm512_roundscale_pd(x, _MM_FROUND_RINT); | ||
| 2755 | #else | ||
| 2756 | return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2757 | #endif | ||
| 2758 | } | ||
| 2759 | |||
| 2760 | static SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x) { | ||
| 2761 | #if defined __arm64__ | ||
| 2762 | return vrnd_f32(x); | ||
| 2763 | #else | ||
| 2764 | return simd_make_float2(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2765 | #endif | ||
| 2766 | } | ||
| 2767 | |||
| 2768 | static SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x) { | ||
| 2769 | return simd_make_float3(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2770 | } | ||
| 2771 | |||
| 2772 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2773 | extern simd_float4 _simd_trunc_f4(simd_float4 x); | ||
| 2774 | #endif | ||
| 2775 | |||
| 2776 | static SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x) { | ||
| 2777 | #if defined __SSE4_1__ | ||
| 2778 | return _mm_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2779 | #elif defined __arm64__ | ||
| 2780 | return vrndq_f32(x); | ||
| 2781 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2782 | return _simd_trunc_f4(x); | ||
| 2783 | #else | ||
| 2784 | simd_float4 binade = simd_bitselect(0, x, 0x7f800000); | ||
| 2785 | simd_int4 mask = (simd_int4)__tg_fmin(-2*binade + 1, -0); | ||
| 2786 | simd_float4 result = simd_bitselect(0, x, mask); | ||
| 2787 | return simd_bitselect(x, result, binade < 0x1.0p23); | ||
| 2788 | #endif | ||
| 2789 | } | ||
| 2790 | |||
| 2791 | static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) { | ||
| 2792 | #if defined __AVX__ | ||
| 2793 | return _mm256_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2794 | #else | ||
| 2795 | return simd_make_float8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2796 | #endif | ||
| 2797 | } | ||
| 2798 | |||
| 2799 | static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) { | ||
| 2800 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2801 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2802 | #else | ||
| 2803 | return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2804 | #endif | ||
| 2805 | } | ||
| 2806 | |||
| 2807 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2808 | extern simd_double2 _simd_trunc_d2(simd_double2 x); | ||
| 2809 | #endif | ||
| 2810 | |||
| 2811 | static SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x) { | ||
| 2812 | #if defined __SSE4_1__ | ||
| 2813 | return _mm_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2814 | #elif defined __arm64__ | ||
| 2815 | return vrndq_f64(x); | ||
| 2816 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2817 | return _simd_trunc_d2(x); | ||
| 2818 | #else | ||
| 2819 | simd_double2 binade = simd_bitselect(0, x, 0x7ff0000000000000); | ||
| 2820 | simd_long2 mask = (simd_long2)__tg_fmin(-2*binade + 1, -0); | ||
| 2821 | simd_double2 result = simd_bitselect(0, x, mask); | ||
| 2822 | return simd_bitselect(x, result, binade < 0x1.0p52); | ||
| 2823 | #endif | ||
| 2824 | } | ||
| 2825 | |||
| 2826 | static SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x) { | ||
| 2827 | return simd_make_double3(__tg_trunc(simd_make_double4_undef(x))); | ||
| 2828 | } | ||
| 2829 | |||
| 2830 | static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) { | ||
| 2831 | #if defined __AVX__ | ||
| 2832 | return _mm256_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2833 | #else | ||
| 2834 | return simd_make_double4(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2835 | #endif | ||
| 2836 | } | ||
| 2837 | |||
| 2838 | static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) { | ||
| 2839 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2840 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2841 | #else | ||
| 2842 | return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2843 | #endif | ||
| 2844 | } | ||
| 2845 | |||
| 2846 | #pragma mark - sine, cosine implementation | ||
| 2847 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x) { | ||
| 2848 | return simd_make_float2(__tg_sin(simd_make_float4(x))); | ||
| 2849 | } | ||
| 2850 | |||
| 2851 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x) { | ||
| 2852 | return simd_make_float3(__tg_sin(simd_make_float4(x))); | ||
| 2853 | } | ||
| 2854 | |||
| 2855 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2856 | extern simd_float4 _simd_sin_f4(simd_float4 x); | ||
| 2857 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2858 | return _simd_sin_f4(x); | ||
| 2859 | } | ||
| 2860 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2861 | extern simd_float4 __sin_f4(simd_float4 x); | ||
| 2862 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2863 | return __sin_f4(x); | ||
| 2864 | } | ||
| 2865 | #else | ||
| 2866 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2867 | return simd_make_float4(sin(x.x), sin(x.y), sin(x.z), sin(x.w)); | ||
| 2868 | } | ||
| 2869 | #endif | ||
| 2870 | |||
| 2871 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2872 | extern simd_float8 _simd_sin_f8(simd_float8 x); | ||
| 2873 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2874 | return _simd_sin_f8(x); | ||
| 2875 | } | ||
| 2876 | #else | ||
| 2877 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2878 | return simd_make_float8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2879 | } | ||
| 2880 | #endif | ||
| 2881 | |||
| 2882 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2883 | extern simd_float16 _simd_sin_f16(simd_float16 x); | ||
| 2884 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2885 | return _simd_sin_f16(x); | ||
| 2886 | } | ||
| 2887 | #else | ||
| 2888 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2889 | return simd_make_float16(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2890 | } | ||
| 2891 | #endif | ||
| 2892 | |||
| 2893 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2894 | extern simd_double2 _simd_sin_d2(simd_double2 x); | ||
| 2895 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2896 | return _simd_sin_d2(x); | ||
| 2897 | } | ||
| 2898 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2899 | extern simd_double2 __sin_d2(simd_double2 x); | ||
| 2900 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2901 | return __sin_d2(x); | ||
| 2902 | } | ||
| 2903 | #else | ||
| 2904 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2905 | return simd_make_double2(sin(x.x), sin(x.y)); | ||
| 2906 | } | ||
| 2907 | #endif | ||
| 2908 | |||
| 2909 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) { | ||
| 2910 | return simd_make_double3(__tg_sin(simd_make_double4(x))); | ||
| 2911 | } | ||
| 2912 | |||
| 2913 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2914 | extern simd_double4 _simd_sin_d4(simd_double4 x); | ||
| 2915 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2916 | return _simd_sin_d4(x); | ||
| 2917 | } | ||
| 2918 | #else | ||
| 2919 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2920 | return simd_make_double4(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2921 | } | ||
| 2922 | #endif | ||
| 2923 | |||
| 2924 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2925 | extern simd_double8 _simd_sin_d8(simd_double8 x); | ||
| 2926 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2927 | return _simd_sin_d8(x); | ||
| 2928 | } | ||
| 2929 | #else | ||
| 2930 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2931 | return simd_make_double8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2932 | } | ||
| 2933 | #endif | ||
| 2934 | |||
| 2935 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x) { | ||
| 2936 | return simd_make_float2(__tg_cos(simd_make_float4(x))); | ||
| 2937 | } | ||
| 2938 | |||
| 2939 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x) { | ||
| 2940 | return simd_make_float3(__tg_cos(simd_make_float4(x))); | ||
| 2941 | } | ||
| 2942 | |||
| 2943 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2944 | extern simd_float4 _simd_cos_f4(simd_float4 x); | ||
| 2945 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2946 | return _simd_cos_f4(x); | ||
| 2947 | } | ||
| 2948 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2949 | extern simd_float4 __cos_f4(simd_float4 x); | ||
| 2950 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2951 | return __cos_f4(x); | ||
| 2952 | } | ||
| 2953 | #else | ||
| 2954 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2955 | return simd_make_float4(cos(x.x), cos(x.y), cos(x.z), cos(x.w)); | ||
| 2956 | } | ||
| 2957 | #endif | ||
| 2958 | |||
| 2959 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2960 | extern simd_float8 _simd_cos_f8(simd_float8 x); | ||
| 2961 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2962 | return _simd_cos_f8(x); | ||
| 2963 | } | ||
| 2964 | #else | ||
| 2965 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2966 | return simd_make_float8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2967 | } | ||
| 2968 | #endif | ||
| 2969 | |||
| 2970 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2971 | extern simd_float16 _simd_cos_f16(simd_float16 x); | ||
| 2972 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2973 | return _simd_cos_f16(x); | ||
| 2974 | } | ||
| 2975 | #else | ||
| 2976 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2977 | return simd_make_float16(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2978 | } | ||
| 2979 | #endif | ||
| 2980 | |||
| 2981 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2982 | extern simd_double2 _simd_cos_d2(simd_double2 x); | ||
| 2983 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2984 | return _simd_cos_d2(x); | ||
| 2985 | } | ||
| 2986 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2987 | extern simd_double2 __cos_d2(simd_double2 x); | ||
| 2988 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2989 | return __cos_d2(x); | ||
| 2990 | } | ||
| 2991 | #else | ||
| 2992 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2993 | return simd_make_double2(cos(x.x), cos(x.y)); | ||
| 2994 | } | ||
| 2995 | #endif | ||
| 2996 | |||
| 2997 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) { | ||
| 2998 | return simd_make_double3(__tg_cos(simd_make_double4(x))); | ||
| 2999 | } | ||
| 3000 | |||
| 3001 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3002 | extern simd_double4 _simd_cos_d4(simd_double4 x); | ||
| 3003 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 3004 | return _simd_cos_d4(x); | ||
| 3005 | } | ||
| 3006 | #else | ||
| 3007 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 3008 | return simd_make_double4(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 3009 | } | ||
| 3010 | #endif | ||
| 3011 | |||
| 3012 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3013 | extern simd_double8 _simd_cos_d8(simd_double8 x); | ||
| 3014 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 3015 | return _simd_cos_d8(x); | ||
| 3016 | } | ||
| 3017 | #else | ||
| 3018 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 3019 | return simd_make_double8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 3020 | } | ||
| 3021 | #endif | ||
| 3022 | |||
| 3023 | |||
| 3024 | #pragma mark - acos implementation | ||
| 3025 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x) { | ||
| 3026 | return simd_make_float2(__tg_acos(simd_make_float4(x))); | ||
| 3027 | } | ||
| 3028 | |||
| 3029 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x) { | ||
| 3030 | return simd_make_float3(__tg_acos(simd_make_float4(x))); | ||
| 3031 | } | ||
| 3032 | |||
| 3033 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3034 | extern simd_float4 _simd_acos_f4(simd_float4 x); | ||
| 3035 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 3036 | return _simd_acos_f4(x); | ||
| 3037 | } | ||
| 3038 | #else | ||
| 3039 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 3040 | return simd_make_float4(acos(x.x), acos(x.y), acos(x.z), acos(x.w)); | ||
| 3041 | } | ||
| 3042 | #endif | ||
| 3043 | |||
| 3044 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3045 | extern simd_float8 _simd_acos_f8(simd_float8 x); | ||
| 3046 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 3047 | return _simd_acos_f8(x); | ||
| 3048 | } | ||
| 3049 | #else | ||
| 3050 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 3051 | return simd_make_float8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3052 | } | ||
| 3053 | #endif | ||
| 3054 | |||
| 3055 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3056 | extern simd_float16 _simd_acos_f16(simd_float16 x); | ||
| 3057 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 3058 | return _simd_acos_f16(x); | ||
| 3059 | } | ||
| 3060 | #else | ||
| 3061 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 3062 | return simd_make_float16(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3063 | } | ||
| 3064 | #endif | ||
| 3065 | |||
| 3066 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3067 | extern simd_double2 _simd_acos_d2(simd_double2 x); | ||
| 3068 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 3069 | return _simd_acos_d2(x); | ||
| 3070 | } | ||
| 3071 | #else | ||
| 3072 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 3073 | return simd_make_double2(acos(x.x), acos(x.y)); | ||
| 3074 | } | ||
| 3075 | #endif | ||
| 3076 | |||
| 3077 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) { | ||
| 3078 | return simd_make_double3(__tg_acos(simd_make_double4(x))); | ||
| 3079 | } | ||
| 3080 | |||
| 3081 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3082 | extern simd_double4 _simd_acos_d4(simd_double4 x); | ||
| 3083 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 3084 | return _simd_acos_d4(x); | ||
| 3085 | } | ||
| 3086 | #else | ||
| 3087 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 3088 | return simd_make_double4(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3089 | } | ||
| 3090 | #endif | ||
| 3091 | |||
| 3092 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3093 | extern simd_double8 _simd_acos_d8(simd_double8 x); | ||
| 3094 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 3095 | return _simd_acos_d8(x); | ||
| 3096 | } | ||
| 3097 | #else | ||
| 3098 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 3099 | return simd_make_double8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3100 | } | ||
| 3101 | #endif | ||
| 3102 | |||
| 3103 | #pragma mark - asin implementation | ||
| 3104 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x) { | ||
| 3105 | return simd_make_float2(__tg_asin(simd_make_float4(x))); | ||
| 3106 | } | ||
| 3107 | |||
| 3108 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x) { | ||
| 3109 | return simd_make_float3(__tg_asin(simd_make_float4(x))); | ||
| 3110 | } | ||
| 3111 | |||
| 3112 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3113 | extern simd_float4 _simd_asin_f4(simd_float4 x); | ||
| 3114 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 3115 | return _simd_asin_f4(x); | ||
| 3116 | } | ||
| 3117 | #else | ||
| 3118 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 3119 | return simd_make_float4(asin(x.x), asin(x.y), asin(x.z), asin(x.w)); | ||
| 3120 | } | ||
| 3121 | #endif | ||
| 3122 | |||
| 3123 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3124 | extern simd_float8 _simd_asin_f8(simd_float8 x); | ||
| 3125 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 3126 | return _simd_asin_f8(x); | ||
| 3127 | } | ||
| 3128 | #else | ||
| 3129 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 3130 | return simd_make_float8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3131 | } | ||
| 3132 | #endif | ||
| 3133 | |||
| 3134 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3135 | extern simd_float16 _simd_asin_f16(simd_float16 x); | ||
| 3136 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 3137 | return _simd_asin_f16(x); | ||
| 3138 | } | ||
| 3139 | #else | ||
| 3140 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 3141 | return simd_make_float16(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3142 | } | ||
| 3143 | #endif | ||
| 3144 | |||
| 3145 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3146 | extern simd_double2 _simd_asin_d2(simd_double2 x); | ||
| 3147 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 3148 | return _simd_asin_d2(x); | ||
| 3149 | } | ||
| 3150 | #else | ||
| 3151 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 3152 | return simd_make_double2(asin(x.x), asin(x.y)); | ||
| 3153 | } | ||
| 3154 | #endif | ||
| 3155 | |||
| 3156 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) { | ||
| 3157 | return simd_make_double3(__tg_asin(simd_make_double4(x))); | ||
| 3158 | } | ||
| 3159 | |||
| 3160 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3161 | extern simd_double4 _simd_asin_d4(simd_double4 x); | ||
| 3162 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 3163 | return _simd_asin_d4(x); | ||
| 3164 | } | ||
| 3165 | #else | ||
| 3166 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 3167 | return simd_make_double4(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3168 | } | ||
| 3169 | #endif | ||
| 3170 | |||
| 3171 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3172 | extern simd_double8 _simd_asin_d8(simd_double8 x); | ||
| 3173 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 3174 | return _simd_asin_d8(x); | ||
| 3175 | } | ||
| 3176 | #else | ||
| 3177 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 3178 | return simd_make_double8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3179 | } | ||
| 3180 | #endif | ||
| 3181 | |||
| 3182 | #pragma mark - atan implementation | ||
| 3183 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x) { | ||
| 3184 | return simd_make_float2(__tg_atan(simd_make_float4(x))); | ||
| 3185 | } | ||
| 3186 | |||
| 3187 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x) { | ||
| 3188 | return simd_make_float3(__tg_atan(simd_make_float4(x))); | ||
| 3189 | } | ||
| 3190 | |||
| 3191 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3192 | extern simd_float4 _simd_atan_f4(simd_float4 x); | ||
| 3193 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 3194 | return _simd_atan_f4(x); | ||
| 3195 | } | ||
| 3196 | #else | ||
| 3197 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 3198 | return simd_make_float4(atan(x.x), atan(x.y), atan(x.z), atan(x.w)); | ||
| 3199 | } | ||
| 3200 | #endif | ||
| 3201 | |||
| 3202 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3203 | extern simd_float8 _simd_atan_f8(simd_float8 x); | ||
| 3204 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 3205 | return _simd_atan_f8(x); | ||
| 3206 | } | ||
| 3207 | #else | ||
| 3208 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 3209 | return simd_make_float8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3210 | } | ||
| 3211 | #endif | ||
| 3212 | |||
| 3213 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3214 | extern simd_float16 _simd_atan_f16(simd_float16 x); | ||
| 3215 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 3216 | return _simd_atan_f16(x); | ||
| 3217 | } | ||
| 3218 | #else | ||
| 3219 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 3220 | return simd_make_float16(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3221 | } | ||
| 3222 | #endif | ||
| 3223 | |||
| 3224 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3225 | extern simd_double2 _simd_atan_d2(simd_double2 x); | ||
| 3226 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 3227 | return _simd_atan_d2(x); | ||
| 3228 | } | ||
| 3229 | #else | ||
| 3230 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 3231 | return simd_make_double2(atan(x.x), atan(x.y)); | ||
| 3232 | } | ||
| 3233 | #endif | ||
| 3234 | |||
| 3235 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) { | ||
| 3236 | return simd_make_double3(__tg_atan(simd_make_double4(x))); | ||
| 3237 | } | ||
| 3238 | |||
| 3239 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3240 | extern simd_double4 _simd_atan_d4(simd_double4 x); | ||
| 3241 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 3242 | return _simd_atan_d4(x); | ||
| 3243 | } | ||
| 3244 | #else | ||
| 3245 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 3246 | return simd_make_double4(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3247 | } | ||
| 3248 | #endif | ||
| 3249 | |||
| 3250 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3251 | extern simd_double8 _simd_atan_d8(simd_double8 x); | ||
| 3252 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 3253 | return _simd_atan_d8(x); | ||
| 3254 | } | ||
| 3255 | #else | ||
| 3256 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 3257 | return simd_make_double8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3258 | } | ||
| 3259 | #endif | ||
| 3260 | |||
| 3261 | #pragma mark - tan implementation | ||
| 3262 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x) { | ||
| 3263 | return simd_make_float2(__tg_tan(simd_make_float4(x))); | ||
| 3264 | } | ||
| 3265 | |||
| 3266 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x) { | ||
| 3267 | return simd_make_float3(__tg_tan(simd_make_float4(x))); | ||
| 3268 | } | ||
| 3269 | |||
| 3270 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3271 | extern simd_float4 _simd_tan_f4(simd_float4 x); | ||
| 3272 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 3273 | return _simd_tan_f4(x); | ||
| 3274 | } | ||
| 3275 | #else | ||
| 3276 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 3277 | return simd_make_float4(tan(x.x), tan(x.y), tan(x.z), tan(x.w)); | ||
| 3278 | } | ||
| 3279 | #endif | ||
| 3280 | |||
| 3281 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3282 | extern simd_float8 _simd_tan_f8(simd_float8 x); | ||
| 3283 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 3284 | return _simd_tan_f8(x); | ||
| 3285 | } | ||
| 3286 | #else | ||
| 3287 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 3288 | return simd_make_float8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3289 | } | ||
| 3290 | #endif | ||
| 3291 | |||
| 3292 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3293 | extern simd_float16 _simd_tan_f16(simd_float16 x); | ||
| 3294 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 3295 | return _simd_tan_f16(x); | ||
| 3296 | } | ||
| 3297 | #else | ||
| 3298 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 3299 | return simd_make_float16(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3300 | } | ||
| 3301 | #endif | ||
| 3302 | |||
| 3303 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3304 | extern simd_double2 _simd_tan_d2(simd_double2 x); | ||
| 3305 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 3306 | return _simd_tan_d2(x); | ||
| 3307 | } | ||
| 3308 | #else | ||
| 3309 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 3310 | return simd_make_double2(tan(x.x), tan(x.y)); | ||
| 3311 | } | ||
| 3312 | #endif | ||
| 3313 | |||
| 3314 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) { | ||
| 3315 | return simd_make_double3(__tg_tan(simd_make_double4(x))); | ||
| 3316 | } | ||
| 3317 | |||
| 3318 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3319 | extern simd_double4 _simd_tan_d4(simd_double4 x); | ||
| 3320 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 3321 | return _simd_tan_d4(x); | ||
| 3322 | } | ||
| 3323 | #else | ||
| 3324 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 3325 | return simd_make_double4(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3326 | } | ||
| 3327 | #endif | ||
| 3328 | |||
| 3329 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3330 | extern simd_double8 _simd_tan_d8(simd_double8 x); | ||
| 3331 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3332 | return _simd_tan_d8(x); | ||
| 3333 | } | ||
| 3334 | #else | ||
| 3335 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3336 | return simd_make_double8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3337 | } | ||
| 3338 | #endif | ||
| 3339 | |||
| 3340 | #pragma mark - cospi implementation | ||
| 3341 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3342 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x) { | ||
| 3343 | return simd_make_float2(__tg_cospi(simd_make_float4(x))); | ||
| 3344 | } | ||
| 3345 | |||
| 3346 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x) { | ||
| 3347 | return simd_make_float3(__tg_cospi(simd_make_float4(x))); | ||
| 3348 | } | ||
| 3349 | |||
| 3350 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3351 | extern simd_float4 _simd_cospi_f4(simd_float4 x); | ||
| 3352 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3353 | return _simd_cospi_f4(x); | ||
| 3354 | } | ||
| 3355 | #else | ||
| 3356 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3357 | return simd_make_float4(__cospi(x.x), __cospi(x.y), __cospi(x.z), __cospi(x.w)); | ||
| 3358 | } | ||
| 3359 | #endif | ||
| 3360 | |||
| 3361 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3362 | extern simd_float8 _simd_cospi_f8(simd_float8 x); | ||
| 3363 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3364 | return _simd_cospi_f8(x); | ||
| 3365 | } | ||
| 3366 | #else | ||
| 3367 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3368 | return simd_make_float8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3369 | } | ||
| 3370 | #endif | ||
| 3371 | |||
| 3372 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3373 | extern simd_float16 _simd_cospi_f16(simd_float16 x); | ||
| 3374 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3375 | return _simd_cospi_f16(x); | ||
| 3376 | } | ||
| 3377 | #else | ||
| 3378 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3379 | return simd_make_float16(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3380 | } | ||
| 3381 | #endif | ||
| 3382 | |||
| 3383 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3384 | extern simd_double2 _simd_cospi_d2(simd_double2 x); | ||
| 3385 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3386 | return _simd_cospi_d2(x); | ||
| 3387 | } | ||
| 3388 | #else | ||
| 3389 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3390 | return simd_make_double2(__cospi(x.x), __cospi(x.y)); | ||
| 3391 | } | ||
| 3392 | #endif | ||
| 3393 | |||
| 3394 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) { | ||
| 3395 | return simd_make_double3(__tg_cospi(simd_make_double4(x))); | ||
| 3396 | } | ||
| 3397 | |||
| 3398 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3399 | extern simd_double4 _simd_cospi_d4(simd_double4 x); | ||
| 3400 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3401 | return _simd_cospi_d4(x); | ||
| 3402 | } | ||
| 3403 | #else | ||
| 3404 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3405 | return simd_make_double4(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3406 | } | ||
| 3407 | #endif | ||
| 3408 | |||
| 3409 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3410 | extern simd_double8 _simd_cospi_d8(simd_double8 x); | ||
| 3411 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3412 | return _simd_cospi_d8(x); | ||
| 3413 | } | ||
| 3414 | #else | ||
| 3415 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3416 | return simd_make_double8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3417 | } | ||
| 3418 | #endif | ||
| 3419 | |||
| 3420 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3421 | #pragma mark - sinpi implementation | ||
| 3422 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3423 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x) { | ||
| 3424 | return simd_make_float2(__tg_sinpi(simd_make_float4(x))); | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x) { | ||
| 3428 | return simd_make_float3(__tg_sinpi(simd_make_float4(x))); | ||
| 3429 | } | ||
| 3430 | |||
| 3431 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3432 | extern simd_float4 _simd_sinpi_f4(simd_float4 x); | ||
| 3433 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3434 | return _simd_sinpi_f4(x); | ||
| 3435 | } | ||
| 3436 | #else | ||
| 3437 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3438 | return simd_make_float4(__sinpi(x.x), __sinpi(x.y), __sinpi(x.z), __sinpi(x.w)); | ||
| 3439 | } | ||
| 3440 | #endif | ||
| 3441 | |||
| 3442 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3443 | extern simd_float8 _simd_sinpi_f8(simd_float8 x); | ||
| 3444 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3445 | return _simd_sinpi_f8(x); | ||
| 3446 | } | ||
| 3447 | #else | ||
| 3448 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3449 | return simd_make_float8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3450 | } | ||
| 3451 | #endif | ||
| 3452 | |||
| 3453 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3454 | extern simd_float16 _simd_sinpi_f16(simd_float16 x); | ||
| 3455 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3456 | return _simd_sinpi_f16(x); | ||
| 3457 | } | ||
| 3458 | #else | ||
| 3459 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3460 | return simd_make_float16(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3461 | } | ||
| 3462 | #endif | ||
| 3463 | |||
| 3464 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3465 | extern simd_double2 _simd_sinpi_d2(simd_double2 x); | ||
| 3466 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3467 | return _simd_sinpi_d2(x); | ||
| 3468 | } | ||
| 3469 | #else | ||
| 3470 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3471 | return simd_make_double2(__sinpi(x.x), __sinpi(x.y)); | ||
| 3472 | } | ||
| 3473 | #endif | ||
| 3474 | |||
| 3475 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) { | ||
| 3476 | return simd_make_double3(__tg_sinpi(simd_make_double4(x))); | ||
| 3477 | } | ||
| 3478 | |||
| 3479 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3480 | extern simd_double4 _simd_sinpi_d4(simd_double4 x); | ||
| 3481 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3482 | return _simd_sinpi_d4(x); | ||
| 3483 | } | ||
| 3484 | #else | ||
| 3485 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3486 | return simd_make_double4(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3487 | } | ||
| 3488 | #endif | ||
| 3489 | |||
| 3490 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3491 | extern simd_double8 _simd_sinpi_d8(simd_double8 x); | ||
| 3492 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3493 | return _simd_sinpi_d8(x); | ||
| 3494 | } | ||
| 3495 | #else | ||
| 3496 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3497 | return simd_make_double8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3498 | } | ||
| 3499 | #endif | ||
| 3500 | |||
| 3501 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3502 | #pragma mark - tanpi implementation | ||
| 3503 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3504 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x) { | ||
| 3505 | return simd_make_float2(__tg_tanpi(simd_make_float4(x))); | ||
| 3506 | } | ||
| 3507 | |||
| 3508 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x) { | ||
| 3509 | return simd_make_float3(__tg_tanpi(simd_make_float4(x))); | ||
| 3510 | } | ||
| 3511 | |||
| 3512 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3513 | extern simd_float4 _simd_tanpi_f4(simd_float4 x); | ||
| 3514 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3515 | return _simd_tanpi_f4(x); | ||
| 3516 | } | ||
| 3517 | #else | ||
| 3518 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3519 | return simd_make_float4(__tanpi(x.x), __tanpi(x.y), __tanpi(x.z), __tanpi(x.w)); | ||
| 3520 | } | ||
| 3521 | #endif | ||
| 3522 | |||
| 3523 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3524 | extern simd_float8 _simd_tanpi_f8(simd_float8 x); | ||
| 3525 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3526 | return _simd_tanpi_f8(x); | ||
| 3527 | } | ||
| 3528 | #else | ||
| 3529 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3530 | return simd_make_float8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3531 | } | ||
| 3532 | #endif | ||
| 3533 | |||
| 3534 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3535 | extern simd_float16 _simd_tanpi_f16(simd_float16 x); | ||
| 3536 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3537 | return _simd_tanpi_f16(x); | ||
| 3538 | } | ||
| 3539 | #else | ||
| 3540 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3541 | return simd_make_float16(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3542 | } | ||
| 3543 | #endif | ||
| 3544 | |||
| 3545 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3546 | extern simd_double2 _simd_tanpi_d2(simd_double2 x); | ||
| 3547 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3548 | return _simd_tanpi_d2(x); | ||
| 3549 | } | ||
| 3550 | #else | ||
| 3551 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3552 | return simd_make_double2(__tanpi(x.x), __tanpi(x.y)); | ||
| 3553 | } | ||
| 3554 | #endif | ||
| 3555 | |||
| 3556 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) { | ||
| 3557 | return simd_make_double3(__tg_tanpi(simd_make_double4(x))); | ||
| 3558 | } | ||
| 3559 | |||
| 3560 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3561 | extern simd_double4 _simd_tanpi_d4(simd_double4 x); | ||
| 3562 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3563 | return _simd_tanpi_d4(x); | ||
| 3564 | } | ||
| 3565 | #else | ||
| 3566 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3567 | return simd_make_double4(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3568 | } | ||
| 3569 | #endif | ||
| 3570 | |||
| 3571 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3572 | extern simd_double8 _simd_tanpi_d8(simd_double8 x); | ||
| 3573 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3574 | return _simd_tanpi_d8(x); | ||
| 3575 | } | ||
| 3576 | #else | ||
| 3577 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3578 | return simd_make_double8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3579 | } | ||
| 3580 | #endif | ||
| 3581 | |||
| 3582 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3583 | #pragma mark - acosh implementation | ||
| 3584 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x) { | ||
| 3585 | return simd_make_float2(__tg_acosh(simd_make_float4(x))); | ||
| 3586 | } | ||
| 3587 | |||
| 3588 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x) { | ||
| 3589 | return simd_make_float3(__tg_acosh(simd_make_float4(x))); | ||
| 3590 | } | ||
| 3591 | |||
| 3592 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3593 | extern simd_float4 _simd_acosh_f4(simd_float4 x); | ||
| 3594 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3595 | return _simd_acosh_f4(x); | ||
| 3596 | } | ||
| 3597 | #else | ||
| 3598 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3599 | return simd_make_float4(acosh(x.x), acosh(x.y), acosh(x.z), acosh(x.w)); | ||
| 3600 | } | ||
| 3601 | #endif | ||
| 3602 | |||
| 3603 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3604 | extern simd_float8 _simd_acosh_f8(simd_float8 x); | ||
| 3605 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3606 | return _simd_acosh_f8(x); | ||
| 3607 | } | ||
| 3608 | #else | ||
| 3609 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3610 | return simd_make_float8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3611 | } | ||
| 3612 | #endif | ||
| 3613 | |||
| 3614 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3615 | extern simd_float16 _simd_acosh_f16(simd_float16 x); | ||
| 3616 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3617 | return _simd_acosh_f16(x); | ||
| 3618 | } | ||
| 3619 | #else | ||
| 3620 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3621 | return simd_make_float16(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3622 | } | ||
| 3623 | #endif | ||
| 3624 | |||
| 3625 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3626 | extern simd_double2 _simd_acosh_d2(simd_double2 x); | ||
| 3627 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3628 | return _simd_acosh_d2(x); | ||
| 3629 | } | ||
| 3630 | #else | ||
| 3631 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3632 | return simd_make_double2(acosh(x.x), acosh(x.y)); | ||
| 3633 | } | ||
| 3634 | #endif | ||
| 3635 | |||
| 3636 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) { | ||
| 3637 | return simd_make_double3(__tg_acosh(simd_make_double4(x))); | ||
| 3638 | } | ||
| 3639 | |||
| 3640 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3641 | extern simd_double4 _simd_acosh_d4(simd_double4 x); | ||
| 3642 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3643 | return _simd_acosh_d4(x); | ||
| 3644 | } | ||
| 3645 | #else | ||
| 3646 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3647 | return simd_make_double4(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3648 | } | ||
| 3649 | #endif | ||
| 3650 | |||
| 3651 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3652 | extern simd_double8 _simd_acosh_d8(simd_double8 x); | ||
| 3653 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3654 | return _simd_acosh_d8(x); | ||
| 3655 | } | ||
| 3656 | #else | ||
| 3657 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3658 | return simd_make_double8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3659 | } | ||
| 3660 | #endif | ||
| 3661 | |||
| 3662 | #pragma mark - asinh implementation | ||
| 3663 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x) { | ||
| 3664 | return simd_make_float2(__tg_asinh(simd_make_float4(x))); | ||
| 3665 | } | ||
| 3666 | |||
| 3667 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x) { | ||
| 3668 | return simd_make_float3(__tg_asinh(simd_make_float4(x))); | ||
| 3669 | } | ||
| 3670 | |||
| 3671 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3672 | extern simd_float4 _simd_asinh_f4(simd_float4 x); | ||
| 3673 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3674 | return _simd_asinh_f4(x); | ||
| 3675 | } | ||
| 3676 | #else | ||
| 3677 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3678 | return simd_make_float4(asinh(x.x), asinh(x.y), asinh(x.z), asinh(x.w)); | ||
| 3679 | } | ||
| 3680 | #endif | ||
| 3681 | |||
| 3682 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3683 | extern simd_float8 _simd_asinh_f8(simd_float8 x); | ||
| 3684 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3685 | return _simd_asinh_f8(x); | ||
| 3686 | } | ||
| 3687 | #else | ||
| 3688 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3689 | return simd_make_float8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3690 | } | ||
| 3691 | #endif | ||
| 3692 | |||
| 3693 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3694 | extern simd_float16 _simd_asinh_f16(simd_float16 x); | ||
| 3695 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3696 | return _simd_asinh_f16(x); | ||
| 3697 | } | ||
| 3698 | #else | ||
| 3699 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3700 | return simd_make_float16(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3701 | } | ||
| 3702 | #endif | ||
| 3703 | |||
| 3704 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3705 | extern simd_double2 _simd_asinh_d2(simd_double2 x); | ||
| 3706 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3707 | return _simd_asinh_d2(x); | ||
| 3708 | } | ||
| 3709 | #else | ||
| 3710 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3711 | return simd_make_double2(asinh(x.x), asinh(x.y)); | ||
| 3712 | } | ||
| 3713 | #endif | ||
| 3714 | |||
| 3715 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) { | ||
| 3716 | return simd_make_double3(__tg_asinh(simd_make_double4(x))); | ||
| 3717 | } | ||
| 3718 | |||
| 3719 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3720 | extern simd_double4 _simd_asinh_d4(simd_double4 x); | ||
| 3721 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3722 | return _simd_asinh_d4(x); | ||
| 3723 | } | ||
| 3724 | #else | ||
| 3725 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3726 | return simd_make_double4(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3727 | } | ||
| 3728 | #endif | ||
| 3729 | |||
| 3730 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3731 | extern simd_double8 _simd_asinh_d8(simd_double8 x); | ||
| 3732 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3733 | return _simd_asinh_d8(x); | ||
| 3734 | } | ||
| 3735 | #else | ||
| 3736 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3737 | return simd_make_double8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3738 | } | ||
| 3739 | #endif | ||
| 3740 | |||
| 3741 | #pragma mark - atanh implementation | ||
| 3742 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x) { | ||
| 3743 | return simd_make_float2(__tg_atanh(simd_make_float4(x))); | ||
| 3744 | } | ||
| 3745 | |||
| 3746 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x) { | ||
| 3747 | return simd_make_float3(__tg_atanh(simd_make_float4(x))); | ||
| 3748 | } | ||
| 3749 | |||
| 3750 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3751 | extern simd_float4 _simd_atanh_f4(simd_float4 x); | ||
| 3752 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3753 | return _simd_atanh_f4(x); | ||
| 3754 | } | ||
| 3755 | #else | ||
| 3756 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3757 | return simd_make_float4(atanh(x.x), atanh(x.y), atanh(x.z), atanh(x.w)); | ||
| 3758 | } | ||
| 3759 | #endif | ||
| 3760 | |||
| 3761 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3762 | extern simd_float8 _simd_atanh_f8(simd_float8 x); | ||
| 3763 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3764 | return _simd_atanh_f8(x); | ||
| 3765 | } | ||
| 3766 | #else | ||
| 3767 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3768 | return simd_make_float8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3769 | } | ||
| 3770 | #endif | ||
| 3771 | |||
| 3772 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3773 | extern simd_float16 _simd_atanh_f16(simd_float16 x); | ||
| 3774 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3775 | return _simd_atanh_f16(x); | ||
| 3776 | } | ||
| 3777 | #else | ||
| 3778 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3779 | return simd_make_float16(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3780 | } | ||
| 3781 | #endif | ||
| 3782 | |||
| 3783 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3784 | extern simd_double2 _simd_atanh_d2(simd_double2 x); | ||
| 3785 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3786 | return _simd_atanh_d2(x); | ||
| 3787 | } | ||
| 3788 | #else | ||
| 3789 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3790 | return simd_make_double2(atanh(x.x), atanh(x.y)); | ||
| 3791 | } | ||
| 3792 | #endif | ||
| 3793 | |||
| 3794 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) { | ||
| 3795 | return simd_make_double3(__tg_atanh(simd_make_double4(x))); | ||
| 3796 | } | ||
| 3797 | |||
| 3798 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3799 | extern simd_double4 _simd_atanh_d4(simd_double4 x); | ||
| 3800 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3801 | return _simd_atanh_d4(x); | ||
| 3802 | } | ||
| 3803 | #else | ||
| 3804 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3805 | return simd_make_double4(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3806 | } | ||
| 3807 | #endif | ||
| 3808 | |||
| 3809 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3810 | extern simd_double8 _simd_atanh_d8(simd_double8 x); | ||
| 3811 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3812 | return _simd_atanh_d8(x); | ||
| 3813 | } | ||
| 3814 | #else | ||
| 3815 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3816 | return simd_make_double8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3817 | } | ||
| 3818 | #endif | ||
| 3819 | |||
| 3820 | #pragma mark - cosh implementation | ||
| 3821 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x) { | ||
| 3822 | return simd_make_float2(__tg_cosh(simd_make_float4(x))); | ||
| 3823 | } | ||
| 3824 | |||
| 3825 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x) { | ||
| 3826 | return simd_make_float3(__tg_cosh(simd_make_float4(x))); | ||
| 3827 | } | ||
| 3828 | |||
| 3829 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3830 | extern simd_float4 _simd_cosh_f4(simd_float4 x); | ||
| 3831 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3832 | return _simd_cosh_f4(x); | ||
| 3833 | } | ||
| 3834 | #else | ||
| 3835 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3836 | return simd_make_float4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w)); | ||
| 3837 | } | ||
| 3838 | #endif | ||
| 3839 | |||
| 3840 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3841 | extern simd_float8 _simd_cosh_f8(simd_float8 x); | ||
| 3842 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3843 | return _simd_cosh_f8(x); | ||
| 3844 | } | ||
| 3845 | #else | ||
| 3846 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3847 | return simd_make_float8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3848 | } | ||
| 3849 | #endif | ||
| 3850 | |||
| 3851 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3852 | extern simd_float16 _simd_cosh_f16(simd_float16 x); | ||
| 3853 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3854 | return _simd_cosh_f16(x); | ||
| 3855 | } | ||
| 3856 | #else | ||
| 3857 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3858 | return simd_make_float16(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3859 | } | ||
| 3860 | #endif | ||
| 3861 | |||
| 3862 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3863 | extern simd_double2 _simd_cosh_d2(simd_double2 x); | ||
| 3864 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3865 | return _simd_cosh_d2(x); | ||
| 3866 | } | ||
| 3867 | #else | ||
| 3868 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3869 | return simd_make_double2(cosh(x.x), cosh(x.y)); | ||
| 3870 | } | ||
| 3871 | #endif | ||
| 3872 | |||
| 3873 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) { | ||
| 3874 | return simd_make_double3(__tg_cosh(simd_make_double4(x))); | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3878 | extern simd_double4 _simd_cosh_d4(simd_double4 x); | ||
| 3879 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3880 | return _simd_cosh_d4(x); | ||
| 3881 | } | ||
| 3882 | #else | ||
| 3883 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3884 | return simd_make_double4(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3885 | } | ||
| 3886 | #endif | ||
| 3887 | |||
| 3888 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3889 | extern simd_double8 _simd_cosh_d8(simd_double8 x); | ||
| 3890 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3891 | return _simd_cosh_d8(x); | ||
| 3892 | } | ||
| 3893 | #else | ||
| 3894 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3895 | return simd_make_double8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3896 | } | ||
| 3897 | #endif | ||
| 3898 | |||
| 3899 | #pragma mark - sinh implementation | ||
| 3900 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x) { | ||
| 3901 | return simd_make_float2(__tg_sinh(simd_make_float4(x))); | ||
| 3902 | } | ||
| 3903 | |||
| 3904 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x) { | ||
| 3905 | return simd_make_float3(__tg_sinh(simd_make_float4(x))); | ||
| 3906 | } | ||
| 3907 | |||
| 3908 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3909 | extern simd_float4 _simd_sinh_f4(simd_float4 x); | ||
| 3910 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3911 | return _simd_sinh_f4(x); | ||
| 3912 | } | ||
| 3913 | #else | ||
| 3914 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3915 | return simd_make_float4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w)); | ||
| 3916 | } | ||
| 3917 | #endif | ||
| 3918 | |||
| 3919 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3920 | extern simd_float8 _simd_sinh_f8(simd_float8 x); | ||
| 3921 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3922 | return _simd_sinh_f8(x); | ||
| 3923 | } | ||
| 3924 | #else | ||
| 3925 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3926 | return simd_make_float8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3927 | } | ||
| 3928 | #endif | ||
| 3929 | |||
| 3930 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3931 | extern simd_float16 _simd_sinh_f16(simd_float16 x); | ||
| 3932 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3933 | return _simd_sinh_f16(x); | ||
| 3934 | } | ||
| 3935 | #else | ||
| 3936 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3937 | return simd_make_float16(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3938 | } | ||
| 3939 | #endif | ||
| 3940 | |||
| 3941 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3942 | extern simd_double2 _simd_sinh_d2(simd_double2 x); | ||
| 3943 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3944 | return _simd_sinh_d2(x); | ||
| 3945 | } | ||
| 3946 | #else | ||
| 3947 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3948 | return simd_make_double2(sinh(x.x), sinh(x.y)); | ||
| 3949 | } | ||
| 3950 | #endif | ||
| 3951 | |||
| 3952 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) { | ||
| 3953 | return simd_make_double3(__tg_sinh(simd_make_double4(x))); | ||
| 3954 | } | ||
| 3955 | |||
| 3956 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3957 | extern simd_double4 _simd_sinh_d4(simd_double4 x); | ||
| 3958 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3959 | return _simd_sinh_d4(x); | ||
| 3960 | } | ||
| 3961 | #else | ||
| 3962 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3963 | return simd_make_double4(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3964 | } | ||
| 3965 | #endif | ||
| 3966 | |||
| 3967 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3968 | extern simd_double8 _simd_sinh_d8(simd_double8 x); | ||
| 3969 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3970 | return _simd_sinh_d8(x); | ||
| 3971 | } | ||
| 3972 | #else | ||
| 3973 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3974 | return simd_make_double8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3975 | } | ||
| 3976 | #endif | ||
| 3977 | |||
| 3978 | #pragma mark - tanh implementation | ||
| 3979 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x) { | ||
| 3980 | return simd_make_float2(__tg_tanh(simd_make_float4(x))); | ||
| 3981 | } | ||
| 3982 | |||
| 3983 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x) { | ||
| 3984 | return simd_make_float3(__tg_tanh(simd_make_float4(x))); | ||
| 3985 | } | ||
| 3986 | |||
| 3987 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3988 | extern simd_float4 _simd_tanh_f4(simd_float4 x); | ||
| 3989 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3990 | return _simd_tanh_f4(x); | ||
| 3991 | } | ||
| 3992 | #else | ||
| 3993 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3994 | return simd_make_float4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w)); | ||
| 3995 | } | ||
| 3996 | #endif | ||
| 3997 | |||
| 3998 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3999 | extern simd_float8 _simd_tanh_f8(simd_float8 x); | ||
| 4000 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 4001 | return _simd_tanh_f8(x); | ||
| 4002 | } | ||
| 4003 | #else | ||
| 4004 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 4005 | return simd_make_float8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4006 | } | ||
| 4007 | #endif | ||
| 4008 | |||
| 4009 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4010 | extern simd_float16 _simd_tanh_f16(simd_float16 x); | ||
| 4011 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 4012 | return _simd_tanh_f16(x); | ||
| 4013 | } | ||
| 4014 | #else | ||
| 4015 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 4016 | return simd_make_float16(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4017 | } | ||
| 4018 | #endif | ||
| 4019 | |||
| 4020 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4021 | extern simd_double2 _simd_tanh_d2(simd_double2 x); | ||
| 4022 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 4023 | return _simd_tanh_d2(x); | ||
| 4024 | } | ||
| 4025 | #else | ||
| 4026 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 4027 | return simd_make_double2(tanh(x.x), tanh(x.y)); | ||
| 4028 | } | ||
| 4029 | #endif | ||
| 4030 | |||
| 4031 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) { | ||
| 4032 | return simd_make_double3(__tg_tanh(simd_make_double4(x))); | ||
| 4033 | } | ||
| 4034 | |||
| 4035 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4036 | extern simd_double4 _simd_tanh_d4(simd_double4 x); | ||
| 4037 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 4038 | return _simd_tanh_d4(x); | ||
| 4039 | } | ||
| 4040 | #else | ||
| 4041 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 4042 | return simd_make_double4(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4043 | } | ||
| 4044 | #endif | ||
| 4045 | |||
| 4046 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4047 | extern simd_double8 _simd_tanh_d8(simd_double8 x); | ||
| 4048 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 4049 | return _simd_tanh_d8(x); | ||
| 4050 | } | ||
| 4051 | #else | ||
| 4052 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 4053 | return simd_make_double8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4054 | } | ||
| 4055 | #endif | ||
| 4056 | |||
| 4057 | #pragma mark - exp implementation | ||
| 4058 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x) { | ||
| 4059 | return simd_make_float2(__tg_exp(simd_make_float4(x))); | ||
| 4060 | } | ||
| 4061 | |||
| 4062 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x) { | ||
| 4063 | return simd_make_float3(__tg_exp(simd_make_float4(x))); | ||
| 4064 | } | ||
| 4065 | |||
| 4066 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4067 | extern simd_float4 _simd_exp_f4(simd_float4 x); | ||
| 4068 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 4069 | return _simd_exp_f4(x); | ||
| 4070 | } | ||
| 4071 | #else | ||
| 4072 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 4073 | return simd_make_float4(exp(x.x), exp(x.y), exp(x.z), exp(x.w)); | ||
| 4074 | } | ||
| 4075 | #endif | ||
| 4076 | |||
| 4077 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4078 | extern simd_float8 _simd_exp_f8(simd_float8 x); | ||
| 4079 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 4080 | return _simd_exp_f8(x); | ||
| 4081 | } | ||
| 4082 | #else | ||
| 4083 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 4084 | return simd_make_float8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4085 | } | ||
| 4086 | #endif | ||
| 4087 | |||
| 4088 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4089 | extern simd_float16 _simd_exp_f16(simd_float16 x); | ||
| 4090 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 4091 | return _simd_exp_f16(x); | ||
| 4092 | } | ||
| 4093 | #else | ||
| 4094 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 4095 | return simd_make_float16(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4096 | } | ||
| 4097 | #endif | ||
| 4098 | |||
| 4099 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4100 | extern simd_double2 _simd_exp_d2(simd_double2 x); | ||
| 4101 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 4102 | return _simd_exp_d2(x); | ||
| 4103 | } | ||
| 4104 | #else | ||
| 4105 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 4106 | return simd_make_double2(exp(x.x), exp(x.y)); | ||
| 4107 | } | ||
| 4108 | #endif | ||
| 4109 | |||
| 4110 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) { | ||
| 4111 | return simd_make_double3(__tg_exp(simd_make_double4(x))); | ||
| 4112 | } | ||
| 4113 | |||
| 4114 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4115 | extern simd_double4 _simd_exp_d4(simd_double4 x); | ||
| 4116 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 4117 | return _simd_exp_d4(x); | ||
| 4118 | } | ||
| 4119 | #else | ||
| 4120 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 4121 | return simd_make_double4(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4122 | } | ||
| 4123 | #endif | ||
| 4124 | |||
| 4125 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4126 | extern simd_double8 _simd_exp_d8(simd_double8 x); | ||
| 4127 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 4128 | return _simd_exp_d8(x); | ||
| 4129 | } | ||
| 4130 | #else | ||
| 4131 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 4132 | return simd_make_double8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4133 | } | ||
| 4134 | #endif | ||
| 4135 | |||
| 4136 | #pragma mark - exp2 implementation | ||
| 4137 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x) { | ||
| 4138 | return simd_make_float2(__tg_exp2(simd_make_float4(x))); | ||
| 4139 | } | ||
| 4140 | |||
| 4141 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x) { | ||
| 4142 | return simd_make_float3(__tg_exp2(simd_make_float4(x))); | ||
| 4143 | } | ||
| 4144 | |||
| 4145 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4146 | extern simd_float4 _simd_exp2_f4(simd_float4 x); | ||
| 4147 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 4148 | return _simd_exp2_f4(x); | ||
| 4149 | } | ||
| 4150 | #else | ||
| 4151 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 4152 | return simd_make_float4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w)); | ||
| 4153 | } | ||
| 4154 | #endif | ||
| 4155 | |||
| 4156 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4157 | extern simd_float8 _simd_exp2_f8(simd_float8 x); | ||
| 4158 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 4159 | return _simd_exp2_f8(x); | ||
| 4160 | } | ||
| 4161 | #else | ||
| 4162 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 4163 | return simd_make_float8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4164 | } | ||
| 4165 | #endif | ||
| 4166 | |||
| 4167 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4168 | extern simd_float16 _simd_exp2_f16(simd_float16 x); | ||
| 4169 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 4170 | return _simd_exp2_f16(x); | ||
| 4171 | } | ||
| 4172 | #else | ||
| 4173 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 4174 | return simd_make_float16(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4175 | } | ||
| 4176 | #endif | ||
| 4177 | |||
| 4178 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4179 | extern simd_double2 _simd_exp2_d2(simd_double2 x); | ||
| 4180 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 4181 | return _simd_exp2_d2(x); | ||
| 4182 | } | ||
| 4183 | #else | ||
| 4184 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 4185 | return simd_make_double2(exp2(x.x), exp2(x.y)); | ||
| 4186 | } | ||
| 4187 | #endif | ||
| 4188 | |||
| 4189 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) { | ||
| 4190 | return simd_make_double3(__tg_exp2(simd_make_double4(x))); | ||
| 4191 | } | ||
| 4192 | |||
| 4193 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4194 | extern simd_double4 _simd_exp2_d4(simd_double4 x); | ||
| 4195 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 4196 | return _simd_exp2_d4(x); | ||
| 4197 | } | ||
| 4198 | #else | ||
| 4199 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 4200 | return simd_make_double4(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4201 | } | ||
| 4202 | #endif | ||
| 4203 | |||
| 4204 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4205 | extern simd_double8 _simd_exp2_d8(simd_double8 x); | ||
| 4206 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 4207 | return _simd_exp2_d8(x); | ||
| 4208 | } | ||
| 4209 | #else | ||
| 4210 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 4211 | return simd_make_double8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4212 | } | ||
| 4213 | #endif | ||
| 4214 | |||
| 4215 | #pragma mark - exp10 implementation | ||
| 4216 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 4217 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x) { | ||
| 4218 | return simd_make_float2(__tg_exp10(simd_make_float4(x))); | ||
| 4219 | } | ||
| 4220 | |||
| 4221 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x) { | ||
| 4222 | return simd_make_float3(__tg_exp10(simd_make_float4(x))); | ||
| 4223 | } | ||
| 4224 | |||
| 4225 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4226 | extern simd_float4 _simd_exp10_f4(simd_float4 x); | ||
| 4227 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 4228 | return _simd_exp10_f4(x); | ||
| 4229 | } | ||
| 4230 | #else | ||
| 4231 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 4232 | return simd_make_float4(__exp10(x.x), __exp10(x.y), __exp10(x.z), __exp10(x.w)); | ||
| 4233 | } | ||
| 4234 | #endif | ||
| 4235 | |||
| 4236 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4237 | extern simd_float8 _simd_exp10_f8(simd_float8 x); | ||
| 4238 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 4239 | return _simd_exp10_f8(x); | ||
| 4240 | } | ||
| 4241 | #else | ||
| 4242 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 4243 | return simd_make_float8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4244 | } | ||
| 4245 | #endif | ||
| 4246 | |||
| 4247 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4248 | extern simd_float16 _simd_exp10_f16(simd_float16 x); | ||
| 4249 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 4250 | return _simd_exp10_f16(x); | ||
| 4251 | } | ||
| 4252 | #else | ||
| 4253 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 4254 | return simd_make_float16(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4255 | } | ||
| 4256 | #endif | ||
| 4257 | |||
| 4258 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4259 | extern simd_double2 _simd_exp10_d2(simd_double2 x); | ||
| 4260 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 4261 | return _simd_exp10_d2(x); | ||
| 4262 | } | ||
| 4263 | #else | ||
| 4264 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 4265 | return simd_make_double2(__exp10(x.x), __exp10(x.y)); | ||
| 4266 | } | ||
| 4267 | #endif | ||
| 4268 | |||
| 4269 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) { | ||
| 4270 | return simd_make_double3(__tg_exp10(simd_make_double4(x))); | ||
| 4271 | } | ||
| 4272 | |||
| 4273 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4274 | extern simd_double4 _simd_exp10_d4(simd_double4 x); | ||
| 4275 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 4276 | return _simd_exp10_d4(x); | ||
| 4277 | } | ||
| 4278 | #else | ||
| 4279 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 4280 | return simd_make_double4(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4281 | } | ||
| 4282 | #endif | ||
| 4283 | |||
| 4284 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4285 | extern simd_double8 _simd_exp10_d8(simd_double8 x); | ||
| 4286 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 4287 | return _simd_exp10_d8(x); | ||
| 4288 | } | ||
| 4289 | #else | ||
| 4290 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 4291 | return simd_make_double8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4292 | } | ||
| 4293 | #endif | ||
| 4294 | |||
| 4295 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 4296 | #pragma mark - expm1 implementation | ||
| 4297 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x) { | ||
| 4298 | return simd_make_float2(__tg_expm1(simd_make_float4(x))); | ||
| 4299 | } | ||
| 4300 | |||
| 4301 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x) { | ||
| 4302 | return simd_make_float3(__tg_expm1(simd_make_float4(x))); | ||
| 4303 | } | ||
| 4304 | |||
| 4305 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4306 | extern simd_float4 _simd_expm1_f4(simd_float4 x); | ||
| 4307 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 4308 | return _simd_expm1_f4(x); | ||
| 4309 | } | ||
| 4310 | #else | ||
| 4311 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 4312 | return simd_make_float4(expm1(x.x), expm1(x.y), expm1(x.z), expm1(x.w)); | ||
| 4313 | } | ||
| 4314 | #endif | ||
| 4315 | |||
| 4316 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4317 | extern simd_float8 _simd_expm1_f8(simd_float8 x); | ||
| 4318 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 4319 | return _simd_expm1_f8(x); | ||
| 4320 | } | ||
| 4321 | #else | ||
| 4322 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 4323 | return simd_make_float8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4324 | } | ||
| 4325 | #endif | ||
| 4326 | |||
| 4327 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4328 | extern simd_float16 _simd_expm1_f16(simd_float16 x); | ||
| 4329 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4330 | return _simd_expm1_f16(x); | ||
| 4331 | } | ||
| 4332 | #else | ||
| 4333 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4334 | return simd_make_float16(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4335 | } | ||
| 4336 | #endif | ||
| 4337 | |||
| 4338 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4339 | extern simd_double2 _simd_expm1_d2(simd_double2 x); | ||
| 4340 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4341 | return _simd_expm1_d2(x); | ||
| 4342 | } | ||
| 4343 | #else | ||
| 4344 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4345 | return simd_make_double2(expm1(x.x), expm1(x.y)); | ||
| 4346 | } | ||
| 4347 | #endif | ||
| 4348 | |||
| 4349 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) { | ||
| 4350 | return simd_make_double3(__tg_expm1(simd_make_double4(x))); | ||
| 4351 | } | ||
| 4352 | |||
| 4353 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4354 | extern simd_double4 _simd_expm1_d4(simd_double4 x); | ||
| 4355 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4356 | return _simd_expm1_d4(x); | ||
| 4357 | } | ||
| 4358 | #else | ||
| 4359 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4360 | return simd_make_double4(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4361 | } | ||
| 4362 | #endif | ||
| 4363 | |||
| 4364 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4365 | extern simd_double8 _simd_expm1_d8(simd_double8 x); | ||
| 4366 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4367 | return _simd_expm1_d8(x); | ||
| 4368 | } | ||
| 4369 | #else | ||
| 4370 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4371 | return simd_make_double8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4372 | } | ||
| 4373 | #endif | ||
| 4374 | |||
| 4375 | #pragma mark - log implementation | ||
| 4376 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x) { | ||
| 4377 | return simd_make_float2(__tg_log(simd_make_float4(x))); | ||
| 4378 | } | ||
| 4379 | |||
| 4380 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x) { | ||
| 4381 | return simd_make_float3(__tg_log(simd_make_float4(x))); | ||
| 4382 | } | ||
| 4383 | |||
| 4384 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4385 | extern simd_float4 _simd_log_f4(simd_float4 x); | ||
| 4386 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4387 | return _simd_log_f4(x); | ||
| 4388 | } | ||
| 4389 | #else | ||
| 4390 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4391 | return simd_make_float4(log(x.x), log(x.y), log(x.z), log(x.w)); | ||
| 4392 | } | ||
| 4393 | #endif | ||
| 4394 | |||
| 4395 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4396 | extern simd_float8 _simd_log_f8(simd_float8 x); | ||
| 4397 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4398 | return _simd_log_f8(x); | ||
| 4399 | } | ||
| 4400 | #else | ||
| 4401 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4402 | return simd_make_float8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4403 | } | ||
| 4404 | #endif | ||
| 4405 | |||
| 4406 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4407 | extern simd_float16 _simd_log_f16(simd_float16 x); | ||
| 4408 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4409 | return _simd_log_f16(x); | ||
| 4410 | } | ||
| 4411 | #else | ||
| 4412 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4413 | return simd_make_float16(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4414 | } | ||
| 4415 | #endif | ||
| 4416 | |||
| 4417 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4418 | extern simd_double2 _simd_log_d2(simd_double2 x); | ||
| 4419 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4420 | return _simd_log_d2(x); | ||
| 4421 | } | ||
| 4422 | #else | ||
| 4423 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4424 | return simd_make_double2(log(x.x), log(x.y)); | ||
| 4425 | } | ||
| 4426 | #endif | ||
| 4427 | |||
| 4428 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) { | ||
| 4429 | return simd_make_double3(__tg_log(simd_make_double4(x))); | ||
| 4430 | } | ||
| 4431 | |||
| 4432 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4433 | extern simd_double4 _simd_log_d4(simd_double4 x); | ||
| 4434 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4435 | return _simd_log_d4(x); | ||
| 4436 | } | ||
| 4437 | #else | ||
| 4438 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4439 | return simd_make_double4(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4440 | } | ||
| 4441 | #endif | ||
| 4442 | |||
| 4443 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4444 | extern simd_double8 _simd_log_d8(simd_double8 x); | ||
| 4445 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4446 | return _simd_log_d8(x); | ||
| 4447 | } | ||
| 4448 | #else | ||
| 4449 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4450 | return simd_make_double8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4451 | } | ||
| 4452 | #endif | ||
| 4453 | |||
| 4454 | #pragma mark - log2 implementation | ||
| 4455 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x) { | ||
| 4456 | return simd_make_float2(__tg_log2(simd_make_float4(x))); | ||
| 4457 | } | ||
| 4458 | |||
| 4459 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x) { | ||
| 4460 | return simd_make_float3(__tg_log2(simd_make_float4(x))); | ||
| 4461 | } | ||
| 4462 | |||
| 4463 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4464 | extern simd_float4 _simd_log2_f4(simd_float4 x); | ||
| 4465 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4466 | return _simd_log2_f4(x); | ||
| 4467 | } | ||
| 4468 | #else | ||
| 4469 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4470 | return simd_make_float4(log2(x.x), log2(x.y), log2(x.z), log2(x.w)); | ||
| 4471 | } | ||
| 4472 | #endif | ||
| 4473 | |||
| 4474 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4475 | extern simd_float8 _simd_log2_f8(simd_float8 x); | ||
| 4476 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4477 | return _simd_log2_f8(x); | ||
| 4478 | } | ||
| 4479 | #else | ||
| 4480 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4481 | return simd_make_float8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4482 | } | ||
| 4483 | #endif | ||
| 4484 | |||
| 4485 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4486 | extern simd_float16 _simd_log2_f16(simd_float16 x); | ||
| 4487 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4488 | return _simd_log2_f16(x); | ||
| 4489 | } | ||
| 4490 | #else | ||
| 4491 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4492 | return simd_make_float16(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4493 | } | ||
| 4494 | #endif | ||
| 4495 | |||
| 4496 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4497 | extern simd_double2 _simd_log2_d2(simd_double2 x); | ||
| 4498 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4499 | return _simd_log2_d2(x); | ||
| 4500 | } | ||
| 4501 | #else | ||
| 4502 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4503 | return simd_make_double2(log2(x.x), log2(x.y)); | ||
| 4504 | } | ||
| 4505 | #endif | ||
| 4506 | |||
| 4507 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) { | ||
| 4508 | return simd_make_double3(__tg_log2(simd_make_double4(x))); | ||
| 4509 | } | ||
| 4510 | |||
| 4511 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4512 | extern simd_double4 _simd_log2_d4(simd_double4 x); | ||
| 4513 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4514 | return _simd_log2_d4(x); | ||
| 4515 | } | ||
| 4516 | #else | ||
| 4517 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4518 | return simd_make_double4(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4519 | } | ||
| 4520 | #endif | ||
| 4521 | |||
| 4522 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4523 | extern simd_double8 _simd_log2_d8(simd_double8 x); | ||
| 4524 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4525 | return _simd_log2_d8(x); | ||
| 4526 | } | ||
| 4527 | #else | ||
| 4528 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4529 | return simd_make_double8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4530 | } | ||
| 4531 | #endif | ||
| 4532 | |||
| 4533 | #pragma mark - log10 implementation | ||
| 4534 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x) { | ||
| 4535 | return simd_make_float2(__tg_log10(simd_make_float4(x))); | ||
| 4536 | } | ||
| 4537 | |||
| 4538 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x) { | ||
| 4539 | return simd_make_float3(__tg_log10(simd_make_float4(x))); | ||
| 4540 | } | ||
| 4541 | |||
| 4542 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4543 | extern simd_float4 _simd_log10_f4(simd_float4 x); | ||
| 4544 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4545 | return _simd_log10_f4(x); | ||
| 4546 | } | ||
| 4547 | #else | ||
| 4548 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4549 | return simd_make_float4(log10(x.x), log10(x.y), log10(x.z), log10(x.w)); | ||
| 4550 | } | ||
| 4551 | #endif | ||
| 4552 | |||
| 4553 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4554 | extern simd_float8 _simd_log10_f8(simd_float8 x); | ||
| 4555 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4556 | return _simd_log10_f8(x); | ||
| 4557 | } | ||
| 4558 | #else | ||
| 4559 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4560 | return simd_make_float8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4561 | } | ||
| 4562 | #endif | ||
| 4563 | |||
| 4564 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4565 | extern simd_float16 _simd_log10_f16(simd_float16 x); | ||
| 4566 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4567 | return _simd_log10_f16(x); | ||
| 4568 | } | ||
| 4569 | #else | ||
| 4570 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4571 | return simd_make_float16(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4572 | } | ||
| 4573 | #endif | ||
| 4574 | |||
| 4575 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4576 | extern simd_double2 _simd_log10_d2(simd_double2 x); | ||
| 4577 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4578 | return _simd_log10_d2(x); | ||
| 4579 | } | ||
| 4580 | #else | ||
| 4581 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4582 | return simd_make_double2(log10(x.x), log10(x.y)); | ||
| 4583 | } | ||
| 4584 | #endif | ||
| 4585 | |||
| 4586 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) { | ||
| 4587 | return simd_make_double3(__tg_log10(simd_make_double4(x))); | ||
| 4588 | } | ||
| 4589 | |||
| 4590 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4591 | extern simd_double4 _simd_log10_d4(simd_double4 x); | ||
| 4592 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4593 | return _simd_log10_d4(x); | ||
| 4594 | } | ||
| 4595 | #else | ||
| 4596 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4597 | return simd_make_double4(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4598 | } | ||
| 4599 | #endif | ||
| 4600 | |||
| 4601 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4602 | extern simd_double8 _simd_log10_d8(simd_double8 x); | ||
| 4603 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4604 | return _simd_log10_d8(x); | ||
| 4605 | } | ||
| 4606 | #else | ||
| 4607 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4608 | return simd_make_double8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4609 | } | ||
| 4610 | #endif | ||
| 4611 | |||
| 4612 | #pragma mark - log1p implementation | ||
| 4613 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x) { | ||
| 4614 | return simd_make_float2(__tg_log1p(simd_make_float4(x))); | ||
| 4615 | } | ||
| 4616 | |||
| 4617 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x) { | ||
| 4618 | return simd_make_float3(__tg_log1p(simd_make_float4(x))); | ||
| 4619 | } | ||
| 4620 | |||
| 4621 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4622 | extern simd_float4 _simd_log1p_f4(simd_float4 x); | ||
| 4623 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4624 | return _simd_log1p_f4(x); | ||
| 4625 | } | ||
| 4626 | #else | ||
| 4627 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4628 | return simd_make_float4(log1p(x.x), log1p(x.y), log1p(x.z), log1p(x.w)); | ||
| 4629 | } | ||
| 4630 | #endif | ||
| 4631 | |||
| 4632 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4633 | extern simd_float8 _simd_log1p_f8(simd_float8 x); | ||
| 4634 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4635 | return _simd_log1p_f8(x); | ||
| 4636 | } | ||
| 4637 | #else | ||
| 4638 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4639 | return simd_make_float8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4640 | } | ||
| 4641 | #endif | ||
| 4642 | |||
| 4643 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4644 | extern simd_float16 _simd_log1p_f16(simd_float16 x); | ||
| 4645 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4646 | return _simd_log1p_f16(x); | ||
| 4647 | } | ||
| 4648 | #else | ||
| 4649 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4650 | return simd_make_float16(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4651 | } | ||
| 4652 | #endif | ||
| 4653 | |||
| 4654 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4655 | extern simd_double2 _simd_log1p_d2(simd_double2 x); | ||
| 4656 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4657 | return _simd_log1p_d2(x); | ||
| 4658 | } | ||
| 4659 | #else | ||
| 4660 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4661 | return simd_make_double2(log1p(x.x), log1p(x.y)); | ||
| 4662 | } | ||
| 4663 | #endif | ||
| 4664 | |||
| 4665 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) { | ||
| 4666 | return simd_make_double3(__tg_log1p(simd_make_double4(x))); | ||
| 4667 | } | ||
| 4668 | |||
| 4669 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4670 | extern simd_double4 _simd_log1p_d4(simd_double4 x); | ||
| 4671 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4672 | return _simd_log1p_d4(x); | ||
| 4673 | } | ||
| 4674 | #else | ||
| 4675 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4676 | return simd_make_double4(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4677 | } | ||
| 4678 | #endif | ||
| 4679 | |||
| 4680 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4681 | extern simd_double8 _simd_log1p_d8(simd_double8 x); | ||
| 4682 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4683 | return _simd_log1p_d8(x); | ||
| 4684 | } | ||
| 4685 | #else | ||
| 4686 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4687 | return simd_make_double8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4688 | } | ||
| 4689 | #endif | ||
| 4690 | |||
| 4691 | #pragma mark - cbrt implementation | ||
| 4692 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x) { | ||
| 4693 | return simd_make_float2(__tg_cbrt(simd_make_float4(x))); | ||
| 4694 | } | ||
| 4695 | |||
| 4696 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x) { | ||
| 4697 | return simd_make_float3(__tg_cbrt(simd_make_float4(x))); | ||
| 4698 | } | ||
| 4699 | |||
| 4700 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4701 | extern simd_float4 _simd_cbrt_f4(simd_float4 x); | ||
| 4702 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4703 | return _simd_cbrt_f4(x); | ||
| 4704 | } | ||
| 4705 | #else | ||
| 4706 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4707 | return simd_make_float4(cbrt(x.x), cbrt(x.y), cbrt(x.z), cbrt(x.w)); | ||
| 4708 | } | ||
| 4709 | #endif | ||
| 4710 | |||
| 4711 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4712 | extern simd_float8 _simd_cbrt_f8(simd_float8 x); | ||
| 4713 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4714 | return _simd_cbrt_f8(x); | ||
| 4715 | } | ||
| 4716 | #else | ||
| 4717 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4718 | return simd_make_float8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4719 | } | ||
| 4720 | #endif | ||
| 4721 | |||
| 4722 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4723 | extern simd_float16 _simd_cbrt_f16(simd_float16 x); | ||
| 4724 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4725 | return _simd_cbrt_f16(x); | ||
| 4726 | } | ||
| 4727 | #else | ||
| 4728 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4729 | return simd_make_float16(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4730 | } | ||
| 4731 | #endif | ||
| 4732 | |||
| 4733 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4734 | extern simd_double2 _simd_cbrt_d2(simd_double2 x); | ||
| 4735 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4736 | return _simd_cbrt_d2(x); | ||
| 4737 | } | ||
| 4738 | #else | ||
| 4739 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4740 | return simd_make_double2(cbrt(x.x), cbrt(x.y)); | ||
| 4741 | } | ||
| 4742 | #endif | ||
| 4743 | |||
| 4744 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) { | ||
| 4745 | return simd_make_double3(__tg_cbrt(simd_make_double4(x))); | ||
| 4746 | } | ||
| 4747 | |||
| 4748 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4749 | extern simd_double4 _simd_cbrt_d4(simd_double4 x); | ||
| 4750 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4751 | return _simd_cbrt_d4(x); | ||
| 4752 | } | ||
| 4753 | #else | ||
| 4754 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4755 | return simd_make_double4(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4756 | } | ||
| 4757 | #endif | ||
| 4758 | |||
| 4759 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4760 | extern simd_double8 _simd_cbrt_d8(simd_double8 x); | ||
| 4761 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4762 | return _simd_cbrt_d8(x); | ||
| 4763 | } | ||
| 4764 | #else | ||
| 4765 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4766 | return simd_make_double8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4767 | } | ||
| 4768 | #endif | ||
| 4769 | |||
| 4770 | #pragma mark - erf implementation | ||
| 4771 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x) { | ||
| 4772 | return simd_make_float2(__tg_erf(simd_make_float4(x))); | ||
| 4773 | } | ||
| 4774 | |||
| 4775 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x) { | ||
| 4776 | return simd_make_float3(__tg_erf(simd_make_float4(x))); | ||
| 4777 | } | ||
| 4778 | |||
| 4779 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4780 | extern simd_float4 _simd_erf_f4(simd_float4 x); | ||
| 4781 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4782 | return _simd_erf_f4(x); | ||
| 4783 | } | ||
| 4784 | #else | ||
| 4785 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4786 | return simd_make_float4(erf(x.x), erf(x.y), erf(x.z), erf(x.w)); | ||
| 4787 | } | ||
| 4788 | #endif | ||
| 4789 | |||
| 4790 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4791 | extern simd_float8 _simd_erf_f8(simd_float8 x); | ||
| 4792 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4793 | return _simd_erf_f8(x); | ||
| 4794 | } | ||
| 4795 | #else | ||
| 4796 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4797 | return simd_make_float8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4798 | } | ||
| 4799 | #endif | ||
| 4800 | |||
| 4801 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4802 | extern simd_float16 _simd_erf_f16(simd_float16 x); | ||
| 4803 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4804 | return _simd_erf_f16(x); | ||
| 4805 | } | ||
| 4806 | #else | ||
| 4807 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4808 | return simd_make_float16(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4809 | } | ||
| 4810 | #endif | ||
| 4811 | |||
| 4812 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4813 | extern simd_double2 _simd_erf_d2(simd_double2 x); | ||
| 4814 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4815 | return _simd_erf_d2(x); | ||
| 4816 | } | ||
| 4817 | #else | ||
| 4818 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4819 | return simd_make_double2(erf(x.x), erf(x.y)); | ||
| 4820 | } | ||
| 4821 | #endif | ||
| 4822 | |||
| 4823 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) { | ||
| 4824 | return simd_make_double3(__tg_erf(simd_make_double4(x))); | ||
| 4825 | } | ||
| 4826 | |||
| 4827 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4828 | extern simd_double4 _simd_erf_d4(simd_double4 x); | ||
| 4829 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4830 | return _simd_erf_d4(x); | ||
| 4831 | } | ||
| 4832 | #else | ||
| 4833 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4834 | return simd_make_double4(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4835 | } | ||
| 4836 | #endif | ||
| 4837 | |||
| 4838 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4839 | extern simd_double8 _simd_erf_d8(simd_double8 x); | ||
| 4840 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4841 | return _simd_erf_d8(x); | ||
| 4842 | } | ||
| 4843 | #else | ||
| 4844 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4845 | return simd_make_double8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4846 | } | ||
| 4847 | #endif | ||
| 4848 | |||
| 4849 | #pragma mark - erfc implementation | ||
| 4850 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x) { | ||
| 4851 | return simd_make_float2(__tg_erfc(simd_make_float4(x))); | ||
| 4852 | } | ||
| 4853 | |||
| 4854 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x) { | ||
| 4855 | return simd_make_float3(__tg_erfc(simd_make_float4(x))); | ||
| 4856 | } | ||
| 4857 | |||
| 4858 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4859 | extern simd_float4 _simd_erfc_f4(simd_float4 x); | ||
| 4860 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4861 | return _simd_erfc_f4(x); | ||
| 4862 | } | ||
| 4863 | #else | ||
| 4864 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4865 | return simd_make_float4(erfc(x.x), erfc(x.y), erfc(x.z), erfc(x.w)); | ||
| 4866 | } | ||
| 4867 | #endif | ||
| 4868 | |||
| 4869 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4870 | extern simd_float8 _simd_erfc_f8(simd_float8 x); | ||
| 4871 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4872 | return _simd_erfc_f8(x); | ||
| 4873 | } | ||
| 4874 | #else | ||
| 4875 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4876 | return simd_make_float8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4877 | } | ||
| 4878 | #endif | ||
| 4879 | |||
| 4880 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4881 | extern simd_float16 _simd_erfc_f16(simd_float16 x); | ||
| 4882 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4883 | return _simd_erfc_f16(x); | ||
| 4884 | } | ||
| 4885 | #else | ||
| 4886 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4887 | return simd_make_float16(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4888 | } | ||
| 4889 | #endif | ||
| 4890 | |||
| 4891 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4892 | extern simd_double2 _simd_erfc_d2(simd_double2 x); | ||
| 4893 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4894 | return _simd_erfc_d2(x); | ||
| 4895 | } | ||
| 4896 | #else | ||
| 4897 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4898 | return simd_make_double2(erfc(x.x), erfc(x.y)); | ||
| 4899 | } | ||
| 4900 | #endif | ||
| 4901 | |||
| 4902 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) { | ||
| 4903 | return simd_make_double3(__tg_erfc(simd_make_double4(x))); | ||
| 4904 | } | ||
| 4905 | |||
| 4906 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4907 | extern simd_double4 _simd_erfc_d4(simd_double4 x); | ||
| 4908 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4909 | return _simd_erfc_d4(x); | ||
| 4910 | } | ||
| 4911 | #else | ||
| 4912 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4913 | return simd_make_double4(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4914 | } | ||
| 4915 | #endif | ||
| 4916 | |||
| 4917 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4918 | extern simd_double8 _simd_erfc_d8(simd_double8 x); | ||
| 4919 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4920 | return _simd_erfc_d8(x); | ||
| 4921 | } | ||
| 4922 | #else | ||
| 4923 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4924 | return simd_make_double8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4925 | } | ||
| 4926 | #endif | ||
| 4927 | |||
| 4928 | #pragma mark - tgamma implementation | ||
| 4929 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x) { | ||
| 4930 | return simd_make_float2(__tg_tgamma(simd_make_float4(x))); | ||
| 4931 | } | ||
| 4932 | |||
| 4933 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x) { | ||
| 4934 | return simd_make_float3(__tg_tgamma(simd_make_float4(x))); | ||
| 4935 | } | ||
| 4936 | |||
| 4937 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4938 | extern simd_float4 _simd_tgamma_f4(simd_float4 x); | ||
| 4939 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4940 | return _simd_tgamma_f4(x); | ||
| 4941 | } | ||
| 4942 | #else | ||
| 4943 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4944 | return simd_make_float4(tgamma(x.x), tgamma(x.y), tgamma(x.z), tgamma(x.w)); | ||
| 4945 | } | ||
| 4946 | #endif | ||
| 4947 | |||
| 4948 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4949 | extern simd_float8 _simd_tgamma_f8(simd_float8 x); | ||
| 4950 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4951 | return _simd_tgamma_f8(x); | ||
| 4952 | } | ||
| 4953 | #else | ||
| 4954 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4955 | return simd_make_float8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4956 | } | ||
| 4957 | #endif | ||
| 4958 | |||
| 4959 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4960 | extern simd_float16 _simd_tgamma_f16(simd_float16 x); | ||
| 4961 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4962 | return _simd_tgamma_f16(x); | ||
| 4963 | } | ||
| 4964 | #else | ||
| 4965 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4966 | return simd_make_float16(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4967 | } | ||
| 4968 | #endif | ||
| 4969 | |||
| 4970 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4971 | extern simd_double2 _simd_tgamma_d2(simd_double2 x); | ||
| 4972 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4973 | return _simd_tgamma_d2(x); | ||
| 4974 | } | ||
| 4975 | #else | ||
| 4976 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4977 | return simd_make_double2(tgamma(x.x), tgamma(x.y)); | ||
| 4978 | } | ||
| 4979 | #endif | ||
| 4980 | |||
| 4981 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) { | ||
| 4982 | return simd_make_double3(__tg_tgamma(simd_make_double4(x))); | ||
| 4983 | } | ||
| 4984 | |||
| 4985 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4986 | extern simd_double4 _simd_tgamma_d4(simd_double4 x); | ||
| 4987 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4988 | return _simd_tgamma_d4(x); | ||
| 4989 | } | ||
| 4990 | #else | ||
| 4991 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4992 | return simd_make_double4(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4993 | } | ||
| 4994 | #endif | ||
| 4995 | |||
| 4996 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4997 | extern simd_double8 _simd_tgamma_d8(simd_double8 x); | ||
| 4998 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 4999 | return _simd_tgamma_d8(x); | ||
| 5000 | } | ||
| 5001 | #else | ||
| 5002 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 5003 | return simd_make_double8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 5004 | } | ||
| 5005 | #endif | ||
| 5006 | |||
| 5007 | #pragma mark - round implementation | ||
| 5008 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x) { | ||
| 5009 | return simd_make_float2(__tg_round(simd_make_float4(x))); | ||
| 5010 | } | ||
| 5011 | |||
| 5012 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x) { | ||
| 5013 | return simd_make_float3(__tg_round(simd_make_float4(x))); | ||
| 5014 | } | ||
| 5015 | |||
| 5016 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5017 | extern simd_float4 _simd_round_f4(simd_float4 x); | ||
| 5018 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 5019 | #if defined __arm64__ | ||
| 5020 | return vrndaq_f32(x); | ||
| 5021 | #else | ||
| 5022 | return _simd_round_f4(x); | ||
| 5023 | #endif | ||
| 5024 | } | ||
| 5025 | #else | ||
| 5026 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 5027 | return simd_make_float4(round(x.x), round(x.y), round(x.z), round(x.w)); | ||
| 5028 | } | ||
| 5029 | #endif | ||
| 5030 | |||
| 5031 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5032 | extern simd_float8 _simd_round_f8(simd_float8 x); | ||
| 5033 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 5034 | return _simd_round_f8(x); | ||
| 5035 | } | ||
| 5036 | #else | ||
| 5037 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 5038 | return simd_make_float8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5039 | } | ||
| 5040 | #endif | ||
| 5041 | |||
| 5042 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5043 | extern simd_float16 _simd_round_f16(simd_float16 x); | ||
| 5044 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 5045 | return _simd_round_f16(x); | ||
| 5046 | } | ||
| 5047 | #else | ||
| 5048 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 5049 | return simd_make_float16(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5050 | } | ||
| 5051 | #endif | ||
| 5052 | |||
| 5053 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5054 | extern simd_double2 _simd_round_d2(simd_double2 x); | ||
| 5055 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 5056 | #if defined __arm64__ | ||
| 5057 | return vrndaq_f64(x); | ||
| 5058 | #else | ||
| 5059 | return _simd_round_d2(x); | ||
| 5060 | #endif | ||
| 5061 | } | ||
| 5062 | #else | ||
| 5063 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 5064 | return simd_make_double2(round(x.x), round(x.y)); | ||
| 5065 | } | ||
| 5066 | #endif | ||
| 5067 | |||
| 5068 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) { | ||
| 5069 | return simd_make_double3(__tg_round(simd_make_double4(x))); | ||
| 5070 | } | ||
| 5071 | |||
| 5072 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5073 | extern simd_double4 _simd_round_d4(simd_double4 x); | ||
| 5074 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 5075 | return _simd_round_d4(x); | ||
| 5076 | } | ||
| 5077 | #else | ||
| 5078 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 5079 | return simd_make_double4(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5080 | } | ||
| 5081 | #endif | ||
| 5082 | |||
| 5083 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5084 | extern simd_double8 _simd_round_d8(simd_double8 x); | ||
| 5085 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 5086 | return _simd_round_d8(x); | ||
| 5087 | } | ||
| 5088 | #else | ||
| 5089 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 5090 | return simd_make_double8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5091 | } | ||
| 5092 | #endif | ||
| 5093 | |||
| 5094 | #pragma mark - atan2 implementation | ||
| 5095 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x) { | ||
| 5096 | return simd_make_float2(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 5097 | } | ||
| 5098 | |||
| 5099 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x) { | ||
| 5100 | return simd_make_float3(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 5101 | } | ||
| 5102 | |||
| 5103 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5104 | extern simd_float4 _simd_atan2_f4(simd_float4 y, simd_float4 x); | ||
| 5105 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 5106 | return _simd_atan2_f4(y, x); | ||
| 5107 | } | ||
| 5108 | #else | ||
| 5109 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 5110 | return simd_make_float4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w)); | ||
| 5111 | } | ||
| 5112 | #endif | ||
| 5113 | |||
| 5114 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5115 | extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x); | ||
| 5116 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 5117 | return _simd_atan2_f8(y, x); | ||
| 5118 | } | ||
| 5119 | #else | ||
| 5120 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 5121 | return simd_make_float8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5122 | } | ||
| 5123 | #endif | ||
| 5124 | |||
| 5125 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5126 | extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x); | ||
| 5127 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 5128 | return _simd_atan2_f16(y, x); | ||
| 5129 | } | ||
| 5130 | #else | ||
| 5131 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 5132 | return simd_make_float16(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5133 | } | ||
| 5134 | #endif | ||
| 5135 | |||
| 5136 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5137 | extern simd_double2 _simd_atan2_d2(simd_double2 y, simd_double2 x); | ||
| 5138 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 5139 | return _simd_atan2_d2(y, x); | ||
| 5140 | } | ||
| 5141 | #else | ||
| 5142 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 5143 | return simd_make_double2(atan2(y.x, x.x), atan2(y.y, x.y)); | ||
| 5144 | } | ||
| 5145 | #endif | ||
| 5146 | |||
| 5147 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x) { | ||
| 5148 | return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x))); | ||
| 5149 | } | ||
| 5150 | |||
| 5151 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5152 | extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x); | ||
| 5153 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 5154 | return _simd_atan2_d4(y, x); | ||
| 5155 | } | ||
| 5156 | #else | ||
| 5157 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 5158 | return simd_make_double4(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5159 | } | ||
| 5160 | #endif | ||
| 5161 | |||
| 5162 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5163 | extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x); | ||
| 5164 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 5165 | return _simd_atan2_d8(y, x); | ||
| 5166 | } | ||
| 5167 | #else | ||
| 5168 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 5169 | return simd_make_double8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5170 | } | ||
| 5171 | #endif | ||
| 5172 | |||
| 5173 | #pragma mark - hypot implementation | ||
| 5174 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y) { | ||
| 5175 | return simd_make_float2(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 5176 | } | ||
| 5177 | |||
| 5178 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y) { | ||
| 5179 | return simd_make_float3(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 5180 | } | ||
| 5181 | |||
| 5182 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5183 | extern simd_float4 _simd_hypot_f4(simd_float4 x, simd_float4 y); | ||
| 5184 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 5185 | return _simd_hypot_f4(x, y); | ||
| 5186 | } | ||
| 5187 | #else | ||
| 5188 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 5189 | return simd_make_float4(hypot(x.x, y.x), hypot(x.y, y.y), hypot(x.z, y.z), hypot(x.w, y.w)); | ||
| 5190 | } | ||
| 5191 | #endif | ||
| 5192 | |||
| 5193 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5194 | extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y); | ||
| 5195 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 5196 | return _simd_hypot_f8(x, y); | ||
| 5197 | } | ||
| 5198 | #else | ||
| 5199 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 5200 | return simd_make_float8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5201 | } | ||
| 5202 | #endif | ||
| 5203 | |||
| 5204 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5205 | extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y); | ||
| 5206 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 5207 | return _simd_hypot_f16(x, y); | ||
| 5208 | } | ||
| 5209 | #else | ||
| 5210 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 5211 | return simd_make_float16(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5212 | } | ||
| 5213 | #endif | ||
| 5214 | |||
| 5215 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5216 | extern simd_double2 _simd_hypot_d2(simd_double2 x, simd_double2 y); | ||
| 5217 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 5218 | return _simd_hypot_d2(x, y); | ||
| 5219 | } | ||
| 5220 | #else | ||
| 5221 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 5222 | return simd_make_double2(hypot(x.x, y.x), hypot(x.y, y.y)); | ||
| 5223 | } | ||
| 5224 | #endif | ||
| 5225 | |||
| 5226 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y) { | ||
| 5227 | return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y))); | ||
| 5228 | } | ||
| 5229 | |||
| 5230 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5231 | extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y); | ||
| 5232 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 5233 | return _simd_hypot_d4(x, y); | ||
| 5234 | } | ||
| 5235 | #else | ||
| 5236 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 5237 | return simd_make_double4(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5238 | } | ||
| 5239 | #endif | ||
| 5240 | |||
| 5241 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5242 | extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y); | ||
| 5243 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 5244 | return _simd_hypot_d8(x, y); | ||
| 5245 | } | ||
| 5246 | #else | ||
| 5247 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 5248 | return simd_make_double8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5249 | } | ||
| 5250 | #endif | ||
| 5251 | |||
| 5252 | #pragma mark - pow implementation | ||
| 5253 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y) { | ||
| 5254 | return simd_make_float2(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 5255 | } | ||
| 5256 | |||
| 5257 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y) { | ||
| 5258 | return simd_make_float3(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 5259 | } | ||
| 5260 | |||
| 5261 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5262 | extern simd_float4 _simd_pow_f4(simd_float4 x, simd_float4 y); | ||
| 5263 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 5264 | return _simd_pow_f4(x, y); | ||
| 5265 | } | ||
| 5266 | #else | ||
| 5267 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 5268 | return simd_make_float4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w)); | ||
| 5269 | } | ||
| 5270 | #endif | ||
| 5271 | |||
| 5272 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5273 | extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y); | ||
| 5274 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 5275 | return _simd_pow_f8(x, y); | ||
| 5276 | } | ||
| 5277 | #else | ||
| 5278 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 5279 | return simd_make_float8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5280 | } | ||
| 5281 | #endif | ||
| 5282 | |||
| 5283 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5284 | extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y); | ||
| 5285 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 5286 | return _simd_pow_f16(x, y); | ||
| 5287 | } | ||
| 5288 | #else | ||
| 5289 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 5290 | return simd_make_float16(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5291 | } | ||
| 5292 | #endif | ||
| 5293 | |||
| 5294 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5295 | extern simd_double2 _simd_pow_d2(simd_double2 x, simd_double2 y); | ||
| 5296 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 5297 | return _simd_pow_d2(x, y); | ||
| 5298 | } | ||
| 5299 | #else | ||
| 5300 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 5301 | return simd_make_double2(pow(x.x, y.x), pow(x.y, y.y)); | ||
| 5302 | } | ||
| 5303 | #endif | ||
| 5304 | |||
| 5305 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) { | ||
| 5306 | return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y))); | ||
| 5307 | } | ||
| 5308 | |||
| 5309 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5310 | extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y); | ||
| 5311 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 5312 | return _simd_pow_d4(x, y); | ||
| 5313 | } | ||
| 5314 | #else | ||
| 5315 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 5316 | return simd_make_double4(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5317 | } | ||
| 5318 | #endif | ||
| 5319 | |||
| 5320 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5321 | extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y); | ||
| 5322 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 5323 | return _simd_pow_d8(x, y); | ||
| 5324 | } | ||
| 5325 | #else | ||
| 5326 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 5327 | return simd_make_double8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5328 | } | ||
| 5329 | #endif | ||
| 5330 | |||
| 5331 | #pragma mark - fmod implementation | ||
| 5332 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y) { | ||
| 5333 | return simd_make_float2(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5334 | } | ||
| 5335 | |||
| 5336 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y) { | ||
| 5337 | return simd_make_float3(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5338 | } | ||
| 5339 | |||
| 5340 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5341 | extern simd_float4 _simd_fmod_f4(simd_float4 x, simd_float4 y); | ||
| 5342 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5343 | return _simd_fmod_f4(x, y); | ||
| 5344 | } | ||
| 5345 | #else | ||
| 5346 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5347 | return simd_make_float4(fmod(x.x, y.x), fmod(x.y, y.y), fmod(x.z, y.z), fmod(x.w, y.w)); | ||
| 5348 | } | ||
| 5349 | #endif | ||
| 5350 | |||
| 5351 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5352 | extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y); | ||
| 5353 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5354 | return _simd_fmod_f8(x, y); | ||
| 5355 | } | ||
| 5356 | #else | ||
| 5357 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5358 | return simd_make_float8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5359 | } | ||
| 5360 | #endif | ||
| 5361 | |||
| 5362 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5363 | extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y); | ||
| 5364 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5365 | return _simd_fmod_f16(x, y); | ||
| 5366 | } | ||
| 5367 | #else | ||
| 5368 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5369 | return simd_make_float16(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5370 | } | ||
| 5371 | #endif | ||
| 5372 | |||
| 5373 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5374 | extern simd_double2 _simd_fmod_d2(simd_double2 x, simd_double2 y); | ||
| 5375 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5376 | return _simd_fmod_d2(x, y); | ||
| 5377 | } | ||
| 5378 | #else | ||
| 5379 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5380 | return simd_make_double2(fmod(x.x, y.x), fmod(x.y, y.y)); | ||
| 5381 | } | ||
| 5382 | #endif | ||
| 5383 | |||
| 5384 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y) { | ||
| 5385 | return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y))); | ||
| 5386 | } | ||
| 5387 | |||
| 5388 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5389 | extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y); | ||
| 5390 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5391 | return _simd_fmod_d4(x, y); | ||
| 5392 | } | ||
| 5393 | #else | ||
| 5394 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5395 | return simd_make_double4(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5396 | } | ||
| 5397 | #endif | ||
| 5398 | |||
| 5399 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5400 | extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y); | ||
| 5401 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5402 | return _simd_fmod_d8(x, y); | ||
| 5403 | } | ||
| 5404 | #else | ||
| 5405 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5406 | return simd_make_double8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5407 | } | ||
| 5408 | #endif | ||
| 5409 | |||
| 5410 | #pragma mark - remainder implementation | ||
| 5411 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y) { | ||
| 5412 | return simd_make_float2(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5413 | } | ||
| 5414 | |||
| 5415 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y) { | ||
| 5416 | return simd_make_float3(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5417 | } | ||
| 5418 | |||
| 5419 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5420 | extern simd_float4 _simd_remainder_f4(simd_float4 x, simd_float4 y); | ||
| 5421 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5422 | return _simd_remainder_f4(x, y); | ||
| 5423 | } | ||
| 5424 | #else | ||
| 5425 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5426 | return simd_make_float4(remainder(x.x, y.x), remainder(x.y, y.y), remainder(x.z, y.z), remainder(x.w, y.w)); | ||
| 5427 | } | ||
| 5428 | #endif | ||
| 5429 | |||
| 5430 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5431 | extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y); | ||
| 5432 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5433 | return _simd_remainder_f8(x, y); | ||
| 5434 | } | ||
| 5435 | #else | ||
| 5436 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5437 | return simd_make_float8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5438 | } | ||
| 5439 | #endif | ||
| 5440 | |||
| 5441 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5442 | extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y); | ||
| 5443 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5444 | return _simd_remainder_f16(x, y); | ||
| 5445 | } | ||
| 5446 | #else | ||
| 5447 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5448 | return simd_make_float16(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5449 | } | ||
| 5450 | #endif | ||
| 5451 | |||
| 5452 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5453 | extern simd_double2 _simd_remainder_d2(simd_double2 x, simd_double2 y); | ||
| 5454 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5455 | return _simd_remainder_d2(x, y); | ||
| 5456 | } | ||
| 5457 | #else | ||
| 5458 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5459 | return simd_make_double2(remainder(x.x, y.x), remainder(x.y, y.y)); | ||
| 5460 | } | ||
| 5461 | #endif | ||
| 5462 | |||
| 5463 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y) { | ||
| 5464 | return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y))); | ||
| 5465 | } | ||
| 5466 | |||
| 5467 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5468 | extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y); | ||
| 5469 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5470 | return _simd_remainder_d4(x, y); | ||
| 5471 | } | ||
| 5472 | #else | ||
| 5473 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5474 | return simd_make_double4(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5475 | } | ||
| 5476 | #endif | ||
| 5477 | |||
| 5478 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5479 | extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y); | ||
| 5480 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5481 | return _simd_remainder_d8(x, y); | ||
| 5482 | } | ||
| 5483 | #else | ||
| 5484 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5485 | return simd_make_double8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5486 | } | ||
| 5487 | #endif | ||
| 5488 | |||
| 5489 | #pragma mark - nextafter implementation | ||
| 5490 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y) { | ||
| 5491 | return simd_make_float2(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5492 | } | ||
| 5493 | |||
| 5494 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y) { | ||
| 5495 | return simd_make_float3(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5496 | } | ||
| 5497 | |||
| 5498 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5499 | extern simd_float4 _simd_nextafter_f4(simd_float4 x, simd_float4 y); | ||
| 5500 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5501 | return _simd_nextafter_f4(x, y); | ||
| 5502 | } | ||
| 5503 | #else | ||
| 5504 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5505 | return simd_make_float4(nextafter(x.x, y.x), nextafter(x.y, y.y), nextafter(x.z, y.z), nextafter(x.w, y.w)); | ||
| 5506 | } | ||
| 5507 | #endif | ||
| 5508 | |||
| 5509 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5510 | extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y); | ||
| 5511 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5512 | return _simd_nextafter_f8(x, y); | ||
| 5513 | } | ||
| 5514 | #else | ||
| 5515 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5516 | return simd_make_float8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5517 | } | ||
| 5518 | #endif | ||
| 5519 | |||
| 5520 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5521 | extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y); | ||
| 5522 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5523 | return _simd_nextafter_f16(x, y); | ||
| 5524 | } | ||
| 5525 | #else | ||
| 5526 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5527 | return simd_make_float16(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5528 | } | ||
| 5529 | #endif | ||
| 5530 | |||
| 5531 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5532 | extern simd_double2 _simd_nextafter_d2(simd_double2 x, simd_double2 y); | ||
| 5533 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5534 | return _simd_nextafter_d2(x, y); | ||
| 5535 | } | ||
| 5536 | #else | ||
| 5537 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5538 | return simd_make_double2(nextafter(x.x, y.x), nextafter(x.y, y.y)); | ||
| 5539 | } | ||
| 5540 | #endif | ||
| 5541 | |||
| 5542 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y) { | ||
| 5543 | return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y))); | ||
| 5544 | } | ||
| 5545 | |||
| 5546 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5547 | extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y); | ||
| 5548 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5549 | return _simd_nextafter_d4(x, y); | ||
| 5550 | } | ||
| 5551 | #else | ||
| 5552 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5553 | return simd_make_double4(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5554 | } | ||
| 5555 | #endif | ||
| 5556 | |||
| 5557 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5558 | extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y); | ||
| 5559 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5560 | return _simd_nextafter_d8(x, y); | ||
| 5561 | } | ||
| 5562 | #else | ||
| 5563 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5564 | return simd_make_double8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5565 | } | ||
| 5566 | #endif | ||
| 5567 | |||
| 5568 | #pragma mark - lgamma implementation | ||
| 5569 | static inline SIMD_CFUNC simd_float2 __tg_lgamma(simd_float2 x) { | ||
| 5570 | return simd_make_float2(__tg_lgamma(simd_make_float4(x))); | ||
| 5571 | } | ||
| 5572 | |||
| 5573 | static inline SIMD_CFUNC simd_float3 __tg_lgamma(simd_float3 x) { | ||
| 5574 | return simd_make_float3(__tg_lgamma(simd_make_float4(x))); | ||
| 5575 | } | ||
| 5576 | |||
| 5577 | #if SIMD_LIBRARY_VERSION >= 4 | ||
| 5578 | extern simd_float4 _simd_lgamma_f4(simd_float4 x); | ||
| 5579 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x) { | ||
| 5580 | return _simd_lgamma_f4(x); | ||
| 5581 | } | ||
| 5582 | #else | ||
| 5583 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x) { | ||
| 5584 | return simd_make_float4(lgamma(x.x), lgamma(x.y), lgamma(x.z), lgamma(x.w)); | ||
| 5585 | } | ||
| 5586 | #endif | ||
| 5587 | |||
| 5588 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX2__ | ||
| 5589 | extern simd_float8 _simd_lgamma_f8(simd_float8 x); | ||
| 5590 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x) { | ||
| 5591 | return _simd_lgamma_f8(x); | ||
| 5592 | } | ||
| 5593 | #else | ||
| 5594 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x) { | ||
| 5595 | return simd_make_float8(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5596 | } | ||
| 5597 | #endif | ||
| 5598 | |||
| 5599 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX512F__ | ||
| 5600 | extern simd_float16 _simd_lgamma_f16(simd_float16 x); | ||
| 5601 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x) { | ||
| 5602 | return _simd_lgamma_f16(x); | ||
| 5603 | } | ||
| 5604 | #else | ||
| 5605 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x) { | ||
| 5606 | return simd_make_float16(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5607 | } | ||
| 5608 | #endif | ||
| 5609 | |||
| 5610 | #if SIMD_LIBRARY_VERSION >= 4 | ||
| 5611 | extern simd_double2 _simd_lgamma_d2(simd_double2 x); | ||
| 5612 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x) { | ||
| 5613 | return _simd_lgamma_d2(x); | ||
| 5614 | } | ||
| 5615 | #else | ||
| 5616 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x) { | ||
| 5617 | return simd_make_double2(lgamma(x.x), lgamma(x.y)); | ||
| 5618 | } | ||
| 5619 | #endif | ||
| 5620 | |||
| 5621 | static inline SIMD_CFUNC simd_double3 __tg_lgamma(simd_double3 x) { | ||
| 5622 | return simd_make_double3(__tg_lgamma(simd_make_double4(x))); | ||
| 5623 | } | ||
| 5624 | |||
| 5625 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX2__ | ||
| 5626 | extern simd_double4 _simd_lgamma_d4(simd_double4 x); | ||
| 5627 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x) { | ||
| 5628 | return _simd_lgamma_d4(x); | ||
| 5629 | } | ||
| 5630 | #else | ||
| 5631 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x) { | ||
| 5632 | return simd_make_double4(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5633 | } | ||
| 5634 | #endif | ||
| 5635 | |||
| 5636 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX512F__ | ||
| 5637 | extern simd_double8 _simd_lgamma_d8(simd_double8 x); | ||
| 5638 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x) { | ||
| 5639 | return _simd_lgamma_d8(x); | ||
| 5640 | } | ||
| 5641 | #else | ||
| 5642 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x) { | ||
| 5643 | return simd_make_double8(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5644 | } | ||
| 5645 | #endif | ||
| 5646 | |||
| 5647 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5648 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5649 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5650 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5651 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5652 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5653 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5654 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5655 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5656 | |||
| 5657 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5658 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5659 | return vfma_f32(z, x, y); | ||
| 5660 | #else | ||
| 5661 | return simd_make_float2(__tg_fma(simd_make_float4_undef(x), simd_make_float4_undef(y), simd_make_float4_undef(z))); | ||
| 5662 | #endif | ||
| 5663 | } | ||
| 5664 | |||
| 5665 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5666 | return simd_make_float3(__tg_fma(simd_make_float4(x), simd_make_float4(y), simd_make_float4(z))); | ||
| 5667 | } | ||
| 5668 | |||
| 5669 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5670 | extern simd_float4 _simd_fma_f4(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 5671 | #endif | ||
| 5672 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5673 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5674 | return vfmaq_f32(z, x, y); | ||
| 5675 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5676 | return _mm_fmadd_ps(x, y, z); | ||
| 5677 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5678 | return _simd_fma_f4(x, y, z); | ||
| 5679 | #else | ||
| 5680 | return simd_make_float4(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y), fma(x.z, y.z, z.z), fma(x.w, y.w, z.w)); | ||
| 5681 | #endif | ||
| 5682 | } | ||
| 5683 | |||
| 5684 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5685 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5686 | return _mm256_fmadd_ps(x, y, z); | ||
| 5687 | #else | ||
| 5688 | return simd_make_float8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5689 | #endif | ||
| 5690 | } | ||
| 5691 | |||
| 5692 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5693 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5694 | return _mm512_fmadd_ps(x, y, z); | ||
| 5695 | #else | ||
| 5696 | return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5697 | #endif | ||
| 5698 | } | ||
| 5699 | |||
| 5700 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5701 | extern simd_double2 _simd_fma_d2(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 5702 | #endif | ||
| 5703 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5704 | #if defined __arm64__ | ||
| 5705 | return vfmaq_f64(z, x, y); | ||
| 5706 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5707 | return _mm_fmadd_pd(x, y, z); | ||
| 5708 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5709 | return _simd_fma_d2(x, y, z); | ||
| 5710 | #else | ||
| 5711 | return simd_make_double2(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y)); | ||
| 5712 | #endif | ||
| 5713 | } | ||
| 5714 | |||
| 5715 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5716 | return simd_make_double3(__tg_fma(simd_make_double4(x), simd_make_double4(y), simd_make_double4(z))); | ||
| 5717 | } | ||
| 5718 | |||
| 5719 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5720 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5721 | return _mm256_fmadd_pd(x, y, z); | ||
| 5722 | #else | ||
| 5723 | return simd_make_double4(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5724 | #endif | ||
| 5725 | } | ||
| 5726 | |||
| 5727 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5728 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5729 | return _mm512_fmadd_pd(x, y, z); | ||
| 5730 | #else | ||
| 5731 | return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5732 | #endif | ||
| 5733 | } | ||
| 5734 | |||
| 5735 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z) { | ||
| 5736 | #pragma STDC FP_CONTRACT ON | ||
| 5737 | return x*y + z; | ||
| 5738 | } | ||
| 5739 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5740 | #pragma STDC FP_CONTRACT ON | ||
| 5741 | return x*y + z; | ||
| 5742 | } | ||
| 5743 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5744 | #pragma STDC FP_CONTRACT ON | ||
| 5745 | return x*y + z; | ||
| 5746 | } | ||
| 5747 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5748 | #pragma STDC FP_CONTRACT ON | ||
| 5749 | return x*y + z; | ||
| 5750 | } | ||
| 5751 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5752 | #pragma STDC FP_CONTRACT ON | ||
| 5753 | return x*y + z; | ||
| 5754 | } | ||
| 5755 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5756 | #pragma STDC FP_CONTRACT ON | ||
| 5757 | return x*y + z; | ||
| 5758 | } | ||
| 5759 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z) { | ||
| 5760 | #pragma STDC FP_CONTRACT ON | ||
| 5761 | return x*y + z; | ||
| 5762 | } | ||
| 5763 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5764 | #pragma STDC FP_CONTRACT ON | ||
| 5765 | return x*y + z; | ||
| 5766 | } | ||
| 5767 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5768 | #pragma STDC FP_CONTRACT ON | ||
| 5769 | return x*y + z; | ||
| 5770 | } | ||
| 5771 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5772 | #pragma STDC FP_CONTRACT ON | ||
| 5773 | return x*y + z; | ||
| 5774 | } | ||
| 5775 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5776 | #pragma STDC FP_CONTRACT ON | ||
| 5777 | return x*y + z; | ||
| 5778 | } | ||
| 5779 | #ifdef __cplusplus | ||
| 5780 | } /* extern "C" */ | ||
| 5781 | #endif | ||
| 5782 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 5783 | #endif /* SIMD_MATH_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/simd/matrix.h+29-2| ... | @@ -24,6 +24,10 @@ | ... | @@ -24,6 +24,10 @@ |
| 24 | * | 24 | * |
| 25 | * simd_transpose(x) Transpose of the matrix x. | 25 | * simd_transpose(x) Transpose of the matrix x. |
| 26 | * | 26 | * |
| 27 | * simd_trace(x) Trace of the matrix x. | ||
| 28 | * | ||
| 29 | * simd_determinant(x) Determinant of the matrix x. | ||
| 30 | * | ||
| 27 | * simd_inverse(x) Inverse of x if x is non-singular. If | 31 | * simd_inverse(x) Inverse of x if x is non-singular. If |
| 28 | * x is singular, the result is undefined. | 32 | * x is singular, the result is undefined. |
| 29 | * | 33 | * |
| ... | @@ -248,6 +252,14 @@ static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x); | ... | @@ -248,6 +252,14 @@ static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x); |
| 248 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x); | 252 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x); |
| 249 | #define matrix_transpose simd_transpose | 253 | #define matrix_transpose simd_transpose |
| 250 | 254 | ||
| 255 | static float SIMD_CFUNC simd_trace(simd_float2x2 __x); | ||
| 256 | static float SIMD_CFUNC simd_trace(simd_float3x3 __x); | ||
| 257 | static float SIMD_CFUNC simd_trace(simd_float4x4 __x); | ||
| 258 | static double SIMD_CFUNC simd_trace(simd_double2x2 __x); | ||
| 259 | static double SIMD_CFUNC simd_trace(simd_double3x3 __x); | ||
| 260 | static double SIMD_CFUNC simd_trace(simd_double4x4 __x); | ||
| 261 | #define matrix_trace simd_trace | ||
| 262 | |||
| 251 | static float SIMD_CFUNC simd_determinant(simd_float2x2 __x); | 263 | static float SIMD_CFUNC simd_determinant(simd_float2x2 __x); |
| 252 | static float SIMD_CFUNC simd_determinant(simd_float3x3 __x); | 264 | static float SIMD_CFUNC simd_determinant(simd_float3x3 __x); |
| 253 | static float SIMD_CFUNC simd_determinant(simd_float4x4 __x); | 265 | static float SIMD_CFUNC simd_determinant(simd_float4x4 __x); |
| ... | @@ -468,7 +480,11 @@ namespace simd { | ... | @@ -468,7 +480,11 @@ namespace simd { |
| 468 | static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); } | 480 | static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); } |
| 469 | static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); } | 481 | static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); } |
| 470 | static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); } | 482 | static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); } |
| 471 | 483 | ||
| 484 | static SIMD_CPPFUNC float trace(const float2x2 x) { return ::simd_trace(x); } | ||
| 485 | static SIMD_CPPFUNC float trace(const float3x3 x) { return ::simd_trace(x); } | ||
| 486 | static SIMD_CPPFUNC float trace(const float4x4 x) { return ::simd_trace(x); } | ||
| 487 | |||
| 472 | static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); } | 488 | static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); } |
| 473 | static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); } | 489 | static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); } |
| 474 | static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); } | 490 | static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); } |
| ... | @@ -656,7 +672,11 @@ namespace simd { | ... | @@ -656,7 +672,11 @@ namespace simd { |
| 656 | static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); } | 672 | static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); } |
| 657 | static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); } | 673 | static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); } |
| 658 | static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); } | 674 | static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); } |
| 659 | 675 | ||
| 676 | static SIMD_CPPFUNC double trace(const double2x2 x) { return ::simd_trace(x); } | ||
| 677 | static SIMD_CPPFUNC double trace(const double3x3 x) { return ::simd_trace(x); } | ||
| 678 | static SIMD_CPPFUNC double trace(const double4x4 x) { return ::simd_trace(x); } | ||
| 679 | |||
| 660 | static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); } | 680 | static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); } |
| 661 | static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); } | 681 | static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); } |
| 662 | static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); } | 682 | 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 | ... | @@ -1292,6 +1312,13 @@ static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_sh |
| 1292 | static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } | 1312 | static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } |
| 1293 | static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } | 1313 | static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } |
| 1294 | 1314 | ||
| 1315 | static float SIMD_CFUNC simd_trace( simd_float2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; } | ||
| 1316 | static double SIMD_CFUNC simd_trace(simd_double2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; } | ||
| 1317 | static float SIMD_CFUNC simd_trace( simd_float3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; } | ||
| 1318 | static double SIMD_CFUNC simd_trace(simd_double3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; } | ||
| 1319 | 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]; } | ||
| 1320 | 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]; } | ||
| 1321 | |||
| 1295 | 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]; } | 1322 | 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]; } |
| 1296 | 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]; } | 1323 | 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]; } |
| 1297 | 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]))); } | 1324 | 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]))); } |
lib/libc/include/any-macos-any/simd/matrix_types.h+229| ... | @@ -30,6 +30,7 @@ | ... | @@ -30,6 +30,7 @@ |
| 30 | #define SIMD_MATRIX_TYPES_HEADER | 30 | #define SIMD_MATRIX_TYPES_HEADER |
| 31 | 31 | ||
| 32 | #include <simd/types.h> | 32 | #include <simd/types.h> |
| 33 | #include <simd/vector_make.h> | ||
| 33 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | 34 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES |
| 34 | 35 | ||
| 35 | /* Matrix types available in C, Objective-C, and C++ */ | 36 | /* Matrix types available in C, Objective-C, and C++ */ |
| ... | @@ -258,6 +259,234 @@ namespace simd { | ... | @@ -258,6 +259,234 @@ namespace simd { |
| 258 | double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { } | 259 | double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { } |
| 259 | #endif | 260 | #endif |
| 260 | }; | 261 | }; |
| 262 | |||
| 263 | /*! @abstract Templated Matrix struct based on scalar type and number of columns and rows. */ | ||
| 264 | template <typename ScalarType, size_t col, size_t row> struct Matrix { | ||
| 265 | // static const size_t col | ||
| 266 | // static const size_t row | ||
| 267 | // typedef scalar_t | ||
| 268 | // typedef type | ||
| 269 | }; | ||
| 270 | /*! @abstract Helper type to access the simd type easily. */ | ||
| 271 | template <typename ScalarType, size_t col, size_t row> | ||
| 272 | using Matrix_t = typename Matrix<ScalarType, col, row>::type; | ||
| 273 | |||
| 274 | template<> struct Matrix<float, 2, 2> { | ||
| 275 | static const size_t col = 2; | ||
| 276 | static const size_t row = 2; | ||
| 277 | typedef float scalar_t; | ||
| 278 | typedef float2x2 type; | ||
| 279 | }; | ||
| 280 | |||
| 281 | template<> struct Matrix<float, 3, 2> { | ||
| 282 | static const size_t col = 3; | ||
| 283 | static const size_t row = 2; | ||
| 284 | typedef float scalar_t; | ||
| 285 | typedef float3x2 type; | ||
| 286 | }; | ||
| 287 | |||
| 288 | template<> struct Matrix<float, 4, 2> { | ||
| 289 | static const size_t col = 4; | ||
| 290 | static const size_t row = 2; | ||
| 291 | typedef float scalar_t; | ||
| 292 | typedef float4x2 type; | ||
| 293 | }; | ||
| 294 | |||
| 295 | template<> struct Matrix<float, 2, 3> { | ||
| 296 | static const size_t col = 2; | ||
| 297 | static const size_t row = 3; | ||
| 298 | typedef float scalar_t; | ||
| 299 | typedef float2x3 type; | ||
| 300 | }; | ||
| 301 | |||
| 302 | template<> struct Matrix<float, 3, 3> { | ||
| 303 | static const size_t col = 3; | ||
| 304 | static const size_t row = 3; | ||
| 305 | typedef float scalar_t; | ||
| 306 | typedef float3x3 type; | ||
| 307 | }; | ||
| 308 | |||
| 309 | template<> struct Matrix<float, 4, 3> { | ||
| 310 | static const size_t col = 4; | ||
| 311 | static const size_t row = 3; | ||
| 312 | typedef float scalar_t; | ||
| 313 | typedef float4x3 type; | ||
| 314 | }; | ||
| 315 | |||
| 316 | template<> struct Matrix<float, 2, 4> { | ||
| 317 | static const size_t col = 2; | ||
| 318 | static const size_t row = 4; | ||
| 319 | typedef float scalar_t; | ||
| 320 | typedef float2x4 type; | ||
| 321 | }; | ||
| 322 | |||
| 323 | template<> struct Matrix<float, 3, 4> { | ||
| 324 | static const size_t col = 3; | ||
| 325 | static const size_t row = 4; | ||
| 326 | typedef float scalar_t; | ||
| 327 | typedef float3x4 type; | ||
| 328 | }; | ||
| 329 | |||
| 330 | template<> struct Matrix<float, 4, 4> { | ||
| 331 | static const size_t col = 4; | ||
| 332 | static const size_t row = 4; | ||
| 333 | typedef float scalar_t; | ||
| 334 | typedef float4x4 type; | ||
| 335 | }; | ||
| 336 | |||
| 337 | template<> struct Matrix<double, 2, 2> { | ||
| 338 | static const size_t col = 2; | ||
| 339 | static const size_t row = 2; | ||
| 340 | typedef double scalar_t; | ||
| 341 | typedef double2x2 type; | ||
| 342 | }; | ||
| 343 | |||
| 344 | template<> struct Matrix<double, 3, 2> { | ||
| 345 | static const size_t col = 3; | ||
| 346 | static const size_t row = 2; | ||
| 347 | typedef double scalar_t; | ||
| 348 | typedef double3x2 type; | ||
| 349 | }; | ||
| 350 | |||
| 351 | template<> struct Matrix<double, 4, 2> { | ||
| 352 | static const size_t col = 4; | ||
| 353 | static const size_t row = 2; | ||
| 354 | typedef double scalar_t; | ||
| 355 | typedef double4x2 type; | ||
| 356 | }; | ||
| 357 | |||
| 358 | template<> struct Matrix<double, 2, 3> { | ||
| 359 | static const size_t col = 2; | ||
| 360 | static const size_t row = 3; | ||
| 361 | typedef double scalar_t; | ||
| 362 | typedef double2x3 type; | ||
| 363 | }; | ||
| 364 | |||
| 365 | template<> struct Matrix<double, 3, 3> { | ||
| 366 | static const size_t col = 3; | ||
| 367 | static const size_t row = 3; | ||
| 368 | typedef double scalar_t; | ||
| 369 | typedef double3x3 type; | ||
| 370 | }; | ||
| 371 | |||
| 372 | template<> struct Matrix<double, 4, 3> { | ||
| 373 | static const size_t col = 4; | ||
| 374 | static const size_t row = 3; | ||
| 375 | typedef double scalar_t; | ||
| 376 | typedef double4x3 type; | ||
| 377 | }; | ||
| 378 | |||
| 379 | template<> struct Matrix<double, 2, 4> { | ||
| 380 | static const size_t col = 2; | ||
| 381 | static const size_t row = 4; | ||
| 382 | typedef double scalar_t; | ||
| 383 | typedef double2x4 type; | ||
| 384 | }; | ||
| 385 | |||
| 386 | template<> struct Matrix<double, 3, 4> { | ||
| 387 | static const size_t col = 3; | ||
| 388 | static const size_t row = 4; | ||
| 389 | typedef double scalar_t; | ||
| 390 | typedef double3x4 type; | ||
| 391 | }; | ||
| 392 | |||
| 393 | template<> struct Matrix<double, 4, 4> { | ||
| 394 | static const size_t col = 4; | ||
| 395 | static const size_t row = 4; | ||
| 396 | typedef double scalar_t; | ||
| 397 | typedef double4x4 type; | ||
| 398 | }; | ||
| 399 | |||
| 400 | template <> struct get_traits<float2x2> | ||
| 401 | { | ||
| 402 | using type = Matrix<float, 2, 2>; | ||
| 403 | }; | ||
| 404 | |||
| 405 | template <> struct get_traits<float3x2> | ||
| 406 | { | ||
| 407 | using type = Matrix<float, 3, 2>; | ||
| 408 | }; | ||
| 409 | |||
| 410 | template <> struct get_traits<float4x2> | ||
| 411 | { | ||
| 412 | using type = Matrix<float, 4, 2>; | ||
| 413 | }; | ||
| 414 | |||
| 415 | template <> struct get_traits<float2x3> | ||
| 416 | { | ||
| 417 | using type = Matrix<float, 2, 3>; | ||
| 418 | }; | ||
| 419 | |||
| 420 | template <> struct get_traits<float3x3> | ||
| 421 | { | ||
| 422 | using type = Matrix<float, 3, 3>; | ||
| 423 | }; | ||
| 424 | |||
| 425 | template <> struct get_traits<float4x3> | ||
| 426 | { | ||
| 427 | using type = Matrix<float, 4, 3>; | ||
| 428 | }; | ||
| 429 | |||
| 430 | template <> struct get_traits<float2x4> | ||
| 431 | { | ||
| 432 | using type = Matrix<float, 2, 4>; | ||
| 433 | }; | ||
| 434 | |||
| 435 | template <> struct get_traits<float3x4> | ||
| 436 | { | ||
| 437 | using type = Matrix<float, 3, 4>; | ||
| 438 | }; | ||
| 439 | |||
| 440 | template <> struct get_traits<float4x4> | ||
| 441 | { | ||
| 442 | using type = Matrix<float, 4, 4>; | ||
| 443 | }; | ||
| 444 | |||
| 445 | template <> struct get_traits<double2x2> | ||
| 446 | { | ||
| 447 | using type = Matrix<double, 2, 2>; | ||
| 448 | }; | ||
| 449 | |||
| 450 | template <> struct get_traits<double3x2> | ||
| 451 | { | ||
| 452 | using type = Matrix<double, 3, 2>; | ||
| 453 | }; | ||
| 454 | |||
| 455 | template <> struct get_traits<double4x2> | ||
| 456 | { | ||
| 457 | using type = Matrix<double, 4, 2>; | ||
| 458 | }; | ||
| 459 | |||
| 460 | template <> struct get_traits<double2x3> | ||
| 461 | { | ||
| 462 | using type = Matrix<double, 2, 3>; | ||
| 463 | }; | ||
| 464 | |||
| 465 | template <> struct get_traits<double3x3> | ||
| 466 | { | ||
| 467 | using type = Matrix<double, 3, 3>; | ||
| 468 | }; | ||
| 469 | |||
| 470 | template <> struct get_traits<double4x3> | ||
| 471 | { | ||
| 472 | using type = Matrix<double, 4, 3>; | ||
| 473 | }; | ||
| 474 | |||
| 475 | template <> struct get_traits<double2x4> | ||
| 476 | { | ||
| 477 | using type = Matrix<double, 2, 4>; | ||
| 478 | }; | ||
| 479 | |||
| 480 | template <> struct get_traits<double3x4> | ||
| 481 | { | ||
| 482 | using type = Matrix<double, 3, 4>; | ||
| 483 | }; | ||
| 484 | |||
| 485 | template <> struct get_traits<double4x4> | ||
| 486 | { | ||
| 487 | using type = Matrix<double, 4, 4>; | ||
| 488 | }; | ||
| 489 | |||
| 261 | } | 490 | } |
| 262 | #endif /* __cplusplus */ | 491 | #endif /* __cplusplus */ |
| 263 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | 492 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ |
lib/libc/include/any-macos-any/simd/quaternion.h created+1194| ... | @@ -0,0 +1,1194 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines functions for constructing and using quaternions. | ||
| 3 | * @copyright 2015-2016 Apple, Inc. All rights reserved. | ||
| 4 | * @unsorted */ | ||
| 5 | |||
| 6 | #ifndef SIMD_QUATERNIONS | ||
| 7 | #define SIMD_QUATERNIONS | ||
| 8 | |||
| 9 | #include <simd/base.h> | ||
| 10 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 11 | #include <simd/vector.h> | ||
| 12 | #include <simd/types.h> | ||
| 13 | |||
| 14 | #ifdef __cplusplus | ||
| 15 | extern "C" { | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* MARK: - C and Objective-C float interfaces */ | ||
| 19 | |||
| 20 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 21 | * | ||
| 22 | * @param ix The first component of the imaginary (vector) part. | ||
| 23 | * @param iy The second component of the imaginary (vector) part. | ||
| 24 | * @param iz The third component of the imaginary (vector) part. | ||
| 25 | * | ||
| 26 | * @param r The real (scalar) part. */ | ||
| 27 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float ix, float iy, float iz, float r) { | ||
| 28 | return (simd_quatf){ { ix, iy, iz, r } }; | ||
| 29 | } | ||
| 30 | |||
| 31 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 32 | * | ||
| 33 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 34 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 35 | static inline SIMD_NONCONST simd_quatf simd_quaternion(const float xyzr[4]) { | ||
| 36 | return (simd_quatf){ *(const simd_packed_float4 *)xyzr }; | ||
| 37 | } | ||
| 38 | |||
| 39 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 40 | * | ||
| 41 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 42 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 43 | * lane 3. */ | ||
| 44 | static inline SIMD_CFUNC simd_quatf simd_quaternion(simd_float4 xyzr) { | ||
| 45 | return (simd_quatf){ xyzr }; | ||
| 46 | } | ||
| 47 | |||
| 48 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 49 | * `axis`. */ | ||
| 50 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis); | ||
| 51 | |||
| 52 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 53 | * | ||
| 54 | * @param from A normalized three-element vector. | ||
| 55 | * @param to A normalized three-element vector. | ||
| 56 | * | ||
| 57 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 58 | * `to` point in opposite directions (to within machine precision), an | ||
| 59 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 60 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to); | ||
| 61 | |||
| 62 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 63 | * | ||
| 64 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 65 | * is undefined. */ | ||
| 66 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix); | ||
| 67 | |||
| 68 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 69 | * | ||
| 70 | * @discussion The last row and column of the matrix are ignored. This | ||
| 71 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 72 | * submatrix . */ | ||
| 73 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix); | ||
| 74 | |||
| 75 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 76 | static inline SIMD_CFUNC float simd_real(simd_quatf q) { | ||
| 77 | return q.vector.w; | ||
| 78 | } | ||
| 79 | |||
| 80 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 81 | static inline SIMD_CFUNC simd_float3 simd_imag(simd_quatf q) { | ||
| 82 | return q.vector.xyz; | ||
| 83 | } | ||
| 84 | |||
| 85 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 86 | static inline SIMD_CFUNC float simd_angle(simd_quatf q); | ||
| 87 | |||
| 88 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 89 | * action of the quaternion `q` rotates. */ | ||
| 90 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q); | ||
| 91 | |||
| 92 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 93 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q); | ||
| 94 | |||
| 95 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 96 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q); | ||
| 97 | |||
| 98 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 99 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q); | ||
| 100 | |||
| 101 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 102 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a); | ||
| 103 | |||
| 104 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 105 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q); | ||
| 106 | |||
| 107 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 108 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q); | ||
| 109 | |||
| 110 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 111 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q); | ||
| 112 | |||
| 113 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 114 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q); | ||
| 115 | |||
| 116 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 117 | * four-dimensional vectors. */ | ||
| 118 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q); | ||
| 119 | |||
| 120 | /*! @abstract The length of the quaternion `q`. */ | ||
| 121 | static inline SIMD_CFUNC float simd_length(simd_quatf q); | ||
| 122 | |||
| 123 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 124 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q); | ||
| 125 | |||
| 126 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 127 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v); | ||
| 128 | |||
| 129 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 130 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 131 | * | ||
| 132 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 133 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 134 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 135 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 136 | * | ||
| 137 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 138 | * quaternions, because it is primarily used for spline interpolation of | ||
| 139 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 140 | * quaternions, you can use the following approach: | ||
| 141 | * | ||
| 142 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 143 | * logq = log(simd_recip(scale)*q); | ||
| 144 | * logq.real += log(scale); | ||
| 145 | * return logq; */ | ||
| 146 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q); | ||
| 147 | |||
| 148 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 149 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 150 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q); | ||
| 151 | |||
| 152 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 153 | * quaternions `q0` and `q1`. */ | ||
| 154 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t); | ||
| 155 | |||
| 156 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 157 | * quaternions `q0` and `q1`. */ | ||
| 158 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t); | ||
| 159 | |||
| 160 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 161 | * | ||
| 162 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 163 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 164 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 165 | * rotations. */ | ||
| 166 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 167 | |||
| 168 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 169 | * | ||
| 170 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 171 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 172 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 173 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 174 | * curve does not hold on the sphere. */ | ||
| 175 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 176 | |||
| 177 | #ifdef __cplusplus | ||
| 178 | } /* extern "C" */ | ||
| 179 | /* MARK: - C++ float interfaces */ | ||
| 180 | |||
| 181 | namespace simd { | ||
| 182 | struct quatf : ::simd_quatf { | ||
| 183 | /*! @abstract The identity quaternion. */ | ||
| 184 | quatf( ) : ::simd_quatf(::simd_quaternion((float4){0,0,0,1})) { } | ||
| 185 | |||
| 186 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 187 | quatf(::simd_quatf q) : ::simd_quatf(q) { } | ||
| 188 | |||
| 189 | /*! @abstract Constructs a quaternion from components. */ | ||
| 190 | quatf(float ix, float iy, float iz, float r) : ::simd_quatf(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 191 | |||
| 192 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 193 | quatf(const float xyzr[4]) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 194 | |||
| 195 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 196 | quatf(float4 xyzr) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 197 | |||
| 198 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 199 | * radians. */ | ||
| 200 | quatf(float angle, float3 axis) : ::simd_quatf(::simd_quaternion(angle, axis)) { } | ||
| 201 | |||
| 202 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 203 | quatf(float3 from, float3 to) : ::simd_quatf(::simd_quaternion(from, to)) { } | ||
| 204 | |||
| 205 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 206 | quatf(::simd_float3x3 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 207 | |||
| 208 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 209 | quatf(::simd_float4x4 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 210 | |||
| 211 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 212 | float real(void) const { return ::simd_real(*this); } | ||
| 213 | |||
| 214 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 215 | float3 imag(void) const { return ::simd_imag(*this); } | ||
| 216 | |||
| 217 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 218 | float angle(void) const { return ::simd_angle(*this); } | ||
| 219 | |||
| 220 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 221 | float3 axis(void) const { return ::simd_axis(*this); } | ||
| 222 | |||
| 223 | /*! @abstract The length of the quaternion. */ | ||
| 224 | float length(void) const { return ::simd_length(*this); } | ||
| 225 | |||
| 226 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 227 | float3 operator()(const ::simd_float3 v) const { return ::simd_act(*this, v); } | ||
| 228 | }; | ||
| 229 | |||
| 230 | static SIMD_CPPFUNC quatf operator+(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_add(p, q); } | ||
| 231 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_sub(p, q); } | ||
| 232 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p) { return ::simd_negate(p); } | ||
| 233 | static SIMD_CPPFUNC quatf operator*(const float r, const ::simd_quatf p) { return ::simd_mul(r, p); } | ||
| 234 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const float r) { return ::simd_mul(p, r); } | ||
| 235 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, q); } | ||
| 236 | static SIMD_CPPFUNC quatf operator/(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 237 | static SIMD_CPPFUNC quatf operator+=(quatf &p, const ::simd_quatf q) { return p = p+q; } | ||
| 238 | static SIMD_CPPFUNC quatf operator-=(quatf &p, const ::simd_quatf q) { return p = p-q; } | ||
| 239 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const float r) { return p = p*r; } | ||
| 240 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const ::simd_quatf q) { return p = p*q; } | ||
| 241 | static SIMD_CPPFUNC quatf operator/=(quatf &p, const ::simd_quatf q) { return p = p/q; } | ||
| 242 | |||
| 243 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 244 | static SIMD_CPPFUNC quatf conjugate(const ::simd_quatf p) { return ::simd_conjugate(p); } | ||
| 245 | |||
| 246 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 247 | static SIMD_CPPFUNC quatf inverse(const ::simd_quatf p) { return ::simd_inverse(p); } | ||
| 248 | |||
| 249 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 250 | * four-dimensional vectors. */ | ||
| 251 | static SIMD_CPPFUNC float dot(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_dot(p, q); } | ||
| 252 | |||
| 253 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 254 | static SIMD_CPPFUNC quatf normalize(const ::simd_quatf p) { return ::simd_normalize(p); } | ||
| 255 | |||
| 256 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 257 | static SIMD_CPPFUNC quatf log(const ::simd_quatf q) { return ::__tg_log(q); } | ||
| 258 | |||
| 259 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 260 | static SIMD_CPPFUNC quatf exp(const ::simd_quatf q) { return ::__tg_exp(q); } | ||
| 261 | |||
| 262 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 263 | * quaternions `q0` and `q1`. */ | ||
| 264 | static SIMD_CPPFUNC quatf slerp(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp(p0, p1, t); } | ||
| 265 | |||
| 266 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 267 | * quaternions `q0` and `q1`. */ | ||
| 268 | static SIMD_CPPFUNC quatf slerp_longest(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 269 | |||
| 270 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 271 | * | ||
| 272 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 273 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 274 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 275 | * rotations. */ | ||
| 276 | static SIMD_CPPFUNC quatf spline(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 277 | |||
| 278 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 279 | * | ||
| 280 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 281 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 282 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 283 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 284 | * curve does not hold on the sphere. */ | ||
| 285 | static SIMD_CPPFUNC quatf bezier(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 286 | } | ||
| 287 | |||
| 288 | extern "C" { | ||
| 289 | #endif /* __cplusplus */ | ||
| 290 | |||
| 291 | /* MARK: - float implementations */ | ||
| 292 | |||
| 293 | #include <simd/math.h> | ||
| 294 | #include <simd/geometry.h> | ||
| 295 | |||
| 296 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 297 | * dispatching in tgmath.h to work its magic. */ | ||
| 298 | static simd_quatf __attribute__((__overloadable__)) __tg_promote(simd_quatf); | ||
| 299 | |||
| 300 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 301 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 302 | * with the angle-axis constructor. */ | ||
| 303 | static inline SIMD_CFUNC simd_quatf _simd_quaternion(simd_float3 imag, float real) { | ||
| 304 | return simd_quaternion(simd_make_float4(imag, real)); | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis) { | ||
| 308 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 309 | } | ||
| 310 | |||
| 311 | static inline SIMD_CFUNC float simd_angle(simd_quatf q) { | ||
| 312 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 313 | } | ||
| 314 | |||
| 315 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q) { | ||
| 316 | return simd_normalize(q.vector.xyz); | ||
| 317 | } | ||
| 318 | |||
| 319 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q) { | ||
| 320 | return simd_quaternion(p.vector + q.vector); | ||
| 321 | } | ||
| 322 | |||
| 323 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q) { | ||
| 324 | return simd_quaternion(p.vector - q.vector); | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q) { | ||
| 328 | #pragma STDC FP_CONTRACT ON | ||
| 329 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 330 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 331 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 332 | p.vector.w * q.vector)); | ||
| 333 | } | ||
| 334 | |||
| 335 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a) { | ||
| 336 | return simd_quaternion(a * q.vector); | ||
| 337 | } | ||
| 338 | |||
| 339 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q) { | ||
| 340 | return simd_mul(q,a); | ||
| 341 | } | ||
| 342 | |||
| 343 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q) { | ||
| 344 | return simd_quaternion(q.vector * (simd_float4){-1,-1,-1, 1}); | ||
| 345 | } | ||
| 346 | |||
| 347 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q) { | ||
| 348 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 349 | } | ||
| 350 | |||
| 351 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q) { | ||
| 352 | return simd_quaternion(-q.vector); | ||
| 353 | } | ||
| 354 | |||
| 355 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q) { | ||
| 356 | return simd_dot(p.vector, q.vector); | ||
| 357 | } | ||
| 358 | |||
| 359 | static inline SIMD_CFUNC float simd_length(simd_quatf q) { | ||
| 360 | return simd_length(q.vector); | ||
| 361 | } | ||
| 362 | |||
| 363 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q) { | ||
| 364 | float length_squared = simd_length_squared(q.vector); | ||
| 365 | if (length_squared == 0) { | ||
| 366 | return simd_quaternion((simd_float4){0,0,0,1}); | ||
| 367 | } | ||
| 368 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 369 | } | ||
| 370 | |||
| 371 | #if defined __arm__ || defined __arm64__ | ||
| 372 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 373 | * | ||
| 374 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 375 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 376 | * implementation detail and you should not call it directly. It may be | ||
| 377 | * removed or modified in future versions of the simd module. */ | ||
| 378 | static inline SIMD_CFUNC simd_quatf _simd_mul_vq(simd_float3 v, simd_quatf q) { | ||
| 379 | #pragma STDC FP_CONTRACT ON | ||
| 380 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 381 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 382 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 383 | } | ||
| 384 | #endif | ||
| 385 | |||
| 386 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v) { | ||
| 387 | #if defined __arm__ || defined __arm64__ | ||
| 388 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 389 | #else | ||
| 390 | #pragma STDC FP_CONTRACT ON | ||
| 391 | simd_float3 t = 2*simd_cross(simd_imag(q),v); | ||
| 392 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 393 | #endif | ||
| 394 | } | ||
| 395 | |||
| 396 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q) { | ||
| 397 | float real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 398 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 399 | simd_float3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 400 | return _simd_quaternion(imag, real); | ||
| 401 | } | ||
| 402 | |||
| 403 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q) { | ||
| 404 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 405 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 406 | // axis) constructor to generate `unit`. | ||
| 407 | float angle = simd_length(simd_imag(q)); | ||
| 408 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 409 | simd_float3 axis = simd_normalize(simd_imag(q)); | ||
| 410 | simd_quatf unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 411 | return simd_mul(exp(simd_real(q)), unit); | ||
| 412 | } | ||
| 413 | |||
| 414 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 415 | * initializer. | ||
| 416 | * | ||
| 417 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 418 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 419 | * angles. This function is an implementation detail and you should not | ||
| 420 | * call it directly. It may be removed or modified in future versions of the | ||
| 421 | * simd module. */ | ||
| 422 | static inline SIMD_CFUNC simd_quatf _simd_quaternion_reduced(simd_float3 from, simd_float3 to) { | ||
| 423 | simd_float3 half = simd_normalize(from + to); | ||
| 424 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 425 | } | ||
| 426 | |||
| 427 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to) { | ||
| 428 | |||
| 429 | // If the angle between from and to is not too big, we can compute the | ||
| 430 | // rotation accurately using a simple implementation. | ||
| 431 | if (simd_dot(from, to) >= 0) { | ||
| 432 | return _simd_quaternion_reduced(from, to); | ||
| 433 | } | ||
| 434 | |||
| 435 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 436 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 437 | // accuracy. | ||
| 438 | simd_float3 half = simd_normalize(from) + simd_normalize(to); | ||
| 439 | |||
| 440 | if (simd_length_squared(half) <= 0x1p-46f) { | ||
| 441 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 442 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 443 | // to the vectors, and use an angle of pi radians. | ||
| 444 | simd_float3 abs_from = simd_abs(from); | ||
| 445 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 446 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){1,0,0})), 0.f); | ||
| 447 | else if (abs_from.y <= abs_from.z) | ||
| 448 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,1,0})), 0.f); | ||
| 449 | else | ||
| 450 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f); | ||
| 451 | } | ||
| 452 | |||
| 453 | // Compute the two-step rotation. */ | ||
| 454 | half = simd_normalize(half); | ||
| 455 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 456 | _simd_quaternion_reduced(half, to)); | ||
| 457 | } | ||
| 458 | |||
| 459 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix) { | ||
| 460 | const simd_float3 *mat = matrix.columns; | ||
| 461 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 462 | if (trace >= 0.0) { | ||
| 463 | float r = 2*sqrt(1 + trace); | ||
| 464 | float rinv = simd_recip(r); | ||
| 465 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 466 | rinv*(mat[2][0] - mat[0][2]), | ||
| 467 | rinv*(mat[0][1] - mat[1][0]), | ||
| 468 | r/4); | ||
| 469 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 470 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 471 | float rinv = simd_recip(r); | ||
| 472 | return simd_quaternion(r/4, | ||
| 473 | rinv*(mat[0][1] + mat[1][0]), | ||
| 474 | rinv*(mat[0][2] + mat[2][0]), | ||
| 475 | rinv*(mat[1][2] - mat[2][1])); | ||
| 476 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 477 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 478 | float rinv = simd_recip(r); | ||
| 479 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 480 | r/4, | ||
| 481 | rinv*(mat[1][2] + mat[2][1]), | ||
| 482 | rinv*(mat[2][0] - mat[0][2])); | ||
| 483 | } else { | ||
| 484 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 485 | float rinv = simd_recip(r); | ||
| 486 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 487 | rinv*(mat[1][2] + mat[2][1]), | ||
| 488 | r/4, | ||
| 489 | rinv*(mat[0][1] - mat[1][0])); | ||
| 490 | } | ||
| 491 | } | ||
| 492 | |||
| 493 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix) { | ||
| 494 | const simd_float4 *mat = matrix.columns; | ||
| 495 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 496 | if (trace >= 0.0) { | ||
| 497 | float r = 2*sqrt(1 + trace); | ||
| 498 | float rinv = simd_recip(r); | ||
| 499 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 500 | rinv*(mat[2][0] - mat[0][2]), | ||
| 501 | rinv*(mat[0][1] - mat[1][0]), | ||
| 502 | r/4); | ||
| 503 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 504 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 505 | float rinv = simd_recip(r); | ||
| 506 | return simd_quaternion(r/4, | ||
| 507 | rinv*(mat[0][1] + mat[1][0]), | ||
| 508 | rinv*(mat[0][2] + mat[2][0]), | ||
| 509 | rinv*(mat[1][2] - mat[2][1])); | ||
| 510 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 511 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 512 | float rinv = simd_recip(r); | ||
| 513 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 514 | r/4, | ||
| 515 | rinv*(mat[1][2] + mat[2][1]), | ||
| 516 | rinv*(mat[2][0] - mat[0][2])); | ||
| 517 | } else { | ||
| 518 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 519 | float rinv = simd_recip(r); | ||
| 520 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 521 | rinv*(mat[1][2] + mat[2][1]), | ||
| 522 | r/4, | ||
| 523 | rinv*(mat[0][1] - mat[1][0])); | ||
| 524 | } | ||
| 525 | } | ||
| 526 | |||
| 527 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 528 | * | ||
| 529 | * @discussion This function is an implementation detail and you should not | ||
| 530 | * call it directly. It may be removed or modified in future versions of the | ||
| 531 | * simd module. */ | ||
| 532 | static SIMD_NOINLINE float _simd_angle(simd_quatf p, simd_quatf q) { | ||
| 533 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 534 | } | ||
| 535 | |||
| 536 | /*! @abstract sin(x)/x. | ||
| 537 | * | ||
| 538 | * @discussion This function is an implementation detail and you should not | ||
| 539 | * call it directly. It may be removed or modified in future versions of the | ||
| 540 | * simd module. */ | ||
| 541 | static SIMD_CFUNC float _simd_sinc(float x) { | ||
| 542 | if (x == 0) return 1; | ||
| 543 | return sin(x)/x; | ||
| 544 | } | ||
| 545 | |||
| 546 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 547 | * | ||
| 548 | * @discussion This function may interpolate along either the longer or | ||
| 549 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 550 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 551 | * instead of calling this directly. */ | ||
| 552 | static SIMD_NOINLINE simd_quatf _simd_slerp_internal(simd_quatf q0, simd_quatf q1, float t) { | ||
| 553 | float s = 1 - t; | ||
| 554 | float a = _simd_angle(q0, q1); | ||
| 555 | float r = simd_recip(_simd_sinc(a)); | ||
| 556 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 557 | } | ||
| 558 | |||
| 559 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t) { | ||
| 560 | if (simd_dot(q0, q1) >= 0) | ||
| 561 | return _simd_slerp_internal(q0, q1, t); | ||
| 562 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 563 | } | ||
| 564 | |||
| 565 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t) { | ||
| 566 | if (simd_dot(q0, q1) >= 0) | ||
| 567 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 568 | return _simd_slerp_internal(q0, q1, t); | ||
| 569 | } | ||
| 570 | |||
| 571 | /*! @discussion This function is an implementation detail and you should not | ||
| 572 | * call it directly. It may be removed or modified in future versions of the | ||
| 573 | * simd module. */ | ||
| 574 | static SIMD_NOINLINE simd_quatf _simd_intermediate(simd_quatf q0, simd_quatf q1, simd_quatf q2) { | ||
| 575 | simd_quatf p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 576 | simd_quatf p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 577 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 578 | } | ||
| 579 | |||
| 580 | /*! @discussion This function is an implementation detail and you should not | ||
| 581 | * call it directly. It may be removed or modified in future versions of the | ||
| 582 | * simd module. */ | ||
| 583 | static SIMD_NOINLINE simd_quatf _simd_squad(simd_quatf q0, simd_quatf qa, simd_quatf qb, simd_quatf q1, float t) { | ||
| 584 | simd_quatf r0 = _simd_slerp_internal(q0, q1, t); | ||
| 585 | simd_quatf r1 = _simd_slerp_internal(qa, qb, t); | ||
| 586 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 587 | } | ||
| 588 | |||
| 589 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 590 | simd_quatf qa = _simd_intermediate(q0, q1, q2); | ||
| 591 | simd_quatf qb = _simd_intermediate(q1, q2, q3); | ||
| 592 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 593 | } | ||
| 594 | |||
| 595 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 596 | simd_quatf q01 = _simd_slerp_internal(q0, q1, t); | ||
| 597 | simd_quatf q12 = _simd_slerp_internal(q1, q2, t); | ||
| 598 | simd_quatf q23 = _simd_slerp_internal(q2, q3, t); | ||
| 599 | simd_quatf q012 = _simd_slerp_internal(q01, q12, t); | ||
| 600 | simd_quatf q123 = _simd_slerp_internal(q12, q23, t); | ||
| 601 | return _simd_slerp_internal(q012, q123, t); | ||
| 602 | } | ||
| 603 | |||
| 604 | /* MARK: - C and Objective-C double interfaces */ | ||
| 605 | |||
| 606 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 607 | * | ||
| 608 | * @param ix The first component of the imaginary (vector) part. | ||
| 609 | * @param iy The second component of the imaginary (vector) part. | ||
| 610 | * @param iz The third component of the imaginary (vector) part. | ||
| 611 | * | ||
| 612 | * @param r The real (scalar) part. */ | ||
| 613 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double ix, double iy, double iz, double r) { | ||
| 614 | return (simd_quatd){ { ix, iy, iz, r } }; | ||
| 615 | } | ||
| 616 | |||
| 617 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 618 | * | ||
| 619 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 620 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 621 | static inline SIMD_NONCONST simd_quatd simd_quaternion(const double xyzr[4]) { | ||
| 622 | return (simd_quatd){ *(const simd_packed_double4 *)xyzr }; | ||
| 623 | } | ||
| 624 | |||
| 625 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 626 | * | ||
| 627 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 628 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 629 | * lane 3. */ | ||
| 630 | static inline SIMD_CFUNC simd_quatd simd_quaternion(simd_double4 xyzr) { | ||
| 631 | return (simd_quatd){ xyzr }; | ||
| 632 | } | ||
| 633 | |||
| 634 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 635 | * `axis`. */ | ||
| 636 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis); | ||
| 637 | |||
| 638 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 639 | * | ||
| 640 | * @param from A normalized three-element vector. | ||
| 641 | * @param to A normalized three-element vector. | ||
| 642 | * | ||
| 643 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 644 | * `to` point in opposite directions (to within machine precision), an | ||
| 645 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 646 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to); | ||
| 647 | |||
| 648 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 649 | * | ||
| 650 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 651 | * is undefined. */ | ||
| 652 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix); | ||
| 653 | |||
| 654 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 655 | * | ||
| 656 | * @discussion The last row and column of the matrix are ignored. This | ||
| 657 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 658 | * submatrix . */ | ||
| 659 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix); | ||
| 660 | |||
| 661 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 662 | static inline SIMD_CFUNC double simd_real(simd_quatd q) { | ||
| 663 | return q.vector.w; | ||
| 664 | } | ||
| 665 | |||
| 666 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 667 | static inline SIMD_CFUNC simd_double3 simd_imag(simd_quatd q) { | ||
| 668 | return q.vector.xyz; | ||
| 669 | } | ||
| 670 | |||
| 671 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 672 | static inline SIMD_CFUNC double simd_angle(simd_quatd q); | ||
| 673 | |||
| 674 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 675 | * action of the quaternion `q` rotates. */ | ||
| 676 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q); | ||
| 677 | |||
| 678 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 679 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q); | ||
| 680 | |||
| 681 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 682 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q); | ||
| 683 | |||
| 684 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 685 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q); | ||
| 686 | |||
| 687 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 688 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a); | ||
| 689 | |||
| 690 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 691 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q); | ||
| 692 | |||
| 693 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 694 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q); | ||
| 695 | |||
| 696 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 697 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q); | ||
| 698 | |||
| 699 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 700 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q); | ||
| 701 | |||
| 702 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 703 | * four-dimensional vectors. */ | ||
| 704 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q); | ||
| 705 | |||
| 706 | /*! @abstract The length of the quaternion `q`. */ | ||
| 707 | static inline SIMD_CFUNC double simd_length(simd_quatd q); | ||
| 708 | |||
| 709 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 710 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q); | ||
| 711 | |||
| 712 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 713 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v); | ||
| 714 | |||
| 715 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 716 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 717 | * | ||
| 718 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 719 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 720 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 721 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 722 | * | ||
| 723 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 724 | * quaternions, because it is primarily used for spline interpolation of | ||
| 725 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 726 | * quaternions, you can use the following approach: | ||
| 727 | * | ||
| 728 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 729 | * logq = log(simd_recip(scale)*q); | ||
| 730 | * logq.real += log(scale); | ||
| 731 | * return logq; */ | ||
| 732 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q); | ||
| 733 | |||
| 734 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 735 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 736 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q); | ||
| 737 | |||
| 738 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 739 | * quaternions `q0` and `q1`. */ | ||
| 740 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t); | ||
| 741 | |||
| 742 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 743 | * quaternions `q0` and `q1`. */ | ||
| 744 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t); | ||
| 745 | |||
| 746 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 747 | * | ||
| 748 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 749 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 750 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 751 | * rotations. */ | ||
| 752 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 753 | |||
| 754 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 755 | * | ||
| 756 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 757 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 758 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 759 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 760 | * curve does not hold on the sphere. */ | ||
| 761 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 762 | |||
| 763 | #ifdef __cplusplus | ||
| 764 | } /* extern "C" */ | ||
| 765 | /* MARK: - C++ double interfaces */ | ||
| 766 | |||
| 767 | namespace simd { | ||
| 768 | struct quatd : ::simd_quatd { | ||
| 769 | /*! @abstract The identity quaternion. */ | ||
| 770 | quatd( ) : ::simd_quatd(::simd_quaternion((double4){0,0,0,1})) { } | ||
| 771 | |||
| 772 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 773 | quatd(::simd_quatd q) : ::simd_quatd(q) { } | ||
| 774 | |||
| 775 | /*! @abstract Constructs a quaternion from components. */ | ||
| 776 | quatd(double ix, double iy, double iz, double r) : ::simd_quatd(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 777 | |||
| 778 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 779 | quatd(const double xyzr[4]) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 780 | |||
| 781 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 782 | quatd(double4 xyzr) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 783 | |||
| 784 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 785 | * radians. */ | ||
| 786 | quatd(double angle, double3 axis) : ::simd_quatd(::simd_quaternion(angle, axis)) { } | ||
| 787 | |||
| 788 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 789 | quatd(double3 from, double3 to) : ::simd_quatd(::simd_quaternion(from, to)) { } | ||
| 790 | |||
| 791 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 792 | quatd(::simd_double3x3 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 793 | |||
| 794 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 795 | quatd(::simd_double4x4 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 796 | |||
| 797 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 798 | double real(void) const { return ::simd_real(*this); } | ||
| 799 | |||
| 800 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 801 | double3 imag(void) const { return ::simd_imag(*this); } | ||
| 802 | |||
| 803 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 804 | double angle(void) const { return ::simd_angle(*this); } | ||
| 805 | |||
| 806 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 807 | double3 axis(void) const { return ::simd_axis(*this); } | ||
| 808 | |||
| 809 | /*! @abstract The length of the quaternion. */ | ||
| 810 | double length(void) const { return ::simd_length(*this); } | ||
| 811 | |||
| 812 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 813 | double3 operator()(const ::simd_double3 v) const { return ::simd_act(*this, v); } | ||
| 814 | }; | ||
| 815 | |||
| 816 | static SIMD_CPPFUNC quatd operator+(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_add(p, q); } | ||
| 817 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_sub(p, q); } | ||
| 818 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p) { return ::simd_negate(p); } | ||
| 819 | static SIMD_CPPFUNC quatd operator*(const double r, const ::simd_quatd p) { return ::simd_mul(r, p); } | ||
| 820 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const double r) { return ::simd_mul(p, r); } | ||
| 821 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, q); } | ||
| 822 | static SIMD_CPPFUNC quatd operator/(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 823 | static SIMD_CPPFUNC quatd operator+=(quatd &p, const ::simd_quatd q) { return p = p+q; } | ||
| 824 | static SIMD_CPPFUNC quatd operator-=(quatd &p, const ::simd_quatd q) { return p = p-q; } | ||
| 825 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const double r) { return p = p*r; } | ||
| 826 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const ::simd_quatd q) { return p = p*q; } | ||
| 827 | static SIMD_CPPFUNC quatd operator/=(quatd &p, const ::simd_quatd q) { return p = p/q; } | ||
| 828 | |||
| 829 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 830 | static SIMD_CPPFUNC quatd conjugate(const ::simd_quatd p) { return ::simd_conjugate(p); } | ||
| 831 | |||
| 832 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 833 | static SIMD_CPPFUNC quatd inverse(const ::simd_quatd p) { return ::simd_inverse(p); } | ||
| 834 | |||
| 835 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 836 | * four-dimensional vectors. */ | ||
| 837 | static SIMD_CPPFUNC double dot(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_dot(p, q); } | ||
| 838 | |||
| 839 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 840 | static SIMD_CPPFUNC quatd normalize(const ::simd_quatd p) { return ::simd_normalize(p); } | ||
| 841 | |||
| 842 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 843 | static SIMD_CPPFUNC quatd log(const ::simd_quatd q) { return ::__tg_log(q); } | ||
| 844 | |||
| 845 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 846 | static SIMD_CPPFUNC quatd exp(const ::simd_quatd q) { return ::__tg_exp(q); } | ||
| 847 | |||
| 848 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 849 | * quaternions `q0` and `q1`. */ | ||
| 850 | static SIMD_CPPFUNC quatd slerp(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp(p0, p1, t); } | ||
| 851 | |||
| 852 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 853 | * quaternions `q0` and `q1`. */ | ||
| 854 | static SIMD_CPPFUNC quatd slerp_longest(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 855 | |||
| 856 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 857 | * | ||
| 858 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 859 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 860 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 861 | * rotations. */ | ||
| 862 | static SIMD_CPPFUNC quatd spline(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 863 | |||
| 864 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 865 | * | ||
| 866 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 867 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 868 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 869 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 870 | * curve does not hold on the sphere. */ | ||
| 871 | static SIMD_CPPFUNC quatd bezier(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 872 | } | ||
| 873 | |||
| 874 | extern "C" { | ||
| 875 | #endif /* __cplusplus */ | ||
| 876 | |||
| 877 | /* MARK: - double implementations */ | ||
| 878 | |||
| 879 | #include <simd/math.h> | ||
| 880 | #include <simd/geometry.h> | ||
| 881 | |||
| 882 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 883 | * dispatching in tgmath.h to work its magic. */ | ||
| 884 | static simd_quatd __attribute__((__overloadable__)) __tg_promote(simd_quatd); | ||
| 885 | |||
| 886 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 887 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 888 | * with the angle-axis constructor. */ | ||
| 889 | static inline SIMD_CFUNC simd_quatd _simd_quaternion(simd_double3 imag, double real) { | ||
| 890 | return simd_quaternion(simd_make_double4(imag, real)); | ||
| 891 | } | ||
| 892 | |||
| 893 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis) { | ||
| 894 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 895 | } | ||
| 896 | |||
| 897 | static inline SIMD_CFUNC double simd_angle(simd_quatd q) { | ||
| 898 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 899 | } | ||
| 900 | |||
| 901 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q) { | ||
| 902 | return simd_normalize(q.vector.xyz); | ||
| 903 | } | ||
| 904 | |||
| 905 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q) { | ||
| 906 | return simd_quaternion(p.vector + q.vector); | ||
| 907 | } | ||
| 908 | |||
| 909 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q) { | ||
| 910 | return simd_quaternion(p.vector - q.vector); | ||
| 911 | } | ||
| 912 | |||
| 913 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q) { | ||
| 914 | #pragma STDC FP_CONTRACT ON | ||
| 915 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 916 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 917 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 918 | p.vector.w * q.vector)); | ||
| 919 | } | ||
| 920 | |||
| 921 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a) { | ||
| 922 | return simd_quaternion(a * q.vector); | ||
| 923 | } | ||
| 924 | |||
| 925 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q) { | ||
| 926 | return simd_mul(q,a); | ||
| 927 | } | ||
| 928 | |||
| 929 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q) { | ||
| 930 | return simd_quaternion(q.vector * (simd_double4){-1,-1,-1, 1}); | ||
| 931 | } | ||
| 932 | |||
| 933 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q) { | ||
| 934 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 935 | } | ||
| 936 | |||
| 937 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q) { | ||
| 938 | return simd_quaternion(-q.vector); | ||
| 939 | } | ||
| 940 | |||
| 941 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q) { | ||
| 942 | return simd_dot(p.vector, q.vector); | ||
| 943 | } | ||
| 944 | |||
| 945 | static inline SIMD_CFUNC double simd_length(simd_quatd q) { | ||
| 946 | return simd_length(q.vector); | ||
| 947 | } | ||
| 948 | |||
| 949 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q) { | ||
| 950 | double length_squared = simd_length_squared(q.vector); | ||
| 951 | if (length_squared == 0) { | ||
| 952 | return simd_quaternion((simd_double4){0,0,0,1}); | ||
| 953 | } | ||
| 954 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 955 | } | ||
| 956 | |||
| 957 | #if defined __arm__ || defined __arm64__ | ||
| 958 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 959 | * | ||
| 960 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 961 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 962 | * implementation detail and you should not call it directly. It may be | ||
| 963 | * removed or modified in future versions of the simd module. */ | ||
| 964 | static inline SIMD_CFUNC simd_quatd _simd_mul_vq(simd_double3 v, simd_quatd q) { | ||
| 965 | #pragma STDC FP_CONTRACT ON | ||
| 966 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 967 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 968 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 969 | } | ||
| 970 | #endif | ||
| 971 | |||
| 972 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v) { | ||
| 973 | #if defined __arm__ || defined __arm64__ | ||
| 974 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 975 | #else | ||
| 976 | #pragma STDC FP_CONTRACT ON | ||
| 977 | simd_double3 t = 2*simd_cross(simd_imag(q),v); | ||
| 978 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 979 | #endif | ||
| 980 | } | ||
| 981 | |||
| 982 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q) { | ||
| 983 | double real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 984 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 985 | simd_double3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 986 | return _simd_quaternion(imag, real); | ||
| 987 | } | ||
| 988 | |||
| 989 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q) { | ||
| 990 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 991 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 992 | // axis) constructor to generate `unit`. | ||
| 993 | double angle = simd_length(simd_imag(q)); | ||
| 994 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 995 | simd_double3 axis = simd_normalize(simd_imag(q)); | ||
| 996 | simd_quatd unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 997 | return simd_mul(exp(simd_real(q)), unit); | ||
| 998 | } | ||
| 999 | |||
| 1000 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 1001 | * initializer. | ||
| 1002 | * | ||
| 1003 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 1004 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 1005 | * angles. This function is an implementation detail and you should not | ||
| 1006 | * call it directly. It may be removed or modified in future versions of the | ||
| 1007 | * simd module. */ | ||
| 1008 | static inline SIMD_CFUNC simd_quatd _simd_quaternion_reduced(simd_double3 from, simd_double3 to) { | ||
| 1009 | simd_double3 half = simd_normalize(from + to); | ||
| 1010 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to) { | ||
| 1014 | |||
| 1015 | // If the angle between from and to is not too big, we can compute the | ||
| 1016 | // rotation accurately using a simple implementation. | ||
| 1017 | if (simd_dot(from, to) >= 0) { | ||
| 1018 | return _simd_quaternion_reduced(from, to); | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 1022 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 1023 | // accuracy. | ||
| 1024 | simd_double3 half = simd_normalize(from) + simd_normalize(to); | ||
| 1025 | |||
| 1026 | if (simd_length_squared(half) <= 0x1p-104) { | ||
| 1027 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 1028 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 1029 | // to the vectors, and use an angle of pi radians. | ||
| 1030 | simd_double3 abs_from = simd_abs(from); | ||
| 1031 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 1032 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){1,0,0})), 0.f); | ||
| 1033 | else if (abs_from.y <= abs_from.z) | ||
| 1034 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,1,0})), 0.f); | ||
| 1035 | else | ||
| 1036 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f); | ||
| 1037 | } | ||
| 1038 | |||
| 1039 | // Compute the two-step rotation. */ | ||
| 1040 | half = simd_normalize(half); | ||
| 1041 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 1042 | _simd_quaternion_reduced(half, to)); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix) { | ||
| 1046 | const simd_double3 *mat = matrix.columns; | ||
| 1047 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1048 | if (trace >= 0.0) { | ||
| 1049 | double r = 2*sqrt(1 + trace); | ||
| 1050 | double rinv = simd_recip(r); | ||
| 1051 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1052 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1053 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1054 | r/4); | ||
| 1055 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1056 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1057 | double rinv = simd_recip(r); | ||
| 1058 | return simd_quaternion(r/4, | ||
| 1059 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1060 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1061 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1062 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1063 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1064 | double rinv = simd_recip(r); | ||
| 1065 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1066 | r/4, | ||
| 1067 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1068 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1069 | } else { | ||
| 1070 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1071 | double rinv = simd_recip(r); | ||
| 1072 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1073 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1074 | r/4, | ||
| 1075 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1076 | } | ||
| 1077 | } | ||
| 1078 | |||
| 1079 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix) { | ||
| 1080 | const simd_double4 *mat = matrix.columns; | ||
| 1081 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1082 | if (trace >= 0.0) { | ||
| 1083 | double r = 2*sqrt(1 + trace); | ||
| 1084 | double rinv = simd_recip(r); | ||
| 1085 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1086 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1087 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1088 | r/4); | ||
| 1089 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1090 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1091 | double rinv = simd_recip(r); | ||
| 1092 | return simd_quaternion(r/4, | ||
| 1093 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1094 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1095 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1096 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1097 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1098 | double rinv = simd_recip(r); | ||
| 1099 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1100 | r/4, | ||
| 1101 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1102 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1103 | } else { | ||
| 1104 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1105 | double rinv = simd_recip(r); | ||
| 1106 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1107 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1108 | r/4, | ||
| 1109 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1110 | } | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 1114 | * | ||
| 1115 | * @discussion This function is an implementation detail and you should not | ||
| 1116 | * call it directly. It may be removed or modified in future versions of the | ||
| 1117 | * simd module. */ | ||
| 1118 | static SIMD_NOINLINE double _simd_angle(simd_quatd p, simd_quatd q) { | ||
| 1119 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | /*! @abstract sin(x)/x. | ||
| 1123 | * | ||
| 1124 | * @discussion This function is an implementation detail and you should not | ||
| 1125 | * call it directly. It may be removed or modified in future versions of the | ||
| 1126 | * simd module. */ | ||
| 1127 | static SIMD_CFUNC double _simd_sinc(double x) { | ||
| 1128 | if (x == 0) return 1; | ||
| 1129 | return sin(x)/x; | ||
| 1130 | } | ||
| 1131 | |||
| 1132 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 1133 | * | ||
| 1134 | * @discussion This function may interpolate along either the longer or | ||
| 1135 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 1136 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 1137 | * instead of calling this directly. */ | ||
| 1138 | static SIMD_NOINLINE simd_quatd _simd_slerp_internal(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1139 | double s = 1 - t; | ||
| 1140 | double a = _simd_angle(q0, q1); | ||
| 1141 | double r = simd_recip(_simd_sinc(a)); | ||
| 1142 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1146 | if (simd_dot(q0, q1) >= 0) | ||
| 1147 | return _simd_slerp_internal(q0, q1, t); | ||
| 1148 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1149 | } | ||
| 1150 | |||
| 1151 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1152 | if (simd_dot(q0, q1) >= 0) | ||
| 1153 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1154 | return _simd_slerp_internal(q0, q1, t); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | /*! @discussion This function is an implementation detail and you should not | ||
| 1158 | * call it directly. It may be removed or modified in future versions of the | ||
| 1159 | * simd module. */ | ||
| 1160 | static SIMD_NOINLINE simd_quatd _simd_intermediate(simd_quatd q0, simd_quatd q1, simd_quatd q2) { | ||
| 1161 | simd_quatd p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 1162 | simd_quatd p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 1163 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 1164 | } | ||
| 1165 | |||
| 1166 | /*! @discussion This function is an implementation detail and you should not | ||
| 1167 | * call it directly. It may be removed or modified in future versions of the | ||
| 1168 | * simd module. */ | ||
| 1169 | static SIMD_NOINLINE simd_quatd _simd_squad(simd_quatd q0, simd_quatd qa, simd_quatd qb, simd_quatd q1, double t) { | ||
| 1170 | simd_quatd r0 = _simd_slerp_internal(q0, q1, t); | ||
| 1171 | simd_quatd r1 = _simd_slerp_internal(qa, qb, t); | ||
| 1172 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1176 | simd_quatd qa = _simd_intermediate(q0, q1, q2); | ||
| 1177 | simd_quatd qb = _simd_intermediate(q1, q2, q3); | ||
| 1178 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1182 | simd_quatd q01 = _simd_slerp_internal(q0, q1, t); | ||
| 1183 | simd_quatd q12 = _simd_slerp_internal(q1, q2, t); | ||
| 1184 | simd_quatd q23 = _simd_slerp_internal(q2, q3, t); | ||
| 1185 | simd_quatd q012 = _simd_slerp_internal(q01, q12, t); | ||
| 1186 | simd_quatd q123 = _simd_slerp_internal(q12, q23, t); | ||
| 1187 | return _simd_slerp_internal(q012, q123, t); | ||
| 1188 | } | ||
| 1189 | |||
| 1190 | #ifdef __cplusplus | ||
| 1191 | } /* extern "C" */ | ||
| 1192 | #endif /* __cplusplus */ | ||
| 1193 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 1194 | #endif /* SIMD_QUATERNIONS */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/simd/vector_make.h+1106| ... | @@ -34,6 +34,35 @@ | ... | @@ -34,6 +34,35 @@ |
| 34 | * simd_float3 vector = simd_make_float3(ab, 3); | 34 | * simd_float3 vector = simd_make_float3(ab, 3); |
| 35 | * ~~~ | 35 | * ~~~ |
| 36 | * | 36 | * |
| 37 | * In C++ the above functions are templated in the simd:: namespace. | ||
| 38 | * | ||
| 39 | * C++ Function Equivalent C Function | ||
| 40 | * ------------------------------------------------------------------- | ||
| 41 | * simd::make<simd::typeN>(x ...) simd_make_typeN(x ...) | ||
| 42 | * simd::make_undef<simd::typeN>(x ...) simd_make_typeN_undef(x ...) | ||
| 43 | * | ||
| 44 | * | ||
| 45 | * In addition, templated Vector<ScalarType, count> struct is available for | ||
| 46 | * templated code based on the scalar type. | ||
| 47 | * | ||
| 48 | * template <typename ScalarType, size_t count> struct simd::Vector { | ||
| 49 | * // static const size_t count | ||
| 50 | * // typedef scalar_t | ||
| 51 | * // typedef type | ||
| 52 | * // typedef packed_t | ||
| 53 | * }; | ||
| 54 | * | ||
| 55 | * Lookup the equivalent Vector struct according to typeN: | ||
| 56 | * template <typename typeN> struct simd::get_traits | ||
| 57 | * { | ||
| 58 | * // using type = Vector<ScalarType, count>; | ||
| 59 | * }; | ||
| 60 | * | ||
| 61 | * This is commonly used to get the type traits of typeN, so a helper type, | ||
| 62 | * namely traits, is available to query the type traits easily. | ||
| 63 | * simd::traits<typeN>::count | ||
| 64 | * simd::traits<typeN>::scalar_t | ||
| 65 | * | ||
| 37 | * @copyright 2014-2016 Apple, Inc. All rights reserved. | 66 | * @copyright 2014-2016 Apple, Inc. All rights reserved. |
| 38 | * @unsorted */ | 67 | * @unsorted */ |
| 39 | 68 | ||
| ... | @@ -5278,6 +5307,9 @@ static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) { | ... | @@ -5278,6 +5307,9 @@ static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) { |
| 5278 | #ifdef __cplusplus | 5307 | #ifdef __cplusplus |
| 5279 | } /* extern "C" */ | 5308 | } /* extern "C" */ |
| 5280 | 5309 | ||
| 5310 | #include <tuple> | ||
| 5311 | #include <simd/packed.h> | ||
| 5312 | |||
| 5281 | namespace simd { | 5313 | namespace simd { |
| 5282 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed | 5314 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed |
| 5283 | * (twos-complement) integers. */ | 5315 | * (twos-complement) integers. */ |
| ... | @@ -6762,6 +6794,1080 @@ template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN o | ... | @@ -6762,6 +6794,1080 @@ template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN o |
| 6762 | return ::simd_make_double8_undef(other); | 6794 | return ::simd_make_double8_undef(other); |
| 6763 | } | 6795 | } |
| 6764 | 6796 | ||
| 6797 | /*! @struct Vector | ||
| 6798 | * @abstract Templated Vector struct based on scalar type and number of | ||
| 6799 | * elements | ||
| 6800 | * @field count Number of elements in the vector | ||
| 6801 | * @field scalar_t The scalar type of each element | ||
| 6802 | * @field type The inferred simd::typeN type | ||
| 6803 | * @field packed_t The inferred simd::packed::typeN type | ||
| 6804 | * @field mask_t The return type of comparison operations */ | ||
| 6805 | template <typename ScalarType, size_t count> struct Vector { | ||
| 6806 | // static const size_t count | ||
| 6807 | // typedef scalar_t | ||
| 6808 | // typedef type | ||
| 6809 | // typedef packed_t | ||
| 6810 | // typedef mask_t | ||
| 6811 | }; | ||
| 6812 | /*! @abstract Helper type to access the simd type easily. */ | ||
| 6813 | template <typename ScalarType, size_t count> | ||
| 6814 | using Vector_t = typename Vector<ScalarType, count>::type; | ||
| 6815 | |||
| 6816 | /*! @abstract Look up the equivalent Vector struct according to the simd | ||
| 6817 | * type. */ | ||
| 6818 | template <typename typeN> struct get_traits | ||
| 6819 | { | ||
| 6820 | // using type = Vector<ScalarType, count>; | ||
| 6821 | }; | ||
| 6822 | /*! @abstract Helper type to access the Vector struct easily. | ||
| 6823 | * @discussion This is commonly used to query the type traits of a simd | ||
| 6824 | * type. | ||
| 6825 | * For example, simd::traits<simd::float4>::count is 4. */ | ||
| 6826 | template<typename typeN> | ||
| 6827 | using traits = typename get_traits<typeN>::type; | ||
| 6828 | |||
| 6829 | template<> struct Vector<char1, 1> { | ||
| 6830 | static const size_t count = 1; | ||
| 6831 | typedef char1 scalar_t; | ||
| 6832 | typedef char1 type; | ||
| 6833 | typedef char1 mask_t; | ||
| 6834 | }; | ||
| 6835 | |||
| 6836 | template <> struct get_traits<char1> | ||
| 6837 | { | ||
| 6838 | using type = Vector<char1, 1>; | ||
| 6839 | }; | ||
| 6840 | |||
| 6841 | template<> struct Vector<char1, 2> { | ||
| 6842 | static const size_t count = 2; | ||
| 6843 | typedef char1 scalar_t; | ||
| 6844 | typedef char2 type; | ||
| 6845 | typedef packed::char2 packed_t; | ||
| 6846 | typedef char2 mask_t; | ||
| 6847 | }; | ||
| 6848 | |||
| 6849 | template <> struct get_traits<char2> | ||
| 6850 | { | ||
| 6851 | using type = Vector<char1, 2>; | ||
| 6852 | }; | ||
| 6853 | |||
| 6854 | template<> struct Vector<char1, 3> { | ||
| 6855 | static const size_t count = 3; | ||
| 6856 | typedef char1 scalar_t; | ||
| 6857 | typedef char3 type; | ||
| 6858 | typedef char3 mask_t; | ||
| 6859 | }; | ||
| 6860 | |||
| 6861 | template <> struct get_traits<char3> | ||
| 6862 | { | ||
| 6863 | using type = Vector<char1, 3>; | ||
| 6864 | }; | ||
| 6865 | |||
| 6866 | template<> struct Vector<char1, 4> { | ||
| 6867 | static const size_t count = 4; | ||
| 6868 | typedef char1 scalar_t; | ||
| 6869 | typedef char4 type; | ||
| 6870 | typedef packed::char4 packed_t; | ||
| 6871 | typedef char4 mask_t; | ||
| 6872 | }; | ||
| 6873 | |||
| 6874 | template <> struct get_traits<char4> | ||
| 6875 | { | ||
| 6876 | using type = Vector<char1, 4>; | ||
| 6877 | }; | ||
| 6878 | |||
| 6879 | template<> struct Vector<char1, 8> { | ||
| 6880 | static const size_t count = 8; | ||
| 6881 | typedef char1 scalar_t; | ||
| 6882 | typedef char8 type; | ||
| 6883 | typedef packed::char8 packed_t; | ||
| 6884 | typedef char8 mask_t; | ||
| 6885 | }; | ||
| 6886 | |||
| 6887 | template <> struct get_traits<char8> | ||
| 6888 | { | ||
| 6889 | using type = Vector<char1, 8>; | ||
| 6890 | }; | ||
| 6891 | |||
| 6892 | template<> struct Vector<char1, 16> { | ||
| 6893 | static const size_t count = 16; | ||
| 6894 | typedef char1 scalar_t; | ||
| 6895 | typedef char16 type; | ||
| 6896 | typedef packed::char16 packed_t; | ||
| 6897 | typedef char16 mask_t; | ||
| 6898 | }; | ||
| 6899 | |||
| 6900 | template <> struct get_traits<char16> | ||
| 6901 | { | ||
| 6902 | using type = Vector<char1, 16>; | ||
| 6903 | }; | ||
| 6904 | |||
| 6905 | template<> struct Vector<char1, 32> { | ||
| 6906 | static const size_t count = 32; | ||
| 6907 | typedef char1 scalar_t; | ||
| 6908 | typedef char32 type; | ||
| 6909 | typedef packed::char32 packed_t; | ||
| 6910 | typedef char32 mask_t; | ||
| 6911 | }; | ||
| 6912 | |||
| 6913 | template <> struct get_traits<char32> | ||
| 6914 | { | ||
| 6915 | using type = Vector<char1, 32>; | ||
| 6916 | }; | ||
| 6917 | |||
| 6918 | template<> struct Vector<char1, 64> { | ||
| 6919 | static const size_t count = 64; | ||
| 6920 | typedef char1 scalar_t; | ||
| 6921 | typedef char64 type; | ||
| 6922 | typedef packed::char64 packed_t; | ||
| 6923 | typedef char64 mask_t; | ||
| 6924 | }; | ||
| 6925 | |||
| 6926 | template <> struct get_traits<char64> | ||
| 6927 | { | ||
| 6928 | using type = Vector<char1, 64>; | ||
| 6929 | }; | ||
| 6930 | |||
| 6931 | template<> struct Vector<uchar1, 1> { | ||
| 6932 | static const size_t count = 1; | ||
| 6933 | typedef uchar1 scalar_t; | ||
| 6934 | typedef uchar1 type; | ||
| 6935 | typedef char1 mask_t; | ||
| 6936 | }; | ||
| 6937 | |||
| 6938 | template <> struct get_traits<uchar1> | ||
| 6939 | { | ||
| 6940 | using type = Vector<uchar1, 1>; | ||
| 6941 | }; | ||
| 6942 | |||
| 6943 | template<> struct Vector<uchar1, 2> { | ||
| 6944 | static const size_t count = 2; | ||
| 6945 | typedef uchar1 scalar_t; | ||
| 6946 | typedef uchar2 type; | ||
| 6947 | typedef packed::uchar2 packed_t; | ||
| 6948 | typedef char2 mask_t; | ||
| 6949 | }; | ||
| 6950 | |||
| 6951 | template <> struct get_traits<uchar2> | ||
| 6952 | { | ||
| 6953 | using type = Vector<uchar1, 2>; | ||
| 6954 | }; | ||
| 6955 | |||
| 6956 | template<> struct Vector<uchar1, 3> { | ||
| 6957 | static const size_t count = 3; | ||
| 6958 | typedef uchar1 scalar_t; | ||
| 6959 | typedef uchar3 type; | ||
| 6960 | typedef char3 mask_t; | ||
| 6961 | }; | ||
| 6962 | |||
| 6963 | template <> struct get_traits<uchar3> | ||
| 6964 | { | ||
| 6965 | using type = Vector<uchar1, 3>; | ||
| 6966 | }; | ||
| 6967 | |||
| 6968 | template<> struct Vector<uchar1, 4> { | ||
| 6969 | static const size_t count = 4; | ||
| 6970 | typedef uchar1 scalar_t; | ||
| 6971 | typedef uchar4 type; | ||
| 6972 | typedef packed::uchar4 packed_t; | ||
| 6973 | typedef char4 mask_t; | ||
| 6974 | }; | ||
| 6975 | |||
| 6976 | template <> struct get_traits<uchar4> | ||
| 6977 | { | ||
| 6978 | using type = Vector<uchar1, 4>; | ||
| 6979 | }; | ||
| 6980 | |||
| 6981 | template<> struct Vector<uchar1, 8> { | ||
| 6982 | static const size_t count = 8; | ||
| 6983 | typedef uchar1 scalar_t; | ||
| 6984 | typedef uchar8 type; | ||
| 6985 | typedef packed::uchar8 packed_t; | ||
| 6986 | typedef char8 mask_t; | ||
| 6987 | }; | ||
| 6988 | |||
| 6989 | template <> struct get_traits<uchar8> | ||
| 6990 | { | ||
| 6991 | using type = Vector<uchar1, 8>; | ||
| 6992 | }; | ||
| 6993 | |||
| 6994 | template<> struct Vector<uchar1, 16> { | ||
| 6995 | static const size_t count = 16; | ||
| 6996 | typedef uchar1 scalar_t; | ||
| 6997 | typedef uchar16 type; | ||
| 6998 | typedef packed::uchar16 packed_t; | ||
| 6999 | typedef char16 mask_t; | ||
| 7000 | }; | ||
| 7001 | |||
| 7002 | template <> struct get_traits<uchar16> | ||
| 7003 | { | ||
| 7004 | using type = Vector<uchar1, 16>; | ||
| 7005 | }; | ||
| 7006 | |||
| 7007 | template<> struct Vector<uchar1, 32> { | ||
| 7008 | static const size_t count = 32; | ||
| 7009 | typedef uchar1 scalar_t; | ||
| 7010 | typedef uchar32 type; | ||
| 7011 | typedef packed::uchar32 packed_t; | ||
| 7012 | typedef char32 mask_t; | ||
| 7013 | }; | ||
| 7014 | |||
| 7015 | template <> struct get_traits<uchar32> | ||
| 7016 | { | ||
| 7017 | using type = Vector<uchar1, 32>; | ||
| 7018 | }; | ||
| 7019 | |||
| 7020 | template<> struct Vector<uchar1, 64> { | ||
| 7021 | static const size_t count = 64; | ||
| 7022 | typedef uchar1 scalar_t; | ||
| 7023 | typedef uchar64 type; | ||
| 7024 | typedef packed::uchar64 packed_t; | ||
| 7025 | typedef char64 mask_t; | ||
| 7026 | }; | ||
| 7027 | |||
| 7028 | template <> struct get_traits<uchar64> | ||
| 7029 | { | ||
| 7030 | using type = Vector<uchar1, 64>; | ||
| 7031 | }; | ||
| 7032 | |||
| 7033 | template<> struct Vector<short1, 1> { | ||
| 7034 | static const size_t count = 1; | ||
| 7035 | typedef short1 scalar_t; | ||
| 7036 | typedef short1 type; | ||
| 7037 | typedef short1 mask_t; | ||
| 7038 | }; | ||
| 7039 | |||
| 7040 | template <> struct get_traits<short1> | ||
| 7041 | { | ||
| 7042 | using type = Vector<short1, 1>; | ||
| 7043 | }; | ||
| 7044 | |||
| 7045 | template<> struct Vector<short1, 2> { | ||
| 7046 | static const size_t count = 2; | ||
| 7047 | typedef short1 scalar_t; | ||
| 7048 | typedef short2 type; | ||
| 7049 | typedef packed::short2 packed_t; | ||
| 7050 | typedef short2 mask_t; | ||
| 7051 | }; | ||
| 7052 | |||
| 7053 | template <> struct get_traits<short2> | ||
| 7054 | { | ||
| 7055 | using type = Vector<short1, 2>; | ||
| 7056 | }; | ||
| 7057 | |||
| 7058 | template<> struct Vector<short1, 3> { | ||
| 7059 | static const size_t count = 3; | ||
| 7060 | typedef short1 scalar_t; | ||
| 7061 | typedef short3 type; | ||
| 7062 | typedef short3 mask_t; | ||
| 7063 | }; | ||
| 7064 | |||
| 7065 | template <> struct get_traits<short3> | ||
| 7066 | { | ||
| 7067 | using type = Vector<short1, 3>; | ||
| 7068 | }; | ||
| 7069 | |||
| 7070 | template<> struct Vector<short1, 4> { | ||
| 7071 | static const size_t count = 4; | ||
| 7072 | typedef short1 scalar_t; | ||
| 7073 | typedef short4 type; | ||
| 7074 | typedef packed::short4 packed_t; | ||
| 7075 | typedef short4 mask_t; | ||
| 7076 | }; | ||
| 7077 | |||
| 7078 | template <> struct get_traits<short4> | ||
| 7079 | { | ||
| 7080 | using type = Vector<short1, 4>; | ||
| 7081 | }; | ||
| 7082 | |||
| 7083 | template<> struct Vector<short1, 8> { | ||
| 7084 | static const size_t count = 8; | ||
| 7085 | typedef short1 scalar_t; | ||
| 7086 | typedef short8 type; | ||
| 7087 | typedef packed::short8 packed_t; | ||
| 7088 | typedef short8 mask_t; | ||
| 7089 | }; | ||
| 7090 | |||
| 7091 | template <> struct get_traits<short8> | ||
| 7092 | { | ||
| 7093 | using type = Vector<short1, 8>; | ||
| 7094 | }; | ||
| 7095 | |||
| 7096 | template<> struct Vector<short1, 16> { | ||
| 7097 | static const size_t count = 16; | ||
| 7098 | typedef short1 scalar_t; | ||
| 7099 | typedef short16 type; | ||
| 7100 | typedef packed::short16 packed_t; | ||
| 7101 | typedef short16 mask_t; | ||
| 7102 | }; | ||
| 7103 | |||
| 7104 | template <> struct get_traits<short16> | ||
| 7105 | { | ||
| 7106 | using type = Vector<short1, 16>; | ||
| 7107 | }; | ||
| 7108 | |||
| 7109 | template<> struct Vector<short1, 32> { | ||
| 7110 | static const size_t count = 32; | ||
| 7111 | typedef short1 scalar_t; | ||
| 7112 | typedef short32 type; | ||
| 7113 | typedef packed::short32 packed_t; | ||
| 7114 | typedef short32 mask_t; | ||
| 7115 | }; | ||
| 7116 | |||
| 7117 | template <> struct get_traits<short32> | ||
| 7118 | { | ||
| 7119 | using type = Vector<short1, 32>; | ||
| 7120 | }; | ||
| 7121 | |||
| 7122 | template<> struct Vector<ushort1, 1> { | ||
| 7123 | static const size_t count = 1; | ||
| 7124 | typedef ushort1 scalar_t; | ||
| 7125 | typedef ushort1 type; | ||
| 7126 | typedef short1 mask_t; | ||
| 7127 | }; | ||
| 7128 | |||
| 7129 | template <> struct get_traits<ushort1> | ||
| 7130 | { | ||
| 7131 | using type = Vector<ushort1, 1>; | ||
| 7132 | }; | ||
| 7133 | |||
| 7134 | template<> struct Vector<ushort1, 2> { | ||
| 7135 | static const size_t count = 2; | ||
| 7136 | typedef ushort1 scalar_t; | ||
| 7137 | typedef ushort2 type; | ||
| 7138 | typedef packed::ushort2 packed_t; | ||
| 7139 | typedef short2 mask_t; | ||
| 7140 | }; | ||
| 7141 | |||
| 7142 | template <> struct get_traits<ushort2> | ||
| 7143 | { | ||
| 7144 | using type = Vector<ushort1, 2>; | ||
| 7145 | }; | ||
| 7146 | |||
| 7147 | template<> struct Vector<ushort1, 3> { | ||
| 7148 | static const size_t count = 3; | ||
| 7149 | typedef ushort1 scalar_t; | ||
| 7150 | typedef ushort3 type; | ||
| 7151 | typedef short3 mask_t; | ||
| 7152 | }; | ||
| 7153 | |||
| 7154 | template <> struct get_traits<ushort3> | ||
| 7155 | { | ||
| 7156 | using type = Vector<ushort1, 3>; | ||
| 7157 | }; | ||
| 7158 | |||
| 7159 | template<> struct Vector<ushort1, 4> { | ||
| 7160 | static const size_t count = 4; | ||
| 7161 | typedef ushort1 scalar_t; | ||
| 7162 | typedef ushort4 type; | ||
| 7163 | typedef packed::ushort4 packed_t; | ||
| 7164 | typedef short4 mask_t; | ||
| 7165 | }; | ||
| 7166 | |||
| 7167 | template <> struct get_traits<ushort4> | ||
| 7168 | { | ||
| 7169 | using type = Vector<ushort1, 4>; | ||
| 7170 | }; | ||
| 7171 | |||
| 7172 | template<> struct Vector<ushort1, 8> { | ||
| 7173 | static const size_t count = 8; | ||
| 7174 | typedef ushort1 scalar_t; | ||
| 7175 | typedef ushort8 type; | ||
| 7176 | typedef packed::ushort8 packed_t; | ||
| 7177 | typedef short8 mask_t; | ||
| 7178 | }; | ||
| 7179 | |||
| 7180 | template <> struct get_traits<ushort8> | ||
| 7181 | { | ||
| 7182 | using type = Vector<ushort1, 8>; | ||
| 7183 | }; | ||
| 7184 | |||
| 7185 | template<> struct Vector<ushort1, 16> { | ||
| 7186 | static const size_t count = 16; | ||
| 7187 | typedef ushort1 scalar_t; | ||
| 7188 | typedef ushort16 type; | ||
| 7189 | typedef packed::ushort16 packed_t; | ||
| 7190 | typedef short16 mask_t; | ||
| 7191 | }; | ||
| 7192 | |||
| 7193 | template <> struct get_traits<ushort16> | ||
| 7194 | { | ||
| 7195 | using type = Vector<ushort1, 16>; | ||
| 7196 | }; | ||
| 7197 | |||
| 7198 | template<> struct Vector<ushort1, 32> { | ||
| 7199 | static const size_t count = 32; | ||
| 7200 | typedef ushort1 scalar_t; | ||
| 7201 | typedef ushort32 type; | ||
| 7202 | typedef packed::ushort32 packed_t; | ||
| 7203 | typedef short32 mask_t; | ||
| 7204 | }; | ||
| 7205 | |||
| 7206 | template <> struct get_traits<ushort32> | ||
| 7207 | { | ||
| 7208 | using type = Vector<ushort1, 32>; | ||
| 7209 | }; | ||
| 7210 | |||
| 7211 | template<> struct Vector<int1, 1> { | ||
| 7212 | static const size_t count = 1; | ||
| 7213 | typedef int1 scalar_t; | ||
| 7214 | typedef int1 type; | ||
| 7215 | typedef int1 mask_t; | ||
| 7216 | }; | ||
| 7217 | |||
| 7218 | template <> struct get_traits<int1> | ||
| 7219 | { | ||
| 7220 | using type = Vector<int1, 1>; | ||
| 7221 | }; | ||
| 7222 | |||
| 7223 | template<> struct Vector<int1, 2> { | ||
| 7224 | static const size_t count = 2; | ||
| 7225 | typedef int1 scalar_t; | ||
| 7226 | typedef int2 type; | ||
| 7227 | typedef packed::int2 packed_t; | ||
| 7228 | typedef int2 mask_t; | ||
| 7229 | }; | ||
| 7230 | |||
| 7231 | template <> struct get_traits<int2> | ||
| 7232 | { | ||
| 7233 | using type = Vector<int1, 2>; | ||
| 7234 | }; | ||
| 7235 | |||
| 7236 | template<> struct Vector<int1, 3> { | ||
| 7237 | static const size_t count = 3; | ||
| 7238 | typedef int1 scalar_t; | ||
| 7239 | typedef int3 type; | ||
| 7240 | typedef int3 mask_t; | ||
| 7241 | }; | ||
| 7242 | |||
| 7243 | template <> struct get_traits<int3> | ||
| 7244 | { | ||
| 7245 | using type = Vector<int1, 3>; | ||
| 7246 | }; | ||
| 7247 | |||
| 7248 | template<> struct Vector<int1, 4> { | ||
| 7249 | static const size_t count = 4; | ||
| 7250 | typedef int1 scalar_t; | ||
| 7251 | typedef int4 type; | ||
| 7252 | typedef packed::int4 packed_t; | ||
| 7253 | typedef int4 mask_t; | ||
| 7254 | }; | ||
| 7255 | |||
| 7256 | template <> struct get_traits<int4> | ||
| 7257 | { | ||
| 7258 | using type = Vector<int1, 4>; | ||
| 7259 | }; | ||
| 7260 | |||
| 7261 | template<> struct Vector<int1, 8> { | ||
| 7262 | static const size_t count = 8; | ||
| 7263 | typedef int1 scalar_t; | ||
| 7264 | typedef int8 type; | ||
| 7265 | typedef packed::int8 packed_t; | ||
| 7266 | typedef int8 mask_t; | ||
| 7267 | }; | ||
| 7268 | |||
| 7269 | template <> struct get_traits<int8> | ||
| 7270 | { | ||
| 7271 | using type = Vector<int1, 8>; | ||
| 7272 | }; | ||
| 7273 | |||
| 7274 | template<> struct Vector<int1, 16> { | ||
| 7275 | static const size_t count = 16; | ||
| 7276 | typedef int1 scalar_t; | ||
| 7277 | typedef int16 type; | ||
| 7278 | typedef packed::int16 packed_t; | ||
| 7279 | typedef int16 mask_t; | ||
| 7280 | }; | ||
| 7281 | |||
| 7282 | template <> struct get_traits<int16> | ||
| 7283 | { | ||
| 7284 | using type = Vector<int1, 16>; | ||
| 7285 | }; | ||
| 7286 | |||
| 7287 | template<> struct Vector<uint1, 1> { | ||
| 7288 | static const size_t count = 1; | ||
| 7289 | typedef uint1 scalar_t; | ||
| 7290 | typedef uint1 type; | ||
| 7291 | typedef int1 mask_t; | ||
| 7292 | }; | ||
| 7293 | |||
| 7294 | template <> struct get_traits<uint1> | ||
| 7295 | { | ||
| 7296 | using type = Vector<uint1, 1>; | ||
| 7297 | }; | ||
| 7298 | |||
| 7299 | template<> struct Vector<uint1, 2> { | ||
| 7300 | static const size_t count = 2; | ||
| 7301 | typedef uint1 scalar_t; | ||
| 7302 | typedef uint2 type; | ||
| 7303 | typedef packed::uint2 packed_t; | ||
| 7304 | typedef int2 mask_t; | ||
| 7305 | }; | ||
| 7306 | |||
| 7307 | template <> struct get_traits<uint2> | ||
| 7308 | { | ||
| 7309 | using type = Vector<uint1, 2>; | ||
| 7310 | }; | ||
| 7311 | |||
| 7312 | template<> struct Vector<uint1, 3> { | ||
| 7313 | static const size_t count = 3; | ||
| 7314 | typedef uint1 scalar_t; | ||
| 7315 | typedef uint3 type; | ||
| 7316 | typedef int3 mask_t; | ||
| 7317 | }; | ||
| 7318 | |||
| 7319 | template <> struct get_traits<uint3> | ||
| 7320 | { | ||
| 7321 | using type = Vector<uint1, 3>; | ||
| 7322 | }; | ||
| 7323 | |||
| 7324 | template<> struct Vector<uint1, 4> { | ||
| 7325 | static const size_t count = 4; | ||
| 7326 | typedef uint1 scalar_t; | ||
| 7327 | typedef uint4 type; | ||
| 7328 | typedef packed::uint4 packed_t; | ||
| 7329 | typedef int4 mask_t; | ||
| 7330 | }; | ||
| 7331 | |||
| 7332 | template <> struct get_traits<uint4> | ||
| 7333 | { | ||
| 7334 | using type = Vector<uint1, 4>; | ||
| 7335 | }; | ||
| 7336 | |||
| 7337 | template<> struct Vector<uint1, 8> { | ||
| 7338 | static const size_t count = 8; | ||
| 7339 | typedef uint1 scalar_t; | ||
| 7340 | typedef uint8 type; | ||
| 7341 | typedef packed::uint8 packed_t; | ||
| 7342 | typedef int8 mask_t; | ||
| 7343 | }; | ||
| 7344 | |||
| 7345 | template <> struct get_traits<uint8> | ||
| 7346 | { | ||
| 7347 | using type = Vector<uint1, 8>; | ||
| 7348 | }; | ||
| 7349 | |||
| 7350 | template<> struct Vector<uint1, 16> { | ||
| 7351 | static const size_t count = 16; | ||
| 7352 | typedef uint1 scalar_t; | ||
| 7353 | typedef uint16 type; | ||
| 7354 | typedef packed::uint16 packed_t; | ||
| 7355 | typedef int16 mask_t; | ||
| 7356 | }; | ||
| 7357 | |||
| 7358 | template <> struct get_traits<uint16> | ||
| 7359 | { | ||
| 7360 | using type = Vector<uint1, 16>; | ||
| 7361 | }; | ||
| 7362 | |||
| 7363 | template<> struct Vector<float1, 1> { | ||
| 7364 | static const size_t count = 1; | ||
| 7365 | typedef float1 scalar_t; | ||
| 7366 | typedef float1 type; | ||
| 7367 | typedef int1 mask_t; | ||
| 7368 | }; | ||
| 7369 | |||
| 7370 | template <> struct get_traits<float1> | ||
| 7371 | { | ||
| 7372 | using type = Vector<float1, 1>; | ||
| 7373 | }; | ||
| 7374 | |||
| 7375 | template<> struct Vector<float1, 2> { | ||
| 7376 | static const size_t count = 2; | ||
| 7377 | typedef float1 scalar_t; | ||
| 7378 | typedef float2 type; | ||
| 7379 | typedef packed::float2 packed_t; | ||
| 7380 | typedef int2 mask_t; | ||
| 7381 | }; | ||
| 7382 | |||
| 7383 | template <> struct get_traits<float2> | ||
| 7384 | { | ||
| 7385 | using type = Vector<float1, 2>; | ||
| 7386 | }; | ||
| 7387 | |||
| 7388 | template<> struct Vector<float1, 3> { | ||
| 7389 | static const size_t count = 3; | ||
| 7390 | typedef float1 scalar_t; | ||
| 7391 | typedef float3 type; | ||
| 7392 | typedef int3 mask_t; | ||
| 7393 | }; | ||
| 7394 | |||
| 7395 | template <> struct get_traits<float3> | ||
| 7396 | { | ||
| 7397 | using type = Vector<float1, 3>; | ||
| 7398 | }; | ||
| 7399 | |||
| 7400 | template<> struct Vector<float1, 4> { | ||
| 7401 | static const size_t count = 4; | ||
| 7402 | typedef float1 scalar_t; | ||
| 7403 | typedef float4 type; | ||
| 7404 | typedef packed::float4 packed_t; | ||
| 7405 | typedef int4 mask_t; | ||
| 7406 | }; | ||
| 7407 | |||
| 7408 | template <> struct get_traits<float4> | ||
| 7409 | { | ||
| 7410 | using type = Vector<float1, 4>; | ||
| 7411 | }; | ||
| 7412 | |||
| 7413 | template<> struct Vector<float1, 8> { | ||
| 7414 | static const size_t count = 8; | ||
| 7415 | typedef float1 scalar_t; | ||
| 7416 | typedef float8 type; | ||
| 7417 | typedef packed::float8 packed_t; | ||
| 7418 | typedef int8 mask_t; | ||
| 7419 | }; | ||
| 7420 | |||
| 7421 | template <> struct get_traits<float8> | ||
| 7422 | { | ||
| 7423 | using type = Vector<float1, 8>; | ||
| 7424 | }; | ||
| 7425 | |||
| 7426 | template<> struct Vector<float1, 16> { | ||
| 7427 | static const size_t count = 16; | ||
| 7428 | typedef float1 scalar_t; | ||
| 7429 | typedef float16 type; | ||
| 7430 | typedef packed::float16 packed_t; | ||
| 7431 | typedef int16 mask_t; | ||
| 7432 | }; | ||
| 7433 | |||
| 7434 | template <> struct get_traits<float16> | ||
| 7435 | { | ||
| 7436 | using type = Vector<float1, 16>; | ||
| 7437 | }; | ||
| 7438 | |||
| 7439 | template<> struct Vector<long1, 1> { | ||
| 7440 | static const size_t count = 1; | ||
| 7441 | typedef long1 scalar_t; | ||
| 7442 | typedef long1 type; | ||
| 7443 | typedef long1 mask_t; | ||
| 7444 | }; | ||
| 7445 | |||
| 7446 | template <> struct get_traits<long1> | ||
| 7447 | { | ||
| 7448 | using type = Vector<long1, 1>; | ||
| 7449 | }; | ||
| 7450 | |||
| 7451 | template<> struct Vector<long1, 2> { | ||
| 7452 | static const size_t count = 2; | ||
| 7453 | typedef long1 scalar_t; | ||
| 7454 | typedef long2 type; | ||
| 7455 | typedef packed::long2 packed_t; | ||
| 7456 | typedef long2 mask_t; | ||
| 7457 | }; | ||
| 7458 | |||
| 7459 | template <> struct get_traits<long2> | ||
| 7460 | { | ||
| 7461 | using type = Vector<long1, 2>; | ||
| 7462 | }; | ||
| 7463 | |||
| 7464 | template<> struct Vector<long1, 3> { | ||
| 7465 | static const size_t count = 3; | ||
| 7466 | typedef long1 scalar_t; | ||
| 7467 | typedef long3 type; | ||
| 7468 | typedef long3 mask_t; | ||
| 7469 | }; | ||
| 7470 | |||
| 7471 | template <> struct get_traits<long3> | ||
| 7472 | { | ||
| 7473 | using type = Vector<long1, 3>; | ||
| 7474 | }; | ||
| 7475 | |||
| 7476 | template<> struct Vector<long1, 4> { | ||
| 7477 | static const size_t count = 4; | ||
| 7478 | typedef long1 scalar_t; | ||
| 7479 | typedef long4 type; | ||
| 7480 | typedef packed::long4 packed_t; | ||
| 7481 | typedef long4 mask_t; | ||
| 7482 | }; | ||
| 7483 | |||
| 7484 | template <> struct get_traits<long4> | ||
| 7485 | { | ||
| 7486 | using type = Vector<long1, 4>; | ||
| 7487 | }; | ||
| 7488 | |||
| 7489 | template<> struct Vector<long1, 8> { | ||
| 7490 | static const size_t count = 8; | ||
| 7491 | typedef long1 scalar_t; | ||
| 7492 | typedef long8 type; | ||
| 7493 | typedef packed::long8 packed_t; | ||
| 7494 | typedef long8 mask_t; | ||
| 7495 | }; | ||
| 7496 | |||
| 7497 | template <> struct get_traits<long8> | ||
| 7498 | { | ||
| 7499 | using type = Vector<long1, 8>; | ||
| 7500 | }; | ||
| 7501 | |||
| 7502 | template<> struct Vector<ulong1, 1> { | ||
| 7503 | static const size_t count = 1; | ||
| 7504 | typedef ulong1 scalar_t; | ||
| 7505 | typedef ulong1 type; | ||
| 7506 | typedef long1 mask_t; | ||
| 7507 | }; | ||
| 7508 | |||
| 7509 | template <> struct get_traits<ulong1> | ||
| 7510 | { | ||
| 7511 | using type = Vector<ulong1, 1>; | ||
| 7512 | }; | ||
| 7513 | |||
| 7514 | template<> struct Vector<ulong1, 2> { | ||
| 7515 | static const size_t count = 2; | ||
| 7516 | typedef ulong1 scalar_t; | ||
| 7517 | typedef ulong2 type; | ||
| 7518 | typedef packed::ulong2 packed_t; | ||
| 7519 | typedef long2 mask_t; | ||
| 7520 | }; | ||
| 7521 | |||
| 7522 | template <> struct get_traits<ulong2> | ||
| 7523 | { | ||
| 7524 | using type = Vector<ulong1, 2>; | ||
| 7525 | }; | ||
| 7526 | |||
| 7527 | template<> struct Vector<ulong1, 3> { | ||
| 7528 | static const size_t count = 3; | ||
| 7529 | typedef ulong1 scalar_t; | ||
| 7530 | typedef ulong3 type; | ||
| 7531 | typedef long3 mask_t; | ||
| 7532 | }; | ||
| 7533 | |||
| 7534 | template <> struct get_traits<ulong3> | ||
| 7535 | { | ||
| 7536 | using type = Vector<ulong1, 3>; | ||
| 7537 | }; | ||
| 7538 | |||
| 7539 | template<> struct Vector<ulong1, 4> { | ||
| 7540 | static const size_t count = 4; | ||
| 7541 | typedef ulong1 scalar_t; | ||
| 7542 | typedef ulong4 type; | ||
| 7543 | typedef packed::ulong4 packed_t; | ||
| 7544 | typedef long4 mask_t; | ||
| 7545 | }; | ||
| 7546 | |||
| 7547 | template <> struct get_traits<ulong4> | ||
| 7548 | { | ||
| 7549 | using type = Vector<ulong1, 4>; | ||
| 7550 | }; | ||
| 7551 | |||
| 7552 | template<> struct Vector<ulong1, 8> { | ||
| 7553 | static const size_t count = 8; | ||
| 7554 | typedef ulong1 scalar_t; | ||
| 7555 | typedef ulong8 type; | ||
| 7556 | typedef packed::ulong8 packed_t; | ||
| 7557 | typedef long8 mask_t; | ||
| 7558 | }; | ||
| 7559 | |||
| 7560 | template <> struct get_traits<ulong8> | ||
| 7561 | { | ||
| 7562 | using type = Vector<ulong1, 8>; | ||
| 7563 | }; | ||
| 7564 | |||
| 7565 | template<> struct Vector<double1, 1> { | ||
| 7566 | static const size_t count = 1; | ||
| 7567 | typedef double1 scalar_t; | ||
| 7568 | typedef double1 type; | ||
| 7569 | typedef long1 mask_t; | ||
| 7570 | }; | ||
| 7571 | |||
| 7572 | template <> struct get_traits<double1> | ||
| 7573 | { | ||
| 7574 | using type = Vector<double1, 1>; | ||
| 7575 | }; | ||
| 7576 | |||
| 7577 | template<> struct Vector<double1, 2> { | ||
| 7578 | static const size_t count = 2; | ||
| 7579 | typedef double1 scalar_t; | ||
| 7580 | typedef double2 type; | ||
| 7581 | typedef packed::double2 packed_t; | ||
| 7582 | typedef long2 mask_t; | ||
| 7583 | }; | ||
| 7584 | |||
| 7585 | template <> struct get_traits<double2> | ||
| 7586 | { | ||
| 7587 | using type = Vector<double1, 2>; | ||
| 7588 | }; | ||
| 7589 | |||
| 7590 | template<> struct Vector<double1, 3> { | ||
| 7591 | static const size_t count = 3; | ||
| 7592 | typedef double1 scalar_t; | ||
| 7593 | typedef double3 type; | ||
| 7594 | typedef long3 mask_t; | ||
| 7595 | }; | ||
| 7596 | |||
| 7597 | template <> struct get_traits<double3> | ||
| 7598 | { | ||
| 7599 | using type = Vector<double1, 3>; | ||
| 7600 | }; | ||
| 7601 | |||
| 7602 | template<> struct Vector<double1, 4> { | ||
| 7603 | static const size_t count = 4; | ||
| 7604 | typedef double1 scalar_t; | ||
| 7605 | typedef double4 type; | ||
| 7606 | typedef packed::double4 packed_t; | ||
| 7607 | typedef long4 mask_t; | ||
| 7608 | }; | ||
| 7609 | |||
| 7610 | template <> struct get_traits<double4> | ||
| 7611 | { | ||
| 7612 | using type = Vector<double1, 4>; | ||
| 7613 | }; | ||
| 7614 | |||
| 7615 | template<> struct Vector<double1, 8> { | ||
| 7616 | static const size_t count = 8; | ||
| 7617 | typedef double1 scalar_t; | ||
| 7618 | typedef double8 type; | ||
| 7619 | typedef packed::double8 packed_t; | ||
| 7620 | typedef long8 mask_t; | ||
| 7621 | }; | ||
| 7622 | |||
| 7623 | template <> struct get_traits<double8> | ||
| 7624 | { | ||
| 7625 | using type = Vector<double1, 8>; | ||
| 7626 | }; | ||
| 7627 | |||
| 7628 | #if __has_feature(cxx_constexpr) | ||
| 7629 | /*! @abstract Templated make function based on return type and argument | ||
| 7630 | * type. */ | ||
| 7631 | template<typename typeN, typename... Args> | ||
| 7632 | static constexpr typeN make(Args... args) | ||
| 7633 | { | ||
| 7634 | if constexpr (traits<typeN>::count == 1) | ||
| 7635 | { | ||
| 7636 | using FirstArgType = typename std::tuple_element<0, std::tuple<Args...>>::type; | ||
| 7637 | if constexpr (std::is_same<FirstArgType, typename traits<FirstArgType>::scalar_t>::value) | ||
| 7638 | return typeN(std::get<0>(std::make_tuple(args...))); | ||
| 7639 | else | ||
| 7640 | return typeN(std::get<0>(std::make_tuple(args...))[0]); | ||
| 7641 | } | ||
| 7642 | else if constexpr (std::is_same<typeN, char2>::value) | ||
| 7643 | return make_char2(args...); | ||
| 7644 | else if constexpr (std::is_same<typeN, char3>::value) | ||
| 7645 | return make_char3(args...); | ||
| 7646 | else if constexpr (std::is_same<typeN, char4>::value) | ||
| 7647 | return make_char4(args...); | ||
| 7648 | else if constexpr (std::is_same<typeN, char8>::value) | ||
| 7649 | return make_char8(args...); | ||
| 7650 | else if constexpr (std::is_same<typeN, char16>::value) | ||
| 7651 | return make_char16(args...); | ||
| 7652 | else if constexpr (std::is_same<typeN, char32>::value) | ||
| 7653 | return make_char32(args...); | ||
| 7654 | else if constexpr (std::is_same<typeN, char64>::value) | ||
| 7655 | return make_char64(args...); | ||
| 7656 | else if constexpr (std::is_same<typeN, uchar2>::value) | ||
| 7657 | return make_uchar2(args...); | ||
| 7658 | else if constexpr (std::is_same<typeN, uchar3>::value) | ||
| 7659 | return make_uchar3(args...); | ||
| 7660 | else if constexpr (std::is_same<typeN, uchar4>::value) | ||
| 7661 | return make_uchar4(args...); | ||
| 7662 | else if constexpr (std::is_same<typeN, uchar8>::value) | ||
| 7663 | return make_uchar8(args...); | ||
| 7664 | else if constexpr (std::is_same<typeN, uchar16>::value) | ||
| 7665 | return make_uchar16(args...); | ||
| 7666 | else if constexpr (std::is_same<typeN, uchar32>::value) | ||
| 7667 | return make_uchar32(args...); | ||
| 7668 | else if constexpr (std::is_same<typeN, uchar64>::value) | ||
| 7669 | return make_uchar64(args...); | ||
| 7670 | else if constexpr (std::is_same<typeN, short2>::value) | ||
| 7671 | return make_short2(args...); | ||
| 7672 | else if constexpr (std::is_same<typeN, short3>::value) | ||
| 7673 | return make_short3(args...); | ||
| 7674 | else if constexpr (std::is_same<typeN, short4>::value) | ||
| 7675 | return make_short4(args...); | ||
| 7676 | else if constexpr (std::is_same<typeN, short8>::value) | ||
| 7677 | return make_short8(args...); | ||
| 7678 | else if constexpr (std::is_same<typeN, short16>::value) | ||
| 7679 | return make_short16(args...); | ||
| 7680 | else if constexpr (std::is_same<typeN, short32>::value) | ||
| 7681 | return make_short32(args...); | ||
| 7682 | else if constexpr (std::is_same<typeN, ushort2>::value) | ||
| 7683 | return make_ushort2(args...); | ||
| 7684 | else if constexpr (std::is_same<typeN, ushort3>::value) | ||
| 7685 | return make_ushort3(args...); | ||
| 7686 | else if constexpr (std::is_same<typeN, ushort4>::value) | ||
| 7687 | return make_ushort4(args...); | ||
| 7688 | else if constexpr (std::is_same<typeN, ushort8>::value) | ||
| 7689 | return make_ushort8(args...); | ||
| 7690 | else if constexpr (std::is_same<typeN, ushort16>::value) | ||
| 7691 | return make_ushort16(args...); | ||
| 7692 | else if constexpr (std::is_same<typeN, ushort32>::value) | ||
| 7693 | return make_ushort32(args...); | ||
| 7694 | else if constexpr (std::is_same<typeN, int2>::value) | ||
| 7695 | return make_int2(args...); | ||
| 7696 | else if constexpr (std::is_same<typeN, int3>::value) | ||
| 7697 | return make_int3(args...); | ||
| 7698 | else if constexpr (std::is_same<typeN, int4>::value) | ||
| 7699 | return make_int4(args...); | ||
| 7700 | else if constexpr (std::is_same<typeN, int8>::value) | ||
| 7701 | return make_int8(args...); | ||
| 7702 | else if constexpr (std::is_same<typeN, int16>::value) | ||
| 7703 | return make_int16(args...); | ||
| 7704 | else if constexpr (std::is_same<typeN, uint2>::value) | ||
| 7705 | return make_uint2(args...); | ||
| 7706 | else if constexpr (std::is_same<typeN, uint3>::value) | ||
| 7707 | return make_uint3(args...); | ||
| 7708 | else if constexpr (std::is_same<typeN, uint4>::value) | ||
| 7709 | return make_uint4(args...); | ||
| 7710 | else if constexpr (std::is_same<typeN, uint8>::value) | ||
| 7711 | return make_uint8(args...); | ||
| 7712 | else if constexpr (std::is_same<typeN, uint16>::value) | ||
| 7713 | return make_uint16(args...); | ||
| 7714 | else if constexpr (std::is_same<typeN, float2>::value) | ||
| 7715 | return make_float2(args...); | ||
| 7716 | else if constexpr (std::is_same<typeN, float3>::value) | ||
| 7717 | return make_float3(args...); | ||
| 7718 | else if constexpr (std::is_same<typeN, float4>::value) | ||
| 7719 | return make_float4(args...); | ||
| 7720 | else if constexpr (std::is_same<typeN, float8>::value) | ||
| 7721 | return make_float8(args...); | ||
| 7722 | else if constexpr (std::is_same<typeN, float16>::value) | ||
| 7723 | return make_float16(args...); | ||
| 7724 | else if constexpr (std::is_same<typeN, long2>::value) | ||
| 7725 | return make_long2(args...); | ||
| 7726 | else if constexpr (std::is_same<typeN, long3>::value) | ||
| 7727 | return make_long3(args...); | ||
| 7728 | else if constexpr (std::is_same<typeN, long4>::value) | ||
| 7729 | return make_long4(args...); | ||
| 7730 | else if constexpr (std::is_same<typeN, long8>::value) | ||
| 7731 | return make_long8(args...); | ||
| 7732 | else if constexpr (std::is_same<typeN, ulong2>::value) | ||
| 7733 | return make_ulong2(args...); | ||
| 7734 | else if constexpr (std::is_same<typeN, ulong3>::value) | ||
| 7735 | return make_ulong3(args...); | ||
| 7736 | else if constexpr (std::is_same<typeN, ulong4>::value) | ||
| 7737 | return make_ulong4(args...); | ||
| 7738 | else if constexpr (std::is_same<typeN, ulong8>::value) | ||
| 7739 | return make_ulong8(args...); | ||
| 7740 | else if constexpr (std::is_same<typeN, double2>::value) | ||
| 7741 | return make_double2(args...); | ||
| 7742 | else if constexpr (std::is_same<typeN, double3>::value) | ||
| 7743 | return make_double3(args...); | ||
| 7744 | else if constexpr (std::is_same<typeN, double4>::value) | ||
| 7745 | return make_double4(args...); | ||
| 7746 | else if constexpr (std::is_same<typeN, double8>::value) | ||
| 7747 | return make_double8(args...); | ||
| 7748 | } | ||
| 7749 | |||
| 7750 | /*! @abstract Templated make_undef function based on return type and | ||
| 7751 | * argument type. */ | ||
| 7752 | template<typename typeN, typename... Args> | ||
| 7753 | static constexpr typeN make_undef(Args... args) | ||
| 7754 | { | ||
| 7755 | if constexpr (traits<typeN>::count == 1) | ||
| 7756 | { | ||
| 7757 | using FirstArgType = typename std::tuple_element<0, std::tuple<Args...>>::type; | ||
| 7758 | if constexpr (std::is_same<FirstArgType, typename traits<FirstArgType>::scalar_t>::value) | ||
| 7759 | return typeN(std::get<0>(std::make_tuple(args...))); | ||
| 7760 | else | ||
| 7761 | return typeN(std::get<0>(std::make_tuple(args...))[0]); | ||
| 7762 | } | ||
| 7763 | else if constexpr (std::is_same<typeN, char2>::value) | ||
| 7764 | return make_char2_undef(args...); | ||
| 7765 | else if constexpr (std::is_same<typeN, char3>::value) | ||
| 7766 | return make_char3_undef(args...); | ||
| 7767 | else if constexpr (std::is_same<typeN, char4>::value) | ||
| 7768 | return make_char4_undef(args...); | ||
| 7769 | else if constexpr (std::is_same<typeN, char8>::value) | ||
| 7770 | return make_char8_undef(args...); | ||
| 7771 | else if constexpr (std::is_same<typeN, char16>::value) | ||
| 7772 | return make_char16_undef(args...); | ||
| 7773 | else if constexpr (std::is_same<typeN, char32>::value) | ||
| 7774 | return make_char32_undef(args...); | ||
| 7775 | else if constexpr (std::is_same<typeN, char64>::value) | ||
| 7776 | return make_char64_undef(args...); | ||
| 7777 | else if constexpr (std::is_same<typeN, uchar2>::value) | ||
| 7778 | return make_uchar2_undef(args...); | ||
| 7779 | else if constexpr (std::is_same<typeN, uchar3>::value) | ||
| 7780 | return make_uchar3_undef(args...); | ||
| 7781 | else if constexpr (std::is_same<typeN, uchar4>::value) | ||
| 7782 | return make_uchar4_undef(args...); | ||
| 7783 | else if constexpr (std::is_same<typeN, uchar8>::value) | ||
| 7784 | return make_uchar8_undef(args...); | ||
| 7785 | else if constexpr (std::is_same<typeN, uchar16>::value) | ||
| 7786 | return make_uchar16_undef(args...); | ||
| 7787 | else if constexpr (std::is_same<typeN, uchar32>::value) | ||
| 7788 | return make_uchar32_undef(args...); | ||
| 7789 | else if constexpr (std::is_same<typeN, uchar64>::value) | ||
| 7790 | return make_uchar64_undef(args...); | ||
| 7791 | else if constexpr (std::is_same<typeN, short2>::value) | ||
| 7792 | return make_short2_undef(args...); | ||
| 7793 | else if constexpr (std::is_same<typeN, short3>::value) | ||
| 7794 | return make_short3_undef(args...); | ||
| 7795 | else if constexpr (std::is_same<typeN, short4>::value) | ||
| 7796 | return make_short4_undef(args...); | ||
| 7797 | else if constexpr (std::is_same<typeN, short8>::value) | ||
| 7798 | return make_short8_undef(args...); | ||
| 7799 | else if constexpr (std::is_same<typeN, short16>::value) | ||
| 7800 | return make_short16_undef(args...); | ||
| 7801 | else if constexpr (std::is_same<typeN, short32>::value) | ||
| 7802 | return make_short32_undef(args...); | ||
| 7803 | else if constexpr (std::is_same<typeN, ushort2>::value) | ||
| 7804 | return make_ushort2_undef(args...); | ||
| 7805 | else if constexpr (std::is_same<typeN, ushort3>::value) | ||
| 7806 | return make_ushort3_undef(args...); | ||
| 7807 | else if constexpr (std::is_same<typeN, ushort4>::value) | ||
| 7808 | return make_ushort4_undef(args...); | ||
| 7809 | else if constexpr (std::is_same<typeN, ushort8>::value) | ||
| 7810 | return make_ushort8_undef(args...); | ||
| 7811 | else if constexpr (std::is_same<typeN, ushort16>::value) | ||
| 7812 | return make_ushort16_undef(args...); | ||
| 7813 | else if constexpr (std::is_same<typeN, ushort32>::value) | ||
| 7814 | return make_ushort32_undef(args...); | ||
| 7815 | else if constexpr (std::is_same<typeN, int2>::value) | ||
| 7816 | return make_int2_undef(args...); | ||
| 7817 | else if constexpr (std::is_same<typeN, int3>::value) | ||
| 7818 | return make_int3_undef(args...); | ||
| 7819 | else if constexpr (std::is_same<typeN, int4>::value) | ||
| 7820 | return make_int4_undef(args...); | ||
| 7821 | else if constexpr (std::is_same<typeN, int8>::value) | ||
| 7822 | return make_int8_undef(args...); | ||
| 7823 | else if constexpr (std::is_same<typeN, int16>::value) | ||
| 7824 | return make_int16_undef(args...); | ||
| 7825 | else if constexpr (std::is_same<typeN, uint2>::value) | ||
| 7826 | return make_uint2_undef(args...); | ||
| 7827 | else if constexpr (std::is_same<typeN, uint3>::value) | ||
| 7828 | return make_uint3_undef(args...); | ||
| 7829 | else if constexpr (std::is_same<typeN, uint4>::value) | ||
| 7830 | return make_uint4_undef(args...); | ||
| 7831 | else if constexpr (std::is_same<typeN, uint8>::value) | ||
| 7832 | return make_uint8_undef(args...); | ||
| 7833 | else if constexpr (std::is_same<typeN, uint16>::value) | ||
| 7834 | return make_uint16_undef(args...); | ||
| 7835 | else if constexpr (std::is_same<typeN, float2>::value) | ||
| 7836 | return make_float2_undef(args...); | ||
| 7837 | else if constexpr (std::is_same<typeN, float3>::value) | ||
| 7838 | return make_float3_undef(args...); | ||
| 7839 | else if constexpr (std::is_same<typeN, float4>::value) | ||
| 7840 | return make_float4_undef(args...); | ||
| 7841 | else if constexpr (std::is_same<typeN, float8>::value) | ||
| 7842 | return make_float8_undef(args...); | ||
| 7843 | else if constexpr (std::is_same<typeN, float16>::value) | ||
| 7844 | return make_float16_undef(args...); | ||
| 7845 | else if constexpr (std::is_same<typeN, long2>::value) | ||
| 7846 | return make_long2_undef(args...); | ||
| 7847 | else if constexpr (std::is_same<typeN, long3>::value) | ||
| 7848 | return make_long3_undef(args...); | ||
| 7849 | else if constexpr (std::is_same<typeN, long4>::value) | ||
| 7850 | return make_long4_undef(args...); | ||
| 7851 | else if constexpr (std::is_same<typeN, long8>::value) | ||
| 7852 | return make_long8_undef(args...); | ||
| 7853 | else if constexpr (std::is_same<typeN, ulong2>::value) | ||
| 7854 | return make_ulong2_undef(args...); | ||
| 7855 | else if constexpr (std::is_same<typeN, ulong3>::value) | ||
| 7856 | return make_ulong3_undef(args...); | ||
| 7857 | else if constexpr (std::is_same<typeN, ulong4>::value) | ||
| 7858 | return make_ulong4_undef(args...); | ||
| 7859 | else if constexpr (std::is_same<typeN, ulong8>::value) | ||
| 7860 | return make_ulong8_undef(args...); | ||
| 7861 | else if constexpr (std::is_same<typeN, double2>::value) | ||
| 7862 | return make_double2_undef(args...); | ||
| 7863 | else if constexpr (std::is_same<typeN, double3>::value) | ||
| 7864 | return make_double3_undef(args...); | ||
| 7865 | else if constexpr (std::is_same<typeN, double4>::value) | ||
| 7866 | return make_double4_undef(args...); | ||
| 7867 | else if constexpr (std::is_same<typeN, double8>::value) | ||
| 7868 | return make_double8_undef(args...); | ||
| 7869 | } | ||
| 7870 | #endif /* __has_feature(cxx_constexpr) */ | ||
| 6765 | } /* namespace simd */ | 7871 | } /* namespace simd */ |
| 6766 | #endif /* __cplusplus */ | 7872 | #endif /* __cplusplus */ |
| 6767 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | 7873 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ |
lib/libc/include/any-macos-any/spawn.h deleted-187| ... | @@ -1,187 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2006, 2010 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | |||
| 25 | #ifndef _SPAWN_H_ | ||
| 26 | #define _SPAWN_H_ | ||
| 27 | |||
| 28 | /* | ||
| 29 | * [SPN] Support for _POSIX_SPAWN | ||
| 30 | */ | ||
| 31 | |||
| 32 | #include <sys/cdefs.h> | ||
| 33 | #include <_types.h> | ||
| 34 | #include <sys/spawn.h> /* shared types */ | ||
| 35 | |||
| 36 | #include <Availability.h> | ||
| 37 | |||
| 38 | /* | ||
| 39 | * [SPN] Inclusion of the <spawn.h> header may make visible symbols defined | ||
| 40 | * in the <sched.h>, <signal.h>, and <sys/types.h> headers. | ||
| 41 | */ | ||
| 42 | #include <sys/_types/_pid_t.h> | ||
| 43 | #include <sys/_types/_sigset_t.h> | ||
| 44 | #include <sys/_types/_mode_t.h> | ||
| 45 | |||
| 46 | /* | ||
| 47 | * Opaque types for use with posix_spawn() family functions. Internals are | ||
| 48 | * not defined, and should not be accessed directly. Types are defined as | ||
| 49 | * mandated by POSIX. | ||
| 50 | */ | ||
| 51 | typedef void *posix_spawnattr_t; | ||
| 52 | typedef void *posix_spawn_file_actions_t; | ||
| 53 | |||
| 54 | __BEGIN_DECLS | ||
| 55 | /* | ||
| 56 | * gcc under c99 mode won't compile "[ __restrict]" by itself. As a workaround, | ||
| 57 | * a dummy argument name is added. | ||
| 58 | */ | ||
| 59 | |||
| 60 | int posix_spawn(pid_t * __restrict, const char * __restrict, | ||
| 61 | const posix_spawn_file_actions_t *, | ||
| 62 | const posix_spawnattr_t * __restrict, | ||
| 63 | char *const __argv[__restrict], | ||
| 64 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 65 | |||
| 66 | int posix_spawnp(pid_t * __restrict, const char * __restrict, | ||
| 67 | const posix_spawn_file_actions_t *, | ||
| 68 | const posix_spawnattr_t * __restrict, | ||
| 69 | char *const __argv[__restrict], | ||
| 70 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)); | ||
| 71 | |||
| 72 | int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 73 | |||
| 74 | int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, | ||
| 75 | int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 76 | |||
| 77 | int posix_spawn_file_actions_addopen( | ||
| 78 | 	posix_spawn_file_actions_t * __restrict, int, | ||
| 79 | 	const char * __restrict, int, mode_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 80 | |||
| 81 | int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 82 | |||
| 83 | int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 84 | |||
| 85 | int posix_spawnattr_destroy(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 86 | |||
| 87 | int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, | ||
| 88 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 89 | |||
| 90 | int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict, | ||
| 91 | short * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 92 | |||
| 93 | int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict, | ||
| 94 | pid_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 95 | |||
| 96 | int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict, | ||
| 97 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 98 | |||
| 99 | int posix_spawnattr_init(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 100 | |||
| 101 | int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict, | ||
| 102 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 103 | |||
| 104 | int posix_spawnattr_setflags(posix_spawnattr_t *, short) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 105 | |||
| 106 | int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 107 | |||
| 108 | int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict, | ||
| 109 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 110 | |||
| 111 | #if 0 /* _POSIX_PRIORITY_SCHEDULING [PS] : not supported */ | ||
| 112 | int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict, | ||
| 113 | const struct sched_param * __restrict); | ||
| 114 | int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); | ||
| 115 | int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict, | ||
| 116 | struct sched_param * __restrict); | ||
| 117 | int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict, | ||
| 118 | int * __restrict); | ||
| 119 | #endif /* 0 */ | ||
| 120 | |||
| 121 | __END_DECLS | ||
| 122 | |||
| 123 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 124 | /* | ||
| 125 | * Darwin-specific extensions below | ||
| 126 | */ | ||
| 127 | #include <mach/exception_types.h> | ||
| 128 | #include <mach/machine.h> | ||
| 129 | #include <mach/port.h> | ||
| 130 | |||
| 131 | #include <sys/_types/_size_t.h> | ||
| 132 | |||
| 133 | __BEGIN_DECLS | ||
| 134 | |||
| 135 | int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict, | ||
| 136 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 137 | |||
| 138 | int posix_spawnattr_getarchpref_np(const posix_spawnattr_t * __restrict, | ||
| 139 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 140 | |||
| 141 | int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict, | ||
| 142 | mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2)); | ||
| 143 | |||
| 144 | int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict, | ||
| 145 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 146 | |||
| 147 | int posix_spawnattr_setarchpref_np(posix_spawnattr_t * __restrict, | ||
| 148 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 149 | |||
| 150 | int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict, | ||
| 151 | exception_mask_t, mach_port_t, | ||
| 152 | exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 153 | |||
| 154 | int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict, | ||
| 155 | mach_port_t, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 156 | |||
| 157 | int posix_spawnattr_setsuidcredport_np(posix_spawnattr_t * __restrict, mach_port_t) __API_UNAVAILABLE(ios, macos); | ||
| 158 | |||
| 159 | int posix_spawnattr_setnosmt_np(const posix_spawnattr_t * __restrict attr) __API_AVAILABLE(macos(11.0)); | ||
| 160 | |||
| 161 | /* | ||
| 162 | * Set CPU Security Mitigation on the spawned process | ||
| 163 | * This attribute affects all threads and is inherited on fork and exec | ||
| 164 | */ | ||
| 165 | int posix_spawnattr_set_csm_np(const posix_spawnattr_t * __restrict attr, uint32_t flags) __API_AVAILABLE(macos(11.0)); | ||
| 166 | /* | ||
| 167 | * flags for CPU Security Mitigation attribute | ||
| 168 | * POSIX_SPAWN_NP_CSM_ALL should be used in most cases, | ||
| 169 | * the individual flags are provided only for performance evaluation etc | ||
| 170 | */ | ||
| 171 | #define POSIX_SPAWN_NP_CSM_ALL 0x0001 | ||
| 172 | #define POSIX_SPAWN_NP_CSM_NOSMT 0x0002 | ||
| 173 | #define POSIX_SPAWN_NP_CSM_TECS 0x0004 | ||
| 174 | |||
| 175 | int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *, | ||
| 176 | int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos); | ||
| 177 | |||
| 178 | int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *, | ||
| 179 | const char * __restrict) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 180 | |||
| 181 | int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, | ||
| 182 | int) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 183 | |||
| 184 | __END_DECLS | ||
| 185 | |||
| 186 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 187 | #endif /* _SPAWN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/stdio.h created+402| ... | @@ -0,0 +1,402 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2005, 2007, 2009, 2010 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * This code is derived from software contributed to Berkeley by | ||
| 28 | * Chris Torek. | ||
| 29 | * | ||
| 30 | * Redistribution and use in source and binary forms, with or without | ||
| 31 | * modification, are permitted provided that the following conditions | ||
| 32 | * are met: | ||
| 33 | * 1. Redistributions of source code must retain the above copyright | ||
| 34 | * notice, this list of conditions and the following disclaimer. | ||
| 35 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 36 | * notice, this list of conditions and the following disclaimer in the | ||
| 37 | * documentation and/or other materials provided with the distribution. | ||
| 38 | * 3. All advertising materials mentioning features or use of this software | ||
| 39 | * must display the following acknowledgement: | ||
| 40 | *	This product includes software developed by the University of | ||
| 41 | *	California, Berkeley and its contributors. | ||
| 42 | * 4. Neither the name of the University nor the names of its contributors | ||
| 43 | * may be used to endorse or promote products derived from this software | ||
| 44 | * without specific prior written permission. | ||
| 45 | * | ||
| 46 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 56 | * SUCH DAMAGE. | ||
| 57 | * | ||
| 58 | *	@(#)stdio.h	8.5 (Berkeley) 4/29/95 | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef	_STDIO_H_ | ||
| 62 | #define	_STDIO_H_ | ||
| 63 | |||
| 64 | #include <_stdio.h> | ||
| 65 | |||
| 66 | __BEGIN_DECLS | ||
| 67 | extern FILE *__stdinp; | ||
| 68 | extern FILE *__stdoutp; | ||
| 69 | extern FILE *__stderrp; | ||
| 70 | __END_DECLS | ||
| 71 | |||
| 72 | #define	__SLBF	0x0001		/* line buffered */ | ||
| 73 | #define	__SNBF	0x0002		/* unbuffered */ | ||
| 74 | #define	__SRD	0x0004		/* OK to read */ | ||
| 75 | #define	__SWR	0x0008		/* OK to write */ | ||
| 76 | 	/* RD and WR are never simultaneously asserted */ | ||
| 77 | #define	__SRW	0x0010		/* open for reading & writing */ | ||
| 78 | #define	__SEOF	0x0020		/* found EOF */ | ||
| 79 | #define	__SERR	0x0040		/* found error */ | ||
| 80 | #define	__SMBF	0x0080		/* _buf is from malloc */ | ||
| 81 | #define	__SAPP	0x0100		/* fdopen()ed in append mode */ | ||
| 82 | #define	__SSTR	0x0200		/* this is an sprintf/snprintf string */ | ||
| 83 | #define	__SOPT	0x0400		/* do fseek() optimisation */ | ||
| 84 | #define	__SNPT	0x0800		/* do not do fseek() optimisation */ | ||
| 85 | #define	__SOFF	0x1000		/* set iff _offset is in fact correct */ | ||
| 86 | #define	__SMOD	0x2000		/* true => fgetln modified _p text */ | ||
| 87 | #define __SALC 0x4000		/* allocate string space dynamically */ | ||
| 88 | #define __SIGN 0x8000		/* ignore this file in _fwalk */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | * The following three definitions are for ANSI C, which took them | ||
| 92 | * from System V, which brilliantly took internal interface macros and | ||
| 93 | * made them official arguments to setvbuf(), without renaming them. | ||
| 94 | * Hence, these ugly _IOxxx names are *supposed* to appear in user code. | ||
| 95 | * | ||
| 96 | * Although numbered as their counterparts above, the implementation | ||
| 97 | * does not rely on this. | ||
| 98 | */ | ||
| 99 | #define	_IOFBF	0		/* setvbuf should set fully buffered */ | ||
| 100 | #define	_IOLBF	1		/* setvbuf should set line buffered */ | ||
| 101 | #define	_IONBF	2		/* setvbuf should set unbuffered */ | ||
| 102 | |||
| 103 | #define	BUFSIZ	1024		/* size of buffer used by setbuf */ | ||
| 104 | #define	EOF	(-1) | ||
| 105 | |||
| 106 | 				/* must be == _POSIX_STREAM_MAX <limits.h> */ | ||
| 107 | #define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */ | ||
| 108 | #define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */ | ||
| 109 | |||
| 110 | /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ | ||
| 111 | #ifndef _ANSI_SOURCE | ||
| 112 | #define	P_tmpdir	"/var/tmp/" | ||
| 113 | #endif | ||
| 114 | #define	L_tmpnam	1024	/* XXX must be == PATH_MAX */ | ||
| 115 | #define	TMP_MAX		308915776 | ||
| 116 | |||
| 117 | #ifndef SEEK_SET | ||
| 118 | #define	SEEK_SET	0	/* set file offset to offset */ | ||
| 119 | #endif | ||
| 120 | #ifndef SEEK_CUR | ||
| 121 | #define	SEEK_CUR	1	/* set file offset to current plus offset */ | ||
| 122 | #endif | ||
| 123 | #ifndef SEEK_END | ||
| 124 | #define	SEEK_END	2	/* set file offset to EOF plus offset */ | ||
| 125 | #endif | ||
| 126 | |||
| 127 | #define	stdin	__stdinp | ||
| 128 | #define	stdout	__stdoutp | ||
| 129 | #define	stderr	__stderrp | ||
| 130 | |||
| 131 | #ifdef _DARWIN_UNLIMITED_STREAMS | ||
| 132 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 | ||
| 133 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -miphoneos-version-min version does not support it." | ||
| 134 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 | ||
| 135 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -mmacosx-version-min version does not support it." | ||
| 136 | #endif | ||
| 137 | #endif | ||
| 138 | |||
| 139 | /* ANSI-C */ | ||
| 140 | |||
| 141 | __BEGIN_DECLS | ||
| 142 | void	 clearerr(FILE *); | ||
| 143 | int	 fclose(FILE *); | ||
| 144 | int	 feof(FILE *); | ||
| 145 | int	 ferror(FILE *); | ||
| 146 | int	 fflush(FILE *); | ||
| 147 | int	 fgetc(FILE *); | ||
| 148 | int	 fgetpos(FILE * __restrict, fpos_t *); | ||
| 149 | char	*fgets(char * __restrict, int, FILE *); | ||
| 150 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 151 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fopen)); | ||
| 152 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 153 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fopen)); | ||
| 154 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 155 | int	 fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 156 | int	 fputc(int, FILE *); | ||
| 157 | int	 fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs); | ||
| 158 | size_t	 fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream); | ||
| 159 | FILE	*freopen(const char * __restrict, const char * __restrict, | ||
| 160 | FILE * __restrict) __DARWIN_ALIAS(freopen); | ||
| 161 | int	 fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 162 | int	 fseek(FILE *, long, int); | ||
| 163 | int	 fsetpos(FILE *, const fpos_t *); | ||
| 164 | long	 ftell(FILE *); | ||
| 165 | size_t	 fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite); | ||
| 166 | int	 getc(FILE *); | ||
| 167 | int	 getchar(void); | ||
| 168 | char	*gets(char *); | ||
| 169 | void	 perror(const char *) __cold; | ||
| 170 | int	 printf(const char * __restrict, ...) __printflike(1, 2); | ||
| 171 | int	 putc(int, FILE *); | ||
| 172 | int	 putchar(int); | ||
| 173 | int	 puts(const char *); | ||
| 174 | int	 remove(const char *); | ||
| 175 | int	 rename (const char *__old, const char *__new); | ||
| 176 | void	 rewind(FILE *); | ||
| 177 | int	 scanf(const char * __restrict, ...) __scanflike(1, 2); | ||
| 178 | void	 setbuf(FILE * __restrict, char * __restrict); | ||
| 179 | int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t); | ||
| 180 | int	 sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3) __swift_unavailable("Use snprintf instead."); | ||
| 181 | int	 sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 182 | FILE	*tmpfile(void); | ||
| 183 | |||
| 184 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 185 | #if !defined(_POSIX_C_SOURCE) | ||
| 186 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 187 | #endif | ||
| 188 | char	*tmpnam(char *); | ||
| 189 | int	 ungetc(int, FILE *); | ||
| 190 | int	 vfprintf(FILE * __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 191 | int	 vprintf(const char * __restrict, va_list) __printflike(1, 0); | ||
| 192 | int	 vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0) __swift_unavailable("Use vsnprintf instead."); | ||
| 193 | __END_DECLS | ||
| 194 | |||
| 195 | |||
| 196 | |||
| 197 | /* Additional functionality provided by: | ||
| 198 | * POSIX.1-1988 | ||
| 199 | */ | ||
| 200 | |||
| 201 | #if __DARWIN_C_LEVEL >= 198808L | ||
| 202 | #define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */ | ||
| 203 | |||
| 204 | __BEGIN_DECLS | ||
| 205 | #include <_ctermid.h> | ||
| 206 | |||
| 207 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 208 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen)); | ||
| 209 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 210 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen)); | ||
| 211 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 212 | int	 fileno(FILE *); | ||
| 213 | __END_DECLS | ||
| 214 | #endif /* __DARWIN_C_LEVEL >= 198808L */ | ||
| 215 | |||
| 216 | |||
| 217 | /* Additional functionality provided by: | ||
| 218 | * POSIX.2-1992 C Language Binding Option | ||
| 219 | */ | ||
| 220 | |||
| 221 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 222 | __BEGIN_DECLS | ||
| 223 | int	 pclose(FILE *) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 224 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 225 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(popen)) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 226 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 227 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(popen)) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 228 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 229 | __END_DECLS | ||
| 230 | #endif /* __DARWIN_C_LEVEL >= 199209L */ | ||
| 231 | |||
| 232 | /* Additional functionality provided by: | ||
| 233 | * POSIX.1c-1995, | ||
| 234 | * POSIX.1i-1995, | ||
| 235 | * and the omnibus ISO/IEC 9945-1: 1996 | ||
| 236 | */ | ||
| 237 | |||
| 238 | #if __DARWIN_C_LEVEL >= 199506L | ||
| 239 | |||
| 240 | /* Functions internal to the implementation. */ | ||
| 241 | __BEGIN_DECLS | ||
| 242 | int	__srget(FILE *); | ||
| 243 | int	__svfscanf(FILE *, const char *, va_list) __scanflike(2, 0); | ||
| 244 | int	__swbuf(int, FILE *); | ||
| 245 | __END_DECLS | ||
| 246 | |||
| 247 | /* | ||
| 248 | * The __sfoo macros are here so that we can | ||
| 249 | * define function versions in the C library. | ||
| 250 | */ | ||
| 251 | #define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) | ||
| 252 | #if defined(__GNUC__) && defined(__STDC__) | ||
| 253 | __header_always_inline int __sputc(int _c, FILE *_p) { | ||
| 254 | 	if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) | ||
| 255 | 		return (*_p->_p++ = _c); | ||
| 256 | 	else | ||
| 257 | 		return (__swbuf(_c, _p)); | ||
| 258 | } | ||
| 259 | #else | ||
| 260 | /* | ||
| 261 | * This has been tuned to generate reasonable code on the vax using pcc. | ||
| 262 | */ | ||
| 263 | #define	__sputc(c, p) \ | ||
| 264 | 	(--(p)->_w < 0 ? \ | ||
| 265 | 		(p)->_w >= (p)->_lbfsize ? \ | ||
| 266 | 			(*(p)->_p = (c)), *(p)->_p != '\n' ? \ | ||
| 267 | 				(int)*(p)->_p++ : \ | ||
| 268 | 				__swbuf('\n', p) : \ | ||
| 269 | 			__swbuf((int)(c), p) : \ | ||
| 270 | 		(*(p)->_p = (c), (int)*(p)->_p++)) | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #define	__sfeof(p)	(((p)->_flags & __SEOF) != 0) | ||
| 274 | #define	__sferror(p)	(((p)->_flags & __SERR) != 0) | ||
| 275 | #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF))) | ||
| 276 | #define	__sfileno(p)	((p)->_file) | ||
| 277 | |||
| 278 | __BEGIN_DECLS | ||
| 279 | void	 flockfile(FILE *); | ||
| 280 | int	 ftrylockfile(FILE *); | ||
| 281 | void	 funlockfile(FILE *); | ||
| 282 | int	 getc_unlocked(FILE *); | ||
| 283 | int	 getchar_unlocked(void); | ||
| 284 | int	 putc_unlocked(int, FILE *); | ||
| 285 | int	 putchar_unlocked(int); | ||
| 286 | |||
| 287 | /* Removed in Issue 6 */ | ||
| 288 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 289 | int	 getw(FILE *); | ||
| 290 | int	 putw(int, FILE *); | ||
| 291 | #endif | ||
| 292 | |||
| 293 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 294 | #if !defined(_POSIX_C_SOURCE) | ||
| 295 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 296 | #endif | ||
| 297 | char	*tempnam(const char *__dir, const char *__prefix) __DARWIN_ALIAS(tempnam); | ||
| 298 | __END_DECLS | ||
| 299 | |||
| 300 | #ifndef lint | ||
| 301 | #define	getc_unlocked(fp)	__sgetc(fp) | ||
| 302 | #define putc_unlocked(x, fp)	__sputc(x, fp) | ||
| 303 | #endif /* lint */ | ||
| 304 | |||
| 305 | #define	getchar_unlocked()	getc_unlocked(stdin) | ||
| 306 | #define	putchar_unlocked(x)	putc_unlocked(x, stdout) | ||
| 307 | #endif /* __DARWIN_C_LEVEL >= 199506L */ | ||
| 308 | |||
| 309 | |||
| 310 | |||
| 311 | /* Additional functionality provided by: | ||
| 312 | * POSIX.1-2001 | ||
| 313 | * ISO C99 | ||
| 314 | */ | ||
| 315 | |||
| 316 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 317 | #include <sys/_types/_off_t.h> | ||
| 318 | |||
| 319 | __BEGIN_DECLS | ||
| 320 | int	 fseeko(FILE * __stream, off_t __offset, int __whence); | ||
| 321 | off_t	 ftello(FILE * __stream); | ||
| 322 | __END_DECLS | ||
| 323 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 324 | |||
| 325 | #if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) | ||
| 326 | __BEGIN_DECLS | ||
| 327 | int	 snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4); | ||
| 328 | int	 vfscanf(FILE * __restrict __stream, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 329 | int	 vscanf(const char * __restrict __format, va_list) __scanflike(1, 0); | ||
| 330 | int	 vsnprintf(char * __restrict __str, size_t __size, const char * __restrict __format, va_list) __printflike(3, 0); | ||
| 331 | int	 vsscanf(const char * __restrict __str, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 332 | __END_DECLS | ||
| 333 | #endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */ | ||
| 334 | |||
| 335 | |||
| 336 | |||
| 337 | /* Additional functionality provided by: | ||
| 338 | * POSIX.1-2008 | ||
| 339 | */ | ||
| 340 | |||
| 341 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 342 | #include <sys/_types/_ssize_t.h> | ||
| 343 | |||
| 344 | __BEGIN_DECLS | ||
| 345 | int	dprintf(int, const char * __restrict, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 346 | int	vdprintf(int, const char * __restrict, va_list) __printflike(2, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 347 | ssize_t getdelim(char ** __restrict __linep, size_t * __restrict __linecapp, int __delimiter, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 348 | ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 349 | FILE *fmemopen(void * __restrict __buf, size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 350 | FILE *open_memstream(char **__bufp, size_t *__sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 351 | __END_DECLS | ||
| 352 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 353 | |||
| 354 | |||
| 355 | |||
| 356 | /* Darwin extensions */ | ||
| 357 | |||
| 358 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 359 | __BEGIN_DECLS | ||
| 360 | extern __const int sys_nerr;		/* perror(3) external variables */ | ||
| 361 | extern __const char *__const sys_errlist[]; | ||
| 362 | |||
| 363 | int	 asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 364 | char	*ctermid_r(char *); | ||
| 365 | char	*fgetln(FILE *, size_t *); | ||
| 366 | __const char *fmtcheck(const char *, const char *); | ||
| 367 | int	 fpurge(FILE *); | ||
| 368 | void	 setbuffer(FILE *, char *, int); | ||
| 369 | int	 setlinebuf(FILE *); | ||
| 370 | int	 vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 371 | |||
| 372 | |||
| 373 | /* | ||
| 374 | * Stdio function-access interface. | ||
| 375 | */ | ||
| 376 | FILE	*funopen(const void *, | ||
| 377 | int (* _Nullable)(void *, char *, int), | ||
| 378 | int (* _Nullable)(void *, const char *, int), | ||
| 379 | fpos_t (* _Nullable)(void *, fpos_t, int), | ||
| 380 | int (* _Nullable)(void *)); | ||
| 381 | __END_DECLS | ||
| 382 | #define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) | ||
| 383 | #define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) | ||
| 384 | |||
| 385 | #define	feof_unlocked(p)	__sfeof(p) | ||
| 386 | #define	ferror_unlocked(p)	__sferror(p) | ||
| 387 | #define	clearerr_unlocked(p)	__sclearerr(p) | ||
| 388 | #define	fileno_unlocked(p)	__sfileno(p) | ||
| 389 | |||
| 390 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 391 | |||
| 392 | |||
| 393 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 394 | #include <xlocale/_stdio.h> | ||
| 395 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 396 | |||
| 397 | #if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) | ||
| 398 | /* Security checking functions. */ | ||
| 399 | #include <secure/_stdio.h> | ||
| 400 | #endif | ||
| 401 | |||
| 402 | #endif /* _STDIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/stdlib.h created+375| ... | @@ -0,0 +1,375 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2002 - 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * Redistribution and use in source and binary forms, with or without | ||
| 28 | * modification, are permitted provided that the following conditions | ||
| 29 | * are met: | ||
| 30 | * 1. Redistributions of source code must retain the above copyright | ||
| 31 | * notice, this list of conditions and the following disclaimer. | ||
| 32 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 33 | * notice, this list of conditions and the following disclaimer in the | ||
| 34 | * documentation and/or other materials provided with the distribution. | ||
| 35 | * 3. All advertising materials mentioning features or use of this software | ||
| 36 | * must display the following acknowledgement: | ||
| 37 | *	This product includes software developed by the University of | ||
| 38 | *	California, Berkeley and its contributors. | ||
| 39 | * 4. Neither the name of the University nor the names of its contributors | ||
| 40 | * may be used to endorse or promote products derived from this software | ||
| 41 | * without specific prior written permission. | ||
| 42 | * | ||
| 43 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 44 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 46 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 49 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 51 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 52 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 53 | * SUCH DAMAGE. | ||
| 54 | * | ||
| 55 | *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95 | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _STDLIB_H_ | ||
| 59 | #define _STDLIB_H_ | ||
| 60 | |||
| 61 | #include <Availability.h> | ||
| 62 | #include <sys/cdefs.h> | ||
| 63 | |||
| 64 | #include <_types.h> | ||
| 65 | #if !defined(_ANSI_SOURCE) | ||
| 66 | #include <sys/wait.h> | ||
| 67 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 68 | #include <alloca.h> | ||
| 69 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 70 | #endif /* !_ANSI_SOURCE */ | ||
| 71 | |||
| 72 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | ||
| 73 | * _GCC_SIZE_T */ | ||
| 74 | #include <sys/_types/_size_t.h> | ||
| 75 | |||
| 76 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 77 | #include <sys/_types/_ct_rune_t.h> | ||
| 78 | #include <sys/_types/_rune_t.h> | ||
| 79 | #endif	/* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 80 | |||
| 81 | #include <sys/_types/_wchar_t.h> | ||
| 82 | |||
| 83 | typedef struct { | ||
| 84 | 	int quot;		/* quotient */ | ||
| 85 | 	int rem;		/* remainder */ | ||
| 86 | } div_t; | ||
| 87 | |||
| 88 | typedef struct { | ||
| 89 | 	long quot;		/* quotient */ | ||
| 90 | 	long rem;		/* remainder */ | ||
| 91 | } ldiv_t; | ||
| 92 | |||
| 93 | #if !__DARWIN_NO_LONG_LONG | ||
| 94 | typedef struct { | ||
| 95 | 	long long quot; | ||
| 96 | 	long long rem; | ||
| 97 | } lldiv_t; | ||
| 98 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 99 | |||
| 100 | #include <sys/_types/_null.h> | ||
| 101 | |||
| 102 | #define	EXIT_FAILURE	1 | ||
| 103 | #define	EXIT_SUCCESS	0 | ||
| 104 | |||
| 105 | #define	RAND_MAX	0x7fffffff | ||
| 106 | |||
| 107 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 108 | #include <_xlocale.h> | ||
| 109 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 110 | |||
| 111 | #ifndef MB_CUR_MAX | ||
| 112 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 113 | #define	MB_CUR_MAX	(___mb_cur_max()) | ||
| 114 | #ifndef MB_CUR_MAX_L | ||
| 115 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 116 | #endif /* !MB_CUR_MAX_L */ | ||
| 117 | #else /* !_USE_EXTENDED_LOCALES_ */ | ||
| 118 | extern int __mb_cur_max; | ||
| 119 | #define	MB_CUR_MAX	__mb_cur_max | ||
| 120 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 121 | #endif /* MB_CUR_MAX */ | ||
| 122 | |||
| 123 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ | ||
| 124 | && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) | ||
| 125 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 126 | #endif | ||
| 127 | |||
| 128 | #include <malloc/_malloc.h> | ||
| 129 | |||
| 130 | __BEGIN_DECLS | ||
| 131 | void	 abort(void) __cold __dead2; | ||
| 132 | int	 abs(int) __pure2; | ||
| 133 | int	 atexit(void (* _Nonnull)(void)); | ||
| 134 | double	 atof(const char *); | ||
| 135 | int	 atoi(const char *); | ||
| 136 | long	 atol(const char *); | ||
| 137 | #if !__DARWIN_NO_LONG_LONG | ||
| 138 | long long | ||
| 139 | 	 atoll(const char *); | ||
| 140 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 141 | void	*bsearch(const void *__key, const void *__base, size_t __nel, | ||
| 142 | 	 size_t __width, int (* _Nonnull __compar)(const void *, const void *)); | ||
| 143 | /* calloc is now declared in _malloc.h */ | ||
| 144 | div_t	 div(int, int) __pure2; | ||
| 145 | void	 exit(int) __dead2; | ||
| 146 | /* free is now declared in _malloc.h */ | ||
| 147 | char	*getenv(const char *); | ||
| 148 | long	 labs(long) __pure2; | ||
| 149 | ldiv_t	 ldiv(long, long) __pure2; | ||
| 150 | #if !__DARWIN_NO_LONG_LONG | ||
| 151 | long long | ||
| 152 | 	 llabs(long long); | ||
| 153 | lldiv_t	 lldiv(long long, long long); | ||
| 154 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 155 | /* malloc is now declared in _malloc.h */ | ||
| 156 | int	 mblen(const char *__s, size_t __n); | ||
| 157 | size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); | ||
| 158 | int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t); | ||
| 159 | /* posix_memalign is now declared in _malloc.h */ | ||
| 160 | void	 qsort(void *__base, size_t __nel, size_t __width, | ||
| 161 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 162 | int	 rand(void) __swift_unavailable("Use arc4random instead."); | ||
| 163 | /* realloc is now declared in _malloc.h */ | ||
| 164 | void	 srand(unsigned) __swift_unavailable("Use arc4random instead."); | ||
| 165 | double	 strtod(const char *, char **) __DARWIN_ALIAS(strtod); | ||
| 166 | float	 strtof(const char *, char **) __DARWIN_ALIAS(strtof); | ||
| 167 | long	 strtol(const char *__str, char **__endptr, int __base); | ||
| 168 | long double | ||
| 169 | 	 strtold(const char *, char **); | ||
| 170 | #if !__DARWIN_NO_LONG_LONG | ||
| 171 | long long | ||
| 172 | 	 strtoll(const char *__str, char **__endptr, int __base); | ||
| 173 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 174 | unsigned long | ||
| 175 | 	 strtoul(const char *__str, char **__endptr, int __base); | ||
| 176 | #if !__DARWIN_NO_LONG_LONG | ||
| 177 | unsigned long long | ||
| 178 | 	 strtoull(const char *__str, char **__endptr, int __base); | ||
| 179 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 180 | |||
| 181 | __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)") | ||
| 182 | __API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED | ||
| 183 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 184 | int	 system(const char *) __DARWIN_ALIAS_C(system); | ||
| 185 | |||
| 186 | |||
| 187 | size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t); | ||
| 188 | int	 wctomb(char *, wchar_t); | ||
| 189 | |||
| 190 | #ifndef _ANSI_SOURCE | ||
| 191 | void	_Exit(int) __dead2; | ||
| 192 | long	 a64l(const char *); | ||
| 193 | double	 drand48(void); | ||
| 194 | char	*ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 195 | double	 erand48(unsigned short[3]); | ||
| 196 | char	*fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 197 | char	*gcvt(double, int, char *); /* LEGACY */ | ||
| 198 | int	 getsubopt(char **, char * const *, char **); | ||
| 199 | int	 grantpt(int); | ||
| 200 | #if __DARWIN_UNIX03 | ||
| 201 | char	*initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ | ||
| 202 | #else /* !__DARWIN_UNIX03 */ | ||
| 203 | char	*initstate(unsigned long, char *, long); | ||
| 204 | #endif /* __DARWIN_UNIX03 */ | ||
| 205 | long	 jrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 206 | char	*l64a(long); | ||
| 207 | void	 lcong48(unsigned short[7]); | ||
| 208 | long	 lrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 209 | char	*mktemp(char *); | ||
| 210 | int	 mkstemp(char *); | ||
| 211 | long	 mrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 212 | long	 nrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 213 | int	 posix_openpt(int); | ||
| 214 | char	*ptsname(int); | ||
| 215 | |||
| 216 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 217 | int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3)); | ||
| 218 | #endif | ||
| 219 | |||
| 220 | int	 putenv(char *) __DARWIN_ALIAS(putenv); | ||
| 221 | long	 random(void) __swift_unavailable("Use arc4random instead."); | ||
| 222 | int	 rand_r(unsigned *) __swift_unavailable("Use arc4random instead."); | ||
| 223 | #if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) | ||
| 224 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); | ||
| 225 | #else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ | ||
| 226 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); | ||
| 227 | #endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ | ||
| 228 | unsigned short | ||
| 229 | 	*seed48(unsigned short[3]); | ||
| 230 | int	 setenv(const char * __name, const char * __value, int __overwrite) __DARWIN_ALIAS(setenv); | ||
| 231 | #if __DARWIN_UNIX03 | ||
| 232 | void	 setkey(const char *) __DARWIN_ALIAS(setkey); | ||
| 233 | #else /* !__DARWIN_UNIX03 */ | ||
| 234 | int	 setkey(const char *); | ||
| 235 | #endif /* __DARWIN_UNIX03 */ | ||
| 236 | char	*setstate(const char *); | ||
| 237 | void	 srand48(long); | ||
| 238 | #if __DARWIN_UNIX03 | ||
| 239 | void	 srandom(unsigned); | ||
| 240 | #else /* !__DARWIN_UNIX03 */ | ||
| 241 | void	 srandom(unsigned long); | ||
| 242 | #endif /* __DARWIN_UNIX03 */ | ||
| 243 | int	 unlockpt(int); | ||
| 244 | #if __DARWIN_UNIX03 | ||
| 245 | int	 unsetenv(const char *) __DARWIN_ALIAS(unsetenv); | ||
| 246 | #else /* !__DARWIN_UNIX03 */ | ||
| 247 | void	 unsetenv(const char *); | ||
| 248 | #endif /* __DARWIN_UNIX03 */ | ||
| 249 | #endif	/* !_ANSI_SOURCE */ | ||
| 250 | |||
| 251 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 252 | #include <machine/types.h> | ||
| 253 | #include <sys/_types/_dev_t.h> | ||
| 254 | #include <sys/_types/_mode_t.h> | ||
| 255 | #include <_types/_uint32_t.h> | ||
| 256 | |||
| 257 | uint32_t arc4random(void); | ||
| 258 | void	 arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/) | ||
| 259 | __OSX_DEPRECATED(10.0, 10.12, "use arc4random_stir") | ||
| 260 | __IOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 261 | __TVOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 262 | __WATCHOS_DEPRECATED(1.0, 3.0, "use arc4random_stir"); | ||
| 263 | void	 arc4random_buf(void * __buf, size_t __nbytes) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 264 | void	 arc4random_stir(void); | ||
| 265 | uint32_t | ||
| 266 | 	 arc4random_uniform(uint32_t __upper_bound) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 267 | #ifdef __BLOCKS__ | ||
| 268 | int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 269 | |||
| 270 | #ifdef __BLOCKS__ | ||
| 271 | #if __has_attribute(noescape) | ||
| 272 | #define __bsearch_noescape __attribute__((__noescape__)) | ||
| 273 | #else | ||
| 274 | #define __bsearch_noescape | ||
| 275 | #endif | ||
| 276 | #endif /* __BLOCKS__ */ | ||
| 277 | void	*bsearch_b(const void *__key, const void *__base, size_t __nel, | ||
| 278 | 	 size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __bsearch_noescape) | ||
| 279 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 280 | #endif /* __BLOCKS__ */ | ||
| 281 | |||
| 282 | 	 /* getcap(3) functions */ | ||
| 283 | char	*cgetcap(char *, const char *, int); | ||
| 284 | int	 cgetclose(void); | ||
| 285 | int	 cgetent(char **, char **, const char *); | ||
| 286 | int	 cgetfirst(char **, char **); | ||
| 287 | int	 cgetmatch(const char *, const char *); | ||
| 288 | int	 cgetnext(char **, char **); | ||
| 289 | int	 cgetnum(char *, const char *, long *); | ||
| 290 | int	 cgetset(const char *); | ||
| 291 | int	 cgetstr(char *, const char *, char **); | ||
| 292 | int	 cgetustr(char *, const char *, char **); | ||
| 293 | |||
| 294 | int	 daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 295 | char	*devname(dev_t, mode_t); | ||
| 296 | char	*devname_r(dev_t, mode_t, char *buf, int len); | ||
| 297 | char	*getbsize(int *, long *); | ||
| 298 | int	 getloadavg(double [], int); | ||
| 299 | const char | ||
| 300 | 	*getprogname(void); | ||
| 301 | void	 setprogname(const char *); | ||
| 302 | |||
| 303 | #ifdef __BLOCKS__ | ||
| 304 | #if __has_attribute(noescape) | ||
| 305 | #define __sort_noescape __attribute__((__noescape__)) | ||
| 306 | #else | ||
| 307 | #define __sort_noescape | ||
| 308 | #endif | ||
| 309 | #endif /* __BLOCKS__ */ | ||
| 310 | |||
| 311 | int	 heapsort(void *__base, size_t __nel, size_t __width, | ||
| 312 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 313 | #ifdef __BLOCKS__ | ||
| 314 | int	 heapsort_b(void *__base, size_t __nel, size_t __width, | ||
| 315 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 316 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 317 | #endif /* __BLOCKS__ */ | ||
| 318 | int	 mergesort(void *__base, size_t __nel, size_t __width, | ||
| 319 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 320 | #ifdef __BLOCKS__ | ||
| 321 | int	 mergesort_b(void *__base, size_t __nel, size_t __width, | ||
| 322 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 323 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 324 | #endif /* __BLOCKS__ */ | ||
| 325 | void	 psort(void *__base, size_t __nel, size_t __width, | ||
| 326 | 	 int (* _Nonnull __compar)(const void *, const void *)) | ||
| 327 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 328 | #ifdef __BLOCKS__ | ||
| 329 | void	 psort_b(void *__base, size_t __nel, size_t __width, | ||
| 330 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 331 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 332 | #endif /* __BLOCKS__ */ | ||
| 333 | void	 psort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 334 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)) | ||
| 335 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 336 | #ifdef __BLOCKS__ | ||
| 337 | void	 qsort_b(void *__base, size_t __nel, size_t __width, | ||
| 338 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 339 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 340 | #endif /* __BLOCKS__ */ | ||
| 341 | void	 qsort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 342 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)); | ||
| 343 | int	 radixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 344 | 	 unsigned __endbyte); | ||
| 345 | int	rpmatch(const char *) | ||
| 346 | 	__API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0)); | ||
| 347 | int	 sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 348 | 	 unsigned __endbyte); | ||
| 349 | void	 sranddev(void); | ||
| 350 | void	 srandomdev(void); | ||
| 351 | void	*reallocf(void *__ptr, size_t __size) __alloc_size(2); | ||
| 352 | long long | ||
| 353 | 	strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp) | ||
| 354 | 	__API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)); | ||
| 355 | #if !__DARWIN_NO_LONG_LONG | ||
| 356 | long long | ||
| 357 | 	 strtoq(const char *__str, char **__endptr, int __base); | ||
| 358 | unsigned long long | ||
| 359 | 	 strtouq(const char *__str, char **__endptr, int __base); | ||
| 360 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 361 | extern char *suboptarg;		/* getsubopt(3) external variable */ | ||
| 362 | /* valloc is now declared in _malloc.h */ | ||
| 363 | #endif	/* !_ANSI_SOURCE && !_POSIX_SOURCE */ | ||
| 364 | |||
| 365 | /* Poison the following routines if -fshort-wchar is set */ | ||
| 366 | #if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU | ||
| 367 | #pragma GCC poison mbstowcs mbtowc wcstombs wctomb | ||
| 368 | #endif | ||
| 369 | __END_DECLS | ||
| 370 | |||
| 371 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 372 | #include <xlocale/_stdlib.h> | ||
| 373 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 374 | |||
| 375 | #endif /* _STDLIB_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/_types/_uintptr_t.h+6| ... | @@ -27,5 +27,11 @@ | ... | @@ -27,5 +27,11 @@ |
| 27 | */ | 27 | */ |
| 28 | #ifndef _UINTPTR_T | 28 | #ifndef _UINTPTR_T |
| 29 | #define _UINTPTR_T | 29 | #define _UINTPTR_T |
| 30 | |||
| 31 | #ifndef __has_attribute | ||
| 30 | typedef unsigned long uintptr_t; | 32 | typedef unsigned long uintptr_t; |
| 33 | #else | ||
| 34 | typedef unsigned long uintptr_t; | ||
| 35 | #endif /* __has_attribute */ | ||
| 36 | |||
| 31 | #endif /* _UINTPTR_T */ | 37 | #endif /* _UINTPTR_T */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/clonefile.h created+53| ... | @@ -0,0 +1,53 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2015-2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _SYS_CLONEFILE_H_ | ||
| 30 | #define _SYS_CLONEFILE_H_ | ||
| 31 | |||
| 32 | /* Options for clonefile calls */ | ||
| 33 | #define CLONE_NOFOLLOW 0x0001 /* Don't follow symbolic links */ | ||
| 34 | #define CLONE_NOOWNERCOPY 0x0002 /* Don't copy ownership information from source */ | ||
| 35 | |||
| 36 | |||
| 37 | #include <sys/cdefs.h> | ||
| 38 | #include <machine/_types.h> | ||
| 39 | #include <_types/_uint32_t.h> | ||
| 40 | #include <Availability.h> | ||
| 41 | |||
| 42 | __BEGIN_DECLS | ||
| 43 | |||
| 44 | 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); | ||
| 45 | |||
| 46 | int fclonefileat(int, int, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 47 | |||
| 48 | int clonefile(const char *, const char *, uint32_t) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 49 | |||
| 50 | __END_DECLS | ||
| 51 | |||
| 52 | |||
| 53 | #endif /* _SYS_CLONEFILE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/ioctl.h+1-1| ... | @@ -107,4 +107,4 @@ __END_DECLS | ... | @@ -107,4 +107,4 @@ __END_DECLS |
| 107 | */ | 107 | */ |
| 108 | #if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) | 108 | #if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) |
| 109 | #include <sys/ioctl_compat.h> | 109 | #include <sys/ioctl_compat.h> |
| 110 | #endif /* !_SYS_IOCTL_H_ */ | ||
| \ No newline at end of file | |||
| 110 | #endif /* defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/random.h+3-2| ... | @@ -29,12 +29,13 @@ | ... | @@ -29,12 +29,13 @@ |
| 29 | #ifndef __SYS_RANDOM_H__ | 29 | #ifndef __SYS_RANDOM_H__ |
| 30 | #define __SYS_RANDOM_H__ | 30 | #define __SYS_RANDOM_H__ |
| 31 | 31 | ||
| 32 | #include <Availability.h> | ||
| 33 | #include <stddef.h> | ||
| 32 | #include <sys/appleapiopts.h> | 34 | #include <sys/appleapiopts.h> |
| 33 | #include <sys/cdefs.h> | 35 | #include <sys/cdefs.h> |
| 34 | 36 | ||
| 35 | __BEGIN_DECLS | 37 | __BEGIN_DECLS |
| 36 | __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | 38 | int getentropy(void* buffer, size_t size) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); |
| 37 | int getentropy(void* buffer, size_t size); | ||
| 38 | __END_DECLS | 39 | __END_DECLS |
| 39 | 40 | ||
| 40 | #endif /* __SYS_RANDOM_H__ */ | 41 | #endif /* __SYS_RANDOM_H__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/resource.h created+524| ... | @@ -0,0 +1,524 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /* | ||
| 30 | * Copyright (c) 1982, 1986, 1993 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)resource.h	8.2 (Berkeley) 1/4/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_RESOURCE_H_ | ||
| 65 | #define _SYS_RESOURCE_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | #include <sys/cdefs.h> | ||
| 69 | #include <sys/_types.h> | ||
| 70 | |||
| 71 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 72 | #include <stdint.h> | ||
| 73 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 74 | |||
| 75 | #include <Availability.h> | ||
| 76 | |||
| 77 | /* [XSI] The timeval structure shall be defined as described in | ||
| 78 | * <sys/time.h> | ||
| 79 | */ | ||
| 80 | #include <sys/_types/_timeval.h> | ||
| 81 | |||
| 82 | /* The id_t type shall be defined as described in <sys/types.h> */ | ||
| 83 | #include <sys/_types/_id_t.h> | ||
| 84 | |||
| 85 | |||
| 86 | /* | ||
| 87 | * Resource limit type (low 63 bits, excluding the sign bit) | ||
| 88 | */ | ||
| 89 | typedef __uint64_t rlim_t; | ||
| 90 | |||
| 91 | |||
| 92 | /***** | ||
| 93 | * PRIORITY | ||
| 94 | */ | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Possible values of the first parameter to getpriority()/setpriority(), | ||
| 98 | * used to indicate the type of the second parameter. | ||
| 99 | */ | ||
| 100 | #define PRIO_PROCESS 0 /* Second argument is a PID */ | ||
| 101 | #define PRIO_PGRP 1 /* Second argument is a GID */ | ||
| 102 | #define PRIO_USER 2 /* Second argument is a UID */ | ||
| 103 | |||
| 104 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 105 | #define PRIO_DARWIN_THREAD 3 /* Second argument is always 0 (current thread) */ | ||
| 106 | #define PRIO_DARWIN_PROCESS 4 /* Second argument is a PID */ | ||
| 107 | |||
| 108 | |||
| 109 | /* | ||
| 110 | * Range limitations for the value of the third parameter to setpriority(). | ||
| 111 | */ | ||
| 112 | #define PRIO_MIN -20 | ||
| 113 | #define PRIO_MAX 20 | ||
| 114 | |||
| 115 | /* | ||
| 116 | * use PRIO_DARWIN_BG to set the current thread into "background" state | ||
| 117 | * which lowers CPU, disk IO, and networking priorites until thread terminates | ||
| 118 | * or "background" state is revoked | ||
| 119 | */ | ||
| 120 | #define PRIO_DARWIN_BG 0x1000 | ||
| 121 | |||
| 122 | /* | ||
| 123 | * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to | ||
| 124 | * the GPU. (deprecated) | ||
| 125 | */ | ||
| 126 | #define PRIO_DARWIN_NONUI 0x1001 | ||
| 127 | |||
| 128 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | /***** | ||
| 133 | * RESOURCE USAGE | ||
| 134 | */ | ||
| 135 | |||
| 136 | /* | ||
| 137 | * Possible values of the first parameter to getrusage(), used to indicate | ||
| 138 | * the scope of the information to be returned. | ||
| 139 | */ | ||
| 140 | #define RUSAGE_SELF 0 /* Current process information */ | ||
| 141 | #define RUSAGE_CHILDREN -1 /* Current process' children */ | ||
| 142 | |||
| 143 | /* | ||
| 144 | * A structure representing an accounting of resource utilization. The | ||
| 145 | * address of an instance of this structure is the second parameter to | ||
| 146 | * getrusage(). | ||
| 147 | * | ||
| 148 | * Note: All values other than ru_utime and ru_stime are implementaiton | ||
| 149 | * defined and subject to change in a future release. Their use | ||
| 150 | * is discouraged for standards compliant programs. | ||
| 151 | */ | ||
| 152 | struct rusage { | ||
| 153 | 	struct timeval ru_utime; /* user time used (PL) */ | ||
| 154 | 	struct timeval ru_stime; /* system time used (PL) */ | ||
| 155 | #if __DARWIN_C_LEVEL < __DARWIN_C_FULL | ||
| 156 | 	long ru_opaque[14]; /* implementation defined */ | ||
| 157 | #else | ||
| 158 | 	/* | ||
| 159 | 	 * Informational aliases for source compatibility with programs | ||
| 160 | 	 * that need more information than that provided by standards, | ||
| 161 | 	 * and which do not mind being OS-dependent. | ||
| 162 | 	 */ | ||
| 163 | 	long ru_maxrss; /* max resident set size (PL) */ | ||
| 164 | #define ru_first ru_ixrss /* internal: ruadd() range start */ | ||
| 165 | 	long ru_ixrss; /* integral shared memory size (NU) */ | ||
| 166 | 	long ru_idrss; /* integral unshared data (NU) */ | ||
| 167 | 	long ru_isrss; /* integral unshared stack (NU) */ | ||
| 168 | 	long ru_minflt; /* page reclaims (NU) */ | ||
| 169 | 	long ru_majflt; /* page faults (NU) */ | ||
| 170 | 	long ru_nswap; /* swaps (NU) */ | ||
| 171 | 	long ru_inblock; /* block input operations (atomic) */ | ||
| 172 | 	long ru_oublock; /* block output operations (atomic) */ | ||
| 173 | 	long ru_msgsnd; /* messages sent (atomic) */ | ||
| 174 | 	long ru_msgrcv; /* messages received (atomic) */ | ||
| 175 | 	long ru_nsignals; /* signals received (atomic) */ | ||
| 176 | 	long ru_nvcsw; /* voluntary context switches (atomic) */ | ||
| 177 | 	long ru_nivcsw; /* involuntary " */ | ||
| 178 | #define ru_last ru_nivcsw /* internal: ruadd() range end */ | ||
| 179 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 183 | /* | ||
| 184 | * Flavors for proc_pid_rusage(). | ||
| 185 | */ | ||
| 186 | #define RUSAGE_INFO_V0 0 | ||
| 187 | #define RUSAGE_INFO_V1 1 | ||
| 188 | #define RUSAGE_INFO_V2 2 | ||
| 189 | #define RUSAGE_INFO_V3 3 | ||
| 190 | #define RUSAGE_INFO_V4 4 | ||
| 191 | #define RUSAGE_INFO_V5 5 | ||
| 192 | #define RUSAGE_INFO_CURRENT RUSAGE_INFO_V5 | ||
| 193 | |||
| 194 | /* | ||
| 195 | * Flags for RUSAGE_INFO_V5 | ||
| 196 | */ | ||
| 197 | #define RU_PROC_RUNS_RESLIDE 0x00000001 /* proc has reslid shared cache */ | ||
| 198 | |||
| 199 | typedef void *rusage_info_t; | ||
| 200 | |||
| 201 | struct rusage_info_v0 { | ||
| 202 | 	uint8_t ri_uuid[16]; | ||
| 203 | 	uint64_t ri_user_time; | ||
| 204 | 	uint64_t ri_system_time; | ||
| 205 | 	uint64_t ri_pkg_idle_wkups; | ||
| 206 | 	uint64_t ri_interrupt_wkups; | ||
| 207 | 	uint64_t ri_pageins; | ||
| 208 | 	uint64_t ri_wired_size; | ||
| 209 | 	uint64_t ri_resident_size; | ||
| 210 | 	uint64_t ri_phys_footprint; | ||
| 211 | 	uint64_t ri_proc_start_abstime; | ||
| 212 | 	uint64_t ri_proc_exit_abstime; | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct rusage_info_v1 { | ||
| 216 | 	uint8_t ri_uuid[16]; | ||
| 217 | 	uint64_t ri_user_time; | ||
| 218 | 	uint64_t ri_system_time; | ||
| 219 | 	uint64_t ri_pkg_idle_wkups; | ||
| 220 | 	uint64_t ri_interrupt_wkups; | ||
| 221 | 	uint64_t ri_pageins; | ||
| 222 | 	uint64_t ri_wired_size; | ||
| 223 | 	uint64_t ri_resident_size; | ||
| 224 | 	uint64_t ri_phys_footprint; | ||
| 225 | 	uint64_t ri_proc_start_abstime; | ||
| 226 | 	uint64_t ri_proc_exit_abstime; | ||
| 227 | 	uint64_t ri_child_user_time; | ||
| 228 | 	uint64_t ri_child_system_time; | ||
| 229 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 230 | 	uint64_t ri_child_interrupt_wkups; | ||
| 231 | 	uint64_t ri_child_pageins; | ||
| 232 | 	uint64_t ri_child_elapsed_abstime; | ||
| 233 | }; | ||
| 234 | |||
| 235 | struct rusage_info_v2 { | ||
| 236 | 	uint8_t ri_uuid[16]; | ||
| 237 | 	uint64_t ri_user_time; | ||
| 238 | 	uint64_t ri_system_time; | ||
| 239 | 	uint64_t ri_pkg_idle_wkups; | ||
| 240 | 	uint64_t ri_interrupt_wkups; | ||
| 241 | 	uint64_t ri_pageins; | ||
| 242 | 	uint64_t ri_wired_size; | ||
| 243 | 	uint64_t ri_resident_size; | ||
| 244 | 	uint64_t ri_phys_footprint; | ||
| 245 | 	uint64_t ri_proc_start_abstime; | ||
| 246 | 	uint64_t ri_proc_exit_abstime; | ||
| 247 | 	uint64_t ri_child_user_time; | ||
| 248 | 	uint64_t ri_child_system_time; | ||
| 249 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 250 | 	uint64_t ri_child_interrupt_wkups; | ||
| 251 | 	uint64_t ri_child_pageins; | ||
| 252 | 	uint64_t ri_child_elapsed_abstime; | ||
| 253 | 	uint64_t ri_diskio_bytesread; | ||
| 254 | 	uint64_t ri_diskio_byteswritten; | ||
| 255 | }; | ||
| 256 | |||
| 257 | struct rusage_info_v3 { | ||
| 258 | 	uint8_t ri_uuid[16]; | ||
| 259 | 	uint64_t ri_user_time; | ||
| 260 | 	uint64_t ri_system_time; | ||
| 261 | 	uint64_t ri_pkg_idle_wkups; | ||
| 262 | 	uint64_t ri_interrupt_wkups; | ||
| 263 | 	uint64_t ri_pageins; | ||
| 264 | 	uint64_t ri_wired_size; | ||
| 265 | 	uint64_t ri_resident_size; | ||
| 266 | 	uint64_t ri_phys_footprint; | ||
| 267 | 	uint64_t ri_proc_start_abstime; | ||
| 268 | 	uint64_t ri_proc_exit_abstime; | ||
| 269 | 	uint64_t ri_child_user_time; | ||
| 270 | 	uint64_t ri_child_system_time; | ||
| 271 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 272 | 	uint64_t ri_child_interrupt_wkups; | ||
| 273 | 	uint64_t ri_child_pageins; | ||
| 274 | 	uint64_t ri_child_elapsed_abstime; | ||
| 275 | 	uint64_t ri_diskio_bytesread; | ||
| 276 | 	uint64_t ri_diskio_byteswritten; | ||
| 277 | 	uint64_t ri_cpu_time_qos_default; | ||
| 278 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 279 | 	uint64_t ri_cpu_time_qos_background; | ||
| 280 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 281 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 282 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 283 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 284 | 	uint64_t ri_billed_system_time; | ||
| 285 | 	uint64_t ri_serviced_system_time; | ||
| 286 | }; | ||
| 287 | |||
| 288 | struct rusage_info_v4 { | ||
| 289 | 	uint8_t ri_uuid[16]; | ||
| 290 | 	uint64_t ri_user_time; | ||
| 291 | 	uint64_t ri_system_time; | ||
| 292 | 	uint64_t ri_pkg_idle_wkups; | ||
| 293 | 	uint64_t ri_interrupt_wkups; | ||
| 294 | 	uint64_t ri_pageins; | ||
| 295 | 	uint64_t ri_wired_size; | ||
| 296 | 	uint64_t ri_resident_size; | ||
| 297 | 	uint64_t ri_phys_footprint; | ||
| 298 | 	uint64_t ri_proc_start_abstime; | ||
| 299 | 	uint64_t ri_proc_exit_abstime; | ||
| 300 | 	uint64_t ri_child_user_time; | ||
| 301 | 	uint64_t ri_child_system_time; | ||
| 302 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 303 | 	uint64_t ri_child_interrupt_wkups; | ||
| 304 | 	uint64_t ri_child_pageins; | ||
| 305 | 	uint64_t ri_child_elapsed_abstime; | ||
| 306 | 	uint64_t ri_diskio_bytesread; | ||
| 307 | 	uint64_t ri_diskio_byteswritten; | ||
| 308 | 	uint64_t ri_cpu_time_qos_default; | ||
| 309 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 310 | 	uint64_t ri_cpu_time_qos_background; | ||
| 311 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 312 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 313 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 314 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 315 | 	uint64_t ri_billed_system_time; | ||
| 316 | 	uint64_t ri_serviced_system_time; | ||
| 317 | 	uint64_t ri_logical_writes; | ||
| 318 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 319 | 	uint64_t ri_instructions; | ||
| 320 | 	uint64_t ri_cycles; | ||
| 321 | 	uint64_t ri_billed_energy; | ||
| 322 | 	uint64_t ri_serviced_energy; | ||
| 323 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 324 | 	uint64_t ri_runnable_time; | ||
| 325 | }; | ||
| 326 | |||
| 327 | struct rusage_info_v5 { | ||
| 328 | 	uint8_t ri_uuid[16]; | ||
| 329 | 	uint64_t ri_user_time; | ||
| 330 | 	uint64_t ri_system_time; | ||
| 331 | 	uint64_t ri_pkg_idle_wkups; | ||
| 332 | 	uint64_t ri_interrupt_wkups; | ||
| 333 | 	uint64_t ri_pageins; | ||
| 334 | 	uint64_t ri_wired_size; | ||
| 335 | 	uint64_t ri_resident_size; | ||
| 336 | 	uint64_t ri_phys_footprint; | ||
| 337 | 	uint64_t ri_proc_start_abstime; | ||
| 338 | 	uint64_t ri_proc_exit_abstime; | ||
| 339 | 	uint64_t ri_child_user_time; | ||
| 340 | 	uint64_t ri_child_system_time; | ||
| 341 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 342 | 	uint64_t ri_child_interrupt_wkups; | ||
| 343 | 	uint64_t ri_child_pageins; | ||
| 344 | 	uint64_t ri_child_elapsed_abstime; | ||
| 345 | 	uint64_t ri_diskio_bytesread; | ||
| 346 | 	uint64_t ri_diskio_byteswritten; | ||
| 347 | 	uint64_t ri_cpu_time_qos_default; | ||
| 348 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 349 | 	uint64_t ri_cpu_time_qos_background; | ||
| 350 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 351 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 352 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 353 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 354 | 	uint64_t ri_billed_system_time; | ||
| 355 | 	uint64_t ri_serviced_system_time; | ||
| 356 | 	uint64_t ri_logical_writes; | ||
| 357 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 358 | 	uint64_t ri_instructions; | ||
| 359 | 	uint64_t ri_cycles; | ||
| 360 | 	uint64_t ri_billed_energy; | ||
| 361 | 	uint64_t ri_serviced_energy; | ||
| 362 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 363 | 	uint64_t ri_runnable_time; | ||
| 364 | 	uint64_t ri_flags; | ||
| 365 | }; | ||
| 366 | |||
| 367 | typedef struct rusage_info_v5 rusage_info_current; | ||
| 368 | |||
| 369 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 370 | |||
| 371 | |||
| 372 | |||
| 373 | /***** | ||
| 374 | * RESOURCE LIMITS | ||
| 375 | */ | ||
| 376 | |||
| 377 | /* | ||
| 378 | * Symbolic constants for resource limits; since all limits are representable | ||
| 379 | * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of | ||
| 380 | * RLIM_INFINITY. | ||
| 381 | */ | ||
| 382 | #define RLIM_INFINITY (((__uint64_t)1 << 63) - 1) /* no limit */ | ||
| 383 | #define RLIM_SAVED_MAX RLIM_INFINITY /* Unrepresentable hard limit */ | ||
| 384 | #define RLIM_SAVED_CUR RLIM_INFINITY /* Unrepresentable soft limit */ | ||
| 385 | |||
| 386 | /* | ||
| 387 | * Possible values of the first parameter to getrlimit()/setrlimit(), to | ||
| 388 | * indicate for which resource the operation is being performed. | ||
| 389 | */ | ||
| 390 | #define RLIMIT_CPU 0 /* cpu time per process */ | ||
| 391 | #define RLIMIT_FSIZE 1 /* file size */ | ||
| 392 | #define RLIMIT_DATA 2 /* data segment size */ | ||
| 393 | #define RLIMIT_STACK 3 /* stack size */ | ||
| 394 | #define RLIMIT_CORE 4 /* core file size */ | ||
| 395 | #define RLIMIT_AS 5 /* address space (resident set size) */ | ||
| 396 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 397 | #define RLIMIT_RSS RLIMIT_AS /* source compatibility alias */ | ||
| 398 | #define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */ | ||
| 399 | #define RLIMIT_NPROC 7 /* number of processes */ | ||
| 400 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 401 | #define RLIMIT_NOFILE 8 /* number of open files */ | ||
| 402 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 403 | #define RLIM_NLIMITS 9 /* total number of resource limits */ | ||
| 404 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 405 | #define _RLIMIT_POSIX_FLAG 0x1000 /* Set bit for strict POSIX */ | ||
| 406 | |||
| 407 | /* | ||
| 408 | * A structure representing a resource limit. The address of an instance | ||
| 409 | * of this structure is the second parameter to getrlimit()/setrlimit(). | ||
| 410 | */ | ||
| 411 | struct rlimit { | ||
| 412 | 	rlim_t rlim_cur; /* current (soft) limit */ | ||
| 413 | 	rlim_t rlim_max; /* maximum value for rlim_cur */ | ||
| 414 | }; | ||
| 415 | |||
| 416 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 417 | /* | ||
| 418 | * proc_rlimit_control() | ||
| 419 | * | ||
| 420 | * Resource limit flavors | ||
| 421 | */ | ||
| 422 | #define RLIMIT_WAKEUPS_MONITOR 0x1 /* Configure the wakeups monitor. */ | ||
| 423 | #define RLIMIT_CPU_USAGE_MONITOR 0x2 /* Configure the CPU usage monitor. */ | ||
| 424 | #define RLIMIT_THREAD_CPULIMITS 0x3 /* Configure a blocking, per-thread, CPU limits. */ | ||
| 425 | #define RLIMIT_FOOTPRINT_INTERVAL 0x4 /* Configure memory footprint interval tracking */ | ||
| 426 | |||
| 427 | /* | ||
| 428 | * Flags for wakeups monitor control. | ||
| 429 | */ | ||
| 430 | #define WAKEMON_ENABLE 0x01 | ||
| 431 | #define WAKEMON_DISABLE 0x02 | ||
| 432 | #define WAKEMON_GET_PARAMS 0x04 | ||
| 433 | #define WAKEMON_SET_DEFAULTS 0x08 | ||
| 434 | #define WAKEMON_MAKE_FATAL 0x10 /* Configure the task so that violations are fatal. */ | ||
| 435 | |||
| 436 | /* | ||
| 437 | * Flags for CPU usage monitor control. | ||
| 438 | */ | ||
| 439 | #define CPUMON_MAKE_FATAL 0x1000 | ||
| 440 | |||
| 441 | /* | ||
| 442 | * Flags for memory footprint interval tracking. | ||
| 443 | */ | ||
| 444 | #define FOOTPRINT_INTERVAL_RESET 0x1 /* Reset the footprint interval counter to zero */ | ||
| 445 | |||
| 446 | struct proc_rlimit_control_wakeupmon { | ||
| 447 | 	uint32_t wm_flags; | ||
| 448 | 	int32_t wm_rate; | ||
| 449 | }; | ||
| 450 | |||
| 451 | |||
| 452 | |||
| 453 | /* I/O type */ | ||
| 454 | #define IOPOL_TYPE_DISK 0 | ||
| 455 | #define IOPOL_TYPE_VFS_ATIME_UPDATES 2 | ||
| 456 | #define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3 | ||
| 457 | #define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4 | ||
| 458 | #define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5 | ||
| 459 | #define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6 | ||
| 460 | #define IOPOL_TYPE_VFS_IGNORE_PERMISSIONS 7 | ||
| 461 | #define IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE 8 | ||
| 462 | #define IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES 9 | ||
| 463 | |||
| 464 | /* scope */ | ||
| 465 | #define IOPOL_SCOPE_PROCESS 0 | ||
| 466 | #define IOPOL_SCOPE_THREAD 1 | ||
| 467 | #define IOPOL_SCOPE_DARWIN_BG 2 | ||
| 468 | |||
| 469 | /* I/O Priority */ | ||
| 470 | #define IOPOL_DEFAULT 0 | ||
| 471 | #define IOPOL_IMPORTANT 1 | ||
| 472 | #define IOPOL_PASSIVE 2 | ||
| 473 | #define IOPOL_THROTTLE 3 | ||
| 474 | #define IOPOL_UTILITY 4 | ||
| 475 | #define IOPOL_STANDARD 5 | ||
| 476 | |||
| 477 | /* compatibility with older names */ | ||
| 478 | #define IOPOL_APPLICATION IOPOL_STANDARD | ||
| 479 | #define IOPOL_NORMAL IOPOL_IMPORTANT | ||
| 480 | |||
| 481 | |||
| 482 | #define IOPOL_ATIME_UPDATES_DEFAULT 0 | ||
| 483 | #define IOPOL_ATIME_UPDATES_OFF 1 | ||
| 484 | |||
| 485 | #define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0 | ||
| 486 | #define IOPOL_MATERIALIZE_DATALESS_FILES_OFF 1 | ||
| 487 | #define IOPOL_MATERIALIZE_DATALESS_FILES_ON 2 | ||
| 488 | |||
| 489 | #define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0 | ||
| 490 | #define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1 | ||
| 491 | |||
| 492 | #define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0 | ||
| 493 | #define IOPOL_VFS_TRIGGER_RESOLVE_OFF 1 | ||
| 494 | |||
| 495 | #define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0 | ||
| 496 | #define IOPOL_VFS_CONTENT_PROTECTION_IGNORE 1 | ||
| 497 | |||
| 498 | #define IOPOL_VFS_IGNORE_PERMISSIONS_OFF 0 | ||
| 499 | #define IOPOL_VFS_IGNORE_PERMISSIONS_ON 1 | ||
| 500 | |||
| 501 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_OFF 0 | ||
| 502 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_ON 1 | ||
| 503 | |||
| 504 | #define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF 0 | ||
| 505 | #define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON 1 | ||
| 506 | |||
| 507 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 508 | |||
| 509 | |||
| 510 | __BEGIN_DECLS | ||
| 511 | int getpriority(int, id_t); | ||
| 512 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 513 | int getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 514 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 515 | int getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit); | ||
| 516 | int getrusage(int, struct rusage *); | ||
| 517 | int setpriority(int, id_t, int); | ||
| 518 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 519 | int setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 520 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 521 | int setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit); | ||
| 522 | __END_DECLS | ||
| 523 | |||
| 524 | #endif /* !_SYS_RESOURCE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/socket.h created+745| ... | @@ -0,0 +1,745 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2019 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */ | ||
| 29 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 30 | /* | ||
| 31 | * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 | ||
| 32 | *	The Regents of the University of California. All rights reserved. | ||
| 33 | * | ||
| 34 | * Redistribution and use in source and binary forms, with or without | ||
| 35 | * modification, are permitted provided that the following conditions | ||
| 36 | * are met: | ||
| 37 | * 1. Redistributions of source code must retain the above copyright | ||
| 38 | * notice, this list of conditions and the following disclaimer. | ||
| 39 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 40 | * notice, this list of conditions and the following disclaimer in the | ||
| 41 | * documentation and/or other materials provided with the distribution. | ||
| 42 | * 3. All advertising materials mentioning features or use of this software | ||
| 43 | * must display the following acknowledgement: | ||
| 44 | *	This product includes software developed by the University of | ||
| 45 | *	California, Berkeley and its contributors. | ||
| 46 | * 4. Neither the name of the University nor the names of its contributors | ||
| 47 | * may be used to endorse or promote products derived from this software | ||
| 48 | * without specific prior written permission. | ||
| 49 | * | ||
| 50 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 51 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 53 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 54 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 55 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 56 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 57 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 58 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 59 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 60 | * SUCH DAMAGE. | ||
| 61 | * | ||
| 62 | *	@(#)socket.h	8.4 (Berkeley) 2/21/94 | ||
| 63 | * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $ | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce | ||
| 67 | * support for mandatory and extensible security protections. This notice | ||
| 68 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 69 | * Version 2.0. | ||
| 70 | */ | ||
| 71 | |||
| 72 | #ifndef _SYS_SOCKET_H_ | ||
| 73 | #define _SYS_SOCKET_H_ | ||
| 74 | |||
| 75 | #include <sys/types.h> | ||
| 76 | #include <sys/cdefs.h> | ||
| 77 | #include <machine/_param.h> | ||
| 78 | #include <net/net_kev.h> | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | #include <Availability.h> | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Definitions related to sockets: types, address families, options. | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Data types. | ||
| 90 | */ | ||
| 91 | |||
| 92 | #include <sys/_types/_gid_t.h> | ||
| 93 | #include <sys/_types/_off_t.h> | ||
| 94 | #include <sys/_types/_pid_t.h> | ||
| 95 | #include <sys/_types/_sa_family_t.h> | ||
| 96 | #include <sys/_types/_socklen_t.h> | ||
| 97 | |||
| 98 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 99 | #include <sys/_types/_size_t.h> | ||
| 100 | |||
| 101 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 102 | #include <sys/_types/_ssize_t.h> | ||
| 103 | |||
| 104 | /* | ||
| 105 | * [XSI] The iovec structure shall be defined as described in <sys/uio.h>. | ||
| 106 | */ | ||
| 107 | #include <sys/_types/_iovec_t.h> | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Types | ||
| 111 | */ | ||
| 112 | #define SOCK_STREAM 1 /* stream socket */ | ||
| 113 | #define SOCK_DGRAM 2 /* datagram socket */ | ||
| 114 | #define SOCK_RAW 3 /* raw-protocol interface */ | ||
| 115 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 116 | #define SOCK_RDM 4 /* reliably-delivered message */ | ||
| 117 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 118 | #define SOCK_SEQPACKET 5 /* sequenced packet stream */ | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Option flags per-socket. | ||
| 122 | */ | ||
| 123 | #define SO_DEBUG 0x0001 /* turn on debugging info recording */ | ||
| 124 | #define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ | ||
| 125 | #define SO_REUSEADDR 0x0004 /* allow local address reuse */ | ||
| 126 | #define SO_KEEPALIVE 0x0008 /* keep connections alive */ | ||
| 127 | #define SO_DONTROUTE 0x0010 /* just use interface addresses */ | ||
| 128 | #define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ | ||
| 129 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 130 | #define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ | ||
| 131 | #define SO_LINGER 0x0080 /* linger on close if data present (in ticks) */ | ||
| 132 | #else | ||
| 133 | #define SO_LINGER 0x1080 /* linger on close if data present (in seconds) */ | ||
| 134 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 135 | #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ | ||
| 136 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 137 | #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ | ||
| 138 | #define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ | ||
| 139 | #define SO_TIMESTAMP_MONOTONIC 0x0800 /* Monotonically increasing timestamp on rcvd dgram */ | ||
| 140 | #ifndef __APPLE__ | ||
| 141 | #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ | ||
| 142 | #else | ||
| 143 | #define SO_DONTTRUNC 0x2000 /* APPLE: Retain unread data */ | ||
| 144 | /* (ATOMIC proto) */ | ||
| 145 | #define SO_WANTMORE 0x4000 /* APPLE: Give hint when more data ready */ | ||
| 146 | #define SO_WANTOOBFLAG 0x8000 /* APPLE: Want OOB in MSG_FLAG on receive */ | ||
| 147 | |||
| 148 | |||
| 149 | #endif /* (!__APPLE__) */ | ||
| 150 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 151 | |||
| 152 | /* | ||
| 153 | * Additional options, not kept in so_options. | ||
| 154 | */ | ||
| 155 | #define SO_SNDBUF 0x1001 /* send buffer size */ | ||
| 156 | #define SO_RCVBUF 0x1002 /* receive buffer size */ | ||
| 157 | #define SO_SNDLOWAT 0x1003 /* send low-water mark */ | ||
| 158 | #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ | ||
| 159 | #define SO_SNDTIMEO 0x1005 /* send timeout */ | ||
| 160 | #define SO_RCVTIMEO 0x1006 /* receive timeout */ | ||
| 161 | #define SO_ERROR 0x1007 /* get error status and clear */ | ||
| 162 | #define SO_TYPE 0x1008 /* get socket type */ | ||
| 163 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 164 | #define SO_LABEL 0x1010 /* deprecated */ | ||
| 165 | #define SO_PEERLABEL 0x1011 /* deprecated */ | ||
| 166 | #ifdef __APPLE__ | ||
| 167 | #define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */ | ||
| 168 | #define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */ | ||
| 169 | #define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */ | ||
| 170 | #define SO_NOADDRERR 0x1023 /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */ | ||
| 171 | #define SO_NWRITE 0x1024 /* APPLE: Get number of bytes currently in send socket buffer */ | ||
| 172 | #define SO_REUSESHAREUID 0x1025 /* APPLE: Allow reuse of port/socket by different userids */ | ||
| 173 | #ifdef __APPLE_API_PRIVATE | ||
| 174 | #define SO_NOTIFYCONFLICT 0x1026 /* APPLE: send notification if there is a bind on a port which is already in use */ | ||
| 175 | #define SO_UPCALLCLOSEWAIT 0x1027 /* APPLE: block on close until an upcall returns */ | ||
| 176 | #endif | ||
| 177 | #define SO_LINGER_SEC 0x1080 /* linger on close if data present (in seconds) */ | ||
| 178 | #define SO_RANDOMPORT 0x1082 /* APPLE: request local port randomization */ | ||
| 179 | #define SO_NP_EXTENSIONS 0x1083 /* To turn off some POSIX behavior */ | ||
| 180 | #endif | ||
| 181 | |||
| 182 | #define SO_NUMRCVPKT 0x1112 /* number of datagrams in receive socket buffer */ | ||
| 183 | #define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */ | ||
| 184 | |||
| 185 | |||
| 186 | #define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */ | ||
| 187 | |||
| 188 | |||
| 189 | /* When adding new socket-options, you need to make sure MPTCP supports these as well! */ | ||
| 190 | |||
| 191 | /* | ||
| 192 | * Network Service Type for option SO_NET_SERVICE_TYPE | ||
| 193 | * | ||
| 194 | * The vast majority of sockets should use Best Effort that is the default | ||
| 195 | * Network Service Type. Other Network Service Types have to be used only if | ||
| 196 | * the traffic actually matches the description of the Network Service Type. | ||
| 197 | * | ||
| 198 | * Network Service Types do not represent priorities but rather describe | ||
| 199 | * different categories of delay, jitter and loss parameters. | ||
| 200 | * Those parameters may influence protocols from layer 4 protocols like TCP | ||
| 201 | * to layer 2 protocols like Wi-Fi. The Network Service Type can determine | ||
| 202 | * how the traffic is queued and scheduled by the host networking stack and | ||
| 203 | * by other entities on the network like switches and routers. For example | ||
| 204 | * for Wi-Fi, the Network Service Type can select the marking of the | ||
| 205 | * layer 2 packet with the appropriate WMM Access Category. | ||
| 206 | * | ||
| 207 | * There is no point in attempting to game the system and use | ||
| 208 | * a Network Service Type that does not correspond to the actual | ||
| 209 | * traffic characteristic but one that seems to have a higher precedence. | ||
| 210 | * The reason is that for service classes that have lower tolerance | ||
| 211 | * for delay and jitter, the queues size is lower than for service | ||
| 212 | * classes that are more tolerant to delay and jitter. | ||
| 213 | * | ||
| 214 | * For example using a voice service type for bulk data transfer will lead | ||
| 215 | * to disastrous results as soon as congestion happens because the voice | ||
| 216 | * queue overflows and packets get dropped. This is not only bad for the bulk | ||
| 217 | * data transfer but it is also bad for VoIP apps that legitimately are using | ||
| 218 | * the voice service type. | ||
| 219 | * | ||
| 220 | * The characteristics of the Network Service Types are based on the service | ||
| 221 | * classes defined in RFC 4594 "Configuration Guidelines for DiffServ Service | ||
| 222 | * Classes" | ||
| 223 | * | ||
| 224 | * When system detects the outgoing interface belongs to a DiffServ domain | ||
| 225 | * that follows the recommendation of the IETF draft "Guidelines for DiffServ to | ||
| 226 | * IEEE 802.11 Mapping", the packet will marked at layer 3 with a DSCP value | ||
| 227 | * that corresponds to Network Service Type. | ||
| 228 | * | ||
| 229 | * NET_SERVICE_TYPE_BE | ||
| 230 | *	"Best Effort", unclassified/standard. This is the default service | ||
| 231 | *	class and cover the majority of the traffic. | ||
| 232 | * | ||
| 233 | * NET_SERVICE_TYPE_BK | ||
| 234 | *	"Background", high delay tolerant, loss tolerant. elastic flow, | ||
| 235 | *	variable size & long-lived. E.g: non-interactive network bulk transfer | ||
| 236 | *	like synching or backup. | ||
| 237 | * | ||
| 238 | * NET_SERVICE_TYPE_RD | ||
| 239 | *	"Responsive Data", a notch higher than "Best Effort", medium delay | ||
| 240 | *	tolerant, elastic & inelastic flow, bursty, long-lived. E.g. email, | ||
| 241 | *	instant messaging, for which there is a sense of interactivity and | ||
| 242 | *	urgency (user waiting for output). | ||
| 243 | * | ||
| 244 | * NET_SERVICE_TYPE_OAM | ||
| 245 | *	"Operations, Administration, and Management", medium delay tolerant, | ||
| 246 | *	low-medium loss tolerant, elastic & inelastic flows, variable size. | ||
| 247 | *	E.g. VPN tunnels. | ||
| 248 | * | ||
| 249 | * NET_SERVICE_TYPE_AV | ||
| 250 | *	"Multimedia Audio/Video Streaming", medium delay tolerant, low-medium | ||
| 251 | *	loss tolerant, elastic flow, constant packet interval, variable rate | ||
| 252 | *	and size. E.g. video and audio playback with buffering. | ||
| 253 | * | ||
| 254 | * NET_SERVICE_TYPE_RV | ||
| 255 | *	"Responsive Multimedia Audio/Video", low delay tolerant, low-medium | ||
| 256 | *	loss tolerant, elastic flow, variable packet interval, rate and size. | ||
| 257 | *	E.g. screen sharing. | ||
| 258 | * | ||
| 259 | * NET_SERVICE_TYPE_VI | ||
| 260 | *	"Interactive Video", low delay tolerant, low-medium loss tolerant, | ||
| 261 | *	elastic flow, constant packet interval, variable rate & size. E.g. | ||
| 262 | *	video telephony. | ||
| 263 | * | ||
| 264 | * NET_SERVICE_TYPE_SIG | ||
| 265 | *	"Signaling", low delay tolerant, low loss tolerant, inelastic flow, | ||
| 266 | *	jitter tolerant, rate is bursty but short, variable size. E.g. SIP. | ||
| 267 | * | ||
| 268 | * NET_SERVICE_TYPE_VO | ||
| 269 | *	"Interactive Voice", very low delay tolerant, very low loss tolerant, | ||
| 270 | *	inelastic flow, constant packet rate, somewhat fixed size. | ||
| 271 | *	E.g. VoIP. | ||
| 272 | */ | ||
| 273 | |||
| 274 | #define NET_SERVICE_TYPE_BE 0 /* Best effort */ | ||
| 275 | #define NET_SERVICE_TYPE_BK 1 /* Background system initiated */ | ||
| 276 | #define NET_SERVICE_TYPE_SIG 2 /* Signaling */ | ||
| 277 | #define NET_SERVICE_TYPE_VI 3 /* Interactive Video */ | ||
| 278 | #define NET_SERVICE_TYPE_VO 4 /* Interactive Voice */ | ||
| 279 | #define NET_SERVICE_TYPE_RV 5 /* Responsive Multimedia Audio/Video */ | ||
| 280 | #define NET_SERVICE_TYPE_AV 6 /* Multimedia Audio/Video Streaming */ | ||
| 281 | #define NET_SERVICE_TYPE_OAM 7 /* Operations, Administration, and Management */ | ||
| 282 | #define NET_SERVICE_TYPE_RD 8 /* Responsive Data */ | ||
| 283 | |||
| 284 | |||
| 285 | /* These are supported values for SO_NETSVC_MARKING_LEVEL */ | ||
| 286 | #define NETSVC_MRKNG_UNKNOWN 0 /* The outgoing network interface is not known */ | ||
| 287 | #define NETSVC_MRKNG_LVL_L2 1 /* Default marking at layer 2 (for example Wi-Fi WMM) */ | ||
| 288 | #define NETSVC_MRKNG_LVL_L3L2_ALL 2 /* Layer 3 DSCP marking and layer 2 marking for all Network Service Types */ | ||
| 289 | #define NETSVC_MRKNG_LVL_L3L2_BK 3 /* The system policy limits layer 3 DSCP marking and layer 2 marking | ||
| 290 | 	 * to background Network Service Types */ | ||
| 291 | |||
| 292 | |||
| 293 | typedef __uint32_t sae_associd_t; | ||
| 294 | #define SAE_ASSOCID_ANY 0 | ||
| 295 | #define SAE_ASSOCID_ALL ((sae_associd_t)(-1ULL)) | ||
| 296 | |||
| 297 | typedef __uint32_t sae_connid_t; | ||
| 298 | #define SAE_CONNID_ANY 0 | ||
| 299 | #define SAE_CONNID_ALL ((sae_connid_t)(-1ULL)) | ||
| 300 | |||
| 301 | /* connectx() flag parameters */ | ||
| 302 | #define CONNECT_RESUME_ON_READ_WRITE 0x1 /* resume connect() on read/write */ | ||
| 303 | #define CONNECT_DATA_IDEMPOTENT 0x2 /* data is idempotent */ | ||
| 304 | #define CONNECT_DATA_AUTHENTICATED 0x4 /* data includes security that replaces the TFO-cookie */ | ||
| 305 | |||
| 306 | /* sockaddr endpoints */ | ||
| 307 | typedef struct sa_endpoints { | ||
| 308 | 	unsigned int sae_srcif; /* optional source interface */ | ||
| 309 | 	const struct sockaddr *sae_srcaddr; /* optional source address */ | ||
| 310 | 	socklen_t sae_srcaddrlen; /* size of source address */ | ||
| 311 | 	const struct sockaddr *sae_dstaddr; /* destination address */ | ||
| 312 | 	socklen_t sae_dstaddrlen; /* size of destination address */ | ||
| 313 | } sa_endpoints_t; | ||
| 314 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 315 | |||
| 316 | /* | ||
| 317 | * Structure used for manipulating linger option. | ||
| 318 | */ | ||
| 319 | struct linger { | ||
| 320 | 	int l_onoff; /* option on/off */ | ||
| 321 | 	int l_linger; /* linger time */ | ||
| 322 | }; | ||
| 323 | |||
| 324 | #ifndef __APPLE__ | ||
| 325 | struct accept_filter_arg { | ||
| 326 | 	char af_name[16]; | ||
| 327 | 	char af_arg[256 - 16]; | ||
| 328 | }; | ||
| 329 | #endif | ||
| 330 | |||
| 331 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 332 | #ifdef __APPLE__ | ||
| 333 | |||
| 334 | /* | ||
| 335 | * Structure to control non-portable Sockets extension to POSIX | ||
| 336 | */ | ||
| 337 | struct so_np_extensions { | ||
| 338 | 	u_int32_t npx_flags; | ||
| 339 | 	u_int32_t npx_mask; | ||
| 340 | }; | ||
| 341 | |||
| 342 | #define SONPX_SETOPTSHUT 0x000000001 /* flag for allowing setsockopt after shutdown */ | ||
| 343 | |||
| 344 | |||
| 345 | |||
| 346 | #endif | ||
| 347 | #endif | ||
| 348 | |||
| 349 | /* | ||
| 350 | * Level number for (get/set)sockopt() to apply to socket itself. | ||
| 351 | */ | ||
| 352 | #define SOL_SOCKET 0xffff /* options for socket level */ | ||
| 353 | |||
| 354 | |||
| 355 | /* | ||
| 356 | * Address families. | ||
| 357 | */ | ||
| 358 | #define AF_UNSPEC 0 /* unspecified */ | ||
| 359 | #define AF_UNIX 1 /* local to host (pipes) */ | ||
| 360 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 361 | #define AF_LOCAL AF_UNIX /* backward compatibility */ | ||
| 362 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 363 | #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ | ||
| 364 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 365 | #define AF_IMPLINK 3 /* arpanet imp addresses */ | ||
| 366 | #define AF_PUP 4 /* pup protocols: e.g. BSP */ | ||
| 367 | #define AF_CHAOS 5 /* mit CHAOS protocols */ | ||
| 368 | #define AF_NS 6 /* XEROX NS protocols */ | ||
| 369 | #define AF_ISO 7 /* ISO protocols */ | ||
| 370 | #define AF_OSI AF_ISO | ||
| 371 | #define AF_ECMA 8 /* European computer manufacturers */ | ||
| 372 | #define AF_DATAKIT 9 /* datakit protocols */ | ||
| 373 | #define AF_CCITT 10 /* CCITT protocols, X.25 etc */ | ||
| 374 | #define AF_SNA 11 /* IBM SNA */ | ||
| 375 | #define AF_DECnet 12 /* DECnet */ | ||
| 376 | #define AF_DLI 13 /* DEC Direct data link interface */ | ||
| 377 | #define AF_LAT 14 /* LAT */ | ||
| 378 | #define AF_HYLINK 15 /* NSC Hyperchannel */ | ||
| 379 | #define AF_APPLETALK 16 /* Apple Talk */ | ||
| 380 | #define AF_ROUTE 17 /* Internal Routing Protocol */ | ||
| 381 | #define AF_LINK 18 /* Link layer interface */ | ||
| 382 | #define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ | ||
| 383 | #define AF_COIP 20 /* connection-oriented IP, aka ST II */ | ||
| 384 | #define AF_CNT 21 /* Computer Network Technology */ | ||
| 385 | #define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ | ||
| 386 | #define AF_IPX 23 /* Novell Internet Protocol */ | ||
| 387 | #define AF_SIP 24 /* Simple Internet Protocol */ | ||
| 388 | #define pseudo_AF_PIP 25 /* Help Identify PIP packets */ | ||
| 389 | #define AF_NDRV 27 /* Network Driver 'raw' access */ | ||
| 390 | #define AF_ISDN 28 /* Integrated Services Digital Network */ | ||
| 391 | #define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ | ||
| 392 | #define pseudo_AF_KEY 29 /* Internal key-management function */ | ||
| 393 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 394 | #define AF_INET6 30 /* IPv6 */ | ||
| 395 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 396 | #define AF_NATM 31 /* native ATM access */ | ||
| 397 | #define AF_SYSTEM 32 /* Kernel event messages */ | ||
| 398 | #define AF_NETBIOS 33 /* NetBIOS */ | ||
| 399 | #define AF_PPP 34 /* PPP communication protocol */ | ||
| 400 | #define pseudo_AF_HDRCMPLT 35 /* Used by BPF to not rewrite headers | ||
| 401 | 	 * in interface output routine */ | ||
| 402 | #define AF_RESERVED_36 36 /* Reserved for internal usage */ | ||
| 403 | #define AF_IEEE80211 37 /* IEEE 802.11 protocol */ | ||
| 404 | #define AF_UTUN 38 | ||
| 405 | #define AF_VSOCK 40 /* VM Sockets */ | ||
| 406 | #define AF_MAX 41 | ||
| 407 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 408 | |||
| 409 | /* | ||
| 410 | * [XSI] Structure used by kernel to store most addresses. | ||
| 411 | */ | ||
| 412 | struct sockaddr { | ||
| 413 | 	__uint8_t sa_len; /* total length */ | ||
| 414 | 	sa_family_t sa_family; /* [XSI] address family */ | ||
| 415 | 	char sa_data[14]; /* [XSI] addr value (actually larger) */ | ||
| 416 | }; | ||
| 417 | |||
| 418 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 419 | #define SOCK_MAXADDRLEN 255 /* longest possible addresses */ | ||
| 420 | |||
| 421 | /* | ||
| 422 | * Structure used by kernel to pass protocol | ||
| 423 | * information in raw sockets. | ||
| 424 | */ | ||
| 425 | struct sockproto { | ||
| 426 | 	__uint16_t sp_family; /* address family */ | ||
| 427 | 	__uint16_t sp_protocol; /* protocol */ | ||
| 428 | }; | ||
| 429 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 430 | |||
| 431 | /* | ||
| 432 | * RFC 2553: protocol-independent placeholder for socket addresses | ||
| 433 | */ | ||
| 434 | #define _SS_MAXSIZE 128 | ||
| 435 | #define _SS_ALIGNSIZE (sizeof(__int64_t)) | ||
| 436 | #define _SS_PAD1SIZE \ | ||
| 437 | 	 (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t)) | ||
| 438 | #define _SS_PAD2SIZE \ | ||
| 439 | 	 (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \ | ||
| 440 | 	 _SS_PAD1SIZE - _SS_ALIGNSIZE) | ||
| 441 | |||
| 442 | /* | ||
| 443 | * [XSI] sockaddr_storage | ||
| 444 | */ | ||
| 445 | struct sockaddr_storage { | ||
| 446 | 	__uint8_t ss_len; /* address length */ | ||
| 447 | 	sa_family_t ss_family; /* [XSI] address family */ | ||
| 448 | 	char __ss_pad1[_SS_PAD1SIZE]; | ||
| 449 | 	__int64_t __ss_align; /* force structure storage alignment */ | ||
| 450 | 	char __ss_pad2[_SS_PAD2SIZE]; | ||
| 451 | }; | ||
| 452 | |||
| 453 | /* | ||
| 454 | * Protocol families, same as address families for now. | ||
| 455 | */ | ||
| 456 | #define PF_UNSPEC AF_UNSPEC | ||
| 457 | #define PF_LOCAL AF_LOCAL | ||
| 458 | #define PF_UNIX PF_LOCAL /* backward compatibility */ | ||
| 459 | #define PF_INET AF_INET | ||
| 460 | #define PF_IMPLINK AF_IMPLINK | ||
| 461 | #define PF_PUP AF_PUP | ||
| 462 | #define PF_CHAOS AF_CHAOS | ||
| 463 | #define PF_NS AF_NS | ||
| 464 | #define PF_ISO AF_ISO | ||
| 465 | #define PF_OSI AF_ISO | ||
| 466 | #define PF_ECMA AF_ECMA | ||
| 467 | #define PF_DATAKIT AF_DATAKIT | ||
| 468 | #define PF_CCITT AF_CCITT | ||
| 469 | #define PF_SNA AF_SNA | ||
| 470 | #define PF_DECnet AF_DECnet | ||
| 471 | #define PF_DLI AF_DLI | ||
| 472 | #define PF_LAT AF_LAT | ||
| 473 | #define PF_HYLINK AF_HYLINK | ||
| 474 | #define PF_APPLETALK AF_APPLETALK | ||
| 475 | #define PF_ROUTE AF_ROUTE | ||
| 476 | #define PF_LINK AF_LINK | ||
| 477 | #define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ | ||
| 478 | #define PF_COIP AF_COIP | ||
| 479 | #define PF_CNT AF_CNT | ||
| 480 | #define PF_SIP AF_SIP | ||
| 481 | #define PF_IPX AF_IPX /* same format as AF_NS */ | ||
| 482 | #define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ | ||
| 483 | #define PF_PIP pseudo_AF_PIP | ||
| 484 | #define PF_NDRV AF_NDRV | ||
| 485 | #define PF_ISDN AF_ISDN | ||
| 486 | #define PF_KEY pseudo_AF_KEY | ||
| 487 | #define PF_INET6 AF_INET6 | ||
| 488 | #define PF_NATM AF_NATM | ||
| 489 | #define PF_SYSTEM AF_SYSTEM | ||
| 490 | #define PF_NETBIOS AF_NETBIOS | ||
| 491 | #define PF_PPP AF_PPP | ||
| 492 | #define PF_RESERVED_36 AF_RESERVED_36 | ||
| 493 | #define PF_UTUN AF_UTUN | ||
| 494 | #define PF_VSOCK AF_VSOCK | ||
| 495 | #define PF_MAX AF_MAX | ||
| 496 | |||
| 497 | /* | ||
| 498 | * These do not have socket-layer support: | ||
| 499 | */ | ||
| 500 | #define PF_VLAN ((uint32_t)0x766c616e) /* 'vlan' */ | ||
| 501 | #define PF_BOND ((uint32_t)0x626f6e64) /* 'bond' */ | ||
| 502 | |||
| 503 | /* | ||
| 504 | * Definitions for network related sysctl, CTL_NET. | ||
| 505 | * | ||
| 506 | * Second level is protocol family. | ||
| 507 | * Third level is protocol number. | ||
| 508 | * | ||
| 509 | * Further levels are defined by the individual families below. | ||
| 510 | */ | ||
| 511 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 512 | #define NET_MAXID AF_MAX | ||
| 513 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 514 | |||
| 515 | |||
| 516 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 517 | /* | ||
| 518 | * PF_ROUTE - Routing table | ||
| 519 | * | ||
| 520 | * Three additional levels are defined: | ||
| 521 | *	Fourth: address family, 0 is wildcard | ||
| 522 | *	Fifth: type of info, defined below | ||
| 523 | *	Sixth: flag(s) to mask with for NET_RT_FLAGS | ||
| 524 | */ | ||
| 525 | #define NET_RT_DUMP 1 /* dump; may limit to a.f. */ | ||
| 526 | #define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ | ||
| 527 | #define NET_RT_IFLIST 3 /* survey interface list */ | ||
| 528 | #define NET_RT_STAT 4 /* routing statistics */ | ||
| 529 | #define NET_RT_TRASH 5 /* routes not in table but not freed */ | ||
| 530 | #define NET_RT_IFLIST2 6 /* interface list with addresses */ | ||
| 531 | #define NET_RT_DUMP2 7 /* dump; may limit to a.f. */ | ||
| 532 | /* | ||
| 533 | * Allows read access non-local host's MAC address | ||
| 534 | * if the process has neighbor cache entitlement. | ||
| 535 | */ | ||
| 536 | #define NET_RT_FLAGS_PRIV 10 | ||
| 537 | #define NET_RT_MAXID 11 | ||
| 538 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 539 | |||
| 540 | |||
| 541 | |||
| 542 | |||
| 543 | /* | ||
| 544 | * Maximum queue length specifiable by listen. | ||
| 545 | */ | ||
| 546 | #define SOMAXCONN 128 | ||
| 547 | |||
| 548 | /* | ||
| 549 | * [XSI] Message header for recvmsg and sendmsg calls. | ||
| 550 | * Used value-result for recvmsg, value only for sendmsg. | ||
| 551 | */ | ||
| 552 | struct msghdr { | ||
| 553 | 	void *msg_name; /* [XSI] optional address */ | ||
| 554 | 	socklen_t msg_namelen; /* [XSI] size of address */ | ||
| 555 | 	struct iovec *msg_iov; /* [XSI] scatter/gather array */ | ||
| 556 | 	int msg_iovlen; /* [XSI] # elements in msg_iov */ | ||
| 557 | 	void *msg_control; /* [XSI] ancillary data, see below */ | ||
| 558 | 	socklen_t msg_controllen; /* [XSI] ancillary data buffer len */ | ||
| 559 | 	int msg_flags; /* [XSI] flags on received message */ | ||
| 560 | }; | ||
| 561 | |||
| 562 | |||
| 563 | |||
| 564 | #define MSG_OOB 0x1 /* process out-of-band data */ | ||
| 565 | #define MSG_PEEK 0x2 /* peek at incoming message */ | ||
| 566 | #define MSG_DONTROUTE 0x4 /* send without using routing tables */ | ||
| 567 | #define MSG_EOR 0x8 /* data completes record */ | ||
| 568 | #define MSG_TRUNC 0x10 /* data discarded before delivery */ | ||
| 569 | #define MSG_CTRUNC 0x20 /* control data lost before delivery */ | ||
| 570 | #define MSG_WAITALL 0x40 /* wait for full request or error */ | ||
| 571 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 572 | #define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ | ||
| 573 | #define MSG_EOF 0x100 /* data completes connection */ | ||
| 574 | #ifdef __APPLE__ | ||
| 575 | #ifdef __APPLE_API_OBSOLETE | ||
| 576 | #define MSG_WAITSTREAM 0x200 /* wait up to full request.. may return partial */ | ||
| 577 | #endif | ||
| 578 | #define MSG_FLUSH 0x400 /* Start of 'hold' seq; dump so_temp, deprecated */ | ||
| 579 | #define MSG_HOLD 0x800 /* Hold frag in so_temp, deprecated */ | ||
| 580 | #define MSG_SEND 0x1000 /* Send the packet in so_temp, deprecated */ | ||
| 581 | #define MSG_HAVEMORE 0x2000 /* Data ready to be read */ | ||
| 582 | #define MSG_RCVMORE 0x4000 /* Data remains in current pkt */ | ||
| 583 | #endif | ||
| 584 | #define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */ | ||
| 585 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 586 | |||
| 587 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 588 | #define MSG_NOSIGNAL 0x80000 /* do not generate SIGPIPE on EOF */ | ||
| 589 | #endif /* __DARWIN_C_LEVEL */ | ||
| 590 | |||
| 591 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 592 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 593 | |||
| 594 | /* | ||
| 595 | * Header for ancillary data objects in msg_control buffer. | ||
| 596 | * Used for additional information with/about a datagram | ||
| 597 | * not expressible by flags. The format is a sequence | ||
| 598 | * of message elements headed by cmsghdr structures. | ||
| 599 | */ | ||
| 600 | struct cmsghdr { | ||
| 601 | 	socklen_t cmsg_len; /* [XSI] data byte count, including hdr */ | ||
| 602 | 	int cmsg_level; /* [XSI] originating protocol */ | ||
| 603 | 	int cmsg_type; /* [XSI] protocol-specific type */ | ||
| 604 | /* followed by	unsigned char cmsg_data[]; */ | ||
| 605 | }; | ||
| 606 | |||
| 607 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 608 | #ifndef __APPLE__ | ||
| 609 | /* | ||
| 610 | * While we may have more groups than this, the cmsgcred struct must | ||
| 611 | * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow | ||
| 612 | * this. | ||
| 613 | */ | ||
| 614 | #define CMGROUP_MAX 16 | ||
| 615 | |||
| 616 | /* | ||
| 617 | * Credentials structure, used to verify the identity of a peer | ||
| 618 | * process that has sent us a message. This is allocated by the | ||
| 619 | * peer process but filled in by the kernel. This prevents the | ||
| 620 | * peer from lying about its identity. (Note that cmcred_groups[0] | ||
| 621 | * is the effective GID.) | ||
| 622 | */ | ||
| 623 | struct cmsgcred { | ||
| 624 | 	pid_t cmcred_pid; /* PID of sending process */ | ||
| 625 | 	uid_t cmcred_uid; /* real UID of sending process */ | ||
| 626 | 	uid_t cmcred_euid; /* effective UID of sending process */ | ||
| 627 | 	gid_t cmcred_gid; /* real GID of sending process */ | ||
| 628 | 	short cmcred_ngroups; /* number or groups */ | ||
| 629 | 	gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ | ||
| 630 | }; | ||
| 631 | #endif | ||
| 632 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 633 | |||
| 634 | /* given pointer to struct cmsghdr, return pointer to data */ | ||
| 635 | #define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ | ||
| 636 | 	__DARWIN_ALIGN32(sizeof(struct cmsghdr))) | ||
| 637 | |||
| 638 | /* | ||
| 639 | * RFC 2292 requires to check msg_controllen, in case that the kernel returns | ||
| 640 | * an empty list for some reasons. | ||
| 641 | */ | ||
| 642 | #define CMSG_FIRSTHDR(mhdr) \ | ||
| 643 | 	((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ | ||
| 644 | 	 (struct cmsghdr *)(mhdr)->msg_control : \ | ||
| 645 | 	 (struct cmsghdr *)0L) | ||
| 646 | |||
| 647 | |||
| 648 | /* | ||
| 649 | * Given pointer to struct cmsghdr, return pointer to next cmsghdr | ||
| 650 | * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr) | ||
| 651 | */ | ||
| 652 | #define CMSG_NXTHDR(mhdr, cmsg) \ | ||
| 653 | 	((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) : \ | ||
| 654 | 	 ((((unsigned char *)(cmsg) + \ | ||
| 655 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) + \ | ||
| 656 | 	 __DARWIN_ALIGN32(sizeof(struct cmsghdr))) > \ | ||
| 657 | 	 ((unsigned char *)(mhdr)->msg_control + \ | ||
| 658 | 	 (mhdr)->msg_controllen)) ? \ | ||
| 659 | 	 (struct cmsghdr *)0L /* NULL */ : \ | ||
| 660 | 	 (struct cmsghdr *)(void *)((unsigned char *)(cmsg) + \ | ||
| 661 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len)))) | ||
| 662 | |||
| 663 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 664 | /* RFC 2292 additions */ | ||
| 665 | #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) | ||
| 666 | #define CMSG_LEN(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) | ||
| 667 | |||
| 668 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 669 | |||
| 670 | /* "Socket"-level control message types: */ | ||
| 671 | #define SCM_RIGHTS 0x01 /* access rights (array of int) */ | ||
| 672 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 673 | #define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ | ||
| 674 | #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ | ||
| 675 | #define SCM_TIMESTAMP_MONOTONIC 0x04 /* timestamp (uint64_t) */ | ||
| 676 | |||
| 677 | |||
| 678 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 679 | |||
| 680 | /* | ||
| 681 | * howto arguments for shutdown(2), specified by Posix.1g. | ||
| 682 | */ | ||
| 683 | #define SHUT_RD 0 /* shut down the reading side */ | ||
| 684 | #define SHUT_WR 1 /* shut down the writing side */ | ||
| 685 | #define SHUT_RDWR 2 /* shut down both sides */ | ||
| 686 | |||
| 687 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 688 | /* | ||
| 689 | * sendfile(2) header/trailer struct | ||
| 690 | */ | ||
| 691 | struct sf_hdtr { | ||
| 692 | 	struct iovec *headers; /* pointer to an array of header struct iovec's */ | ||
| 693 | 	int hdr_cnt; /* number of header iovec's */ | ||
| 694 | 	struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ | ||
| 695 | 	int trl_cnt; /* number of trailer iovec's */ | ||
| 696 | }; | ||
| 697 | |||
| 698 | |||
| 699 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 700 | |||
| 701 | |||
| 702 | __BEGIN_DECLS | ||
| 703 | |||
| 704 | int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 705 | __DARWIN_ALIAS_C(accept); | ||
| 706 | int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); | ||
| 707 | int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect); | ||
| 708 | int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 709 | __DARWIN_ALIAS(getpeername); | ||
| 710 | int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 711 | __DARWIN_ALIAS(getsockname); | ||
| 712 | int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); | ||
| 713 | int listen(int, int) __DARWIN_ALIAS(listen); | ||
| 714 | ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv); | ||
| 715 | ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, | ||
| 716 | socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); | ||
| 717 | ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg); | ||
| 718 | ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send); | ||
| 719 | ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg); | ||
| 720 | ssize_t sendto(int, const void *, size_t, | ||
| 721 | int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto); | ||
| 722 | int setsockopt(int, int, int, const void *, socklen_t); | ||
| 723 | int shutdown(int, int); | ||
| 724 | int sockatmark(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 725 | int socket(int, int, int); | ||
| 726 | int socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair); | ||
| 727 | |||
| 728 | #if !defined(_POSIX_C_SOURCE) | ||
| 729 | int sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int); | ||
| 730 | #endif /* !_POSIX_C_SOURCE */ | ||
| 731 | |||
| 732 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 733 | void pfctlinput(int, struct sockaddr *); | ||
| 734 | |||
| 735 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 736 | int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int, | ||
| 737 | const struct iovec *, unsigned int, size_t *, sae_connid_t *); | ||
| 738 | |||
| 739 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 740 | int disconnectx(int, sae_associd_t, sae_connid_t); | ||
| 741 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 742 | __END_DECLS | ||
| 743 | |||
| 744 | |||
| 745 | #endif /* !_SYS_SOCKET_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/sockio.h created+180| ... | @@ -0,0 +1,180 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)sockio.h	8.1 (Berkeley) 3/28/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_SOCKIO_H_ | ||
| 65 | #define _SYS_SOCKIO_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | |||
| 69 | #include <sys/ioccom.h> | ||
| 70 | |||
| 71 | /* Socket ioctl's. */ | ||
| 72 | #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ | ||
| 73 | #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ | ||
| 74 | #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ | ||
| 75 | #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ | ||
| 76 | #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ | ||
| 77 | #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ | ||
| 78 | #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * OSIOCGIF* ioctls are deprecated; they are kept for binary compatibility. | ||
| 82 | */ | ||
| 83 | #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ | ||
| 84 | #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ | ||
| 85 | #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ | ||
| 86 | #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ | ||
| 87 | #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ | ||
| 88 | #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ | ||
| 89 | #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ | ||
| 90 | #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ | ||
| 91 | #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ | ||
| 92 | #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ | ||
| 93 | |||
| 94 | #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ | ||
| 95 | #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ | ||
| 96 | #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ | ||
| 97 | #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ | ||
| 98 | #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ | ||
| 99 | #define SIOCAUTOADDR _IOWR('i', 38, struct ifreq) /* autoconf address */ | ||
| 100 | #define SIOCAUTONETMASK _IOW('i', 39, struct ifreq) /* autoconf netmask */ | ||
| 101 | #define SIOCARPIPLL _IOWR('i', 40, struct ifreq) /* arp for IPv4LL address */ | ||
| 102 | |||
| 103 | #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ | ||
| 104 | #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ | ||
| 105 | #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ | ||
| 106 | #define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ | ||
| 107 | #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ | ||
| 108 | #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ | ||
| 109 | #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */ | ||
| 110 | |||
| 111 | /* | ||
| 112 | * The command SIOCGIFMEDIA does not allow a process to access the extended | ||
| 113 | * media subtype and extended subtype values are returned as IFM_OTHER. | ||
| 114 | */ | ||
| 115 | #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get compatible net media */ | ||
| 116 | |||
| 117 | #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ | ||
| 118 | #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ | ||
| 119 | #define SIOCRSLVMULTI _IOWR('i', 59, struct rslvmulti_req) | ||
| 120 | |||
| 121 | #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set link level addr */ | ||
| 122 | #define SIOCGIFSTATUS _IOWR('i', 61, struct ifstat) /* get IF status */ | ||
| 123 | #define SIOCSIFPHYADDR _IOW('i', 62, struct ifaliasreq) /* set gif addres */ | ||
| 124 | #define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq) /* get gif psrc addr */ | ||
| 125 | #define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq) /* get gif pdst addr */ | ||
| 126 | #define SIOCDIFPHYADDR _IOW('i', 65, struct ifreq) /* delete gif addrs */ | ||
| 127 | |||
| 128 | #define SIOCGIFDEVMTU _IOWR('i', 68, struct ifreq) /* get if ifdevmtu */ | ||
| 129 | #define SIOCSIFALTMTU _IOW('i', 69, struct ifreq) /* set if alternate mtu */ | ||
| 130 | #define SIOCGIFALTMTU _IOWR('i', 72, struct ifreq) /* get if alternate mtu */ | ||
| 131 | #define SIOCSIFBOND _IOW('i', 70, struct ifreq) /* set bond if config */ | ||
| 132 | #define SIOCGIFBOND _IOWR('i', 71, struct ifreq) /* get bond if config */ | ||
| 133 | |||
| 134 | /* | ||
| 135 | * The command SIOCGIFXMEDIA is meant to be used by processes only to be able | ||
| 136 | * to access the extended media subtypes with the extended IFM_TMASK. | ||
| 137 | * | ||
| 138 | * An ifnet must not implement SIOCGIFXMEDIA as it gets the extended | ||
| 139 | * media subtypes by simply compiling with <net/if_media.h> | ||
| 140 | */ | ||
| 141 | #define SIOCGIFXMEDIA _IOWR('i', 72, struct ifmediareq) /* get net extended media */ | ||
| 142 | |||
| 143 | |||
| 144 | #define SIOCSIFCAP _IOW('i', 90, struct ifreq) /* set IF features */ | ||
| 145 | #define SIOCGIFCAP _IOWR('i', 91, struct ifreq) /* get IF features */ | ||
| 146 | |||
| 147 | #define SIOCIFCREATE _IOWR('i', 120, struct ifreq) /* create clone if */ | ||
| 148 | #define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ | ||
| 149 | #define SIOCIFCREATE2 _IOWR('i', 122, struct ifreq) /* create clone if with data */ | ||
| 150 | |||
| 151 | #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific | ||
| 152 | 	 * parameters */ | ||
| 153 | #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific | ||
| 154 | 	 * parameters */ | ||
| 155 | #define SIOCSIFVLAN _IOW('i', 126, struct ifreq) /* set VLAN config */ | ||
| 156 | #define SIOCGIFVLAN _IOWR('i', 127, struct ifreq) /* get VLAN config */ | ||
| 157 | #define SIOCSETVLAN SIOCSIFVLAN | ||
| 158 | #define SIOCGETVLAN SIOCGIFVLAN | ||
| 159 | |||
| 160 | #define SIOCIFGCLONERS _IOWR('i', 129, struct if_clonereq) /* get cloners */ | ||
| 161 | |||
| 162 | #define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq) /* get ppp asyncmap */ | ||
| 163 | #define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) /* set ppp asyncmap */ | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | #define SIOCGIFMAC _IOWR('i', 130, struct ifreq) /* deprecated */ | ||
| 168 | #define SIOCSIFMAC _IOW('i', 131, struct ifreq) /* deprecated */ | ||
| 169 | #define SIOCSIFKPI _IOW('i', 134, struct ifreq) /* set interface kext param - root only */ | ||
| 170 | #define SIOCGIFKPI _IOWR('i', 135, struct ifreq) /* get interface kext param */ | ||
| 171 | |||
| 172 | #define SIOCGIFWAKEFLAGS _IOWR('i', 136, struct ifreq) /* get interface wake property flags */ | ||
| 173 | |||
| 174 | #define SIOCGIFFUNCTIONALTYPE _IOWR('i', 173, struct ifreq) /* get interface functional type */ | ||
| 175 | |||
| 176 | #define SIOCSIF6LOWPAN _IOW('i', 196, struct ifreq) /* set 6LOWPAN config */ | ||
| 177 | #define SIOCGIF6LOWPAN _IOWR('i', 197, struct ifreq) /* get 6LOWPAN config */ | ||
| 178 | |||
| 179 | |||
| 180 | #endif /* !_SYS_SOCKIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/sys/ttycom.h+1-1| ... | @@ -139,7 +139,7 @@ struct winsize { | ... | @@ -139,7 +139,7 @@ struct winsize { |
| 139 | #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ | 139 | #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ |
| 140 | #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ | 140 | #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ |
| 141 | #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ | 141 | #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ |
| 142 | #define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ | 142 | /* 105 unused */ |
| 143 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ | 143 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ |
| 144 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ | 144 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ |
| 145 | #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ | 145 | #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ |
lib/libc/include/any-macos-any/time.h deleted-208| ... | @@ -1,208 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 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 <Availability.h> | ||
| 69 | #include <sys/_types/_clock_t.h> | ||
| 70 | #include <sys/_types/_null.h> | ||
| 71 | #include <sys/_types/_size_t.h> | ||
| 72 | #include <sys/_types/_time_t.h> | ||
| 73 | #include <sys/_types/_timespec.h> | ||
| 74 | |||
| 75 | struct tm { | ||
| 76 | 	int	tm_sec;		/* seconds after the minute [0-60] */ | ||
| 77 | 	int	tm_min;		/* minutes after the hour [0-59] */ | ||
| 78 | 	int	tm_hour;	/* hours since midnight [0-23] */ | ||
| 79 | 	int	tm_mday;	/* day of the month [1-31] */ | ||
| 80 | 	int	tm_mon;		/* months since January [0-11] */ | ||
| 81 | 	int	tm_year;	/* years since 1900 */ | ||
| 82 | 	int	tm_wday;	/* days since Sunday [0-6] */ | ||
| 83 | 	int	tm_yday;	/* days since January 1 [0-365] */ | ||
| 84 | 	int	tm_isdst;	/* Daylight Savings Time flag */ | ||
| 85 | 	long	tm_gmtoff;	/* offset from UTC in seconds */ | ||
| 86 | 	char	*tm_zone;	/* timezone abbreviation */ | ||
| 87 | }; | ||
| 88 | |||
| 89 | #if __DARWIN_UNIX03 | ||
| 90 | #define CLOCKS_PER_SEC 1000000	/* [XSI] */ | ||
| 91 | #else /* !__DARWIN_UNIX03 */ | ||
| 92 | #include <machine/_limits.h>	/* Include file containing CLK_TCK. */ | ||
| 93 | |||
| 94 | #define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) | ||
| 95 | #endif /* __DARWIN_UNIX03 */ | ||
| 96 | |||
| 97 | #ifndef _ANSI_SOURCE | ||
| 98 | extern char *tzname[]; | ||
| 99 | #endif | ||
| 100 | |||
| 101 | extern int getdate_err; | ||
| 102 | #if __DARWIN_UNIX03 | ||
| 103 | extern long timezone __DARWIN_ALIAS(timezone); | ||
| 104 | #endif /* __DARWIN_UNIX03 */ | ||
| 105 | extern int daylight; | ||
| 106 | |||
| 107 | __BEGIN_DECLS | ||
| 108 | char *asctime(const struct tm *); | ||
| 109 | clock_t clock(void) __DARWIN_ALIAS(clock); | ||
| 110 | char *ctime(const time_t *); | ||
| 111 | double difftime(time_t, time_t); | ||
| 112 | struct tm *getdate(const char *); | ||
| 113 | struct tm *gmtime(const time_t *); | ||
| 114 | struct tm *localtime(const time_t *); | ||
| 115 | time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); | ||
| 116 | size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); | ||
| 117 | char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); | ||
| 118 | time_t time(time_t *); | ||
| 119 | |||
| 120 | #ifndef _ANSI_SOURCE | ||
| 121 | void tzset(void); | ||
| 122 | #endif /* not ANSI */ | ||
| 123 | |||
| 124 | /* [TSF] Thread safe functions */ | ||
| 125 | char *asctime_r(const struct tm * __restrict, char * __restrict); | ||
| 126 | char *ctime_r(const time_t *, char *); | ||
| 127 | struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 128 | struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 129 | |||
| 130 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 131 | time_t posix2time(time_t); | ||
| 132 | #if !__DARWIN_UNIX03 | ||
| 133 | char *timezone(int, int); | ||
| 134 | #endif /* !__DARWIN_UNIX03 */ | ||
| 135 | void tzsetwall(void); | ||
| 136 | time_t time2posix(time_t); | ||
| 137 | time_t timelocal(struct tm * const); | ||
| 138 | time_t timegm(struct tm * const); | ||
| 139 | #endif /* neither ANSI nor POSIX */ | ||
| 140 | |||
| 141 | #if !defined(_ANSI_SOURCE) | ||
| 142 | int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep); | ||
| 143 | #endif | ||
| 144 | |||
| 145 | #if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0 | ||
| 146 | #if __DARWIN_C_LEVEL >= 199309L | ||
| 147 | #if __has_feature(enumerator_attributes) | ||
| 148 | #define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 149 | #else | ||
| 150 | #define __CLOCK_AVAILABILITY | ||
| 151 | #endif | ||
| 152 | |||
| 153 | typedef enum { | ||
| 154 | _CLOCK_REALTIME __CLOCK_AVAILABILITY = 0, | ||
| 155 | #define CLOCK_REALTIME _CLOCK_REALTIME | ||
| 156 | _CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6, | ||
| 157 | #define CLOCK_MONOTONIC _CLOCK_MONOTONIC | ||
| 158 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 159 | _CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4, | ||
| 160 | #define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW | ||
| 161 | _CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5, | ||
| 162 | #define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX | ||
| 163 | _CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8, | ||
| 164 | #define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW | ||
| 165 | _CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9, | ||
| 166 | #define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX | ||
| 167 | #endif | ||
| 168 | _CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12, | ||
| 169 | #define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID | ||
| 170 | _CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16 | ||
| 171 | #define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID | ||
| 172 | } clockid_t; | ||
| 173 | |||
| 174 | __CLOCK_AVAILABILITY | ||
| 175 | int clock_getres(clockid_t __clock_id, struct timespec *__res); | ||
| 176 | |||
| 177 | __CLOCK_AVAILABILITY | ||
| 178 | int clock_gettime(clockid_t __clock_id, struct timespec *__tp); | ||
| 179 | |||
| 180 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 181 | __CLOCK_AVAILABILITY | ||
| 182 | __uint64_t clock_gettime_nsec_np(clockid_t __clock_id); | ||
| 183 | #endif | ||
| 184 | |||
| 185 | __OSX_AVAILABLE(10.12) __IOS_PROHIBITED | ||
| 186 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 187 | int clock_settime(clockid_t __clock_id, const struct timespec *__tp); | ||
| 188 | |||
| 189 | #undef __CLOCK_AVAILABILITY | ||
| 190 | #endif /* __DARWIN_C_LEVEL */ | ||
| 191 | #endif /* _DARWIN_FEATURE_CLOCK_GETTIME */ | ||
| 192 | |||
| 193 | #if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \ | ||
| 194 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ | ||
| 195 | (defined(__cplusplus) && __cplusplus >= 201703L) | ||
| 196 | /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ | ||
| 197 | #define TIME_UTC	1	/* time elapsed since epoch */ | ||
| 198 | __API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0)) | ||
| 199 | int timespec_get(struct timespec *ts, int base); | ||
| 200 | #endif | ||
| 201 | |||
| 202 | __END_DECLS | ||
| 203 | |||
| 204 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 205 | #include <xlocale/_time.h> | ||
| 206 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 207 | |||
| 208 | #endif /* !_TIME_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/unistd.h+4| ... | @@ -599,6 +599,10 @@ void	 sync(void); | ... | @@ -599,6 +599,10 @@ void	 sync(void); |
| 599 | int	 truncate(const char *, off_t); | 599 | int	 truncate(const char *, off_t); |
| 600 | useconds_t	 ualarm(useconds_t, useconds_t); | 600 | useconds_t	 ualarm(useconds_t, useconds_t); |
| 601 | int	 usleep(useconds_t) __DARWIN_ALIAS_C(usleep); | 601 | int	 usleep(useconds_t) __DARWIN_ALIAS_C(usleep); |
| 602 | |||
| 603 | #if !defined(_POSIX_C_SOURCE) | ||
| 604 | __deprecated_msg("Use posix_spawn or fork") | ||
| 605 | #endif | ||
| 602 | pid_t	 vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | 606 | pid_t	 vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; |
| 603 | /* End XSI */ | 607 | /* End XSI */ |
| 604 | 608 |
lib/libc/include/any-macos-any/uuid/uuid.h-1| ... | @@ -62,7 +62,6 @@ void uuid_generate(uuid_t out); | ... | @@ -62,7 +62,6 @@ void uuid_generate(uuid_t out); |
| 62 | void uuid_generate_random(uuid_t out); | 62 | void uuid_generate_random(uuid_t out); |
| 63 | void uuid_generate_time(uuid_t out); | 63 | void uuid_generate_time(uuid_t out); |
| 64 | 64 | ||
| 65 | void uuid_generate_early_random(uuid_t out); | ||
| 66 | 65 | ||
| 67 | int uuid_is_null(const uuid_t uu); | 66 | int uuid_is_null(const uuid_t uu); |
| 68 | 67 |
lib/libc/include/any-macos-any/xpc/activity.h+14| ... | @@ -164,6 +164,20 @@ __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ... | @@ -164,6 +164,20 @@ __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) |
| 164 | XPC_EXPORT | 164 | XPC_EXPORT |
| 165 | const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool | 165 | const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool |
| 166 | 166 | ||
| 167 | /*! | ||
| 168 | * @constant XPC_ACTIVITY_PREVENT_DEVICE_SLEEP | ||
| 169 | * A Boolean value indicating whether the activity should prevent system sleep while | ||
| 170 | * running on battery. | ||
| 171 | * If this property is set, the activity scheduler will take the appropriate power | ||
| 172 | * assertion to keep the device (but not the screen) awake while the activity is running. | ||
| 173 | * Only activities which perform critical system functions that do not want to be | ||
| 174 | * interrupted by system sleep should set this. | ||
| 175 | * Setting this property can impact battery life. | ||
| 176 | */ | ||
| 177 | __API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0)) | ||
| 178 | XPC_EXPORT | ||
| 179 | const char * const XPC_ACTIVITY_PREVENT_DEVICE_SLEEP; // bool | ||
| 180 | |||
| 167 | /*! | 181 | /*! |
| 168 | * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL | 182 | * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL |
| 169 | * An integer percentage of minimum battery charge required to allow the | 183 | * An integer percentage of minimum battery charge required to allow the |
lib/libc/include/any-macos-any/xpc/availability.h created+130| ... | @@ -0,0 +1,130 @@ | ||
| 1 | #ifndef __XPC_AVAILABILITY_H__ | ||
| 2 | #define __XPC_AVAILABILITY_H__ | ||
| 3 | |||
| 4 | #include <Availability.h> | ||
| 5 | |||
| 6 | // Certain parts of the project use all the project's headers but have to build | ||
| 7 | // against newer OSX SDKs than ebuild uses -- liblaunch_host being the example. | ||
| 8 | // So we need to define these. | ||
| 9 | #ifndef __MAC_10_16 | ||
| 10 | #define __MAC_10_16 101600 | ||
| 11 | #endif // __MAC_10_16 | ||
| 12 | |||
| 13 | #ifndef __MAC_10_15 | ||
| 14 | #define __MAC_10_15 101500 | ||
| 15 | #define __AVAILABILITY_INTERNAL__MAC_10_15 \ | ||
| 16 | __attribute__((availability(macosx, introduced=10.15))) | ||
| 17 | #endif // __MAC_10_15 | ||
| 18 | |||
| 19 | #ifndef __MAC_10_14 | ||
| 20 | #define __MAC_10_14 101400 | ||
| 21 | #define __AVAILABILITY_INTERNAL__MAC_10_14 \ | ||
| 22 | __attribute__((availability(macosx, introduced=10.14))) | ||
| 23 | #endif // __MAC_10_14 | ||
| 24 | |||
| 25 | #ifndef __MAC_10_13 | ||
| 26 | #define __MAC_10_13 101300 | ||
| 27 | #define __AVAILABILITY_INTERNAL__MAC_10_13 \ | ||
| 28 | 	__attribute__((availability(macosx, introduced=10.13))) | ||
| 29 | #endif // __MAC_10_13 | ||
| 30 | |||
| 31 | #ifndef __MAC_10_12 | ||
| 32 | #define __MAC_10_12 101200 | ||
| 33 | #define __AVAILABILITY_INTERNAL__MAC_10_12 \ | ||
| 34 | 	__attribute__((availability(macosx, introduced=10.12))) | ||
| 35 | #endif // __MAC_10_12 | ||
| 36 | |||
| 37 | #ifndef __MAC_10_11 | ||
| 38 | #define __MAC_10_11 101100 | ||
| 39 | #define __AVAILABILITY_INTERNAL__MAC_10_11 \ | ||
| 40 | 	__attribute__((availability(macosx, introduced=10.11))) | ||
| 41 | #endif // __MAC_10_11 | ||
| 42 | |||
| 43 | #ifndef __MAC_12_0 | ||
| 44 | #define __MAC_12_0 120000 | ||
| 45 | #define __AVAILABILITY_INTERNAL__MAC_12_0 \ | ||
| 46 | 	__attribute__((availability(macosx, introduced=12.0))) | ||
| 47 | #endif // __MAC_12_0 | ||
| 48 | |||
| 49 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 50 | #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 51 | #endif // __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 52 | |||
| 53 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 54 | #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 55 | #endif // __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 56 | |||
| 57 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 58 | #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 59 | #endif // __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 60 | |||
| 61 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 62 | #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 63 | #endif // __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 64 | |||
| 65 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 66 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 67 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 68 | |||
| 69 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 70 | #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 71 | #endif // __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 72 | |||
| 73 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 74 | #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 75 | #endif // __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 76 | |||
| 77 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 78 | #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 79 | #endif // __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 80 | |||
| 81 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 82 | #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 83 | #endif // __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 84 | |||
| 85 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 86 | #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 87 | #endif // __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 88 | |||
| 89 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 90 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 91 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 92 | |||
| 93 | #if __has_include(<simulator_host.h>) | ||
| 94 | #include <simulator_host.h> | ||
| 95 | #else // __has_include(<simulator_host.h>) | ||
| 96 | #ifndef IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 97 | #define IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED 999999 | ||
| 98 | #endif // IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 99 | #endif // __has_include(<simulator_host.h>) | ||
| 100 | |||
| 101 | #ifndef __WATCHOS_UNAVAILABLE | ||
| 102 | #define __WATCHOS_UNAVAILABLE | ||
| 103 | #endif | ||
| 104 | |||
| 105 | #ifndef __TVOS_UNAVAILABLE | ||
| 106 | #define __TVOS_UNAVAILABLE | ||
| 107 | #endif | ||
| 108 | |||
| 109 | // simulator host-side bits build against SDKs not having __*_AVAILABLE() yet | ||
| 110 | #ifndef __OSX_AVAILABLE | ||
| 111 | #define __OSX_AVAILABLE(...) | ||
| 112 | #endif | ||
| 113 | |||
| 114 | #ifndef __IOS_AVAILABLE | ||
| 115 | #define __IOS_AVAILABLE(...) | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #ifndef __TVOS_AVAILABLE | ||
| 119 | #define __TVOS_AVAILABLE(...) | ||
| 120 | #endif | ||
| 121 | |||
| 122 | #ifndef __WATCHOS_AVAILABLE | ||
| 123 | #define __WATCHOS_AVAILABLE(...) | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #ifndef __API_AVAILABLE | ||
| 127 | #define __API_AVAILABLE(...) | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #endif // __XPC_AVAILABILITY_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/xpc/base.h created+216| ... | @@ -0,0 +1,216 @@ | ||
| 1 | // Copyright (c) 2009-2011 Apple Inc. All rights reserved. | ||
| 2 | |||
| 3 | #ifndef __XPC_BASE_H__ | ||
| 4 | #define __XPC_BASE_H__ | ||
| 5 | |||
| 6 | #include <sys/cdefs.h> | ||
| 7 | |||
| 8 | __BEGIN_DECLS | ||
| 9 | |||
| 10 | #if !defined(__has_include) | ||
| 11 | #define __has_include(x) 0 | ||
| 12 | #endif // !defined(__has_include) | ||
| 13 | |||
| 14 | #if !defined(__has_attribute) | ||
| 15 | #define __has_attribute(x) 0 | ||
| 16 | #endif // !defined(__has_attribute) | ||
| 17 | |||
| 18 | #if !defined(__has_feature) | ||
| 19 | #define __has_feature(x) 0 | ||
| 20 | #endif // !defined(__has_feature) | ||
| 21 | |||
| 22 | #if !defined(__has_extension) | ||
| 23 | #define __has_extension(x) 0 | ||
| 24 | #endif // !defined(__has_extension) | ||
| 25 | |||
| 26 | #if __has_include(<xpc/availability.h>) | ||
| 27 | #include <xpc/availability.h> | ||
| 28 | #else // __has_include(<xpc/availability.h>) | ||
| 29 | #include <Availability.h> | ||
| 30 | #endif // __has_include(<xpc/availability.h>) | ||
| 31 | |||
| 32 | #include <os/availability.h> | ||
| 33 | |||
| 34 | #ifndef __XPC_INDIRECT__ | ||
| 35 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 36 | #endif // __XPC_INDIRECT__ | ||
| 37 | |||
| 38 | #pragma mark Attribute Shims | ||
| 39 | #ifdef __GNUC__ | ||
| 40 | #define XPC_CONSTRUCTOR __attribute__((constructor)) | ||
| 41 | #define XPC_NORETURN __attribute__((__noreturn__)) | ||
| 42 | #define XPC_NOTHROW __attribute__((__nothrow__)) | ||
| 43 | #define XPC_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 44 | #define XPC_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 45 | #define XPC_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 46 | #define XPC_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 47 | #define XPC_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 48 | #define XPC_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 49 | #define XPC_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 50 | #define XPC_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 51 | #define XPC_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 52 | #define XPC_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 53 | #define XPC_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 54 | #define XPC_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 55 | #define XPC_SENTINEL __attribute__((__sentinel__)) | ||
| 56 | #define XPC_PURE __attribute__((__pure__)) | ||
| 57 | #define XPC_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 58 | #define XPC_MALLOC __attribute__((__malloc__)) | ||
| 59 | #define XPC_UNUSED __attribute__((__unused__)) | ||
| 60 | #define XPC_USED __attribute__((__used__)) | ||
| 61 | #define XPC_PACKED __attribute__((__packed__)) | ||
| 62 | #define XPC_PRINTF(m, n) __attribute__((format(printf, m, n))) | ||
| 63 | #define XPC_INLINE static __inline__ __attribute__((__always_inline__)) | ||
| 64 | #define XPC_NOINLINE __attribute__((noinline)) | ||
| 65 | #define XPC_NOIMPL __attribute__((unavailable)) | ||
| 66 | |||
| 67 | #if __has_attribute(noescape) | ||
| 68 | #define XPC_NOESCAPE __attribute__((__noescape__)) | ||
| 69 | #else | ||
| 70 | #define XPC_NOESCAPE | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #if __has_extension(attribute_unavailable_with_message) | ||
| 74 | #define XPC_UNAVAILABLE(m) __attribute__((unavailable(m))) | ||
| 75 | #else // __has_extension(attribute_unavailable_with_message) | ||
| 76 | #define XPC_UNAVAILABLE(m) XPC_NOIMPL | ||
| 77 | #endif // __has_extension(attribute_unavailable_with_message) | ||
| 78 | |||
| 79 | #define XPC_EXPORT extern __attribute__((visibility("default"))) | ||
| 80 | #define XPC_NOEXPORT __attribute__((visibility("hidden"))) | ||
| 81 | #define XPC_WEAKIMPORT extern __attribute__((weak_import)) | ||
| 82 | #define XPC_DEBUGGER_EXCL XPC_NOEXPORT XPC_USED | ||
| 83 | #define XPC_TRANSPARENT_UNION __attribute__((transparent_union)) | ||
| 84 | #if __clang__ | ||
| 85 | #define XPC_DEPRECATED(m) __attribute__((deprecated(m))) | ||
| 86 | #else // __clang__ | ||
| 87 | #define XPC_DEPRECATED(m) __attribute__((deprecated)) | ||
| 88 | #endif // __clang | ||
| 89 | #ifndef XPC_TESTEXPORT | ||
| 90 | #define XPC_TESTEXPORT XPC_NOEXPORT | ||
| 91 | #endif // XPC_TESTEXPORT | ||
| 92 | |||
| 93 | #if defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 94 | #define XPC_TESTSTATIC | ||
| 95 | #define XPC_TESTEXTERN extern | ||
| 96 | #else // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 97 | #define XPC_TESTSTATIC static | ||
| 98 | #endif // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 99 | |||
| 100 | #if __has_feature(objc_arc) | ||
| 101 | #define XPC_GIVES_REFERENCE __strong | ||
| 102 | #define XPC_UNRETAINED __unsafe_unretained | ||
| 103 | #define XPC_BRIDGE(xo) ((__bridge void *)(xo)) | ||
| 104 | #define XPC_BRIDGEREF_BEGIN(xo) ((__bridge_retained void *)(xo)) | ||
| 105 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) ((__bridge void *)(xo)) | ||
| 106 | #define XPC_BRIDGEREF_MIDDLE(xo) ((__bridge id)(xo)) | ||
| 107 | #define XPC_BRIDGEREF_END(xo) ((__bridge_transfer id)(xo)) | ||
| 108 | #else // __has_feature(objc_arc) | ||
| 109 | #define XPC_GIVES_REFERENCE | ||
| 110 | #define XPC_UNRETAINED | ||
| 111 | #define XPC_BRIDGE(xo) (xo) | ||
| 112 | #define XPC_BRIDGEREF_BEGIN(xo) (xo) | ||
| 113 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) (xo) | ||
| 114 | #define XPC_BRIDGEREF_MIDDLE(xo) (xo) | ||
| 115 | #define XPC_BRIDGEREF_END(xo) (xo) | ||
| 116 | #endif // __has_feature(objc_arc) | ||
| 117 | |||
| 118 | #define _xpc_unreachable() __builtin_unreachable() | ||
| 119 | #else // __GNUC__ | ||
| 120 | /*! @parseOnly */ | ||
| 121 | #define XPC_CONSTRUCTOR | ||
| 122 | /*! @parseOnly */ | ||
| 123 | #define XPC_NORETURN | ||
| 124 | /*! @parseOnly */ | ||
| 125 | #define XPC_NOTHROW | ||
| 126 | /*! @parseOnly */ | ||
| 127 | #define XPC_NONNULL1 | ||
| 128 | /*! @parseOnly */ | ||
| 129 | #define XPC_NONNULL2 | ||
| 130 | /*! @parseOnly */ | ||
| 131 | #define XPC_NONNULL3 | ||
| 132 | /*! @parseOnly */ | ||
| 133 | #define XPC_NONNULL4 | ||
| 134 | /*! @parseOnly */ | ||
| 135 | #define XPC_NONNULL5 | ||
| 136 | /*! @parseOnly */ | ||
| 137 | #define XPC_NONNULL6 | ||
| 138 | /*! @parseOnly */ | ||
| 139 | #define XPC_NONNULL7 | ||
| 140 | /*! @parseOnly */ | ||
| 141 | #define XPC_NONNULL8 | ||
| 142 | /*! @parseOnly */ | ||
| 143 | #define XPC_NONNULL9 | ||
| 144 | /*! @parseOnly */ | ||
| 145 | #define XPC_NONNULL10 | ||
| 146 | /*! @parseOnly */ | ||
| 147 | #define XPC_NONNULL11 | ||
| 148 | /*! @parseOnly */ | ||
| 149 | #define XPC_NONNULL(n) | ||
| 150 | /*! @parseOnly */ | ||
| 151 | #define XPC_NONNULL_ALL | ||
| 152 | /*! @parseOnly */ | ||
| 153 | #define XPC_SENTINEL | ||
| 154 | /*! @parseOnly */ | ||
| 155 | #define XPC_PURE | ||
| 156 | /*! @parseOnly */ | ||
| 157 | #define XPC_WARN_RESULT | ||
| 158 | /*! @parseOnly */ | ||
| 159 | #define XPC_MALLOC | ||
| 160 | /*! @parseOnly */ | ||
| 161 | #define XPC_UNUSED | ||
| 162 | /*! @parseOnly */ | ||
| 163 | #define XPC_PACKED | ||
| 164 | /*! @parseOnly */ | ||
| 165 | #define XPC_PRINTF(m, n) | ||
| 166 | /*! @parseOnly */ | ||
| 167 | #define XPC_INLINE static inline | ||
| 168 | /*! @parseOnly */ | ||
| 169 | #define XPC_NOINLINE | ||
| 170 | /*! @parseOnly */ | ||
| 171 | #define XPC_NOIMPL | ||
| 172 | /*! @parseOnly */ | ||
| 173 | #define XPC_EXPORT extern | ||
| 174 | /*! @parseOnly */ | ||
| 175 | #define XPC_WEAKIMPORT | ||
| 176 | /*! @parseOnly */ | ||
| 177 | #define XPC_DEPRECATED | ||
| 178 | /*! @parseOnly */ | ||
| 179 | #define XPC_UNAVAILABLE(m) | ||
| 180 | /*! @parseOnly */ | ||
| 181 | #define XPC_NOESCAPE | ||
| 182 | #endif // __GNUC__ | ||
| 183 | |||
| 184 | #if __has_feature(assume_nonnull) | ||
| 185 | #define XPC_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 186 | #define XPC_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 187 | #else | ||
| 188 | #define XPC_ASSUME_NONNULL_BEGIN | ||
| 189 | #define XPC_ASSUME_NONNULL_END | ||
| 190 | #endif | ||
| 191 | |||
| 192 | #if __has_feature(nullability_on_arrays) | ||
| 193 | #define XPC_NONNULL_ARRAY _Nonnull | ||
| 194 | #else | ||
| 195 | #define XPC_NONNULL_ARRAY | ||
| 196 | #endif | ||
| 197 | |||
| 198 | #ifdef OS_CLOSED_OPTIONS | ||
| 199 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 200 | 		OS_CLOSED_OPTIONS(_name, _type, __VA_ARGS__) | ||
| 201 | #else // OS_CLOSED_ENUM | ||
| 202 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 203 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 204 | #endif // OS_CLOSED_ENUM | ||
| 205 | |||
| 206 | #ifdef OS_CLOSED_ENUM | ||
| 207 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 208 | 		OS_CLOSED_ENUM(_name, _type, __VA_ARGS__) | ||
| 209 | #else // OS_CLOSED_ENUM | ||
| 210 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 211 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 212 | #endif // OS_CLOSED_ENUM | ||
| 213 | |||
| 214 | __END_DECLS | ||
| 215 | |||
| 216 | #endif // __XPC_BASE_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos-any/xpc/connection.h created+794| ... | @@ -0,0 +1,794 @@ | ||
| 1 | #ifndef __XPC_CONNECTION_H__ | ||
| 2 | #define __XPC_CONNECTION_H__ | ||
| 3 | |||
| 4 | #ifndef __XPC_INDIRECT__ | ||
| 5 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 6 | // For HeaderDoc. | ||
| 7 | #include <xpc/base.h> | ||
| 8 | #endif // __XPC_INDIRECT__ | ||
| 9 | |||
| 10 | #ifndef __BLOCKS__ | ||
| 11 | #error "XPC connections require Blocks support." | ||
| 12 | #endif // __BLOCKS__ | ||
| 13 | |||
| 14 | XPC_ASSUME_NONNULL_BEGIN | ||
| 15 | __BEGIN_DECLS | ||
| 16 | |||
| 17 | /*! | ||
| 18 | * @constant XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 19 | * Will be delivered to the connection's event handler if the remote service | ||
| 20 | * exited. The connection is still live even in this case, and resending a | ||
| 21 | * message will cause the service to be launched on-demand. This error serves | ||
| 22 | * as a client's indication that it should resynchronize any state that it had | ||
| 23 | * given the service. | ||
| 24 | * | ||
| 25 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 26 | * error occurs. In the case where a message waiting to be sent has a reply | ||
| 27 | * handler, that handler will be invoked with this error. In the context of the | ||
| 28 | * reply handler, this error indicates that a reply to the message will never | ||
| 29 | * arrive. | ||
| 30 | * | ||
| 31 | * Messages that do not have reply handlers associated with them will be | ||
| 32 | * silently disposed of. This error will only be given to peer connections. | ||
| 33 | */ | ||
| 34 | #define XPC_ERROR_CONNECTION_INTERRUPTED \ | ||
| 35 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_interrupted) | ||
| 36 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 37 | XPC_EXPORT | ||
| 38 | const struct _xpc_dictionary_s _xpc_error_connection_interrupted; | ||
| 39 | |||
| 40 | /*! | ||
| 41 | * @constant XPC_ERROR_CONNECTION_INVALID | ||
| 42 | * Will be delivered to the connection's event handler if the named service | ||
| 43 | * provided to xpc_connection_create() could not be found in the XPC service | ||
| 44 | * namespace. The connection is useless and should be disposed of. | ||
| 45 | * | ||
| 46 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 47 | * error occurs, similarly to the behavior when XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 48 | * occurs. The only difference is that the XPC_ERROR_CONNECTION_INVALID will be | ||
| 49 | * given to outstanding reply handlers and the connection's event handler. | ||
| 50 | * | ||
| 51 | * This error may be given to any type of connection. | ||
| 52 | */ | ||
| 53 | #define XPC_ERROR_CONNECTION_INVALID \ | ||
| 54 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_invalid) | ||
| 55 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 56 | XPC_EXPORT | ||
| 57 | const struct _xpc_dictionary_s _xpc_error_connection_invalid; | ||
| 58 | |||
| 59 | /*! | ||
| 60 | * @constant XPC_ERROR_TERMINATION_IMMINENT | ||
| 61 | * On macOS, this error will be delivered to a peer connection's event handler | ||
| 62 | * when the XPC runtime has determined that the program should exit and that | ||
| 63 | * all outstanding transactions must be wound down, and no new transactions can | ||
| 64 | * be opened. | ||
| 65 | * | ||
| 66 | * After this error has been delivered to the event handler, no more messages | ||
| 67 | * will be received by the connection. The runtime will still attempt to deliver | ||
| 68 | * outgoing messages, but this error should be treated as an indication that | ||
| 69 | * the program will exit very soon, and any outstanding business over the | ||
| 70 | * connection should be wrapped up as quickly as possible and the connection | ||
| 71 | * canceled shortly thereafter. | ||
| 72 | * | ||
| 73 | * This error will only be delivered to peer connections received through a | ||
| 74 | * listener or the xpc_main() event handler. | ||
| 75 | */ | ||
| 76 | #define XPC_ERROR_TERMINATION_IMMINENT \ | ||
| 77 | 	XPC_GLOBAL_OBJECT(_xpc_error_termination_imminent) | ||
| 78 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 79 | XPC_EXPORT | ||
| 80 | const struct _xpc_dictionary_s _xpc_error_termination_imminent; | ||
| 81 | |||
| 82 | /*! | ||
| 83 | * @constant XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT | ||
| 84 | * On macOS, this error will be delivered to a peer connection's event handler | ||
| 85 | * when the XPC runtime has detected that a peer connection does not | ||
| 86 | * satisfy the code signing requirement specified for the connection. | ||
| 87 | * | ||
| 88 | * See {@link xpc_connection_set_peer_code_signing_requirement} | ||
| 89 | */ | ||
| 90 | #define XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT \ | ||
| 91 | 	XPC_GLOBAL_OBJECT(_xpc_error_peer_code_signing_requirement) | ||
| 92 | __API_AVAILABLE(macos(12.0)) | ||
| 93 | XPC_EXPORT | ||
| 94 | const struct _xpc_dictionary_s _xpc_error_peer_code_signing_requirement; | ||
| 95 | |||
| 96 | /*! | ||
| 97 | * @constant XPC_CONNECTION_MACH_SERVICE_LISTENER | ||
| 98 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 99 | * caller is the listener for the named service. This flag may only be passed | ||
| 100 | * for services which are advertised in the process' launchd.plist(5). You may | ||
| 101 | * not use this flag to dynamically add services to the Mach bootstrap | ||
| 102 | * namespace. | ||
| 103 | */ | ||
| 104 | #define XPC_CONNECTION_MACH_SERVICE_LISTENER (1 << 0) | ||
| 105 | |||
| 106 | /*! | ||
| 107 | * @constant XPC_CONNECTION_MACH_SERVICE_PRIVILEGED | ||
| 108 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 109 | * job advertising the service name in its launchd.plist(5) should be in the | ||
| 110 | * privileged Mach bootstrap. This is typically accomplished by placing your | ||
| 111 | * launchd.plist(5) in /Library/LaunchDaemons. If specified alongside the | ||
| 112 | * XPC_CONNECTION_MACH_SERVICE_LISTENER flag, this flag is a no-op. | ||
| 113 | */ | ||
| 114 | #define XPC_CONNECTION_MACH_SERVICE_PRIVILEGED (1 << 1) | ||
| 115 | |||
| 116 | /*! | ||
| 117 | * @typedef xpc_finalizer_f | ||
| 118 | * A function that is invoked when a connection is being torn down and its | ||
| 119 | * context needs to be freed. The sole argument is the value that was given to | ||
| 120 | * {@link xpc_connection_set_context} or NULL if no context has been set. It is | ||
| 121 | * not safe to reference the connection from within this function. | ||
| 122 | * | ||
| 123 | * @param value | ||
| 124 | * The context object that is to be disposed of. | ||
| 125 | */ | ||
| 126 | typedef void (*xpc_finalizer_t)(void * _Nullable value); | ||
| 127 | |||
| 128 | /*! | ||
| 129 | * @function xpc_connection_create | ||
| 130 | * Creates a new connection object. | ||
| 131 | * | ||
| 132 | * @param name | ||
| 133 | * If non-NULL, the name of the service with which to connect. The returned | ||
| 134 | * connection will be a peer. | ||
| 135 | * | ||
| 136 | * If NULL, an anonymous listener connection will be created. You can embed the | ||
| 137 | * ability to create new peer connections in an endpoint, which can be inserted | ||
| 138 | * into a message and sent to another process . | ||
| 139 | * | ||
| 140 | * @param targetq | ||
| 141 | * The GCD queue to which the event handler block will be submitted. This | ||
| 142 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 143 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 144 | * The target queue may be changed later with a call to | ||
| 145 | * xpc_connection_set_target_queue(). | ||
| 146 | * | ||
| 147 | * @result | ||
| 148 | * A new connection object. The caller is responsible for disposing of the | ||
| 149 | * returned object with {@link xpc_release} when it is no longer needed. | ||
| 150 | * | ||
| 151 | * @discussion | ||
| 152 | * This method will succeed even if the named service does not exist. This is | ||
| 153 | * because the XPC namespace is not queried for the service name until the | ||
| 154 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 155 | * | ||
| 156 | * XPC connections, like dispatch sources, are returned in an inactive state, so | ||
| 157 | * you must call {@link xpc_connection_activate()} in order to begin receiving | ||
| 158 | * events from the connection. Also like dispatch sources, connections must be | ||
| 159 | * activated and not suspended in order to be safely released. It is | ||
| 160 | * a programming error to release an inactive or suspended connection. | ||
| 161 | */ | ||
| 162 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 163 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT | ||
| 164 | xpc_connection_t | ||
| 165 | xpc_connection_create(const char * _Nullable name, | ||
| 166 | 	dispatch_queue_t _Nullable targetq); | ||
| 167 | |||
| 168 | /*! | ||
| 169 | * @function xpc_connection_create_mach_service | ||
| 170 | * Creates a new connection object representing a Mach service. | ||
| 171 | * | ||
| 172 | * @param name | ||
| 173 | * The name of the remote service with which to connect. The service name must | ||
| 174 | * exist in a Mach bootstrap that is accessible to the process and be advertised | ||
| 175 | * in a launchd.plist. | ||
| 176 | * | ||
| 177 | * @param targetq | ||
| 178 | * The GCD queue to which the event handler block will be submitted. This | ||
| 179 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 180 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 181 | * The target queue may be changed later with a call to | ||
| 182 | * xpc_connection_set_target_queue(). | ||
| 183 | * | ||
| 184 | * @param flags | ||
| 185 | * Additional attributes with which to create the connection. | ||
| 186 | * | ||
| 187 | * @result | ||
| 188 | * A new connection object. | ||
| 189 | * | ||
| 190 | * @discussion | ||
| 191 | * If the XPC_CONNECTION_MACH_SERVICE_LISTENER flag is given to this method, | ||
| 192 | * then the connection returned will be a listener connection. Otherwise, a peer | ||
| 193 | * connection will be returned. See the documentation for | ||
| 194 | * {@link xpc_connection_set_event_handler()} for the semantics of listener | ||
| 195 | * connections versus peer connections. | ||
| 196 | * | ||
| 197 | * This method will succeed even if the named service does not exist. This is | ||
| 198 | * because the Mach namespace is not queried for the service name until the | ||
| 199 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 200 | */ | ||
| 201 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 202 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL1 | ||
| 203 | xpc_connection_t | ||
| 204 | xpc_connection_create_mach_service(const char *name, | ||
| 205 | 	dispatch_queue_t _Nullable targetq, uint64_t flags); | ||
| 206 | |||
| 207 | /*! | ||
| 208 | * @function xpc_connection_create_from_endpoint | ||
| 209 | * Creates a new connection from the given endpoint. | ||
| 210 | * | ||
| 211 | * @param endpoint | ||
| 212 | * The endpoint from which to create the new connection. | ||
| 213 | * | ||
| 214 | * @result | ||
| 215 | * A new peer connection to the listener represented by the given endpoint. | ||
| 216 | * | ||
| 217 | * The same responsibilities of setting an event handler and activating the | ||
| 218 | * connection after calling xpc_connection_create() apply to the connection | ||
| 219 | * returned by this API. Since the connection yielded by this API is not | ||
| 220 | * associated with a name (and therefore is not rediscoverable), this connection | ||
| 221 | * will receive XPC_ERROR_CONNECTION_INVALID if the listening side crashes, | ||
| 222 | * exits or cancels the listener connection. | ||
| 223 | */ | ||
| 224 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 225 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL_ALL | ||
| 226 | xpc_connection_t | ||
| 227 | xpc_connection_create_from_endpoint(xpc_endpoint_t endpoint); | ||
| 228 | |||
| 229 | /*! | ||
| 230 | * @function xpc_connection_set_target_queue | ||
| 231 | * Sets the target queue of the given connection. | ||
| 232 | * | ||
| 233 | * @param connection | ||
| 234 | * The connection object which is to be manipulated. | ||
| 235 | * | ||
| 236 | * @param targetq | ||
| 237 | * The GCD queue to which the event handler block will be submitted. This | ||
| 238 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 239 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 240 | * | ||
| 241 | * @discussion | ||
| 242 | * Setting the target queue is asynchronous and non-preemptive and therefore | ||
| 243 | * this method will not interrupt the execution of an already-running event | ||
| 244 | * handler block. Setting the target queue may be likened to issuing a barrier | ||
| 245 | * to the connection which does the actual work of changing the target queue. | ||
| 246 | * | ||
| 247 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 248 | * queues. If the target queue is a concurrent queue, then XPC still guarantees | ||
| 249 | * that there will never be more than one invocation of the connection's event | ||
| 250 | * handler block executing concurrently. If you wish to process events | ||
| 251 | * concurrently, you can dispatch_async(3) to a concurrent queue from within | ||
| 252 | * the event handler. | ||
| 253 | * | ||
| 254 | * IMPORTANT: When called from within the event handler block, | ||
| 255 | * dispatch_get_current_queue(3) is NOT guaranteed to return a pointer to the | ||
| 256 | * queue set with this method. | ||
| 257 | * | ||
| 258 | * Despite this seeming inconsistency, the XPC runtime guarantees that, when the | ||
| 259 | * target queue is a serial queue, the event handler block will execute | ||
| 260 | * synchonously with respect to other blocks submitted to that same queue. When | ||
| 261 | * the target queue is a concurrent queue, the event handler block may run | ||
| 262 | * concurrently with other blocks submitted to that queue, but it will never run | ||
| 263 | * concurrently with other invocations of itself for the same connection, as | ||
| 264 | * discussed previously. | ||
| 265 | */ | ||
| 266 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 267 | XPC_EXPORT XPC_NONNULL1 | ||
| 268 | void | ||
| 269 | xpc_connection_set_target_queue(xpc_connection_t connection, | ||
| 270 | 	dispatch_queue_t _Nullable targetq); | ||
| 271 | |||
| 272 | /*! | ||
| 273 | * @function xpc_connection_set_event_handler | ||
| 274 | * Sets the event handler block for the connection. | ||
| 275 | * | ||
| 276 | * @param connection | ||
| 277 | * The connection object which is to be manipulated. | ||
| 278 | * | ||
| 279 | * @param handler | ||
| 280 | * The event handler block. | ||
| 281 | * | ||
| 282 | * @discussion | ||
| 283 | * Setting the event handler is asynchronous and non-preemptive, and therefore | ||
| 284 | * this method will not interrupt the execution of an already-running event | ||
| 285 | * handler block. If the event handler is executing at the time of this call, it | ||
| 286 | * will finish, and then the connection's event handler will be changed before | ||
| 287 | * the next invocation of the event handler. The XPC runtime guarantees this | ||
| 288 | * non-preemptiveness even for concurrent target queues. | ||
| 289 | * | ||
| 290 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 291 | * xpc_connection_set_event_handler() from within the event handler block. | ||
| 292 | * | ||
| 293 | * The event handler's execution should be treated as a barrier to all | ||
| 294 | * connection activity. When it is executing, the connection will not attempt to | ||
| 295 | * send or receive messages, including reply messages. Thus, it is not safe to | ||
| 296 | * call xpc_connection_send_message_with_reply_sync() on the connection from | ||
| 297 | * within the event handler. | ||
| 298 | * | ||
| 299 | * You do not hold a reference on the object received as the event handler's | ||
| 300 | * only argument. Regardless of the type of object received, it is safe to call | ||
| 301 | * xpc_retain() on the object to obtain a reference to it. | ||
| 302 | * | ||
| 303 | * A connection may receive different events depending upon whether it is a | ||
| 304 | * listener or not. Any connection may receive an error in its event handler. | ||
| 305 | * But while normal connections may receive messages in addition to errors, | ||
| 306 | * listener connections will receive connections and and not messages. | ||
| 307 | * | ||
| 308 | * Connections received by listeners are equivalent to those returned by | ||
| 309 | * xpc_connection_create() with a non-NULL name argument and a NULL targetq | ||
| 310 | * argument with the exception that you do not hold a reference on them. | ||
| 311 | * You must set an event handler and activate the connection. If you do not wish | ||
| 312 | * to accept the connection, you may simply call xpc_connection_cancel() on it | ||
| 313 | * and return. The runtime will dispose of it for you. | ||
| 314 | * | ||
| 315 | * If there is an error in the connection, this handler will be invoked with the | ||
| 316 | * error dictionary as its argument. This dictionary will be one of the well- | ||
| 317 | * known XPC_ERROR_* dictionaries. | ||
| 318 | * | ||
| 319 | * Regardless of the type of event, ownership of the event object is NOT | ||
| 320 | * implicitly transferred. Thus, the object will be released and deallocated at | ||
| 321 | * some point in the future after the event handler returns. If you wish the | ||
| 322 | * event's lifetime to persist, you must retain it with xpc_retain(). | ||
| 323 | * | ||
| 324 | * Connections received through the event handler will be released and | ||
| 325 | * deallocated after the connection has gone invalid and delivered that event to | ||
| 326 | * its event handler. | ||
| 327 | */ | ||
| 328 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 329 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 330 | void | ||
| 331 | xpc_connection_set_event_handler(xpc_connection_t connection, | ||
| 332 | 	xpc_handler_t handler); | ||
| 333 | |||
| 334 | /*! | ||
| 335 | * @function xpc_connection_activate | ||
| 336 | * Activates the connection. Connections start in an inactive state, so you must | ||
| 337 | * call xpc_connection_activate() on a connection before it will send or receive | ||
| 338 | * any messages. | ||
| 339 | * | ||
| 340 | * @param connection | ||
| 341 | * The connection object which is to be manipulated. | ||
| 342 | * | ||
| 343 | * @discussion | ||
| 344 | * Calling xpc_connection_activate() on an active connection has no effect. | ||
| 345 | * Releasing the last reference on an inactive connection that was created with | ||
| 346 | * an xpc_connection_create*() call is undefined. | ||
| 347 | * | ||
| 348 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 349 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 350 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 351 | * is preferred. | ||
| 352 | */ | ||
| 353 | __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 354 | __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 355 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 356 | void | ||
| 357 | xpc_connection_activate(xpc_connection_t connection); | ||
| 358 | |||
| 359 | /*! | ||
| 360 | * @function xpc_connection_suspend | ||
| 361 | * Suspends the connection so that the event handler block will not fire and | ||
| 362 | * that the connection will not attempt to send any messages it has in its | ||
| 363 | * queue. All calls to xpc_connection_suspend() must be balanced with calls to | ||
| 364 | * xpc_connection_resume() before releasing the last reference to the | ||
| 365 | * connection. | ||
| 366 | * | ||
| 367 | * @param connection | ||
| 368 | * The connection object which is to be manipulated. | ||
| 369 | * | ||
| 370 | * @discussion | ||
| 371 | * Suspension is asynchronous and non-preemptive, and therefore this method will | ||
| 372 | * not interrupt the execution of an already-running event handler block. If | ||
| 373 | * the event handler is executing at the time of this call, it will finish, and | ||
| 374 | * then the connection will be suspended before the next scheduled invocation | ||
| 375 | * of the event handler. The XPC runtime guarantees this non-preemptiveness even | ||
| 376 | * for concurrent target queues. | ||
| 377 | * | ||
| 378 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 379 | * xpc_connection_suspend() from within the event handler block. | ||
| 380 | */ | ||
| 381 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 382 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 383 | void | ||
| 384 | xpc_connection_suspend(xpc_connection_t connection); | ||
| 385 | |||
| 386 | /*! | ||
| 387 | * @function xpc_connection_resume | ||
| 388 | * Resumes the connection. | ||
| 389 | * | ||
| 390 | * @param connection | ||
| 391 | * The connection object which is to be manipulated. | ||
| 392 | * | ||
| 393 | * @discussion | ||
| 394 | * In order for a connection to become live, every call to | ||
| 395 | * xpc_connection_suspend() must be balanced with a call to | ||
| 396 | * xpc_connection_resume(). | ||
| 397 | * | ||
| 398 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 399 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 400 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 401 | * is preferred. | ||
| 402 | * | ||
| 403 | * Calling xpc_connection_resume() more times than xpc_connection_suspend() | ||
| 404 | * has been called is otherwise considered an error. | ||
| 405 | */ | ||
| 406 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 407 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 408 | void | ||
| 409 | xpc_connection_resume(xpc_connection_t connection); | ||
| 410 | |||
| 411 | /*! | ||
| 412 | * @function xpc_connection_send_message | ||
| 413 | * Sends a message over the connection to the destination service. | ||
| 414 | * | ||
| 415 | * @param connection | ||
| 416 | * The connection over which the message shall be sent. | ||
| 417 | * | ||
| 418 | * @param message | ||
| 419 | * The message to send. This must be a dictionary object. This dictionary is | ||
| 420 | * logically copied by the connection, so it is safe to modify the dictionary | ||
| 421 | * after this call. | ||
| 422 | * | ||
| 423 | * @discussion | ||
| 424 | * Messages are delivered in FIFO order. This API is safe to call from multiple | ||
| 425 | * GCD queues. There is no indication that a message was delivered successfully. | ||
| 426 | * This is because even once the message has been successfully enqueued on the | ||
| 427 | * remote end, there are no guarantees about when the runtime will dequeue the | ||
| 428 | * message and invoke the other connection's event handler block. | ||
| 429 | * | ||
| 430 | * If this API is used to send a message that is in reply to another message, | ||
| 431 | * there is no guarantee of ordering between the invocations of the connection's | ||
| 432 | * event handler and the reply handler for that message, even if they are | ||
| 433 | * targeted to the same queue. | ||
| 434 | * | ||
| 435 | * After extensive study, we have found that clients who are interested in | ||
| 436 | * the state of the message on the server end are typically holding open | ||
| 437 | * transactions related to that message. And the only reliable way to track the | ||
| 438 | * lifetime of that transaction is at the protocol layer. So the server should | ||
| 439 | * send a reply message, which upon receiving, will cause the client to close | ||
| 440 | * its transaction. | ||
| 441 | */ | ||
| 442 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 443 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 444 | void | ||
| 445 | xpc_connection_send_message(xpc_connection_t connection, xpc_object_t message); | ||
| 446 | |||
| 447 | /*! | ||
| 448 | * @function xpc_connection_send_barrier | ||
| 449 | * Issues a barrier against the connection's message-send activity. | ||
| 450 | * | ||
| 451 | * @param connection | ||
| 452 | * The connection against which the barrier is to be issued. | ||
| 453 | * | ||
| 454 | * @param barrier | ||
| 455 | * The barrier block to issue. This barrier prevents concurrent message-send | ||
| 456 | * activity on the connection. No messages will be sent while the barrier block | ||
| 457 | * is executing. | ||
| 458 | * | ||
| 459 | * @discussion | ||
| 460 | * XPC guarantees that, even if the connection's target queue is a concurrent | ||
| 461 | * queue, there are no other messages being sent concurrently while the barrier | ||
| 462 | * block is executing. XPC does not guarantee that the receipt of messages | ||
| 463 | * (either through the connection's event handler or through reply handlers) | ||
| 464 | * will be suspended while the barrier is executing. | ||
| 465 | * | ||
| 466 | * A barrier is issued relative to the message-send queue. Thus, if you call | ||
| 467 | * xpc_connection_send_message() five times and then call | ||
| 468 | * xpc_connection_send_barrier(), the barrier will be invoked after the fifth | ||
| 469 | * message has been sent and its memory disposed of. You may safely cancel a | ||
| 470 | * connection from within a barrier block. | ||
| 471 | * | ||
| 472 | * If a barrier is issued after sending a message which expects a reply, the | ||
| 473 | * behavior is the same as described above. The receipt of a reply message will | ||
| 474 | * not influence when the barrier runs. | ||
| 475 | * | ||
| 476 | * A barrier block can be useful for throttling resource consumption on the | ||
| 477 | * connected side of a connection. For example, if your connection sends many | ||
| 478 | * large messages, you can use a barrier to limit the number of messages that | ||
| 479 | * are inflight at any given time. This can be particularly useful for messages | ||
| 480 | * that contain kernel resources (like file descriptors) which have a system- | ||
| 481 | * wide limit. | ||
| 482 | * | ||
| 483 | * If a barrier is issued on a canceled connection, it will be invoked | ||
| 484 | * immediately. If a connection has been canceled and still has outstanding | ||
| 485 | * barriers, those barriers will be invoked as part of the connection's | ||
| 486 | * unwinding process. | ||
| 487 | * | ||
| 488 | * It is important to note that a barrier block's execution order is not | ||
| 489 | * guaranteed with respect to other blocks that have been scheduled on the | ||
| 490 | * target queue of the connection. Or said differently, | ||
| 491 | * xpc_connection_send_barrier(3) is not equivalent to dispatch_async(3). | ||
| 492 | */ | ||
| 493 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 494 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 495 | void | ||
| 496 | xpc_connection_send_barrier(xpc_connection_t connection, | ||
| 497 | 	dispatch_block_t barrier); | ||
| 498 | |||
| 499 | /*! | ||
| 500 | * @function xpc_connection_send_message_with_reply | ||
| 501 | * Sends a message over the connection to the destination service and associates | ||
| 502 | * a handler to be invoked when the remote service sends a reply message. | ||
| 503 | * | ||
| 504 | * @param connection | ||
| 505 | * The connection over which the message shall be sent. | ||
| 506 | * | ||
| 507 | * @param message | ||
| 508 | * The message to send. This must be a dictionary object. | ||
| 509 | * | ||
| 510 | * @param replyq | ||
| 511 | * The GCD queue to which the reply handler will be submitted. This may be a | ||
| 512 | * concurrent queue. | ||
| 513 | * | ||
| 514 | * @param handler | ||
| 515 | * The handler block to invoke when a reply to the message is received from | ||
| 516 | * the connection. If the remote service exits prematurely before the reply was | ||
| 517 | * received, the XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. | ||
| 518 | * If the connection went invalid before the message could be sent, the | ||
| 519 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 520 | * | ||
| 521 | * @discussion | ||
| 522 | * If the given GCD queue is a concurrent queue, XPC cannot guarantee that there | ||
| 523 | * will not be multiple reply handlers being invoked concurrently. XPC does not | ||
| 524 | * guarantee any ordering for the invocation of reply handers. So if multiple | ||
| 525 | * messages are waiting for replies and the connection goes invalid, there is no | ||
| 526 | * guarantee that the reply handlers will be invoked in FIFO order. Similarly, | ||
| 527 | * XPC does not guarantee that reply handlers will not run concurrently with | ||
| 528 | * the connection's event handler in the case that the reply queue and the | ||
| 529 | * connection's target queue are the same concurrent queue. | ||
| 530 | */ | ||
| 531 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 532 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL4 | ||
| 533 | void | ||
| 534 | xpc_connection_send_message_with_reply(xpc_connection_t connection, | ||
| 535 | 	xpc_object_t message, dispatch_queue_t _Nullable replyq, | ||
| 536 | 	xpc_handler_t handler); | ||
| 537 | |||
| 538 | /*! | ||
| 539 | * @function xpc_connection_send_message_with_reply_sync | ||
| 540 | * Sends a message over the connection and blocks the caller until a reply is | ||
| 541 | * received. | ||
| 542 | * | ||
| 543 | * @param connection | ||
| 544 | * The connection over which the message shall be sent. | ||
| 545 | * | ||
| 546 | * @param message | ||
| 547 | * The message to send. This must be a dictionary object. | ||
| 548 | * | ||
| 549 | * @result | ||
| 550 | * The message that the remote service sent in reply to the original message. | ||
| 551 | * If the remote service exits prematurely before the reply was received, the | ||
| 552 | * XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. If the connection | ||
| 553 | * went invalid before the message could be sent, the | ||
| 554 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 555 | * | ||
| 556 | * You are responsible for releasing the returned object. | ||
| 557 | * | ||
| 558 | * @discussion | ||
| 559 | * This API supports priority inversion avoidance, and should be used instead of | ||
| 560 | * combining xpc_connection_send_message_with_reply() with a semaphore. | ||
| 561 | * | ||
| 562 | * Invoking this API from a queue that is a part of the target queue hierarchy | ||
| 563 | * results in deadlocks under certain conditions. | ||
| 564 | * | ||
| 565 | * Be judicious about your use of this API. It can block indefinitely, so if you | ||
| 566 | * are using it to implement an API that can be called from the main thread, you | ||
| 567 | * may wish to consider allowing the API to take a queue and callback block so | ||
| 568 | * that results may be delivered asynchronously if possible. | ||
| 569 | */ | ||
| 570 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 571 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT XPC_RETURNS_RETAINED | ||
| 572 | xpc_object_t | ||
| 573 | xpc_connection_send_message_with_reply_sync(xpc_connection_t connection, | ||
| 574 | 	xpc_object_t message); | ||
| 575 | |||
| 576 | /*! | ||
| 577 | * @function xpc_connection_cancel | ||
| 578 | * Cancels the connection and ensures that its event handler will not fire | ||
| 579 | * again. After this call, any messages that have not yet been sent will be | ||
| 580 | * discarded, and the connection will be unwound. If there are messages that are | ||
| 581 | * awaiting replies, they will have their reply handlers invoked with the | ||
| 582 | * XPC_ERROR_CONNECTION_INVALID error. | ||
| 583 | * | ||
| 584 | * @param connection | ||
| 585 | * The connection object which is to be manipulated. | ||
| 586 | * | ||
| 587 | * @discussion | ||
| 588 | * Cancellation is asynchronous and non-preemptive and therefore this method | ||
| 589 | * will not interrupt the execution of an already-running event handler block. | ||
| 590 | * If the event handler is executing at the time of this call, it will finish, | ||
| 591 | * and then the connection will be canceled, causing a final invocation of the | ||
| 592 | * event handler to be scheduled with the XPC_ERROR_CONNECTION_INVALID error. | ||
| 593 | * After that invocation, there will be no further invocations of the event | ||
| 594 | * handler. | ||
| 595 | * | ||
| 596 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 597 | * queues. | ||
| 598 | */ | ||
| 599 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 600 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 601 | void | ||
| 602 | xpc_connection_cancel(xpc_connection_t connection); | ||
| 603 | |||
| 604 | /*! | ||
| 605 | * @function xpc_connection_get_name | ||
| 606 | * Returns the name of the service with which the connections was created. | ||
| 607 | * | ||
| 608 | * @param connection | ||
| 609 | * The connection object which is to be examined. | ||
| 610 | * | ||
| 611 | * @result | ||
| 612 | * The name of the remote service. If you obtained the connection through an | ||
| 613 | * invocation of another connection's event handler, NULL is returned. | ||
| 614 | */ | ||
| 615 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 616 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 617 | const char * _Nullable | ||
| 618 | xpc_connection_get_name(xpc_connection_t connection); | ||
| 619 | |||
| 620 | /*! | ||
| 621 | * @function xpc_connection_get_euid | ||
| 622 | * Returns the EUID of the remote peer. | ||
| 623 | * | ||
| 624 | * @param connection | ||
| 625 | * The connection object which is to be examined. | ||
| 626 | * | ||
| 627 | * @result | ||
| 628 | * The EUID of the remote peer at the time the connection was made. | ||
| 629 | */ | ||
| 630 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 631 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 632 | uid_t | ||
| 633 | xpc_connection_get_euid(xpc_connection_t connection); | ||
| 634 | |||
| 635 | /*! | ||
| 636 | * @function xpc_connection_get_egid | ||
| 637 | * Returns the EGID of the remote peer. | ||
| 638 | * | ||
| 639 | * @param connection | ||
| 640 | * The connection object which is to be examined. | ||
| 641 | * | ||
| 642 | * @result | ||
| 643 | * The EGID of the remote peer at the time the connection was made. | ||
| 644 | */ | ||
| 645 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 646 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 647 | gid_t | ||
| 648 | xpc_connection_get_egid(xpc_connection_t connection); | ||
| 649 | |||
| 650 | /*! | ||
| 651 | * @function xpc_connection_get_pid | ||
| 652 | * Returns the PID of the remote peer. | ||
| 653 | * | ||
| 654 | * @param connection | ||
| 655 | * The connection object which is to be examined. | ||
| 656 | * | ||
| 657 | * @result | ||
| 658 | * The PID of the remote peer. | ||
| 659 | * | ||
| 660 | * @discussion | ||
| 661 | * A given PID is not guaranteed to be unique across an entire boot cycle. | ||
| 662 | * Great care should be taken when dealing with this information, as it can go | ||
| 663 | * stale after the connection is established. OS X recycles PIDs, and therefore | ||
| 664 | * another process could spawn and claim the PID before a message is actually | ||
| 665 | * received from the connection. | ||
| 666 | * | ||
| 667 | * XPC will deliver an error to your event handler if the remote process goes | ||
| 668 | * away, but there are no guarantees as to the timing of this notification's | ||
| 669 | * delivery either at the kernel layer or at the XPC layer. | ||
| 670 | */ | ||
| 671 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 672 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 673 | pid_t | ||
| 674 | xpc_connection_get_pid(xpc_connection_t connection); | ||
| 675 | |||
| 676 | /*! | ||
| 677 | * @function xpc_connection_get_asid | ||
| 678 | * Returns the audit session identifier of the remote peer. | ||
| 679 | * | ||
| 680 | * @param connection | ||
| 681 | * The connection object which is to be examined. | ||
| 682 | * | ||
| 683 | * @result | ||
| 684 | * The audit session ID of the remote peer at the time the connection was made. | ||
| 685 | */ | ||
| 686 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 687 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 688 | au_asid_t | ||
| 689 | xpc_connection_get_asid(xpc_connection_t connection); | ||
| 690 | |||
| 691 | /*! | ||
| 692 | * @function xpc_connection_set_context | ||
| 693 | * Sets context on an connection. | ||
| 694 | * | ||
| 695 | * @param connection | ||
| 696 | * The connection which is to be manipulated. | ||
| 697 | * | ||
| 698 | * @param context | ||
| 699 | * The context to associate with the connection. | ||
| 700 | * | ||
| 701 | * @discussion | ||
| 702 | * If you must manage the memory of the context object, you must set a finalizer | ||
| 703 | * to dispose of it. If this method is called on a connection which already has | ||
| 704 | * context associated with it, the finalizer will NOT be invoked. The finalizer | ||
| 705 | * is only invoked when the connection is being deallocated. | ||
| 706 | * | ||
| 707 | * It is recommended that, instead of changing the actual context pointer | ||
| 708 | * associated with the object, you instead change the state of the context | ||
| 709 | * object itself. | ||
| 710 | */ | ||
| 711 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 712 | XPC_EXPORT XPC_NONNULL1 | ||
| 713 | void | ||
| 714 | xpc_connection_set_context(xpc_connection_t connection, | ||
| 715 | 	void * _Nullable context); | ||
| 716 | |||
| 717 | /*! | ||
| 718 | * @function xpc_connection_get_context | ||
| 719 | * Returns the context associated with the connection. | ||
| 720 | * | ||
| 721 | * @param connection | ||
| 722 | * The connection which is to be examined. | ||
| 723 | * | ||
| 724 | * @result | ||
| 725 | * The context associated with the connection. NULL if there has been no context | ||
| 726 | * associated with the object. | ||
| 727 | */ | ||
| 728 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 729 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 730 | void * _Nullable | ||
| 731 | xpc_connection_get_context(xpc_connection_t connection); | ||
| 732 | |||
| 733 | /*! | ||
| 734 | * @function xpc_connection_set_finalizer_f | ||
| 735 | * Sets the finalizer for the given connection. | ||
| 736 | * | ||
| 737 | * @param connection | ||
| 738 | * The connection on which to set the finalizer. | ||
| 739 | * | ||
| 740 | * @param finalizer | ||
| 741 | * The function that will be invoked when the connection's retain count has | ||
| 742 | * dropped to zero and is being torn down. | ||
| 743 | * | ||
| 744 | * @discussion | ||
| 745 | * This method disposes of the context value associated with a connection, as | ||
| 746 | * set by {@link xpc_connection_set_context}. | ||
| 747 | * | ||
| 748 | * For many uses of context objects, this API allows for a convenient shorthand | ||
| 749 | * for freeing them. For example, for a context object allocated with malloc(3): | ||
| 750 | * | ||
| 751 | * xpc_connection_set_finalizer_f(object, free); | ||
| 752 | */ | ||
| 753 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 754 | XPC_EXPORT XPC_NONNULL1 | ||
| 755 | void | ||
| 756 | xpc_connection_set_finalizer_f(xpc_connection_t connection, | ||
| 757 | 	xpc_finalizer_t _Nullable finalizer); | ||
| 758 | |||
| 759 | /*! | ||
| 760 | * @function xpc_connection_set_peer_code_signing_requirement | ||
| 761 | * Requires that the connection peer satisfies a code signing requirement. | ||
| 762 | * | ||
| 763 | * @param connection | ||
| 764 | * The connection object which is to be modified. | ||
| 765 | * | ||
| 766 | * @param requirement | ||
| 767 | * The code signing requirement to be satisfied by the peer | ||
| 768 | * It is safe to deallocate the requirement string after calling `xpc_connection_set_peer_code_signing_requirement` | ||
| 769 | * | ||
| 770 | * @result | ||
| 771 | * 0 on success, non-zero on error | ||
| 772 | * | ||
| 773 | * @discussion | ||
| 774 | * This function will return an error promptly if the code signing requirement string is invalid. | ||
| 775 | * | ||
| 776 | * It is a programming error to call `xpc_connection_set_peer_code_signing_requirement` more than once per connection. | ||
| 777 | * | ||
| 778 | * All messages received on this connection will be checked to ensure they come from a peer who satisfies | ||
| 779 | * the code signing requirement. For a listener connection, requests that do not satisfy the requirement | ||
| 780 | * are dropped. When a reply is expected on the connection and the peer does not satisfy the requirement | ||
| 781 | * XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT will be delivered instead of the reply. | ||
| 782 | * | ||
| 783 | * @see https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html | ||
| 784 | */ | ||
| 785 | __API_AVAILABLE(macos(12.0)) | ||
| 786 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 787 | int | ||
| 788 | xpc_connection_set_peer_code_signing_requirement(xpc_connection_t connection, const char *requirement); | ||
| 789 | |||
| 790 | |||
| 791 | __END_DECLS | ||
| 792 | XPC_ASSUME_NONNULL_END | ||
| 793 | |||
| 794 | #endif // __XPC_CONNECTION_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/AvailabilityInternal.h+5-5| ... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
| 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ | 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ | 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ |
| 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ | 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_14_5 | 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_2 |
| 59 | /* for compatibility with existing code. New code should use platform specific checks */ | 59 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 | 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 61 | #endif | 61 | #endif |
| ... | @@ -65,7 +65,7 @@ | ... | @@ -65,7 +65,7 @@ |
| 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ | 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ | 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ |
| 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ | 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_7_4 | 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_3 |
| 69 | /* for compatibility with existing code. New code should use platform specific checks */ | 69 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 | 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 71 | #endif | 71 | #endif |
| ... | @@ -75,7 +75,7 @@ | ... | @@ -75,7 +75,7 @@ |
| 75 | #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ | 75 | #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 76 | 76 | ||
| 77 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ | 77 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 50300 | 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 60100 |
| 79 | /* for compatibility with existing code. New code should use platform specific checks */ | 79 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 80 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000 | 80 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000 |
| 81 | #endif | 81 | #endif |
| ... | @@ -90,14 +90,14 @@ | ... | @@ -90,14 +90,14 @@ |
| 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED | 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED |
| 91 | /* make sure a default max version is set */ | 91 | /* make sure a default max version is set */ |
| 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED | 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_11_3 | 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_1 |
| 94 | #endif | 94 | #endif |
| 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ | 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ |
| 96 | 96 | ||
| 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED | 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED |
| 98 | /* make sure a default max version is set */ | 98 | /* make sure a default max version is set */ |
| 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED | 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_14_5 | 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_15_2 |
| 101 | #endif | 101 | #endif |
| 102 | /* make sure a valid min is set */ | 102 | /* make sure a valid min is set */ |
| 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 | 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 |
lib/libc/include/any-macos.11-any/AvailabilityMacros.h deleted-4015| ... | @@ -1,4015 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2001-2010 by Apple Inc.. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | File: AvailabilityMacros.h | ||
| 26 | |||
| 27 | More Info: See the SDK Compatibility Guide | ||
| 28 | |||
| 29 | Contains: Autoconfiguration of AVAILABLE_ macros for Mac OS X | ||
| 30 | |||
| 31 | This header enables a developer to specify build time | ||
| 32 | constraints on what Mac OS X versions the resulting | ||
| 33 | application will be run. There are two bounds a developer | ||
| 34 | can specify: | ||
| 35 | |||
| 36 | MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 37 | MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 38 | |||
| 39 | The lower bound controls which calls to OS functions will | ||
| 40 | be weak-importing (allowed to be unresolved at launch time). | ||
| 41 | The upper bound controls which OS functionality, if used, | ||
| 42 | will result in a compiler error because that functionality is | ||
| 43 | not available on any OS in the specifed range. | ||
| 44 | |||
| 45 | For example, suppose an application is compiled with: | ||
| 46 | |||
| 47 | MAC_OS_X_VERSION_MIN_REQUIRED = MAC_OS_X_VERSION_10_2 | ||
| 48 | MAC_OS_X_VERSION_MAX_ALLOWED = MAC_OS_X_VERSION_10_3 | ||
| 49 | |||
| 50 | and an OS header contains: | ||
| 51 | |||
| 52 | extern void funcA(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 53 | extern void funcB(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2; | ||
| 54 | extern void funcC(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3; | ||
| 55 | extern void funcD(void) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 56 | extern void funcE(void) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 57 | extern void funcF(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 58 | extern void funcG(void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 59 | |||
| 60 | typedef long TypeA DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 61 | typedef long TypeB DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 62 | typedef long TypeC DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 63 | typedef long TypeD DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 64 | typedef long TypeE DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 65 | |||
| 66 | Any application code which uses these declarations will get the following: | ||
| 67 | |||
| 68 | compile link run | ||
| 69 | ------- ------ ------- | ||
| 70 | funcA: normal normal normal | ||
| 71 | funcB: warning normal normal | ||
| 72 | funcC: normal normal normal | ||
| 73 | funcD: normal normal normal | ||
| 74 | funcE: normal normal normal | ||
| 75 | funcF: normal weak on 10.3 normal, on 10.2 (&funcF == NULL) | ||
| 76 | funcG: error error n/a | ||
| 77 | typeA: warning | ||
| 78 | typeB: warning | ||
| 79 | typeC: warning | ||
| 80 | typeD: normal | ||
| 81 | typeE: normal | ||
| 82 | |||
| 83 | |||
| 84 | */ | ||
| 85 | #ifndef __AVAILABILITYMACROS__ | ||
| 86 | #define __AVAILABILITYMACROS__ | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Set up standard Mac OS X versions | ||
| 90 | */ | ||
| 91 | #define MAC_OS_X_VERSION_10_0 1000 | ||
| 92 | #define MAC_OS_X_VERSION_10_1 1010 | ||
| 93 | #define MAC_OS_X_VERSION_10_2 1020 | ||
| 94 | #define MAC_OS_X_VERSION_10_3 1030 | ||
| 95 | #define MAC_OS_X_VERSION_10_4 1040 | ||
| 96 | #define MAC_OS_X_VERSION_10_5 1050 | ||
| 97 | #define MAC_OS_X_VERSION_10_6 1060 | ||
| 98 | #define MAC_OS_X_VERSION_10_7 1070 | ||
| 99 | #define MAC_OS_X_VERSION_10_8 1080 | ||
| 100 | #define MAC_OS_X_VERSION_10_9 1090 | ||
| 101 | #define MAC_OS_X_VERSION_10_10 101000 | ||
| 102 | #define MAC_OS_X_VERSION_10_10_2 101002 | ||
| 103 | #define MAC_OS_X_VERSION_10_10_3 101003 | ||
| 104 | #define MAC_OS_X_VERSION_10_11 101100 | ||
| 105 | #define MAC_OS_X_VERSION_10_11_2 101102 | ||
| 106 | #define MAC_OS_X_VERSION_10_11_3 101103 | ||
| 107 | #define MAC_OS_X_VERSION_10_11_4 101104 | ||
| 108 | #define MAC_OS_X_VERSION_10_12 101200 | ||
| 109 | #define MAC_OS_X_VERSION_10_12_1 101201 | ||
| 110 | #define MAC_OS_X_VERSION_10_12_2 101202 | ||
| 111 | #define MAC_OS_X_VERSION_10_12_4 101204 | ||
| 112 | #define MAC_OS_X_VERSION_10_13 101300 | ||
| 113 | #define MAC_OS_X_VERSION_10_13_1 101301 | ||
| 114 | #define MAC_OS_X_VERSION_10_13_2 101302 | ||
| 115 | #define MAC_OS_X_VERSION_10_13_4 101304 | ||
| 116 | #define MAC_OS_X_VERSION_10_14 101400 | ||
| 117 | #define MAC_OS_X_VERSION_10_14_1 101401 | ||
| 118 | #define MAC_OS_X_VERSION_10_14_4 101404 | ||
| 119 | #define MAC_OS_X_VERSION_10_15 101500 | ||
| 120 | #define MAC_OS_VERSION_11_0 110000 | ||
| 121 | #define MAC_OS_VERSION_11_1 110100 | ||
| 122 | #define MAC_OS_VERSION_11_3 110300 | ||
| 123 | |||
| 124 | /* | ||
| 125 | * If min OS not specified, assume 10.4 for intel | ||
| 126 | * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable | ||
| 127 | */ | ||
| 128 | #ifndef MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 129 | #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 130 | #if (__i386__ || __x86_64__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < MAC_OS_X_VERSION_10_4) | ||
| 131 | #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. | ||
| 132 | #endif | ||
| 133 | #define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 134 | #else | ||
| 135 | #if __i386__ || __x86_64__ | ||
| 136 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 | ||
| 137 | #elif __arm__ || __arm64__ | ||
| 138 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 | ||
| 139 | #else | ||
| 140 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1 | ||
| 141 | #endif | ||
| 142 | #endif | ||
| 143 | #endif | ||
| 144 | |||
| 145 | /* | ||
| 146 | * if max OS not specified, assume larger of (10.15, min) | ||
| 147 | */ | ||
| 148 | #ifndef MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 149 | #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_11_3 | ||
| 150 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 151 | #else | ||
| 152 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_11_3 | ||
| 153 | #endif | ||
| 154 | #endif | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Error on bad values | ||
| 158 | */ | ||
| 159 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 160 | #error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 161 | #endif | ||
| 162 | #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_0 | ||
| 163 | #error MAC_OS_X_VERSION_MIN_REQUIRED must be >= MAC_OS_X_VERSION_10_0 | ||
| 164 | #endif | ||
| 165 | |||
| 166 | /* | ||
| 167 | * only certain compilers support __attribute__((weak_import)) | ||
| 168 | */ | ||
| 169 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) | ||
| 170 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 171 | #elif defined(__MWERKS__) && (__MWERKS__ >= 0x3205) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) && !defined(__INTEL__) | ||
| 172 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 173 | #else | ||
| 174 | #define WEAK_IMPORT_ATTRIBUTE | ||
| 175 | #endif | ||
| 176 | |||
| 177 | /* | ||
| 178 | * only certain compilers support __attribute__((deprecated)) | ||
| 179 | */ | ||
| 180 | #if defined(__has_feature) && defined(__has_attribute) | ||
| 181 | #if __has_attribute(deprecated) | ||
| 182 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 183 | #if __has_feature(attribute_deprecated_with_message) | ||
| 184 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 185 | #else | ||
| 186 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 187 | #endif | ||
| 188 | #else | ||
| 189 | #define DEPRECATED_ATTRIBUTE | ||
| 190 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 191 | #endif | ||
| 192 | #elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 193 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 194 | #if (__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) | ||
| 195 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 196 | #else | ||
| 197 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 198 | #endif | ||
| 199 | #else | ||
| 200 | #define DEPRECATED_ATTRIBUTE | ||
| 201 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* | ||
| 205 | * only certain compilers support __attribute__((unavailable)) | ||
| 206 | */ | ||
| 207 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 208 | #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable)) | ||
| 209 | #else | ||
| 210 | #define UNAVAILABLE_ATTRIBUTE | ||
| 211 | #endif | ||
| 212 | |||
| 213 | |||
| 214 | /* | ||
| 215 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 216 | * | ||
| 217 | * Used on functions introduced in Mac OS X 10.0 | ||
| 218 | */ | ||
| 219 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 220 | |||
| 221 | /* | ||
| 222 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED | ||
| 223 | * | ||
| 224 | * Used on functions introduced in Mac OS X 10.0, | ||
| 225 | * and deprecated in Mac OS X 10.0 | ||
| 226 | */ | ||
| 227 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 228 | |||
| 229 | /* | ||
| 230 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 231 | * | ||
| 232 | * Used on types deprecated in Mac OS X 10.0 | ||
| 233 | */ | ||
| 234 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 235 | |||
| 236 | #ifndef __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 237 | 	#ifdef __has_attribute | ||
| 238 | 		#if __has_attribute(availability) | ||
| 239 | 			#include <Availability.h> | ||
| 240 | 			#define __AVAILABILITY_MACROS_USES_AVAILABILITY 1 | ||
| 241 | 		#endif | ||
| 242 | 	#endif | ||
| 243 | #endif | ||
| 244 | |||
| 245 | #if TARGET_OS_OSX | ||
| 246 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 247 | #elif TARGET_OS_MACCATALYST | ||
| 248 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 249 | #else | ||
| 250 | #define __IPHONE_COMPAT_VERSION __IPHONE_4_0 | ||
| 251 | #endif | ||
| 252 | |||
| 253 | /* | ||
| 254 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 255 | * | ||
| 256 | * Used on declarations introduced in Mac OS X 10.1 | ||
| 257 | */ | ||
| 258 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 259 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_COMPAT_VERSION) | ||
| 260 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_1 | ||
| 261 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 262 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_1 | ||
| 263 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 264 | #else | ||
| 265 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 266 | #endif | ||
| 267 | |||
| 268 | /* | ||
| 269 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED | ||
| 270 | * | ||
| 271 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 272 | * and deprecated in Mac OS X 10.1 | ||
| 273 | */ | ||
| 274 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 275 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 276 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 277 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 278 | #else | ||
| 279 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 280 | #endif | ||
| 281 | |||
| 282 | /* | ||
| 283 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 | ||
| 284 | * | ||
| 285 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 286 | * but later deprecated in Mac OS X 10.1 | ||
| 287 | */ | ||
| 288 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 289 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 290 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 291 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 DEPRECATED_ATTRIBUTE | ||
| 292 | #else | ||
| 293 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 294 | #endif | ||
| 295 | |||
| 296 | /* | ||
| 297 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 298 | * | ||
| 299 | * Used on declarations introduced in Mac OS X 10.2 | ||
| 300 | */ | ||
| 301 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 302 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_COMPAT_VERSION) | ||
| 303 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 | ||
| 304 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 305 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 | ||
| 306 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 307 | #else | ||
| 308 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 309 | #endif | ||
| 310 | |||
| 311 | /* | ||
| 312 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED | ||
| 313 | * | ||
| 314 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 315 | * and deprecated in Mac OS X 10.2 | ||
| 316 | */ | ||
| 317 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 318 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 319 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 320 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 321 | #else | ||
| 322 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 323 | #endif | ||
| 324 | |||
| 325 | /* | ||
| 326 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 327 | * | ||
| 328 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 329 | * but later deprecated in Mac OS X 10.2 | ||
| 330 | */ | ||
| 331 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 332 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 333 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 334 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 335 | #else | ||
| 336 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 337 | #endif | ||
| 338 | |||
| 339 | /* | ||
| 340 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 341 | * | ||
| 342 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 343 | * but later deprecated in Mac OS X 10.2 | ||
| 344 | */ | ||
| 345 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 346 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 347 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 348 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 349 | #else | ||
| 350 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 351 | #endif | ||
| 352 | |||
| 353 | /* | ||
| 354 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 355 | * | ||
| 356 | * Used on declarations introduced in Mac OS X 10.3 | ||
| 357 | */ | ||
| 358 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 359 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_COMPAT_VERSION) | ||
| 360 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3 | ||
| 361 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 362 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 | ||
| 363 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 364 | #else | ||
| 365 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 366 | #endif | ||
| 367 | |||
| 368 | /* | ||
| 369 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED | ||
| 370 | * | ||
| 371 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 372 | * and deprecated in Mac OS X 10.3 | ||
| 373 | */ | ||
| 374 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 375 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 376 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 377 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 378 | #else | ||
| 379 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 380 | #endif | ||
| 381 | |||
| 382 | /* | ||
| 383 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 384 | * | ||
| 385 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 386 | * but later deprecated in Mac OS X 10.3 | ||
| 387 | */ | ||
| 388 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 389 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 390 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 391 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 392 | #else | ||
| 393 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 394 | #endif | ||
| 395 | |||
| 396 | /* | ||
| 397 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 398 | * | ||
| 399 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 400 | * but later deprecated in Mac OS X 10.3 | ||
| 401 | */ | ||
| 402 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 403 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 404 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 405 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 406 | #else | ||
| 407 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 408 | #endif | ||
| 409 | |||
| 410 | /* | ||
| 411 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 412 | * | ||
| 413 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 414 | * but later deprecated in Mac OS X 10.3 | ||
| 415 | */ | ||
| 416 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 417 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 418 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 419 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 420 | #else | ||
| 421 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 422 | #endif | ||
| 423 | |||
| 424 | /* | ||
| 425 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 426 | * | ||
| 427 | * Used on declarations introduced in Mac OS X 10.4 | ||
| 428 | */ | ||
| 429 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 430 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_COMPAT_VERSION) | ||
| 431 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 | ||
| 432 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 433 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 | ||
| 434 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 435 | #else | ||
| 436 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 437 | #endif | ||
| 438 | |||
| 439 | /* | ||
| 440 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED | ||
| 441 | * | ||
| 442 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 443 | * and deprecated in Mac OS X 10.4 | ||
| 444 | */ | ||
| 445 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 446 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 447 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 448 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 449 | #else | ||
| 450 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 451 | #endif | ||
| 452 | |||
| 453 | /* | ||
| 454 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 455 | * | ||
| 456 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 457 | * but later deprecated in Mac OS X 10.4 | ||
| 458 | */ | ||
| 459 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 460 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 461 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 462 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 463 | #else | ||
| 464 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 465 | #endif | ||
| 466 | |||
| 467 | /* | ||
| 468 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 469 | * | ||
| 470 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 471 | * but later deprecated in Mac OS X 10.4 | ||
| 472 | */ | ||
| 473 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 474 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 475 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 476 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 477 | #else | ||
| 478 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 479 | #endif | ||
| 480 | |||
| 481 | /* | ||
| 482 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 483 | * | ||
| 484 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 485 | * but later deprecated in Mac OS X 10.4 | ||
| 486 | */ | ||
| 487 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 488 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 489 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 490 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 491 | #else | ||
| 492 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 493 | #endif | ||
| 494 | |||
| 495 | /* | ||
| 496 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 497 | * | ||
| 498 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 499 | * but later deprecated in Mac OS X 10.4 | ||
| 500 | */ | ||
| 501 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 502 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 503 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 504 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 505 | #else | ||
| 506 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 507 | #endif | ||
| 508 | |||
| 509 | /* | ||
| 510 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 511 | * | ||
| 512 | * Used on declarations introduced in Mac OS X 10.5 | ||
| 513 | */ | ||
| 514 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 515 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_COMPAT_VERSION) | ||
| 516 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 | ||
| 517 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 518 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | ||
| 519 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 520 | #else | ||
| 521 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 522 | #endif | ||
| 523 | |||
| 524 | /* | ||
| 525 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED | ||
| 526 | * | ||
| 527 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 528 | * and deprecated in Mac OS X 10.5 | ||
| 529 | */ | ||
| 530 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 531 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 532 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 533 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 534 | #else | ||
| 535 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 536 | #endif | ||
| 537 | |||
| 538 | /* | ||
| 539 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 540 | * | ||
| 541 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 542 | * but later deprecated in Mac OS X 10.5 | ||
| 543 | */ | ||
| 544 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 545 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 546 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 547 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 548 | #else | ||
| 549 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 550 | #endif | ||
| 551 | |||
| 552 | /* | ||
| 553 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 554 | * | ||
| 555 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 556 | * but later deprecated in Mac OS X 10.5 | ||
| 557 | */ | ||
| 558 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 559 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 560 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 561 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 562 | #else | ||
| 563 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 564 | #endif | ||
| 565 | |||
| 566 | /* | ||
| 567 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 568 | * | ||
| 569 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 570 | * but later deprecated in Mac OS X 10.5 | ||
| 571 | */ | ||
| 572 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 573 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 574 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 575 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 576 | #else | ||
| 577 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 578 | #endif | ||
| 579 | |||
| 580 | /* | ||
| 581 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 582 | * | ||
| 583 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 584 | * but later deprecated in Mac OS X 10.5 | ||
| 585 | */ | ||
| 586 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 587 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 588 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 589 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 590 | #else | ||
| 591 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 592 | #endif | ||
| 593 | |||
| 594 | /* | ||
| 595 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 596 | * | ||
| 597 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 598 | * but later deprecated in Mac OS X 10.5 | ||
| 599 | */ | ||
| 600 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 601 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 602 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 603 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 604 | #else | ||
| 605 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 606 | #endif | ||
| 607 | |||
| 608 | /* | ||
| 609 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 610 | * | ||
| 611 | * Used on declarations introduced in Mac OS X 10.6 | ||
| 612 | */ | ||
| 613 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 614 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_COMPAT_VERSION) | ||
| 615 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | ||
| 616 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 617 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 | ||
| 618 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 619 | #else | ||
| 620 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 621 | #endif | ||
| 622 | |||
| 623 | /* | ||
| 624 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED | ||
| 625 | * | ||
| 626 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 627 | * and deprecated in Mac OS X 10.6 | ||
| 628 | */ | ||
| 629 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 630 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 631 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 632 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 633 | #else | ||
| 634 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 635 | #endif | ||
| 636 | |||
| 637 | /* | ||
| 638 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 639 | * | ||
| 640 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 641 | * but later deprecated in Mac OS X 10.6 | ||
| 642 | */ | ||
| 643 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 644 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 645 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 646 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 647 | #else | ||
| 648 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 649 | #endif | ||
| 650 | |||
| 651 | /* | ||
| 652 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 653 | * | ||
| 654 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 655 | * but later deprecated in Mac OS X 10.6 | ||
| 656 | */ | ||
| 657 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 658 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 659 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 660 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 661 | #else | ||
| 662 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 663 | #endif | ||
| 664 | |||
| 665 | /* | ||
| 666 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 667 | * | ||
| 668 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 669 | * but later deprecated in Mac OS X 10.6 | ||
| 670 | */ | ||
| 671 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 672 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 673 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 674 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 675 | #else | ||
| 676 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 677 | #endif | ||
| 678 | |||
| 679 | /* | ||
| 680 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 681 | * | ||
| 682 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 683 | * but later deprecated in Mac OS X 10.6 | ||
| 684 | */ | ||
| 685 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 686 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 687 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 688 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 689 | #else | ||
| 690 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 691 | #endif | ||
| 692 | |||
| 693 | /* | ||
| 694 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 695 | * | ||
| 696 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 697 | * but later deprecated in Mac OS X 10.6 | ||
| 698 | */ | ||
| 699 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 700 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 701 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 702 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 703 | #else | ||
| 704 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 705 | #endif | ||
| 706 | |||
| 707 | /* | ||
| 708 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 709 | * | ||
| 710 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 711 | * but later deprecated in Mac OS X 10.6 | ||
| 712 | */ | ||
| 713 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 714 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 715 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 716 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 717 | #else | ||
| 718 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 719 | #endif | ||
| 720 | |||
| 721 | /* | ||
| 722 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 723 | * | ||
| 724 | * Used on declarations introduced in Mac OS X 10.7 | ||
| 725 | */ | ||
| 726 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 727 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_COMPAT_VERSION) | ||
| 728 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | ||
| 729 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 730 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 | ||
| 731 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 732 | #else | ||
| 733 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 734 | #endif | ||
| 735 | |||
| 736 | /* | ||
| 737 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED | ||
| 738 | * | ||
| 739 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 740 | * and deprecated in Mac OS X 10.7 | ||
| 741 | */ | ||
| 742 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 743 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 744 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 745 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 746 | #else | ||
| 747 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 748 | #endif | ||
| 749 | |||
| 750 | /* | ||
| 751 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 752 | * | ||
| 753 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 754 | * but later deprecated in Mac OS X 10.7 | ||
| 755 | */ | ||
| 756 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 757 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 758 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 759 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 760 | #else | ||
| 761 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 762 | #endif | ||
| 763 | |||
| 764 | /* | ||
| 765 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 766 | * | ||
| 767 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 768 | * but later deprecated in Mac OS X 10.7 | ||
| 769 | */ | ||
| 770 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 771 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 772 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 773 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 774 | #else | ||
| 775 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 776 | #endif | ||
| 777 | |||
| 778 | /* | ||
| 779 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 780 | * | ||
| 781 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 782 | * but later deprecated in Mac OS X 10.7 | ||
| 783 | */ | ||
| 784 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 785 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 786 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 787 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 788 | #else | ||
| 789 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 790 | #endif | ||
| 791 | |||
| 792 | /* | ||
| 793 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 794 | * | ||
| 795 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 796 | * but later deprecated in Mac OS X 10.7 | ||
| 797 | */ | ||
| 798 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 799 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 800 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 801 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 802 | #else | ||
| 803 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 804 | #endif | ||
| 805 | |||
| 806 | /* | ||
| 807 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 808 | * | ||
| 809 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 810 | * but later deprecated in Mac OS X 10.7 | ||
| 811 | */ | ||
| 812 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 813 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 814 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 815 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 816 | #else | ||
| 817 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 818 | #endif | ||
| 819 | |||
| 820 | /* | ||
| 821 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 822 | * | ||
| 823 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 824 | * but later deprecated in Mac OS X 10.7 | ||
| 825 | */ | ||
| 826 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 827 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 828 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 829 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 830 | #else | ||
| 831 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 832 | #endif | ||
| 833 | |||
| 834 | /* | ||
| 835 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 836 | * | ||
| 837 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 838 | * but later deprecated in Mac OS X 10.7 | ||
| 839 | */ | ||
| 840 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 841 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 842 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 843 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 844 | #else | ||
| 845 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 846 | #endif | ||
| 847 | |||
| 848 | /* | ||
| 849 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 | ||
| 850 | * | ||
| 851 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 852 | * but later deprecated in Mac OS X 10.13 | ||
| 853 | */ | ||
| 854 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 855 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 856 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 857 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 DEPRECATED_ATTRIBUTE | ||
| 858 | #else | ||
| 859 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 860 | #endif | ||
| 861 | |||
| 862 | /* | ||
| 863 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 864 | * | ||
| 865 | * Used on declarations introduced in Mac OS X 10.8 | ||
| 866 | */ | ||
| 867 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 868 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_COMPAT_VERSION) | ||
| 869 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | ||
| 870 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 871 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 | ||
| 872 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 873 | #else | ||
| 874 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 875 | #endif | ||
| 876 | |||
| 877 | /* | ||
| 878 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED | ||
| 879 | * | ||
| 880 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 881 | * and deprecated in Mac OS X 10.8 | ||
| 882 | */ | ||
| 883 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 884 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 885 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 886 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 887 | #else | ||
| 888 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 889 | #endif | ||
| 890 | |||
| 891 | /* | ||
| 892 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 893 | * | ||
| 894 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 895 | * but later deprecated in Mac OS X 10.8 | ||
| 896 | */ | ||
| 897 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 898 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 899 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 900 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 901 | #else | ||
| 902 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 903 | #endif | ||
| 904 | |||
| 905 | /* | ||
| 906 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 907 | * | ||
| 908 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 909 | * but later deprecated in Mac OS X 10.8 | ||
| 910 | */ | ||
| 911 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 912 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 913 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 914 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 915 | #else | ||
| 916 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 917 | #endif | ||
| 918 | |||
| 919 | /* | ||
| 920 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 921 | * | ||
| 922 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 923 | * but later deprecated in Mac OS X 10.8 | ||
| 924 | */ | ||
| 925 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 926 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 927 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 928 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 929 | #else | ||
| 930 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 931 | #endif | ||
| 932 | |||
| 933 | /* | ||
| 934 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 935 | * | ||
| 936 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 937 | * but later deprecated in Mac OS X 10.8 | ||
| 938 | */ | ||
| 939 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 940 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 941 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 942 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 943 | #else | ||
| 944 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 945 | #endif | ||
| 946 | |||
| 947 | /* | ||
| 948 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 949 | * | ||
| 950 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 951 | * but later deprecated in Mac OS X 10.8 | ||
| 952 | */ | ||
| 953 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 954 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 955 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 956 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 957 | #else | ||
| 958 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 959 | #endif | ||
| 960 | |||
| 961 | /* | ||
| 962 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 963 | * | ||
| 964 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 965 | * but later deprecated in Mac OS X 10.8 | ||
| 966 | */ | ||
| 967 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 968 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 969 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 970 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 971 | #else | ||
| 972 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 973 | #endif | ||
| 974 | |||
| 975 | /* | ||
| 976 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 977 | * | ||
| 978 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 979 | * but later deprecated in Mac OS X 10.8 | ||
| 980 | */ | ||
| 981 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 982 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 983 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 984 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 985 | #else | ||
| 986 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 987 | #endif | ||
| 988 | |||
| 989 | /* | ||
| 990 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 991 | * | ||
| 992 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 993 | * but later deprecated in Mac OS X 10.8 | ||
| 994 | */ | ||
| 995 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 996 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 997 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 998 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 999 | #else | ||
| 1000 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1001 | #endif | ||
| 1002 | |||
| 1003 | /* | ||
| 1004 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1005 | * | ||
| 1006 | * Used on declarations introduced in Mac OS X 10.9 | ||
| 1007 | */ | ||
| 1008 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1009 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_COMPAT_VERSION) | ||
| 1010 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 | ||
| 1011 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1012 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 | ||
| 1013 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1014 | #else | ||
| 1015 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1016 | #endif | ||
| 1017 | |||
| 1018 | /* | ||
| 1019 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED | ||
| 1020 | * | ||
| 1021 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1022 | * and deprecated in Mac OS X 10.9 | ||
| 1023 | */ | ||
| 1024 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1025 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1026 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1027 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1028 | #else | ||
| 1029 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1030 | #endif | ||
| 1031 | |||
| 1032 | /* | ||
| 1033 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1034 | * | ||
| 1035 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1036 | * but later deprecated in Mac OS X 10.9 | ||
| 1037 | */ | ||
| 1038 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1039 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1040 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1041 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1042 | #else | ||
| 1043 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1044 | #endif | ||
| 1045 | |||
| 1046 | /* | ||
| 1047 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1048 | * | ||
| 1049 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1050 | * but later deprecated in Mac OS X 10.9 | ||
| 1051 | */ | ||
| 1052 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1053 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1054 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1055 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1056 | #else | ||
| 1057 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1058 | #endif | ||
| 1059 | |||
| 1060 | /* | ||
| 1061 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1062 | * | ||
| 1063 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1064 | * but later deprecated in Mac OS X 10.9 | ||
| 1065 | */ | ||
| 1066 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1067 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1068 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1069 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1070 | #else | ||
| 1071 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1072 | #endif | ||
| 1073 | |||
| 1074 | /* | ||
| 1075 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1076 | * | ||
| 1077 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1078 | * but later deprecated in Mac OS X 10.9 | ||
| 1079 | */ | ||
| 1080 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1081 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1082 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1083 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1084 | #else | ||
| 1085 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1086 | #endif | ||
| 1087 | |||
| 1088 | /* | ||
| 1089 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1090 | * | ||
| 1091 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1092 | * but later deprecated in Mac OS X 10.9 | ||
| 1093 | */ | ||
| 1094 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1095 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1096 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1097 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1098 | #else | ||
| 1099 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1100 | #endif | ||
| 1101 | |||
| 1102 | /* | ||
| 1103 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1104 | * | ||
| 1105 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1106 | * but later deprecated in Mac OS X 10.9 | ||
| 1107 | */ | ||
| 1108 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1109 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1110 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1111 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1112 | #else | ||
| 1113 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1114 | #endif | ||
| 1115 | |||
| 1116 | /* | ||
| 1117 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1118 | * | ||
| 1119 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1120 | * but later deprecated in Mac OS X 10.9 | ||
| 1121 | */ | ||
| 1122 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1123 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1124 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1125 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1126 | #else | ||
| 1127 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1128 | #endif | ||
| 1129 | |||
| 1130 | /* | ||
| 1131 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1132 | * | ||
| 1133 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1134 | * but later deprecated in Mac OS X 10.9 | ||
| 1135 | */ | ||
| 1136 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1137 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1138 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1139 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1140 | #else | ||
| 1141 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1142 | #endif | ||
| 1143 | |||
| 1144 | /* | ||
| 1145 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1146 | * | ||
| 1147 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1148 | * but later deprecated in Mac OS X 10.9 | ||
| 1149 | */ | ||
| 1150 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1151 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1152 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1153 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1154 | #else | ||
| 1155 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1156 | #endif | ||
| 1157 | |||
| 1158 | /* | ||
| 1159 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1160 | * | ||
| 1161 | * Used on declarations introduced in Mac OS X 10.10 | ||
| 1162 | */ | ||
| 1163 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1164 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_COMPAT_VERSION) | ||
| 1165 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 | ||
| 1166 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1167 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 | ||
| 1168 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1169 | #else | ||
| 1170 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1171 | #endif | ||
| 1172 | |||
| 1173 | /* | ||
| 1174 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED | ||
| 1175 | * | ||
| 1176 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1177 | * and deprecated in Mac OS X 10.10 | ||
| 1178 | */ | ||
| 1179 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1180 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1181 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1182 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1183 | #else | ||
| 1184 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1185 | #endif | ||
| 1186 | |||
| 1187 | /* | ||
| 1188 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1189 | * | ||
| 1190 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1191 | * but later deprecated in Mac OS X 10.10 | ||
| 1192 | */ | ||
| 1193 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1194 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1195 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1196 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1197 | #else | ||
| 1198 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1199 | #endif | ||
| 1200 | |||
| 1201 | /* | ||
| 1202 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1203 | * | ||
| 1204 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1205 | * but later deprecated in Mac OS X 10.10 | ||
| 1206 | */ | ||
| 1207 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1208 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1209 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1210 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1211 | #else | ||
| 1212 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1213 | #endif | ||
| 1214 | |||
| 1215 | /* | ||
| 1216 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1217 | * | ||
| 1218 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1219 | * but later deprecated in Mac OS X 10.10 | ||
| 1220 | */ | ||
| 1221 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1222 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1223 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1224 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1225 | #else | ||
| 1226 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1227 | #endif | ||
| 1228 | |||
| 1229 | /* | ||
| 1230 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1231 | * | ||
| 1232 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1233 | * but later deprecated in Mac OS X 10.10 | ||
| 1234 | */ | ||
| 1235 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1236 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1237 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1238 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1239 | #else | ||
| 1240 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1241 | #endif | ||
| 1242 | |||
| 1243 | /* | ||
| 1244 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1245 | * | ||
| 1246 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1247 | * but later deprecated in Mac OS X 10.10 | ||
| 1248 | */ | ||
| 1249 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1250 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1251 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1252 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1253 | #else | ||
| 1254 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1255 | #endif | ||
| 1256 | |||
| 1257 | /* | ||
| 1258 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1259 | * | ||
| 1260 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1261 | * but later deprecated in Mac OS X 10.10 | ||
| 1262 | */ | ||
| 1263 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1264 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1265 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1266 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1267 | #else | ||
| 1268 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1269 | #endif | ||
| 1270 | |||
| 1271 | /* | ||
| 1272 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1273 | * | ||
| 1274 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1275 | * but later deprecated in Mac OS X 10.10 | ||
| 1276 | */ | ||
| 1277 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1278 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1279 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1280 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1281 | #else | ||
| 1282 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1283 | #endif | ||
| 1284 | |||
| 1285 | /* | ||
| 1286 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1287 | * | ||
| 1288 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1289 | * but later deprecated in Mac OS X 10.10 | ||
| 1290 | */ | ||
| 1291 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1292 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1293 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1294 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1295 | #else | ||
| 1296 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1297 | #endif | ||
| 1298 | |||
| 1299 | /* | ||
| 1300 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1301 | * | ||
| 1302 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1303 | * but later deprecated in Mac OS X 10.10 | ||
| 1304 | */ | ||
| 1305 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1306 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1307 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1308 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1309 | #else | ||
| 1310 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1311 | #endif | ||
| 1312 | |||
| 1313 | /* | ||
| 1314 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1315 | * | ||
| 1316 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1317 | * but later deprecated in Mac OS X 10.10 | ||
| 1318 | */ | ||
| 1319 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1320 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1321 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1322 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1323 | #else | ||
| 1324 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1325 | #endif | ||
| 1326 | |||
| 1327 | /* | ||
| 1328 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1329 | * | ||
| 1330 | * Used on declarations introduced in Mac OS X 10.10.2 | ||
| 1331 | */ | ||
| 1332 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1333 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_2, __IPHONE_COMPAT_VERSION) | ||
| 1334 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_2 | ||
| 1335 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1336 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_2 | ||
| 1337 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1338 | #else | ||
| 1339 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1340 | #endif | ||
| 1341 | |||
| 1342 | /* | ||
| 1343 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED | ||
| 1344 | * | ||
| 1345 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1346 | * and deprecated in Mac OS X 10.10.2 | ||
| 1347 | */ | ||
| 1348 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1349 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1350 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1351 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1352 | #else | ||
| 1353 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1354 | #endif | ||
| 1355 | |||
| 1356 | /* | ||
| 1357 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1358 | * | ||
| 1359 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1360 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1361 | */ | ||
| 1362 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1363 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1364 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1365 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1366 | #else | ||
| 1367 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1368 | #endif | ||
| 1369 | |||
| 1370 | /* | ||
| 1371 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1372 | * | ||
| 1373 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1374 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1375 | */ | ||
| 1376 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1377 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1378 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1379 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1380 | #else | ||
| 1381 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1382 | #endif | ||
| 1383 | |||
| 1384 | /* | ||
| 1385 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1386 | * | ||
| 1387 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1388 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1389 | */ | ||
| 1390 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1391 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1392 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1393 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1394 | #else | ||
| 1395 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1396 | #endif | ||
| 1397 | |||
| 1398 | /* | ||
| 1399 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1400 | * | ||
| 1401 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1402 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1403 | */ | ||
| 1404 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1405 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1406 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1407 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1408 | #else | ||
| 1409 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1410 | #endif | ||
| 1411 | |||
| 1412 | /* | ||
| 1413 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1414 | * | ||
| 1415 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1416 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1417 | */ | ||
| 1418 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1419 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1420 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1421 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1422 | #else | ||
| 1423 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1424 | #endif | ||
| 1425 | |||
| 1426 | /* | ||
| 1427 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1428 | * | ||
| 1429 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1430 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1431 | */ | ||
| 1432 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1433 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1434 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1435 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1436 | #else | ||
| 1437 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1438 | #endif | ||
| 1439 | |||
| 1440 | /* | ||
| 1441 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1442 | * | ||
| 1443 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1444 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1445 | */ | ||
| 1446 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1447 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1448 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1449 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1450 | #else | ||
| 1451 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1452 | #endif | ||
| 1453 | |||
| 1454 | /* | ||
| 1455 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1456 | * | ||
| 1457 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1458 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1459 | */ | ||
| 1460 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1461 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1462 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1463 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1464 | #else | ||
| 1465 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1466 | #endif | ||
| 1467 | |||
| 1468 | /* | ||
| 1469 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1470 | * | ||
| 1471 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1472 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1473 | */ | ||
| 1474 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1475 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1476 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1477 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1478 | #else | ||
| 1479 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1480 | #endif | ||
| 1481 | |||
| 1482 | /* | ||
| 1483 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1484 | * | ||
| 1485 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1486 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1487 | */ | ||
| 1488 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1489 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1490 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1491 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1492 | #else | ||
| 1493 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1494 | #endif | ||
| 1495 | |||
| 1496 | /* | ||
| 1497 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1498 | * | ||
| 1499 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1500 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1501 | */ | ||
| 1502 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1503 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1504 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1505 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1506 | #else | ||
| 1507 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1508 | #endif | ||
| 1509 | |||
| 1510 | /* | ||
| 1511 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1512 | * | ||
| 1513 | * Used on declarations introduced in Mac OS X 10.10.3 | ||
| 1514 | */ | ||
| 1515 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1516 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_3, __IPHONE_COMPAT_VERSION) | ||
| 1517 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_3 | ||
| 1518 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1519 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_3 | ||
| 1520 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1521 | #else | ||
| 1522 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1523 | #endif | ||
| 1524 | |||
| 1525 | /* | ||
| 1526 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED | ||
| 1527 | * | ||
| 1528 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1529 | * and deprecated in Mac OS X 10.10.3 | ||
| 1530 | */ | ||
| 1531 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1532 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1533 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1534 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1535 | #else | ||
| 1536 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1537 | #endif | ||
| 1538 | |||
| 1539 | /* | ||
| 1540 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1541 | * | ||
| 1542 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1543 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1544 | */ | ||
| 1545 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1546 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1547 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1548 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1549 | #else | ||
| 1550 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1551 | #endif | ||
| 1552 | |||
| 1553 | /* | ||
| 1554 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1555 | * | ||
| 1556 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1557 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1558 | */ | ||
| 1559 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1560 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1561 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1562 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1563 | #else | ||
| 1564 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1565 | #endif | ||
| 1566 | |||
| 1567 | /* | ||
| 1568 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1569 | * | ||
| 1570 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1571 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1572 | */ | ||
| 1573 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1574 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1575 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1576 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1577 | #else | ||
| 1578 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1579 | #endif | ||
| 1580 | |||
| 1581 | /* | ||
| 1582 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1583 | * | ||
| 1584 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1585 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1586 | */ | ||
| 1587 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1588 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1589 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1590 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1591 | #else | ||
| 1592 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1593 | #endif | ||
| 1594 | |||
| 1595 | /* | ||
| 1596 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1597 | * | ||
| 1598 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1599 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1600 | */ | ||
| 1601 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1602 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1603 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1604 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1605 | #else | ||
| 1606 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1607 | #endif | ||
| 1608 | |||
| 1609 | /* | ||
| 1610 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1611 | * | ||
| 1612 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1613 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1614 | */ | ||
| 1615 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1616 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1617 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1618 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1619 | #else | ||
| 1620 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1621 | #endif | ||
| 1622 | |||
| 1623 | /* | ||
| 1624 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1625 | * | ||
| 1626 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1627 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1628 | */ | ||
| 1629 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1630 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1631 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1632 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1633 | #else | ||
| 1634 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1635 | #endif | ||
| 1636 | |||
| 1637 | /* | ||
| 1638 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1639 | * | ||
| 1640 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1641 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1642 | */ | ||
| 1643 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1644 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1645 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1646 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1647 | #else | ||
| 1648 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1649 | #endif | ||
| 1650 | |||
| 1651 | /* | ||
| 1652 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1653 | * | ||
| 1654 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1655 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1656 | */ | ||
| 1657 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1658 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1659 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1660 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1661 | #else | ||
| 1662 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1663 | #endif | ||
| 1664 | |||
| 1665 | /* | ||
| 1666 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1667 | * | ||
| 1668 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1669 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1670 | */ | ||
| 1671 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1672 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1673 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1674 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1675 | #else | ||
| 1676 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1677 | #endif | ||
| 1678 | |||
| 1679 | /* | ||
| 1680 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1681 | * | ||
| 1682 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1683 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1684 | */ | ||
| 1685 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1686 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1687 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1688 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1689 | #else | ||
| 1690 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1691 | #endif | ||
| 1692 | |||
| 1693 | /* | ||
| 1694 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1695 | * | ||
| 1696 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1697 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1698 | */ | ||
| 1699 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1700 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1701 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1702 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1703 | #else | ||
| 1704 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1705 | #endif | ||
| 1706 | |||
| 1707 | /* | ||
| 1708 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1709 | * | ||
| 1710 | * Used on declarations introduced in Mac OS X 10.11 | ||
| 1711 | */ | ||
| 1712 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1713 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_COMPAT_VERSION) | ||
| 1714 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 | ||
| 1715 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1716 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 | ||
| 1717 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1718 | #else | ||
| 1719 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1720 | #endif | ||
| 1721 | |||
| 1722 | /* | ||
| 1723 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED | ||
| 1724 | * | ||
| 1725 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 1726 | * and deprecated in Mac OS X 10.11 | ||
| 1727 | */ | ||
| 1728 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1729 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1730 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1731 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1732 | #else | ||
| 1733 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1734 | #endif | ||
| 1735 | |||
| 1736 | /* | ||
| 1737 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1738 | * | ||
| 1739 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1740 | * but later deprecated in Mac OS X 10.11 | ||
| 1741 | */ | ||
| 1742 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1743 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1744 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1745 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1746 | #else | ||
| 1747 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1748 | #endif | ||
| 1749 | |||
| 1750 | /* | ||
| 1751 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1752 | * | ||
| 1753 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1754 | * but later deprecated in Mac OS X 10.11 | ||
| 1755 | */ | ||
| 1756 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1757 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1758 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1759 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1760 | #else | ||
| 1761 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1762 | #endif | ||
| 1763 | |||
| 1764 | /* | ||
| 1765 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1766 | * | ||
| 1767 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1768 | * but later deprecated in Mac OS X 10.11 | ||
| 1769 | */ | ||
| 1770 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1771 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1772 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1773 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1774 | #else | ||
| 1775 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1776 | #endif | ||
| 1777 | |||
| 1778 | /* | ||
| 1779 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1780 | * | ||
| 1781 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1782 | * but later deprecated in Mac OS X 10.11 | ||
| 1783 | */ | ||
| 1784 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1785 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1786 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1787 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1788 | #else | ||
| 1789 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1790 | #endif | ||
| 1791 | |||
| 1792 | /* | ||
| 1793 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1794 | * | ||
| 1795 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1796 | * but later deprecated in Mac OS X 10.11 | ||
| 1797 | */ | ||
| 1798 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1799 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1800 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1801 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1802 | #else | ||
| 1803 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1804 | #endif | ||
| 1805 | |||
| 1806 | /* | ||
| 1807 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1808 | * | ||
| 1809 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1810 | * but later deprecated in Mac OS X 10.11 | ||
| 1811 | */ | ||
| 1812 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1813 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1814 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1815 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1816 | #else | ||
| 1817 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1818 | #endif | ||
| 1819 | |||
| 1820 | /* | ||
| 1821 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1822 | * | ||
| 1823 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1824 | * but later deprecated in Mac OS X 10.11 | ||
| 1825 | */ | ||
| 1826 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1827 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1828 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1829 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1830 | #else | ||
| 1831 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1832 | #endif | ||
| 1833 | |||
| 1834 | /* | ||
| 1835 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1836 | * | ||
| 1837 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1838 | * but later deprecated in Mac OS X 10.11 | ||
| 1839 | */ | ||
| 1840 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1841 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1842 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1843 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1844 | #else | ||
| 1845 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1846 | #endif | ||
| 1847 | |||
| 1848 | /* | ||
| 1849 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1850 | * | ||
| 1851 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1852 | * but later deprecated in Mac OS X 10.11 | ||
| 1853 | */ | ||
| 1854 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1855 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1856 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1857 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1858 | #else | ||
| 1859 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1860 | #endif | ||
| 1861 | |||
| 1862 | /* | ||
| 1863 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1864 | * | ||
| 1865 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1866 | * but later deprecated in Mac OS X 10.11 | ||
| 1867 | */ | ||
| 1868 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1869 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1870 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1871 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1872 | #else | ||
| 1873 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1874 | #endif | ||
| 1875 | |||
| 1876 | /* | ||
| 1877 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1878 | * | ||
| 1879 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1880 | * but later deprecated in Mac OS X 10.11 | ||
| 1881 | */ | ||
| 1882 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1883 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1884 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1885 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1886 | #else | ||
| 1887 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1888 | #endif | ||
| 1889 | |||
| 1890 | /* | ||
| 1891 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1892 | * | ||
| 1893 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1894 | * but later deprecated in Mac OS X 10.11 | ||
| 1895 | */ | ||
| 1896 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1897 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1898 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1899 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1900 | #else | ||
| 1901 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1902 | #endif | ||
| 1903 | |||
| 1904 | /* | ||
| 1905 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1906 | * | ||
| 1907 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1908 | * but later deprecated in Mac OS X 10.11 | ||
| 1909 | */ | ||
| 1910 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1911 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1912 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1913 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1914 | #else | ||
| 1915 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1916 | #endif | ||
| 1917 | |||
| 1918 | /* | ||
| 1919 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1920 | * | ||
| 1921 | * Used on declarations introduced in Mac OS X 10.11.2 | ||
| 1922 | */ | ||
| 1923 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1924 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_2, __IPHONE_COMPAT_VERSION) | ||
| 1925 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_2 | ||
| 1926 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1927 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_2 | ||
| 1928 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1929 | #else | ||
| 1930 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1931 | #endif | ||
| 1932 | |||
| 1933 | /* | ||
| 1934 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED | ||
| 1935 | * | ||
| 1936 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 1937 | * and deprecated in Mac OS X 10.11.2 | ||
| 1938 | */ | ||
| 1939 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1940 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1941 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1942 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1943 | #else | ||
| 1944 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1945 | #endif | ||
| 1946 | |||
| 1947 | /* | ||
| 1948 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1949 | * | ||
| 1950 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1951 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1952 | */ | ||
| 1953 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1954 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1955 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1956 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1957 | #else | ||
| 1958 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1959 | #endif | ||
| 1960 | |||
| 1961 | /* | ||
| 1962 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1963 | * | ||
| 1964 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1965 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1966 | */ | ||
| 1967 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1968 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1969 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1970 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1971 | #else | ||
| 1972 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1973 | #endif | ||
| 1974 | |||
| 1975 | /* | ||
| 1976 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1977 | * | ||
| 1978 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1979 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1980 | */ | ||
| 1981 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1982 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1983 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1984 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1985 | #else | ||
| 1986 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1987 | #endif | ||
| 1988 | |||
| 1989 | /* | ||
| 1990 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1991 | * | ||
| 1992 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1993 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1994 | */ | ||
| 1995 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1996 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1997 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1998 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1999 | #else | ||
| 2000 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2001 | #endif | ||
| 2002 | |||
| 2003 | /* | ||
| 2004 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2005 | * | ||
| 2006 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2007 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2008 | */ | ||
| 2009 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2010 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2011 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2012 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2013 | #else | ||
| 2014 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2015 | #endif | ||
| 2016 | |||
| 2017 | /* | ||
| 2018 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2019 | * | ||
| 2020 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2021 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2022 | */ | ||
| 2023 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2024 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2025 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2026 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2027 | #else | ||
| 2028 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2029 | #endif | ||
| 2030 | |||
| 2031 | /* | ||
| 2032 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2033 | * | ||
| 2034 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2035 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2036 | */ | ||
| 2037 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2038 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2039 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2040 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2041 | #else | ||
| 2042 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2043 | #endif | ||
| 2044 | |||
| 2045 | /* | ||
| 2046 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2047 | * | ||
| 2048 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2049 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2050 | */ | ||
| 2051 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2052 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2053 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2054 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2055 | #else | ||
| 2056 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2057 | #endif | ||
| 2058 | |||
| 2059 | /* | ||
| 2060 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2061 | * | ||
| 2062 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2063 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2064 | */ | ||
| 2065 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2066 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2067 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2068 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2069 | #else | ||
| 2070 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2071 | #endif | ||
| 2072 | |||
| 2073 | /* | ||
| 2074 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2075 | * | ||
| 2076 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2077 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2078 | */ | ||
| 2079 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2080 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2081 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2082 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2083 | #else | ||
| 2084 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2085 | #endif | ||
| 2086 | |||
| 2087 | /* | ||
| 2088 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2089 | * | ||
| 2090 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2091 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2092 | */ | ||
| 2093 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2094 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2095 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2096 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2097 | #else | ||
| 2098 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2099 | #endif | ||
| 2100 | |||
| 2101 | /* | ||
| 2102 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2103 | * | ||
| 2104 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2105 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2106 | */ | ||
| 2107 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2108 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2109 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2110 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2111 | #else | ||
| 2112 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2113 | #endif | ||
| 2114 | |||
| 2115 | /* | ||
| 2116 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2117 | * | ||
| 2118 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2119 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2120 | */ | ||
| 2121 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2122 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2123 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2124 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2125 | #else | ||
| 2126 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2127 | #endif | ||
| 2128 | |||
| 2129 | /* | ||
| 2130 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2131 | * | ||
| 2132 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2133 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2134 | */ | ||
| 2135 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2136 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2137 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2138 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2139 | #else | ||
| 2140 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2141 | #endif | ||
| 2142 | |||
| 2143 | /* | ||
| 2144 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2145 | * | ||
| 2146 | * Used on declarations introduced in Mac OS X 10.11.3 | ||
| 2147 | */ | ||
| 2148 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2149 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_3, __IPHONE_COMPAT_VERSION) | ||
| 2150 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_3 | ||
| 2151 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2152 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_3 | ||
| 2153 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2154 | #else | ||
| 2155 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2156 | #endif | ||
| 2157 | |||
| 2158 | /* | ||
| 2159 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED | ||
| 2160 | * | ||
| 2161 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2162 | * and deprecated in Mac OS X 10.11.3 | ||
| 2163 | */ | ||
| 2164 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2165 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2166 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2167 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2168 | #else | ||
| 2169 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2170 | #endif | ||
| 2171 | |||
| 2172 | /* | ||
| 2173 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2174 | * | ||
| 2175 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2176 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2177 | */ | ||
| 2178 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2179 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2180 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2181 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2182 | #else | ||
| 2183 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2184 | #endif | ||
| 2185 | |||
| 2186 | /* | ||
| 2187 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2188 | * | ||
| 2189 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2190 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2191 | */ | ||
| 2192 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2193 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2194 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2195 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2196 | #else | ||
| 2197 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2198 | #endif | ||
| 2199 | |||
| 2200 | /* | ||
| 2201 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2202 | * | ||
| 2203 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2204 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2205 | */ | ||
| 2206 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2207 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2208 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2209 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2210 | #else | ||
| 2211 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2212 | #endif | ||
| 2213 | |||
| 2214 | /* | ||
| 2215 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2216 | * | ||
| 2217 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2218 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2219 | */ | ||
| 2220 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2221 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2222 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2223 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2224 | #else | ||
| 2225 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2226 | #endif | ||
| 2227 | |||
| 2228 | /* | ||
| 2229 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2230 | * | ||
| 2231 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2232 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2233 | */ | ||
| 2234 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2235 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2236 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2237 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2238 | #else | ||
| 2239 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2240 | #endif | ||
| 2241 | |||
| 2242 | /* | ||
| 2243 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2244 | * | ||
| 2245 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2246 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2247 | */ | ||
| 2248 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2249 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2250 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2251 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2252 | #else | ||
| 2253 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2254 | #endif | ||
| 2255 | |||
| 2256 | /* | ||
| 2257 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2258 | * | ||
| 2259 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2260 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2261 | */ | ||
| 2262 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2263 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2264 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2265 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2266 | #else | ||
| 2267 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2268 | #endif | ||
| 2269 | |||
| 2270 | /* | ||
| 2271 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2272 | * | ||
| 2273 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2274 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2275 | */ | ||
| 2276 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2277 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2278 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2279 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2280 | #else | ||
| 2281 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2282 | #endif | ||
| 2283 | |||
| 2284 | /* | ||
| 2285 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2286 | * | ||
| 2287 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2288 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2289 | */ | ||
| 2290 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2291 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2292 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2293 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2294 | #else | ||
| 2295 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2296 | #endif | ||
| 2297 | |||
| 2298 | /* | ||
| 2299 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2300 | * | ||
| 2301 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2302 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2303 | */ | ||
| 2304 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2305 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2306 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2307 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2308 | #else | ||
| 2309 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2310 | #endif | ||
| 2311 | |||
| 2312 | /* | ||
| 2313 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2314 | * | ||
| 2315 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2316 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2317 | */ | ||
| 2318 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2319 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2320 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2321 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2322 | #else | ||
| 2323 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2324 | #endif | ||
| 2325 | |||
| 2326 | /* | ||
| 2327 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2328 | * | ||
| 2329 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2330 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2331 | */ | ||
| 2332 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2333 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2334 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2335 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2336 | #else | ||
| 2337 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2338 | #endif | ||
| 2339 | |||
| 2340 | /* | ||
| 2341 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2342 | * | ||
| 2343 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2344 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2345 | */ | ||
| 2346 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2347 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2348 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2349 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2350 | #else | ||
| 2351 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2352 | #endif | ||
| 2353 | |||
| 2354 | /* | ||
| 2355 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2356 | * | ||
| 2357 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2358 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2359 | */ | ||
| 2360 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2361 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2362 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2363 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2364 | #else | ||
| 2365 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2366 | #endif | ||
| 2367 | |||
| 2368 | /* | ||
| 2369 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2370 | * | ||
| 2371 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2372 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2373 | */ | ||
| 2374 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2375 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2376 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2377 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2378 | #else | ||
| 2379 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2380 | #endif | ||
| 2381 | |||
| 2382 | /* | ||
| 2383 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2384 | * | ||
| 2385 | * Used on declarations introduced in Mac OS X 10.11.4 | ||
| 2386 | */ | ||
| 2387 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2388 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_4, __IPHONE_COMPAT_VERSION) | ||
| 2389 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_4 | ||
| 2390 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2391 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_4 | ||
| 2392 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2393 | #else | ||
| 2394 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2395 | #endif | ||
| 2396 | |||
| 2397 | /* | ||
| 2398 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED | ||
| 2399 | * | ||
| 2400 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2401 | * and deprecated in Mac OS X 10.11.4 | ||
| 2402 | */ | ||
| 2403 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2404 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2405 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2406 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2407 | #else | ||
| 2408 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2409 | #endif | ||
| 2410 | |||
| 2411 | /* | ||
| 2412 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2413 | * | ||
| 2414 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2415 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2416 | */ | ||
| 2417 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2418 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2419 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2420 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2421 | #else | ||
| 2422 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2423 | #endif | ||
| 2424 | |||
| 2425 | /* | ||
| 2426 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2427 | * | ||
| 2428 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2429 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2430 | */ | ||
| 2431 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2432 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2433 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2434 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2435 | #else | ||
| 2436 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2437 | #endif | ||
| 2438 | |||
| 2439 | /* | ||
| 2440 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2441 | * | ||
| 2442 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2443 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2444 | */ | ||
| 2445 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2446 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2447 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2448 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2449 | #else | ||
| 2450 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2451 | #endif | ||
| 2452 | |||
| 2453 | /* | ||
| 2454 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2455 | * | ||
| 2456 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2457 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2458 | */ | ||
| 2459 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2460 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2461 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2462 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2463 | #else | ||
| 2464 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2465 | #endif | ||
| 2466 | |||
| 2467 | /* | ||
| 2468 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2469 | * | ||
| 2470 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2471 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2472 | */ | ||
| 2473 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2474 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2475 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2476 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2477 | #else | ||
| 2478 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2479 | #endif | ||
| 2480 | |||
| 2481 | /* | ||
| 2482 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2483 | * | ||
| 2484 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2485 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2486 | */ | ||
| 2487 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2488 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2489 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2490 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2491 | #else | ||
| 2492 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2493 | #endif | ||
| 2494 | |||
| 2495 | /* | ||
| 2496 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2497 | * | ||
| 2498 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2499 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2500 | */ | ||
| 2501 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2502 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2503 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2504 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2505 | #else | ||
| 2506 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2507 | #endif | ||
| 2508 | |||
| 2509 | /* | ||
| 2510 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2511 | * | ||
| 2512 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2513 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2514 | */ | ||
| 2515 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2516 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2517 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2518 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2519 | #else | ||
| 2520 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2521 | #endif | ||
| 2522 | |||
| 2523 | /* | ||
| 2524 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2525 | * | ||
| 2526 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2527 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2528 | */ | ||
| 2529 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2530 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2531 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2532 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2533 | #else | ||
| 2534 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2535 | #endif | ||
| 2536 | |||
| 2537 | /* | ||
| 2538 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2539 | * | ||
| 2540 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2541 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2542 | */ | ||
| 2543 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2544 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2545 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2546 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2547 | #else | ||
| 2548 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2549 | #endif | ||
| 2550 | |||
| 2551 | /* | ||
| 2552 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2553 | * | ||
| 2554 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2555 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2556 | */ | ||
| 2557 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2558 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2559 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2560 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2561 | #else | ||
| 2562 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2563 | #endif | ||
| 2564 | |||
| 2565 | /* | ||
| 2566 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2567 | * | ||
| 2568 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2569 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2570 | */ | ||
| 2571 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2572 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2573 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2574 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2575 | #else | ||
| 2576 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2577 | #endif | ||
| 2578 | |||
| 2579 | /* | ||
| 2580 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2581 | * | ||
| 2582 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2583 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2584 | */ | ||
| 2585 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2586 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2587 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2588 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2589 | #else | ||
| 2590 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2591 | #endif | ||
| 2592 | |||
| 2593 | /* | ||
| 2594 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2595 | * | ||
| 2596 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2597 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2598 | */ | ||
| 2599 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2600 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2601 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2602 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2603 | #else | ||
| 2604 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2605 | #endif | ||
| 2606 | |||
| 2607 | /* | ||
| 2608 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2609 | * | ||
| 2610 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2611 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2612 | */ | ||
| 2613 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2614 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2615 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2616 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2617 | #else | ||
| 2618 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2619 | #endif | ||
| 2620 | |||
| 2621 | /* | ||
| 2622 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2623 | * | ||
| 2624 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2625 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2626 | */ | ||
| 2627 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2628 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2629 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2630 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2631 | #else | ||
| 2632 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2633 | #endif | ||
| 2634 | |||
| 2635 | /* | ||
| 2636 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2637 | * | ||
| 2638 | * Used on declarations introduced in Mac OS X 10.12 | ||
| 2639 | */ | ||
| 2640 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2641 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_COMPAT_VERSION) | ||
| 2642 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | ||
| 2643 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2644 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12 | ||
| 2645 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2646 | #else | ||
| 2647 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2648 | #endif | ||
| 2649 | |||
| 2650 | /* | ||
| 2651 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED | ||
| 2652 | * | ||
| 2653 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 2654 | * and deprecated in Mac OS X 10.12 | ||
| 2655 | */ | ||
| 2656 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2657 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2658 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2659 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2660 | #else | ||
| 2661 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2662 | #endif | ||
| 2663 | |||
| 2664 | /* | ||
| 2665 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2666 | * | ||
| 2667 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2668 | * but later deprecated in Mac OS X 10.12 | ||
| 2669 | */ | ||
| 2670 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2671 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2672 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2673 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2674 | #else | ||
| 2675 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2676 | #endif | ||
| 2677 | |||
| 2678 | /* | ||
| 2679 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2680 | * | ||
| 2681 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2682 | * but later deprecated in Mac OS X 10.12 | ||
| 2683 | */ | ||
| 2684 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2685 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2686 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2687 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2688 | #else | ||
| 2689 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2690 | #endif | ||
| 2691 | |||
| 2692 | /* | ||
| 2693 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2694 | * | ||
| 2695 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2696 | * but later deprecated in Mac OS X 10.12 | ||
| 2697 | */ | ||
| 2698 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2699 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2700 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2701 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2702 | #else | ||
| 2703 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2704 | #endif | ||
| 2705 | |||
| 2706 | /* | ||
| 2707 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2708 | * | ||
| 2709 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2710 | * but later deprecated in Mac OS X 10.12 | ||
| 2711 | */ | ||
| 2712 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2713 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2714 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2715 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2716 | #else | ||
| 2717 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2718 | #endif | ||
| 2719 | |||
| 2720 | /* | ||
| 2721 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2722 | * | ||
| 2723 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2724 | * but later deprecated in Mac OS X 10.12 | ||
| 2725 | */ | ||
| 2726 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2727 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2728 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2729 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2730 | #else | ||
| 2731 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2732 | #endif | ||
| 2733 | |||
| 2734 | /* | ||
| 2735 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2736 | * | ||
| 2737 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2738 | * but later deprecated in Mac OS X 10.12 | ||
| 2739 | */ | ||
| 2740 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2741 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2742 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2743 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2744 | #else | ||
| 2745 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2746 | #endif | ||
| 2747 | |||
| 2748 | /* | ||
| 2749 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2750 | * | ||
| 2751 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2752 | * but later deprecated in Mac OS X 10.12 | ||
| 2753 | */ | ||
| 2754 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2755 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2756 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2757 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2758 | #else | ||
| 2759 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2760 | #endif | ||
| 2761 | |||
| 2762 | /* | ||
| 2763 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2764 | * | ||
| 2765 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2766 | * but later deprecated in Mac OS X 10.12 | ||
| 2767 | */ | ||
| 2768 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2769 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2770 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2771 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2772 | #else | ||
| 2773 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2774 | #endif | ||
| 2775 | |||
| 2776 | /* | ||
| 2777 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2778 | * | ||
| 2779 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2780 | * but later deprecated in Mac OS X 10.12 | ||
| 2781 | */ | ||
| 2782 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2783 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2784 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2785 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2786 | #else | ||
| 2787 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2788 | #endif | ||
| 2789 | |||
| 2790 | /* | ||
| 2791 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2792 | * | ||
| 2793 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2794 | * but later deprecated in Mac OS X 10.12 | ||
| 2795 | */ | ||
| 2796 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2797 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2798 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2799 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2800 | #else | ||
| 2801 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2802 | #endif | ||
| 2803 | |||
| 2804 | /* | ||
| 2805 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2806 | * | ||
| 2807 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2808 | * but later deprecated in Mac OS X 10.12 | ||
| 2809 | */ | ||
| 2810 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2811 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2812 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2813 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2814 | #else | ||
| 2815 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2816 | #endif | ||
| 2817 | |||
| 2818 | /* | ||
| 2819 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2820 | * | ||
| 2821 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2822 | * but later deprecated in Mac OS X 10.12 | ||
| 2823 | */ | ||
| 2824 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2825 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2826 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2827 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2828 | #else | ||
| 2829 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2830 | #endif | ||
| 2831 | |||
| 2832 | /* | ||
| 2833 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2834 | * | ||
| 2835 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2836 | * but later deprecated in Mac OS X 10.12 | ||
| 2837 | */ | ||
| 2838 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2839 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2840 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2841 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2842 | #else | ||
| 2843 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2844 | #endif | ||
| 2845 | |||
| 2846 | /* | ||
| 2847 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2848 | * | ||
| 2849 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2850 | * but later deprecated in Mac OS X 10.12 | ||
| 2851 | */ | ||
| 2852 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2853 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2854 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2855 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2856 | #else | ||
| 2857 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2858 | #endif | ||
| 2859 | |||
| 2860 | /* | ||
| 2861 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2862 | * | ||
| 2863 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2864 | * but later deprecated in Mac OS X 10.12 | ||
| 2865 | */ | ||
| 2866 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2867 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2868 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2869 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2870 | #else | ||
| 2871 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2872 | #endif | ||
| 2873 | |||
| 2874 | /* | ||
| 2875 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2876 | * | ||
| 2877 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2878 | * but later deprecated in Mac OS X 10.12 | ||
| 2879 | */ | ||
| 2880 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2881 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2882 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2883 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2884 | #else | ||
| 2885 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2886 | #endif | ||
| 2887 | |||
| 2888 | /* | ||
| 2889 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2890 | * | ||
| 2891 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2892 | * but later deprecated in Mac OS X 10.12 | ||
| 2893 | */ | ||
| 2894 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2895 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2896 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2897 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2898 | #else | ||
| 2899 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2900 | #endif | ||
| 2901 | |||
| 2902 | /* | ||
| 2903 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2904 | * | ||
| 2905 | * Used on declarations introduced in Mac OS X 10.12.1 | ||
| 2906 | */ | ||
| 2907 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2908 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_1, __IPHONE_COMPAT_VERSION) | ||
| 2909 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_1 | ||
| 2910 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2911 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_1 | ||
| 2912 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2913 | #else | ||
| 2914 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2915 | #endif | ||
| 2916 | |||
| 2917 | /* | ||
| 2918 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED | ||
| 2919 | * | ||
| 2920 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 2921 | * and deprecated in Mac OS X 10.12.1 | ||
| 2922 | */ | ||
| 2923 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2924 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2925 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2926 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2927 | #else | ||
| 2928 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2929 | #endif | ||
| 2930 | |||
| 2931 | /* | ||
| 2932 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2933 | * | ||
| 2934 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2935 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2936 | */ | ||
| 2937 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2938 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2939 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2940 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2941 | #else | ||
| 2942 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2943 | #endif | ||
| 2944 | |||
| 2945 | /* | ||
| 2946 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2947 | * | ||
| 2948 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2949 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2950 | */ | ||
| 2951 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2952 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2953 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2954 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2955 | #else | ||
| 2956 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2957 | #endif | ||
| 2958 | |||
| 2959 | /* | ||
| 2960 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2961 | * | ||
| 2962 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2963 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2964 | */ | ||
| 2965 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2966 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2967 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2968 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2969 | #else | ||
| 2970 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2971 | #endif | ||
| 2972 | |||
| 2973 | /* | ||
| 2974 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2975 | * | ||
| 2976 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2977 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2978 | */ | ||
| 2979 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2980 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2981 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2982 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2983 | #else | ||
| 2984 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2985 | #endif | ||
| 2986 | |||
| 2987 | /* | ||
| 2988 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2989 | * | ||
| 2990 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2991 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2992 | */ | ||
| 2993 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2994 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2995 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2996 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2997 | #else | ||
| 2998 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2999 | #endif | ||
| 3000 | |||
| 3001 | /* | ||
| 3002 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3003 | * | ||
| 3004 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3005 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3006 | */ | ||
| 3007 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3008 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3009 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3010 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3011 | #else | ||
| 3012 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3013 | #endif | ||
| 3014 | |||
| 3015 | /* | ||
| 3016 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3017 | * | ||
| 3018 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3019 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3020 | */ | ||
| 3021 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3022 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3023 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3024 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3025 | #else | ||
| 3026 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3027 | #endif | ||
| 3028 | |||
| 3029 | /* | ||
| 3030 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3031 | * | ||
| 3032 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3033 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3034 | */ | ||
| 3035 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3036 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3037 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3038 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3039 | #else | ||
| 3040 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3041 | #endif | ||
| 3042 | |||
| 3043 | /* | ||
| 3044 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3045 | * | ||
| 3046 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3047 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3048 | */ | ||
| 3049 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3050 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3051 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3052 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3053 | #else | ||
| 3054 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3055 | #endif | ||
| 3056 | |||
| 3057 | /* | ||
| 3058 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3059 | * | ||
| 3060 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3061 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3062 | */ | ||
| 3063 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3064 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3065 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3066 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3067 | #else | ||
| 3068 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3069 | #endif | ||
| 3070 | |||
| 3071 | /* | ||
| 3072 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3073 | * | ||
| 3074 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3075 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3076 | */ | ||
| 3077 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3078 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3079 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3080 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3081 | #else | ||
| 3082 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3083 | #endif | ||
| 3084 | |||
| 3085 | /* | ||
| 3086 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3087 | * | ||
| 3088 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3089 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3090 | */ | ||
| 3091 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3092 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3093 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3094 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3095 | #else | ||
| 3096 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3097 | #endif | ||
| 3098 | |||
| 3099 | /* | ||
| 3100 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3101 | * | ||
| 3102 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3103 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3104 | */ | ||
| 3105 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3106 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3107 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3108 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3109 | #else | ||
| 3110 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3111 | #endif | ||
| 3112 | |||
| 3113 | /* | ||
| 3114 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3115 | * | ||
| 3116 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3117 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3118 | */ | ||
| 3119 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3120 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3121 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3122 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3123 | #else | ||
| 3124 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3125 | #endif | ||
| 3126 | |||
| 3127 | /* | ||
| 3128 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3129 | * | ||
| 3130 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3131 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3132 | */ | ||
| 3133 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3134 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3135 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3136 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3137 | #else | ||
| 3138 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3139 | #endif | ||
| 3140 | |||
| 3141 | /* | ||
| 3142 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3143 | * | ||
| 3144 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3145 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3146 | */ | ||
| 3147 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3148 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3149 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3150 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3151 | #else | ||
| 3152 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3153 | #endif | ||
| 3154 | |||
| 3155 | /* | ||
| 3156 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3157 | * | ||
| 3158 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3159 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3160 | */ | ||
| 3161 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3162 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3163 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3164 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3165 | #else | ||
| 3166 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3167 | #endif | ||
| 3168 | |||
| 3169 | /* | ||
| 3170 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3171 | * | ||
| 3172 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3173 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3174 | */ | ||
| 3175 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3176 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3177 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3178 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3179 | #else | ||
| 3180 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3181 | #endif | ||
| 3182 | |||
| 3183 | /* | ||
| 3184 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3185 | * | ||
| 3186 | * Used on declarations introduced in Mac OS X 10.12.2 | ||
| 3187 | */ | ||
| 3188 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3189 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_COMPAT_VERSION) | ||
| 3190 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2 | ||
| 3191 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3192 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_2 | ||
| 3193 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3194 | #else | ||
| 3195 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3196 | #endif | ||
| 3197 | |||
| 3198 | /* | ||
| 3199 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED | ||
| 3200 | * | ||
| 3201 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3202 | * and deprecated in Mac OS X 10.12.2 | ||
| 3203 | */ | ||
| 3204 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3205 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3206 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3207 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3208 | #else | ||
| 3209 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3210 | #endif | ||
| 3211 | |||
| 3212 | /* | ||
| 3213 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3214 | * | ||
| 3215 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3216 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3217 | */ | ||
| 3218 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3219 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3220 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3221 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3222 | #else | ||
| 3223 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3224 | #endif | ||
| 3225 | |||
| 3226 | /* | ||
| 3227 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3228 | * | ||
| 3229 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3230 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3231 | */ | ||
| 3232 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3233 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3234 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3235 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3236 | #else | ||
| 3237 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3238 | #endif | ||
| 3239 | |||
| 3240 | /* | ||
| 3241 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3242 | * | ||
| 3243 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3244 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3245 | */ | ||
| 3246 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3247 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3248 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3249 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3250 | #else | ||
| 3251 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3252 | #endif | ||
| 3253 | |||
| 3254 | /* | ||
| 3255 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3256 | * | ||
| 3257 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3258 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3259 | */ | ||
| 3260 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3261 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3262 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3263 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3264 | #else | ||
| 3265 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3266 | #endif | ||
| 3267 | |||
| 3268 | /* | ||
| 3269 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3270 | * | ||
| 3271 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3272 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3273 | */ | ||
| 3274 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3275 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3276 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3277 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3278 | #else | ||
| 3279 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3280 | #endif | ||
| 3281 | |||
| 3282 | /* | ||
| 3283 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3284 | * | ||
| 3285 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3286 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3287 | */ | ||
| 3288 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3289 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3290 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3291 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3292 | #else | ||
| 3293 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3294 | #endif | ||
| 3295 | |||
| 3296 | /* | ||
| 3297 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3298 | * | ||
| 3299 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3300 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3301 | */ | ||
| 3302 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3303 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3304 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3305 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3306 | #else | ||
| 3307 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3308 | #endif | ||
| 3309 | |||
| 3310 | /* | ||
| 3311 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3312 | * | ||
| 3313 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3314 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3315 | */ | ||
| 3316 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3317 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3318 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3319 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3320 | #else | ||
| 3321 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3322 | #endif | ||
| 3323 | |||
| 3324 | /* | ||
| 3325 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3326 | * | ||
| 3327 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3328 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3329 | */ | ||
| 3330 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3331 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3332 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3333 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3334 | #else | ||
| 3335 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3336 | #endif | ||
| 3337 | |||
| 3338 | /* | ||
| 3339 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3340 | * | ||
| 3341 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3342 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3343 | */ | ||
| 3344 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3345 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3346 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3347 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3348 | #else | ||
| 3349 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3350 | #endif | ||
| 3351 | |||
| 3352 | /* | ||
| 3353 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3354 | * | ||
| 3355 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3356 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3357 | */ | ||
| 3358 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3359 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3360 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3361 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3362 | #else | ||
| 3363 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3364 | #endif | ||
| 3365 | |||
| 3366 | /* | ||
| 3367 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3368 | * | ||
| 3369 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3370 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3371 | */ | ||
| 3372 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3373 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3374 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3375 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3376 | #else | ||
| 3377 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3378 | #endif | ||
| 3379 | |||
| 3380 | /* | ||
| 3381 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3382 | * | ||
| 3383 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3384 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3385 | */ | ||
| 3386 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3387 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3388 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3389 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3390 | #else | ||
| 3391 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3392 | #endif | ||
| 3393 | |||
| 3394 | /* | ||
| 3395 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3396 | * | ||
| 3397 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3398 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3399 | */ | ||
| 3400 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3401 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3402 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3403 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3404 | #else | ||
| 3405 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3406 | #endif | ||
| 3407 | |||
| 3408 | /* | ||
| 3409 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3410 | * | ||
| 3411 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3412 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3413 | */ | ||
| 3414 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3415 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3416 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3417 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3418 | #else | ||
| 3419 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3420 | #endif | ||
| 3421 | |||
| 3422 | /* | ||
| 3423 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3424 | * | ||
| 3425 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3426 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3427 | */ | ||
| 3428 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3429 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3430 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3431 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3432 | #else | ||
| 3433 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3434 | #endif | ||
| 3435 | |||
| 3436 | /* | ||
| 3437 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3438 | * | ||
| 3439 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3440 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3441 | */ | ||
| 3442 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3443 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3444 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3445 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3446 | #else | ||
| 3447 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3448 | #endif | ||
| 3449 | |||
| 3450 | /* | ||
| 3451 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3452 | * | ||
| 3453 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3454 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3455 | */ | ||
| 3456 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3457 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3458 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3459 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3460 | #else | ||
| 3461 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3462 | #endif | ||
| 3463 | |||
| 3464 | /* | ||
| 3465 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3466 | * | ||
| 3467 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3468 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3469 | */ | ||
| 3470 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3471 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3472 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3473 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3474 | #else | ||
| 3475 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3476 | #endif | ||
| 3477 | |||
| 3478 | /* | ||
| 3479 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3480 | * | ||
| 3481 | * Used on declarations introduced in Mac OS X 10.12.4 | ||
| 3482 | */ | ||
| 3483 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3484 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_4, __IPHONE_COMPAT_VERSION) | ||
| 3485 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_4 | ||
| 3486 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3487 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_4 | ||
| 3488 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3489 | #else | ||
| 3490 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3491 | #endif | ||
| 3492 | |||
| 3493 | /* | ||
| 3494 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED | ||
| 3495 | * | ||
| 3496 | * Used on declarations introduced in Mac OS X 10.12.4, | ||
| 3497 | * and deprecated in Mac OS X 10.12.4 | ||
| 3498 | */ | ||
| 3499 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3500 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3501 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3502 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3503 | #else | ||
| 3504 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3505 | #endif | ||
| 3506 | |||
| 3507 | /* | ||
| 3508 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3509 | * | ||
| 3510 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3511 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3512 | */ | ||
| 3513 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3514 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3515 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3516 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3517 | #else | ||
| 3518 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3519 | #endif | ||
| 3520 | |||
| 3521 | /* | ||
| 3522 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3523 | * | ||
| 3524 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3525 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3526 | */ | ||
| 3527 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3528 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3529 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3530 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3531 | #else | ||
| 3532 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3533 | #endif | ||
| 3534 | |||
| 3535 | /* | ||
| 3536 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3537 | * | ||
| 3538 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3539 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3540 | */ | ||
| 3541 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3542 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3543 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3544 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3545 | #else | ||
| 3546 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3547 | #endif | ||
| 3548 | |||
| 3549 | /* | ||
| 3550 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3551 | * | ||
| 3552 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3553 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3554 | */ | ||
| 3555 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3556 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3557 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3558 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3559 | #else | ||
| 3560 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3561 | #endif | ||
| 3562 | |||
| 3563 | /* | ||
| 3564 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3565 | * | ||
| 3566 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3567 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3568 | */ | ||
| 3569 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3570 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3571 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3572 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3573 | #else | ||
| 3574 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3575 | #endif | ||
| 3576 | |||
| 3577 | /* | ||
| 3578 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3579 | * | ||
| 3580 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3581 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3582 | */ | ||
| 3583 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3584 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3585 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3586 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3587 | #else | ||
| 3588 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3589 | #endif | ||
| 3590 | |||
| 3591 | /* | ||
| 3592 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3593 | * | ||
| 3594 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3595 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3596 | */ | ||
| 3597 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3598 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3599 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3600 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3601 | #else | ||
| 3602 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3603 | #endif | ||
| 3604 | |||
| 3605 | /* | ||
| 3606 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3607 | * | ||
| 3608 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3609 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3610 | */ | ||
| 3611 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3612 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3613 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3614 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3615 | #else | ||
| 3616 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3617 | #endif | ||
| 3618 | |||
| 3619 | /* | ||
| 3620 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3621 | * | ||
| 3622 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3623 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3624 | */ | ||
| 3625 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3626 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3627 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3628 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3629 | #else | ||
| 3630 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3631 | #endif | ||
| 3632 | |||
| 3633 | /* | ||
| 3634 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3635 | * | ||
| 3636 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3637 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3638 | */ | ||
| 3639 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3640 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3641 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3642 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3643 | #else | ||
| 3644 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3645 | #endif | ||
| 3646 | |||
| 3647 | /* | ||
| 3648 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3649 | * | ||
| 3650 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3651 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3652 | */ | ||
| 3653 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3654 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3655 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3656 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3657 | #else | ||
| 3658 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3659 | #endif | ||
| 3660 | |||
| 3661 | /* | ||
| 3662 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3663 | * | ||
| 3664 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3665 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3666 | */ | ||
| 3667 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3668 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3669 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3670 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3671 | #else | ||
| 3672 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3673 | #endif | ||
| 3674 | |||
| 3675 | /* | ||
| 3676 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3677 | * | ||
| 3678 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3679 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3680 | */ | ||
| 3681 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3682 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3683 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3684 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3685 | #else | ||
| 3686 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3687 | #endif | ||
| 3688 | |||
| 3689 | /* | ||
| 3690 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3691 | * | ||
| 3692 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3693 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3694 | */ | ||
| 3695 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3696 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3697 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3698 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3699 | #else | ||
| 3700 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3701 | #endif | ||
| 3702 | |||
| 3703 | /* | ||
| 3704 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3705 | * | ||
| 3706 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3707 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3708 | */ | ||
| 3709 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3710 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3711 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3712 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3713 | #else | ||
| 3714 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3715 | #endif | ||
| 3716 | |||
| 3717 | /* | ||
| 3718 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3719 | * | ||
| 3720 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3721 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3722 | */ | ||
| 3723 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3724 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3725 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3726 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3727 | #else | ||
| 3728 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3729 | #endif | ||
| 3730 | |||
| 3731 | /* | ||
| 3732 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3733 | * | ||
| 3734 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3735 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3736 | */ | ||
| 3737 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3738 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3739 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3740 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3741 | #else | ||
| 3742 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3743 | #endif | ||
| 3744 | |||
| 3745 | /* | ||
| 3746 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3747 | * | ||
| 3748 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3749 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3750 | */ | ||
| 3751 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3752 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3753 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3754 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3755 | #else | ||
| 3756 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3757 | #endif | ||
| 3758 | |||
| 3759 | /* | ||
| 3760 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3761 | * | ||
| 3762 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3763 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3764 | */ | ||
| 3765 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3766 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3767 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3768 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3769 | #else | ||
| 3770 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3771 | #endif | ||
| 3772 | |||
| 3773 | /* | ||
| 3774 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3775 | * | ||
| 3776 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3777 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3778 | */ | ||
| 3779 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3780 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3781 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3782 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3783 | #else | ||
| 3784 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3785 | #endif | ||
| 3786 | |||
| 3787 | /* | ||
| 3788 | * AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3789 | * | ||
| 3790 | * Used on declarations introduced in Mac OS X 10.13 | ||
| 3791 | */ | ||
| 3792 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3793 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_COMPAT_VERSION) | ||
| 3794 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 | ||
| 3795 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3796 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13 | ||
| 3797 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3798 | #else | ||
| 3799 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3800 | #endif | ||
| 3801 | |||
| 3802 | /* | ||
| 3803 | * AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3804 | * | ||
| 3805 | * Used on declarations introduced in Mac OS X 10.14 | ||
| 3806 | */ | ||
| 3807 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3808 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_14, __IPHONE_COMPAT_VERSION) | ||
| 3809 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_14 | ||
| 3810 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3811 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14 | ||
| 3812 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3813 | #else | ||
| 3814 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3815 | #endif | ||
| 3816 | |||
| 3817 | /* | ||
| 3818 | * AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3819 | * | ||
| 3820 | * Used on declarations introduced in Mac OS X 10.15 | ||
| 3821 | */ | ||
| 3822 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3823 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_15, __IPHONE_COMPAT_VERSION) | ||
| 3824 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15 | ||
| 3825 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3826 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15 | ||
| 3827 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3828 | #else | ||
| 3829 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3830 | #endif | ||
| 3831 | |||
| 3832 | /* | ||
| 3833 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3834 | * | ||
| 3835 | * Used on types deprecated in Mac OS X 10.1 | ||
| 3836 | */ | ||
| 3837 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3838 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3839 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 3840 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3841 | #else | ||
| 3842 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3843 | #endif | ||
| 3844 | |||
| 3845 | /* | ||
| 3846 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3847 | * | ||
| 3848 | * Used on types deprecated in Mac OS X 10.2 | ||
| 3849 | */ | ||
| 3850 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3851 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3852 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 3853 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3854 | #else | ||
| 3855 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3856 | #endif | ||
| 3857 | |||
| 3858 | /* | ||
| 3859 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3860 | * | ||
| 3861 | * Used on types deprecated in Mac OS X 10.3 | ||
| 3862 | */ | ||
| 3863 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3864 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3865 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 3866 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3867 | #else | ||
| 3868 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3869 | #endif | ||
| 3870 | |||
| 3871 | /* | ||
| 3872 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3873 | * | ||
| 3874 | * Used on types deprecated in Mac OS X 10.4 | ||
| 3875 | */ | ||
| 3876 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3877 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3878 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 3879 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3880 | #else | ||
| 3881 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3882 | #endif | ||
| 3883 | |||
| 3884 | |||
| 3885 | /* | ||
| 3886 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3887 | * | ||
| 3888 | * Used on types deprecated in Mac OS X 10.5 | ||
| 3889 | */ | ||
| 3890 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3891 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3892 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 3893 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3894 | #else | ||
| 3895 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3896 | #endif | ||
| 3897 | |||
| 3898 | /* | ||
| 3899 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3900 | * | ||
| 3901 | * Used on types deprecated in Mac OS X 10.6 | ||
| 3902 | */ | ||
| 3903 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3904 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3905 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 3906 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3907 | #else | ||
| 3908 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3909 | #endif | ||
| 3910 | |||
| 3911 | /* | ||
| 3912 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3913 | * | ||
| 3914 | * Used on types deprecated in Mac OS X 10.7 | ||
| 3915 | */ | ||
| 3916 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3917 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3918 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 3919 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3920 | #else | ||
| 3921 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3922 | #endif | ||
| 3923 | |||
| 3924 | /* | ||
| 3925 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3926 | * | ||
| 3927 | * Used on types deprecated in Mac OS X 10.8 | ||
| 3928 | */ | ||
| 3929 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3930 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3931 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 3932 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3933 | #else | ||
| 3934 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3935 | #endif | ||
| 3936 | |||
| 3937 | /* | ||
| 3938 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3939 | * | ||
| 3940 | * Used on types deprecated in Mac OS X 10.9 | ||
| 3941 | */ | ||
| 3942 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3943 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3944 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 3945 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3946 | #else | ||
| 3947 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3948 | #endif | ||
| 3949 | |||
| 3950 | /* | ||
| 3951 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3952 | * | ||
| 3953 | * Used on types deprecated in Mac OS X 10.10 | ||
| 3954 | */ | ||
| 3955 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3956 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3957 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 3958 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3959 | #else | ||
| 3960 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3961 | #endif | ||
| 3962 | |||
| 3963 | /* | ||
| 3964 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3965 | * | ||
| 3966 | * Used on types deprecated in Mac OS X 10.11 | ||
| 3967 | */ | ||
| 3968 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3969 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3970 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 3971 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3972 | #else | ||
| 3973 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3974 | #endif | ||
| 3975 | |||
| 3976 | /* | ||
| 3977 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3978 | * | ||
| 3979 | * Used on types deprecated in Mac OS X 10.12 | ||
| 3980 | */ | ||
| 3981 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3982 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3983 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3984 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3985 | #else | ||
| 3986 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3987 | #endif | ||
| 3988 | |||
| 3989 | /* | ||
| 3990 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3991 | * | ||
| 3992 | * Used on types deprecated in Mac OS X 10.13 | ||
| 3993 | */ | ||
| 3994 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3995 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3996 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3997 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3998 | #else | ||
| 3999 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 4000 | #endif | ||
| 4001 | |||
| 4002 | /* | ||
| 4003 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4004 | * | ||
| 4005 | * Used on types deprecated in Mac OS X 10.14.4 | ||
| 4006 | */ | ||
| 4007 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 4008 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_14_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 4009 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14_4 | ||
| 4010 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 4011 | #else | ||
| 4012 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4013 | #endif | ||
| 4014 | |||
| 4015 | #endif /* __AVAILABILITYMACROS__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/AvailabilityVersions.h+24| ... | @@ -60,6 +60,11 @@ | ... | @@ -60,6 +60,11 @@ |
| 60 | #define __MAC_11_0 110000 | 60 | #define __MAC_11_0 110000 |
| 61 | #define __MAC_11_1 110100 | 61 | #define __MAC_11_1 110100 |
| 62 | #define __MAC_11_3 110300 | 62 | #define __MAC_11_3 110300 |
| 63 | #define __MAC_11_4 110400 | ||
| 64 | #define __MAC_11_5 110500 | ||
| 65 | #define __MAC_11_6 110600 | ||
| 66 | #define __MAC_12_0 120000 | ||
| 67 | #define __MAC_12_1 120100 | ||
| 63 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ | 68 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 64 | 69 | ||
| 65 | #define __IPHONE_2_0 20000 | 70 | #define __IPHONE_2_0 20000 |
| ... | @@ -114,6 +119,12 @@ | ... | @@ -114,6 +119,12 @@ |
| 114 | #define __IPHONE_14_2 140200 | 119 | #define __IPHONE_14_2 140200 |
| 115 | #define __IPHONE_14_3 140300 | 120 | #define __IPHONE_14_3 140300 |
| 116 | #define __IPHONE_14_5 140500 | 121 | #define __IPHONE_14_5 140500 |
| 122 | #define __IPHONE_14_6 140600 | ||
| 123 | #define __IPHONE_14_7 140700 | ||
| 124 | #define __IPHONE_14_8 140800 | ||
| 125 | #define __IPHONE_15_0 150000 | ||
| 126 | #define __IPHONE_15_1 150100 | ||
| 127 | #define __IPHONE_15_2 150200 | ||
| 117 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ | 128 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 118 | 129 | ||
| 119 | #define __TVOS_9_0 90000 | 130 | #define __TVOS_9_0 90000 |
| ... | @@ -142,6 +153,11 @@ | ... | @@ -142,6 +153,11 @@ |
| 142 | #define __TVOS_14_2 140200 | 153 | #define __TVOS_14_2 140200 |
| 143 | #define __TVOS_14_3 140300 | 154 | #define __TVOS_14_3 140300 |
| 144 | #define __TVOS_14_5 140500 | 155 | #define __TVOS_14_5 140500 |
| 156 | #define __TVOS_14_6 140600 | ||
| 157 | #define __TVOS_14_7 140700 | ||
| 158 | #define __TVOS_15_0 150000 | ||
| 159 | #define __TVOS_15_1 150100 | ||
| 160 | #define __TVOS_15_2 150200 | ||
| 145 | 161 | ||
| 146 | #define __WATCHOS_1_0 10000 | 162 | #define __WATCHOS_1_0 10000 |
| 147 | #define __WATCHOS_2_0 20000 | 163 | #define __WATCHOS_2_0 20000 |
| ... | @@ -167,6 +183,12 @@ | ... | @@ -167,6 +183,12 @@ |
| 167 | #define __WATCHOS_7_2 70200 | 183 | #define __WATCHOS_7_2 70200 |
| 168 | #define __WATCHOS_7_3 70300 | 184 | #define __WATCHOS_7_3 70300 |
| 169 | #define __WATCHOS_7_4 70400 | 185 | #define __WATCHOS_7_4 70400 |
| 186 | #define __WATCHOS_7_5 70500 | ||
| 187 | #define __WATCHOS_7_6 70600 | ||
| 188 | #define __WATCHOS_8_0 80000 | ||
| 189 | #define __WATCHOS_8_1 80100 | ||
| 190 | #define __WATCHOS_8_3 80300 | ||
| 191 | |||
| 170 | 192 | ||
| 171 | /* | 193 | /* |
| 172 | * Set up standard Mac OS X versions | 194 | * Set up standard Mac OS X versions |
| ... | @@ -207,10 +229,12 @@ | ... | @@ -207,10 +229,12 @@ |
| 207 | #define MAC_OS_X_VERSION_10_15_1 101501 | 229 | #define MAC_OS_X_VERSION_10_15_1 101501 |
| 208 | #define MAC_OS_X_VERSION_10_16 101600 | 230 | #define MAC_OS_X_VERSION_10_16 101600 |
| 209 | #define MAC_OS_VERSION_11_0 110000 | 231 | #define MAC_OS_VERSION_11_0 110000 |
| 232 | #define MAC_OS_VERSION_12_0 120000 | ||
| 210 | 233 | ||
| 211 | #endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */ | 234 | #endif /* #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) */ |
| 212 | 235 | ||
| 213 | #define __DRIVERKIT_19_0 190000 | 236 | #define __DRIVERKIT_19_0 190000 |
| 214 | #define __DRIVERKIT_20_0 200000 | 237 | #define __DRIVERKIT_20_0 200000 |
| 238 | #define __DRIVERKIT_21_0 210000 | ||
| 215 | 239 | ||
| 216 | #endif /* __AVAILABILITY_VERSIONS__ */ | 240 | #endif /* __AVAILABILITY_VERSIONS__ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/TargetConditionals.h+10-2| ... | @@ -61,8 +61,10 @@ | ... | @@ -61,8 +61,10 @@ |
| 61 | * The IOS/TV/WATCH conditionals are mutually exclusive. | 61 | * The IOS/TV/WATCH conditionals are mutually exclusive. |
| 62 | * | 62 | * |
| 63 | * | 63 | * |
| 64 | * TARGET_OS_WIN32 - Generated code will run under 32-bit Windows | 64 | * TARGET_OS_WIN32 - Generated code will run under WIN32 API |
| 65 | * TARGET_OS_WINDOWS - Generated code will run under Windows | ||
| 65 | * TARGET_OS_UNIX - Generated code will run under some Unix (not OSX) | 66 | * TARGET_OS_UNIX - Generated code will run under some Unix (not OSX) |
| 67 | * TARGET_OS_LINUX - Generated code will run under Linux | ||
| 66 | * TARGET_OS_MAC - Generated code will run under Mac OS X variant | 68 | * TARGET_OS_MAC - Generated code will run under Mac OS X variant |
| 67 | * TARGET_OS_OSX - Generated code will run under OS X devices | 69 | * TARGET_OS_OSX - Generated code will run under OS X devices |
| 68 | * TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator | 70 | * TARGET_OS_IPHONE - Generated code for firmware, devices, or simulator |
| ... | @@ -178,7 +180,7 @@ | ... | @@ -178,7 +180,7 @@ |
| 178 | /* -target=x86_64-apple-driverkit19.0 */ | 180 | /* -target=x86_64-apple-driverkit19.0 */ |
| 179 | /* -target=arm64-apple-driverkit19.0 */ | 181 | /* -target=arm64-apple-driverkit19.0 */ |
| 180 | /* -target=arm64e-apple-driverkit19.0 */ | 182 | /* -target=arm64e-apple-driverkit19.0 */ |
| 181 | #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(driverkit) | 183 | #if __is_target_vendor(apple) && __is_target_os(driverkit) |
| 182 | #define TARGET_OS_OSX 0 | 184 | #define TARGET_OS_OSX 0 |
| 183 | #define TARGET_OS_IPHONE 0 | 185 | #define TARGET_OS_IPHONE 0 |
| 184 | #define TARGET_OS_IOS 0 | 186 | #define TARGET_OS_IOS 0 |
| ... | @@ -214,7 +216,9 @@ | ... | @@ -214,7 +216,9 @@ |
| 214 | #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) | 216 | #if defined(__GNUC__) && ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) || defined(__MACOS_CLASSIC__) ) |
| 215 | #define TARGET_OS_MAC 1 | 217 | #define TARGET_OS_MAC 1 |
| 216 | #define TARGET_OS_WIN32 0 | 218 | #define TARGET_OS_WIN32 0 |
| 219 | #define TARGET_OS_WINDOWS 0 | ||
| 217 | #define TARGET_OS_UNIX 0 | 220 | #define TARGET_OS_UNIX 0 |
| 221 | #define TARGET_OS_LINUX 0 | ||
| 218 | 222 | ||
| 219 | #if !DYNAMIC_TARGETS_ENABLED | 223 | #if !DYNAMIC_TARGETS_ENABLED |
| 220 | #define TARGET_OS_OSX 1 | 224 | #define TARGET_OS_OSX 1 |
| ... | @@ -355,7 +359,9 @@ | ... | @@ -355,7 +359,9 @@ |
| 355 | #elif defined(__MWERKS__) | 359 | #elif defined(__MWERKS__) |
| 356 | #define TARGET_OS_MAC 1 | 360 | #define TARGET_OS_MAC 1 |
| 357 | #define TARGET_OS_WIN32 0 | 361 | #define TARGET_OS_WIN32 0 |
| 362 | #define TARGET_OS_WINDOWS 0 | ||
| 358 | #define TARGET_OS_UNIX 0 | 363 | #define TARGET_OS_UNIX 0 |
| 364 | #define TARGET_OS_LINUX 0 | ||
| 359 | #define TARGET_OS_EMBEDDED 0 | 365 | #define TARGET_OS_EMBEDDED 0 |
| 360 | #if defined(__POWERPC__) | 366 | #if defined(__POWERPC__) |
| 361 | #define TARGET_CPU_PPC 1 | 367 | #define TARGET_CPU_PPC 1 |
| ... | @@ -481,7 +487,9 @@ | ... | @@ -481,7 +487,9 @@ |
| 481 | #endif | 487 | #endif |
| 482 | #define TARGET_OS_MAC 1 | 488 | #define TARGET_OS_MAC 1 |
| 483 | #define TARGET_OS_WIN32 0 | 489 | #define TARGET_OS_WIN32 0 |
| 490 | #define TARGET_OS_WINDOWS 0 | ||
| 484 | #define TARGET_OS_UNIX 0 | 491 | #define TARGET_OS_UNIX 0 |
| 492 | #define TARGET_OS_LINUX 0 | ||
| 485 | #define TARGET_OS_EMBEDDED 0 | 493 | #define TARGET_OS_EMBEDDED 0 |
| 486 | #if TARGET_CPU_PPC || TARGET_CPU_PPC64 | 494 | #if TARGET_CPU_PPC || TARGET_CPU_PPC64 |
| 487 | #define TARGET_RT_BIG_ENDIAN 1 | 495 | #define TARGET_RT_BIG_ENDIAN 1 |
lib/libc/include/any-macos.11-any/dispatch/queue.h+2-2| ... | @@ -480,7 +480,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NOTHROW | ... | @@ -480,7 +480,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL3 DISPATCH_NOTHROW |
| 480 | void | 480 | void |
| 481 | dispatch_apply(size_t iterations, | 481 | dispatch_apply(size_t iterations, |
| 482 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, | 482 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, |
| 483 | 		DISPATCH_NOESCAPE void (^block)(size_t)); | 483 | 		DISPATCH_NOESCAPE void (^block)(size_t iteration)); |
| 484 | #endif | 484 | #endif |
| 485 | 485 | ||
| 486 | /*! | 486 | /*! |
| ... | @@ -515,7 +515,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL4 DISPATCH_NOTHROW | ... | @@ -515,7 +515,7 @@ DISPATCH_EXPORT DISPATCH_NONNULL4 DISPATCH_NOTHROW |
| 515 | void | 515 | void |
| 516 | dispatch_apply_f(size_t iterations, | 516 | dispatch_apply_f(size_t iterations, |
| 517 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, | 517 | 		dispatch_queue_t DISPATCH_APPLY_QUEUE_ARG_NULLABILITY queue, |
| 518 | 		void *_Nullable context, void (*work)(void *_Nullable, size_t)); | 518 | 		void *_Nullable context, void (*work)(void *_Nullable context, size_t iteration)); |
| 519 | 519 | ||
| 520 | /*! | 520 | /*! |
| 521 | * @function dispatch_get_current_queue | 521 | * @function dispatch_get_current_queue |
lib/libc/include/any-macos.11-any/mach-o/loader.h+4| ... | @@ -1274,6 +1274,8 @@ struct build_tool_version { | ... | @@ -1274,6 +1274,8 @@ struct build_tool_version { |
| 1274 | #define PLATFORM_WATCHOSSIMULATOR 9 | 1274 | #define PLATFORM_WATCHOSSIMULATOR 9 |
| 1275 | #define PLATFORM_DRIVERKIT 10 | 1275 | #define PLATFORM_DRIVERKIT 10 |
| 1276 | 1276 | ||
| 1277 | |||
| 1278 | |||
| 1277 | /* Known values for the tool field above. */ | 1279 | /* Known values for the tool field above. */ |
| 1278 | #define TOOL_CLANG 1 | 1280 | #define TOOL_CLANG 1 |
| 1279 | #define TOOL_SWIFT 2 | 1281 | #define TOOL_SWIFT 2 |
| ... | @@ -1456,6 +1458,8 @@ struct dyld_info_command { | ... | @@ -1456,6 +1458,8 @@ struct dyld_info_command { |
| 1456 | #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION			0x04 | 1458 | #define EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION			0x04 |
| 1457 | #define EXPORT_SYMBOL_FLAGS_REEXPORT				0x08 | 1459 | #define EXPORT_SYMBOL_FLAGS_REEXPORT				0x08 |
| 1458 | #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER			0x10 | 1460 | #define EXPORT_SYMBOL_FLAGS_STUB_AND_RESOLVER			0x10 |
| 1461 | #define EXPORT_SYMBOL_FLAGS_STATIC_RESOLVER			0x20 | ||
| 1462 | |||
| 1459 | 1463 | ||
| 1460 | /* | 1464 | /* |
| 1461 | * The linker_option_command contains linker options embedded in object files. | 1465 | * The linker_option_command contains linker options embedded in object files. |
lib/libc/include/any-macos.11-any/mach/exception_types.h deleted-206| ... | @@ -1,206 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef _MACH_EXCEPTION_TYPES_H_ | ||
| 60 | #define _MACH_EXCEPTION_TYPES_H_ | ||
| 61 | |||
| 62 | #include <mach/machine/exception.h> | ||
| 63 | |||
| 64 | /* | ||
| 65 | *	Machine-independent exception definitions. | ||
| 66 | */ | ||
| 67 | |||
| 68 | #define EXC_BAD_ACCESS 1 /* Could not access memory */ | ||
| 69 | /* Code contains kern_return_t describing error. */ | ||
| 70 | /* Subcode contains bad memory address. */ | ||
| 71 | |||
| 72 | #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ | ||
| 73 | /* Illegal or undefined instruction or operand */ | ||
| 74 | |||
| 75 | #define EXC_ARITHMETIC 3 /* Arithmetic exception */ | ||
| 76 | /* Exact nature of exception is in code field */ | ||
| 77 | |||
| 78 | #define EXC_EMULATION 4 /* Emulation instruction */ | ||
| 79 | /* Emulation support instruction encountered */ | ||
| 80 | /* Details in code and subcode fields	*/ | ||
| 81 | |||
| 82 | #define EXC_SOFTWARE 5 /* Software generated exception */ | ||
| 83 | /* Exact exception is in code field. */ | ||
| 84 | /* Codes 0 - 0xFFFF reserved to hardware */ | ||
| 85 | /* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */ | ||
| 86 | |||
| 87 | #define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */ | ||
| 88 | /* Details in code field. */ | ||
| 89 | |||
| 90 | #define EXC_SYSCALL 7 /* System calls. */ | ||
| 91 | |||
| 92 | #define EXC_MACH_SYSCALL 8 /* Mach system calls. */ | ||
| 93 | |||
| 94 | #define EXC_RPC_ALERT 9 /* RPC alert */ | ||
| 95 | |||
| 96 | #define EXC_CRASH 10 /* Abnormal process exit */ | ||
| 97 | |||
| 98 | #define EXC_RESOURCE 11 /* Hit resource consumption limit */ | ||
| 99 | /* Exact resource is in code field. */ | ||
| 100 | |||
| 101 | #define EXC_GUARD 12 /* Violated guarded resource protections */ | ||
| 102 | |||
| 103 | #define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */ | ||
| 104 | |||
| 105 | #define EXC_CORPSE_VARIANT_BIT 0x100 /* bit set for EXC_*_CORPSE variants of EXC_* */ | ||
| 106 | |||
| 107 | |||
| 108 | /* | ||
| 109 | *	Machine-independent exception behaviors | ||
| 110 | */ | ||
| 111 | |||
| 112 | # define EXCEPTION_DEFAULT 1 | ||
| 113 | /*	Send a catch_exception_raise message including the identity. | ||
| 114 | */ | ||
| 115 | |||
| 116 | # define EXCEPTION_STATE 2 | ||
| 117 | /*	Send a catch_exception_raise_state message including the | ||
| 118 | *	thread state. | ||
| 119 | */ | ||
| 120 | |||
| 121 | # define EXCEPTION_STATE_IDENTITY 3 | ||
| 122 | /*	Send a catch_exception_raise_state_identity message including | ||
| 123 | *	the thread identity and state. | ||
| 124 | */ | ||
| 125 | |||
| 126 | #define MACH_EXCEPTION_ERRORS 0x40000000 | ||
| 127 | /*	include additional exception specific errors, not used yet. */ | ||
| 128 | |||
| 129 | #define MACH_EXCEPTION_CODES 0x80000000 | ||
| 130 | /*	Send 64-bit code and subcode in the exception header */ | ||
| 131 | |||
| 132 | #define MACH_EXCEPTION_MASK (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS) | ||
| 133 | /* | ||
| 134 | * Masks for exception definitions, above | ||
| 135 | * bit zero is unused, therefore 1 word = 31 exception types | ||
| 136 | */ | ||
| 137 | |||
| 138 | #define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS) | ||
| 139 | #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) | ||
| 140 | #define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC) | ||
| 141 | #define EXC_MASK_EMULATION (1 << EXC_EMULATION) | ||
| 142 | #define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE) | ||
| 143 | #define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT) | ||
| 144 | #define EXC_MASK_SYSCALL (1 << EXC_SYSCALL) | ||
| 145 | #define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL) | ||
| 146 | #define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT) | ||
| 147 | #define EXC_MASK_CRASH (1 << EXC_CRASH) | ||
| 148 | #define EXC_MASK_RESOURCE (1 << EXC_RESOURCE) | ||
| 149 | #define EXC_MASK_GUARD (1 << EXC_GUARD) | ||
| 150 | #define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY) | ||
| 151 | |||
| 152 | #define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ | ||
| 153 | 	 EXC_MASK_BAD_INSTRUCTION | \ | ||
| 154 | 	 EXC_MASK_ARITHMETIC | \ | ||
| 155 | 	 EXC_MASK_EMULATION | \ | ||
| 156 | 	 EXC_MASK_SOFTWARE | \ | ||
| 157 | 	 EXC_MASK_BREAKPOINT | \ | ||
| 158 | 	 EXC_MASK_SYSCALL | \ | ||
| 159 | 	 EXC_MASK_MACH_SYSCALL | \ | ||
| 160 | 	 EXC_MASK_RPC_ALERT | \ | ||
| 161 | 	 EXC_MASK_RESOURCE | \ | ||
| 162 | 	 EXC_MASK_GUARD | \ | ||
| 163 | 	 EXC_MASK_MACHINE) | ||
| 164 | |||
| 165 | |||
| 166 | #define FIRST_EXCEPTION 1 /* ZERO is illegal */ | ||
| 167 | |||
| 168 | /* | ||
| 169 | * Machine independent codes for EXC_SOFTWARE | ||
| 170 | * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) | ||
| 171 | * 0x10000 - 0x10002 in use for unix signals | ||
| 172 | * 0x20000 - 0x2FFFF reserved for MACF | ||
| 173 | */ | ||
| 174 | #define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */ | ||
| 175 | |||
| 176 | #define EXC_MACF_MIN 0x20000 /* MACF exceptions */ | ||
| 177 | #define EXC_MACF_MAX 0x2FFFF | ||
| 178 | |||
| 179 | #ifndef ASSEMBLER | ||
| 180 | |||
| 181 | #include <mach/port.h> | ||
| 182 | #include <mach/thread_status.h> | ||
| 183 | #include <mach/machine/vm_types.h> | ||
| 184 | #include <mach_debug/ipc_info.h> | ||
| 185 | /* | ||
| 186 | * Exported types | ||
| 187 | */ | ||
| 188 | |||
| 189 | typedef int exception_type_t; | ||
| 190 | typedef integer_t exception_data_type_t; | ||
| 191 | typedef int64_t mach_exception_data_type_t; | ||
| 192 | typedef int exception_behavior_t; | ||
| 193 | typedef exception_data_type_t *exception_data_t; | ||
| 194 | typedef mach_exception_data_type_t *mach_exception_data_t; | ||
| 195 | typedef unsigned int exception_mask_t; | ||
| 196 | typedef exception_mask_t *exception_mask_array_t; | ||
| 197 | typedef exception_behavior_t *exception_behavior_array_t; | ||
| 198 | typedef thread_state_flavor_t *exception_flavor_array_t; | ||
| 199 | typedef mach_port_t *exception_port_array_t; | ||
| 200 | typedef ipc_info_port_t *exception_port_info_array_t; | ||
| 201 | typedef mach_exception_data_type_t mach_exception_code_t; | ||
| 202 | typedef mach_exception_data_type_t mach_exception_subcode_t; | ||
| 203 | |||
| 204 | #endif /* ASSEMBLER */ | ||
| 205 | |||
| 206 | #endif /* _MACH_EXCEPTION_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/kern_return.h deleted-342| ... | @@ -1,342 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	h/kern_return.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr. | ||
| 61 | *	Date:	1985 | ||
| 62 | * | ||
| 63 | *	Kernel return codes. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_KERN_RETURN_H_ | ||
| 68 | #define _MACH_KERN_RETURN_H_ | ||
| 69 | |||
| 70 | #include <mach/machine/kern_return.h> | ||
| 71 | |||
| 72 | #define KERN_SUCCESS 0 | ||
| 73 | |||
| 74 | #define KERN_INVALID_ADDRESS 1 | ||
| 75 | /* Specified address is not currently valid. | ||
| 76 | */ | ||
| 77 | |||
| 78 | #define KERN_PROTECTION_FAILURE 2 | ||
| 79 | /* Specified memory is valid, but does not permit the | ||
| 80 | * required forms of access. | ||
| 81 | */ | ||
| 82 | |||
| 83 | #define KERN_NO_SPACE 3 | ||
| 84 | /* The address range specified is already in use, or | ||
| 85 | * no address range of the size specified could be | ||
| 86 | * found. | ||
| 87 | */ | ||
| 88 | |||
| 89 | #define KERN_INVALID_ARGUMENT 4 | ||
| 90 | /* The function requested was not applicable to this | ||
| 91 | * type of argument, or an argument is invalid | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define KERN_FAILURE 5 | ||
| 95 | /* The function could not be performed. A catch-all. | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define KERN_RESOURCE_SHORTAGE 6 | ||
| 99 | /* A system resource could not be allocated to fulfill | ||
| 100 | * this request. This failure may not be permanent. | ||
| 101 | */ | ||
| 102 | |||
| 103 | #define KERN_NOT_RECEIVER 7 | ||
| 104 | /* The task in question does not hold receive rights | ||
| 105 | * for the port argument. | ||
| 106 | */ | ||
| 107 | |||
| 108 | #define KERN_NO_ACCESS 8 | ||
| 109 | /* Bogus access restriction. | ||
| 110 | */ | ||
| 111 | |||
| 112 | #define KERN_MEMORY_FAILURE 9 | ||
| 113 | /* During a page fault, the target address refers to a | ||
| 114 | * memory object that has been destroyed. This | ||
| 115 | * failure is permanent. | ||
| 116 | */ | ||
| 117 | |||
| 118 | #define KERN_MEMORY_ERROR 10 | ||
| 119 | /* During a page fault, the memory object indicated | ||
| 120 | * that the data could not be returned. This failure | ||
| 121 | * may be temporary; future attempts to access this | ||
| 122 | * same data may succeed, as defined by the memory | ||
| 123 | * object. | ||
| 124 | */ | ||
| 125 | |||
| 126 | #define KERN_ALREADY_IN_SET 11 | ||
| 127 | /* The receive right is already a member of the portset. | ||
| 128 | */ | ||
| 129 | |||
| 130 | #define KERN_NOT_IN_SET 12 | ||
| 131 | /* The receive right is not a member of a port set. | ||
| 132 | */ | ||
| 133 | |||
| 134 | #define KERN_NAME_EXISTS 13 | ||
| 135 | /* The name already denotes a right in the task. | ||
| 136 | */ | ||
| 137 | |||
| 138 | #define KERN_ABORTED 14 | ||
| 139 | /* The operation was aborted. Ipc code will | ||
| 140 | * catch this and reflect it as a message error. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define KERN_INVALID_NAME 15 | ||
| 144 | /* The name doesn't denote a right in the task. | ||
| 145 | */ | ||
| 146 | |||
| 147 | #define KERN_INVALID_TASK 16 | ||
| 148 | /* Target task isn't an active task. | ||
| 149 | */ | ||
| 150 | |||
| 151 | #define KERN_INVALID_RIGHT 17 | ||
| 152 | /* The name denotes a right, but not an appropriate right. | ||
| 153 | */ | ||
| 154 | |||
| 155 | #define KERN_INVALID_VALUE 18 | ||
| 156 | /* A blatant range error. | ||
| 157 | */ | ||
| 158 | |||
| 159 | #define KERN_UREFS_OVERFLOW 19 | ||
| 160 | /* Operation would overflow limit on user-references. | ||
| 161 | */ | ||
| 162 | |||
| 163 | #define KERN_INVALID_CAPABILITY 20 | ||
| 164 | /* The supplied (port) capability is improper. | ||
| 165 | */ | ||
| 166 | |||
| 167 | #define KERN_RIGHT_EXISTS 21 | ||
| 168 | /* The task already has send or receive rights | ||
| 169 | * for the port under another name. | ||
| 170 | */ | ||
| 171 | |||
| 172 | #define KERN_INVALID_HOST 22 | ||
| 173 | /* Target host isn't actually a host. | ||
| 174 | */ | ||
| 175 | |||
| 176 | #define KERN_MEMORY_PRESENT 23 | ||
| 177 | /* An attempt was made to supply "precious" data | ||
| 178 | * for memory that is already present in a | ||
| 179 | * memory object. | ||
| 180 | */ | ||
| 181 | |||
| 182 | #define KERN_MEMORY_DATA_MOVED 24 | ||
| 183 | /* A page was requested of a memory manager via | ||
| 184 | * memory_object_data_request for an object using | ||
| 185 | * a MEMORY_OBJECT_COPY_CALL strategy, with the | ||
| 186 | * VM_PROT_WANTS_COPY flag being used to specify | ||
| 187 | * that the page desired is for a copy of the | ||
| 188 | * object, and the memory manager has detected | ||
| 189 | * the page was pushed into a copy of the object | ||
| 190 | * while the kernel was walking the shadow chain | ||
| 191 | * from the copy to the object. This error code | ||
| 192 | * is delivered via memory_object_data_error | ||
| 193 | * and is handled by the kernel (it forces the | ||
| 194 | * kernel to restart the fault). It will not be | ||
| 195 | * seen by users. | ||
| 196 | */ | ||
| 197 | |||
| 198 | #define KERN_MEMORY_RESTART_COPY 25 | ||
| 199 | /* A strategic copy was attempted of an object | ||
| 200 | * upon which a quicker copy is now possible. | ||
| 201 | * The caller should retry the copy using | ||
| 202 | * vm_object_copy_quickly. This error code | ||
| 203 | * is seen only by the kernel. | ||
| 204 | */ | ||
| 205 | |||
| 206 | #define KERN_INVALID_PROCESSOR_SET 26 | ||
| 207 | /* An argument applied to assert processor set privilege | ||
| 208 | * was not a processor set control port. | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define KERN_POLICY_LIMIT 27 | ||
| 212 | /* The specified scheduling attributes exceed the thread's | ||
| 213 | * limits. | ||
| 214 | */ | ||
| 215 | |||
| 216 | #define KERN_INVALID_POLICY 28 | ||
| 217 | /* The specified scheduling policy is not currently | ||
| 218 | * enabled for the processor set. | ||
| 219 | */ | ||
| 220 | |||
| 221 | #define KERN_INVALID_OBJECT 29 | ||
| 222 | /* The external memory manager failed to initialize the | ||
| 223 | * memory object. | ||
| 224 | */ | ||
| 225 | |||
| 226 | #define KERN_ALREADY_WAITING 30 | ||
| 227 | /* A thread is attempting to wait for an event for which | ||
| 228 | * there is already a waiting thread. | ||
| 229 | */ | ||
| 230 | |||
| 231 | #define KERN_DEFAULT_SET 31 | ||
| 232 | /* An attempt was made to destroy the default processor | ||
| 233 | * set. | ||
| 234 | */ | ||
| 235 | |||
| 236 | #define KERN_EXCEPTION_PROTECTED 32 | ||
| 237 | /* An attempt was made to fetch an exception port that is | ||
| 238 | * protected, or to abort a thread while processing a | ||
| 239 | * protected exception. | ||
| 240 | */ | ||
| 241 | |||
| 242 | #define KERN_INVALID_LEDGER 33 | ||
| 243 | /* A ledger was required but not supplied. | ||
| 244 | */ | ||
| 245 | |||
| 246 | #define KERN_INVALID_MEMORY_CONTROL 34 | ||
| 247 | /* The port was not a memory cache control port. | ||
| 248 | */ | ||
| 249 | |||
| 250 | #define KERN_INVALID_SECURITY 35 | ||
| 251 | /* An argument supplied to assert security privilege | ||
| 252 | * was not a host security port. | ||
| 253 | */ | ||
| 254 | |||
| 255 | #define KERN_NOT_DEPRESSED 36 | ||
| 256 | /* thread_depress_abort was called on a thread which | ||
| 257 | * was not currently depressed. | ||
| 258 | */ | ||
| 259 | |||
| 260 | #define KERN_TERMINATED 37 | ||
| 261 | /* Object has been terminated and is no longer available | ||
| 262 | */ | ||
| 263 | |||
| 264 | #define KERN_LOCK_SET_DESTROYED 38 | ||
| 265 | /* Lock set has been destroyed and is no longer available. | ||
| 266 | */ | ||
| 267 | |||
| 268 | #define KERN_LOCK_UNSTABLE 39 | ||
| 269 | /* The thread holding the lock terminated before releasing | ||
| 270 | * the lock | ||
| 271 | */ | ||
| 272 | |||
| 273 | #define KERN_LOCK_OWNED 40 | ||
| 274 | /* The lock is already owned by another thread | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define KERN_LOCK_OWNED_SELF 41 | ||
| 278 | /* The lock is already owned by the calling thread | ||
| 279 | */ | ||
| 280 | |||
| 281 | #define KERN_SEMAPHORE_DESTROYED 42 | ||
| 282 | /* Semaphore has been destroyed and is no longer available. | ||
| 283 | */ | ||
| 284 | |||
| 285 | #define KERN_RPC_SERVER_TERMINATED 43 | ||
| 286 | /* Return from RPC indicating the target server was | ||
| 287 | * terminated before it successfully replied | ||
| 288 | */ | ||
| 289 | |||
| 290 | #define KERN_RPC_TERMINATE_ORPHAN 44 | ||
| 291 | /* Terminate an orphaned activation. | ||
| 292 | */ | ||
| 293 | |||
| 294 | #define KERN_RPC_CONTINUE_ORPHAN 45 | ||
| 295 | /* Allow an orphaned activation to continue executing. | ||
| 296 | */ | ||
| 297 | |||
| 298 | #define KERN_NOT_SUPPORTED 46 | ||
| 299 | /* Empty thread activation (No thread linked to it) | ||
| 300 | */ | ||
| 301 | |||
| 302 | #define KERN_NODE_DOWN 47 | ||
| 303 | /* Remote node down or inaccessible. | ||
| 304 | */ | ||
| 305 | |||
| 306 | #define KERN_NOT_WAITING 48 | ||
| 307 | /* A signalled thread was not actually waiting. */ | ||
| 308 | |||
| 309 | #define KERN_OPERATION_TIMED_OUT 49 | ||
| 310 | /* Some thread-oriented operation (semaphore_wait) timed out | ||
| 311 | */ | ||
| 312 | |||
| 313 | #define KERN_CODESIGN_ERROR 50 | ||
| 314 | /* During a page fault, indicates that the page was rejected | ||
| 315 | * as a result of a signature check. | ||
| 316 | */ | ||
| 317 | |||
| 318 | #define KERN_POLICY_STATIC 51 | ||
| 319 | /* The requested property cannot be changed at this time. | ||
| 320 | */ | ||
| 321 | |||
| 322 | #define KERN_INSUFFICIENT_BUFFER_SIZE 52 | ||
| 323 | /* The provided buffer is of insufficient size for the requested data. | ||
| 324 | */ | ||
| 325 | |||
| 326 | #define KERN_DENIED 53 | ||
| 327 | /* Denied by security policy | ||
| 328 | */ | ||
| 329 | |||
| 330 | #define KERN_MISSING_KC 54 | ||
| 331 | /* The KC on which the function is operating is missing | ||
| 332 | */ | ||
| 333 | |||
| 334 | #define KERN_INVALID_KC 55 | ||
| 335 | /* The KC on which the function is operating is invalid | ||
| 336 | */ | ||
| 337 | |||
| 338 | #define KERN_RETURN_MAX 0x100 | ||
| 339 | /* Maximum return value allowable | ||
| 340 | */ | ||
| 341 | |||
| 342 | #endif /* _MACH_KERN_RETURN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/mach_init.h created+114| ... | @@ -0,0 +1,114 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Mach Operating System | ||
| 30 | * Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University | ||
| 31 | * All Rights Reserved. | ||
| 32 | * | ||
| 33 | * Permission to use, copy, modify and distribute this software and its | ||
| 34 | * documentation is hereby granted, provided that both the copyright | ||
| 35 | * notice and this permission notice appear in all copies of the | ||
| 36 | * software, derivative works or modified versions, and any portions | ||
| 37 | * thereof, and that both notices appear in supporting documentation. | ||
| 38 | * | ||
| 39 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 40 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 41 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | * Carnegie Mellon requests users of this software to return to | ||
| 44 | * | ||
| 45 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 46 | * School of Computer Science | ||
| 47 | * Carnegie Mellon University | ||
| 48 | * Pittsburgh PA 15213-3890 | ||
| 49 | * | ||
| 50 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 51 | * the rights to redistribute these changes. | ||
| 52 | */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | *	Items provided by the Mach environment initialization. | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _MACH_INIT_ | ||
| 59 | #define _MACH_INIT_ 1 | ||
| 60 | |||
| 61 | #include <mach/mach_types.h> | ||
| 62 | #include <mach/vm_page_size.h> | ||
| 63 | #include <stdarg.h> | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | |||
| 67 | #include <Availability.h> | ||
| 68 | |||
| 69 | /* | ||
| 70 | *	Kernel-related ports; how a task/thread controls itself | ||
| 71 | */ | ||
| 72 | |||
| 73 | __BEGIN_DECLS | ||
| 74 | extern mach_port_t mach_host_self(void); | ||
| 75 | extern mach_port_t mach_thread_self(void); | ||
| 76 | __API_AVAILABLE(macos(11.3), ios(14.5), tvos(14.5), watchos(7.3)) | ||
| 77 | extern boolean_t mach_task_is_self(task_name_t task); | ||
| 78 | extern kern_return_t host_page_size(host_t, vm_size_t *); | ||
| 79 | |||
| 80 | extern mach_port_t mach_task_self_; | ||
| 81 | #define mach_task_self() mach_task_self_ | ||
| 82 | #define current_task() mach_task_self() | ||
| 83 | |||
| 84 | __END_DECLS | ||
| 85 | #include <mach/mach_traps.h> | ||
| 86 | __BEGIN_DECLS | ||
| 87 | |||
| 88 | /* | ||
| 89 | *	Other important ports in the Mach user environment | ||
| 90 | */ | ||
| 91 | |||
| 92 | extern mach_port_t bootstrap_port; | ||
| 93 | |||
| 94 | /* | ||
| 95 | *	Where these ports occur in the "mach_ports_register" | ||
| 96 | *	collection... only servers or the runtime library need know. | ||
| 97 | */ | ||
| 98 | |||
| 99 | #define NAME_SERVER_SLOT 0 | ||
| 100 | #define ENVIRONMENT_SLOT 1 | ||
| 101 | #define SERVICE_SLOT 2 | ||
| 102 | |||
| 103 | #define MACH_PORTS_SLOTS_USED 3 | ||
| 104 | |||
| 105 | /* | ||
| 106 | *	fprintf_stderr uses vprintf_stderr_func to produce | ||
| 107 | *	error messages, this can be overridden by a user | ||
| 108 | *	application to point to a user-specified output function | ||
| 109 | */ | ||
| 110 | extern int (*vprintf_stderr_func)(const char *format, va_list ap); | ||
| 111 | |||
| 112 | __END_DECLS | ||
| 113 | |||
| 114 | #endif /* _MACH_INIT_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/mach_port.h deleted-1808| ... | @@ -1,1808 +0,0 @@ | ||
| 1 | #ifndef	_mach_port_user_ | ||
| 2 | #define	_mach_port_user_ | ||
| 3 | |||
| 4 | /* Module mach_port */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	mach_port_MSG_COUNT | ||
| 52 | #define	mach_port_MSG_COUNT	40 | ||
| 53 | #endif	/* mach_port_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach_debug/mach_debug_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine mach_port_names */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t mach_port_names | ||
| 76 | ( | ||
| 77 | 	ipc_space_t task, | ||
| 78 | 	mach_port_name_array_t *names, | ||
| 79 | 	mach_msg_type_number_t *namesCnt, | ||
| 80 | 	mach_port_type_array_t *types, | ||
| 81 | 	mach_msg_type_number_t *typesCnt | ||
| 82 | ); | ||
| 83 | |||
| 84 | /* Routine mach_port_type */ | ||
| 85 | #ifdef	mig_external | ||
| 86 | mig_external | ||
| 87 | #else | ||
| 88 | extern | ||
| 89 | #endif	/* mig_external */ | ||
| 90 | kern_return_t mach_port_type | ||
| 91 | ( | ||
| 92 | 	ipc_space_t task, | ||
| 93 | 	mach_port_name_t name, | ||
| 94 | 	mach_port_type_t *ptype | ||
| 95 | ); | ||
| 96 | |||
| 97 | /* Routine mach_port_rename */ | ||
| 98 | #ifdef	mig_external | ||
| 99 | mig_external | ||
| 100 | #else | ||
| 101 | extern | ||
| 102 | #endif	/* mig_external */ | ||
| 103 | kern_return_t mach_port_rename | ||
| 104 | ( | ||
| 105 | 	ipc_space_t task, | ||
| 106 | 	mach_port_name_t old_name, | ||
| 107 | 	mach_port_name_t new_name | ||
| 108 | ); | ||
| 109 | |||
| 110 | /* Routine mach_port_allocate_name */ | ||
| 111 | #ifdef	mig_external | ||
| 112 | mig_external | ||
| 113 | #else | ||
| 114 | extern | ||
| 115 | #endif	/* mig_external */ | ||
| 116 | __WATCHOS_PROHIBITED | ||
| 117 | __TVOS_PROHIBITED | ||
| 118 | kern_return_t mach_port_allocate_name | ||
| 119 | ( | ||
| 120 | 	ipc_space_t task, | ||
| 121 | 	mach_port_right_t right, | ||
| 122 | 	mach_port_name_t name | ||
| 123 | ); | ||
| 124 | |||
| 125 | /* Routine mach_port_allocate */ | ||
| 126 | #ifdef	mig_external | ||
| 127 | mig_external | ||
| 128 | #else | ||
| 129 | extern | ||
| 130 | #endif	/* mig_external */ | ||
| 131 | kern_return_t mach_port_allocate | ||
| 132 | ( | ||
| 133 | 	ipc_space_t task, | ||
| 134 | 	mach_port_right_t right, | ||
| 135 | 	mach_port_name_t *name | ||
| 136 | ); | ||
| 137 | |||
| 138 | /* Routine mach_port_destroy */ | ||
| 139 | #ifdef	mig_external | ||
| 140 | mig_external | ||
| 141 | #else | ||
| 142 | extern | ||
| 143 | #endif	/* mig_external */ | ||
| 144 | kern_return_t mach_port_destroy | ||
| 145 | ( | ||
| 146 | 	ipc_space_t task, | ||
| 147 | 	mach_port_name_t name | ||
| 148 | ); | ||
| 149 | |||
| 150 | /* Routine mach_port_deallocate */ | ||
| 151 | #ifdef	mig_external | ||
| 152 | mig_external | ||
| 153 | #else | ||
| 154 | extern | ||
| 155 | #endif	/* mig_external */ | ||
| 156 | kern_return_t mach_port_deallocate | ||
| 157 | ( | ||
| 158 | 	ipc_space_t task, | ||
| 159 | 	mach_port_name_t name | ||
| 160 | ); | ||
| 161 | |||
| 162 | /* Routine mach_port_get_refs */ | ||
| 163 | #ifdef	mig_external | ||
| 164 | mig_external | ||
| 165 | #else | ||
| 166 | extern | ||
| 167 | #endif	/* mig_external */ | ||
| 168 | kern_return_t mach_port_get_refs | ||
| 169 | ( | ||
| 170 | 	ipc_space_t task, | ||
| 171 | 	mach_port_name_t name, | ||
| 172 | 	mach_port_right_t right, | ||
| 173 | 	mach_port_urefs_t *refs | ||
| 174 | ); | ||
| 175 | |||
| 176 | /* Routine mach_port_mod_refs */ | ||
| 177 | #ifdef	mig_external | ||
| 178 | mig_external | ||
| 179 | #else | ||
| 180 | extern | ||
| 181 | #endif	/* mig_external */ | ||
| 182 | kern_return_t mach_port_mod_refs | ||
| 183 | ( | ||
| 184 | 	ipc_space_t task, | ||
| 185 | 	mach_port_name_t name, | ||
| 186 | 	mach_port_right_t right, | ||
| 187 | 	mach_port_delta_t delta | ||
| 188 | ); | ||
| 189 | |||
| 190 | /* Routine mach_port_peek */ | ||
| 191 | #ifdef	mig_external | ||
| 192 | mig_external | ||
| 193 | #else | ||
| 194 | extern | ||
| 195 | #endif	/* mig_external */ | ||
| 196 | kern_return_t mach_port_peek | ||
| 197 | ( | ||
| 198 | 	ipc_space_t task, | ||
| 199 | 	mach_port_name_t name, | ||
| 200 | 	mach_msg_trailer_type_t trailer_type, | ||
| 201 | 	mach_port_seqno_t *request_seqnop, | ||
| 202 | 	mach_msg_size_t *msg_sizep, | ||
| 203 | 	mach_msg_id_t *msg_idp, | ||
| 204 | 	mach_msg_trailer_info_t trailer_infop, | ||
| 205 | 	mach_msg_type_number_t *trailer_infopCnt | ||
| 206 | ); | ||
| 207 | |||
| 208 | /* Routine mach_port_set_mscount */ | ||
| 209 | #ifdef	mig_external | ||
| 210 | mig_external | ||
| 211 | #else | ||
| 212 | extern | ||
| 213 | #endif	/* mig_external */ | ||
| 214 | kern_return_t mach_port_set_mscount | ||
| 215 | ( | ||
| 216 | 	ipc_space_t task, | ||
| 217 | 	mach_port_name_t name, | ||
| 218 | 	mach_port_mscount_t mscount | ||
| 219 | ); | ||
| 220 | |||
| 221 | /* Routine mach_port_get_set_status */ | ||
| 222 | #ifdef	mig_external | ||
| 223 | mig_external | ||
| 224 | #else | ||
| 225 | extern | ||
| 226 | #endif	/* mig_external */ | ||
| 227 | kern_return_t mach_port_get_set_status | ||
| 228 | ( | ||
| 229 | 	ipc_space_read_t task, | ||
| 230 | 	mach_port_name_t name, | ||
| 231 | 	mach_port_name_array_t *members, | ||
| 232 | 	mach_msg_type_number_t *membersCnt | ||
| 233 | ); | ||
| 234 | |||
| 235 | /* Routine mach_port_move_member */ | ||
| 236 | #ifdef	mig_external | ||
| 237 | mig_external | ||
| 238 | #else | ||
| 239 | extern | ||
| 240 | #endif	/* mig_external */ | ||
| 241 | kern_return_t mach_port_move_member | ||
| 242 | ( | ||
| 243 | 	ipc_space_t task, | ||
| 244 | 	mach_port_name_t member, | ||
| 245 | 	mach_port_name_t after | ||
| 246 | ); | ||
| 247 | |||
| 248 | /* Routine mach_port_request_notification */ | ||
| 249 | #ifdef	mig_external | ||
| 250 | mig_external | ||
| 251 | #else | ||
| 252 | extern | ||
| 253 | #endif	/* mig_external */ | ||
| 254 | kern_return_t mach_port_request_notification | ||
| 255 | ( | ||
| 256 | 	ipc_space_t task, | ||
| 257 | 	mach_port_name_t name, | ||
| 258 | 	mach_msg_id_t msgid, | ||
| 259 | 	mach_port_mscount_t sync, | ||
| 260 | 	mach_port_t notify, | ||
| 261 | 	mach_msg_type_name_t notifyPoly, | ||
| 262 | 	mach_port_t *previous | ||
| 263 | ); | ||
| 264 | |||
| 265 | /* Routine mach_port_insert_right */ | ||
| 266 | #ifdef	mig_external | ||
| 267 | mig_external | ||
| 268 | #else | ||
| 269 | extern | ||
| 270 | #endif	/* mig_external */ | ||
| 271 | kern_return_t mach_port_insert_right | ||
| 272 | ( | ||
| 273 | 	ipc_space_t task, | ||
| 274 | 	mach_port_name_t name, | ||
| 275 | 	mach_port_t poly, | ||
| 276 | 	mach_msg_type_name_t polyPoly | ||
| 277 | ); | ||
| 278 | |||
| 279 | /* Routine mach_port_extract_right */ | ||
| 280 | #ifdef	mig_external | ||
| 281 | mig_external | ||
| 282 | #else | ||
| 283 | extern | ||
| 284 | #endif	/* mig_external */ | ||
| 285 | kern_return_t mach_port_extract_right | ||
| 286 | ( | ||
| 287 | 	ipc_space_t task, | ||
| 288 | 	mach_port_name_t name, | ||
| 289 | 	mach_msg_type_name_t msgt_name, | ||
| 290 | 	mach_port_t *poly, | ||
| 291 | 	mach_msg_type_name_t *polyPoly | ||
| 292 | ); | ||
| 293 | |||
| 294 | /* Routine mach_port_set_seqno */ | ||
| 295 | #ifdef	mig_external | ||
| 296 | mig_external | ||
| 297 | #else | ||
| 298 | extern | ||
| 299 | #endif	/* mig_external */ | ||
| 300 | kern_return_t mach_port_set_seqno | ||
| 301 | ( | ||
| 302 | 	ipc_space_t task, | ||
| 303 | 	mach_port_name_t name, | ||
| 304 | 	mach_port_seqno_t seqno | ||
| 305 | ); | ||
| 306 | |||
| 307 | /* Routine mach_port_get_attributes */ | ||
| 308 | #ifdef	mig_external | ||
| 309 | mig_external | ||
| 310 | #else | ||
| 311 | extern | ||
| 312 | #endif	/* mig_external */ | ||
| 313 | kern_return_t mach_port_get_attributes | ||
| 314 | ( | ||
| 315 | 	ipc_space_read_t task, | ||
| 316 | 	mach_port_name_t name, | ||
| 317 | 	mach_port_flavor_t flavor, | ||
| 318 | 	mach_port_info_t port_info_out, | ||
| 319 | 	mach_msg_type_number_t *port_info_outCnt | ||
| 320 | ); | ||
| 321 | |||
| 322 | /* Routine mach_port_set_attributes */ | ||
| 323 | #ifdef	mig_external | ||
| 324 | mig_external | ||
| 325 | #else | ||
| 326 | extern | ||
| 327 | #endif	/* mig_external */ | ||
| 328 | kern_return_t mach_port_set_attributes | ||
| 329 | ( | ||
| 330 | 	ipc_space_t task, | ||
| 331 | 	mach_port_name_t name, | ||
| 332 | 	mach_port_flavor_t flavor, | ||
| 333 | 	mach_port_info_t port_info, | ||
| 334 | 	mach_msg_type_number_t port_infoCnt | ||
| 335 | ); | ||
| 336 | |||
| 337 | /* Routine mach_port_allocate_qos */ | ||
| 338 | #ifdef	mig_external | ||
| 339 | mig_external | ||
| 340 | #else | ||
| 341 | extern | ||
| 342 | #endif	/* mig_external */ | ||
| 343 | kern_return_t mach_port_allocate_qos | ||
| 344 | ( | ||
| 345 | 	ipc_space_t task, | ||
| 346 | 	mach_port_right_t right, | ||
| 347 | 	mach_port_qos_t *qos, | ||
| 348 | 	mach_port_name_t *name | ||
| 349 | ); | ||
| 350 | |||
| 351 | /* Routine mach_port_allocate_full */ | ||
| 352 | #ifdef	mig_external | ||
| 353 | mig_external | ||
| 354 | #else | ||
| 355 | extern | ||
| 356 | #endif	/* mig_external */ | ||
| 357 | kern_return_t mach_port_allocate_full | ||
| 358 | ( | ||
| 359 | 	ipc_space_t task, | ||
| 360 | 	mach_port_right_t right, | ||
| 361 | 	mach_port_t proto, | ||
| 362 | 	mach_port_qos_t *qos, | ||
| 363 | 	mach_port_name_t *name | ||
| 364 | ); | ||
| 365 | |||
| 366 | /* Routine task_set_port_space */ | ||
| 367 | #ifdef	mig_external | ||
| 368 | mig_external | ||
| 369 | #else | ||
| 370 | extern | ||
| 371 | #endif	/* mig_external */ | ||
| 372 | __WATCHOS_PROHIBITED | ||
| 373 | __TVOS_PROHIBITED | ||
| 374 | kern_return_t task_set_port_space | ||
| 375 | ( | ||
| 376 | 	ipc_space_t task, | ||
| 377 | 	int table_entries | ||
| 378 | ); | ||
| 379 | |||
| 380 | /* Routine mach_port_get_srights */ | ||
| 381 | #ifdef	mig_external | ||
| 382 | mig_external | ||
| 383 | #else | ||
| 384 | extern | ||
| 385 | #endif	/* mig_external */ | ||
| 386 | kern_return_t mach_port_get_srights | ||
| 387 | ( | ||
| 388 | 	ipc_space_t task, | ||
| 389 | 	mach_port_name_t name, | ||
| 390 | 	mach_port_rights_t *srights | ||
| 391 | ); | ||
| 392 | |||
| 393 | /* Routine mach_port_space_info */ | ||
| 394 | #ifdef	mig_external | ||
| 395 | mig_external | ||
| 396 | #else | ||
| 397 | extern | ||
| 398 | #endif	/* mig_external */ | ||
| 399 | kern_return_t mach_port_space_info | ||
| 400 | ( | ||
| 401 | 	ipc_space_read_t space, | ||
| 402 | 	ipc_info_space_t *space_info, | ||
| 403 | 	ipc_info_name_array_t *table_info, | ||
| 404 | 	mach_msg_type_number_t *table_infoCnt, | ||
| 405 | 	ipc_info_tree_name_array_t *tree_info, | ||
| 406 | 	mach_msg_type_number_t *tree_infoCnt | ||
| 407 | ); | ||
| 408 | |||
| 409 | /* Routine mach_port_dnrequest_info */ | ||
| 410 | #ifdef	mig_external | ||
| 411 | mig_external | ||
| 412 | #else | ||
| 413 | extern | ||
| 414 | #endif	/* mig_external */ | ||
| 415 | kern_return_t mach_port_dnrequest_info | ||
| 416 | ( | ||
| 417 | 	ipc_space_t task, | ||
| 418 | 	mach_port_name_t name, | ||
| 419 | 	unsigned *dnr_total, | ||
| 420 | 	unsigned *dnr_used | ||
| 421 | ); | ||
| 422 | |||
| 423 | /* Routine mach_port_kernel_object */ | ||
| 424 | #ifdef	mig_external | ||
| 425 | mig_external | ||
| 426 | #else | ||
| 427 | extern | ||
| 428 | #endif	/* mig_external */ | ||
| 429 | kern_return_t mach_port_kernel_object | ||
| 430 | ( | ||
| 431 | 	ipc_space_read_t task, | ||
| 432 | 	mach_port_name_t name, | ||
| 433 | 	unsigned *object_type, | ||
| 434 | 	unsigned *object_addr | ||
| 435 | ); | ||
| 436 | |||
| 437 | /* Routine mach_port_insert_member */ | ||
| 438 | #ifdef	mig_external | ||
| 439 | mig_external | ||
| 440 | #else | ||
| 441 | extern | ||
| 442 | #endif	/* mig_external */ | ||
| 443 | kern_return_t mach_port_insert_member | ||
| 444 | ( | ||
| 445 | 	ipc_space_t task, | ||
| 446 | 	mach_port_name_t name, | ||
| 447 | 	mach_port_name_t pset | ||
| 448 | ); | ||
| 449 | |||
| 450 | /* Routine mach_port_extract_member */ | ||
| 451 | #ifdef	mig_external | ||
| 452 | mig_external | ||
| 453 | #else | ||
| 454 | extern | ||
| 455 | #endif	/* mig_external */ | ||
| 456 | kern_return_t mach_port_extract_member | ||
| 457 | ( | ||
| 458 | 	ipc_space_t task, | ||
| 459 | 	mach_port_name_t name, | ||
| 460 | 	mach_port_name_t pset | ||
| 461 | ); | ||
| 462 | |||
| 463 | /* Routine mach_port_get_context */ | ||
| 464 | #ifdef	mig_external | ||
| 465 | mig_external | ||
| 466 | #else | ||
| 467 | extern | ||
| 468 | #endif	/* mig_external */ | ||
| 469 | kern_return_t mach_port_get_context | ||
| 470 | ( | ||
| 471 | 	ipc_space_read_t task, | ||
| 472 | 	mach_port_name_t name, | ||
| 473 | 	mach_port_context_t *context | ||
| 474 | ); | ||
| 475 | |||
| 476 | /* Routine mach_port_set_context */ | ||
| 477 | #ifdef	mig_external | ||
| 478 | mig_external | ||
| 479 | #else | ||
| 480 | extern | ||
| 481 | #endif	/* mig_external */ | ||
| 482 | kern_return_t mach_port_set_context | ||
| 483 | ( | ||
| 484 | 	ipc_space_t task, | ||
| 485 | 	mach_port_name_t name, | ||
| 486 | 	mach_port_context_t context | ||
| 487 | ); | ||
| 488 | |||
| 489 | /* Routine mach_port_kobject */ | ||
| 490 | #ifdef	mig_external | ||
| 491 | mig_external | ||
| 492 | #else | ||
| 493 | extern | ||
| 494 | #endif	/* mig_external */ | ||
| 495 | kern_return_t mach_port_kobject | ||
| 496 | ( | ||
| 497 | 	ipc_space_read_t task, | ||
| 498 | 	mach_port_name_t name, | ||
| 499 | 	natural_t *object_type, | ||
| 500 | 	mach_vm_address_t *object_addr | ||
| 501 | ); | ||
| 502 | |||
| 503 | /* Routine mach_port_construct */ | ||
| 504 | #ifdef	mig_external | ||
| 505 | mig_external | ||
| 506 | #else | ||
| 507 | extern | ||
| 508 | #endif	/* mig_external */ | ||
| 509 | kern_return_t mach_port_construct | ||
| 510 | ( | ||
| 511 | 	ipc_space_t task, | ||
| 512 | 	mach_port_options_ptr_t options, | ||
| 513 | 	mach_port_context_t context, | ||
| 514 | 	mach_port_name_t *name | ||
| 515 | ); | ||
| 516 | |||
| 517 | /* Routine mach_port_destruct */ | ||
| 518 | #ifdef	mig_external | ||
| 519 | mig_external | ||
| 520 | #else | ||
| 521 | extern | ||
| 522 | #endif	/* mig_external */ | ||
| 523 | kern_return_t mach_port_destruct | ||
| 524 | ( | ||
| 525 | 	ipc_space_t task, | ||
| 526 | 	mach_port_name_t name, | ||
| 527 | 	mach_port_delta_t srdelta, | ||
| 528 | 	mach_port_context_t guard | ||
| 529 | ); | ||
| 530 | |||
| 531 | /* Routine mach_port_guard */ | ||
| 532 | #ifdef	mig_external | ||
| 533 | mig_external | ||
| 534 | #else | ||
| 535 | extern | ||
| 536 | #endif	/* mig_external */ | ||
| 537 | kern_return_t mach_port_guard | ||
| 538 | ( | ||
| 539 | 	ipc_space_t task, | ||
| 540 | 	mach_port_name_t name, | ||
| 541 | 	mach_port_context_t guard, | ||
| 542 | 	boolean_t strict | ||
| 543 | ); | ||
| 544 | |||
| 545 | /* Routine mach_port_unguard */ | ||
| 546 | #ifdef	mig_external | ||
| 547 | mig_external | ||
| 548 | #else | ||
| 549 | extern | ||
| 550 | #endif	/* mig_external */ | ||
| 551 | kern_return_t mach_port_unguard | ||
| 552 | ( | ||
| 553 | 	ipc_space_t task, | ||
| 554 | 	mach_port_name_t name, | ||
| 555 | 	mach_port_context_t guard | ||
| 556 | ); | ||
| 557 | |||
| 558 | /* Routine mach_port_space_basic_info */ | ||
| 559 | #ifdef	mig_external | ||
| 560 | mig_external | ||
| 561 | #else | ||
| 562 | extern | ||
| 563 | #endif	/* mig_external */ | ||
| 564 | kern_return_t mach_port_space_basic_info | ||
| 565 | ( | ||
| 566 | 	ipc_space_inspect_t task, | ||
| 567 | 	ipc_info_space_basic_t *basic_info | ||
| 568 | ); | ||
| 569 | |||
| 570 | /* Routine mach_port_guard_with_flags */ | ||
| 571 | #ifdef	mig_external | ||
| 572 | mig_external | ||
| 573 | #else | ||
| 574 | extern | ||
| 575 | #endif	/* mig_external */ | ||
| 576 | kern_return_t mach_port_guard_with_flags | ||
| 577 | ( | ||
| 578 | 	ipc_space_t task, | ||
| 579 | 	mach_port_name_t name, | ||
| 580 | 	mach_port_context_t guard, | ||
| 581 | 	uint64_t flags | ||
| 582 | ); | ||
| 583 | |||
| 584 | /* Routine mach_port_swap_guard */ | ||
| 585 | #ifdef	mig_external | ||
| 586 | mig_external | ||
| 587 | #else | ||
| 588 | extern | ||
| 589 | #endif	/* mig_external */ | ||
| 590 | kern_return_t mach_port_swap_guard | ||
| 591 | ( | ||
| 592 | 	ipc_space_t task, | ||
| 593 | 	mach_port_name_t name, | ||
| 594 | 	mach_port_context_t old_guard, | ||
| 595 | 	mach_port_context_t new_guard | ||
| 596 | ); | ||
| 597 | |||
| 598 | /* Routine mach_port_kobject_description */ | ||
| 599 | #ifdef	mig_external | ||
| 600 | mig_external | ||
| 601 | #else | ||
| 602 | extern | ||
| 603 | #endif	/* mig_external */ | ||
| 604 | kern_return_t mach_port_kobject_description | ||
| 605 | ( | ||
| 606 | 	ipc_space_read_t task, | ||
| 607 | 	mach_port_name_t name, | ||
| 608 | 	natural_t *object_type, | ||
| 609 | 	mach_vm_address_t *object_addr, | ||
| 610 | 	kobject_description_t description | ||
| 611 | ); | ||
| 612 | |||
| 613 | __END_DECLS | ||
| 614 | |||
| 615 | /********************** Caution **************************/ | ||
| 616 | /* The following data types should be used to calculate */ | ||
| 617 | /* maximum message sizes only. The actual message may be */ | ||
| 618 | /* smaller, and the position of the arguments within the */ | ||
| 619 | /* message layout may vary from what is presented here. */ | ||
| 620 | /* For example, if any of the arguments are variable- */ | ||
| 621 | /* sized, and less than the maximum is sent, the data */ | ||
| 622 | /* will be packed tight in the actual message to reduce */ | ||
| 623 | /* the presence of holes. */ | ||
| 624 | /********************** Caution **************************/ | ||
| 625 | |||
| 626 | /* typedefs for all requests */ | ||
| 627 | |||
| 628 | #ifndef __Request__mach_port_subsystem__defined | ||
| 629 | #define __Request__mach_port_subsystem__defined | ||
| 630 | |||
| 631 | #ifdef __MigPackStructs | ||
| 632 | #pragma pack(push, 4) | ||
| 633 | #endif | ||
| 634 | 	typedef struct { | ||
| 635 | 		mach_msg_header_t Head; | ||
| 636 | 	} __Request__mach_port_names_t __attribute__((unused)); | ||
| 637 | #ifdef __MigPackStructs | ||
| 638 | #pragma pack(pop) | ||
| 639 | #endif | ||
| 640 | |||
| 641 | #ifdef __MigPackStructs | ||
| 642 | #pragma pack(push, 4) | ||
| 643 | #endif | ||
| 644 | 	typedef struct { | ||
| 645 | 		mach_msg_header_t Head; | ||
| 646 | 		NDR_record_t NDR; | ||
| 647 | 		mach_port_name_t name; | ||
| 648 | 	} __Request__mach_port_type_t __attribute__((unused)); | ||
| 649 | #ifdef __MigPackStructs | ||
| 650 | #pragma pack(pop) | ||
| 651 | #endif | ||
| 652 | |||
| 653 | #ifdef __MigPackStructs | ||
| 654 | #pragma pack(push, 4) | ||
| 655 | #endif | ||
| 656 | 	typedef struct { | ||
| 657 | 		mach_msg_header_t Head; | ||
| 658 | 		NDR_record_t NDR; | ||
| 659 | 		mach_port_name_t old_name; | ||
| 660 | 		mach_port_name_t new_name; | ||
| 661 | 	} __Request__mach_port_rename_t __attribute__((unused)); | ||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(pop) | ||
| 664 | #endif | ||
| 665 | |||
| 666 | #ifdef __MigPackStructs | ||
| 667 | #pragma pack(push, 4) | ||
| 668 | #endif | ||
| 669 | 	typedef struct { | ||
| 670 | 		mach_msg_header_t Head; | ||
| 671 | 		NDR_record_t NDR; | ||
| 672 | 		mach_port_right_t right; | ||
| 673 | 		mach_port_name_t name; | ||
| 674 | 	} __Request__mach_port_allocate_name_t __attribute__((unused)); | ||
| 675 | #ifdef __MigPackStructs | ||
| 676 | #pragma pack(pop) | ||
| 677 | #endif | ||
| 678 | |||
| 679 | #ifdef __MigPackStructs | ||
| 680 | #pragma pack(push, 4) | ||
| 681 | #endif | ||
| 682 | 	typedef struct { | ||
| 683 | 		mach_msg_header_t Head; | ||
| 684 | 		NDR_record_t NDR; | ||
| 685 | 		mach_port_right_t right; | ||
| 686 | 	} __Request__mach_port_allocate_t __attribute__((unused)); | ||
| 687 | #ifdef __MigPackStructs | ||
| 688 | #pragma pack(pop) | ||
| 689 | #endif | ||
| 690 | |||
| 691 | #ifdef __MigPackStructs | ||
| 692 | #pragma pack(push, 4) | ||
| 693 | #endif | ||
| 694 | 	typedef struct { | ||
| 695 | 		mach_msg_header_t Head; | ||
| 696 | 		NDR_record_t NDR; | ||
| 697 | 		mach_port_name_t name; | ||
| 698 | 	} __Request__mach_port_destroy_t __attribute__((unused)); | ||
| 699 | #ifdef __MigPackStructs | ||
| 700 | #pragma pack(pop) | ||
| 701 | #endif | ||
| 702 | |||
| 703 | #ifdef __MigPackStructs | ||
| 704 | #pragma pack(push, 4) | ||
| 705 | #endif | ||
| 706 | 	typedef struct { | ||
| 707 | 		mach_msg_header_t Head; | ||
| 708 | 		NDR_record_t NDR; | ||
| 709 | 		mach_port_name_t name; | ||
| 710 | 	} __Request__mach_port_deallocate_t __attribute__((unused)); | ||
| 711 | #ifdef __MigPackStructs | ||
| 712 | #pragma pack(pop) | ||
| 713 | #endif | ||
| 714 | |||
| 715 | #ifdef __MigPackStructs | ||
| 716 | #pragma pack(push, 4) | ||
| 717 | #endif | ||
| 718 | 	typedef struct { | ||
| 719 | 		mach_msg_header_t Head; | ||
| 720 | 		NDR_record_t NDR; | ||
| 721 | 		mach_port_name_t name; | ||
| 722 | 		mach_port_right_t right; | ||
| 723 | 	} __Request__mach_port_get_refs_t __attribute__((unused)); | ||
| 724 | #ifdef __MigPackStructs | ||
| 725 | #pragma pack(pop) | ||
| 726 | #endif | ||
| 727 | |||
| 728 | #ifdef __MigPackStructs | ||
| 729 | #pragma pack(push, 4) | ||
| 730 | #endif | ||
| 731 | 	typedef struct { | ||
| 732 | 		mach_msg_header_t Head; | ||
| 733 | 		NDR_record_t NDR; | ||
| 734 | 		mach_port_name_t name; | ||
| 735 | 		mach_port_right_t right; | ||
| 736 | 		mach_port_delta_t delta; | ||
| 737 | 	} __Request__mach_port_mod_refs_t __attribute__((unused)); | ||
| 738 | #ifdef __MigPackStructs | ||
| 739 | #pragma pack(pop) | ||
| 740 | #endif | ||
| 741 | |||
| 742 | #ifdef __MigPackStructs | ||
| 743 | #pragma pack(push, 4) | ||
| 744 | #endif | ||
| 745 | 	typedef struct { | ||
| 746 | 		mach_msg_header_t Head; | ||
| 747 | 		NDR_record_t NDR; | ||
| 748 | 		mach_port_name_t name; | ||
| 749 | 		mach_msg_trailer_type_t trailer_type; | ||
| 750 | 		mach_port_seqno_t request_seqnop; | ||
| 751 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 752 | 	} __Request__mach_port_peek_t __attribute__((unused)); | ||
| 753 | #ifdef __MigPackStructs | ||
| 754 | #pragma pack(pop) | ||
| 755 | #endif | ||
| 756 | |||
| 757 | #ifdef __MigPackStructs | ||
| 758 | #pragma pack(push, 4) | ||
| 759 | #endif | ||
| 760 | 	typedef struct { | ||
| 761 | 		mach_msg_header_t Head; | ||
| 762 | 		NDR_record_t NDR; | ||
| 763 | 		mach_port_name_t name; | ||
| 764 | 		mach_port_mscount_t mscount; | ||
| 765 | 	} __Request__mach_port_set_mscount_t __attribute__((unused)); | ||
| 766 | #ifdef __MigPackStructs | ||
| 767 | #pragma pack(pop) | ||
| 768 | #endif | ||
| 769 | |||
| 770 | #ifdef __MigPackStructs | ||
| 771 | #pragma pack(push, 4) | ||
| 772 | #endif | ||
| 773 | 	typedef struct { | ||
| 774 | 		mach_msg_header_t Head; | ||
| 775 | 		NDR_record_t NDR; | ||
| 776 | 		mach_port_name_t name; | ||
| 777 | 	} __Request__mach_port_get_set_status_t __attribute__((unused)); | ||
| 778 | #ifdef __MigPackStructs | ||
| 779 | #pragma pack(pop) | ||
| 780 | #endif | ||
| 781 | |||
| 782 | #ifdef __MigPackStructs | ||
| 783 | #pragma pack(push, 4) | ||
| 784 | #endif | ||
| 785 | 	typedef struct { | ||
| 786 | 		mach_msg_header_t Head; | ||
| 787 | 		NDR_record_t NDR; | ||
| 788 | 		mach_port_name_t member; | ||
| 789 | 		mach_port_name_t after; | ||
| 790 | 	} __Request__mach_port_move_member_t __attribute__((unused)); | ||
| 791 | #ifdef __MigPackStructs | ||
| 792 | #pragma pack(pop) | ||
| 793 | #endif | ||
| 794 | |||
| 795 | #ifdef __MigPackStructs | ||
| 796 | #pragma pack(push, 4) | ||
| 797 | #endif | ||
| 798 | 	typedef struct { | ||
| 799 | 		mach_msg_header_t Head; | ||
| 800 | 		/* start of the kernel processed data */ | ||
| 801 | 		mach_msg_body_t msgh_body; | ||
| 802 | 		mach_msg_port_descriptor_t notify; | ||
| 803 | 		/* end of the kernel processed data */ | ||
| 804 | 		NDR_record_t NDR; | ||
| 805 | 		mach_port_name_t name; | ||
| 806 | 		mach_msg_id_t msgid; | ||
| 807 | 		mach_port_mscount_t sync; | ||
| 808 | 	} __Request__mach_port_request_notification_t __attribute__((unused)); | ||
| 809 | #ifdef __MigPackStructs | ||
| 810 | #pragma pack(pop) | ||
| 811 | #endif | ||
| 812 | |||
| 813 | #ifdef __MigPackStructs | ||
| 814 | #pragma pack(push, 4) | ||
| 815 | #endif | ||
| 816 | 	typedef struct { | ||
| 817 | 		mach_msg_header_t Head; | ||
| 818 | 		/* start of the kernel processed data */ | ||
| 819 | 		mach_msg_body_t msgh_body; | ||
| 820 | 		mach_msg_port_descriptor_t poly; | ||
| 821 | 		/* end of the kernel processed data */ | ||
| 822 | 		NDR_record_t NDR; | ||
| 823 | 		mach_port_name_t name; | ||
| 824 | 	} __Request__mach_port_insert_right_t __attribute__((unused)); | ||
| 825 | #ifdef __MigPackStructs | ||
| 826 | #pragma pack(pop) | ||
| 827 | #endif | ||
| 828 | |||
| 829 | #ifdef __MigPackStructs | ||
| 830 | #pragma pack(push, 4) | ||
| 831 | #endif | ||
| 832 | 	typedef struct { | ||
| 833 | 		mach_msg_header_t Head; | ||
| 834 | 		NDR_record_t NDR; | ||
| 835 | 		mach_port_name_t name; | ||
| 836 | 		mach_msg_type_name_t msgt_name; | ||
| 837 | 	} __Request__mach_port_extract_right_t __attribute__((unused)); | ||
| 838 | #ifdef __MigPackStructs | ||
| 839 | #pragma pack(pop) | ||
| 840 | #endif | ||
| 841 | |||
| 842 | #ifdef __MigPackStructs | ||
| 843 | #pragma pack(push, 4) | ||
| 844 | #endif | ||
| 845 | 	typedef struct { | ||
| 846 | 		mach_msg_header_t Head; | ||
| 847 | 		NDR_record_t NDR; | ||
| 848 | 		mach_port_name_t name; | ||
| 849 | 		mach_port_seqno_t seqno; | ||
| 850 | 	} __Request__mach_port_set_seqno_t __attribute__((unused)); | ||
| 851 | #ifdef __MigPackStructs | ||
| 852 | #pragma pack(pop) | ||
| 853 | #endif | ||
| 854 | |||
| 855 | #ifdef __MigPackStructs | ||
| 856 | #pragma pack(push, 4) | ||
| 857 | #endif | ||
| 858 | 	typedef struct { | ||
| 859 | 		mach_msg_header_t Head; | ||
| 860 | 		NDR_record_t NDR; | ||
| 861 | 		mach_port_name_t name; | ||
| 862 | 		mach_port_flavor_t flavor; | ||
| 863 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 864 | 	} __Request__mach_port_get_attributes_t __attribute__((unused)); | ||
| 865 | #ifdef __MigPackStructs | ||
| 866 | #pragma pack(pop) | ||
| 867 | #endif | ||
| 868 | |||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(push, 4) | ||
| 871 | #endif | ||
| 872 | 	typedef struct { | ||
| 873 | 		mach_msg_header_t Head; | ||
| 874 | 		NDR_record_t NDR; | ||
| 875 | 		mach_port_name_t name; | ||
| 876 | 		mach_port_flavor_t flavor; | ||
| 877 | 		mach_msg_type_number_t port_infoCnt; | ||
| 878 | 		integer_t port_info[17]; | ||
| 879 | 	} __Request__mach_port_set_attributes_t __attribute__((unused)); | ||
| 880 | #ifdef __MigPackStructs | ||
| 881 | #pragma pack(pop) | ||
| 882 | #endif | ||
| 883 | |||
| 884 | #ifdef __MigPackStructs | ||
| 885 | #pragma pack(push, 4) | ||
| 886 | #endif | ||
| 887 | 	typedef struct { | ||
| 888 | 		mach_msg_header_t Head; | ||
| 889 | 		NDR_record_t NDR; | ||
| 890 | 		mach_port_right_t right; | ||
| 891 | 		mach_port_qos_t qos; | ||
| 892 | 	} __Request__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 893 | #ifdef __MigPackStructs | ||
| 894 | #pragma pack(pop) | ||
| 895 | #endif | ||
| 896 | |||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(push, 4) | ||
| 899 | #endif | ||
| 900 | 	typedef struct { | ||
| 901 | 		mach_msg_header_t Head; | ||
| 902 | 		/* start of the kernel processed data */ | ||
| 903 | 		mach_msg_body_t msgh_body; | ||
| 904 | 		mach_msg_port_descriptor_t proto; | ||
| 905 | 		/* end of the kernel processed data */ | ||
| 906 | 		NDR_record_t NDR; | ||
| 907 | 		mach_port_right_t right; | ||
| 908 | 		mach_port_qos_t qos; | ||
| 909 | 		mach_port_name_t name; | ||
| 910 | 	} __Request__mach_port_allocate_full_t __attribute__((unused)); | ||
| 911 | #ifdef __MigPackStructs | ||
| 912 | #pragma pack(pop) | ||
| 913 | #endif | ||
| 914 | |||
| 915 | #ifdef __MigPackStructs | ||
| 916 | #pragma pack(push, 4) | ||
| 917 | #endif | ||
| 918 | 	typedef struct { | ||
| 919 | 		mach_msg_header_t Head; | ||
| 920 | 		NDR_record_t NDR; | ||
| 921 | 		int table_entries; | ||
| 922 | 	} __Request__task_set_port_space_t __attribute__((unused)); | ||
| 923 | #ifdef __MigPackStructs | ||
| 924 | #pragma pack(pop) | ||
| 925 | #endif | ||
| 926 | |||
| 927 | #ifdef __MigPackStructs | ||
| 928 | #pragma pack(push, 4) | ||
| 929 | #endif | ||
| 930 | 	typedef struct { | ||
| 931 | 		mach_msg_header_t Head; | ||
| 932 | 		NDR_record_t NDR; | ||
| 933 | 		mach_port_name_t name; | ||
| 934 | 	} __Request__mach_port_get_srights_t __attribute__((unused)); | ||
| 935 | #ifdef __MigPackStructs | ||
| 936 | #pragma pack(pop) | ||
| 937 | #endif | ||
| 938 | |||
| 939 | #ifdef __MigPackStructs | ||
| 940 | #pragma pack(push, 4) | ||
| 941 | #endif | ||
| 942 | 	typedef struct { | ||
| 943 | 		mach_msg_header_t Head; | ||
| 944 | 	} __Request__mach_port_space_info_t __attribute__((unused)); | ||
| 945 | #ifdef __MigPackStructs | ||
| 946 | #pragma pack(pop) | ||
| 947 | #endif | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		NDR_record_t NDR; | ||
| 955 | 		mach_port_name_t name; | ||
| 956 | 	} __Request__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 957 | #ifdef __MigPackStructs | ||
| 958 | #pragma pack(pop) | ||
| 959 | #endif | ||
| 960 | |||
| 961 | #ifdef __MigPackStructs | ||
| 962 | #pragma pack(push, 4) | ||
| 963 | #endif | ||
| 964 | 	typedef struct { | ||
| 965 | 		mach_msg_header_t Head; | ||
| 966 | 		NDR_record_t NDR; | ||
| 967 | 		mach_port_name_t name; | ||
| 968 | 	} __Request__mach_port_kernel_object_t __attribute__((unused)); | ||
| 969 | #ifdef __MigPackStructs | ||
| 970 | #pragma pack(pop) | ||
| 971 | #endif | ||
| 972 | |||
| 973 | #ifdef __MigPackStructs | ||
| 974 | #pragma pack(push, 4) | ||
| 975 | #endif | ||
| 976 | 	typedef struct { | ||
| 977 | 		mach_msg_header_t Head; | ||
| 978 | 		NDR_record_t NDR; | ||
| 979 | 		mach_port_name_t name; | ||
| 980 | 		mach_port_name_t pset; | ||
| 981 | 	} __Request__mach_port_insert_member_t __attribute__((unused)); | ||
| 982 | #ifdef __MigPackStructs | ||
| 983 | #pragma pack(pop) | ||
| 984 | #endif | ||
| 985 | |||
| 986 | #ifdef __MigPackStructs | ||
| 987 | #pragma pack(push, 4) | ||
| 988 | #endif | ||
| 989 | 	typedef struct { | ||
| 990 | 		mach_msg_header_t Head; | ||
| 991 | 		NDR_record_t NDR; | ||
| 992 | 		mach_port_name_t name; | ||
| 993 | 		mach_port_name_t pset; | ||
| 994 | 	} __Request__mach_port_extract_member_t __attribute__((unused)); | ||
| 995 | #ifdef __MigPackStructs | ||
| 996 | #pragma pack(pop) | ||
| 997 | #endif | ||
| 998 | |||
| 999 | #ifdef __MigPackStructs | ||
| 1000 | #pragma pack(push, 4) | ||
| 1001 | #endif | ||
| 1002 | 	typedef struct { | ||
| 1003 | 		mach_msg_header_t Head; | ||
| 1004 | 		NDR_record_t NDR; | ||
| 1005 | 		mach_port_name_t name; | ||
| 1006 | 	} __Request__mach_port_get_context_t __attribute__((unused)); | ||
| 1007 | #ifdef __MigPackStructs | ||
| 1008 | #pragma pack(pop) | ||
| 1009 | #endif | ||
| 1010 | |||
| 1011 | #ifdef __MigPackStructs | ||
| 1012 | #pragma pack(push, 4) | ||
| 1013 | #endif | ||
| 1014 | 	typedef struct { | ||
| 1015 | 		mach_msg_header_t Head; | ||
| 1016 | 		NDR_record_t NDR; | ||
| 1017 | 		mach_port_name_t name; | ||
| 1018 | 		mach_port_context_t context; | ||
| 1019 | 	} __Request__mach_port_set_context_t __attribute__((unused)); | ||
| 1020 | #ifdef __MigPackStructs | ||
| 1021 | #pragma pack(pop) | ||
| 1022 | #endif | ||
| 1023 | |||
| 1024 | #ifdef __MigPackStructs | ||
| 1025 | #pragma pack(push, 4) | ||
| 1026 | #endif | ||
| 1027 | 	typedef struct { | ||
| 1028 | 		mach_msg_header_t Head; | ||
| 1029 | 		NDR_record_t NDR; | ||
| 1030 | 		mach_port_name_t name; | ||
| 1031 | 	} __Request__mach_port_kobject_t __attribute__((unused)); | ||
| 1032 | #ifdef __MigPackStructs | ||
| 1033 | #pragma pack(pop) | ||
| 1034 | #endif | ||
| 1035 | |||
| 1036 | #ifdef __MigPackStructs | ||
| 1037 | #pragma pack(push, 4) | ||
| 1038 | #endif | ||
| 1039 | 	typedef struct { | ||
| 1040 | 		mach_msg_header_t Head; | ||
| 1041 | 		/* start of the kernel processed data */ | ||
| 1042 | 		mach_msg_body_t msgh_body; | ||
| 1043 | 		mach_msg_ool_descriptor_t options; | ||
| 1044 | 		/* end of the kernel processed data */ | ||
| 1045 | 		NDR_record_t NDR; | ||
| 1046 | 		mach_port_context_t context; | ||
| 1047 | 	} __Request__mach_port_construct_t __attribute__((unused)); | ||
| 1048 | #ifdef __MigPackStructs | ||
| 1049 | #pragma pack(pop) | ||
| 1050 | #endif | ||
| 1051 | |||
| 1052 | #ifdef __MigPackStructs | ||
| 1053 | #pragma pack(push, 4) | ||
| 1054 | #endif | ||
| 1055 | 	typedef struct { | ||
| 1056 | 		mach_msg_header_t Head; | ||
| 1057 | 		NDR_record_t NDR; | ||
| 1058 | 		mach_port_name_t name; | ||
| 1059 | 		mach_port_delta_t srdelta; | ||
| 1060 | 		mach_port_context_t guard; | ||
| 1061 | 	} __Request__mach_port_destruct_t __attribute__((unused)); | ||
| 1062 | #ifdef __MigPackStructs | ||
| 1063 | #pragma pack(pop) | ||
| 1064 | #endif | ||
| 1065 | |||
| 1066 | #ifdef __MigPackStructs | ||
| 1067 | #pragma pack(push, 4) | ||
| 1068 | #endif | ||
| 1069 | 	typedef struct { | ||
| 1070 | 		mach_msg_header_t Head; | ||
| 1071 | 		NDR_record_t NDR; | ||
| 1072 | 		mach_port_name_t name; | ||
| 1073 | 		mach_port_context_t guard; | ||
| 1074 | 		boolean_t strict; | ||
| 1075 | 	} __Request__mach_port_guard_t __attribute__((unused)); | ||
| 1076 | #ifdef __MigPackStructs | ||
| 1077 | #pragma pack(pop) | ||
| 1078 | #endif | ||
| 1079 | |||
| 1080 | #ifdef __MigPackStructs | ||
| 1081 | #pragma pack(push, 4) | ||
| 1082 | #endif | ||
| 1083 | 	typedef struct { | ||
| 1084 | 		mach_msg_header_t Head; | ||
| 1085 | 		NDR_record_t NDR; | ||
| 1086 | 		mach_port_name_t name; | ||
| 1087 | 		mach_port_context_t guard; | ||
| 1088 | 	} __Request__mach_port_unguard_t __attribute__((unused)); | ||
| 1089 | #ifdef __MigPackStructs | ||
| 1090 | #pragma pack(pop) | ||
| 1091 | #endif | ||
| 1092 | |||
| 1093 | #ifdef __MigPackStructs | ||
| 1094 | #pragma pack(push, 4) | ||
| 1095 | #endif | ||
| 1096 | 	typedef struct { | ||
| 1097 | 		mach_msg_header_t Head; | ||
| 1098 | 	} __Request__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(pop) | ||
| 1101 | #endif | ||
| 1102 | |||
| 1103 | #ifdef __MigPackStructs | ||
| 1104 | #pragma pack(push, 4) | ||
| 1105 | #endif | ||
| 1106 | 	typedef struct { | ||
| 1107 | 		mach_msg_header_t Head; | ||
| 1108 | 		NDR_record_t NDR; | ||
| 1109 | 		mach_port_name_t name; | ||
| 1110 | 		mach_port_context_t guard; | ||
| 1111 | 		uint64_t flags; | ||
| 1112 | 	} __Request__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1113 | #ifdef __MigPackStructs | ||
| 1114 | #pragma pack(pop) | ||
| 1115 | #endif | ||
| 1116 | |||
| 1117 | #ifdef __MigPackStructs | ||
| 1118 | #pragma pack(push, 4) | ||
| 1119 | #endif | ||
| 1120 | 	typedef struct { | ||
| 1121 | 		mach_msg_header_t Head; | ||
| 1122 | 		NDR_record_t NDR; | ||
| 1123 | 		mach_port_name_t name; | ||
| 1124 | 		mach_port_context_t old_guard; | ||
| 1125 | 		mach_port_context_t new_guard; | ||
| 1126 | 	} __Request__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1127 | #ifdef __MigPackStructs | ||
| 1128 | #pragma pack(pop) | ||
| 1129 | #endif | ||
| 1130 | |||
| 1131 | #ifdef __MigPackStructs | ||
| 1132 | #pragma pack(push, 4) | ||
| 1133 | #endif | ||
| 1134 | 	typedef struct { | ||
| 1135 | 		mach_msg_header_t Head; | ||
| 1136 | 		NDR_record_t NDR; | ||
| 1137 | 		mach_port_name_t name; | ||
| 1138 | 	} __Request__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1139 | #ifdef __MigPackStructs | ||
| 1140 | #pragma pack(pop) | ||
| 1141 | #endif | ||
| 1142 | #endif /* !__Request__mach_port_subsystem__defined */ | ||
| 1143 | |||
| 1144 | /* union of all requests */ | ||
| 1145 | |||
| 1146 | #ifndef __RequestUnion__mach_port_subsystem__defined | ||
| 1147 | #define __RequestUnion__mach_port_subsystem__defined | ||
| 1148 | union __RequestUnion__mach_port_subsystem { | ||
| 1149 | 	__Request__mach_port_names_t Request_mach_port_names; | ||
| 1150 | 	__Request__mach_port_type_t Request_mach_port_type; | ||
| 1151 | 	__Request__mach_port_rename_t Request_mach_port_rename; | ||
| 1152 | 	__Request__mach_port_allocate_name_t Request_mach_port_allocate_name; | ||
| 1153 | 	__Request__mach_port_allocate_t Request_mach_port_allocate; | ||
| 1154 | 	__Request__mach_port_destroy_t Request_mach_port_destroy; | ||
| 1155 | 	__Request__mach_port_deallocate_t Request_mach_port_deallocate; | ||
| 1156 | 	__Request__mach_port_get_refs_t Request_mach_port_get_refs; | ||
| 1157 | 	__Request__mach_port_mod_refs_t Request_mach_port_mod_refs; | ||
| 1158 | 	__Request__mach_port_peek_t Request_mach_port_peek; | ||
| 1159 | 	__Request__mach_port_set_mscount_t Request_mach_port_set_mscount; | ||
| 1160 | 	__Request__mach_port_get_set_status_t Request_mach_port_get_set_status; | ||
| 1161 | 	__Request__mach_port_move_member_t Request_mach_port_move_member; | ||
| 1162 | 	__Request__mach_port_request_notification_t Request_mach_port_request_notification; | ||
| 1163 | 	__Request__mach_port_insert_right_t Request_mach_port_insert_right; | ||
| 1164 | 	__Request__mach_port_extract_right_t Request_mach_port_extract_right; | ||
| 1165 | 	__Request__mach_port_set_seqno_t Request_mach_port_set_seqno; | ||
| 1166 | 	__Request__mach_port_get_attributes_t Request_mach_port_get_attributes; | ||
| 1167 | 	__Request__mach_port_set_attributes_t Request_mach_port_set_attributes; | ||
| 1168 | 	__Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; | ||
| 1169 | 	__Request__mach_port_allocate_full_t Request_mach_port_allocate_full; | ||
| 1170 | 	__Request__task_set_port_space_t Request_task_set_port_space; | ||
| 1171 | 	__Request__mach_port_get_srights_t Request_mach_port_get_srights; | ||
| 1172 | 	__Request__mach_port_space_info_t Request_mach_port_space_info; | ||
| 1173 | 	__Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; | ||
| 1174 | 	__Request__mach_port_kernel_object_t Request_mach_port_kernel_object; | ||
| 1175 | 	__Request__mach_port_insert_member_t Request_mach_port_insert_member; | ||
| 1176 | 	__Request__mach_port_extract_member_t Request_mach_port_extract_member; | ||
| 1177 | 	__Request__mach_port_get_context_t Request_mach_port_get_context; | ||
| 1178 | 	__Request__mach_port_set_context_t Request_mach_port_set_context; | ||
| 1179 | 	__Request__mach_port_kobject_t Request_mach_port_kobject; | ||
| 1180 | 	__Request__mach_port_construct_t Request_mach_port_construct; | ||
| 1181 | 	__Request__mach_port_destruct_t Request_mach_port_destruct; | ||
| 1182 | 	__Request__mach_port_guard_t Request_mach_port_guard; | ||
| 1183 | 	__Request__mach_port_unguard_t Request_mach_port_unguard; | ||
| 1184 | 	__Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info; | ||
| 1185 | 	__Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags; | ||
| 1186 | 	__Request__mach_port_swap_guard_t Request_mach_port_swap_guard; | ||
| 1187 | 	__Request__mach_port_kobject_description_t Request_mach_port_kobject_description; | ||
| 1188 | }; | ||
| 1189 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1190 | /* typedefs for all replies */ | ||
| 1191 | |||
| 1192 | #ifndef __Reply__mach_port_subsystem__defined | ||
| 1193 | #define __Reply__mach_port_subsystem__defined | ||
| 1194 | |||
| 1195 | #ifdef __MigPackStructs | ||
| 1196 | #pragma pack(push, 4) | ||
| 1197 | #endif | ||
| 1198 | 	typedef struct { | ||
| 1199 | 		mach_msg_header_t Head; | ||
| 1200 | 		/* start of the kernel processed data */ | ||
| 1201 | 		mach_msg_body_t msgh_body; | ||
| 1202 | 		mach_msg_ool_descriptor_t names; | ||
| 1203 | 		mach_msg_ool_descriptor_t types; | ||
| 1204 | 		/* end of the kernel processed data */ | ||
| 1205 | 		NDR_record_t NDR; | ||
| 1206 | 		mach_msg_type_number_t namesCnt; | ||
| 1207 | 		mach_msg_type_number_t typesCnt; | ||
| 1208 | 	} __Reply__mach_port_names_t __attribute__((unused)); | ||
| 1209 | #ifdef __MigPackStructs | ||
| 1210 | #pragma pack(pop) | ||
| 1211 | #endif | ||
| 1212 | |||
| 1213 | #ifdef __MigPackStructs | ||
| 1214 | #pragma pack(push, 4) | ||
| 1215 | #endif | ||
| 1216 | 	typedef struct { | ||
| 1217 | 		mach_msg_header_t Head; | ||
| 1218 | 		NDR_record_t NDR; | ||
| 1219 | 		kern_return_t RetCode; | ||
| 1220 | 		mach_port_type_t ptype; | ||
| 1221 | 	} __Reply__mach_port_type_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		NDR_record_t NDR; | ||
| 1232 | 		kern_return_t RetCode; | ||
| 1233 | 	} __Reply__mach_port_rename_t __attribute__((unused)); | ||
| 1234 | #ifdef __MigPackStructs | ||
| 1235 | #pragma pack(pop) | ||
| 1236 | #endif | ||
| 1237 | |||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(push, 4) | ||
| 1240 | #endif | ||
| 1241 | 	typedef struct { | ||
| 1242 | 		mach_msg_header_t Head; | ||
| 1243 | 		NDR_record_t NDR; | ||
| 1244 | 		kern_return_t RetCode; | ||
| 1245 | 	} __Reply__mach_port_allocate_name_t __attribute__((unused)); | ||
| 1246 | #ifdef __MigPackStructs | ||
| 1247 | #pragma pack(pop) | ||
| 1248 | #endif | ||
| 1249 | |||
| 1250 | #ifdef __MigPackStructs | ||
| 1251 | #pragma pack(push, 4) | ||
| 1252 | #endif | ||
| 1253 | 	typedef struct { | ||
| 1254 | 		mach_msg_header_t Head; | ||
| 1255 | 		NDR_record_t NDR; | ||
| 1256 | 		kern_return_t RetCode; | ||
| 1257 | 		mach_port_name_t name; | ||
| 1258 | 	} __Reply__mach_port_allocate_t __attribute__((unused)); | ||
| 1259 | #ifdef __MigPackStructs | ||
| 1260 | #pragma pack(pop) | ||
| 1261 | #endif | ||
| 1262 | |||
| 1263 | #ifdef __MigPackStructs | ||
| 1264 | #pragma pack(push, 4) | ||
| 1265 | #endif | ||
| 1266 | 	typedef struct { | ||
| 1267 | 		mach_msg_header_t Head; | ||
| 1268 | 		NDR_record_t NDR; | ||
| 1269 | 		kern_return_t RetCode; | ||
| 1270 | 	} __Reply__mach_port_destroy_t __attribute__((unused)); | ||
| 1271 | #ifdef __MigPackStructs | ||
| 1272 | #pragma pack(pop) | ||
| 1273 | #endif | ||
| 1274 | |||
| 1275 | #ifdef __MigPackStructs | ||
| 1276 | #pragma pack(push, 4) | ||
| 1277 | #endif | ||
| 1278 | 	typedef struct { | ||
| 1279 | 		mach_msg_header_t Head; | ||
| 1280 | 		NDR_record_t NDR; | ||
| 1281 | 		kern_return_t RetCode; | ||
| 1282 | 	} __Reply__mach_port_deallocate_t __attribute__((unused)); | ||
| 1283 | #ifdef __MigPackStructs | ||
| 1284 | #pragma pack(pop) | ||
| 1285 | #endif | ||
| 1286 | |||
| 1287 | #ifdef __MigPackStructs | ||
| 1288 | #pragma pack(push, 4) | ||
| 1289 | #endif | ||
| 1290 | 	typedef struct { | ||
| 1291 | 		mach_msg_header_t Head; | ||
| 1292 | 		NDR_record_t NDR; | ||
| 1293 | 		kern_return_t RetCode; | ||
| 1294 | 		mach_port_urefs_t refs; | ||
| 1295 | 	} __Reply__mach_port_get_refs_t __attribute__((unused)); | ||
| 1296 | #ifdef __MigPackStructs | ||
| 1297 | #pragma pack(pop) | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | #ifdef __MigPackStructs | ||
| 1301 | #pragma pack(push, 4) | ||
| 1302 | #endif | ||
| 1303 | 	typedef struct { | ||
| 1304 | 		mach_msg_header_t Head; | ||
| 1305 | 		NDR_record_t NDR; | ||
| 1306 | 		kern_return_t RetCode; | ||
| 1307 | 	} __Reply__mach_port_mod_refs_t __attribute__((unused)); | ||
| 1308 | #ifdef __MigPackStructs | ||
| 1309 | #pragma pack(pop) | ||
| 1310 | #endif | ||
| 1311 | |||
| 1312 | #ifdef __MigPackStructs | ||
| 1313 | #pragma pack(push, 4) | ||
| 1314 | #endif | ||
| 1315 | 	typedef struct { | ||
| 1316 | 		mach_msg_header_t Head; | ||
| 1317 | 		NDR_record_t NDR; | ||
| 1318 | 		kern_return_t RetCode; | ||
| 1319 | 		mach_port_seqno_t request_seqnop; | ||
| 1320 | 		mach_msg_size_t msg_sizep; | ||
| 1321 | 		mach_msg_id_t msg_idp; | ||
| 1322 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 1323 | 		char trailer_infop[68]; | ||
| 1324 | 	} __Reply__mach_port_peek_t __attribute__((unused)); | ||
| 1325 | #ifdef __MigPackStructs | ||
| 1326 | #pragma pack(pop) | ||
| 1327 | #endif | ||
| 1328 | |||
| 1329 | #ifdef __MigPackStructs | ||
| 1330 | #pragma pack(push, 4) | ||
| 1331 | #endif | ||
| 1332 | 	typedef struct { | ||
| 1333 | 		mach_msg_header_t Head; | ||
| 1334 | 		NDR_record_t NDR; | ||
| 1335 | 		kern_return_t RetCode; | ||
| 1336 | 	} __Reply__mach_port_set_mscount_t __attribute__((unused)); | ||
| 1337 | #ifdef __MigPackStructs | ||
| 1338 | #pragma pack(pop) | ||
| 1339 | #endif | ||
| 1340 | |||
| 1341 | #ifdef __MigPackStructs | ||
| 1342 | #pragma pack(push, 4) | ||
| 1343 | #endif | ||
| 1344 | 	typedef struct { | ||
| 1345 | 		mach_msg_header_t Head; | ||
| 1346 | 		/* start of the kernel processed data */ | ||
| 1347 | 		mach_msg_body_t msgh_body; | ||
| 1348 | 		mach_msg_ool_descriptor_t members; | ||
| 1349 | 		/* end of the kernel processed data */ | ||
| 1350 | 		NDR_record_t NDR; | ||
| 1351 | 		mach_msg_type_number_t membersCnt; | ||
| 1352 | 	} __Reply__mach_port_get_set_status_t __attribute__((unused)); | ||
| 1353 | #ifdef __MigPackStructs | ||
| 1354 | #pragma pack(pop) | ||
| 1355 | #endif | ||
| 1356 | |||
| 1357 | #ifdef __MigPackStructs | ||
| 1358 | #pragma pack(push, 4) | ||
| 1359 | #endif | ||
| 1360 | 	typedef struct { | ||
| 1361 | 		mach_msg_header_t Head; | ||
| 1362 | 		NDR_record_t NDR; | ||
| 1363 | 		kern_return_t RetCode; | ||
| 1364 | 	} __Reply__mach_port_move_member_t __attribute__((unused)); | ||
| 1365 | #ifdef __MigPackStructs | ||
| 1366 | #pragma pack(pop) | ||
| 1367 | #endif | ||
| 1368 | |||
| 1369 | #ifdef __MigPackStructs | ||
| 1370 | #pragma pack(push, 4) | ||
| 1371 | #endif | ||
| 1372 | 	typedef struct { | ||
| 1373 | 		mach_msg_header_t Head; | ||
| 1374 | 		/* start of the kernel processed data */ | ||
| 1375 | 		mach_msg_body_t msgh_body; | ||
| 1376 | 		mach_msg_port_descriptor_t previous; | ||
| 1377 | 		/* end of the kernel processed data */ | ||
| 1378 | 	} __Reply__mach_port_request_notification_t __attribute__((unused)); | ||
| 1379 | #ifdef __MigPackStructs | ||
| 1380 | #pragma pack(pop) | ||
| 1381 | #endif | ||
| 1382 | |||
| 1383 | #ifdef __MigPackStructs | ||
| 1384 | #pragma pack(push, 4) | ||
| 1385 | #endif | ||
| 1386 | 	typedef struct { | ||
| 1387 | 		mach_msg_header_t Head; | ||
| 1388 | 		NDR_record_t NDR; | ||
| 1389 | 		kern_return_t RetCode; | ||
| 1390 | 	} __Reply__mach_port_insert_right_t __attribute__((unused)); | ||
| 1391 | #ifdef __MigPackStructs | ||
| 1392 | #pragma pack(pop) | ||
| 1393 | #endif | ||
| 1394 | |||
| 1395 | #ifdef __MigPackStructs | ||
| 1396 | #pragma pack(push, 4) | ||
| 1397 | #endif | ||
| 1398 | 	typedef struct { | ||
| 1399 | 		mach_msg_header_t Head; | ||
| 1400 | 		/* start of the kernel processed data */ | ||
| 1401 | 		mach_msg_body_t msgh_body; | ||
| 1402 | 		mach_msg_port_descriptor_t poly; | ||
| 1403 | 		/* end of the kernel processed data */ | ||
| 1404 | 	} __Reply__mach_port_extract_right_t __attribute__((unused)); | ||
| 1405 | #ifdef __MigPackStructs | ||
| 1406 | #pragma pack(pop) | ||
| 1407 | #endif | ||
| 1408 | |||
| 1409 | #ifdef __MigPackStructs | ||
| 1410 | #pragma pack(push, 4) | ||
| 1411 | #endif | ||
| 1412 | 	typedef struct { | ||
| 1413 | 		mach_msg_header_t Head; | ||
| 1414 | 		NDR_record_t NDR; | ||
| 1415 | 		kern_return_t RetCode; | ||
| 1416 | 	} __Reply__mach_port_set_seqno_t __attribute__((unused)); | ||
| 1417 | #ifdef __MigPackStructs | ||
| 1418 | #pragma pack(pop) | ||
| 1419 | #endif | ||
| 1420 | |||
| 1421 | #ifdef __MigPackStructs | ||
| 1422 | #pragma pack(push, 4) | ||
| 1423 | #endif | ||
| 1424 | 	typedef struct { | ||
| 1425 | 		mach_msg_header_t Head; | ||
| 1426 | 		NDR_record_t NDR; | ||
| 1427 | 		kern_return_t RetCode; | ||
| 1428 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 1429 | 		integer_t port_info_out[17]; | ||
| 1430 | 	} __Reply__mach_port_get_attributes_t __attribute__((unused)); | ||
| 1431 | #ifdef __MigPackStructs | ||
| 1432 | #pragma pack(pop) | ||
| 1433 | #endif | ||
| 1434 | |||
| 1435 | #ifdef __MigPackStructs | ||
| 1436 | #pragma pack(push, 4) | ||
| 1437 | #endif | ||
| 1438 | 	typedef struct { | ||
| 1439 | 		mach_msg_header_t Head; | ||
| 1440 | 		NDR_record_t NDR; | ||
| 1441 | 		kern_return_t RetCode; | ||
| 1442 | 	} __Reply__mach_port_set_attributes_t __attribute__((unused)); | ||
| 1443 | #ifdef __MigPackStructs | ||
| 1444 | #pragma pack(pop) | ||
| 1445 | #endif | ||
| 1446 | |||
| 1447 | #ifdef __MigPackStructs | ||
| 1448 | #pragma pack(push, 4) | ||
| 1449 | #endif | ||
| 1450 | 	typedef struct { | ||
| 1451 | 		mach_msg_header_t Head; | ||
| 1452 | 		NDR_record_t NDR; | ||
| 1453 | 		kern_return_t RetCode; | ||
| 1454 | 		mach_port_qos_t qos; | ||
| 1455 | 		mach_port_name_t name; | ||
| 1456 | 	} __Reply__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 1457 | #ifdef __MigPackStructs | ||
| 1458 | #pragma pack(pop) | ||
| 1459 | #endif | ||
| 1460 | |||
| 1461 | #ifdef __MigPackStructs | ||
| 1462 | #pragma pack(push, 4) | ||
| 1463 | #endif | ||
| 1464 | 	typedef struct { | ||
| 1465 | 		mach_msg_header_t Head; | ||
| 1466 | 		NDR_record_t NDR; | ||
| 1467 | 		kern_return_t RetCode; | ||
| 1468 | 		mach_port_qos_t qos; | ||
| 1469 | 		mach_port_name_t name; | ||
| 1470 | 	} __Reply__mach_port_allocate_full_t __attribute__((unused)); | ||
| 1471 | #ifdef __MigPackStructs | ||
| 1472 | #pragma pack(pop) | ||
| 1473 | #endif | ||
| 1474 | |||
| 1475 | #ifdef __MigPackStructs | ||
| 1476 | #pragma pack(push, 4) | ||
| 1477 | #endif | ||
| 1478 | 	typedef struct { | ||
| 1479 | 		mach_msg_header_t Head; | ||
| 1480 | 		NDR_record_t NDR; | ||
| 1481 | 		kern_return_t RetCode; | ||
| 1482 | 	} __Reply__task_set_port_space_t __attribute__((unused)); | ||
| 1483 | #ifdef __MigPackStructs | ||
| 1484 | #pragma pack(pop) | ||
| 1485 | #endif | ||
| 1486 | |||
| 1487 | #ifdef __MigPackStructs | ||
| 1488 | #pragma pack(push, 4) | ||
| 1489 | #endif | ||
| 1490 | 	typedef struct { | ||
| 1491 | 		mach_msg_header_t Head; | ||
| 1492 | 		NDR_record_t NDR; | ||
| 1493 | 		kern_return_t RetCode; | ||
| 1494 | 		mach_port_rights_t srights; | ||
| 1495 | 	} __Reply__mach_port_get_srights_t __attribute__((unused)); | ||
| 1496 | #ifdef __MigPackStructs | ||
| 1497 | #pragma pack(pop) | ||
| 1498 | #endif | ||
| 1499 | |||
| 1500 | #ifdef __MigPackStructs | ||
| 1501 | #pragma pack(push, 4) | ||
| 1502 | #endif | ||
| 1503 | 	typedef struct { | ||
| 1504 | 		mach_msg_header_t Head; | ||
| 1505 | 		/* start of the kernel processed data */ | ||
| 1506 | 		mach_msg_body_t msgh_body; | ||
| 1507 | 		mach_msg_ool_descriptor_t table_info; | ||
| 1508 | 		mach_msg_ool_descriptor_t tree_info; | ||
| 1509 | 		/* end of the kernel processed data */ | ||
| 1510 | 		NDR_record_t NDR; | ||
| 1511 | 		ipc_info_space_t space_info; | ||
| 1512 | 		mach_msg_type_number_t table_infoCnt; | ||
| 1513 | 		mach_msg_type_number_t tree_infoCnt; | ||
| 1514 | 	} __Reply__mach_port_space_info_t __attribute__((unused)); | ||
| 1515 | #ifdef __MigPackStructs | ||
| 1516 | #pragma pack(pop) | ||
| 1517 | #endif | ||
| 1518 | |||
| 1519 | #ifdef __MigPackStructs | ||
| 1520 | #pragma pack(push, 4) | ||
| 1521 | #endif | ||
| 1522 | 	typedef struct { | ||
| 1523 | 		mach_msg_header_t Head; | ||
| 1524 | 		NDR_record_t NDR; | ||
| 1525 | 		kern_return_t RetCode; | ||
| 1526 | 		unsigned dnr_total; | ||
| 1527 | 		unsigned dnr_used; | ||
| 1528 | 	} __Reply__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 1529 | #ifdef __MigPackStructs | ||
| 1530 | #pragma pack(pop) | ||
| 1531 | #endif | ||
| 1532 | |||
| 1533 | #ifdef __MigPackStructs | ||
| 1534 | #pragma pack(push, 4) | ||
| 1535 | #endif | ||
| 1536 | 	typedef struct { | ||
| 1537 | 		mach_msg_header_t Head; | ||
| 1538 | 		NDR_record_t NDR; | ||
| 1539 | 		kern_return_t RetCode; | ||
| 1540 | 		unsigned object_type; | ||
| 1541 | 		unsigned object_addr; | ||
| 1542 | 	} __Reply__mach_port_kernel_object_t __attribute__((unused)); | ||
| 1543 | #ifdef __MigPackStructs | ||
| 1544 | #pragma pack(pop) | ||
| 1545 | #endif | ||
| 1546 | |||
| 1547 | #ifdef __MigPackStructs | ||
| 1548 | #pragma pack(push, 4) | ||
| 1549 | #endif | ||
| 1550 | 	typedef struct { | ||
| 1551 | 		mach_msg_header_t Head; | ||
| 1552 | 		NDR_record_t NDR; | ||
| 1553 | 		kern_return_t RetCode; | ||
| 1554 | 	} __Reply__mach_port_insert_member_t __attribute__((unused)); | ||
| 1555 | #ifdef __MigPackStructs | ||
| 1556 | #pragma pack(pop) | ||
| 1557 | #endif | ||
| 1558 | |||
| 1559 | #ifdef __MigPackStructs | ||
| 1560 | #pragma pack(push, 4) | ||
| 1561 | #endif | ||
| 1562 | 	typedef struct { | ||
| 1563 | 		mach_msg_header_t Head; | ||
| 1564 | 		NDR_record_t NDR; | ||
| 1565 | 		kern_return_t RetCode; | ||
| 1566 | 	} __Reply__mach_port_extract_member_t __attribute__((unused)); | ||
| 1567 | #ifdef __MigPackStructs | ||
| 1568 | #pragma pack(pop) | ||
| 1569 | #endif | ||
| 1570 | |||
| 1571 | #ifdef __MigPackStructs | ||
| 1572 | #pragma pack(push, 4) | ||
| 1573 | #endif | ||
| 1574 | 	typedef struct { | ||
| 1575 | 		mach_msg_header_t Head; | ||
| 1576 | 		NDR_record_t NDR; | ||
| 1577 | 		kern_return_t RetCode; | ||
| 1578 | 		mach_port_context_t context; | ||
| 1579 | 	} __Reply__mach_port_get_context_t __attribute__((unused)); | ||
| 1580 | #ifdef __MigPackStructs | ||
| 1581 | #pragma pack(pop) | ||
| 1582 | #endif | ||
| 1583 | |||
| 1584 | #ifdef __MigPackStructs | ||
| 1585 | #pragma pack(push, 4) | ||
| 1586 | #endif | ||
| 1587 | 	typedef struct { | ||
| 1588 | 		mach_msg_header_t Head; | ||
| 1589 | 		NDR_record_t NDR; | ||
| 1590 | 		kern_return_t RetCode; | ||
| 1591 | 	} __Reply__mach_port_set_context_t __attribute__((unused)); | ||
| 1592 | #ifdef __MigPackStructs | ||
| 1593 | #pragma pack(pop) | ||
| 1594 | #endif | ||
| 1595 | |||
| 1596 | #ifdef __MigPackStructs | ||
| 1597 | #pragma pack(push, 4) | ||
| 1598 | #endif | ||
| 1599 | 	typedef struct { | ||
| 1600 | 		mach_msg_header_t Head; | ||
| 1601 | 		NDR_record_t NDR; | ||
| 1602 | 		kern_return_t RetCode; | ||
| 1603 | 		natural_t object_type; | ||
| 1604 | 		mach_vm_address_t object_addr; | ||
| 1605 | 	} __Reply__mach_port_kobject_t __attribute__((unused)); | ||
| 1606 | #ifdef __MigPackStructs | ||
| 1607 | #pragma pack(pop) | ||
| 1608 | #endif | ||
| 1609 | |||
| 1610 | #ifdef __MigPackStructs | ||
| 1611 | #pragma pack(push, 4) | ||
| 1612 | #endif | ||
| 1613 | 	typedef struct { | ||
| 1614 | 		mach_msg_header_t Head; | ||
| 1615 | 		NDR_record_t NDR; | ||
| 1616 | 		kern_return_t RetCode; | ||
| 1617 | 		mach_port_name_t name; | ||
| 1618 | 	} __Reply__mach_port_construct_t __attribute__((unused)); | ||
| 1619 | #ifdef __MigPackStructs | ||
| 1620 | #pragma pack(pop) | ||
| 1621 | #endif | ||
| 1622 | |||
| 1623 | #ifdef __MigPackStructs | ||
| 1624 | #pragma pack(push, 4) | ||
| 1625 | #endif | ||
| 1626 | 	typedef struct { | ||
| 1627 | 		mach_msg_header_t Head; | ||
| 1628 | 		NDR_record_t NDR; | ||
| 1629 | 		kern_return_t RetCode; | ||
| 1630 | 	} __Reply__mach_port_destruct_t __attribute__((unused)); | ||
| 1631 | #ifdef __MigPackStructs | ||
| 1632 | #pragma pack(pop) | ||
| 1633 | #endif | ||
| 1634 | |||
| 1635 | #ifdef __MigPackStructs | ||
| 1636 | #pragma pack(push, 4) | ||
| 1637 | #endif | ||
| 1638 | 	typedef struct { | ||
| 1639 | 		mach_msg_header_t Head; | ||
| 1640 | 		NDR_record_t NDR; | ||
| 1641 | 		kern_return_t RetCode; | ||
| 1642 | 	} __Reply__mach_port_guard_t __attribute__((unused)); | ||
| 1643 | #ifdef __MigPackStructs | ||
| 1644 | #pragma pack(pop) | ||
| 1645 | #endif | ||
| 1646 | |||
| 1647 | #ifdef __MigPackStructs | ||
| 1648 | #pragma pack(push, 4) | ||
| 1649 | #endif | ||
| 1650 | 	typedef struct { | ||
| 1651 | 		mach_msg_header_t Head; | ||
| 1652 | 		NDR_record_t NDR; | ||
| 1653 | 		kern_return_t RetCode; | ||
| 1654 | 	} __Reply__mach_port_unguard_t __attribute__((unused)); | ||
| 1655 | #ifdef __MigPackStructs | ||
| 1656 | #pragma pack(pop) | ||
| 1657 | #endif | ||
| 1658 | |||
| 1659 | #ifdef __MigPackStructs | ||
| 1660 | #pragma pack(push, 4) | ||
| 1661 | #endif | ||
| 1662 | 	typedef struct { | ||
| 1663 | 		mach_msg_header_t Head; | ||
| 1664 | 		NDR_record_t NDR; | ||
| 1665 | 		kern_return_t RetCode; | ||
| 1666 | 		ipc_info_space_basic_t basic_info; | ||
| 1667 | 	} __Reply__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1668 | #ifdef __MigPackStructs | ||
| 1669 | #pragma pack(pop) | ||
| 1670 | #endif | ||
| 1671 | |||
| 1672 | #ifdef __MigPackStructs | ||
| 1673 | #pragma pack(push, 4) | ||
| 1674 | #endif | ||
| 1675 | 	typedef struct { | ||
| 1676 | 		mach_msg_header_t Head; | ||
| 1677 | 		NDR_record_t NDR; | ||
| 1678 | 		kern_return_t RetCode; | ||
| 1679 | 	} __Reply__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1680 | #ifdef __MigPackStructs | ||
| 1681 | #pragma pack(pop) | ||
| 1682 | #endif | ||
| 1683 | |||
| 1684 | #ifdef __MigPackStructs | ||
| 1685 | #pragma pack(push, 4) | ||
| 1686 | #endif | ||
| 1687 | 	typedef struct { | ||
| 1688 | 		mach_msg_header_t Head; | ||
| 1689 | 		NDR_record_t NDR; | ||
| 1690 | 		kern_return_t RetCode; | ||
| 1691 | 	} __Reply__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1692 | #ifdef __MigPackStructs | ||
| 1693 | #pragma pack(pop) | ||
| 1694 | #endif | ||
| 1695 | |||
| 1696 | #ifdef __MigPackStructs | ||
| 1697 | #pragma pack(push, 4) | ||
| 1698 | #endif | ||
| 1699 | 	typedef struct { | ||
| 1700 | 		mach_msg_header_t Head; | ||
| 1701 | 		NDR_record_t NDR; | ||
| 1702 | 		kern_return_t RetCode; | ||
| 1703 | 		natural_t object_type; | ||
| 1704 | 		mach_vm_address_t object_addr; | ||
| 1705 | 		mach_msg_type_number_t descriptionOffset; /* MiG doesn't use it */ | ||
| 1706 | 		mach_msg_type_number_t descriptionCnt; | ||
| 1707 | 		char description[512]; | ||
| 1708 | 	} __Reply__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1709 | #ifdef __MigPackStructs | ||
| 1710 | #pragma pack(pop) | ||
| 1711 | #endif | ||
| 1712 | #endif /* !__Reply__mach_port_subsystem__defined */ | ||
| 1713 | |||
| 1714 | /* union of all replies */ | ||
| 1715 | |||
| 1716 | #ifndef __ReplyUnion__mach_port_subsystem__defined | ||
| 1717 | #define __ReplyUnion__mach_port_subsystem__defined | ||
| 1718 | union __ReplyUnion__mach_port_subsystem { | ||
| 1719 | 	__Reply__mach_port_names_t Reply_mach_port_names; | ||
| 1720 | 	__Reply__mach_port_type_t Reply_mach_port_type; | ||
| 1721 | 	__Reply__mach_port_rename_t Reply_mach_port_rename; | ||
| 1722 | 	__Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; | ||
| 1723 | 	__Reply__mach_port_allocate_t Reply_mach_port_allocate; | ||
| 1724 | 	__Reply__mach_port_destroy_t Reply_mach_port_destroy; | ||
| 1725 | 	__Reply__mach_port_deallocate_t Reply_mach_port_deallocate; | ||
| 1726 | 	__Reply__mach_port_get_refs_t Reply_mach_port_get_refs; | ||
| 1727 | 	__Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; | ||
| 1728 | 	__Reply__mach_port_peek_t Reply_mach_port_peek; | ||
| 1729 | 	__Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; | ||
| 1730 | 	__Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; | ||
| 1731 | 	__Reply__mach_port_move_member_t Reply_mach_port_move_member; | ||
| 1732 | 	__Reply__mach_port_request_notification_t Reply_mach_port_request_notification; | ||
| 1733 | 	__Reply__mach_port_insert_right_t Reply_mach_port_insert_right; | ||
| 1734 | 	__Reply__mach_port_extract_right_t Reply_mach_port_extract_right; | ||
| 1735 | 	__Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; | ||
| 1736 | 	__Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; | ||
| 1737 | 	__Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; | ||
| 1738 | 	__Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; | ||
| 1739 | 	__Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; | ||
| 1740 | 	__Reply__task_set_port_space_t Reply_task_set_port_space; | ||
| 1741 | 	__Reply__mach_port_get_srights_t Reply_mach_port_get_srights; | ||
| 1742 | 	__Reply__mach_port_space_info_t Reply_mach_port_space_info; | ||
| 1743 | 	__Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; | ||
| 1744 | 	__Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; | ||
| 1745 | 	__Reply__mach_port_insert_member_t Reply_mach_port_insert_member; | ||
| 1746 | 	__Reply__mach_port_extract_member_t Reply_mach_port_extract_member; | ||
| 1747 | 	__Reply__mach_port_get_context_t Reply_mach_port_get_context; | ||
| 1748 | 	__Reply__mach_port_set_context_t Reply_mach_port_set_context; | ||
| 1749 | 	__Reply__mach_port_kobject_t Reply_mach_port_kobject; | ||
| 1750 | 	__Reply__mach_port_construct_t Reply_mach_port_construct; | ||
| 1751 | 	__Reply__mach_port_destruct_t Reply_mach_port_destruct; | ||
| 1752 | 	__Reply__mach_port_guard_t Reply_mach_port_guard; | ||
| 1753 | 	__Reply__mach_port_unguard_t Reply_mach_port_unguard; | ||
| 1754 | 	__Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info; | ||
| 1755 | 	__Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags; | ||
| 1756 | 	__Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard; | ||
| 1757 | 	__Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description; | ||
| 1758 | }; | ||
| 1759 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1760 | |||
| 1761 | #ifndef subsystem_to_name_map_mach_port | ||
| 1762 | #define subsystem_to_name_map_mach_port \ | ||
| 1763 | { "mach_port_names", 3200 },\ | ||
| 1764 | { "mach_port_type", 3201 },\ | ||
| 1765 | { "mach_port_rename", 3202 },\ | ||
| 1766 | { "mach_port_allocate_name", 3203 },\ | ||
| 1767 | { "mach_port_allocate", 3204 },\ | ||
| 1768 | { "mach_port_destroy", 3205 },\ | ||
| 1769 | { "mach_port_deallocate", 3206 },\ | ||
| 1770 | { "mach_port_get_refs", 3207 },\ | ||
| 1771 | { "mach_port_mod_refs", 3208 },\ | ||
| 1772 | { "mach_port_peek", 3209 },\ | ||
| 1773 | { "mach_port_set_mscount", 3210 },\ | ||
| 1774 | { "mach_port_get_set_status", 3211 },\ | ||
| 1775 | { "mach_port_move_member", 3212 },\ | ||
| 1776 | { "mach_port_request_notification", 3213 },\ | ||
| 1777 | { "mach_port_insert_right", 3214 },\ | ||
| 1778 | { "mach_port_extract_right", 3215 },\ | ||
| 1779 | { "mach_port_set_seqno", 3216 },\ | ||
| 1780 | { "mach_port_get_attributes", 3217 },\ | ||
| 1781 | { "mach_port_set_attributes", 3218 },\ | ||
| 1782 | { "mach_port_allocate_qos", 3219 },\ | ||
| 1783 | { "mach_port_allocate_full", 3220 },\ | ||
| 1784 | { "task_set_port_space", 3221 },\ | ||
| 1785 | { "mach_port_get_srights", 3222 },\ | ||
| 1786 | { "mach_port_space_info", 3223 },\ | ||
| 1787 | { "mach_port_dnrequest_info", 3224 },\ | ||
| 1788 | { "mach_port_kernel_object", 3225 },\ | ||
| 1789 | { "mach_port_insert_member", 3226 },\ | ||
| 1790 | { "mach_port_extract_member", 3227 },\ | ||
| 1791 | { "mach_port_get_context", 3228 },\ | ||
| 1792 | { "mach_port_set_context", 3229 },\ | ||
| 1793 | { "mach_port_kobject", 3230 },\ | ||
| 1794 | { "mach_port_construct", 3231 },\ | ||
| 1795 | { "mach_port_destruct", 3232 },\ | ||
| 1796 | { "mach_port_guard", 3233 },\ | ||
| 1797 | { "mach_port_unguard", 3234 },\ | ||
| 1798 | { "mach_port_space_basic_info", 3235 },\ | ||
| 1799 | { "mach_port_guard_with_flags", 3237 },\ | ||
| 1800 | { "mach_port_swap_guard", 3238 },\ | ||
| 1801 | { "mach_port_kobject_description", 3239 } | ||
| 1802 | #endif | ||
| 1803 | |||
| 1804 | #ifdef __AfterMigUserHeader | ||
| 1805 | __AfterMigUserHeader | ||
| 1806 | #endif /* __AfterMigUserHeader */ | ||
| 1807 | |||
| 1808 | #endif	 /* _mach_port_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/mach_types.h+5| ... | @@ -218,6 +218,7 @@ typedef exception_handler_t exception_port_t; | ... | @@ -218,6 +218,7 @@ typedef exception_handler_t exception_port_t; |
| 218 | typedef exception_handler_array_t exception_port_arrary_t; | 218 | typedef exception_handler_array_t exception_port_arrary_t; |
| 219 | typedef char vfs_path_t[4096]; | 219 | typedef char vfs_path_t[4096]; |
| 220 | typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */ | 220 | typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */ |
| 221 | typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */ | ||
| 221 | typedef char suid_cred_path_t[1024]; | 222 | typedef char suid_cred_path_t[1024]; |
| 222 | typedef uint32_t suid_cred_uid_t; | 223 | typedef uint32_t suid_cred_uid_t; |
| 223 | 224 | ||
| ... | @@ -261,12 +262,16 @@ typedef unsigned int mach_task_flavor_t; | ... | @@ -261,12 +262,16 @@ typedef unsigned int mach_task_flavor_t; |
| 261 | #define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */ | 262 | #define TASK_FLAVOR_INSPECT 2 /* a task_inspect_t */ |
| 262 | #define TASK_FLAVOR_NAME 3 /* a task_name_t */ | 263 | #define TASK_FLAVOR_NAME 3 /* a task_name_t */ |
| 263 | 264 | ||
| 265 | #define TASK_FLAVOR_MAX TASK_FLAVOR_NAME | ||
| 266 | |||
| 264 | /* capability strictly _DECREASING_ */ | 267 | /* capability strictly _DECREASING_ */ |
| 265 | typedef unsigned int mach_thread_flavor_t; | 268 | typedef unsigned int mach_thread_flavor_t; |
| 266 | #define THREAD_FLAVOR_CONTROL 0 /* a thread_t */ | 269 | #define THREAD_FLAVOR_CONTROL 0 /* a thread_t */ |
| 267 | #define THREAD_FLAVOR_READ 1 /* a thread_read_t */ | 270 | #define THREAD_FLAVOR_READ 1 /* a thread_read_t */ |
| 268 | #define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */ | 271 | #define THREAD_FLAVOR_INSPECT 2 /* a thread_inspect_t */ |
| 269 | 272 | ||
| 273 | #define THREAD_FLAVOR_MAX THREAD_FLAVOR_INSPECT | ||
| 274 | |||
| 270 | /* DEPRECATED */ | 275 | /* DEPRECATED */ |
| 271 | typedef natural_t ledger_item_t; | 276 | typedef natural_t ledger_item_t; |
| 272 | #define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0)) | 277 | #define LEDGER_ITEM_INFINITY ((ledger_item_t) (~0)) |
lib/libc/include/any-macos.11-any/mach/machine.h deleted-409| ... | @@ -1,409 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2007-2016 Apple, Inc. All rights reserved. | ||
| 3 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * This file contains Original Code and/or Modifications of Original Code | ||
| 8 | * as defined in and that are subject to the Apple Public Source License | ||
| 9 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 10 | * compliance with the License. The rights granted to you under the License | ||
| 11 | * may not be used to create, or enable the creation or redistribution of, | ||
| 12 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 13 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 14 | * terms of an Apple operating system software license agreement. | ||
| 15 | * | ||
| 16 | * Please obtain a copy of the License at | ||
| 17 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 18 | * | ||
| 19 | * The Original Code and all software distributed under the License are | ||
| 20 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 21 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 22 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 23 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 24 | * Please see the License for the specific language governing rights and | ||
| 25 | * limitations under the License. | ||
| 26 | * | ||
| 27 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 28 | */ | ||
| 29 | /* | ||
| 30 | * Mach Operating System | ||
| 31 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 32 | * All Rights Reserved. | ||
| 33 | * | ||
| 34 | * Permission to use, copy, modify and distribute this software and its | ||
| 35 | * documentation is hereby granted, provided that both the copyright | ||
| 36 | * notice and this permission notice appear in all copies of the | ||
| 37 | * software, derivative works or modified versions, and any portions | ||
| 38 | * thereof, and that both notices appear in supporting documentation. | ||
| 39 | * | ||
| 40 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 41 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 42 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 43 | * | ||
| 44 | * Carnegie Mellon requests users of this software to return to | ||
| 45 | * | ||
| 46 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 47 | * School of Computer Science | ||
| 48 | * Carnegie Mellon University | ||
| 49 | * Pittsburgh PA 15213-3890 | ||
| 50 | * | ||
| 51 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 52 | * the rights to redistribute these changes. | ||
| 53 | */ | ||
| 54 | /*	File:	machine.h | ||
| 55 | *	Author:	Avadis Tevanian, Jr. | ||
| 56 | *	Date:	1986 | ||
| 57 | * | ||
| 58 | *	Machine independent machine abstraction. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef _MACH_MACHINE_H_ | ||
| 62 | #define _MACH_MACHINE_H_ | ||
| 63 | |||
| 64 | #ifndef __ASSEMBLER__ | ||
| 65 | |||
| 66 | #include <stdint.h> | ||
| 67 | #include <mach/machine/vm_types.h> | ||
| 68 | #include <mach/boolean.h> | ||
| 69 | |||
| 70 | typedef integer_t cpu_type_t; | ||
| 71 | typedef integer_t cpu_subtype_t; | ||
| 72 | typedef integer_t cpu_threadtype_t; | ||
| 73 | |||
| 74 | #define CPU_STATE_MAX 4 | ||
| 75 | |||
| 76 | #define CPU_STATE_USER 0 | ||
| 77 | #define CPU_STATE_SYSTEM 1 | ||
| 78 | #define CPU_STATE_IDLE 2 | ||
| 79 | #define CPU_STATE_NICE 3 | ||
| 80 | |||
| 81 | |||
| 82 | |||
| 83 | /* | ||
| 84 | * Capability bits used in the definition of cpu_type. | ||
| 85 | */ | ||
| 86 | #define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */ | ||
| 87 | #define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */ | ||
| 88 | #define CPU_ARCH_ABI64_32 0x02000000 /* ABI for 64-bit hardware with 32-bit types; LP32 */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | *	Machine types known by all. | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define CPU_TYPE_ANY ((cpu_type_t) -1) | ||
| 95 | |||
| 96 | #define CPU_TYPE_VAX ((cpu_type_t) 1) | ||
| 97 | /* skip				((cpu_type_t) 2)	*/ | ||
| 98 | /* skip				((cpu_type_t) 3)	*/ | ||
| 99 | /* skip				((cpu_type_t) 4)	*/ | ||
| 100 | /* skip				((cpu_type_t) 5)	*/ | ||
| 101 | #define CPU_TYPE_MC680x0 ((cpu_type_t) 6) | ||
| 102 | #define CPU_TYPE_X86 ((cpu_type_t) 7) | ||
| 103 | #define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */ | ||
| 104 | #define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64) | ||
| 105 | |||
| 106 | /* skip CPU_TYPE_MIPS		((cpu_type_t) 8)	*/ | ||
| 107 | /* skip ((cpu_type_t) 9)	*/ | ||
| 108 | #define CPU_TYPE_MC98000 ((cpu_type_t) 10) | ||
| 109 | #define CPU_TYPE_HPPA ((cpu_type_t) 11) | ||
| 110 | #define CPU_TYPE_ARM ((cpu_type_t) 12) | ||
| 111 | #define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) | ||
| 112 | #define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32) | ||
| 113 | #define CPU_TYPE_MC88000 ((cpu_type_t) 13) | ||
| 114 | #define CPU_TYPE_SPARC ((cpu_type_t) 14) | ||
| 115 | #define CPU_TYPE_I860 ((cpu_type_t) 15) | ||
| 116 | /* skip	CPU_TYPE_ALPHA		((cpu_type_t) 16)	*/ | ||
| 117 | /* skip				((cpu_type_t) 17)	*/ | ||
| 118 | #define CPU_TYPE_POWERPC ((cpu_type_t) 18) | ||
| 119 | #define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) | ||
| 120 | /* skip				((cpu_type_t) 19)	*/ | ||
| 121 | /* skip				((cpu_type_t) 20 */ | ||
| 122 | /* skip				((cpu_type_t) 21 */ | ||
| 123 | /* skip				((cpu_type_t) 22 */ | ||
| 124 | |||
| 125 | /* | ||
| 126 | *	Machine subtypes (these are defined here, instead of in a machine | ||
| 127 | *	dependent directory, so that any program can get all definitions | ||
| 128 | *	regardless of where is it compiled). | ||
| 129 | */ | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Capability bits used in the definition of cpu_subtype. | ||
| 133 | */ | ||
| 134 | #define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */ | ||
| 135 | #define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */ | ||
| 136 | #define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */ | ||
| 137 | |||
| 138 | /* | ||
| 139 | * When selecting a slice, ANY will pick the slice with the best | ||
| 140 | * grading for the selected cpu_type_t, unlike the "ALL" subtypes, | ||
| 141 | * which are the slices that can run on any hardware for that cpu type. | ||
| 142 | */ | ||
| 143 | #define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1) | ||
| 144 | |||
| 145 | /* | ||
| 146 | *	Object files that are hand-crafted to run on any | ||
| 147 | *	implementation of an architecture are tagged with | ||
| 148 | *	CPU_SUBTYPE_MULTIPLE. This functions essentially the same as | ||
| 149 | *	the "ALL" subtype of an architecture except that it allows us | ||
| 150 | *	to easily find object files that may need to be modified | ||
| 151 | *	whenever a new implementation of an architecture comes out. | ||
| 152 | * | ||
| 153 | *	It is the responsibility of the implementor to make sure the | ||
| 154 | *	software handles unsupported implementations elegantly. | ||
| 155 | */ | ||
| 156 | #define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) | ||
| 157 | #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) | ||
| 158 | #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Machine threadtypes. | ||
| 162 | * This is none - not defined - for most machine types/subtypes. | ||
| 163 | */ | ||
| 164 | #define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0) | ||
| 165 | |||
| 166 | /* | ||
| 167 | *	VAX subtypes (these do *not* necessary conform to the actual cpu | ||
| 168 | *	ID assigned by DEC available via the SID register). | ||
| 169 | */ | ||
| 170 | |||
| 171 | #define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0) | ||
| 172 | #define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1) | ||
| 173 | #define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2) | ||
| 174 | #define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3) | ||
| 175 | #define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4) | ||
| 176 | #define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5) | ||
| 177 | #define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6) | ||
| 178 | #define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7) | ||
| 179 | #define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8) | ||
| 180 | #define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9) | ||
| 181 | #define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10) | ||
| 182 | #define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11) | ||
| 183 | #define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12) | ||
| 184 | |||
| 185 | /* | ||
| 186 | * 680x0 subtypes | ||
| 187 | * | ||
| 188 | * The subtype definitions here are unusual for historical reasons. | ||
| 189 | * NeXT used to consider 68030 code as generic 68000 code. For | ||
| 190 | * backwards compatability: | ||
| 191 | * | ||
| 192 | *	CPU_SUBTYPE_MC68030 symbol has been preserved for source code | ||
| 193 | *	compatability. | ||
| 194 | * | ||
| 195 | *	CPU_SUBTYPE_MC680x0_ALL has been defined to be the same | ||
| 196 | *	subtype as CPU_SUBTYPE_MC68030 for binary comatability. | ||
| 197 | * | ||
| 198 | *	CPU_SUBTYPE_MC68030_ONLY has been added to allow new object | ||
| 199 | *	files to be tagged as containing 68030-specific instructions. | ||
| 200 | */ | ||
| 201 | |||
| 202 | #define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1) | ||
| 203 | #define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */ | ||
| 204 | #define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2) | ||
| 205 | #define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3) | ||
| 206 | |||
| 207 | /* | ||
| 208 | *	I386 subtypes | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4)) | ||
| 212 | |||
| 213 | #define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0) | ||
| 214 | #define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0) | ||
| 215 | #define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0) | ||
| 216 | #define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128 | ||
| 217 | #define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0) | ||
| 218 | #define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0) | ||
| 219 | #define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1) | ||
| 220 | #define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3) | ||
| 221 | #define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5) | ||
| 222 | #define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6) | ||
| 223 | #define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7) | ||
| 224 | #define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0) | ||
| 225 | #define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1) | ||
| 226 | #define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2) | ||
| 227 | #define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0) | ||
| 228 | #define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0) | ||
| 229 | #define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1) | ||
| 230 | #define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0) | ||
| 231 | #define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1) | ||
| 232 | #define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0) | ||
| 233 | #define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1) | ||
| 234 | |||
| 235 | #define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15) | ||
| 236 | #define CPU_SUBTYPE_INTEL_FAMILY_MAX 15 | ||
| 237 | |||
| 238 | #define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4) | ||
| 239 | #define CPU_SUBTYPE_INTEL_MODEL_ALL 0 | ||
| 240 | |||
| 241 | /* | ||
| 242 | *	X86 subtypes. | ||
| 243 | */ | ||
| 244 | |||
| 245 | #define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) | ||
| 246 | #define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3) | ||
| 247 | #define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4) | ||
| 248 | #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8) /* Haswell feature subset */ | ||
| 249 | |||
| 250 | |||
| 251 | #define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1) | ||
| 252 | |||
| 253 | /* | ||
| 254 | *	Mips subtypes. | ||
| 255 | */ | ||
| 256 | |||
| 257 | #define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0) | ||
| 258 | #define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1) | ||
| 259 | #define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2) | ||
| 260 | #define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3) | ||
| 261 | #define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */ | ||
| 262 | #define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5) | ||
| 263 | #define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */ | ||
| 264 | #define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7) | ||
| 265 | |||
| 266 | /* | ||
| 267 | *	MC98000 (PowerPC) subtypes | ||
| 268 | */ | ||
| 269 | #define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0) | ||
| 270 | #define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1) | ||
| 271 | |||
| 272 | /* | ||
| 273 | *	HPPA subtypes for Hewlett-Packard HP-PA family of | ||
| 274 | *	risc processors. Port by NeXT to 700 series. | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0) | ||
| 278 | #define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */ | ||
| 279 | #define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) | ||
| 280 | |||
| 281 | /* | ||
| 282 | *	MC88000 subtypes. | ||
| 283 | */ | ||
| 284 | #define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0) | ||
| 285 | #define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) | ||
| 286 | #define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) | ||
| 287 | |||
| 288 | /* | ||
| 289 | *	SPARC subtypes | ||
| 290 | */ | ||
| 291 | #define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) | ||
| 292 | |||
| 293 | /* | ||
| 294 | *	I860 subtypes | ||
| 295 | */ | ||
| 296 | #define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0) | ||
| 297 | #define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1) | ||
| 298 | |||
| 299 | /* | ||
| 300 | *	PowerPC subtypes | ||
| 301 | */ | ||
| 302 | #define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0) | ||
| 303 | #define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1) | ||
| 304 | #define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2) | ||
| 305 | #define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3) | ||
| 306 | #define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4) | ||
| 307 | #define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5) | ||
| 308 | #define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6) | ||
| 309 | #define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7) | ||
| 310 | #define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8) | ||
| 311 | #define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9) | ||
| 312 | #define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10) | ||
| 313 | #define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11) | ||
| 314 | #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) | ||
| 315 | |||
| 316 | /* | ||
| 317 | *	ARM subtypes | ||
| 318 | */ | ||
| 319 | #define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) | ||
| 320 | #define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) | ||
| 321 | #define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) | ||
| 322 | #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) | ||
| 323 | #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) | ||
| 324 | #define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) /* ARMv7-A and ARMv7-R */ | ||
| 325 | #define CPU_SUBTYPE_ARM_V7F ((cpu_subtype_t) 10) /* Cortex A9 */ | ||
| 326 | #define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */ | ||
| 327 | #define CPU_SUBTYPE_ARM_V7K ((cpu_subtype_t) 12) | ||
| 328 | #define CPU_SUBTYPE_ARM_V8 ((cpu_subtype_t) 13) | ||
| 329 | #define CPU_SUBTYPE_ARM_V6M ((cpu_subtype_t) 14) /* Not meant to be run under xnu */ | ||
| 330 | #define CPU_SUBTYPE_ARM_V7M ((cpu_subtype_t) 15) /* Not meant to be run under xnu */ | ||
| 331 | #define CPU_SUBTYPE_ARM_V7EM ((cpu_subtype_t) 16) /* Not meant to be run under xnu */ | ||
| 332 | #define CPU_SUBTYPE_ARM_V8M ((cpu_subtype_t) 17) /* Not meant to be run under xnu */ | ||
| 333 | |||
| 334 | /* | ||
| 335 | * ARM64 subtypes | ||
| 336 | */ | ||
| 337 | #define CPU_SUBTYPE_ARM64_ALL ((cpu_subtype_t) 0) | ||
| 338 | #define CPU_SUBTYPE_ARM64_V8 ((cpu_subtype_t) 1) | ||
| 339 | #define CPU_SUBTYPE_ARM64E ((cpu_subtype_t) 2) | ||
| 340 | |||
| 341 | /* CPU subtype feature flags for ptrauth on arm64e platforms */ | ||
| 342 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_MASK 0x0f000000 | ||
| 343 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_VERSION(x) (((x) & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) >> 24) | ||
| 344 | |||
| 345 | /* | ||
| 346 | * ARM64_32 subtypes | ||
| 347 | */ | ||
| 348 | #define CPU_SUBTYPE_ARM64_32_ALL ((cpu_subtype_t) 0) | ||
| 349 | #define CPU_SUBTYPE_ARM64_32_V8 ((cpu_subtype_t) 1) | ||
| 350 | |||
| 351 | #endif /* !__ASSEMBLER__ */ | ||
| 352 | |||
| 353 | /* | ||
| 354 | *	CPU families (sysctl hw.cpufamily) | ||
| 355 | * | ||
| 356 | * These are meant to identify the CPU's marketing name - an | ||
| 357 | * application can map these to (possibly) localized strings. | ||
| 358 | * NB: the encodings of the CPU families are intentionally arbitrary. | ||
| 359 | * There is no ordering, and you should never try to deduce whether | ||
| 360 | * or not some feature is available based on the family. | ||
| 361 | * Use feature flags (eg, hw.optional.altivec) to test for optional | ||
| 362 | * functionality. | ||
| 363 | */ | ||
| 364 | #define CPUFAMILY_UNKNOWN 0 | ||
| 365 | #define CPUFAMILY_POWERPC_G3 0xcee41549 | ||
| 366 | #define CPUFAMILY_POWERPC_G4 0x77c184ae | ||
| 367 | #define CPUFAMILY_POWERPC_G5 0xed76d8aa | ||
| 368 | #define CPUFAMILY_INTEL_6_13 0xaa33392b | ||
| 369 | #define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc | ||
| 370 | #define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2 | ||
| 371 | #define CPUFAMILY_INTEL_WESTMERE 0x573b5eec | ||
| 372 | #define CPUFAMILY_INTEL_SANDYBRIDGE 0x5490b78c | ||
| 373 | #define CPUFAMILY_INTEL_IVYBRIDGE 0x1f65e835 | ||
| 374 | #define CPUFAMILY_INTEL_HASWELL 0x10b282dc | ||
| 375 | #define CPUFAMILY_INTEL_BROADWELL 0x582ed09c | ||
| 376 | #define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f | ||
| 377 | #define CPUFAMILY_INTEL_KABYLAKE 0x0f817246 | ||
| 378 | #define CPUFAMILY_INTEL_ICELAKE 0x38435547 | ||
| 379 | #define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e | ||
| 380 | #define CPUFAMILY_ARM_9 0xe73283ae | ||
| 381 | #define CPUFAMILY_ARM_11 0x8ff620d8 | ||
| 382 | #define CPUFAMILY_ARM_XSCALE 0x53b005f5 | ||
| 383 | #define CPUFAMILY_ARM_12 0xbd1b0ae9 | ||
| 384 | #define CPUFAMILY_ARM_13 0x0cc90e64 | ||
| 385 | #define CPUFAMILY_ARM_14 0x96077ef1 | ||
| 386 | #define CPUFAMILY_ARM_15 0xa8511bca | ||
| 387 | #define CPUFAMILY_ARM_SWIFT 0x1e2d6381 | ||
| 388 | #define CPUFAMILY_ARM_CYCLONE 0x37a09642 | ||
| 389 | #define CPUFAMILY_ARM_TYPHOON 0x2c91a47e | ||
| 390 | #define CPUFAMILY_ARM_TWISTER 0x92fb37c8 | ||
| 391 | #define CPUFAMILY_ARM_HURRICANE 0x67ceee93 | ||
| 392 | #define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6 | ||
| 393 | #define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f | ||
| 394 | #define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2 | ||
| 395 | #define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3 | ||
| 396 | |||
| 397 | #define CPUSUBFAMILY_UNKNOWN 0 | ||
| 398 | #define CPUSUBFAMILY_ARM_HP 1 | ||
| 399 | #define CPUSUBFAMILY_ARM_HG 2 | ||
| 400 | #define CPUSUBFAMILY_ARM_M 3 | ||
| 401 | #define CPUSUBFAMILY_ARM_HS 4 | ||
| 402 | #define CPUSUBFAMILY_ARM_HC_HD 5 | ||
| 403 | |||
| 404 | /* The following synonyms are deprecated: */ | ||
| 405 | #define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN | ||
| 406 | #define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM | ||
| 407 | |||
| 408 | |||
| 409 | #endif /* _MACH_MACHINE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/machine/thread_state.h deleted-40| ... | @@ -1,40 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_MACHINE_THREAD_STATE_H_ | ||
| 30 | #define _MACH_MACHINE_THREAD_STATE_H_ | ||
| 31 | |||
| 32 | #if defined (__i386__) || defined(__x86_64__) | ||
| 33 | #include "mach/i386/thread_state.h" | ||
| 34 | #elif defined (__arm__) || defined (__arm64__) | ||
| 35 | #include "mach/arm/thread_state.h" | ||
| 36 | #else | ||
| 37 | #error architecture not supported | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #endif /* _MACH_MACHINE_THREAD_STATE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/message.h deleted-908| ... | @@ -1,908 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | * Copyright (c) 2005 SPARTA, Inc. | ||
| 62 | */ | ||
| 63 | /* | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | *	File:	mach/message.h | ||
| 67 | * | ||
| 68 | *	Mach IPC message and primitive function definitions. | ||
| 69 | */ | ||
| 70 | |||
| 71 | #ifndef _MACH_MESSAGE_H_ | ||
| 72 | #define _MACH_MESSAGE_H_ | ||
| 73 | |||
| 74 | #include <stdint.h> | ||
| 75 | #include <mach/port.h> | ||
| 76 | #include <mach/boolean.h> | ||
| 77 | #include <mach/kern_return.h> | ||
| 78 | #include <mach/machine/vm_types.h> | ||
| 79 | |||
| 80 | #include <sys/cdefs.h> | ||
| 81 | #include <sys/appleapiopts.h> | ||
| 82 | #include <Availability.h> | ||
| 83 | |||
| 84 | /* | ||
| 85 | * The timeout mechanism uses mach_msg_timeout_t values, | ||
| 86 | * passed by value. The timeout units are milliseconds. | ||
| 87 | * It is controlled with the MACH_SEND_TIMEOUT | ||
| 88 | * and MACH_RCV_TIMEOUT options. | ||
| 89 | */ | ||
| 90 | |||
| 91 | typedef natural_t mach_msg_timeout_t; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * The value to be used when there is no timeout. | ||
| 95 | * (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.) | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0) | ||
| 99 | |||
| 100 | /* | ||
| 101 | * The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it | ||
| 102 | * assumes the body of the message doesn't contain port rights or OOL | ||
| 103 | * data. The field is set in received messages. A user task must | ||
| 104 | * use caution in interpreting the body of a message if the bit isn't | ||
| 105 | * on, because the mach_msg_type's in the body might "lie" about the | ||
| 106 | * contents. If the bit isn't on, but the mach_msg_types | ||
| 107 | * in the body specify rights or OOL data, the behavior is undefined. | ||
| 108 | * (Ie, an error may or may not be produced.) | ||
| 109 | * | ||
| 110 | * The value of MACH_MSGH_BITS_REMOTE determines the interpretation | ||
| 111 | * of the msgh_remote_port field. It is handled like a msgt_name, | ||
| 112 | * but must result in a send or send-once type right. | ||
| 113 | * | ||
| 114 | * The value of MACH_MSGH_BITS_LOCAL determines the interpretation | ||
| 115 | * of the msgh_local_port field. It is handled like a msgt_name, | ||
| 116 | * and also must result in a send or send-once type right. | ||
| 117 | * | ||
| 118 | * The value of MACH_MSGH_BITS_VOUCHER determines the interpretation | ||
| 119 | * of the msgh_voucher_port field. It is handled like a msgt_name, | ||
| 120 | * but must result in a send right (and the msgh_voucher_port field | ||
| 121 | * must be the name of a send right to a Mach voucher kernel object. | ||
| 122 | * | ||
| 123 | * MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote | ||
| 124 | * and local fields, into a single value suitable for msgh_bits. | ||
| 125 | * | ||
| 126 | * MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally. | ||
| 127 | * | ||
| 128 | * The unused bits should be zero and are reserved for the kernel | ||
| 129 | * or for future interface expansion. | ||
| 130 | */ | ||
| 131 | |||
| 132 | #define MACH_MSGH_BITS_ZERO 0x00000000 | ||
| 133 | |||
| 134 | #define MACH_MSGH_BITS_REMOTE_MASK 0x0000001f | ||
| 135 | #define MACH_MSGH_BITS_LOCAL_MASK 0x00001f00 | ||
| 136 | #define MACH_MSGH_BITS_VOUCHER_MASK 0x001f0000 | ||
| 137 | |||
| 138 | #define MACH_MSGH_BITS_PORTS_MASK \ | ||
| 139 | 	 (MACH_MSGH_BITS_REMOTE_MASK | \ | ||
| 140 | 	 MACH_MSGH_BITS_LOCAL_MASK | \ | ||
| 141 | 	 MACH_MSGH_BITS_VOUCHER_MASK) | ||
| 142 | |||
| 143 | #define MACH_MSGH_BITS_COMPLEX 0x80000000U /* message is complex */ | ||
| 144 | |||
| 145 | #define MACH_MSGH_BITS_USER 0x801f1f1fU /* allowed bits user->kernel */ | ||
| 146 | |||
| 147 | #define MACH_MSGH_BITS_RAISEIMP 0x20000000U /* importance raised due to msg */ | ||
| 148 | #define MACH_MSGH_BITS_DENAP MACH_MSGH_BITS_RAISEIMP | ||
| 149 | |||
| 150 | #define MACH_MSGH_BITS_IMPHOLDASRT 0x10000000U /* assertion help, userland private */ | ||
| 151 | #define MACH_MSGH_BITS_DENAPHOLDASRT MACH_MSGH_BITS_IMPHOLDASRT | ||
| 152 | |||
| 153 | #define MACH_MSGH_BITS_CIRCULAR 0x10000000U /* message circular, kernel private */ | ||
| 154 | |||
| 155 | #define MACH_MSGH_BITS_USED 0xb01f1f1fU | ||
| 156 | |||
| 157 | /* setter macros for the bits */ | ||
| 158 | #define MACH_MSGH_BITS(remote, local) /* legacy */ \ | ||
| 159 | 	 ((remote) | ((local) << 8)) | ||
| 160 | #define MACH_MSGH_BITS_SET_PORTS(remote, local, voucher) \ | ||
| 161 | 	(((remote) & MACH_MSGH_BITS_REMOTE_MASK) | \ | ||
| 162 | 	 (((local) << 8) & MACH_MSGH_BITS_LOCAL_MASK) | \ | ||
| 163 | 	 (((voucher) << 16) & MACH_MSGH_BITS_VOUCHER_MASK)) | ||
| 164 | #define MACH_MSGH_BITS_SET(remote, local, voucher, other) \ | ||
| 165 | 	(MACH_MSGH_BITS_SET_PORTS((remote), (local), (voucher)) \ | ||
| 166 | 	 | ((other) &~ MACH_MSGH_BITS_PORTS_MASK)) | ||
| 167 | |||
| 168 | /* getter macros for pulling values out of the bits field */ | ||
| 169 | #define MACH_MSGH_BITS_REMOTE(bits) \ | ||
| 170 | 	 ((bits) & MACH_MSGH_BITS_REMOTE_MASK) | ||
| 171 | #define MACH_MSGH_BITS_LOCAL(bits) \ | ||
| 172 | 	 (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8) | ||
| 173 | #define MACH_MSGH_BITS_VOUCHER(bits) \ | ||
| 174 | 	 (((bits) & MACH_MSGH_BITS_VOUCHER_MASK) >> 16) | ||
| 175 | #define MACH_MSGH_BITS_PORTS(bits) \ | ||
| 176 | 	((bits) & MACH_MSGH_BITS_PORTS_MASK) | ||
| 177 | #define MACH_MSGH_BITS_OTHER(bits) \ | ||
| 178 | 	 ((bits) &~ MACH_MSGH_BITS_PORTS_MASK) | ||
| 179 | |||
| 180 | /* checking macros */ | ||
| 181 | #define MACH_MSGH_BITS_HAS_REMOTE(bits) \ | ||
| 182 | 	(MACH_MSGH_BITS_REMOTE(bits) != MACH_MSGH_BITS_ZERO) | ||
| 183 | #define MACH_MSGH_BITS_HAS_LOCAL(bits) \ | ||
| 184 | 	(MACH_MSGH_BITS_LOCAL(bits) != MACH_MSGH_BITS_ZERO) | ||
| 185 | #define MACH_MSGH_BITS_HAS_VOUCHER(bits) \ | ||
| 186 | 	(MACH_MSGH_BITS_VOUCHER(bits) != MACH_MSGH_BITS_ZERO) | ||
| 187 | #define MACH_MSGH_BITS_IS_COMPLEX(bits) \ | ||
| 188 | 	(((bits) & MACH_MSGH_BITS_COMPLEX) != MACH_MSGH_BITS_ZERO) | ||
| 189 | |||
| 190 | /* importance checking macros */ | ||
| 191 | #define MACH_MSGH_BITS_RAISED_IMPORTANCE(bits) \ | ||
| 192 | 	(((bits) & MACH_MSGH_BITS_RAISEIMP) != MACH_MSGH_BITS_ZERO) | ||
| 193 | #define MACH_MSGH_BITS_HOLDS_IMPORTANCE_ASSERTION(bits) \ | ||
| 194 | 	(((bits) & MACH_MSGH_BITS_IMPHOLDASRT) != MACH_MSGH_BITS_ZERO) | ||
| 195 | |||
| 196 | /* | ||
| 197 | * Every message starts with a message header. | ||
| 198 | * Following the message header, if the message is complex, are a count | ||
| 199 | * of type descriptors and the type descriptors themselves | ||
| 200 | * (mach_msg_descriptor_t). The size of the message must be specified in | ||
| 201 | * bytes, and includes the message header, descriptor count, descriptors, | ||
| 202 | * and inline data. | ||
| 203 | * | ||
| 204 | * The msgh_remote_port field specifies the destination of the message. | ||
| 205 | * It must specify a valid send or send-once right for a port. | ||
| 206 | * | ||
| 207 | * The msgh_local_port field specifies a "reply port". Normally, | ||
| 208 | * This field carries a send-once right that the receiver will use | ||
| 209 | * to reply to the message. It may carry the values MACH_PORT_NULL, | ||
| 210 | * MACH_PORT_DEAD, a send-once right, or a send right. | ||
| 211 | * | ||
| 212 | * The msgh_voucher_port field specifies a Mach voucher port. Only | ||
| 213 | * send rights to kernel-implemented Mach Voucher kernel objects in | ||
| 214 | * addition to MACH_PORT_NULL or MACH_PORT_DEAD may be passed. | ||
| 215 | * | ||
| 216 | * The msgh_id field is uninterpreted by the message primitives. | ||
| 217 | * It normally carries information specifying the format | ||
| 218 | * or meaning of the message. | ||
| 219 | */ | ||
| 220 | |||
| 221 | typedef unsigned int mach_msg_bits_t; | ||
| 222 | typedef natural_t mach_msg_size_t; | ||
| 223 | typedef integer_t mach_msg_id_t; | ||
| 224 | |||
| 225 | #define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0 | ||
| 226 | |||
| 227 | typedef unsigned int mach_msg_priority_t; | ||
| 228 | |||
| 229 | #define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0 | ||
| 230 | |||
| 231 | |||
| 232 | typedef unsigned int mach_msg_type_name_t; | ||
| 233 | |||
| 234 | #define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */ | ||
| 235 | #define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send right(s) */ | ||
| 236 | #define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce right */ | ||
| 237 | #define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send right(s) */ | ||
| 238 | #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ | ||
| 239 | #define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive right */ | ||
| 240 | #define MACH_MSG_TYPE_COPY_RECEIVE 22 /* NOT VALID */ | ||
| 241 | #define MACH_MSG_TYPE_DISPOSE_RECEIVE 24 /* must hold receive right */ | ||
| 242 | #define MACH_MSG_TYPE_DISPOSE_SEND 25 /* must hold send right(s) */ | ||
| 243 | #define MACH_MSG_TYPE_DISPOSE_SEND_ONCE 26 /* must hold sendonce right */ | ||
| 244 | |||
| 245 | typedef unsigned int mach_msg_copy_options_t; | ||
| 246 | |||
| 247 | #define MACH_MSG_PHYSICAL_COPY 0 | ||
| 248 | #define MACH_MSG_VIRTUAL_COPY 1 | ||
| 249 | #define MACH_MSG_ALLOCATE 2 | ||
| 250 | #define MACH_MSG_OVERWRITE 3 /* deprecated */ | ||
| 251 | #ifdef MACH_KERNEL | ||
| 252 | #define MACH_MSG_KALLOC_COPY_T 4 | ||
| 253 | #endif /* MACH_KERNEL */ | ||
| 254 | |||
| 255 | #define MACH_MSG_GUARD_FLAGS_NONE 0x0000 | ||
| 256 | #define MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE 0x0001 /* Move the receive right and mark it as immovable */ | ||
| 257 | #define MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND 0x0002 /* Verify that the port is unguarded */ | ||
| 258 | #define MACH_MSG_GUARD_FLAGS_MASK 0x0003 /* Valid flag bits */ | ||
| 259 | typedef unsigned int mach_msg_guard_flags_t; | ||
| 260 | |||
| 261 | /* | ||
| 262 | * In a complex mach message, the mach_msg_header_t is followed by | ||
| 263 | * a descriptor count, then an array of that number of descriptors | ||
| 264 | * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t | ||
| 265 | * (which any descriptor can be cast to) indicates the flavor of the | ||
| 266 | * descriptor. | ||
| 267 | * | ||
| 268 | * Note that in LP64, the various types of descriptors are no longer all | ||
| 269 | * the same size as mach_msg_descriptor_t, so the array cannot be indexed | ||
| 270 | * as expected. | ||
| 271 | */ | ||
| 272 | |||
| 273 | typedef unsigned int mach_msg_descriptor_type_t; | ||
| 274 | |||
| 275 | #define MACH_MSG_PORT_DESCRIPTOR 0 | ||
| 276 | #define MACH_MSG_OOL_DESCRIPTOR 1 | ||
| 277 | #define MACH_MSG_OOL_PORTS_DESCRIPTOR 2 | ||
| 278 | #define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3 | ||
| 279 | #define MACH_MSG_GUARDED_PORT_DESCRIPTOR 4 | ||
| 280 | |||
| 281 | #pragma pack(push, 4) | ||
| 282 | |||
| 283 | typedef struct{ | ||
| 284 | 	natural_t pad1; | ||
| 285 | 	mach_msg_size_t pad2; | ||
| 286 | 	unsigned int pad3 : 24; | ||
| 287 | 	mach_msg_descriptor_type_t type : 8; | ||
| 288 | } mach_msg_type_descriptor_t; | ||
| 289 | |||
| 290 | typedef struct{ | ||
| 291 | 	mach_port_t name; | ||
| 292 | // Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes | ||
| 293 | 	mach_msg_size_t pad1; | ||
| 294 | 	unsigned int pad2 : 16; | ||
| 295 | 	mach_msg_type_name_t disposition : 8; | ||
| 296 | 	mach_msg_descriptor_type_t type : 8; | ||
| 297 | } mach_msg_port_descriptor_t; | ||
| 298 | |||
| 299 | typedef struct{ | ||
| 300 | 	uint32_t address; | ||
| 301 | 	mach_msg_size_t size; | ||
| 302 | 	boolean_t deallocate: 8; | ||
| 303 | 	mach_msg_copy_options_t copy: 8; | ||
| 304 | 	unsigned int pad1: 8; | ||
| 305 | 	mach_msg_descriptor_type_t type: 8; | ||
| 306 | } mach_msg_ool_descriptor32_t; | ||
| 307 | |||
| 308 | typedef struct{ | ||
| 309 | 	uint64_t address; | ||
| 310 | 	boolean_t deallocate: 8; | ||
| 311 | 	mach_msg_copy_options_t copy: 8; | ||
| 312 | 	unsigned int pad1: 8; | ||
| 313 | 	mach_msg_descriptor_type_t type: 8; | ||
| 314 | 	mach_msg_size_t size; | ||
| 315 | } mach_msg_ool_descriptor64_t; | ||
| 316 | |||
| 317 | typedef struct{ | ||
| 318 | 	void* address; | ||
| 319 | #if !defined(__LP64__) | ||
| 320 | 	mach_msg_size_t size; | ||
| 321 | #endif | ||
| 322 | 	boolean_t deallocate: 8; | ||
| 323 | 	mach_msg_copy_options_t copy: 8; | ||
| 324 | 	unsigned int pad1: 8; | ||
| 325 | 	mach_msg_descriptor_type_t type: 8; | ||
| 326 | #if defined(__LP64__) | ||
| 327 | 	mach_msg_size_t size; | ||
| 328 | #endif | ||
| 329 | } mach_msg_ool_descriptor_t; | ||
| 330 | |||
| 331 | typedef struct{ | ||
| 332 | 	uint32_t address; | ||
| 333 | 	mach_msg_size_t count; | ||
| 334 | 	boolean_t deallocate: 8; | ||
| 335 | 	mach_msg_copy_options_t copy: 8; | ||
| 336 | 	mach_msg_type_name_t disposition : 8; | ||
| 337 | 	mach_msg_descriptor_type_t type : 8; | ||
| 338 | } mach_msg_ool_ports_descriptor32_t; | ||
| 339 | |||
| 340 | typedef struct{ | ||
| 341 | 	uint64_t address; | ||
| 342 | 	boolean_t deallocate: 8; | ||
| 343 | 	mach_msg_copy_options_t copy: 8; | ||
| 344 | 	mach_msg_type_name_t disposition : 8; | ||
| 345 | 	mach_msg_descriptor_type_t type : 8; | ||
| 346 | 	mach_msg_size_t count; | ||
| 347 | } mach_msg_ool_ports_descriptor64_t; | ||
| 348 | |||
| 349 | typedef struct{ | ||
| 350 | 	void* address; | ||
| 351 | #if !defined(__LP64__) | ||
| 352 | 	mach_msg_size_t count; | ||
| 353 | #endif | ||
| 354 | 	boolean_t deallocate: 8; | ||
| 355 | 	mach_msg_copy_options_t copy: 8; | ||
| 356 | 	mach_msg_type_name_t disposition : 8; | ||
| 357 | 	mach_msg_descriptor_type_t type : 8; | ||
| 358 | #if defined(__LP64__) | ||
| 359 | 	mach_msg_size_t count; | ||
| 360 | #endif | ||
| 361 | } mach_msg_ool_ports_descriptor_t; | ||
| 362 | |||
| 363 | typedef struct{ | ||
| 364 | 	uint32_t context; | ||
| 365 | 	mach_port_name_t name; | ||
| 366 | 	mach_msg_guard_flags_t flags : 16; | ||
| 367 | 	mach_msg_type_name_t disposition : 8; | ||
| 368 | 	mach_msg_descriptor_type_t type : 8; | ||
| 369 | } mach_msg_guarded_port_descriptor32_t; | ||
| 370 | |||
| 371 | typedef struct{ | ||
| 372 | 	uint64_t context; | ||
| 373 | 	mach_msg_guard_flags_t flags : 16; | ||
| 374 | 	mach_msg_type_name_t disposition : 8; | ||
| 375 | 	mach_msg_descriptor_type_t type : 8; | ||
| 376 | 	mach_port_name_t name; | ||
| 377 | } mach_msg_guarded_port_descriptor64_t; | ||
| 378 | |||
| 379 | typedef struct{ | ||
| 380 | 	mach_port_context_t context; | ||
| 381 | #if !defined(__LP64__) | ||
| 382 | 	mach_port_name_t name; | ||
| 383 | #endif | ||
| 384 | 	mach_msg_guard_flags_t flags : 16; | ||
| 385 | 	mach_msg_type_name_t disposition : 8; | ||
| 386 | 	mach_msg_descriptor_type_t type : 8; | ||
| 387 | #if defined(__LP64__) | ||
| 388 | 	mach_port_name_t name; | ||
| 389 | #endif /* defined(__LP64__) */ | ||
| 390 | } mach_msg_guarded_port_descriptor_t; | ||
| 391 | |||
| 392 | /* | ||
| 393 | * LP64support - This union definition is not really | ||
| 394 | * appropriate in LP64 mode because not all descriptors | ||
| 395 | * are of the same size in that environment. | ||
| 396 | */ | ||
| 397 | typedef union{ | ||
| 398 | 	mach_msg_port_descriptor_t port; | ||
| 399 | 	mach_msg_ool_descriptor_t out_of_line; | ||
| 400 | 	mach_msg_ool_ports_descriptor_t ool_ports; | ||
| 401 | 	mach_msg_type_descriptor_t type; | ||
| 402 | 	mach_msg_guarded_port_descriptor_t guarded_port; | ||
| 403 | } mach_msg_descriptor_t; | ||
| 404 | |||
| 405 | typedef struct{ | ||
| 406 | 	mach_msg_size_t msgh_descriptor_count; | ||
| 407 | } mach_msg_body_t; | ||
| 408 | |||
| 409 | #define MACH_MSG_BODY_NULL (mach_msg_body_t *) 0 | ||
| 410 | #define MACH_MSG_DESCRIPTOR_NULL (mach_msg_descriptor_t *) 0 | ||
| 411 | |||
| 412 | typedef struct{ | ||
| 413 | 	mach_msg_bits_t msgh_bits; | ||
| 414 | 	mach_msg_size_t msgh_size; | ||
| 415 | 	mach_port_t msgh_remote_port; | ||
| 416 | 	mach_port_t msgh_local_port; | ||
| 417 | 	mach_port_name_t msgh_voucher_port; | ||
| 418 | 	mach_msg_id_t msgh_id; | ||
| 419 | } mach_msg_header_t; | ||
| 420 | |||
| 421 | #define msgh_reserved msgh_voucher_port | ||
| 422 | #define MACH_MSG_NULL (mach_msg_header_t *) 0 | ||
| 423 | |||
| 424 | typedef struct{ | ||
| 425 | 	mach_msg_header_t header; | ||
| 426 | 	mach_msg_body_t body; | ||
| 427 | } mach_msg_base_t; | ||
| 428 | |||
| 429 | typedef unsigned int mach_msg_trailer_type_t; | ||
| 430 | |||
| 431 | #define MACH_MSG_TRAILER_FORMAT_0 0 | ||
| 432 | |||
| 433 | typedef unsigned int mach_msg_trailer_size_t; | ||
| 434 | typedef char *mach_msg_trailer_info_t; | ||
| 435 | |||
| 436 | typedef struct{ | ||
| 437 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 438 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 439 | } mach_msg_trailer_t; | ||
| 440 | |||
| 441 | /* | ||
| 442 | * The msgh_seqno field carries a sequence number | ||
| 443 | * associated with the received-from port. A port's | ||
| 444 | * sequence number is incremented every time a message | ||
| 445 | * is received from it and included in the received | ||
| 446 | * trailer to help put messages back in sequence if | ||
| 447 | * multiple threads receive and/or process received | ||
| 448 | * messages. | ||
| 449 | */ | ||
| 450 | typedef struct{ | ||
| 451 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 452 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 453 | 	mach_port_seqno_t msgh_seqno; | ||
| 454 | } mach_msg_seqno_trailer_t; | ||
| 455 | |||
| 456 | typedef struct{ | ||
| 457 | 	unsigned int val[2]; | ||
| 458 | } security_token_t; | ||
| 459 | |||
| 460 | typedef struct{ | ||
| 461 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 462 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 463 | 	mach_port_seqno_t msgh_seqno; | ||
| 464 | 	security_token_t msgh_sender; | ||
| 465 | } mach_msg_security_trailer_t; | ||
| 466 | |||
| 467 | /* | ||
| 468 | * The audit token is an opaque token which identifies | ||
| 469 | * Mach tasks and senders of Mach messages as subjects | ||
| 470 | * to the BSM audit system. Only the appropriate BSM | ||
| 471 | * library routines should be used to interpret the | ||
| 472 | * contents of the audit token as the representation | ||
| 473 | * of the subject identity within the token may change | ||
| 474 | * over time. | ||
| 475 | */ | ||
| 476 | typedef struct{ | ||
| 477 | 	unsigned int val[8]; | ||
| 478 | } audit_token_t; | ||
| 479 | |||
| 480 | typedef struct{ | ||
| 481 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 482 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 483 | 	mach_port_seqno_t msgh_seqno; | ||
| 484 | 	security_token_t msgh_sender; | ||
| 485 | 	audit_token_t msgh_audit; | ||
| 486 | } mach_msg_audit_trailer_t; | ||
| 487 | |||
| 488 | typedef struct{ | ||
| 489 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 490 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 491 | 	mach_port_seqno_t msgh_seqno; | ||
| 492 | 	security_token_t msgh_sender; | ||
| 493 | 	audit_token_t msgh_audit; | ||
| 494 | 	mach_port_context_t msgh_context; | ||
| 495 | } mach_msg_context_trailer_t; | ||
| 496 | |||
| 497 | |||
| 498 | |||
| 499 | typedef struct{ | ||
| 500 | 	mach_port_name_t sender; | ||
| 501 | } msg_labels_t; | ||
| 502 | |||
| 503 | typedef int mach_msg_filter_id; | ||
| 504 | #define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0 | ||
| 505 | |||
| 506 | /* | ||
| 507 | * Trailer type to pass MAC policy label info as a mach message trailer. | ||
| 508 | * | ||
| 509 | */ | ||
| 510 | |||
| 511 | typedef struct{ | ||
| 512 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 513 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 514 | 	mach_port_seqno_t msgh_seqno; | ||
| 515 | 	security_token_t msgh_sender; | ||
| 516 | 	audit_token_t msgh_audit; | ||
| 517 | 	mach_port_context_t msgh_context; | ||
| 518 | 	mach_msg_filter_id msgh_ad; | ||
| 519 | 	msg_labels_t msgh_labels; | ||
| 520 | } mach_msg_mac_trailer_t; | ||
| 521 | |||
| 522 | |||
| 523 | #define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t) | ||
| 524 | |||
| 525 | /* | ||
| 526 | * These values can change from release to release - but clearly | ||
| 527 | * code cannot request additional trailer elements one was not | ||
| 528 | * compiled to understand. Therefore, it is safe to use this | ||
| 529 | * constant when the same module specified the receive options. | ||
| 530 | * Otherwise, you run the risk that the options requested by | ||
| 531 | * another module may exceed the local modules notion of | ||
| 532 | * MAX_TRAILER_SIZE. | ||
| 533 | */ | ||
| 534 | |||
| 535 | typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; | ||
| 536 | #define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t)) | ||
| 537 | |||
| 538 | /* | ||
| 539 | * Legacy requirements keep us from ever updating these defines (even | ||
| 540 | * when the format_0 trailers gain new option data fields in the future). | ||
| 541 | * Therefore, they shouldn't be used going forward. Instead, the sizes | ||
| 542 | * should be compared against the specific element size requested using | ||
| 543 | * REQUESTED_TRAILER_SIZE. | ||
| 544 | */ | ||
| 545 | typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; | ||
| 546 | |||
| 547 | /*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t; | ||
| 548 | */ | ||
| 549 | |||
| 550 | #define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t) | ||
| 551 | |||
| 552 | #define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} } | ||
| 553 | extern const security_token_t KERNEL_SECURITY_TOKEN; | ||
| 554 | |||
| 555 | #define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} } | ||
| 556 | extern const audit_token_t KERNEL_AUDIT_TOKEN; | ||
| 557 | |||
| 558 | typedef integer_t mach_msg_options_t; | ||
| 559 | |||
| 560 | typedef struct{ | ||
| 561 | 	mach_msg_header_t header; | ||
| 562 | } mach_msg_empty_send_t; | ||
| 563 | |||
| 564 | typedef struct{ | ||
| 565 | 	mach_msg_header_t header; | ||
| 566 | 	mach_msg_trailer_t trailer; | ||
| 567 | } mach_msg_empty_rcv_t; | ||
| 568 | |||
| 569 | typedef union{ | ||
| 570 | 	mach_msg_empty_send_t send; | ||
| 571 | 	mach_msg_empty_rcv_t rcv; | ||
| 572 | } mach_msg_empty_t; | ||
| 573 | |||
| 574 | #pragma pack(pop) | ||
| 575 | |||
| 576 | /* utility to round the message size - will become machine dependent */ | ||
| 577 | #define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \ | ||
| 578 | 	 ~(sizeof (natural_t) - 1)) | ||
| 579 | |||
| 580 | |||
| 581 | /* | ||
| 582 | * There is no fixed upper bound to the size of Mach messages. | ||
| 583 | */ | ||
| 584 | #define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0) | ||
| 585 | |||
| 586 | #if defined(__APPLE_API_PRIVATE) | ||
| 587 | /* | ||
| 588 | * But architectural limits of a given implementation, or | ||
| 589 | * temporal conditions may cause unpredictable send failures | ||
| 590 | * for messages larger than MACH_MSG_SIZE_RELIABLE. | ||
| 591 | * | ||
| 592 | * In either case, waiting for memory is [currently] outside | ||
| 593 | * the scope of send timeout values provided to IPC. | ||
| 594 | */ | ||
| 595 | #define MACH_MSG_SIZE_RELIABLE ((mach_msg_size_t) 256 * 1024) | ||
| 596 | #endif | ||
| 597 | /* | ||
| 598 | * Compatibility definitions, for code written | ||
| 599 | * when there was a msgh_kind instead of msgh_seqno. | ||
| 600 | */ | ||
| 601 | #define MACH_MSGH_KIND_NORMAL 0x00000000 | ||
| 602 | #define MACH_MSGH_KIND_NOTIFICATION 0x00000001 | ||
| 603 | #define msgh_kind msgh_seqno | ||
| 604 | #define mach_msg_kind_t mach_port_seqno_t | ||
| 605 | |||
| 606 | typedef natural_t mach_msg_type_size_t; | ||
| 607 | typedef natural_t mach_msg_type_number_t; | ||
| 608 | |||
| 609 | /* | ||
| 610 | * Values received/carried in messages. Tells the receiver what | ||
| 611 | * sort of port right he now has. | ||
| 612 | * | ||
| 613 | * MACH_MSG_TYPE_PORT_NAME is used to transfer a port name | ||
| 614 | * which should remain uninterpreted by the kernel. (Port rights | ||
| 615 | * are not transferred, just the port name.) | ||
| 616 | */ | ||
| 617 | |||
| 618 | #define MACH_MSG_TYPE_PORT_NONE 0 | ||
| 619 | |||
| 620 | #define MACH_MSG_TYPE_PORT_NAME 15 | ||
| 621 | #define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE | ||
| 622 | #define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND | ||
| 623 | #define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE | ||
| 624 | |||
| 625 | #define MACH_MSG_TYPE_LAST 22 /* Last assigned */ | ||
| 626 | |||
| 627 | /* | ||
| 628 | * A dummy value. Mostly used to indicate that the actual value | ||
| 629 | * will be filled in later, dynamically. | ||
| 630 | */ | ||
| 631 | |||
| 632 | #define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1) | ||
| 633 | |||
| 634 | /* | ||
| 635 | *	Is a given item a port type? | ||
| 636 | */ | ||
| 637 | |||
| 638 | #define MACH_MSG_TYPE_PORT_ANY(x) \ | ||
| 639 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 640 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 641 | |||
| 642 | #define MACH_MSG_TYPE_PORT_ANY_SEND(x) \ | ||
| 643 | 	(((x) >= MACH_MSG_TYPE_MOVE_SEND) && \ | ||
| 644 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 645 | |||
| 646 | #define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \ | ||
| 647 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 648 | 	 ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE)) | ||
| 649 | |||
| 650 | typedef integer_t mach_msg_option_t; | ||
| 651 | |||
| 652 | #define MACH_MSG_OPTION_NONE 0x00000000 | ||
| 653 | |||
| 654 | #define MACH_SEND_MSG 0x00000001 | ||
| 655 | #define MACH_RCV_MSG 0x00000002 | ||
| 656 | |||
| 657 | #define MACH_RCV_LARGE 0x00000004 /* report large message sizes */ | ||
| 658 | #define MACH_RCV_LARGE_IDENTITY 0x00000008 /* identify source of large messages */ | ||
| 659 | |||
| 660 | #define MACH_SEND_TIMEOUT 0x00000010 /* timeout value applies to send */ | ||
| 661 | #define MACH_SEND_OVERRIDE 0x00000020 /* priority override for send */ | ||
| 662 | #define MACH_SEND_INTERRUPT 0x00000040 /* don't restart interrupted sends */ | ||
| 663 | #define MACH_SEND_NOTIFY 0x00000080 /* arm send-possible notify */ | ||
| 664 | #define MACH_SEND_ALWAYS 0x00010000 /* ignore qlimits - kernel only */ | ||
| 665 | #define MACH_SEND_TRAILER 0x00020000 /* sender-provided trailer */ | ||
| 666 | #define MACH_SEND_NOIMPORTANCE 0x00040000 /* msg won't carry importance */ | ||
| 667 | #define MACH_SEND_NODENAP MACH_SEND_NOIMPORTANCE | ||
| 668 | #define MACH_SEND_IMPORTANCE 0x00080000 /* msg carries importance - kernel only */ | ||
| 669 | #define MACH_SEND_SYNC_OVERRIDE 0x00100000 /* msg should do sync ipc override */ | ||
| 670 | #define MACH_SEND_PROPAGATE_QOS 0x00200000 /* IPC should propagate the caller's QoS */ | ||
| 671 | #define MACH_SEND_SYNC_USE_THRPRI MACH_SEND_PROPAGATE_QOS /* obsolete name */ | ||
| 672 | #define MACH_SEND_KERNEL 0x00400000 /* full send from kernel space - kernel only */ | ||
| 673 | #define MACH_SEND_SYNC_BOOTSTRAP_CHECKIN 0x00800000 /* special reply port should boost thread doing sync bootstrap checkin */ | ||
| 674 | |||
| 675 | #define MACH_RCV_TIMEOUT 0x00000100 /* timeout value applies to receive */ | ||
| 676 | #define MACH_RCV_NOTIFY 0x00000000 /* legacy name (value was: 0x00000200) */ | ||
| 677 | #define MACH_RCV_INTERRUPT 0x00000400 /* don't restart interrupted receive */ | ||
| 678 | #define MACH_RCV_VOUCHER 0x00000800 /* willing to receive voucher port */ | ||
| 679 | #define MACH_RCV_OVERWRITE 0x00000000 /* scatter receive (deprecated) */ | ||
| 680 | #define MACH_RCV_GUARDED_DESC 0x00001000 /* Can receive new guarded descriptor */ | ||
| 681 | #define MACH_RCV_SYNC_WAIT 0x00004000 /* sync waiter waiting for rcv */ | ||
| 682 | #define MACH_RCV_SYNC_PEEK 0x00008000 /* sync waiter waiting to peek */ | ||
| 683 | |||
| 684 | #define MACH_MSG_STRICT_REPLY 0x00000200 /* Enforce specific properties about the reply port, and | ||
| 685 | 	 * the context in which a thread replies to a message. | ||
| 686 | 	 * This flag must be passed on both the SEND and RCV */ | ||
| 687 | |||
| 688 | |||
| 689 | /* | ||
| 690 | * NOTE: a 0x00------ RCV mask implies to ask for | ||
| 691 | * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements, | ||
| 692 | * which is equivalent to a mach_msg_trailer_t. | ||
| 693 | * | ||
| 694 | * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS | ||
| 695 | * needs its own private bit since we only calculate its fields when absolutely | ||
| 696 | * required. | ||
| 697 | */ | ||
| 698 | #define MACH_RCV_TRAILER_NULL 0 | ||
| 699 | #define MACH_RCV_TRAILER_SEQNO 1 | ||
| 700 | #define MACH_RCV_TRAILER_SENDER 2 | ||
| 701 | #define MACH_RCV_TRAILER_AUDIT 3 | ||
| 702 | #define MACH_RCV_TRAILER_CTX 4 | ||
| 703 | #define MACH_RCV_TRAILER_AV 7 | ||
| 704 | #define MACH_RCV_TRAILER_LABELS 8 | ||
| 705 | |||
| 706 | #define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28) | ||
| 707 | #define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24) | ||
| 708 | #define MACH_RCV_TRAILER_MASK ((0xf << 24)) | ||
| 709 | |||
| 710 | #define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf) | ||
| 711 | |||
| 712 | |||
| 713 | /* | ||
| 714 | * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS, | ||
| 715 | * we just fall through to mach_msg_max_trailer_t. | ||
| 716 | * This is correct behavior since mach_msg_max_trailer_t is defined as | ||
| 717 | * mac_msg_mac_trailer_t which is used for the LABELS trailer. | ||
| 718 | * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed | ||
| 719 | * with one of the other options. | ||
| 720 | */ | ||
| 721 | |||
| 722 | #define REQUESTED_TRAILER_SIZE_NATIVE(y) \ | ||
| 723 | 	((mach_msg_trailer_size_t) \ | ||
| 724 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ | ||
| 725 | 	 sizeof(mach_msg_trailer_t) : \ | ||
| 726 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \ | ||
| 727 | 	 sizeof(mach_msg_seqno_trailer_t) : \ | ||
| 728 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \ | ||
| 729 | 	 sizeof(mach_msg_security_trailer_t) : \ | ||
| 730 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ | ||
| 731 | 	 sizeof(mach_msg_audit_trailer_t) : \ | ||
| 732 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \ | ||
| 733 | 	 sizeof(mach_msg_context_trailer_t) : \ | ||
| 734 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \ | ||
| 735 | 	 sizeof(mach_msg_mac_trailer_t) : \ | ||
| 736 | 	 sizeof(mach_msg_max_trailer_t)))))))) | ||
| 737 | |||
| 738 | |||
| 739 | #define REQUESTED_TRAILER_SIZE(y) REQUESTED_TRAILER_SIZE_NATIVE(y) | ||
| 740 | |||
| 741 | /* | ||
| 742 | * Much code assumes that mach_msg_return_t == kern_return_t. | ||
| 743 | * This definition is useful for descriptive purposes. | ||
| 744 | * | ||
| 745 | * See <mach/error.h> for the format of error codes. | ||
| 746 | * IPC errors are system 4. Send errors are subsystem 0; | ||
| 747 | * receive errors are subsystem 1. The code field is always non-zero. | ||
| 748 | * The high bits of the code field communicate extra information | ||
| 749 | * for some error codes. MACH_MSG_MASK masks off these special bits. | ||
| 750 | */ | ||
| 751 | |||
| 752 | typedef kern_return_t mach_msg_return_t; | ||
| 753 | |||
| 754 | #define MACH_MSG_SUCCESS 0x00000000 | ||
| 755 | |||
| 756 | |||
| 757 | #define MACH_MSG_MASK 0x00003e00 | ||
| 758 | /* All special error code bits defined below. */ | ||
| 759 | #define MACH_MSG_IPC_SPACE 0x00002000 | ||
| 760 | /* No room in IPC name space for another capability name. */ | ||
| 761 | #define MACH_MSG_VM_SPACE 0x00001000 | ||
| 762 | /* No room in VM address space for out-of-line memory. */ | ||
| 763 | #define MACH_MSG_IPC_KERNEL 0x00000800 | ||
| 764 | /* Kernel resource shortage handling an IPC capability. */ | ||
| 765 | #define MACH_MSG_VM_KERNEL 0x00000400 | ||
| 766 | /* Kernel resource shortage handling out-of-line memory. */ | ||
| 767 | |||
| 768 | #define MACH_SEND_IN_PROGRESS 0x10000001 | ||
| 769 | /* Thread is waiting to send. (Internal use only.) */ | ||
| 770 | #define MACH_SEND_INVALID_DATA 0x10000002 | ||
| 771 | /* Bogus in-line data. */ | ||
| 772 | #define MACH_SEND_INVALID_DEST 0x10000003 | ||
| 773 | /* Bogus destination port. */ | ||
| 774 | #define MACH_SEND_TIMED_OUT 0x10000004 | ||
| 775 | /* Message not sent before timeout expired. */ | ||
| 776 | #define MACH_SEND_INVALID_VOUCHER 0x10000005 | ||
| 777 | /* Bogus voucher port. */ | ||
| 778 | #define MACH_SEND_INTERRUPTED 0x10000007 | ||
| 779 | /* Software interrupt. */ | ||
| 780 | #define MACH_SEND_MSG_TOO_SMALL 0x10000008 | ||
| 781 | /* Data doesn't contain a complete message. */ | ||
| 782 | #define MACH_SEND_INVALID_REPLY 0x10000009 | ||
| 783 | /* Bogus reply port. */ | ||
| 784 | #define MACH_SEND_INVALID_RIGHT 0x1000000a | ||
| 785 | /* Bogus port rights in the message body. */ | ||
| 786 | #define MACH_SEND_INVALID_NOTIFY 0x1000000b | ||
| 787 | /* Bogus notify port argument. */ | ||
| 788 | #define MACH_SEND_INVALID_MEMORY 0x1000000c | ||
| 789 | /* Invalid out-of-line memory pointer. */ | ||
| 790 | #define MACH_SEND_NO_BUFFER 0x1000000d | ||
| 791 | /* No message buffer is available. */ | ||
| 792 | #define MACH_SEND_TOO_LARGE 0x1000000e | ||
| 793 | /* Send is too large for port */ | ||
| 794 | #define MACH_SEND_INVALID_TYPE 0x1000000f | ||
| 795 | /* Invalid msg-type specification. */ | ||
| 796 | #define MACH_SEND_INVALID_HEADER 0x10000010 | ||
| 797 | /* A field in the header had a bad value. */ | ||
| 798 | #define MACH_SEND_INVALID_TRAILER 0x10000011 | ||
| 799 | /* The trailer to be sent does not match kernel format. */ | ||
| 800 | #define MACH_SEND_INVALID_CONTEXT 0x10000012 | ||
| 801 | /* The sending thread context did not match the context on the dest port */ | ||
| 802 | #define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015 | ||
| 803 | /* compatibility: no longer a returned error */ | ||
| 804 | #define MACH_SEND_NO_GRANT_DEST 0x10000016 | ||
| 805 | /* The destination port doesn't accept ports in body */ | ||
| 806 | #define MACH_SEND_MSG_FILTERED 0x10000017 | ||
| 807 | /* Message send was rejected by message filter */ | ||
| 808 | |||
| 809 | #define MACH_RCV_IN_PROGRESS 0x10004001 | ||
| 810 | /* Thread is waiting for receive. (Internal use only.) */ | ||
| 811 | #define MACH_RCV_INVALID_NAME 0x10004002 | ||
| 812 | /* Bogus name for receive port/port-set. */ | ||
| 813 | #define MACH_RCV_TIMED_OUT 0x10004003 | ||
| 814 | /* Didn't get a message within the timeout value. */ | ||
| 815 | #define MACH_RCV_TOO_LARGE 0x10004004 | ||
| 816 | /* Message buffer is not large enough for inline data. */ | ||
| 817 | #define MACH_RCV_INTERRUPTED 0x10004005 | ||
| 818 | /* Software interrupt. */ | ||
| 819 | #define MACH_RCV_PORT_CHANGED 0x10004006 | ||
| 820 | /* compatibility: no longer a returned error */ | ||
| 821 | #define MACH_RCV_INVALID_NOTIFY 0x10004007 | ||
| 822 | /* Bogus notify port argument. */ | ||
| 823 | #define MACH_RCV_INVALID_DATA 0x10004008 | ||
| 824 | /* Bogus message buffer for inline data. */ | ||
| 825 | #define MACH_RCV_PORT_DIED 0x10004009 | ||
| 826 | /* Port/set was sent away/died during receive. */ | ||
| 827 | #define MACH_RCV_IN_SET 0x1000400a | ||
| 828 | /* compatibility: no longer a returned error */ | ||
| 829 | #define MACH_RCV_HEADER_ERROR 0x1000400b | ||
| 830 | /* Error receiving message header. See special bits. */ | ||
| 831 | #define MACH_RCV_BODY_ERROR 0x1000400c | ||
| 832 | /* Error receiving message body. See special bits. */ | ||
| 833 | #define MACH_RCV_INVALID_TYPE 0x1000400d | ||
| 834 | /* Invalid msg-type specification in scatter list. */ | ||
| 835 | #define MACH_RCV_SCATTER_SMALL 0x1000400e | ||
| 836 | /* Out-of-line overwrite region is not large enough */ | ||
| 837 | #define MACH_RCV_INVALID_TRAILER 0x1000400f | ||
| 838 | /* trailer type or number of trailer elements not supported */ | ||
| 839 | #define MACH_RCV_IN_PROGRESS_TIMED 0x10004011 | ||
| 840 | /* Waiting for receive with timeout. (Internal use only.) */ | ||
| 841 | #define MACH_RCV_INVALID_REPLY 0x10004012 | ||
| 842 | /* invalid reply port used in a STRICT_REPLY message */ | ||
| 843 | |||
| 844 | |||
| 845 | |||
| 846 | __BEGIN_DECLS | ||
| 847 | |||
| 848 | /* | ||
| 849 | *	Routine:	mach_msg_overwrite | ||
| 850 | *	Purpose: | ||
| 851 | *		Send and/or receive a message. If the message operation | ||
| 852 | *		is interrupted, and the user did not request an indication | ||
| 853 | *		of that fact, then restart the appropriate parts of the | ||
| 854 | *		operation silently (trap version does not restart). | ||
| 855 | * | ||
| 856 | *		Distinct send and receive buffers may be specified. If | ||
| 857 | *		no separate receive buffer is specified, the msg parameter | ||
| 858 | *		will be used for both send and receive operations. | ||
| 859 | * | ||
| 860 | *		In addition to a distinct receive buffer, that buffer may | ||
| 861 | *		already contain scatter control information to direct the | ||
| 862 | *		receiving of the message. | ||
| 863 | */ | ||
| 864 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 865 | extern mach_msg_return_t mach_msg_overwrite( | ||
| 866 | 	mach_msg_header_t *msg, | ||
| 867 | 	mach_msg_option_t option, | ||
| 868 | 	mach_msg_size_t send_size, | ||
| 869 | 	mach_msg_size_t rcv_size, | ||
| 870 | 	mach_port_name_t rcv_name, | ||
| 871 | 	mach_msg_timeout_t timeout, | ||
| 872 | 	mach_port_name_t notify, | ||
| 873 | 	mach_msg_header_t *rcv_msg, | ||
| 874 | 	mach_msg_size_t rcv_limit); | ||
| 875 | |||
| 876 | |||
| 877 | /* | ||
| 878 | *	Routine:	mach_msg | ||
| 879 | *	Purpose: | ||
| 880 | *		Send and/or receive a message. If the message operation | ||
| 881 | *		is interrupted, and the user did not request an indication | ||
| 882 | *		of that fact, then restart the appropriate parts of the | ||
| 883 | *		operation silently (trap version does not restart). | ||
| 884 | */ | ||
| 885 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 886 | extern mach_msg_return_t mach_msg( | ||
| 887 | 	mach_msg_header_t *msg, | ||
| 888 | 	mach_msg_option_t option, | ||
| 889 | 	mach_msg_size_t send_size, | ||
| 890 | 	mach_msg_size_t rcv_size, | ||
| 891 | 	mach_port_name_t rcv_name, | ||
| 892 | 	mach_msg_timeout_t timeout, | ||
| 893 | 	mach_port_name_t notify); | ||
| 894 | |||
| 895 | /* | ||
| 896 | *	Routine:	mach_voucher_deallocate | ||
| 897 | *	Purpose: | ||
| 898 | *		Deallocate a mach voucher created or received in a message. Drops | ||
| 899 | *		one (send right) reference to the voucher. | ||
| 900 | */ | ||
| 901 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 902 | extern kern_return_t mach_voucher_deallocate( | ||
| 903 | 	mach_port_name_t voucher); | ||
| 904 | |||
| 905 | |||
| 906 | __END_DECLS | ||
| 907 | |||
| 908 | #endif /* _MACH_MESSAGE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/port.h deleted-445| ... | @@ -1,445 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | */ | ||
| 62 | /* | ||
| 63 | */ | ||
| 64 | /* | ||
| 65 | *	File:	mach/port.h | ||
| 66 | * | ||
| 67 | *	Definition of a Mach port | ||
| 68 | * | ||
| 69 | *	Mach ports are the endpoints to Mach-implemented communications | ||
| 70 | *	channels (usually uni-directional message queues, but other types | ||
| 71 | *	also exist). | ||
| 72 | * | ||
| 73 | *	Unique collections of these endpoints are maintained for each | ||
| 74 | *	Mach task. Each Mach port in the task's collection is given a | ||
| 75 | *	[task-local] name to identify it - and the the various "rights" | ||
| 76 | *	held by the task for that specific endpoint. | ||
| 77 | * | ||
| 78 | *	This header defines the types used to identify these Mach ports | ||
| 79 | *	and the various rights associated with them. For more info see: | ||
| 80 | * | ||
| 81 | *	<mach/mach_port.h> - manipulation of port rights in a given space | ||
| 82 | *	<mach/message.h> - message queue [and port right passing] mechanism | ||
| 83 | * | ||
| 84 | */ | ||
| 85 | |||
| 86 | #ifndef _MACH_PORT_H_ | ||
| 87 | #define _MACH_PORT_H_ | ||
| 88 | |||
| 89 | #include <sys/cdefs.h> | ||
| 90 | #include <stdint.h> | ||
| 91 | #include <mach/boolean.h> | ||
| 92 | #include <mach/machine/vm_types.h> | ||
| 93 | |||
| 94 | /* | ||
| 95 | *	mach_port_name_t - the local identity for a Mach port | ||
| 96 | * | ||
| 97 | *	The name is Mach port namespace specific. It is used to | ||
| 98 | *	identify the rights held for that port by the task whose | ||
| 99 | *	namespace is implied [or specifically provided]. | ||
| 100 | * | ||
| 101 | *	Use of this type usually implies just a name - no rights. | ||
| 102 | *	See mach_port_t for a type that implies a "named right." | ||
| 103 | * | ||
| 104 | */ | ||
| 105 | |||
| 106 | typedef natural_t mach_port_name_t; | ||
| 107 | typedef mach_port_name_t *mach_port_name_array_t; | ||
| 108 | |||
| 109 | |||
| 110 | /* | ||
| 111 | *	mach_port_t - a named port right | ||
| 112 | * | ||
| 113 | *	In user-space, "rights" are represented by the name of the | ||
| 114 | *	right in the Mach port namespace. Even so, this type is | ||
| 115 | *	presented as a unique one to more clearly denote the presence | ||
| 116 | *	of a right coming along with the name. | ||
| 117 | * | ||
| 118 | *	Often, various rights for a port held in a single name space | ||
| 119 | *	will coalesce and are, therefore, be identified by a single name | ||
| 120 | *	[this is the case for send and receive rights]. But not | ||
| 121 | *	always [send-once rights currently get a unique name for | ||
| 122 | *	each right]. | ||
| 123 | * | ||
| 124 | */ | ||
| 125 | |||
| 126 | #include <sys/_types.h> | ||
| 127 | #include <sys/_types/_mach_port_t.h> | ||
| 128 | |||
| 129 | |||
| 130 | typedef mach_port_t *mach_port_array_t; | ||
| 131 | |||
| 132 | /* | ||
| 133 | * MACH_PORT_NULL is a legal value that can be carried in messages. | ||
| 134 | * It indicates the absence of any port or port rights. (A port | ||
| 135 | * argument keeps the message from being "simple", even if the | ||
| 136 | * value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal | ||
| 137 | * value that can be carried in messages. It indicates | ||
| 138 | * that a port right was present, but it died. | ||
| 139 | */ | ||
| 140 | |||
| 141 | #define MACH_PORT_NULL 0 /* intentional loose typing */ | ||
| 142 | #define MACH_PORT_DEAD ((mach_port_name_t) ~0) | ||
| 143 | #define MACH_PORT_VALID(name) \ | ||
| 144 | 	 (((name) != MACH_PORT_NULL) && \ | ||
| 145 | 	 ((name) != MACH_PORT_DEAD)) | ||
| 146 | |||
| 147 | |||
| 148 | /* | ||
| 149 | *	For kernel-selected [assigned] port names, the name is | ||
| 150 | *	comprised of two parts: a generation number and an index. | ||
| 151 | *	This approach keeps the exact same name from being generated | ||
| 152 | *	and reused too quickly [to catch right/reference counting bugs]. | ||
| 153 | *	The dividing line between the constituent parts is exposed so | ||
| 154 | *	that efficient "mach_port_name_t to data structure pointer" | ||
| 155 | *	conversion implementation can be made. But it is possible | ||
| 156 | *	for user-level code to assign their own names to Mach ports. | ||
| 157 | *	These are not required to participate in this algorithm. So | ||
| 158 | *	care should be taken before "assuming" this model. | ||
| 159 | * | ||
| 160 | */ | ||
| 161 | |||
| 162 | #ifndef NO_PORT_GEN | ||
| 163 | |||
| 164 | #define MACH_PORT_INDEX(name) ((name) >> 8) | ||
| 165 | #define MACH_PORT_GEN(name) (((name) & 0xff) << 24) | ||
| 166 | #define MACH_PORT_MAKE(index, gen) \ | ||
| 167 | 	 (((index) << 8) | (gen) >> 24) | ||
| 168 | |||
| 169 | #else /* NO_PORT_GEN */ | ||
| 170 | |||
| 171 | #define MACH_PORT_INDEX(name) (name) | ||
| 172 | #define MACH_PORT_GEN(name) (0) | ||
| 173 | #define MACH_PORT_MAKE(index, gen) (index) | ||
| 174 | |||
| 175 | #endif /* NO_PORT_GEN */ | ||
| 176 | |||
| 177 | |||
| 178 | /* | ||
| 179 | * These are the different rights a task may have for a port. | ||
| 180 | * The MACH_PORT_RIGHT_* definitions are used as arguments | ||
| 181 | * to mach_port_allocate, mach_port_get_refs, etc, to specify | ||
| 182 | * a particular right to act upon. The mach_port_names and | ||
| 183 | * mach_port_type calls return bitmasks using the MACH_PORT_TYPE_* | ||
| 184 | * definitions. This is because a single name may denote | ||
| 185 | * multiple rights. | ||
| 186 | */ | ||
| 187 | |||
| 188 | typedef natural_t mach_port_right_t; | ||
| 189 | |||
| 190 | #define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0) | ||
| 191 | #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) | ||
| 192 | #define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2) | ||
| 193 | #define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3) | ||
| 194 | #define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4) | ||
| 195 | #define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) /* obsolete right */ | ||
| 196 | #define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) /* right not implemented */ | ||
| 197 | |||
| 198 | |||
| 199 | typedef natural_t mach_port_type_t; | ||
| 200 | typedef mach_port_type_t *mach_port_type_array_t; | ||
| 201 | |||
| 202 | #define MACH_PORT_TYPE(right) \ | ||
| 203 | 	 ((mach_port_type_t)(((mach_port_type_t) 1) \ | ||
| 204 | 	 << ((right) + ((mach_port_right_t) 16)))) | ||
| 205 | #define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L) | ||
| 206 | #define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND) | ||
| 207 | #define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE) | ||
| 208 | #define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE) | ||
| 209 | #define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET) | ||
| 210 | #define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME) | ||
| 211 | #define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) /* obsolete */ | ||
| 212 | |||
| 213 | |||
| 214 | /* Convenient combinations. */ | ||
| 215 | |||
| 216 | #define MACH_PORT_TYPE_SEND_RECEIVE \ | ||
| 217 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE) | ||
| 218 | #define MACH_PORT_TYPE_SEND_RIGHTS \ | ||
| 219 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE) | ||
| 220 | #define MACH_PORT_TYPE_PORT_RIGHTS \ | ||
| 221 | 	 (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE) | ||
| 222 | #define MACH_PORT_TYPE_PORT_OR_DEAD \ | ||
| 223 | 	 (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME) | ||
| 224 | #define MACH_PORT_TYPE_ALL_RIGHTS \ | ||
| 225 | 	 (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET) | ||
| 226 | |||
| 227 | /* Dummy type bits that mach_port_type/mach_port_names can return. */ | ||
| 228 | |||
| 229 | #define MACH_PORT_TYPE_DNREQUEST 0x80000000 | ||
| 230 | #define MACH_PORT_TYPE_SPREQUEST 0x40000000 | ||
| 231 | #define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000 | ||
| 232 | |||
| 233 | /* User-references for capabilities. */ | ||
| 234 | |||
| 235 | typedef natural_t mach_port_urefs_t; | ||
| 236 | typedef integer_t mach_port_delta_t; /* change in urefs */ | ||
| 237 | |||
| 238 | /* Attributes of ports. (See mach_port_get_receive_status.) */ | ||
| 239 | |||
| 240 | typedef natural_t mach_port_seqno_t; /* sequence number */ | ||
| 241 | typedef natural_t mach_port_mscount_t; /* make-send count */ | ||
| 242 | typedef natural_t mach_port_msgcount_t; /* number of msgs */ | ||
| 243 | typedef natural_t mach_port_rights_t; /* number of rights */ | ||
| 244 | |||
| 245 | /* | ||
| 246 | *	Are there outstanding send rights for a given port? | ||
| 247 | */ | ||
| 248 | #define MACH_PORT_SRIGHTS_NONE 0 /* no srights */ | ||
| 249 | #define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */ | ||
| 250 | typedef unsigned int mach_port_srights_t; /* status of send rights */ | ||
| 251 | |||
| 252 | typedef struct mach_port_status { | ||
| 253 | 	mach_port_rights_t mps_pset; /* count of containing port sets */ | ||
| 254 | 	mach_port_seqno_t mps_seqno; /* sequence number */ | ||
| 255 | 	mach_port_mscount_t mps_mscount; /* make-send count */ | ||
| 256 | 	mach_port_msgcount_t mps_qlimit; /* queue limit */ | ||
| 257 | 	mach_port_msgcount_t mps_msgcount; /* number in the queue */ | ||
| 258 | 	mach_port_rights_t mps_sorights; /* how many send-once rights */ | ||
| 259 | 	boolean_t mps_srights; /* do send rights exist? */ | ||
| 260 | 	boolean_t mps_pdrequest; /* port-deleted requested? */ | ||
| 261 | 	boolean_t mps_nsrequest; /* no-senders requested? */ | ||
| 262 | 	natural_t mps_flags; /* port flags */ | ||
| 263 | } mach_port_status_t; | ||
| 264 | |||
| 265 | /* System-wide values for setting queue limits on a port */ | ||
| 266 | #define MACH_PORT_QLIMIT_ZERO (0) | ||
| 267 | #define MACH_PORT_QLIMIT_BASIC (5) | ||
| 268 | #define MACH_PORT_QLIMIT_SMALL (16) | ||
| 269 | #define MACH_PORT_QLIMIT_LARGE (1024) | ||
| 270 | #define MACH_PORT_QLIMIT_KERNEL (65534) | ||
| 271 | #define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO | ||
| 272 | #define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC | ||
| 273 | #define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE | ||
| 274 | |||
| 275 | typedef struct mach_port_limits { | ||
| 276 | 	mach_port_msgcount_t mpl_qlimit; /* number of msgs */ | ||
| 277 | } mach_port_limits_t; | ||
| 278 | |||
| 279 | /* Possible values for mps_flags (part of mach_port_status_t) */ | ||
| 280 | #define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01 | ||
| 281 | #define MACH_PORT_STATUS_FLAG_GUARDED 0x02 | ||
| 282 | #define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04 | ||
| 283 | #define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08 | ||
| 284 | #define MACH_PORT_STATUS_FLAG_REVIVE 0x10 | ||
| 285 | #define MACH_PORT_STATUS_FLAG_TASKPTR 0x20 | ||
| 286 | #define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40 | ||
| 287 | #define MACH_PORT_STATUS_FLAG_NO_GRANT 0x80 | ||
| 288 | |||
| 289 | typedef struct mach_port_info_ext { | ||
| 290 | 	mach_port_status_t mpie_status; | ||
| 291 | 	mach_port_msgcount_t mpie_boost_cnt; | ||
| 292 | 	uint32_t reserved[6]; | ||
| 293 | } mach_port_info_ext_t; | ||
| 294 | |||
| 295 | typedef integer_t *mach_port_info_t; /* varying array of natural_t */ | ||
| 296 | |||
| 297 | /* Flavors for mach_port_get/set_attributes() */ | ||
| 298 | typedef int mach_port_flavor_t; | ||
| 299 | #define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_limits_t */ | ||
| 300 | #define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_status_t */ | ||
| 301 | #define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */ | ||
| 302 | #define MACH_PORT_TEMPOWNER 4 /* indicates receive right will be reassigned to another task */ | ||
| 303 | #define MACH_PORT_IMPORTANCE_RECEIVER 5 /* indicates recieve right accepts priority donation */ | ||
| 304 | #define MACH_PORT_DENAP_RECEIVER 6 /* indicates receive right accepts de-nap donation */ | ||
| 305 | #define MACH_PORT_INFO_EXT 7 /* uses mach_port_info_ext_t */ | ||
| 306 | |||
| 307 | #define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \ | ||
| 308 | 	(sizeof(mach_port_limits_t)/sizeof(natural_t))) | ||
| 309 | #define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \ | ||
| 310 | 	(sizeof(mach_port_status_t)/sizeof(natural_t))) | ||
| 311 | #define MACH_PORT_DNREQUESTS_SIZE_COUNT 1 | ||
| 312 | #define MACH_PORT_INFO_EXT_COUNT ((natural_t) \ | ||
| 313 | 	(sizeof(mach_port_info_ext_t)/sizeof(natural_t))) | ||
| 314 | /* | ||
| 315 | * Structure used to pass information about port allocation requests. | ||
| 316 | * Must be padded to 64-bits total length. | ||
| 317 | */ | ||
| 318 | typedef struct mach_port_qos { | ||
| 319 | 	unsigned int name:1; /* name given */ | ||
| 320 | 	unsigned int prealloc:1; /* prealloced message */ | ||
| 321 | 	boolean_t pad1:30; | ||
| 322 | 	natural_t len; | ||
| 323 | } mach_port_qos_t; | ||
| 324 | |||
| 325 | /* Mach Port Guarding definitions */ | ||
| 326 | |||
| 327 | /* | ||
| 328 | * Flags for mach_port_options (used for | ||
| 329 | * invocation of mach_port_construct). | ||
| 330 | * Indicates attributes to be set for the newly | ||
| 331 | * allocated port. | ||
| 332 | */ | ||
| 333 | #define MPO_CONTEXT_AS_GUARD 0x01 /* Add guard to the port */ | ||
| 334 | #define MPO_QLIMIT 0x02 /* Set qlimit for the port msg queue */ | ||
| 335 | #define MPO_TEMPOWNER 0x04 /* Set the tempowner bit of the port */ | ||
| 336 | #define MPO_IMPORTANCE_RECEIVER 0x08 /* Mark the port as importance receiver */ | ||
| 337 | #define MPO_INSERT_SEND_RIGHT 0x10 /* Insert a send right for the port */ | ||
| 338 | #define MPO_STRICT 0x20 /* Apply strict guarding for port */ | ||
| 339 | #define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */ | ||
| 340 | #define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */ | ||
| 341 | #define MPO_FILTER_MSG 0x100 /* Allow message filtering */ | ||
| 342 | #define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */ | ||
| 343 | |||
| 344 | /* | ||
| 345 | * Structure to define optional attributes for a newly | ||
| 346 | * constructed port. | ||
| 347 | */ | ||
| 348 | typedef struct mach_port_options { | ||
| 349 | 	uint32_t flags; /* Flags defining attributes for port */ | ||
| 350 | 	mach_port_limits_t mpl; /* Message queue limit for port */ | ||
| 351 | 	union { | ||
| 352 | 		uint64_t reserved[2]; /* Reserved */ | ||
| 353 | 		mach_port_name_t work_interval_port; /* Work interval port */ | ||
| 354 | 	}; | ||
| 355 | }mach_port_options_t; | ||
| 356 | |||
| 357 | typedef mach_port_options_t *mach_port_options_ptr_t; | ||
| 358 | |||
| 359 | /* | ||
| 360 | * EXC_GUARD represents a guard violation for both | ||
| 361 | * mach ports and file descriptors. GUARD_TYPE_ is used | ||
| 362 | * to differentiate among them. | ||
| 363 | */ | ||
| 364 | #define GUARD_TYPE_MACH_PORT 0x1 | ||
| 365 | |||
| 366 | /* Reasons for exception for a guarded mach port */ | ||
| 367 | enum mach_port_guard_exception_codes { | ||
| 368 | 	kGUARD_EXC_DESTROY = 1u << 0, | ||
| 369 | 	kGUARD_EXC_MOD_REFS = 1u << 1, | ||
| 370 | 	kGUARD_EXC_SET_CONTEXT = 1u << 2, | ||
| 371 | 	kGUARD_EXC_UNGUARDED = 1u << 3, | ||
| 372 | 	kGUARD_EXC_INCORRECT_GUARD = 1u << 4, | ||
| 373 | 	kGUARD_EXC_IMMOVABLE = 1u << 5, | ||
| 374 | 	kGUARD_EXC_STRICT_REPLY = 1u << 6, | ||
| 375 | 	kGUARD_EXC_MSG_FILTERED = 1u << 7, | ||
| 376 | 	/* start of [optionally] non-fatal guards */ | ||
| 377 | 	kGUARD_EXC_INVALID_RIGHT = 1u << 8, | ||
| 378 | 	kGUARD_EXC_INVALID_NAME = 1u << 9, | ||
| 379 | 	kGUARD_EXC_INVALID_VALUE = 1u << 10, | ||
| 380 | 	kGUARD_EXC_INVALID_ARGUMENT = 1u << 11, | ||
| 381 | 	kGUARD_EXC_RIGHT_EXISTS = 1u << 12, | ||
| 382 | 	kGUARD_EXC_KERN_NO_SPACE = 1u << 13, | ||
| 383 | 	kGUARD_EXC_KERN_FAILURE = 1u << 14, | ||
| 384 | 	kGUARD_EXC_KERN_RESOURCE = 1u << 15, | ||
| 385 | 	kGUARD_EXC_SEND_INVALID_REPLY = 1u << 16, | ||
| 386 | 	kGUARD_EXC_SEND_INVALID_VOUCHER = 1u << 17, | ||
| 387 | 	kGUARD_EXC_SEND_INVALID_RIGHT = 1u << 18, | ||
| 388 | 	kGUARD_EXC_RCV_INVALID_NAME = 1u << 19, | ||
| 389 | 	kGUARD_EXC_RCV_GUARDED_DESC = 1u << 20, /* should never be fatal; for development only */ | ||
| 390 | 	kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21, | ||
| 391 | 	kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22, | ||
| 392 | }; | ||
| 393 | |||
| 394 | #define MAX_FATAL_kGUARD_EXC_CODE (1u << 7) | ||
| 395 | |||
| 396 | /* | ||
| 397 | * Mach port guard flags. | ||
| 398 | */ | ||
| 399 | #define MPG_FLAGS_NONE (0x00ull) | ||
| 400 | |||
| 401 | /* | ||
| 402 | * These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions. | ||
| 403 | */ | ||
| 404 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP (0x01ull << 56) | ||
| 405 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT (0x02ull << 56) | ||
| 406 | #define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER (0x04ull << 56) | ||
| 407 | #define MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR (0x08ull << 56) | ||
| 408 | #define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA (0x10ull << 56) | ||
| 409 | #define MPG_FLAGS_STRICT_REPLY_MASK (0xffull << 56) | ||
| 410 | |||
| 411 | /* | ||
| 412 | * These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions. | ||
| 413 | */ | ||
| 414 | #define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC (0x01ull << 56) | ||
| 415 | |||
| 416 | /* | ||
| 417 | * These flags are used as bits in the subcode of kGUARD_EXC_IMMOVABLE exceptions. | ||
| 418 | */ | ||
| 419 | #define MPG_FLAGS_IMMOVABLE_PINNED (0x01ull << 56) | ||
| 420 | |||
| 421 | /* | ||
| 422 | * Flags for mach_port_guard_with_flags. These flags extend | ||
| 423 | * the attributes associated with a guarded port. | ||
| 424 | */ | ||
| 425 | #define MPG_STRICT 0x01 /* Apply strict guarding for a port */ | ||
| 426 | #define MPG_IMMOVABLE_RECEIVE 0x02 /* Receive right cannot be moved out of the space */ | ||
| 427 | |||
| 428 | #if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH) | ||
| 429 | /* | ||
| 430 | * Mach 3.0 renamed everything to have mach_ in front of it. | ||
| 431 | * These types and macros are provided for backward compatibility | ||
| 432 | *	but are deprecated. | ||
| 433 | */ | ||
| 434 | typedef mach_port_t port_t; | ||
| 435 | typedef mach_port_name_t port_name_t; | ||
| 436 | typedef mach_port_name_t *port_name_array_t; | ||
| 437 | |||
| 438 | #define PORT_NULL ((port_t) 0) | ||
| 439 | #define PORT_DEAD ((port_t) ~0) | ||
| 440 | #define PORT_VALID(name) \ | ||
| 441 | 	 ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD) | ||
| 442 | |||
| 443 | #endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ | ||
| 444 | |||
| 445 | #endif /* _MACH_PORT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/processor_set.h deleted-585| ... | @@ -1,585 +0,0 @@ | ||
| 1 | #ifndef	_processor_set_user_ | ||
| 2 | #define	_processor_set_user_ | ||
| 3 | |||
| 4 | /* Module processor_set */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	processor_set_MSG_COUNT | ||
| 52 | #define	processor_set_MSG_COUNT	11 | ||
| 53 | #endif	/* processor_set_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | |||
| 60 | #ifdef __BeforeMigUserHeader | ||
| 61 | __BeforeMigUserHeader | ||
| 62 | #endif /* __BeforeMigUserHeader */ | ||
| 63 | |||
| 64 | #include <sys/cdefs.h> | ||
| 65 | __BEGIN_DECLS | ||
| 66 | |||
| 67 | |||
| 68 | /* Routine processor_set_statistics */ | ||
| 69 | #ifdef	mig_external | ||
| 70 | mig_external | ||
| 71 | #else | ||
| 72 | extern | ||
| 73 | #endif	/* mig_external */ | ||
| 74 | kern_return_t processor_set_statistics | ||
| 75 | ( | ||
| 76 | 	processor_set_name_t pset, | ||
| 77 | 	processor_set_flavor_t flavor, | ||
| 78 | 	processor_set_info_t info_out, | ||
| 79 | 	mach_msg_type_number_t *info_outCnt | ||
| 80 | ); | ||
| 81 | |||
| 82 | /* Routine processor_set_destroy */ | ||
| 83 | #ifdef	mig_external | ||
| 84 | mig_external | ||
| 85 | #else | ||
| 86 | extern | ||
| 87 | #endif	/* mig_external */ | ||
| 88 | kern_return_t processor_set_destroy | ||
| 89 | ( | ||
| 90 | 	processor_set_t set | ||
| 91 | ); | ||
| 92 | |||
| 93 | /* Routine processor_set_max_priority */ | ||
| 94 | #ifdef	mig_external | ||
| 95 | mig_external | ||
| 96 | #else | ||
| 97 | extern | ||
| 98 | #endif	/* mig_external */ | ||
| 99 | kern_return_t processor_set_max_priority | ||
| 100 | ( | ||
| 101 | 	processor_set_t processor_set, | ||
| 102 | 	int max_priority, | ||
| 103 | 	boolean_t change_threads | ||
| 104 | ); | ||
| 105 | |||
| 106 | /* Routine processor_set_policy_enable */ | ||
| 107 | #ifdef	mig_external | ||
| 108 | mig_external | ||
| 109 | #else | ||
| 110 | extern | ||
| 111 | #endif	/* mig_external */ | ||
| 112 | kern_return_t processor_set_policy_enable | ||
| 113 | ( | ||
| 114 | 	processor_set_t processor_set, | ||
| 115 | 	int policy | ||
| 116 | ); | ||
| 117 | |||
| 118 | /* Routine processor_set_policy_disable */ | ||
| 119 | #ifdef	mig_external | ||
| 120 | mig_external | ||
| 121 | #else | ||
| 122 | extern | ||
| 123 | #endif	/* mig_external */ | ||
| 124 | kern_return_t processor_set_policy_disable | ||
| 125 | ( | ||
| 126 | 	processor_set_t processor_set, | ||
| 127 | 	int policy, | ||
| 128 | 	boolean_t change_threads | ||
| 129 | ); | ||
| 130 | |||
| 131 | /* Routine processor_set_tasks */ | ||
| 132 | #ifdef	mig_external | ||
| 133 | mig_external | ||
| 134 | #else | ||
| 135 | extern | ||
| 136 | #endif	/* mig_external */ | ||
| 137 | kern_return_t processor_set_tasks | ||
| 138 | ( | ||
| 139 | 	processor_set_t processor_set, | ||
| 140 | 	task_array_t *task_list, | ||
| 141 | 	mach_msg_type_number_t *task_listCnt | ||
| 142 | ); | ||
| 143 | |||
| 144 | /* Routine processor_set_threads */ | ||
| 145 | #ifdef	mig_external | ||
| 146 | mig_external | ||
| 147 | #else | ||
| 148 | extern | ||
| 149 | #endif	/* mig_external */ | ||
| 150 | kern_return_t processor_set_threads | ||
| 151 | ( | ||
| 152 | 	processor_set_t processor_set, | ||
| 153 | 	thread_act_array_t *thread_list, | ||
| 154 | 	mach_msg_type_number_t *thread_listCnt | ||
| 155 | ); | ||
| 156 | |||
| 157 | /* Routine processor_set_policy_control */ | ||
| 158 | #ifdef	mig_external | ||
| 159 | mig_external | ||
| 160 | #else | ||
| 161 | extern | ||
| 162 | #endif	/* mig_external */ | ||
| 163 | kern_return_t processor_set_policy_control | ||
| 164 | ( | ||
| 165 | 	processor_set_t pset, | ||
| 166 | 	processor_set_flavor_t flavor, | ||
| 167 | 	processor_set_info_t policy_info, | ||
| 168 | 	mach_msg_type_number_t policy_infoCnt, | ||
| 169 | 	boolean_t change | ||
| 170 | ); | ||
| 171 | |||
| 172 | /* Routine processor_set_stack_usage */ | ||
| 173 | #ifdef	mig_external | ||
| 174 | mig_external | ||
| 175 | #else | ||
| 176 | extern | ||
| 177 | #endif	/* mig_external */ | ||
| 178 | kern_return_t processor_set_stack_usage | ||
| 179 | ( | ||
| 180 | 	processor_set_t pset, | ||
| 181 | 	unsigned *ltotal, | ||
| 182 | 	vm_size_t *space, | ||
| 183 | 	vm_size_t *resident, | ||
| 184 | 	vm_size_t *maxusage, | ||
| 185 | 	vm_offset_t *maxstack | ||
| 186 | ); | ||
| 187 | |||
| 188 | /* Routine processor_set_info */ | ||
| 189 | #ifdef	mig_external | ||
| 190 | mig_external | ||
| 191 | #else | ||
| 192 | extern | ||
| 193 | #endif	/* mig_external */ | ||
| 194 | kern_return_t processor_set_info | ||
| 195 | ( | ||
| 196 | 	processor_set_name_t set_name, | ||
| 197 | 	int flavor, | ||
| 198 | 	host_t *host, | ||
| 199 | 	processor_set_info_t info_out, | ||
| 200 | 	mach_msg_type_number_t *info_outCnt | ||
| 201 | ); | ||
| 202 | |||
| 203 | /* Routine processor_set_tasks_with_flavor */ | ||
| 204 | #ifdef	mig_external | ||
| 205 | mig_external | ||
| 206 | #else | ||
| 207 | extern | ||
| 208 | #endif	/* mig_external */ | ||
| 209 | kern_return_t processor_set_tasks_with_flavor | ||
| 210 | ( | ||
| 211 | 	processor_set_t processor_set, | ||
| 212 | 	mach_task_flavor_t flavor, | ||
| 213 | 	task_array_t *task_list, | ||
| 214 | 	mach_msg_type_number_t *task_listCnt | ||
| 215 | ); | ||
| 216 | |||
| 217 | __END_DECLS | ||
| 218 | |||
| 219 | /********************** Caution **************************/ | ||
| 220 | /* The following data types should be used to calculate */ | ||
| 221 | /* maximum message sizes only. The actual message may be */ | ||
| 222 | /* smaller, and the position of the arguments within the */ | ||
| 223 | /* message layout may vary from what is presented here. */ | ||
| 224 | /* For example, if any of the arguments are variable- */ | ||
| 225 | /* sized, and less than the maximum is sent, the data */ | ||
| 226 | /* will be packed tight in the actual message to reduce */ | ||
| 227 | /* the presence of holes. */ | ||
| 228 | /********************** Caution **************************/ | ||
| 229 | |||
| 230 | /* typedefs for all requests */ | ||
| 231 | |||
| 232 | #ifndef __Request__processor_set_subsystem__defined | ||
| 233 | #define __Request__processor_set_subsystem__defined | ||
| 234 | |||
| 235 | #ifdef __MigPackStructs | ||
| 236 | #pragma pack(push, 4) | ||
| 237 | #endif | ||
| 238 | 	typedef struct { | ||
| 239 | 		mach_msg_header_t Head; | ||
| 240 | 		NDR_record_t NDR; | ||
| 241 | 		processor_set_flavor_t flavor; | ||
| 242 | 		mach_msg_type_number_t info_outCnt; | ||
| 243 | 	} __Request__processor_set_statistics_t __attribute__((unused)); | ||
| 244 | #ifdef __MigPackStructs | ||
| 245 | #pragma pack(pop) | ||
| 246 | #endif | ||
| 247 | |||
| 248 | #ifdef __MigPackStructs | ||
| 249 | #pragma pack(push, 4) | ||
| 250 | #endif | ||
| 251 | 	typedef struct { | ||
| 252 | 		mach_msg_header_t Head; | ||
| 253 | 	} __Request__processor_set_destroy_t __attribute__((unused)); | ||
| 254 | #ifdef __MigPackStructs | ||
| 255 | #pragma pack(pop) | ||
| 256 | #endif | ||
| 257 | |||
| 258 | #ifdef __MigPackStructs | ||
| 259 | #pragma pack(push, 4) | ||
| 260 | #endif | ||
| 261 | 	typedef struct { | ||
| 262 | 		mach_msg_header_t Head; | ||
| 263 | 		NDR_record_t NDR; | ||
| 264 | 		int max_priority; | ||
| 265 | 		boolean_t change_threads; | ||
| 266 | 	} __Request__processor_set_max_priority_t __attribute__((unused)); | ||
| 267 | #ifdef __MigPackStructs | ||
| 268 | #pragma pack(pop) | ||
| 269 | #endif | ||
| 270 | |||
| 271 | #ifdef __MigPackStructs | ||
| 272 | #pragma pack(push, 4) | ||
| 273 | #endif | ||
| 274 | 	typedef struct { | ||
| 275 | 		mach_msg_header_t Head; | ||
| 276 | 		NDR_record_t NDR; | ||
| 277 | 		int policy; | ||
| 278 | 	} __Request__processor_set_policy_enable_t __attribute__((unused)); | ||
| 279 | #ifdef __MigPackStructs | ||
| 280 | #pragma pack(pop) | ||
| 281 | #endif | ||
| 282 | |||
| 283 | #ifdef __MigPackStructs | ||
| 284 | #pragma pack(push, 4) | ||
| 285 | #endif | ||
| 286 | 	typedef struct { | ||
| 287 | 		mach_msg_header_t Head; | ||
| 288 | 		NDR_record_t NDR; | ||
| 289 | 		int policy; | ||
| 290 | 		boolean_t change_threads; | ||
| 291 | 	} __Request__processor_set_policy_disable_t __attribute__((unused)); | ||
| 292 | #ifdef __MigPackStructs | ||
| 293 | #pragma pack(pop) | ||
| 294 | #endif | ||
| 295 | |||
| 296 | #ifdef __MigPackStructs | ||
| 297 | #pragma pack(push, 4) | ||
| 298 | #endif | ||
| 299 | 	typedef struct { | ||
| 300 | 		mach_msg_header_t Head; | ||
| 301 | 	} __Request__processor_set_tasks_t __attribute__((unused)); | ||
| 302 | #ifdef __MigPackStructs | ||
| 303 | #pragma pack(pop) | ||
| 304 | #endif | ||
| 305 | |||
| 306 | #ifdef __MigPackStructs | ||
| 307 | #pragma pack(push, 4) | ||
| 308 | #endif | ||
| 309 | 	typedef struct { | ||
| 310 | 		mach_msg_header_t Head; | ||
| 311 | 	} __Request__processor_set_threads_t __attribute__((unused)); | ||
| 312 | #ifdef __MigPackStructs | ||
| 313 | #pragma pack(pop) | ||
| 314 | #endif | ||
| 315 | |||
| 316 | #ifdef __MigPackStructs | ||
| 317 | #pragma pack(push, 4) | ||
| 318 | #endif | ||
| 319 | 	typedef struct { | ||
| 320 | 		mach_msg_header_t Head; | ||
| 321 | 		NDR_record_t NDR; | ||
| 322 | 		processor_set_flavor_t flavor; | ||
| 323 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 324 | 		integer_t policy_info[5]; | ||
| 325 | 		boolean_t change; | ||
| 326 | 	} __Request__processor_set_policy_control_t __attribute__((unused)); | ||
| 327 | #ifdef __MigPackStructs | ||
| 328 | #pragma pack(pop) | ||
| 329 | #endif | ||
| 330 | |||
| 331 | #ifdef __MigPackStructs | ||
| 332 | #pragma pack(push, 4) | ||
| 333 | #endif | ||
| 334 | 	typedef struct { | ||
| 335 | 		mach_msg_header_t Head; | ||
| 336 | 	} __Request__processor_set_stack_usage_t __attribute__((unused)); | ||
| 337 | #ifdef __MigPackStructs | ||
| 338 | #pragma pack(pop) | ||
| 339 | #endif | ||
| 340 | |||
| 341 | #ifdef __MigPackStructs | ||
| 342 | #pragma pack(push, 4) | ||
| 343 | #endif | ||
| 344 | 	typedef struct { | ||
| 345 | 		mach_msg_header_t Head; | ||
| 346 | 		NDR_record_t NDR; | ||
| 347 | 		int flavor; | ||
| 348 | 		mach_msg_type_number_t info_outCnt; | ||
| 349 | 	} __Request__processor_set_info_t __attribute__((unused)); | ||
| 350 | #ifdef __MigPackStructs | ||
| 351 | #pragma pack(pop) | ||
| 352 | #endif | ||
| 353 | |||
| 354 | #ifdef __MigPackStructs | ||
| 355 | #pragma pack(push, 4) | ||
| 356 | #endif | ||
| 357 | 	typedef struct { | ||
| 358 | 		mach_msg_header_t Head; | ||
| 359 | 		NDR_record_t NDR; | ||
| 360 | 		mach_task_flavor_t flavor; | ||
| 361 | 	} __Request__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 362 | #ifdef __MigPackStructs | ||
| 363 | #pragma pack(pop) | ||
| 364 | #endif | ||
| 365 | #endif /* !__Request__processor_set_subsystem__defined */ | ||
| 366 | |||
| 367 | /* union of all requests */ | ||
| 368 | |||
| 369 | #ifndef __RequestUnion__processor_set_subsystem__defined | ||
| 370 | #define __RequestUnion__processor_set_subsystem__defined | ||
| 371 | union __RequestUnion__processor_set_subsystem { | ||
| 372 | 	__Request__processor_set_statistics_t Request_processor_set_statistics; | ||
| 373 | 	__Request__processor_set_destroy_t Request_processor_set_destroy; | ||
| 374 | 	__Request__processor_set_max_priority_t Request_processor_set_max_priority; | ||
| 375 | 	__Request__processor_set_policy_enable_t Request_processor_set_policy_enable; | ||
| 376 | 	__Request__processor_set_policy_disable_t Request_processor_set_policy_disable; | ||
| 377 | 	__Request__processor_set_tasks_t Request_processor_set_tasks; | ||
| 378 | 	__Request__processor_set_threads_t Request_processor_set_threads; | ||
| 379 | 	__Request__processor_set_policy_control_t Request_processor_set_policy_control; | ||
| 380 | 	__Request__processor_set_stack_usage_t Request_processor_set_stack_usage; | ||
| 381 | 	__Request__processor_set_info_t Request_processor_set_info; | ||
| 382 | 	__Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor; | ||
| 383 | }; | ||
| 384 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 385 | /* typedefs for all replies */ | ||
| 386 | |||
| 387 | #ifndef __Reply__processor_set_subsystem__defined | ||
| 388 | #define __Reply__processor_set_subsystem__defined | ||
| 389 | |||
| 390 | #ifdef __MigPackStructs | ||
| 391 | #pragma pack(push, 4) | ||
| 392 | #endif | ||
| 393 | 	typedef struct { | ||
| 394 | 		mach_msg_header_t Head; | ||
| 395 | 		NDR_record_t NDR; | ||
| 396 | 		kern_return_t RetCode; | ||
| 397 | 		mach_msg_type_number_t info_outCnt; | ||
| 398 | 		integer_t info_out[5]; | ||
| 399 | 	} __Reply__processor_set_statistics_t __attribute__((unused)); | ||
| 400 | #ifdef __MigPackStructs | ||
| 401 | #pragma pack(pop) | ||
| 402 | #endif | ||
| 403 | |||
| 404 | #ifdef __MigPackStructs | ||
| 405 | #pragma pack(push, 4) | ||
| 406 | #endif | ||
| 407 | 	typedef struct { | ||
| 408 | 		mach_msg_header_t Head; | ||
| 409 | 		NDR_record_t NDR; | ||
| 410 | 		kern_return_t RetCode; | ||
| 411 | 	} __Reply__processor_set_destroy_t __attribute__((unused)); | ||
| 412 | #ifdef __MigPackStructs | ||
| 413 | #pragma pack(pop) | ||
| 414 | #endif | ||
| 415 | |||
| 416 | #ifdef __MigPackStructs | ||
| 417 | #pragma pack(push, 4) | ||
| 418 | #endif | ||
| 419 | 	typedef struct { | ||
| 420 | 		mach_msg_header_t Head; | ||
| 421 | 		NDR_record_t NDR; | ||
| 422 | 		kern_return_t RetCode; | ||
| 423 | 	} __Reply__processor_set_max_priority_t __attribute__((unused)); | ||
| 424 | #ifdef __MigPackStructs | ||
| 425 | #pragma pack(pop) | ||
| 426 | #endif | ||
| 427 | |||
| 428 | #ifdef __MigPackStructs | ||
| 429 | #pragma pack(push, 4) | ||
| 430 | #endif | ||
| 431 | 	typedef struct { | ||
| 432 | 		mach_msg_header_t Head; | ||
| 433 | 		NDR_record_t NDR; | ||
| 434 | 		kern_return_t RetCode; | ||
| 435 | 	} __Reply__processor_set_policy_enable_t __attribute__((unused)); | ||
| 436 | #ifdef __MigPackStructs | ||
| 437 | #pragma pack(pop) | ||
| 438 | #endif | ||
| 439 | |||
| 440 | #ifdef __MigPackStructs | ||
| 441 | #pragma pack(push, 4) | ||
| 442 | #endif | ||
| 443 | 	typedef struct { | ||
| 444 | 		mach_msg_header_t Head; | ||
| 445 | 		NDR_record_t NDR; | ||
| 446 | 		kern_return_t RetCode; | ||
| 447 | 	} __Reply__processor_set_policy_disable_t __attribute__((unused)); | ||
| 448 | #ifdef __MigPackStructs | ||
| 449 | #pragma pack(pop) | ||
| 450 | #endif | ||
| 451 | |||
| 452 | #ifdef __MigPackStructs | ||
| 453 | #pragma pack(push, 4) | ||
| 454 | #endif | ||
| 455 | 	typedef struct { | ||
| 456 | 		mach_msg_header_t Head; | ||
| 457 | 		/* start of the kernel processed data */ | ||
| 458 | 		mach_msg_body_t msgh_body; | ||
| 459 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 460 | 		/* end of the kernel processed data */ | ||
| 461 | 		NDR_record_t NDR; | ||
| 462 | 		mach_msg_type_number_t task_listCnt; | ||
| 463 | 	} __Reply__processor_set_tasks_t __attribute__((unused)); | ||
| 464 | #ifdef __MigPackStructs | ||
| 465 | #pragma pack(pop) | ||
| 466 | #endif | ||
| 467 | |||
| 468 | #ifdef __MigPackStructs | ||
| 469 | #pragma pack(push, 4) | ||
| 470 | #endif | ||
| 471 | 	typedef struct { | ||
| 472 | 		mach_msg_header_t Head; | ||
| 473 | 		/* start of the kernel processed data */ | ||
| 474 | 		mach_msg_body_t msgh_body; | ||
| 475 | 		mach_msg_ool_ports_descriptor_t thread_list; | ||
| 476 | 		/* end of the kernel processed data */ | ||
| 477 | 		NDR_record_t NDR; | ||
| 478 | 		mach_msg_type_number_t thread_listCnt; | ||
| 479 | 	} __Reply__processor_set_threads_t __attribute__((unused)); | ||
| 480 | #ifdef __MigPackStructs | ||
| 481 | #pragma pack(pop) | ||
| 482 | #endif | ||
| 483 | |||
| 484 | #ifdef __MigPackStructs | ||
| 485 | #pragma pack(push, 4) | ||
| 486 | #endif | ||
| 487 | 	typedef struct { | ||
| 488 | 		mach_msg_header_t Head; | ||
| 489 | 		NDR_record_t NDR; | ||
| 490 | 		kern_return_t RetCode; | ||
| 491 | 	} __Reply__processor_set_policy_control_t __attribute__((unused)); | ||
| 492 | #ifdef __MigPackStructs | ||
| 493 | #pragma pack(pop) | ||
| 494 | #endif | ||
| 495 | |||
| 496 | #ifdef __MigPackStructs | ||
| 497 | #pragma pack(push, 4) | ||
| 498 | #endif | ||
| 499 | 	typedef struct { | ||
| 500 | 		mach_msg_header_t Head; | ||
| 501 | 		NDR_record_t NDR; | ||
| 502 | 		kern_return_t RetCode; | ||
| 503 | 		unsigned ltotal; | ||
| 504 | 		vm_size_t space; | ||
| 505 | 		vm_size_t resident; | ||
| 506 | 		vm_size_t maxusage; | ||
| 507 | 		vm_offset_t maxstack; | ||
| 508 | 	} __Reply__processor_set_stack_usage_t __attribute__((unused)); | ||
| 509 | #ifdef __MigPackStructs | ||
| 510 | #pragma pack(pop) | ||
| 511 | #endif | ||
| 512 | |||
| 513 | #ifdef __MigPackStructs | ||
| 514 | #pragma pack(push, 4) | ||
| 515 | #endif | ||
| 516 | 	typedef struct { | ||
| 517 | 		mach_msg_header_t Head; | ||
| 518 | 		/* start of the kernel processed data */ | ||
| 519 | 		mach_msg_body_t msgh_body; | ||
| 520 | 		mach_msg_port_descriptor_t host; | ||
| 521 | 		/* end of the kernel processed data */ | ||
| 522 | 		NDR_record_t NDR; | ||
| 523 | 		mach_msg_type_number_t info_outCnt; | ||
| 524 | 		integer_t info_out[5]; | ||
| 525 | 	} __Reply__processor_set_info_t __attribute__((unused)); | ||
| 526 | #ifdef __MigPackStructs | ||
| 527 | #pragma pack(pop) | ||
| 528 | #endif | ||
| 529 | |||
| 530 | #ifdef __MigPackStructs | ||
| 531 | #pragma pack(push, 4) | ||
| 532 | #endif | ||
| 533 | 	typedef struct { | ||
| 534 | 		mach_msg_header_t Head; | ||
| 535 | 		/* start of the kernel processed data */ | ||
| 536 | 		mach_msg_body_t msgh_body; | ||
| 537 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 538 | 		/* end of the kernel processed data */ | ||
| 539 | 		NDR_record_t NDR; | ||
| 540 | 		mach_msg_type_number_t task_listCnt; | ||
| 541 | 	} __Reply__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 542 | #ifdef __MigPackStructs | ||
| 543 | #pragma pack(pop) | ||
| 544 | #endif | ||
| 545 | #endif /* !__Reply__processor_set_subsystem__defined */ | ||
| 546 | |||
| 547 | /* union of all replies */ | ||
| 548 | |||
| 549 | #ifndef __ReplyUnion__processor_set_subsystem__defined | ||
| 550 | #define __ReplyUnion__processor_set_subsystem__defined | ||
| 551 | union __ReplyUnion__processor_set_subsystem { | ||
| 552 | 	__Reply__processor_set_statistics_t Reply_processor_set_statistics; | ||
| 553 | 	__Reply__processor_set_destroy_t Reply_processor_set_destroy; | ||
| 554 | 	__Reply__processor_set_max_priority_t Reply_processor_set_max_priority; | ||
| 555 | 	__Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; | ||
| 556 | 	__Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; | ||
| 557 | 	__Reply__processor_set_tasks_t Reply_processor_set_tasks; | ||
| 558 | 	__Reply__processor_set_threads_t Reply_processor_set_threads; | ||
| 559 | 	__Reply__processor_set_policy_control_t Reply_processor_set_policy_control; | ||
| 560 | 	__Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; | ||
| 561 | 	__Reply__processor_set_info_t Reply_processor_set_info; | ||
| 562 | 	__Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor; | ||
| 563 | }; | ||
| 564 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 565 | |||
| 566 | #ifndef subsystem_to_name_map_processor_set | ||
| 567 | #define subsystem_to_name_map_processor_set \ | ||
| 568 | { "processor_set_statistics", 4000 },\ | ||
| 569 | { "processor_set_destroy", 4001 },\ | ||
| 570 | { "processor_set_max_priority", 4002 },\ | ||
| 571 | { "processor_set_policy_enable", 4003 },\ | ||
| 572 | { "processor_set_policy_disable", 4004 },\ | ||
| 573 | { "processor_set_tasks", 4005 },\ | ||
| 574 | { "processor_set_threads", 4006 },\ | ||
| 575 | { "processor_set_policy_control", 4007 },\ | ||
| 576 | { "processor_set_stack_usage", 4008 },\ | ||
| 577 | { "processor_set_info", 4009 },\ | ||
| 578 | { "processor_set_tasks_with_flavor", 4010 } | ||
| 579 | #endif | ||
| 580 | |||
| 581 | #ifdef __AfterMigUserHeader | ||
| 582 | __AfterMigUserHeader | ||
| 583 | #endif /* __AfterMigUserHeader */ | ||
| 584 | |||
| 585 | #endif	 /* _processor_set_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/task.h+106-48| ... | @@ -49,9 +49,10 @@ typedef function_table_entry *function_table_t; | ... | @@ -49,9 +49,10 @@ typedef function_table_entry *function_table_t; |
| 49 | #endif /* AUTOTEST */ | 49 | #endif /* AUTOTEST */ |
| 50 | 50 | ||
| 51 | #ifndef	task_MSG_COUNT | 51 | #ifndef	task_MSG_COUNT |
| 52 | #define	task_MSG_COUNT	61 | 52 | #define	task_MSG_COUNT	63 |
| 53 | #endif	/* task_MSG_COUNT */ | 53 | #endif	/* task_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | ||
| 55 | #include <mach/std_types.h> | 56 | #include <mach/std_types.h> |
| 56 | #include <mach/mig.h> | 57 | #include <mach/mig.h> |
| 57 | #include <mach/mig.h> | 58 | #include <mach/mig.h> |
| ... | @@ -111,8 +112,7 @@ mig_external | ... | @@ -111,8 +112,7 @@ mig_external |
| 111 | #else | 112 | #else |
| 112 | extern | 113 | extern |
| 113 | #endif	/* mig_external */ | 114 | #endif	/* mig_external */ |
| 114 | __WATCHOS_PROHIBITED | 115 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 115 | __TVOS_PROHIBITED | ||
| 116 | kern_return_t mach_ports_register | 116 | kern_return_t mach_ports_register |
| 117 | ( | 117 | ( |
| 118 | 	task_t target_task, | 118 | 	task_t target_task, |
| ... | @@ -126,8 +126,7 @@ mig_external | ... | @@ -126,8 +126,7 @@ mig_external |
| 126 | #else | 126 | #else |
| 127 | extern | 127 | extern |
| 128 | #endif	/* mig_external */ | 128 | #endif	/* mig_external */ |
| 129 | __WATCHOS_PROHIBITED | 129 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 130 | __TVOS_PROHIBITED | ||
| 131 | kern_return_t mach_ports_lookup | 130 | kern_return_t mach_ports_lookup |
| 132 | ( | 131 | ( |
| 133 | 	task_t target_task, | 132 | 	task_t target_task, |
| ... | @@ -155,8 +154,7 @@ mig_external | ... | @@ -155,8 +154,7 @@ mig_external |
| 155 | #else | 154 | #else |
| 156 | extern | 155 | extern |
| 157 | #endif	/* mig_external */ | 156 | #endif	/* mig_external */ |
| 158 | __WATCHOS_PROHIBITED | 157 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 159 | __TVOS_PROHIBITED | ||
| 160 | kern_return_t task_set_info | 158 | kern_return_t task_set_info |
| 161 | ( | 159 | ( |
| 162 | 	task_t target_task, | 160 | 	task_t target_task, |
| ... | @@ -171,8 +169,7 @@ mig_external | ... | @@ -171,8 +169,7 @@ mig_external |
| 171 | #else | 169 | #else |
| 172 | extern | 170 | extern |
| 173 | #endif	/* mig_external */ | 171 | #endif	/* mig_external */ |
| 174 | __WATCHOS_PROHIBITED | 172 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 175 | __TVOS_PROHIBITED | ||
| 176 | kern_return_t task_suspend | 173 | kern_return_t task_suspend |
| 177 | ( | 174 | ( |
| 178 | 	task_read_t target_task | 175 | 	task_read_t target_task |
| ... | @@ -184,8 +181,7 @@ mig_external | ... | @@ -184,8 +181,7 @@ mig_external |
| 184 | #else | 181 | #else |
| 185 | extern | 182 | extern |
| 186 | #endif	/* mig_external */ | 183 | #endif	/* mig_external */ |
| 187 | __WATCHOS_PROHIBITED | 184 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 188 | __TVOS_PROHIBITED | ||
| 189 | kern_return_t task_resume | 185 | kern_return_t task_resume |
| 190 | ( | 186 | ( |
| 191 | 	task_read_t target_task | 187 | 	task_read_t target_task |
| ... | @@ -197,8 +193,7 @@ mig_external | ... | @@ -197,8 +193,7 @@ mig_external |
| 197 | #else | 193 | #else |
| 198 | extern | 194 | extern |
| 199 | #endif	/* mig_external */ | 195 | #endif	/* mig_external */ |
| 200 | __WATCHOS_PROHIBITED | 196 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 201 | __TVOS_PROHIBITED | ||
| 202 | kern_return_t task_get_special_port | 197 | kern_return_t task_get_special_port |
| 203 | ( | 198 | ( |
| 204 | 	task_inspect_t task, | 199 | 	task_inspect_t task, |
| ... | @@ -212,8 +207,7 @@ mig_external | ... | @@ -212,8 +207,7 @@ mig_external |
| 212 | #else | 207 | #else |
| 213 | extern | 208 | extern |
| 214 | #endif	/* mig_external */ | 209 | #endif	/* mig_external */ |
| 215 | __WATCHOS_PROHIBITED | 210 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 216 | __TVOS_PROHIBITED | ||
| 217 | kern_return_t task_set_special_port | 211 | kern_return_t task_set_special_port |
| 218 | ( | 212 | ( |
| 219 | 	task_t task, | 213 | 	task_t task, |
| ... | @@ -227,8 +221,7 @@ mig_external | ... | @@ -227,8 +221,7 @@ mig_external |
| 227 | #else | 221 | #else |
| 228 | extern | 222 | extern |
| 229 | #endif	/* mig_external */ | 223 | #endif	/* mig_external */ |
| 230 | __WATCHOS_PROHIBITED | 224 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 231 | __TVOS_PROHIBITED | ||
| 232 | kern_return_t thread_create | 225 | kern_return_t thread_create |
| 233 | ( | 226 | ( |
| 234 | 	task_t parent_task, | 227 | 	task_t parent_task, |
| ... | @@ -241,8 +234,7 @@ mig_external | ... | @@ -241,8 +234,7 @@ mig_external |
| 241 | #else | 234 | #else |
| 242 | extern | 235 | extern |
| 243 | #endif	/* mig_external */ | 236 | #endif	/* mig_external */ |
| 244 | __WATCHOS_PROHIBITED | 237 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 245 | __TVOS_PROHIBITED | ||
| 246 | kern_return_t thread_create_running | 238 | kern_return_t thread_create_running |
| 247 | ( | 239 | ( |
| 248 | 	task_t parent_task, | 240 | 	task_t parent_task, |
| ... | @@ -258,8 +250,7 @@ mig_external | ... | @@ -258,8 +250,7 @@ mig_external |
| 258 | #else | 250 | #else |
| 259 | extern | 251 | extern |
| 260 | #endif	/* mig_external */ | 252 | #endif	/* mig_external */ |
| 261 | __WATCHOS_PROHIBITED | 253 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 262 | __TVOS_PROHIBITED | ||
| 263 | kern_return_t task_set_exception_ports | 254 | kern_return_t task_set_exception_ports |
| 264 | ( | 255 | ( |
| 265 | 	task_t task, | 256 | 	task_t task, |
| ... | @@ -275,8 +266,7 @@ mig_external | ... | @@ -275,8 +266,7 @@ mig_external |
| 275 | #else | 266 | #else |
| 276 | extern | 267 | extern |
| 277 | #endif	/* mig_external */ | 268 | #endif	/* mig_external */ |
| 278 | __WATCHOS_PROHIBITED | 269 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 279 | __TVOS_PROHIBITED | ||
| 280 | kern_return_t task_get_exception_ports | 270 | kern_return_t task_get_exception_ports |
| 281 | ( | 271 | ( |
| 282 | 	task_t task, | 272 | 	task_t task, |
| ... | @@ -294,8 +284,7 @@ mig_external | ... | @@ -294,8 +284,7 @@ mig_external |
| 294 | #else | 284 | #else |
| 295 | extern | 285 | extern |
| 296 | #endif	/* mig_external */ | 286 | #endif	/* mig_external */ |
| 297 | __WATCHOS_PROHIBITED | 287 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 298 | __TVOS_PROHIBITED | ||
| 299 | kern_return_t task_swap_exception_ports | 288 | kern_return_t task_swap_exception_ports |
| 300 | ( | 289 | ( |
| 301 | 	task_t task, | 290 | 	task_t task, |
| ... | @@ -368,8 +357,7 @@ mig_external | ... | @@ -368,8 +357,7 @@ mig_external |
| 368 | #else | 357 | #else |
| 369 | extern | 358 | extern |
| 370 | #endif	/* mig_external */ | 359 | #endif	/* mig_external */ |
| 371 | __WATCHOS_PROHIBITED | 360 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 372 | __TVOS_PROHIBITED | ||
| 373 | kern_return_t task_policy_set | 361 | kern_return_t task_policy_set |
| 374 | ( | 362 | ( |
| 375 | 	task_policy_set_t task, | 363 | 	task_policy_set_t task, |
| ... | @@ -384,8 +372,7 @@ mig_external | ... | @@ -384,8 +372,7 @@ mig_external |
| 384 | #else | 372 | #else |
| 385 | extern | 373 | extern |
| 386 | #endif	/* mig_external */ | 374 | #endif	/* mig_external */ |
| 387 | __WATCHOS_PROHIBITED | 375 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 388 | __TVOS_PROHIBITED | ||
| 389 | kern_return_t task_policy_get | 376 | kern_return_t task_policy_get |
| 390 | ( | 377 | ( |
| 391 | 	task_policy_get_t task, | 378 | 	task_policy_get_t task, |
| ... | @@ -483,8 +470,7 @@ mig_external | ... | @@ -483,8 +470,7 @@ mig_external |
| 483 | #else | 470 | #else |
| 484 | extern | 471 | extern |
| 485 | #endif	/* mig_external */ | 472 | #endif	/* mig_external */ |
| 486 | __WATCHOS_PROHIBITED | 473 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 487 | __TVOS_PROHIBITED | ||
| 488 | kern_return_t task_zone_info | 474 | kern_return_t task_zone_info |
| 489 | ( | 475 | ( |
| 490 | 	task_inspect_t target_task, | 476 | 	task_inspect_t target_task, |
| ... | @@ -555,8 +541,7 @@ mig_external | ... | @@ -555,8 +541,7 @@ mig_external |
| 555 | #else | 541 | #else |
| 556 | extern | 542 | extern |
| 557 | #endif	/* mig_external */ | 543 | #endif	/* mig_external */ |
| 558 | __WATCHOS_PROHIBITED | 544 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 559 | __TVOS_PROHIBITED | ||
| 560 | kern_return_t task_get_state | 545 | kern_return_t task_get_state |
| 561 | ( | 546 | ( |
| 562 | 	task_read_t task, | 547 | 	task_read_t task, |
| ... | @@ -571,8 +556,7 @@ mig_external | ... | @@ -571,8 +556,7 @@ mig_external |
| 571 | #else | 556 | #else |
| 572 | extern | 557 | extern |
| 573 | #endif	/* mig_external */ | 558 | #endif	/* mig_external */ |
| 574 | __WATCHOS_PROHIBITED | 559 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 575 | __TVOS_PROHIBITED | ||
| 576 | kern_return_t task_set_state | 560 | kern_return_t task_set_state |
| 577 | ( | 561 | ( |
| 578 | 	task_t task, | 562 | 	task_t task, |
| ... | @@ -587,8 +571,7 @@ mig_external | ... | @@ -587,8 +571,7 @@ mig_external |
| 587 | #else | 571 | #else |
| 588 | extern | 572 | extern |
| 589 | #endif	/* mig_external */ | 573 | #endif	/* mig_external */ |
| 590 | __WATCHOS_PROHIBITED | 574 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 591 | __TVOS_PROHIBITED | ||
| 592 | kern_return_t task_set_phys_footprint_limit | 575 | kern_return_t task_set_phys_footprint_limit |
| 593 | ( | 576 | ( |
| 594 | 	task_t task, | 577 | 	task_t task, |
| ... | @@ -602,8 +585,7 @@ mig_external | ... | @@ -602,8 +585,7 @@ mig_external |
| 602 | #else | 585 | #else |
| 603 | extern | 586 | extern |
| 604 | #endif	/* mig_external */ | 587 | #endif	/* mig_external */ |
| 605 | __WATCHOS_PROHIBITED | 588 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 606 | __TVOS_PROHIBITED | ||
| 607 | kern_return_t task_suspend2 | 589 | kern_return_t task_suspend2 |
| 608 | ( | 590 | ( |
| 609 | 	task_read_t target_task, | 591 | 	task_read_t target_task, |
| ... | @@ -616,8 +598,7 @@ mig_external | ... | @@ -616,8 +598,7 @@ mig_external |
| 616 | #else | 598 | #else |
| 617 | extern | 599 | extern |
| 618 | #endif	/* mig_external */ | 600 | #endif	/* mig_external */ |
| 619 | __WATCHOS_PROHIBITED | 601 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 620 | __TVOS_PROHIBITED | ||
| 621 | kern_return_t task_resume2 | 602 | kern_return_t task_resume2 |
| 622 | ( | 603 | ( |
| 623 | 	task_suspension_token_t suspend_token | 604 | 	task_suspension_token_t suspend_token |
| ... | @@ -641,8 +622,7 @@ mig_external | ... | @@ -641,8 +622,7 @@ mig_external |
| 641 | #else | 622 | #else |
| 642 | extern | 623 | extern |
| 643 | #endif	/* mig_external */ | 624 | #endif	/* mig_external */ |
| 644 | __WATCHOS_PROHIBITED | 625 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 645 | __TVOS_PROHIBITED | ||
| 646 | kern_return_t task_get_mach_voucher | 626 | kern_return_t task_get_mach_voucher |
| 647 | ( | 627 | ( |
| 648 | 	task_read_t task, | 628 | 	task_read_t task, |
| ... | @@ -656,8 +636,7 @@ mig_external | ... | @@ -656,8 +636,7 @@ mig_external |
| 656 | #else | 636 | #else |
| 657 | extern | 637 | extern |
| 658 | #endif	/* mig_external */ | 638 | #endif	/* mig_external */ |
| 659 | __WATCHOS_PROHIBITED | 639 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 660 | __TVOS_PROHIBITED | ||
| 661 | kern_return_t task_set_mach_voucher | 640 | kern_return_t task_set_mach_voucher |
| 662 | ( | 641 | ( |
| 663 | 	task_t task, | 642 | 	task_t task, |
| ... | @@ -670,8 +649,7 @@ mig_external | ... | @@ -670,8 +649,7 @@ mig_external |
| 670 | #else | 649 | #else |
| 671 | extern | 650 | extern |
| 672 | #endif	/* mig_external */ | 651 | #endif	/* mig_external */ |
| 673 | __WATCHOS_PROHIBITED | 652 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED |
| 674 | __TVOS_PROHIBITED | ||
| 675 | kern_return_t task_swap_mach_voucher | 653 | kern_return_t task_swap_mach_voucher |
| 676 | ( | 654 | ( |
| 677 | 	task_t task, | 655 | 	task_t task, |
| ... | @@ -914,6 +892,30 @@ kern_return_t task_get_exception_ports_info | ... | @@ -914,6 +892,30 @@ kern_return_t task_get_exception_ports_info |
| 914 | 	exception_flavor_array_t old_flavors | 892 | 	exception_flavor_array_t old_flavors |
| 915 | ); | 893 | ); |
| 916 | 894 | ||
| 895 | /* Routine task_test_sync_upcall */ | ||
| 896 | #ifdef	mig_external | ||
| 897 | mig_external | ||
| 898 | #else | ||
| 899 | extern | ||
| 900 | #endif	/* mig_external */ | ||
| 901 | kern_return_t task_test_sync_upcall | ||
| 902 | ( | ||
| 903 | 	task_t task, | ||
| 904 | 	mach_port_t port | ||
| 905 | ); | ||
| 906 | |||
| 907 | /* Routine task_set_corpse_forking_behavior */ | ||
| 908 | #ifdef	mig_external | ||
| 909 | mig_external | ||
| 910 | #else | ||
| 911 | extern | ||
| 912 | #endif	/* mig_external */ | ||
| 913 | kern_return_t task_set_corpse_forking_behavior | ||
| 914 | ( | ||
| 915 | 	task_t task, | ||
| 916 | 	task_corpse_forking_behavior_t behavior | ||
| 917 | ); | ||
| 918 | |||
| 917 | __END_DECLS | 919 | __END_DECLS |
| 918 | 920 | ||
| 919 | /********************** Caution **************************/ | 921 | /********************** Caution **************************/ |
| ... | @@ -1712,6 +1714,32 @@ __END_DECLS | ... | @@ -1712,6 +1714,32 @@ __END_DECLS |
| 1712 | #ifdef __MigPackStructs | 1714 | #ifdef __MigPackStructs |
| 1713 | #pragma pack(pop) | 1715 | #pragma pack(pop) |
| 1714 | #endif | 1716 | #endif |
| 1717 | |||
| 1718 | #ifdef __MigPackStructs | ||
| 1719 | #pragma pack(push, 4) | ||
| 1720 | #endif | ||
| 1721 | 	typedef struct { | ||
| 1722 | 		mach_msg_header_t Head; | ||
| 1723 | 		/* start of the kernel processed data */ | ||
| 1724 | 		mach_msg_body_t msgh_body; | ||
| 1725 | 		mach_msg_port_descriptor_t port; | ||
| 1726 | 		/* end of the kernel processed data */ | ||
| 1727 | 	} __Request__task_test_sync_upcall_t __attribute__((unused)); | ||
| 1728 | #ifdef __MigPackStructs | ||
| 1729 | #pragma pack(pop) | ||
| 1730 | #endif | ||
| 1731 | |||
| 1732 | #ifdef __MigPackStructs | ||
| 1733 | #pragma pack(push, 4) | ||
| 1734 | #endif | ||
| 1735 | 	typedef struct { | ||
| 1736 | 		mach_msg_header_t Head; | ||
| 1737 | 		NDR_record_t NDR; | ||
| 1738 | 		task_corpse_forking_behavior_t behavior; | ||
| 1739 | 	} __Request__task_set_corpse_forking_behavior_t __attribute__((unused)); | ||
| 1740 | #ifdef __MigPackStructs | ||
| 1741 | #pragma pack(pop) | ||
| 1742 | #endif | ||
| 1715 | #endif /* !__Request__task_subsystem__defined */ | 1743 | #endif /* !__Request__task_subsystem__defined */ |
| 1716 | 1744 | ||
| 1717 | /* union of all requests */ | 1745 | /* union of all requests */ |
| ... | @@ -1779,6 +1807,8 @@ union __RequestUnion__task_subsystem { | ... | @@ -1779,6 +1807,8 @@ union __RequestUnion__task_subsystem { |
| 1779 | 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; | 1807 | 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; |
| 1780 | 	__Request__task_dyld_process_info_notify_deregister_t Request_task_dyld_process_info_notify_deregister; | 1808 | 	__Request__task_dyld_process_info_notify_deregister_t Request_task_dyld_process_info_notify_deregister; |
| 1781 | 	__Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info; | 1809 | 	__Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info; |
| 1810 | 	__Request__task_test_sync_upcall_t Request_task_test_sync_upcall; | ||
| 1811 | 	__Request__task_set_corpse_forking_behavior_t Request_task_set_corpse_forking_behavior; | ||
| 1782 | }; | 1812 | }; |
| 1783 | #endif /* !__RequestUnion__task_subsystem__defined */ | 1813 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 1784 | /* typedefs for all replies */ | 1814 | /* typedefs for all replies */ |
| ... | @@ -2592,6 +2622,30 @@ union __RequestUnion__task_subsystem { | ... | @@ -2592,6 +2622,30 @@ union __RequestUnion__task_subsystem { |
| 2592 | #ifdef __MigPackStructs | 2622 | #ifdef __MigPackStructs |
| 2593 | #pragma pack(pop) | 2623 | #pragma pack(pop) |
| 2594 | #endif | 2624 | #endif |
| 2625 | |||
| 2626 | #ifdef __MigPackStructs | ||
| 2627 | #pragma pack(push, 4) | ||
| 2628 | #endif | ||
| 2629 | 	typedef struct { | ||
| 2630 | 		mach_msg_header_t Head; | ||
| 2631 | 		NDR_record_t NDR; | ||
| 2632 | 		kern_return_t RetCode; | ||
| 2633 | 	} __Reply__task_test_sync_upcall_t __attribute__((unused)); | ||
| 2634 | #ifdef __MigPackStructs | ||
| 2635 | #pragma pack(pop) | ||
| 2636 | #endif | ||
| 2637 | |||
| 2638 | #ifdef __MigPackStructs | ||
| 2639 | #pragma pack(push, 4) | ||
| 2640 | #endif | ||
| 2641 | 	typedef struct { | ||
| 2642 | 		mach_msg_header_t Head; | ||
| 2643 | 		NDR_record_t NDR; | ||
| 2644 | 		kern_return_t RetCode; | ||
| 2645 | 	} __Reply__task_set_corpse_forking_behavior_t __attribute__((unused)); | ||
| 2646 | #ifdef __MigPackStructs | ||
| 2647 | #pragma pack(pop) | ||
| 2648 | #endif | ||
| 2595 | #endif /* !__Reply__task_subsystem__defined */ | 2649 | #endif /* !__Reply__task_subsystem__defined */ |
| 2596 | 2650 | ||
| 2597 | /* union of all replies */ | 2651 | /* union of all replies */ |
| ... | @@ -2659,6 +2713,8 @@ union __ReplyUnion__task_subsystem { | ... | @@ -2659,6 +2713,8 @@ union __ReplyUnion__task_subsystem { |
| 2659 | 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; | 2713 | 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; |
| 2660 | 	__Reply__task_dyld_process_info_notify_deregister_t Reply_task_dyld_process_info_notify_deregister; | 2714 | 	__Reply__task_dyld_process_info_notify_deregister_t Reply_task_dyld_process_info_notify_deregister; |
| 2661 | 	__Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info; | 2715 | 	__Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info; |
| 2716 | 	__Reply__task_test_sync_upcall_t Reply_task_test_sync_upcall; | ||
| 2717 | 	__Reply__task_set_corpse_forking_behavior_t Reply_task_set_corpse_forking_behavior; | ||
| 2662 | }; | 2718 | }; |
| 2663 | #endif /* !__RequestUnion__task_subsystem__defined */ | 2719 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 2664 | 2720 | ||
| ... | @@ -2723,7 +2779,9 @@ union __ReplyUnion__task_subsystem { | ... | @@ -2723,7 +2779,9 @@ union __ReplyUnion__task_subsystem { |
| 2723 | { "task_create_identity_token", 3457 },\ | 2779 | { "task_create_identity_token", 3457 },\ |
| 2724 | { "task_identity_token_get_task_port", 3458 },\ | 2780 | { "task_identity_token_get_task_port", 3458 },\ |
| 2725 | { "task_dyld_process_info_notify_deregister", 3459 },\ | 2781 | { "task_dyld_process_info_notify_deregister", 3459 },\ |
| 2726 | { "task_get_exception_ports_info", 3460 } | 2782 | { "task_get_exception_ports_info", 3460 },\ |
| 2783 | { "task_test_sync_upcall", 3461 },\ | ||
| 2784 | { "task_set_corpse_forking_behavior", 3462 } | ||
| 2727 | #endif | 2785 | #endif |
| 2728 | 2786 | ||
| 2729 | #ifdef __AfterMigUserHeader | 2787 | #ifdef __AfterMigUserHeader |
lib/libc/include/any-macos.11-any/mach/task_info.h+10| ... | @@ -494,6 +494,7 @@ typedef struct task_flags_info * task_flags_info_t; | ... | @@ -494,6 +494,7 @@ typedef struct task_flags_info * task_flags_info_t; |
| 494 | typedef uint32_t task_exc_guard_behavior_t; | 494 | typedef uint32_t task_exc_guard_behavior_t; |
| 495 | 495 | ||
| 496 | /* EXC_GUARD optional delivery settings on a per-task basis */ | 496 | /* EXC_GUARD optional delivery settings on a per-task basis */ |
| 497 | #define TASK_EXC_GUARD_NONE 0x00 | ||
| 497 | #define TASK_EXC_GUARD_VM_DELIVER 0x01 /* Deliver virtual memory EXC_GUARD exceptions */ | 498 | #define TASK_EXC_GUARD_VM_DELIVER 0x01 /* Deliver virtual memory EXC_GUARD exceptions */ |
| 498 | #define TASK_EXC_GUARD_VM_ONCE 0x02 /* Deliver them only once */ | 499 | #define TASK_EXC_GUARD_VM_ONCE 0x02 /* Deliver them only once */ |
| 499 | #define TASK_EXC_GUARD_VM_CORPSE 0x04 /* Deliver them via a forked corpse */ | 500 | #define TASK_EXC_GUARD_VM_CORPSE 0x04 /* Deliver them via a forked corpse */ |
| ... | @@ -509,6 +510,15 @@ typedef uint32_t task_exc_guard_behavior_t; | ... | @@ -509,6 +510,15 @@ typedef uint32_t task_exc_guard_behavior_t; |
| 509 | #define TASK_EXC_GUARD_ALL 0xff /* All optional deliver settings */ | 510 | #define TASK_EXC_GUARD_ALL 0xff /* All optional deliver settings */ |
| 510 | 511 | ||
| 511 | 512 | ||
| 513 | /* | ||
| 514 | * Type to control corpse forking options for a task | ||
| 515 | * via task_get/set_corpse_forking_behavior interface(s). | ||
| 516 | */ | ||
| 517 | typedef uint32_t task_corpse_forking_behavior_t; | ||
| 518 | |||
| 519 | #define TASK_CORPSE_FORKING_DISABLED_MEM_DIAG 0x01 /* Disable corpse forking because the task is running under a diagnostic tool */ | ||
| 520 | |||
| 521 | |||
| 512 | /* | 522 | /* |
| 513 | * Obsolete interfaces. | 523 | * Obsolete interfaces. |
| 514 | */ | 524 | */ |
lib/libc/include/any-macos.11-any/mach/task_special_ports.h deleted-135| ... | @@ -1,135 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2010 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/task_special_ports.h | ||
| 60 | * | ||
| 61 | *	Defines codes for special_purpose task ports. These are NOT | ||
| 62 | *	port identifiers - they are only used for the task_get_special_port | ||
| 63 | *	and task_set_special_port routines. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 68 | #define _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 69 | |||
| 70 | typedef int task_special_port_t; | ||
| 71 | |||
| 72 | #define TASK_KERNEL_PORT 1 /* The full task port for task. */ | ||
| 73 | |||
| 74 | #define TASK_HOST_PORT 2 /* The host (priv) port for task. */ | ||
| 75 | |||
| 76 | #define TASK_NAME_PORT 3 /* The name port for task. */ | ||
| 77 | |||
| 78 | #define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */ | ||
| 79 | |||
| 80 | #define TASK_INSPECT_PORT 5 /* The inspect port for task. */ | ||
| 81 | |||
| 82 | #define TASK_READ_PORT 6 /* The read port for task. */ | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Evolving and likely to change. | ||
| 86 | */ | ||
| 87 | |||
| 88 | #define TASK_SEATBELT_PORT 7 /* Seatbelt compiler/DEM port for task. */ | ||
| 89 | |||
| 90 | /* PORT 8 was the GSSD TASK PORT which transformed to a host port */ | ||
| 91 | |||
| 92 | #define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */ | ||
| 93 | |||
| 94 | #define TASK_DEBUG_CONTROL_PORT 10 /* debug control port */ | ||
| 95 | |||
| 96 | #define TASK_RESOURCE_NOTIFY_PORT 11 /* overrides host special RN port */ | ||
| 97 | |||
| 98 | #define TASK_MAX_SPECIAL_PORT TASK_RESOURCE_NOTIFY_PORT | ||
| 99 | |||
| 100 | /* | ||
| 101 | *	Definitions for ease of use | ||
| 102 | */ | ||
| 103 | |||
| 104 | #define task_get_kernel_port(task, port) \ | ||
| 105 | 	 (task_get_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 106 | |||
| 107 | #define task_set_kernel_port(task, port) \ | ||
| 108 | 	 (task_set_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 109 | |||
| 110 | #define task_get_host_port(task, port) \ | ||
| 111 | 	 (task_get_special_port((task), TASK_HOST_PORT, (port))) | ||
| 112 | |||
| 113 | #define task_set_host_port(task, port) \ | ||
| 114 | 	 (task_set_special_port((task), TASK_HOST_PORT, (port))) | ||
| 115 | |||
| 116 | #define task_get_bootstrap_port(task, port) \ | ||
| 117 | 	 (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 118 | |||
| 119 | #define task_get_debug_control_port(task, port) \ | ||
| 120 | 	 (task_get_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 121 | |||
| 122 | #define task_set_bootstrap_port(task, port) \ | ||
| 123 | 	 (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 124 | |||
| 125 | #define task_get_task_access_port(task, port) \ | ||
| 126 | 	 (task_get_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 127 | |||
| 128 | #define task_set_task_access_port(task, port) \ | ||
| 129 | 	 (task_set_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 130 | |||
| 131 | #define task_set_task_debug_control_port(task, port) \ | ||
| 132 | 	 (task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 133 | |||
| 134 | |||
| 135 | #endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/thread_act.h deleted-1435| ... | @@ -1,1435 +0,0 @@ | ||
| 1 | #ifndef	_thread_act_user_ | ||
| 2 | #define	_thread_act_user_ | ||
| 3 | |||
| 4 | /* Module thread_act */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	thread_act_MSG_COUNT | ||
| 52 | #define	thread_act_MSG_COUNT	31 | ||
| 53 | #endif	/* thread_act_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | |||
| 60 | #ifdef __BeforeMigUserHeader | ||
| 61 | __BeforeMigUserHeader | ||
| 62 | #endif /* __BeforeMigUserHeader */ | ||
| 63 | |||
| 64 | #include <sys/cdefs.h> | ||
| 65 | __BEGIN_DECLS | ||
| 66 | |||
| 67 | |||
| 68 | /* Routine thread_terminate */ | ||
| 69 | #ifdef	mig_external | ||
| 70 | mig_external | ||
| 71 | #else | ||
| 72 | extern | ||
| 73 | #endif	/* mig_external */ | ||
| 74 | __WATCHOS_PROHIBITED | ||
| 75 | __TVOS_PROHIBITED | ||
| 76 | kern_return_t thread_terminate | ||
| 77 | ( | ||
| 78 | 	thread_act_t target_act | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine act_get_state */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | __WATCHOS_PROHIBITED | ||
| 88 | __TVOS_PROHIBITED | ||
| 89 | kern_return_t act_get_state | ||
| 90 | ( | ||
| 91 | 	thread_read_t target_act, | ||
| 92 | 	int flavor, | ||
| 93 | 	thread_state_t old_state, | ||
| 94 | 	mach_msg_type_number_t *old_stateCnt | ||
| 95 | ); | ||
| 96 | |||
| 97 | /* Routine act_set_state */ | ||
| 98 | #ifdef	mig_external | ||
| 99 | mig_external | ||
| 100 | #else | ||
| 101 | extern | ||
| 102 | #endif	/* mig_external */ | ||
| 103 | __WATCHOS_PROHIBITED | ||
| 104 | __TVOS_PROHIBITED | ||
| 105 | kern_return_t act_set_state | ||
| 106 | ( | ||
| 107 | 	thread_act_t target_act, | ||
| 108 | 	int flavor, | ||
| 109 | 	thread_state_t new_state, | ||
| 110 | 	mach_msg_type_number_t new_stateCnt | ||
| 111 | ); | ||
| 112 | |||
| 113 | /* Routine thread_get_state */ | ||
| 114 | #ifdef	mig_external | ||
| 115 | mig_external | ||
| 116 | #else | ||
| 117 | extern | ||
| 118 | #endif	/* mig_external */ | ||
| 119 | __WATCHOS_PROHIBITED | ||
| 120 | kern_return_t thread_get_state | ||
| 121 | ( | ||
| 122 | 	thread_read_t target_act, | ||
| 123 | 	thread_state_flavor_t flavor, | ||
| 124 | 	thread_state_t old_state, | ||
| 125 | 	mach_msg_type_number_t *old_stateCnt | ||
| 126 | ); | ||
| 127 | |||
| 128 | /* Routine thread_set_state */ | ||
| 129 | #ifdef	mig_external | ||
| 130 | mig_external | ||
| 131 | #else | ||
| 132 | extern | ||
| 133 | #endif	/* mig_external */ | ||
| 134 | __WATCHOS_PROHIBITED | ||
| 135 | kern_return_t thread_set_state | ||
| 136 | ( | ||
| 137 | 	thread_act_t target_act, | ||
| 138 | 	thread_state_flavor_t flavor, | ||
| 139 | 	thread_state_t new_state, | ||
| 140 | 	mach_msg_type_number_t new_stateCnt | ||
| 141 | ); | ||
| 142 | |||
| 143 | /* Routine thread_suspend */ | ||
| 144 | #ifdef	mig_external | ||
| 145 | mig_external | ||
| 146 | #else | ||
| 147 | extern | ||
| 148 | #endif	/* mig_external */ | ||
| 149 | __WATCHOS_PROHIBITED | ||
| 150 | kern_return_t thread_suspend | ||
| 151 | ( | ||
| 152 | 	thread_read_t target_act | ||
| 153 | ); | ||
| 154 | |||
| 155 | /* Routine thread_resume */ | ||
| 156 | #ifdef	mig_external | ||
| 157 | mig_external | ||
| 158 | #else | ||
| 159 | extern | ||
| 160 | #endif	/* mig_external */ | ||
| 161 | __WATCHOS_PROHIBITED | ||
| 162 | kern_return_t thread_resume | ||
| 163 | ( | ||
| 164 | 	thread_read_t target_act | ||
| 165 | ); | ||
| 166 | |||
| 167 | /* Routine thread_abort */ | ||
| 168 | #ifdef	mig_external | ||
| 169 | mig_external | ||
| 170 | #else | ||
| 171 | extern | ||
| 172 | #endif	/* mig_external */ | ||
| 173 | __WATCHOS_PROHIBITED | ||
| 174 | kern_return_t thread_abort | ||
| 175 | ( | ||
| 176 | 	thread_act_t target_act | ||
| 177 | ); | ||
| 178 | |||
| 179 | /* Routine thread_abort_safely */ | ||
| 180 | #ifdef	mig_external | ||
| 181 | mig_external | ||
| 182 | #else | ||
| 183 | extern | ||
| 184 | #endif	/* mig_external */ | ||
| 185 | __WATCHOS_PROHIBITED | ||
| 186 | kern_return_t thread_abort_safely | ||
| 187 | ( | ||
| 188 | 	thread_act_t target_act | ||
| 189 | ); | ||
| 190 | |||
| 191 | /* Routine thread_depress_abort */ | ||
| 192 | #ifdef	mig_external | ||
| 193 | mig_external | ||
| 194 | #else | ||
| 195 | extern | ||
| 196 | #endif	/* mig_external */ | ||
| 197 | __WATCHOS_PROHIBITED | ||
| 198 | __TVOS_PROHIBITED | ||
| 199 | kern_return_t thread_depress_abort | ||
| 200 | ( | ||
| 201 | 	thread_act_t thread | ||
| 202 | ); | ||
| 203 | |||
| 204 | /* Routine thread_get_special_port */ | ||
| 205 | #ifdef	mig_external | ||
| 206 | mig_external | ||
| 207 | #else | ||
| 208 | extern | ||
| 209 | #endif	/* mig_external */ | ||
| 210 | __WATCHOS_PROHIBITED | ||
| 211 | __TVOS_PROHIBITED | ||
| 212 | kern_return_t thread_get_special_port | ||
| 213 | ( | ||
| 214 | 	thread_inspect_t thr_act, | ||
| 215 | 	int which_port, | ||
| 216 | 	mach_port_t *special_port | ||
| 217 | ); | ||
| 218 | |||
| 219 | /* Routine thread_set_special_port */ | ||
| 220 | #ifdef	mig_external | ||
| 221 | mig_external | ||
| 222 | #else | ||
| 223 | extern | ||
| 224 | #endif	/* mig_external */ | ||
| 225 | __WATCHOS_PROHIBITED | ||
| 226 | __TVOS_PROHIBITED | ||
| 227 | kern_return_t thread_set_special_port | ||
| 228 | ( | ||
| 229 | 	thread_act_t thr_act, | ||
| 230 | 	int which_port, | ||
| 231 | 	mach_port_t special_port | ||
| 232 | ); | ||
| 233 | |||
| 234 | /* Routine thread_info */ | ||
| 235 | #ifdef	mig_external | ||
| 236 | mig_external | ||
| 237 | #else | ||
| 238 | extern | ||
| 239 | #endif	/* mig_external */ | ||
| 240 | kern_return_t thread_info | ||
| 241 | ( | ||
| 242 | 	thread_inspect_t target_act, | ||
| 243 | 	thread_flavor_t flavor, | ||
| 244 | 	thread_info_t thread_info_out, | ||
| 245 | 	mach_msg_type_number_t *thread_info_outCnt | ||
| 246 | ); | ||
| 247 | |||
| 248 | /* Routine thread_set_exception_ports */ | ||
| 249 | #ifdef	mig_external | ||
| 250 | mig_external | ||
| 251 | #else | ||
| 252 | extern | ||
| 253 | #endif	/* mig_external */ | ||
| 254 | __WATCHOS_PROHIBITED | ||
| 255 | __TVOS_PROHIBITED | ||
| 256 | kern_return_t thread_set_exception_ports | ||
| 257 | ( | ||
| 258 | 	thread_act_t thread, | ||
| 259 | 	exception_mask_t exception_mask, | ||
| 260 | 	mach_port_t new_port, | ||
| 261 | 	exception_behavior_t behavior, | ||
| 262 | 	thread_state_flavor_t new_flavor | ||
| 263 | ); | ||
| 264 | |||
| 265 | /* Routine thread_get_exception_ports */ | ||
| 266 | #ifdef	mig_external | ||
| 267 | mig_external | ||
| 268 | #else | ||
| 269 | extern | ||
| 270 | #endif	/* mig_external */ | ||
| 271 | __WATCHOS_PROHIBITED | ||
| 272 | __TVOS_PROHIBITED | ||
| 273 | kern_return_t thread_get_exception_ports | ||
| 274 | ( | ||
| 275 | 	thread_act_t thread, | ||
| 276 | 	exception_mask_t exception_mask, | ||
| 277 | 	exception_mask_array_t masks, | ||
| 278 | 	mach_msg_type_number_t *masksCnt, | ||
| 279 | 	exception_handler_array_t old_handlers, | ||
| 280 | 	exception_behavior_array_t old_behaviors, | ||
| 281 | 	exception_flavor_array_t old_flavors | ||
| 282 | ); | ||
| 283 | |||
| 284 | /* Routine thread_swap_exception_ports */ | ||
| 285 | #ifdef	mig_external | ||
| 286 | mig_external | ||
| 287 | #else | ||
| 288 | extern | ||
| 289 | #endif	/* mig_external */ | ||
| 290 | __WATCHOS_PROHIBITED | ||
| 291 | __TVOS_PROHIBITED | ||
| 292 | kern_return_t thread_swap_exception_ports | ||
| 293 | ( | ||
| 294 | 	thread_act_t thread, | ||
| 295 | 	exception_mask_t exception_mask, | ||
| 296 | 	mach_port_t new_port, | ||
| 297 | 	exception_behavior_t behavior, | ||
| 298 | 	thread_state_flavor_t new_flavor, | ||
| 299 | 	exception_mask_array_t masks, | ||
| 300 | 	mach_msg_type_number_t *masksCnt, | ||
| 301 | 	exception_handler_array_t old_handlers, | ||
| 302 | 	exception_behavior_array_t old_behaviors, | ||
| 303 | 	exception_flavor_array_t old_flavors | ||
| 304 | ); | ||
| 305 | |||
| 306 | /* Routine thread_policy */ | ||
| 307 | #ifdef	mig_external | ||
| 308 | mig_external | ||
| 309 | #else | ||
| 310 | extern | ||
| 311 | #endif	/* mig_external */ | ||
| 312 | kern_return_t thread_policy | ||
| 313 | ( | ||
| 314 | 	thread_act_t thr_act, | ||
| 315 | 	policy_t policy, | ||
| 316 | 	policy_base_t base, | ||
| 317 | 	mach_msg_type_number_t baseCnt, | ||
| 318 | 	boolean_t set_limit | ||
| 319 | ); | ||
| 320 | |||
| 321 | /* Routine thread_policy_set */ | ||
| 322 | #ifdef	mig_external | ||
| 323 | mig_external | ||
| 324 | #else | ||
| 325 | extern | ||
| 326 | #endif	/* mig_external */ | ||
| 327 | kern_return_t thread_policy_set | ||
| 328 | ( | ||
| 329 | 	thread_act_t thread, | ||
| 330 | 	thread_policy_flavor_t flavor, | ||
| 331 | 	thread_policy_t policy_info, | ||
| 332 | 	mach_msg_type_number_t policy_infoCnt | ||
| 333 | ); | ||
| 334 | |||
| 335 | /* Routine thread_policy_get */ | ||
| 336 | #ifdef	mig_external | ||
| 337 | mig_external | ||
| 338 | #else | ||
| 339 | extern | ||
| 340 | #endif	/* mig_external */ | ||
| 341 | kern_return_t thread_policy_get | ||
| 342 | ( | ||
| 343 | 	thread_inspect_t thread, | ||
| 344 | 	thread_policy_flavor_t flavor, | ||
| 345 | 	thread_policy_t policy_info, | ||
| 346 | 	mach_msg_type_number_t *policy_infoCnt, | ||
| 347 | 	boolean_t *get_default | ||
| 348 | ); | ||
| 349 | |||
| 350 | /* Routine thread_sample */ | ||
| 351 | #ifdef	mig_external | ||
| 352 | mig_external | ||
| 353 | #else | ||
| 354 | extern | ||
| 355 | #endif	/* mig_external */ | ||
| 356 | kern_return_t thread_sample | ||
| 357 | ( | ||
| 358 | 	thread_act_t thread, | ||
| 359 | 	mach_port_t reply | ||
| 360 | ); | ||
| 361 | |||
| 362 | /* Routine etap_trace_thread */ | ||
| 363 | #ifdef	mig_external | ||
| 364 | mig_external | ||
| 365 | #else | ||
| 366 | extern | ||
| 367 | #endif	/* mig_external */ | ||
| 368 | kern_return_t etap_trace_thread | ||
| 369 | ( | ||
| 370 | 	thread_act_t target_act, | ||
| 371 | 	boolean_t trace_status | ||
| 372 | ); | ||
| 373 | |||
| 374 | /* Routine thread_assign */ | ||
| 375 | #ifdef	mig_external | ||
| 376 | mig_external | ||
| 377 | #else | ||
| 378 | extern | ||
| 379 | #endif	/* mig_external */ | ||
| 380 | kern_return_t thread_assign | ||
| 381 | ( | ||
| 382 | 	thread_act_t thread, | ||
| 383 | 	processor_set_t new_set | ||
| 384 | ); | ||
| 385 | |||
| 386 | /* Routine thread_assign_default */ | ||
| 387 | #ifdef	mig_external | ||
| 388 | mig_external | ||
| 389 | #else | ||
| 390 | extern | ||
| 391 | #endif	/* mig_external */ | ||
| 392 | kern_return_t thread_assign_default | ||
| 393 | ( | ||
| 394 | 	thread_act_t thread | ||
| 395 | ); | ||
| 396 | |||
| 397 | /* Routine thread_get_assignment */ | ||
| 398 | #ifdef	mig_external | ||
| 399 | mig_external | ||
| 400 | #else | ||
| 401 | extern | ||
| 402 | #endif	/* mig_external */ | ||
| 403 | kern_return_t thread_get_assignment | ||
| 404 | ( | ||
| 405 | 	thread_inspect_t thread, | ||
| 406 | 	processor_set_name_t *assigned_set | ||
| 407 | ); | ||
| 408 | |||
| 409 | /* Routine thread_set_policy */ | ||
| 410 | #ifdef	mig_external | ||
| 411 | mig_external | ||
| 412 | #else | ||
| 413 | extern | ||
| 414 | #endif	/* mig_external */ | ||
| 415 | kern_return_t thread_set_policy | ||
| 416 | ( | ||
| 417 | 	thread_act_t thr_act, | ||
| 418 | 	processor_set_t pset, | ||
| 419 | 	policy_t policy, | ||
| 420 | 	policy_base_t base, | ||
| 421 | 	mach_msg_type_number_t baseCnt, | ||
| 422 | 	policy_limit_t limit, | ||
| 423 | 	mach_msg_type_number_t limitCnt | ||
| 424 | ); | ||
| 425 | |||
| 426 | /* Routine thread_get_mach_voucher */ | ||
| 427 | #ifdef	mig_external | ||
| 428 | mig_external | ||
| 429 | #else | ||
| 430 | extern | ||
| 431 | #endif	/* mig_external */ | ||
| 432 | __WATCHOS_PROHIBITED | ||
| 433 | __TVOS_PROHIBITED | ||
| 434 | kern_return_t thread_get_mach_voucher | ||
| 435 | ( | ||
| 436 | 	thread_read_t thr_act, | ||
| 437 | 	mach_voucher_selector_t which, | ||
| 438 | 	ipc_voucher_t *voucher | ||
| 439 | ); | ||
| 440 | |||
| 441 | /* Routine thread_set_mach_voucher */ | ||
| 442 | #ifdef	mig_external | ||
| 443 | mig_external | ||
| 444 | #else | ||
| 445 | extern | ||
| 446 | #endif	/* mig_external */ | ||
| 447 | __WATCHOS_PROHIBITED | ||
| 448 | __TVOS_PROHIBITED | ||
| 449 | kern_return_t thread_set_mach_voucher | ||
| 450 | ( | ||
| 451 | 	thread_act_t thr_act, | ||
| 452 | 	ipc_voucher_t voucher | ||
| 453 | ); | ||
| 454 | |||
| 455 | /* Routine thread_swap_mach_voucher */ | ||
| 456 | #ifdef	mig_external | ||
| 457 | mig_external | ||
| 458 | #else | ||
| 459 | extern | ||
| 460 | #endif	/* mig_external */ | ||
| 461 | __WATCHOS_PROHIBITED | ||
| 462 | __TVOS_PROHIBITED | ||
| 463 | kern_return_t thread_swap_mach_voucher | ||
| 464 | ( | ||
| 465 | 	thread_act_t thr_act, | ||
| 466 | 	ipc_voucher_t new_voucher, | ||
| 467 | 	ipc_voucher_t *old_voucher | ||
| 468 | ); | ||
| 469 | |||
| 470 | /* Routine thread_convert_thread_state */ | ||
| 471 | #ifdef	mig_external | ||
| 472 | mig_external | ||
| 473 | #else | ||
| 474 | extern | ||
| 475 | #endif	/* mig_external */ | ||
| 476 | kern_return_t thread_convert_thread_state | ||
| 477 | ( | ||
| 478 | 	thread_act_t thread, | ||
| 479 | 	int direction, | ||
| 480 | 	thread_state_flavor_t flavor, | ||
| 481 | 	thread_state_t in_state, | ||
| 482 | 	mach_msg_type_number_t in_stateCnt, | ||
| 483 | 	thread_state_t out_state, | ||
| 484 | 	mach_msg_type_number_t *out_stateCnt | ||
| 485 | ); | ||
| 486 | |||
| 487 | /* Routine thread_get_exception_ports_info */ | ||
| 488 | #ifdef	mig_external | ||
| 489 | mig_external | ||
| 490 | #else | ||
| 491 | extern | ||
| 492 | #endif	/* mig_external */ | ||
| 493 | kern_return_t thread_get_exception_ports_info | ||
| 494 | ( | ||
| 495 | 	mach_port_t port, | ||
| 496 | 	exception_mask_t exception_mask, | ||
| 497 | 	exception_mask_array_t masks, | ||
| 498 | 	mach_msg_type_number_t *masksCnt, | ||
| 499 | 	exception_handler_info_array_t old_handlers_info, | ||
| 500 | 	exception_behavior_array_t old_behaviors, | ||
| 501 | 	exception_flavor_array_t old_flavors | ||
| 502 | ); | ||
| 503 | |||
| 504 | __END_DECLS | ||
| 505 | |||
| 506 | /********************** Caution **************************/ | ||
| 507 | /* The following data types should be used to calculate */ | ||
| 508 | /* maximum message sizes only. The actual message may be */ | ||
| 509 | /* smaller, and the position of the arguments within the */ | ||
| 510 | /* message layout may vary from what is presented here. */ | ||
| 511 | /* For example, if any of the arguments are variable- */ | ||
| 512 | /* sized, and less than the maximum is sent, the data */ | ||
| 513 | /* will be packed tight in the actual message to reduce */ | ||
| 514 | /* the presence of holes. */ | ||
| 515 | /********************** Caution **************************/ | ||
| 516 | |||
| 517 | /* typedefs for all requests */ | ||
| 518 | |||
| 519 | #ifndef __Request__thread_act_subsystem__defined | ||
| 520 | #define __Request__thread_act_subsystem__defined | ||
| 521 | |||
| 522 | #ifdef __MigPackStructs | ||
| 523 | #pragma pack(push, 4) | ||
| 524 | #endif | ||
| 525 | 	typedef struct { | ||
| 526 | 		mach_msg_header_t Head; | ||
| 527 | 	} __Request__thread_terminate_t __attribute__((unused)); | ||
| 528 | #ifdef __MigPackStructs | ||
| 529 | #pragma pack(pop) | ||
| 530 | #endif | ||
| 531 | |||
| 532 | #ifdef __MigPackStructs | ||
| 533 | #pragma pack(push, 4) | ||
| 534 | #endif | ||
| 535 | 	typedef struct { | ||
| 536 | 		mach_msg_header_t Head; | ||
| 537 | 		NDR_record_t NDR; | ||
| 538 | 		int flavor; | ||
| 539 | 		mach_msg_type_number_t old_stateCnt; | ||
| 540 | 	} __Request__act_get_state_t __attribute__((unused)); | ||
| 541 | #ifdef __MigPackStructs | ||
| 542 | #pragma pack(pop) | ||
| 543 | #endif | ||
| 544 | |||
| 545 | #ifdef __MigPackStructs | ||
| 546 | #pragma pack(push, 4) | ||
| 547 | #endif | ||
| 548 | 	typedef struct { | ||
| 549 | 		mach_msg_header_t Head; | ||
| 550 | 		NDR_record_t NDR; | ||
| 551 | 		int flavor; | ||
| 552 | 		mach_msg_type_number_t new_stateCnt; | ||
| 553 | 		natural_t new_state[1296]; | ||
| 554 | 	} __Request__act_set_state_t __attribute__((unused)); | ||
| 555 | #ifdef __MigPackStructs | ||
| 556 | #pragma pack(pop) | ||
| 557 | #endif | ||
| 558 | |||
| 559 | #ifdef __MigPackStructs | ||
| 560 | #pragma pack(push, 4) | ||
| 561 | #endif | ||
| 562 | 	typedef struct { | ||
| 563 | 		mach_msg_header_t Head; | ||
| 564 | 		NDR_record_t NDR; | ||
| 565 | 		thread_state_flavor_t flavor; | ||
| 566 | 		mach_msg_type_number_t old_stateCnt; | ||
| 567 | 	} __Request__thread_get_state_t __attribute__((unused)); | ||
| 568 | #ifdef __MigPackStructs | ||
| 569 | #pragma pack(pop) | ||
| 570 | #endif | ||
| 571 | |||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(push, 4) | ||
| 574 | #endif | ||
| 575 | 	typedef struct { | ||
| 576 | 		mach_msg_header_t Head; | ||
| 577 | 		NDR_record_t NDR; | ||
| 578 | 		thread_state_flavor_t flavor; | ||
| 579 | 		mach_msg_type_number_t new_stateCnt; | ||
| 580 | 		natural_t new_state[1296]; | ||
| 581 | 	} __Request__thread_set_state_t __attribute__((unused)); | ||
| 582 | #ifdef __MigPackStructs | ||
| 583 | #pragma pack(pop) | ||
| 584 | #endif | ||
| 585 | |||
| 586 | #ifdef __MigPackStructs | ||
| 587 | #pragma pack(push, 4) | ||
| 588 | #endif | ||
| 589 | 	typedef struct { | ||
| 590 | 		mach_msg_header_t Head; | ||
| 591 | 	} __Request__thread_suspend_t __attribute__((unused)); | ||
| 592 | #ifdef __MigPackStructs | ||
| 593 | #pragma pack(pop) | ||
| 594 | #endif | ||
| 595 | |||
| 596 | #ifdef __MigPackStructs | ||
| 597 | #pragma pack(push, 4) | ||
| 598 | #endif | ||
| 599 | 	typedef struct { | ||
| 600 | 		mach_msg_header_t Head; | ||
| 601 | 	} __Request__thread_resume_t __attribute__((unused)); | ||
| 602 | #ifdef __MigPackStructs | ||
| 603 | #pragma pack(pop) | ||
| 604 | #endif | ||
| 605 | |||
| 606 | #ifdef __MigPackStructs | ||
| 607 | #pragma pack(push, 4) | ||
| 608 | #endif | ||
| 609 | 	typedef struct { | ||
| 610 | 		mach_msg_header_t Head; | ||
| 611 | 	} __Request__thread_abort_t __attribute__((unused)); | ||
| 612 | #ifdef __MigPackStructs | ||
| 613 | #pragma pack(pop) | ||
| 614 | #endif | ||
| 615 | |||
| 616 | #ifdef __MigPackStructs | ||
| 617 | #pragma pack(push, 4) | ||
| 618 | #endif | ||
| 619 | 	typedef struct { | ||
| 620 | 		mach_msg_header_t Head; | ||
| 621 | 	} __Request__thread_abort_safely_t __attribute__((unused)); | ||
| 622 | #ifdef __MigPackStructs | ||
| 623 | #pragma pack(pop) | ||
| 624 | #endif | ||
| 625 | |||
| 626 | #ifdef __MigPackStructs | ||
| 627 | #pragma pack(push, 4) | ||
| 628 | #endif | ||
| 629 | 	typedef struct { | ||
| 630 | 		mach_msg_header_t Head; | ||
| 631 | 	} __Request__thread_depress_abort_t __attribute__((unused)); | ||
| 632 | #ifdef __MigPackStructs | ||
| 633 | #pragma pack(pop) | ||
| 634 | #endif | ||
| 635 | |||
| 636 | #ifdef __MigPackStructs | ||
| 637 | #pragma pack(push, 4) | ||
| 638 | #endif | ||
| 639 | 	typedef struct { | ||
| 640 | 		mach_msg_header_t Head; | ||
| 641 | 		NDR_record_t NDR; | ||
| 642 | 		int which_port; | ||
| 643 | 	} __Request__thread_get_special_port_t __attribute__((unused)); | ||
| 644 | #ifdef __MigPackStructs | ||
| 645 | #pragma pack(pop) | ||
| 646 | #endif | ||
| 647 | |||
| 648 | #ifdef __MigPackStructs | ||
| 649 | #pragma pack(push, 4) | ||
| 650 | #endif | ||
| 651 | 	typedef struct { | ||
| 652 | 		mach_msg_header_t Head; | ||
| 653 | 		/* start of the kernel processed data */ | ||
| 654 | 		mach_msg_body_t msgh_body; | ||
| 655 | 		mach_msg_port_descriptor_t special_port; | ||
| 656 | 		/* end of the kernel processed data */ | ||
| 657 | 		NDR_record_t NDR; | ||
| 658 | 		int which_port; | ||
| 659 | 	} __Request__thread_set_special_port_t __attribute__((unused)); | ||
| 660 | #ifdef __MigPackStructs | ||
| 661 | #pragma pack(pop) | ||
| 662 | #endif | ||
| 663 | |||
| 664 | #ifdef __MigPackStructs | ||
| 665 | #pragma pack(push, 4) | ||
| 666 | #endif | ||
| 667 | 	typedef struct { | ||
| 668 | 		mach_msg_header_t Head; | ||
| 669 | 		NDR_record_t NDR; | ||
| 670 | 		thread_flavor_t flavor; | ||
| 671 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 672 | 	} __Request__thread_info_t __attribute__((unused)); | ||
| 673 | #ifdef __MigPackStructs | ||
| 674 | #pragma pack(pop) | ||
| 675 | #endif | ||
| 676 | |||
| 677 | #ifdef __MigPackStructs | ||
| 678 | #pragma pack(push, 4) | ||
| 679 | #endif | ||
| 680 | 	typedef struct { | ||
| 681 | 		mach_msg_header_t Head; | ||
| 682 | 		/* start of the kernel processed data */ | ||
| 683 | 		mach_msg_body_t msgh_body; | ||
| 684 | 		mach_msg_port_descriptor_t new_port; | ||
| 685 | 		/* end of the kernel processed data */ | ||
| 686 | 		NDR_record_t NDR; | ||
| 687 | 		exception_mask_t exception_mask; | ||
| 688 | 		exception_behavior_t behavior; | ||
| 689 | 		thread_state_flavor_t new_flavor; | ||
| 690 | 	} __Request__thread_set_exception_ports_t __attribute__((unused)); | ||
| 691 | #ifdef __MigPackStructs | ||
| 692 | #pragma pack(pop) | ||
| 693 | #endif | ||
| 694 | |||
| 695 | #ifdef __MigPackStructs | ||
| 696 | #pragma pack(push, 4) | ||
| 697 | #endif | ||
| 698 | 	typedef struct { | ||
| 699 | 		mach_msg_header_t Head; | ||
| 700 | 		NDR_record_t NDR; | ||
| 701 | 		exception_mask_t exception_mask; | ||
| 702 | 	} __Request__thread_get_exception_ports_t __attribute__((unused)); | ||
| 703 | #ifdef __MigPackStructs | ||
| 704 | #pragma pack(pop) | ||
| 705 | #endif | ||
| 706 | |||
| 707 | #ifdef __MigPackStructs | ||
| 708 | #pragma pack(push, 4) | ||
| 709 | #endif | ||
| 710 | 	typedef struct { | ||
| 711 | 		mach_msg_header_t Head; | ||
| 712 | 		/* start of the kernel processed data */ | ||
| 713 | 		mach_msg_body_t msgh_body; | ||
| 714 | 		mach_msg_port_descriptor_t new_port; | ||
| 715 | 		/* end of the kernel processed data */ | ||
| 716 | 		NDR_record_t NDR; | ||
| 717 | 		exception_mask_t exception_mask; | ||
| 718 | 		exception_behavior_t behavior; | ||
| 719 | 		thread_state_flavor_t new_flavor; | ||
| 720 | 	} __Request__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 721 | #ifdef __MigPackStructs | ||
| 722 | #pragma pack(pop) | ||
| 723 | #endif | ||
| 724 | |||
| 725 | #ifdef __MigPackStructs | ||
| 726 | #pragma pack(push, 4) | ||
| 727 | #endif | ||
| 728 | 	typedef struct { | ||
| 729 | 		mach_msg_header_t Head; | ||
| 730 | 		NDR_record_t NDR; | ||
| 731 | 		policy_t policy; | ||
| 732 | 		mach_msg_type_number_t baseCnt; | ||
| 733 | 		integer_t base[5]; | ||
| 734 | 		boolean_t set_limit; | ||
| 735 | 	} __Request__thread_policy_t __attribute__((unused)); | ||
| 736 | #ifdef __MigPackStructs | ||
| 737 | #pragma pack(pop) | ||
| 738 | #endif | ||
| 739 | |||
| 740 | #ifdef __MigPackStructs | ||
| 741 | #pragma pack(push, 4) | ||
| 742 | #endif | ||
| 743 | 	typedef struct { | ||
| 744 | 		mach_msg_header_t Head; | ||
| 745 | 		NDR_record_t NDR; | ||
| 746 | 		thread_policy_flavor_t flavor; | ||
| 747 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 748 | 		integer_t policy_info[16]; | ||
| 749 | 	} __Request__thread_policy_set_t __attribute__((unused)); | ||
| 750 | #ifdef __MigPackStructs | ||
| 751 | #pragma pack(pop) | ||
| 752 | #endif | ||
| 753 | |||
| 754 | #ifdef __MigPackStructs | ||
| 755 | #pragma pack(push, 4) | ||
| 756 | #endif | ||
| 757 | 	typedef struct { | ||
| 758 | 		mach_msg_header_t Head; | ||
| 759 | 		NDR_record_t NDR; | ||
| 760 | 		thread_policy_flavor_t flavor; | ||
| 761 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 762 | 		boolean_t get_default; | ||
| 763 | 	} __Request__thread_policy_get_t __attribute__((unused)); | ||
| 764 | #ifdef __MigPackStructs | ||
| 765 | #pragma pack(pop) | ||
| 766 | #endif | ||
| 767 | |||
| 768 | #ifdef __MigPackStructs | ||
| 769 | #pragma pack(push, 4) | ||
| 770 | #endif | ||
| 771 | 	typedef struct { | ||
| 772 | 		mach_msg_header_t Head; | ||
| 773 | 		/* start of the kernel processed data */ | ||
| 774 | 		mach_msg_body_t msgh_body; | ||
| 775 | 		mach_msg_port_descriptor_t reply; | ||
| 776 | 		/* end of the kernel processed data */ | ||
| 777 | 	} __Request__thread_sample_t __attribute__((unused)); | ||
| 778 | #ifdef __MigPackStructs | ||
| 779 | #pragma pack(pop) | ||
| 780 | #endif | ||
| 781 | |||
| 782 | #ifdef __MigPackStructs | ||
| 783 | #pragma pack(push, 4) | ||
| 784 | #endif | ||
| 785 | 	typedef struct { | ||
| 786 | 		mach_msg_header_t Head; | ||
| 787 | 		NDR_record_t NDR; | ||
| 788 | 		boolean_t trace_status; | ||
| 789 | 	} __Request__etap_trace_thread_t __attribute__((unused)); | ||
| 790 | #ifdef __MigPackStructs | ||
| 791 | #pragma pack(pop) | ||
| 792 | #endif | ||
| 793 | |||
| 794 | #ifdef __MigPackStructs | ||
| 795 | #pragma pack(push, 4) | ||
| 796 | #endif | ||
| 797 | 	typedef struct { | ||
| 798 | 		mach_msg_header_t Head; | ||
| 799 | 		/* start of the kernel processed data */ | ||
| 800 | 		mach_msg_body_t msgh_body; | ||
| 801 | 		mach_msg_port_descriptor_t new_set; | ||
| 802 | 		/* end of the kernel processed data */ | ||
| 803 | 	} __Request__thread_assign_t __attribute__((unused)); | ||
| 804 | #ifdef __MigPackStructs | ||
| 805 | #pragma pack(pop) | ||
| 806 | #endif | ||
| 807 | |||
| 808 | #ifdef __MigPackStructs | ||
| 809 | #pragma pack(push, 4) | ||
| 810 | #endif | ||
| 811 | 	typedef struct { | ||
| 812 | 		mach_msg_header_t Head; | ||
| 813 | 	} __Request__thread_assign_default_t __attribute__((unused)); | ||
| 814 | #ifdef __MigPackStructs | ||
| 815 | #pragma pack(pop) | ||
| 816 | #endif | ||
| 817 | |||
| 818 | #ifdef __MigPackStructs | ||
| 819 | #pragma pack(push, 4) | ||
| 820 | #endif | ||
| 821 | 	typedef struct { | ||
| 822 | 		mach_msg_header_t Head; | ||
| 823 | 	} __Request__thread_get_assignment_t __attribute__((unused)); | ||
| 824 | #ifdef __MigPackStructs | ||
| 825 | #pragma pack(pop) | ||
| 826 | #endif | ||
| 827 | |||
| 828 | #ifdef __MigPackStructs | ||
| 829 | #pragma pack(push, 4) | ||
| 830 | #endif | ||
| 831 | 	typedef struct { | ||
| 832 | 		mach_msg_header_t Head; | ||
| 833 | 		/* start of the kernel processed data */ | ||
| 834 | 		mach_msg_body_t msgh_body; | ||
| 835 | 		mach_msg_port_descriptor_t pset; | ||
| 836 | 		/* end of the kernel processed data */ | ||
| 837 | 		NDR_record_t NDR; | ||
| 838 | 		policy_t policy; | ||
| 839 | 		mach_msg_type_number_t baseCnt; | ||
| 840 | 		integer_t base[5]; | ||
| 841 | 		mach_msg_type_number_t limitCnt; | ||
| 842 | 		integer_t limit[1]; | ||
| 843 | 	} __Request__thread_set_policy_t __attribute__((unused)); | ||
| 844 | #ifdef __MigPackStructs | ||
| 845 | #pragma pack(pop) | ||
| 846 | #endif | ||
| 847 | |||
| 848 | #ifdef __MigPackStructs | ||
| 849 | #pragma pack(push, 4) | ||
| 850 | #endif | ||
| 851 | 	typedef struct { | ||
| 852 | 		mach_msg_header_t Head; | ||
| 853 | 		NDR_record_t NDR; | ||
| 854 | 		mach_voucher_selector_t which; | ||
| 855 | 	} __Request__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 856 | #ifdef __MigPackStructs | ||
| 857 | #pragma pack(pop) | ||
| 858 | #endif | ||
| 859 | |||
| 860 | #ifdef __MigPackStructs | ||
| 861 | #pragma pack(push, 4) | ||
| 862 | #endif | ||
| 863 | 	typedef struct { | ||
| 864 | 		mach_msg_header_t Head; | ||
| 865 | 		/* start of the kernel processed data */ | ||
| 866 | 		mach_msg_body_t msgh_body; | ||
| 867 | 		mach_msg_port_descriptor_t voucher; | ||
| 868 | 		/* end of the kernel processed data */ | ||
| 869 | 	} __Request__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 870 | #ifdef __MigPackStructs | ||
| 871 | #pragma pack(pop) | ||
| 872 | #endif | ||
| 873 | |||
| 874 | #ifdef __MigPackStructs | ||
| 875 | #pragma pack(push, 4) | ||
| 876 | #endif | ||
| 877 | 	typedef struct { | ||
| 878 | 		mach_msg_header_t Head; | ||
| 879 | 		/* start of the kernel processed data */ | ||
| 880 | 		mach_msg_body_t msgh_body; | ||
| 881 | 		mach_msg_port_descriptor_t new_voucher; | ||
| 882 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 883 | 		/* end of the kernel processed data */ | ||
| 884 | 	} __Request__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 885 | #ifdef __MigPackStructs | ||
| 886 | #pragma pack(pop) | ||
| 887 | #endif | ||
| 888 | |||
| 889 | #ifdef __MigPackStructs | ||
| 890 | #pragma pack(push, 4) | ||
| 891 | #endif | ||
| 892 | 	typedef struct { | ||
| 893 | 		mach_msg_header_t Head; | ||
| 894 | 		NDR_record_t NDR; | ||
| 895 | 		int direction; | ||
| 896 | 		thread_state_flavor_t flavor; | ||
| 897 | 		mach_msg_type_number_t in_stateCnt; | ||
| 898 | 		natural_t in_state[1296]; | ||
| 899 | 		mach_msg_type_number_t out_stateCnt; | ||
| 900 | 	} __Request__thread_convert_thread_state_t __attribute__((unused)); | ||
| 901 | #ifdef __MigPackStructs | ||
| 902 | #pragma pack(pop) | ||
| 903 | #endif | ||
| 904 | |||
| 905 | #ifdef __MigPackStructs | ||
| 906 | #pragma pack(push, 4) | ||
| 907 | #endif | ||
| 908 | 	typedef struct { | ||
| 909 | 		mach_msg_header_t Head; | ||
| 910 | 		NDR_record_t NDR; | ||
| 911 | 		exception_mask_t exception_mask; | ||
| 912 | 	} __Request__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 913 | #ifdef __MigPackStructs | ||
| 914 | #pragma pack(pop) | ||
| 915 | #endif | ||
| 916 | #endif /* !__Request__thread_act_subsystem__defined */ | ||
| 917 | |||
| 918 | /* union of all requests */ | ||
| 919 | |||
| 920 | #ifndef __RequestUnion__thread_act_subsystem__defined | ||
| 921 | #define __RequestUnion__thread_act_subsystem__defined | ||
| 922 | union __RequestUnion__thread_act_subsystem { | ||
| 923 | 	__Request__thread_terminate_t Request_thread_terminate; | ||
| 924 | 	__Request__act_get_state_t Request_act_get_state; | ||
| 925 | 	__Request__act_set_state_t Request_act_set_state; | ||
| 926 | 	__Request__thread_get_state_t Request_thread_get_state; | ||
| 927 | 	__Request__thread_set_state_t Request_thread_set_state; | ||
| 928 | 	__Request__thread_suspend_t Request_thread_suspend; | ||
| 929 | 	__Request__thread_resume_t Request_thread_resume; | ||
| 930 | 	__Request__thread_abort_t Request_thread_abort; | ||
| 931 | 	__Request__thread_abort_safely_t Request_thread_abort_safely; | ||
| 932 | 	__Request__thread_depress_abort_t Request_thread_depress_abort; | ||
| 933 | 	__Request__thread_get_special_port_t Request_thread_get_special_port; | ||
| 934 | 	__Request__thread_set_special_port_t Request_thread_set_special_port; | ||
| 935 | 	__Request__thread_info_t Request_thread_info; | ||
| 936 | 	__Request__thread_set_exception_ports_t Request_thread_set_exception_ports; | ||
| 937 | 	__Request__thread_get_exception_ports_t Request_thread_get_exception_ports; | ||
| 938 | 	__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; | ||
| 939 | 	__Request__thread_policy_t Request_thread_policy; | ||
| 940 | 	__Request__thread_policy_set_t Request_thread_policy_set; | ||
| 941 | 	__Request__thread_policy_get_t Request_thread_policy_get; | ||
| 942 | 	__Request__thread_sample_t Request_thread_sample; | ||
| 943 | 	__Request__etap_trace_thread_t Request_etap_trace_thread; | ||
| 944 | 	__Request__thread_assign_t Request_thread_assign; | ||
| 945 | 	__Request__thread_assign_default_t Request_thread_assign_default; | ||
| 946 | 	__Request__thread_get_assignment_t Request_thread_get_assignment; | ||
| 947 | 	__Request__thread_set_policy_t Request_thread_set_policy; | ||
| 948 | 	__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher; | ||
| 949 | 	__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher; | ||
| 950 | 	__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher; | ||
| 951 | 	__Request__thread_convert_thread_state_t Request_thread_convert_thread_state; | ||
| 952 | 	__Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info; | ||
| 953 | }; | ||
| 954 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 955 | /* typedefs for all replies */ | ||
| 956 | |||
| 957 | #ifndef __Reply__thread_act_subsystem__defined | ||
| 958 | #define __Reply__thread_act_subsystem__defined | ||
| 959 | |||
| 960 | #ifdef __MigPackStructs | ||
| 961 | #pragma pack(push, 4) | ||
| 962 | #endif | ||
| 963 | 	typedef struct { | ||
| 964 | 		mach_msg_header_t Head; | ||
| 965 | 		NDR_record_t NDR; | ||
| 966 | 		kern_return_t RetCode; | ||
| 967 | 	} __Reply__thread_terminate_t __attribute__((unused)); | ||
| 968 | #ifdef __MigPackStructs | ||
| 969 | #pragma pack(pop) | ||
| 970 | #endif | ||
| 971 | |||
| 972 | #ifdef __MigPackStructs | ||
| 973 | #pragma pack(push, 4) | ||
| 974 | #endif | ||
| 975 | 	typedef struct { | ||
| 976 | 		mach_msg_header_t Head; | ||
| 977 | 		NDR_record_t NDR; | ||
| 978 | 		kern_return_t RetCode; | ||
| 979 | 		mach_msg_type_number_t old_stateCnt; | ||
| 980 | 		natural_t old_state[1296]; | ||
| 981 | 	} __Reply__act_get_state_t __attribute__((unused)); | ||
| 982 | #ifdef __MigPackStructs | ||
| 983 | #pragma pack(pop) | ||
| 984 | #endif | ||
| 985 | |||
| 986 | #ifdef __MigPackStructs | ||
| 987 | #pragma pack(push, 4) | ||
| 988 | #endif | ||
| 989 | 	typedef struct { | ||
| 990 | 		mach_msg_header_t Head; | ||
| 991 | 		NDR_record_t NDR; | ||
| 992 | 		kern_return_t RetCode; | ||
| 993 | 	} __Reply__act_set_state_t __attribute__((unused)); | ||
| 994 | #ifdef __MigPackStructs | ||
| 995 | #pragma pack(pop) | ||
| 996 | #endif | ||
| 997 | |||
| 998 | #ifdef __MigPackStructs | ||
| 999 | #pragma pack(push, 4) | ||
| 1000 | #endif | ||
| 1001 | 	typedef struct { | ||
| 1002 | 		mach_msg_header_t Head; | ||
| 1003 | 		NDR_record_t NDR; | ||
| 1004 | 		kern_return_t RetCode; | ||
| 1005 | 		mach_msg_type_number_t old_stateCnt; | ||
| 1006 | 		natural_t old_state[1296]; | ||
| 1007 | 	} __Reply__thread_get_state_t __attribute__((unused)); | ||
| 1008 | #ifdef __MigPackStructs | ||
| 1009 | #pragma pack(pop) | ||
| 1010 | #endif | ||
| 1011 | |||
| 1012 | #ifdef __MigPackStructs | ||
| 1013 | #pragma pack(push, 4) | ||
| 1014 | #endif | ||
| 1015 | 	typedef struct { | ||
| 1016 | 		mach_msg_header_t Head; | ||
| 1017 | 		NDR_record_t NDR; | ||
| 1018 | 		kern_return_t RetCode; | ||
| 1019 | 	} __Reply__thread_set_state_t __attribute__((unused)); | ||
| 1020 | #ifdef __MigPackStructs | ||
| 1021 | #pragma pack(pop) | ||
| 1022 | #endif | ||
| 1023 | |||
| 1024 | #ifdef __MigPackStructs | ||
| 1025 | #pragma pack(push, 4) | ||
| 1026 | #endif | ||
| 1027 | 	typedef struct { | ||
| 1028 | 		mach_msg_header_t Head; | ||
| 1029 | 		NDR_record_t NDR; | ||
| 1030 | 		kern_return_t RetCode; | ||
| 1031 | 	} __Reply__thread_suspend_t __attribute__((unused)); | ||
| 1032 | #ifdef __MigPackStructs | ||
| 1033 | #pragma pack(pop) | ||
| 1034 | #endif | ||
| 1035 | |||
| 1036 | #ifdef __MigPackStructs | ||
| 1037 | #pragma pack(push, 4) | ||
| 1038 | #endif | ||
| 1039 | 	typedef struct { | ||
| 1040 | 		mach_msg_header_t Head; | ||
| 1041 | 		NDR_record_t NDR; | ||
| 1042 | 		kern_return_t RetCode; | ||
| 1043 | 	} __Reply__thread_resume_t __attribute__((unused)); | ||
| 1044 | #ifdef __MigPackStructs | ||
| 1045 | #pragma pack(pop) | ||
| 1046 | #endif | ||
| 1047 | |||
| 1048 | #ifdef __MigPackStructs | ||
| 1049 | #pragma pack(push, 4) | ||
| 1050 | #endif | ||
| 1051 | 	typedef struct { | ||
| 1052 | 		mach_msg_header_t Head; | ||
| 1053 | 		NDR_record_t NDR; | ||
| 1054 | 		kern_return_t RetCode; | ||
| 1055 | 	} __Reply__thread_abort_t __attribute__((unused)); | ||
| 1056 | #ifdef __MigPackStructs | ||
| 1057 | #pragma pack(pop) | ||
| 1058 | #endif | ||
| 1059 | |||
| 1060 | #ifdef __MigPackStructs | ||
| 1061 | #pragma pack(push, 4) | ||
| 1062 | #endif | ||
| 1063 | 	typedef struct { | ||
| 1064 | 		mach_msg_header_t Head; | ||
| 1065 | 		NDR_record_t NDR; | ||
| 1066 | 		kern_return_t RetCode; | ||
| 1067 | 	} __Reply__thread_abort_safely_t __attribute__((unused)); | ||
| 1068 | #ifdef __MigPackStructs | ||
| 1069 | #pragma pack(pop) | ||
| 1070 | #endif | ||
| 1071 | |||
| 1072 | #ifdef __MigPackStructs | ||
| 1073 | #pragma pack(push, 4) | ||
| 1074 | #endif | ||
| 1075 | 	typedef struct { | ||
| 1076 | 		mach_msg_header_t Head; | ||
| 1077 | 		NDR_record_t NDR; | ||
| 1078 | 		kern_return_t RetCode; | ||
| 1079 | 	} __Reply__thread_depress_abort_t __attribute__((unused)); | ||
| 1080 | #ifdef __MigPackStructs | ||
| 1081 | #pragma pack(pop) | ||
| 1082 | #endif | ||
| 1083 | |||
| 1084 | #ifdef __MigPackStructs | ||
| 1085 | #pragma pack(push, 4) | ||
| 1086 | #endif | ||
| 1087 | 	typedef struct { | ||
| 1088 | 		mach_msg_header_t Head; | ||
| 1089 | 		/* start of the kernel processed data */ | ||
| 1090 | 		mach_msg_body_t msgh_body; | ||
| 1091 | 		mach_msg_port_descriptor_t special_port; | ||
| 1092 | 		/* end of the kernel processed data */ | ||
| 1093 | 	} __Reply__thread_get_special_port_t __attribute__((unused)); | ||
| 1094 | #ifdef __MigPackStructs | ||
| 1095 | #pragma pack(pop) | ||
| 1096 | #endif | ||
| 1097 | |||
| 1098 | #ifdef __MigPackStructs | ||
| 1099 | #pragma pack(push, 4) | ||
| 1100 | #endif | ||
| 1101 | 	typedef struct { | ||
| 1102 | 		mach_msg_header_t Head; | ||
| 1103 | 		NDR_record_t NDR; | ||
| 1104 | 		kern_return_t RetCode; | ||
| 1105 | 	} __Reply__thread_set_special_port_t __attribute__((unused)); | ||
| 1106 | #ifdef __MigPackStructs | ||
| 1107 | #pragma pack(pop) | ||
| 1108 | #endif | ||
| 1109 | |||
| 1110 | #ifdef __MigPackStructs | ||
| 1111 | #pragma pack(push, 4) | ||
| 1112 | #endif | ||
| 1113 | 	typedef struct { | ||
| 1114 | 		mach_msg_header_t Head; | ||
| 1115 | 		NDR_record_t NDR; | ||
| 1116 | 		kern_return_t RetCode; | ||
| 1117 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 1118 | 		integer_t thread_info_out[32]; | ||
| 1119 | 	} __Reply__thread_info_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		kern_return_t RetCode; | ||
| 1131 | 	} __Reply__thread_set_exception_ports_t __attribute__((unused)); | ||
| 1132 | #ifdef __MigPackStructs | ||
| 1133 | #pragma pack(pop) | ||
| 1134 | #endif | ||
| 1135 | |||
| 1136 | #ifdef __MigPackStructs | ||
| 1137 | #pragma pack(push, 4) | ||
| 1138 | #endif | ||
| 1139 | 	typedef struct { | ||
| 1140 | 		mach_msg_header_t Head; | ||
| 1141 | 		/* start of the kernel processed data */ | ||
| 1142 | 		mach_msg_body_t msgh_body; | ||
| 1143 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1144 | 		/* end of the kernel processed data */ | ||
| 1145 | 		NDR_record_t NDR; | ||
| 1146 | 		mach_msg_type_number_t masksCnt; | ||
| 1147 | 		exception_mask_t masks[32]; | ||
| 1148 | 		exception_behavior_t old_behaviors[32]; | ||
| 1149 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1150 | 	} __Reply__thread_get_exception_ports_t __attribute__((unused)); | ||
| 1151 | #ifdef __MigPackStructs | ||
| 1152 | #pragma pack(pop) | ||
| 1153 | #endif | ||
| 1154 | |||
| 1155 | #ifdef __MigPackStructs | ||
| 1156 | #pragma pack(push, 4) | ||
| 1157 | #endif | ||
| 1158 | 	typedef struct { | ||
| 1159 | 		mach_msg_header_t Head; | ||
| 1160 | 		/* start of the kernel processed data */ | ||
| 1161 | 		mach_msg_body_t msgh_body; | ||
| 1162 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1163 | 		/* end of the kernel processed data */ | ||
| 1164 | 		NDR_record_t NDR; | ||
| 1165 | 		mach_msg_type_number_t masksCnt; | ||
| 1166 | 		exception_mask_t masks[32]; | ||
| 1167 | 		exception_behavior_t old_behaviors[32]; | ||
| 1168 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1169 | 	} __Reply__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 1170 | #ifdef __MigPackStructs | ||
| 1171 | #pragma pack(pop) | ||
| 1172 | #endif | ||
| 1173 | |||
| 1174 | #ifdef __MigPackStructs | ||
| 1175 | #pragma pack(push, 4) | ||
| 1176 | #endif | ||
| 1177 | 	typedef struct { | ||
| 1178 | 		mach_msg_header_t Head; | ||
| 1179 | 		NDR_record_t NDR; | ||
| 1180 | 		kern_return_t RetCode; | ||
| 1181 | 	} __Reply__thread_policy_t __attribute__((unused)); | ||
| 1182 | #ifdef __MigPackStructs | ||
| 1183 | #pragma pack(pop) | ||
| 1184 | #endif | ||
| 1185 | |||
| 1186 | #ifdef __MigPackStructs | ||
| 1187 | #pragma pack(push, 4) | ||
| 1188 | #endif | ||
| 1189 | 	typedef struct { | ||
| 1190 | 		mach_msg_header_t Head; | ||
| 1191 | 		NDR_record_t NDR; | ||
| 1192 | 		kern_return_t RetCode; | ||
| 1193 | 	} __Reply__thread_policy_set_t __attribute__((unused)); | ||
| 1194 | #ifdef __MigPackStructs | ||
| 1195 | #pragma pack(pop) | ||
| 1196 | #endif | ||
| 1197 | |||
| 1198 | #ifdef __MigPackStructs | ||
| 1199 | #pragma pack(push, 4) | ||
| 1200 | #endif | ||
| 1201 | 	typedef struct { | ||
| 1202 | 		mach_msg_header_t Head; | ||
| 1203 | 		NDR_record_t NDR; | ||
| 1204 | 		kern_return_t RetCode; | ||
| 1205 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 1206 | 		integer_t policy_info[16]; | ||
| 1207 | 		boolean_t get_default; | ||
| 1208 | 	} __Reply__thread_policy_get_t __attribute__((unused)); | ||
| 1209 | #ifdef __MigPackStructs | ||
| 1210 | #pragma pack(pop) | ||
| 1211 | #endif | ||
| 1212 | |||
| 1213 | #ifdef __MigPackStructs | ||
| 1214 | #pragma pack(push, 4) | ||
| 1215 | #endif | ||
| 1216 | 	typedef struct { | ||
| 1217 | 		mach_msg_header_t Head; | ||
| 1218 | 		NDR_record_t NDR; | ||
| 1219 | 		kern_return_t RetCode; | ||
| 1220 | 	} __Reply__thread_sample_t __attribute__((unused)); | ||
| 1221 | #ifdef __MigPackStructs | ||
| 1222 | #pragma pack(pop) | ||
| 1223 | #endif | ||
| 1224 | |||
| 1225 | #ifdef __MigPackStructs | ||
| 1226 | #pragma pack(push, 4) | ||
| 1227 | #endif | ||
| 1228 | 	typedef struct { | ||
| 1229 | 		mach_msg_header_t Head; | ||
| 1230 | 		NDR_record_t NDR; | ||
| 1231 | 		kern_return_t RetCode; | ||
| 1232 | 	} __Reply__etap_trace_thread_t __attribute__((unused)); | ||
| 1233 | #ifdef __MigPackStructs | ||
| 1234 | #pragma pack(pop) | ||
| 1235 | #endif | ||
| 1236 | |||
| 1237 | #ifdef __MigPackStructs | ||
| 1238 | #pragma pack(push, 4) | ||
| 1239 | #endif | ||
| 1240 | 	typedef struct { | ||
| 1241 | 		mach_msg_header_t Head; | ||
| 1242 | 		NDR_record_t NDR; | ||
| 1243 | 		kern_return_t RetCode; | ||
| 1244 | 	} __Reply__thread_assign_t __attribute__((unused)); | ||
| 1245 | #ifdef __MigPackStructs | ||
| 1246 | #pragma pack(pop) | ||
| 1247 | #endif | ||
| 1248 | |||
| 1249 | #ifdef __MigPackStructs | ||
| 1250 | #pragma pack(push, 4) | ||
| 1251 | #endif | ||
| 1252 | 	typedef struct { | ||
| 1253 | 		mach_msg_header_t Head; | ||
| 1254 | 		NDR_record_t NDR; | ||
| 1255 | 		kern_return_t RetCode; | ||
| 1256 | 	} __Reply__thread_assign_default_t __attribute__((unused)); | ||
| 1257 | #ifdef __MigPackStructs | ||
| 1258 | #pragma pack(pop) | ||
| 1259 | #endif | ||
| 1260 | |||
| 1261 | #ifdef __MigPackStructs | ||
| 1262 | #pragma pack(push, 4) | ||
| 1263 | #endif | ||
| 1264 | 	typedef struct { | ||
| 1265 | 		mach_msg_header_t Head; | ||
| 1266 | 		/* start of the kernel processed data */ | ||
| 1267 | 		mach_msg_body_t msgh_body; | ||
| 1268 | 		mach_msg_port_descriptor_t assigned_set; | ||
| 1269 | 		/* end of the kernel processed data */ | ||
| 1270 | 	} __Reply__thread_get_assignment_t __attribute__((unused)); | ||
| 1271 | #ifdef __MigPackStructs | ||
| 1272 | #pragma pack(pop) | ||
| 1273 | #endif | ||
| 1274 | |||
| 1275 | #ifdef __MigPackStructs | ||
| 1276 | #pragma pack(push, 4) | ||
| 1277 | #endif | ||
| 1278 | 	typedef struct { | ||
| 1279 | 		mach_msg_header_t Head; | ||
| 1280 | 		NDR_record_t NDR; | ||
| 1281 | 		kern_return_t RetCode; | ||
| 1282 | 	} __Reply__thread_set_policy_t __attribute__((unused)); | ||
| 1283 | #ifdef __MigPackStructs | ||
| 1284 | #pragma pack(pop) | ||
| 1285 | #endif | ||
| 1286 | |||
| 1287 | #ifdef __MigPackStructs | ||
| 1288 | #pragma pack(push, 4) | ||
| 1289 | #endif | ||
| 1290 | 	typedef struct { | ||
| 1291 | 		mach_msg_header_t Head; | ||
| 1292 | 		/* start of the kernel processed data */ | ||
| 1293 | 		mach_msg_body_t msgh_body; | ||
| 1294 | 		mach_msg_port_descriptor_t voucher; | ||
| 1295 | 		/* end of the kernel processed data */ | ||
| 1296 | 	} __Reply__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 1297 | #ifdef __MigPackStructs | ||
| 1298 | #pragma pack(pop) | ||
| 1299 | #endif | ||
| 1300 | |||
| 1301 | #ifdef __MigPackStructs | ||
| 1302 | #pragma pack(push, 4) | ||
| 1303 | #endif | ||
| 1304 | 	typedef struct { | ||
| 1305 | 		mach_msg_header_t Head; | ||
| 1306 | 		NDR_record_t NDR; | ||
| 1307 | 		kern_return_t RetCode; | ||
| 1308 | 	} __Reply__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 1309 | #ifdef __MigPackStructs | ||
| 1310 | #pragma pack(pop) | ||
| 1311 | #endif | ||
| 1312 | |||
| 1313 | #ifdef __MigPackStructs | ||
| 1314 | #pragma pack(push, 4) | ||
| 1315 | #endif | ||
| 1316 | 	typedef struct { | ||
| 1317 | 		mach_msg_header_t Head; | ||
| 1318 | 		/* start of the kernel processed data */ | ||
| 1319 | 		mach_msg_body_t msgh_body; | ||
| 1320 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 1321 | 		/* end of the kernel processed data */ | ||
| 1322 | 	} __Reply__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 1323 | #ifdef __MigPackStructs | ||
| 1324 | #pragma pack(pop) | ||
| 1325 | #endif | ||
| 1326 | |||
| 1327 | #ifdef __MigPackStructs | ||
| 1328 | #pragma pack(push, 4) | ||
| 1329 | #endif | ||
| 1330 | 	typedef struct { | ||
| 1331 | 		mach_msg_header_t Head; | ||
| 1332 | 		NDR_record_t NDR; | ||
| 1333 | 		kern_return_t RetCode; | ||
| 1334 | 		mach_msg_type_number_t out_stateCnt; | ||
| 1335 | 		natural_t out_state[1296]; | ||
| 1336 | 	} __Reply__thread_convert_thread_state_t __attribute__((unused)); | ||
| 1337 | #ifdef __MigPackStructs | ||
| 1338 | #pragma pack(pop) | ||
| 1339 | #endif | ||
| 1340 | |||
| 1341 | #ifdef __MigPackStructs | ||
| 1342 | #pragma pack(push, 4) | ||
| 1343 | #endif | ||
| 1344 | 	typedef struct { | ||
| 1345 | 		mach_msg_header_t Head; | ||
| 1346 | 		NDR_record_t NDR; | ||
| 1347 | 		kern_return_t RetCode; | ||
| 1348 | 		mach_msg_type_number_t masksCnt; | ||
| 1349 | 		exception_mask_t masks[32]; | ||
| 1350 | 		exception_handler_info_t old_handlers_info[32]; | ||
| 1351 | 		exception_behavior_t old_behaviors[32]; | ||
| 1352 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1353 | 	} __Reply__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 1354 | #ifdef __MigPackStructs | ||
| 1355 | #pragma pack(pop) | ||
| 1356 | #endif | ||
| 1357 | #endif /* !__Reply__thread_act_subsystem__defined */ | ||
| 1358 | |||
| 1359 | /* union of all replies */ | ||
| 1360 | |||
| 1361 | #ifndef __ReplyUnion__thread_act_subsystem__defined | ||
| 1362 | #define __ReplyUnion__thread_act_subsystem__defined | ||
| 1363 | union __ReplyUnion__thread_act_subsystem { | ||
| 1364 | 	__Reply__thread_terminate_t Reply_thread_terminate; | ||
| 1365 | 	__Reply__act_get_state_t Reply_act_get_state; | ||
| 1366 | 	__Reply__act_set_state_t Reply_act_set_state; | ||
| 1367 | 	__Reply__thread_get_state_t Reply_thread_get_state; | ||
| 1368 | 	__Reply__thread_set_state_t Reply_thread_set_state; | ||
| 1369 | 	__Reply__thread_suspend_t Reply_thread_suspend; | ||
| 1370 | 	__Reply__thread_resume_t Reply_thread_resume; | ||
| 1371 | 	__Reply__thread_abort_t Reply_thread_abort; | ||
| 1372 | 	__Reply__thread_abort_safely_t Reply_thread_abort_safely; | ||
| 1373 | 	__Reply__thread_depress_abort_t Reply_thread_depress_abort; | ||
| 1374 | 	__Reply__thread_get_special_port_t Reply_thread_get_special_port; | ||
| 1375 | 	__Reply__thread_set_special_port_t Reply_thread_set_special_port; | ||
| 1376 | 	__Reply__thread_info_t Reply_thread_info; | ||
| 1377 | 	__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; | ||
| 1378 | 	__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; | ||
| 1379 | 	__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; | ||
| 1380 | 	__Reply__thread_policy_t Reply_thread_policy; | ||
| 1381 | 	__Reply__thread_policy_set_t Reply_thread_policy_set; | ||
| 1382 | 	__Reply__thread_policy_get_t Reply_thread_policy_get; | ||
| 1383 | 	__Reply__thread_sample_t Reply_thread_sample; | ||
| 1384 | 	__Reply__etap_trace_thread_t Reply_etap_trace_thread; | ||
| 1385 | 	__Reply__thread_assign_t Reply_thread_assign; | ||
| 1386 | 	__Reply__thread_assign_default_t Reply_thread_assign_default; | ||
| 1387 | 	__Reply__thread_get_assignment_t Reply_thread_get_assignment; | ||
| 1388 | 	__Reply__thread_set_policy_t Reply_thread_set_policy; | ||
| 1389 | 	__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher; | ||
| 1390 | 	__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher; | ||
| 1391 | 	__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher; | ||
| 1392 | 	__Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state; | ||
| 1393 | 	__Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info; | ||
| 1394 | }; | ||
| 1395 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 1396 | |||
| 1397 | #ifndef subsystem_to_name_map_thread_act | ||
| 1398 | #define subsystem_to_name_map_thread_act \ | ||
| 1399 | { "thread_terminate", 3600 },\ | ||
| 1400 | { "act_get_state", 3601 },\ | ||
| 1401 | { "act_set_state", 3602 },\ | ||
| 1402 | { "thread_get_state", 3603 },\ | ||
| 1403 | { "thread_set_state", 3604 },\ | ||
| 1404 | { "thread_suspend", 3605 },\ | ||
| 1405 | { "thread_resume", 3606 },\ | ||
| 1406 | { "thread_abort", 3607 },\ | ||
| 1407 | { "thread_abort_safely", 3608 },\ | ||
| 1408 | { "thread_depress_abort", 3609 },\ | ||
| 1409 | { "thread_get_special_port", 3610 },\ | ||
| 1410 | { "thread_set_special_port", 3611 },\ | ||
| 1411 | { "thread_info", 3612 },\ | ||
| 1412 | { "thread_set_exception_ports", 3613 },\ | ||
| 1413 | { "thread_get_exception_ports", 3614 },\ | ||
| 1414 | { "thread_swap_exception_ports", 3615 },\ | ||
| 1415 | { "thread_policy", 3616 },\ | ||
| 1416 | { "thread_policy_set", 3617 },\ | ||
| 1417 | { "thread_policy_get", 3618 },\ | ||
| 1418 | { "thread_sample", 3619 },\ | ||
| 1419 | { "etap_trace_thread", 3620 },\ | ||
| 1420 | { "thread_assign", 3621 },\ | ||
| 1421 | { "thread_assign_default", 3622 },\ | ||
| 1422 | { "thread_get_assignment", 3623 },\ | ||
| 1423 | { "thread_set_policy", 3624 },\ | ||
| 1424 | { "thread_get_mach_voucher", 3625 },\ | ||
| 1425 | { "thread_set_mach_voucher", 3626 },\ | ||
| 1426 | { "thread_swap_mach_voucher", 3627 },\ | ||
| 1427 | { "thread_convert_thread_state", 3628 },\ | ||
| 1428 | { "thread_get_exception_ports_info", 3630 } | ||
| 1429 | #endif | ||
| 1430 | |||
| 1431 | #ifdef __AfterMigUserHeader | ||
| 1432 | __AfterMigUserHeader | ||
| 1433 | #endif /* __AfterMigUserHeader */ | ||
| 1434 | |||
| 1435 | #endif	 /* _thread_act_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/vm_map.h deleted-1503| ... | @@ -1,1503 +0,0 @@ | ||
| 1 | #ifndef	_vm_map_user_ | ||
| 2 | #define	_vm_map_user_ | ||
| 3 | |||
| 4 | /* Module vm_map */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	vm_map_MSG_COUNT | ||
| 52 | #define	vm_map_MSG_COUNT	33 | ||
| 53 | #endif	/* vm_map_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach_debug/mach_debug_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine vm_region */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t vm_region | ||
| 76 | ( | ||
| 77 | 	vm_map_t target_task, | ||
| 78 | 	vm_address_t *address, | ||
| 79 | 	vm_size_t *size, | ||
| 80 | 	vm_region_flavor_t flavor, | ||
| 81 | 	vm_region_info_t info, | ||
| 82 | 	mach_msg_type_number_t *infoCnt, | ||
| 83 | 	mach_port_t *object_name | ||
| 84 | ); | ||
| 85 | |||
| 86 | /* Routine vm_allocate */ | ||
| 87 | #ifdef	mig_external | ||
| 88 | mig_external | ||
| 89 | #else | ||
| 90 | extern | ||
| 91 | #endif	/* mig_external */ | ||
| 92 | kern_return_t vm_allocate | ||
| 93 | ( | ||
| 94 | 	vm_map_t target_task, | ||
| 95 | 	vm_address_t *address, | ||
| 96 | 	vm_size_t size, | ||
| 97 | 	int flags | ||
| 98 | ); | ||
| 99 | |||
| 100 | /* Routine vm_deallocate */ | ||
| 101 | #ifdef	mig_external | ||
| 102 | mig_external | ||
| 103 | #else | ||
| 104 | extern | ||
| 105 | #endif	/* mig_external */ | ||
| 106 | kern_return_t vm_deallocate | ||
| 107 | ( | ||
| 108 | 	vm_map_t target_task, | ||
| 109 | 	vm_address_t address, | ||
| 110 | 	vm_size_t size | ||
| 111 | ); | ||
| 112 | |||
| 113 | /* Routine vm_protect */ | ||
| 114 | #ifdef	mig_external | ||
| 115 | mig_external | ||
| 116 | #else | ||
| 117 | extern | ||
| 118 | #endif	/* mig_external */ | ||
| 119 | kern_return_t vm_protect | ||
| 120 | ( | ||
| 121 | 	vm_map_t target_task, | ||
| 122 | 	vm_address_t address, | ||
| 123 | 	vm_size_t size, | ||
| 124 | 	boolean_t set_maximum, | ||
| 125 | 	vm_prot_t new_protection | ||
| 126 | ); | ||
| 127 | |||
| 128 | /* Routine vm_inherit */ | ||
| 129 | #ifdef	mig_external | ||
| 130 | mig_external | ||
| 131 | #else | ||
| 132 | extern | ||
| 133 | #endif	/* mig_external */ | ||
| 134 | kern_return_t vm_inherit | ||
| 135 | ( | ||
| 136 | 	vm_map_t target_task, | ||
| 137 | 	vm_address_t address, | ||
| 138 | 	vm_size_t size, | ||
| 139 | 	vm_inherit_t new_inheritance | ||
| 140 | ); | ||
| 141 | |||
| 142 | /* Routine vm_read */ | ||
| 143 | #ifdef	mig_external | ||
| 144 | mig_external | ||
| 145 | #else | ||
| 146 | extern | ||
| 147 | #endif	/* mig_external */ | ||
| 148 | kern_return_t vm_read | ||
| 149 | ( | ||
| 150 | 	vm_map_t target_task, | ||
| 151 | 	vm_address_t address, | ||
| 152 | 	vm_size_t size, | ||
| 153 | 	vm_offset_t *data, | ||
| 154 | 	mach_msg_type_number_t *dataCnt | ||
| 155 | ); | ||
| 156 | |||
| 157 | /* Routine vm_read_list */ | ||
| 158 | #ifdef	mig_external | ||
| 159 | mig_external | ||
| 160 | #else | ||
| 161 | extern | ||
| 162 | #endif	/* mig_external */ | ||
| 163 | kern_return_t vm_read_list | ||
| 164 | ( | ||
| 165 | 	vm_map_t target_task, | ||
| 166 | 	vm_read_entry_t data_list, | ||
| 167 | 	natural_t count | ||
| 168 | ); | ||
| 169 | |||
| 170 | /* Routine vm_write */ | ||
| 171 | #ifdef	mig_external | ||
| 172 | mig_external | ||
| 173 | #else | ||
| 174 | extern | ||
| 175 | #endif	/* mig_external */ | ||
| 176 | kern_return_t vm_write | ||
| 177 | ( | ||
| 178 | 	vm_map_t target_task, | ||
| 179 | 	vm_address_t address, | ||
| 180 | 	vm_offset_t data, | ||
| 181 | 	mach_msg_type_number_t dataCnt | ||
| 182 | ); | ||
| 183 | |||
| 184 | /* Routine vm_copy */ | ||
| 185 | #ifdef	mig_external | ||
| 186 | mig_external | ||
| 187 | #else | ||
| 188 | extern | ||
| 189 | #endif	/* mig_external */ | ||
| 190 | kern_return_t vm_copy | ||
| 191 | ( | ||
| 192 | 	vm_map_t target_task, | ||
| 193 | 	vm_address_t source_address, | ||
| 194 | 	vm_size_t size, | ||
| 195 | 	vm_address_t dest_address | ||
| 196 | ); | ||
| 197 | |||
| 198 | /* Routine vm_read_overwrite */ | ||
| 199 | #ifdef	mig_external | ||
| 200 | mig_external | ||
| 201 | #else | ||
| 202 | extern | ||
| 203 | #endif	/* mig_external */ | ||
| 204 | kern_return_t vm_read_overwrite | ||
| 205 | ( | ||
| 206 | 	vm_map_t target_task, | ||
| 207 | 	vm_address_t address, | ||
| 208 | 	vm_size_t size, | ||
| 209 | 	vm_address_t data, | ||
| 210 | 	vm_size_t *outsize | ||
| 211 | ); | ||
| 212 | |||
| 213 | /* Routine vm_msync */ | ||
| 214 | #ifdef	mig_external | ||
| 215 | mig_external | ||
| 216 | #else | ||
| 217 | extern | ||
| 218 | #endif	/* mig_external */ | ||
| 219 | kern_return_t vm_msync | ||
| 220 | ( | ||
| 221 | 	vm_map_t target_task, | ||
| 222 | 	vm_address_t address, | ||
| 223 | 	vm_size_t size, | ||
| 224 | 	vm_sync_t sync_flags | ||
| 225 | ); | ||
| 226 | |||
| 227 | /* Routine vm_behavior_set */ | ||
| 228 | #ifdef	mig_external | ||
| 229 | mig_external | ||
| 230 | #else | ||
| 231 | extern | ||
| 232 | #endif	/* mig_external */ | ||
| 233 | kern_return_t vm_behavior_set | ||
| 234 | ( | ||
| 235 | 	vm_map_t target_task, | ||
| 236 | 	vm_address_t address, | ||
| 237 | 	vm_size_t size, | ||
| 238 | 	vm_behavior_t new_behavior | ||
| 239 | ); | ||
| 240 | |||
| 241 | /* Routine vm_map */ | ||
| 242 | #ifdef	mig_external | ||
| 243 | mig_external | ||
| 244 | #else | ||
| 245 | extern | ||
| 246 | #endif	/* mig_external */ | ||
| 247 | kern_return_t vm_map | ||
| 248 | ( | ||
| 249 | 	vm_map_t target_task, | ||
| 250 | 	vm_address_t *address, | ||
| 251 | 	vm_size_t size, | ||
| 252 | 	vm_address_t mask, | ||
| 253 | 	int flags, | ||
| 254 | 	mem_entry_name_port_t object, | ||
| 255 | 	vm_offset_t offset, | ||
| 256 | 	boolean_t copy, | ||
| 257 | 	vm_prot_t cur_protection, | ||
| 258 | 	vm_prot_t max_protection, | ||
| 259 | 	vm_inherit_t inheritance | ||
| 260 | ); | ||
| 261 | |||
| 262 | /* Routine vm_machine_attribute */ | ||
| 263 | #ifdef	mig_external | ||
| 264 | mig_external | ||
| 265 | #else | ||
| 266 | extern | ||
| 267 | #endif	/* mig_external */ | ||
| 268 | kern_return_t vm_machine_attribute | ||
| 269 | ( | ||
| 270 | 	vm_map_t target_task, | ||
| 271 | 	vm_address_t address, | ||
| 272 | 	vm_size_t size, | ||
| 273 | 	vm_machine_attribute_t attribute, | ||
| 274 | 	vm_machine_attribute_val_t *value | ||
| 275 | ); | ||
| 276 | |||
| 277 | /* Routine vm_remap */ | ||
| 278 | #ifdef	mig_external | ||
| 279 | mig_external | ||
| 280 | #else | ||
| 281 | extern | ||
| 282 | #endif	/* mig_external */ | ||
| 283 | kern_return_t vm_remap | ||
| 284 | ( | ||
| 285 | 	vm_map_t target_task, | ||
| 286 | 	vm_address_t *target_address, | ||
| 287 | 	vm_size_t size, | ||
| 288 | 	vm_address_t mask, | ||
| 289 | 	int flags, | ||
| 290 | 	vm_map_t src_task, | ||
| 291 | 	vm_address_t src_address, | ||
| 292 | 	boolean_t copy, | ||
| 293 | 	vm_prot_t *cur_protection, | ||
| 294 | 	vm_prot_t *max_protection, | ||
| 295 | 	vm_inherit_t inheritance | ||
| 296 | ); | ||
| 297 | |||
| 298 | /* Routine task_wire */ | ||
| 299 | #ifdef	mig_external | ||
| 300 | mig_external | ||
| 301 | #else | ||
| 302 | extern | ||
| 303 | #endif	/* mig_external */ | ||
| 304 | __WATCHOS_PROHIBITED | ||
| 305 | __TVOS_PROHIBITED | ||
| 306 | kern_return_t task_wire | ||
| 307 | ( | ||
| 308 | 	vm_map_t target_task, | ||
| 309 | 	boolean_t must_wire | ||
| 310 | ); | ||
| 311 | |||
| 312 | /* Routine mach_make_memory_entry */ | ||
| 313 | #ifdef	mig_external | ||
| 314 | mig_external | ||
| 315 | #else | ||
| 316 | extern | ||
| 317 | #endif	/* mig_external */ | ||
| 318 | kern_return_t mach_make_memory_entry | ||
| 319 | ( | ||
| 320 | 	vm_map_t target_task, | ||
| 321 | 	vm_size_t *size, | ||
| 322 | 	vm_offset_t offset, | ||
| 323 | 	vm_prot_t permission, | ||
| 324 | 	mem_entry_name_port_t *object_handle, | ||
| 325 | 	mem_entry_name_port_t parent_entry | ||
| 326 | ); | ||
| 327 | |||
| 328 | /* Routine vm_map_page_query */ | ||
| 329 | #ifdef	mig_external | ||
| 330 | mig_external | ||
| 331 | #else | ||
| 332 | extern | ||
| 333 | #endif	/* mig_external */ | ||
| 334 | kern_return_t vm_map_page_query | ||
| 335 | ( | ||
| 336 | 	vm_map_t target_map, | ||
| 337 | 	vm_offset_t offset, | ||
| 338 | 	integer_t *disposition, | ||
| 339 | 	integer_t *ref_count | ||
| 340 | ); | ||
| 341 | |||
| 342 | /* Routine mach_vm_region_info */ | ||
| 343 | #ifdef	mig_external | ||
| 344 | mig_external | ||
| 345 | #else | ||
| 346 | extern | ||
| 347 | #endif	/* mig_external */ | ||
| 348 | kern_return_t mach_vm_region_info | ||
| 349 | ( | ||
| 350 | 	vm_map_t task, | ||
| 351 | 	vm_address_t address, | ||
| 352 | 	vm_info_region_t *region, | ||
| 353 | 	vm_info_object_array_t *objects, | ||
| 354 | 	mach_msg_type_number_t *objectsCnt | ||
| 355 | ); | ||
| 356 | |||
| 357 | /* Routine vm_mapped_pages_info */ | ||
| 358 | #ifdef	mig_external | ||
| 359 | mig_external | ||
| 360 | #else | ||
| 361 | extern | ||
| 362 | #endif	/* mig_external */ | ||
| 363 | kern_return_t vm_mapped_pages_info | ||
| 364 | ( | ||
| 365 | 	vm_map_t task, | ||
| 366 | 	page_address_array_t *pages, | ||
| 367 | 	mach_msg_type_number_t *pagesCnt | ||
| 368 | ); | ||
| 369 | |||
| 370 | /* Routine vm_region_recurse */ | ||
| 371 | #ifdef	mig_external | ||
| 372 | mig_external | ||
| 373 | #else | ||
| 374 | extern | ||
| 375 | #endif	/* mig_external */ | ||
| 376 | kern_return_t vm_region_recurse | ||
| 377 | ( | ||
| 378 | 	vm_map_t target_task, | ||
| 379 | 	vm_address_t *address, | ||
| 380 | 	vm_size_t *size, | ||
| 381 | 	natural_t *nesting_depth, | ||
| 382 | 	vm_region_recurse_info_t info, | ||
| 383 | 	mach_msg_type_number_t *infoCnt | ||
| 384 | ); | ||
| 385 | |||
| 386 | /* Routine vm_region_recurse_64 */ | ||
| 387 | #ifdef	mig_external | ||
| 388 | mig_external | ||
| 389 | #else | ||
| 390 | extern | ||
| 391 | #endif	/* mig_external */ | ||
| 392 | kern_return_t vm_region_recurse_64 | ||
| 393 | ( | ||
| 394 | 	vm_map_t target_task, | ||
| 395 | 	vm_address_t *address, | ||
| 396 | 	vm_size_t *size, | ||
| 397 | 	natural_t *nesting_depth, | ||
| 398 | 	vm_region_recurse_info_t info, | ||
| 399 | 	mach_msg_type_number_t *infoCnt | ||
| 400 | ); | ||
| 401 | |||
| 402 | /* Routine mach_vm_region_info_64 */ | ||
| 403 | #ifdef	mig_external | ||
| 404 | mig_external | ||
| 405 | #else | ||
| 406 | extern | ||
| 407 | #endif	/* mig_external */ | ||
| 408 | kern_return_t mach_vm_region_info_64 | ||
| 409 | ( | ||
| 410 | 	vm_map_t task, | ||
| 411 | 	vm_address_t address, | ||
| 412 | 	vm_info_region_64_t *region, | ||
| 413 | 	vm_info_object_array_t *objects, | ||
| 414 | 	mach_msg_type_number_t *objectsCnt | ||
| 415 | ); | ||
| 416 | |||
| 417 | /* Routine vm_region_64 */ | ||
| 418 | #ifdef	mig_external | ||
| 419 | mig_external | ||
| 420 | #else | ||
| 421 | extern | ||
| 422 | #endif	/* mig_external */ | ||
| 423 | kern_return_t vm_region_64 | ||
| 424 | ( | ||
| 425 | 	vm_map_t target_task, | ||
| 426 | 	vm_address_t *address, | ||
| 427 | 	vm_size_t *size, | ||
| 428 | 	vm_region_flavor_t flavor, | ||
| 429 | 	vm_region_info_t info, | ||
| 430 | 	mach_msg_type_number_t *infoCnt, | ||
| 431 | 	mach_port_t *object_name | ||
| 432 | ); | ||
| 433 | |||
| 434 | /* Routine mach_make_memory_entry_64 */ | ||
| 435 | #ifdef	mig_external | ||
| 436 | mig_external | ||
| 437 | #else | ||
| 438 | extern | ||
| 439 | #endif	/* mig_external */ | ||
| 440 | kern_return_t mach_make_memory_entry_64 | ||
| 441 | ( | ||
| 442 | 	vm_map_t target_task, | ||
| 443 | 	memory_object_size_t *size, | ||
| 444 | 	memory_object_offset_t offset, | ||
| 445 | 	vm_prot_t permission, | ||
| 446 | 	mach_port_t *object_handle, | ||
| 447 | 	mem_entry_name_port_t parent_entry | ||
| 448 | ); | ||
| 449 | |||
| 450 | /* Routine vm_map_64 */ | ||
| 451 | #ifdef	mig_external | ||
| 452 | mig_external | ||
| 453 | #else | ||
| 454 | extern | ||
| 455 | #endif	/* mig_external */ | ||
| 456 | kern_return_t vm_map_64 | ||
| 457 | ( | ||
| 458 | 	vm_map_t target_task, | ||
| 459 | 	vm_address_t *address, | ||
| 460 | 	vm_size_t size, | ||
| 461 | 	vm_address_t mask, | ||
| 462 | 	int flags, | ||
| 463 | 	mem_entry_name_port_t object, | ||
| 464 | 	memory_object_offset_t offset, | ||
| 465 | 	boolean_t copy, | ||
| 466 | 	vm_prot_t cur_protection, | ||
| 467 | 	vm_prot_t max_protection, | ||
| 468 | 	vm_inherit_t inheritance | ||
| 469 | ); | ||
| 470 | |||
| 471 | /* Routine vm_purgable_control */ | ||
| 472 | #ifdef	mig_external | ||
| 473 | mig_external | ||
| 474 | #else | ||
| 475 | extern | ||
| 476 | #endif	/* mig_external */ | ||
| 477 | kern_return_t vm_purgable_control | ||
| 478 | ( | ||
| 479 | 	vm_map_t target_task, | ||
| 480 | 	vm_address_t address, | ||
| 481 | 	vm_purgable_t control, | ||
| 482 | 	int *state | ||
| 483 | ); | ||
| 484 | |||
| 485 | /* Routine vm_map_exec_lockdown */ | ||
| 486 | #ifdef	mig_external | ||
| 487 | mig_external | ||
| 488 | #else | ||
| 489 | extern | ||
| 490 | #endif	/* mig_external */ | ||
| 491 | kern_return_t vm_map_exec_lockdown | ||
| 492 | ( | ||
| 493 | 	vm_map_t target_task | ||
| 494 | ); | ||
| 495 | |||
| 496 | /* Routine vm_remap_new */ | ||
| 497 | #ifdef	mig_external | ||
| 498 | mig_external | ||
| 499 | #else | ||
| 500 | extern | ||
| 501 | #endif	/* mig_external */ | ||
| 502 | kern_return_t vm_remap_new | ||
| 503 | ( | ||
| 504 | 	vm_map_t target_task, | ||
| 505 | 	vm_address_t *target_address, | ||
| 506 | 	vm_size_t size, | ||
| 507 | 	vm_address_t mask, | ||
| 508 | 	int flags, | ||
| 509 | 	vm_map_read_t src_task, | ||
| 510 | 	vm_address_t src_address, | ||
| 511 | 	boolean_t copy, | ||
| 512 | 	vm_prot_t *cur_protection, | ||
| 513 | 	vm_prot_t *max_protection, | ||
| 514 | 	vm_inherit_t inheritance | ||
| 515 | ); | ||
| 516 | |||
| 517 | __END_DECLS | ||
| 518 | |||
| 519 | /********************** Caution **************************/ | ||
| 520 | /* The following data types should be used to calculate */ | ||
| 521 | /* maximum message sizes only. The actual message may be */ | ||
| 522 | /* smaller, and the position of the arguments within the */ | ||
| 523 | /* message layout may vary from what is presented here. */ | ||
| 524 | /* For example, if any of the arguments are variable- */ | ||
| 525 | /* sized, and less than the maximum is sent, the data */ | ||
| 526 | /* will be packed tight in the actual message to reduce */ | ||
| 527 | /* the presence of holes. */ | ||
| 528 | /********************** Caution **************************/ | ||
| 529 | |||
| 530 | /* typedefs for all requests */ | ||
| 531 | |||
| 532 | #ifndef __Request__vm_map_subsystem__defined | ||
| 533 | #define __Request__vm_map_subsystem__defined | ||
| 534 | |||
| 535 | #ifdef __MigPackStructs | ||
| 536 | #pragma pack(push, 4) | ||
| 537 | #endif | ||
| 538 | 	typedef struct { | ||
| 539 | 		mach_msg_header_t Head; | ||
| 540 | 		NDR_record_t NDR; | ||
| 541 | 		vm_address_t address; | ||
| 542 | 		vm_region_flavor_t flavor; | ||
| 543 | 		mach_msg_type_number_t infoCnt; | ||
| 544 | 	} __Request__vm_region_t __attribute__((unused)); | ||
| 545 | #ifdef __MigPackStructs | ||
| 546 | #pragma pack(pop) | ||
| 547 | #endif | ||
| 548 | |||
| 549 | #ifdef __MigPackStructs | ||
| 550 | #pragma pack(push, 4) | ||
| 551 | #endif | ||
| 552 | 	typedef struct { | ||
| 553 | 		mach_msg_header_t Head; | ||
| 554 | 		NDR_record_t NDR; | ||
| 555 | 		vm_address_t address; | ||
| 556 | 		vm_size_t size; | ||
| 557 | 		int flags; | ||
| 558 | 	} __Request__vm_allocate_t __attribute__((unused)); | ||
| 559 | #ifdef __MigPackStructs | ||
| 560 | #pragma pack(pop) | ||
| 561 | #endif | ||
| 562 | |||
| 563 | #ifdef __MigPackStructs | ||
| 564 | #pragma pack(push, 4) | ||
| 565 | #endif | ||
| 566 | 	typedef struct { | ||
| 567 | 		mach_msg_header_t Head; | ||
| 568 | 		NDR_record_t NDR; | ||
| 569 | 		vm_address_t address; | ||
| 570 | 		vm_size_t size; | ||
| 571 | 	} __Request__vm_deallocate_t __attribute__((unused)); | ||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(pop) | ||
| 574 | #endif | ||
| 575 | |||
| 576 | #ifdef __MigPackStructs | ||
| 577 | #pragma pack(push, 4) | ||
| 578 | #endif | ||
| 579 | 	typedef struct { | ||
| 580 | 		mach_msg_header_t Head; | ||
| 581 | 		NDR_record_t NDR; | ||
| 582 | 		vm_address_t address; | ||
| 583 | 		vm_size_t size; | ||
| 584 | 		boolean_t set_maximum; | ||
| 585 | 		vm_prot_t new_protection; | ||
| 586 | 	} __Request__vm_protect_t __attribute__((unused)); | ||
| 587 | #ifdef __MigPackStructs | ||
| 588 | #pragma pack(pop) | ||
| 589 | #endif | ||
| 590 | |||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(push, 4) | ||
| 593 | #endif | ||
| 594 | 	typedef struct { | ||
| 595 | 		mach_msg_header_t Head; | ||
| 596 | 		NDR_record_t NDR; | ||
| 597 | 		vm_address_t address; | ||
| 598 | 		vm_size_t size; | ||
| 599 | 		vm_inherit_t new_inheritance; | ||
| 600 | 	} __Request__vm_inherit_t __attribute__((unused)); | ||
| 601 | #ifdef __MigPackStructs | ||
| 602 | #pragma pack(pop) | ||
| 603 | #endif | ||
| 604 | |||
| 605 | #ifdef __MigPackStructs | ||
| 606 | #pragma pack(push, 4) | ||
| 607 | #endif | ||
| 608 | 	typedef struct { | ||
| 609 | 		mach_msg_header_t Head; | ||
| 610 | 		NDR_record_t NDR; | ||
| 611 | 		vm_address_t address; | ||
| 612 | 		vm_size_t size; | ||
| 613 | 	} __Request__vm_read_t __attribute__((unused)); | ||
| 614 | #ifdef __MigPackStructs | ||
| 615 | #pragma pack(pop) | ||
| 616 | #endif | ||
| 617 | |||
| 618 | #ifdef __MigPackStructs | ||
| 619 | #pragma pack(push, 4) | ||
| 620 | #endif | ||
| 621 | 	typedef struct { | ||
| 622 | 		mach_msg_header_t Head; | ||
| 623 | 		NDR_record_t NDR; | ||
| 624 | 		vm_read_entry_t data_list; | ||
| 625 | 		natural_t count; | ||
| 626 | 	} __Request__vm_read_list_t __attribute__((unused)); | ||
| 627 | #ifdef __MigPackStructs | ||
| 628 | #pragma pack(pop) | ||
| 629 | #endif | ||
| 630 | |||
| 631 | #ifdef __MigPackStructs | ||
| 632 | #pragma pack(push, 4) | ||
| 633 | #endif | ||
| 634 | 	typedef struct { | ||
| 635 | 		mach_msg_header_t Head; | ||
| 636 | 		/* start of the kernel processed data */ | ||
| 637 | 		mach_msg_body_t msgh_body; | ||
| 638 | 		mach_msg_ool_descriptor_t data; | ||
| 639 | 		/* end of the kernel processed data */ | ||
| 640 | 		NDR_record_t NDR; | ||
| 641 | 		vm_address_t address; | ||
| 642 | 		mach_msg_type_number_t dataCnt; | ||
| 643 | 	} __Request__vm_write_t __attribute__((unused)); | ||
| 644 | #ifdef __MigPackStructs | ||
| 645 | #pragma pack(pop) | ||
| 646 | #endif | ||
| 647 | |||
| 648 | #ifdef __MigPackStructs | ||
| 649 | #pragma pack(push, 4) | ||
| 650 | #endif | ||
| 651 | 	typedef struct { | ||
| 652 | 		mach_msg_header_t Head; | ||
| 653 | 		NDR_record_t NDR; | ||
| 654 | 		vm_address_t source_address; | ||
| 655 | 		vm_size_t size; | ||
| 656 | 		vm_address_t dest_address; | ||
| 657 | 	} __Request__vm_copy_t __attribute__((unused)); | ||
| 658 | #ifdef __MigPackStructs | ||
| 659 | #pragma pack(pop) | ||
| 660 | #endif | ||
| 661 | |||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(push, 4) | ||
| 664 | #endif | ||
| 665 | 	typedef struct { | ||
| 666 | 		mach_msg_header_t Head; | ||
| 667 | 		NDR_record_t NDR; | ||
| 668 | 		vm_address_t address; | ||
| 669 | 		vm_size_t size; | ||
| 670 | 		vm_address_t data; | ||
| 671 | 	} __Request__vm_read_overwrite_t __attribute__((unused)); | ||
| 672 | #ifdef __MigPackStructs | ||
| 673 | #pragma pack(pop) | ||
| 674 | #endif | ||
| 675 | |||
| 676 | #ifdef __MigPackStructs | ||
| 677 | #pragma pack(push, 4) | ||
| 678 | #endif | ||
| 679 | 	typedef struct { | ||
| 680 | 		mach_msg_header_t Head; | ||
| 681 | 		NDR_record_t NDR; | ||
| 682 | 		vm_address_t address; | ||
| 683 | 		vm_size_t size; | ||
| 684 | 		vm_sync_t sync_flags; | ||
| 685 | 	} __Request__vm_msync_t __attribute__((unused)); | ||
| 686 | #ifdef __MigPackStructs | ||
| 687 | #pragma pack(pop) | ||
| 688 | #endif | ||
| 689 | |||
| 690 | #ifdef __MigPackStructs | ||
| 691 | #pragma pack(push, 4) | ||
| 692 | #endif | ||
| 693 | 	typedef struct { | ||
| 694 | 		mach_msg_header_t Head; | ||
| 695 | 		NDR_record_t NDR; | ||
| 696 | 		vm_address_t address; | ||
| 697 | 		vm_size_t size; | ||
| 698 | 		vm_behavior_t new_behavior; | ||
| 699 | 	} __Request__vm_behavior_set_t __attribute__((unused)); | ||
| 700 | #ifdef __MigPackStructs | ||
| 701 | #pragma pack(pop) | ||
| 702 | #endif | ||
| 703 | |||
| 704 | #ifdef __MigPackStructs | ||
| 705 | #pragma pack(push, 4) | ||
| 706 | #endif | ||
| 707 | 	typedef struct { | ||
| 708 | 		mach_msg_header_t Head; | ||
| 709 | 		/* start of the kernel processed data */ | ||
| 710 | 		mach_msg_body_t msgh_body; | ||
| 711 | 		mach_msg_port_descriptor_t object; | ||
| 712 | 		/* end of the kernel processed data */ | ||
| 713 | 		NDR_record_t NDR; | ||
| 714 | 		vm_address_t address; | ||
| 715 | 		vm_size_t size; | ||
| 716 | 		vm_address_t mask; | ||
| 717 | 		int flags; | ||
| 718 | 		vm_offset_t offset; | ||
| 719 | 		boolean_t copy; | ||
| 720 | 		vm_prot_t cur_protection; | ||
| 721 | 		vm_prot_t max_protection; | ||
| 722 | 		vm_inherit_t inheritance; | ||
| 723 | 	} __Request__vm_map_t __attribute__((unused)); | ||
| 724 | #ifdef __MigPackStructs | ||
| 725 | #pragma pack(pop) | ||
| 726 | #endif | ||
| 727 | |||
| 728 | #ifdef __MigPackStructs | ||
| 729 | #pragma pack(push, 4) | ||
| 730 | #endif | ||
| 731 | 	typedef struct { | ||
| 732 | 		mach_msg_header_t Head; | ||
| 733 | 		NDR_record_t NDR; | ||
| 734 | 		vm_address_t address; | ||
| 735 | 		vm_size_t size; | ||
| 736 | 		vm_machine_attribute_t attribute; | ||
| 737 | 		vm_machine_attribute_val_t value; | ||
| 738 | 	} __Request__vm_machine_attribute_t __attribute__((unused)); | ||
| 739 | #ifdef __MigPackStructs | ||
| 740 | #pragma pack(pop) | ||
| 741 | #endif | ||
| 742 | |||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(push, 4) | ||
| 745 | #endif | ||
| 746 | 	typedef struct { | ||
| 747 | 		mach_msg_header_t Head; | ||
| 748 | 		/* start of the kernel processed data */ | ||
| 749 | 		mach_msg_body_t msgh_body; | ||
| 750 | 		mach_msg_port_descriptor_t src_task; | ||
| 751 | 		/* end of the kernel processed data */ | ||
| 752 | 		NDR_record_t NDR; | ||
| 753 | 		vm_address_t target_address; | ||
| 754 | 		vm_size_t size; | ||
| 755 | 		vm_address_t mask; | ||
| 756 | 		int flags; | ||
| 757 | 		vm_address_t src_address; | ||
| 758 | 		boolean_t copy; | ||
| 759 | 		vm_inherit_t inheritance; | ||
| 760 | 	} __Request__vm_remap_t __attribute__((unused)); | ||
| 761 | #ifdef __MigPackStructs | ||
| 762 | #pragma pack(pop) | ||
| 763 | #endif | ||
| 764 | |||
| 765 | #ifdef __MigPackStructs | ||
| 766 | #pragma pack(push, 4) | ||
| 767 | #endif | ||
| 768 | 	typedef struct { | ||
| 769 | 		mach_msg_header_t Head; | ||
| 770 | 		NDR_record_t NDR; | ||
| 771 | 		boolean_t must_wire; | ||
| 772 | 	} __Request__task_wire_t __attribute__((unused)); | ||
| 773 | #ifdef __MigPackStructs | ||
| 774 | #pragma pack(pop) | ||
| 775 | #endif | ||
| 776 | |||
| 777 | #ifdef __MigPackStructs | ||
| 778 | #pragma pack(push, 4) | ||
| 779 | #endif | ||
| 780 | 	typedef struct { | ||
| 781 | 		mach_msg_header_t Head; | ||
| 782 | 		/* start of the kernel processed data */ | ||
| 783 | 		mach_msg_body_t msgh_body; | ||
| 784 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 785 | 		/* end of the kernel processed data */ | ||
| 786 | 		NDR_record_t NDR; | ||
| 787 | 		vm_size_t size; | ||
| 788 | 		vm_offset_t offset; | ||
| 789 | 		vm_prot_t permission; | ||
| 790 | 	} __Request__mach_make_memory_entry_t __attribute__((unused)); | ||
| 791 | #ifdef __MigPackStructs | ||
| 792 | #pragma pack(pop) | ||
| 793 | #endif | ||
| 794 | |||
| 795 | #ifdef __MigPackStructs | ||
| 796 | #pragma pack(push, 4) | ||
| 797 | #endif | ||
| 798 | 	typedef struct { | ||
| 799 | 		mach_msg_header_t Head; | ||
| 800 | 		NDR_record_t NDR; | ||
| 801 | 		vm_offset_t offset; | ||
| 802 | 	} __Request__vm_map_page_query_t __attribute__((unused)); | ||
| 803 | #ifdef __MigPackStructs | ||
| 804 | #pragma pack(pop) | ||
| 805 | #endif | ||
| 806 | |||
| 807 | #ifdef __MigPackStructs | ||
| 808 | #pragma pack(push, 4) | ||
| 809 | #endif | ||
| 810 | 	typedef struct { | ||
| 811 | 		mach_msg_header_t Head; | ||
| 812 | 		NDR_record_t NDR; | ||
| 813 | 		vm_address_t address; | ||
| 814 | 	} __Request__mach_vm_region_info_t __attribute__((unused)); | ||
| 815 | #ifdef __MigPackStructs | ||
| 816 | #pragma pack(pop) | ||
| 817 | #endif | ||
| 818 | |||
| 819 | #ifdef __MigPackStructs | ||
| 820 | #pragma pack(push, 4) | ||
| 821 | #endif | ||
| 822 | 	typedef struct { | ||
| 823 | 		mach_msg_header_t Head; | ||
| 824 | 	} __Request__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 825 | #ifdef __MigPackStructs | ||
| 826 | #pragma pack(pop) | ||
| 827 | #endif | ||
| 828 | |||
| 829 | #ifdef __MigPackStructs | ||
| 830 | #pragma pack(push, 4) | ||
| 831 | #endif | ||
| 832 | 	typedef struct { | ||
| 833 | 		mach_msg_header_t Head; | ||
| 834 | 		NDR_record_t NDR; | ||
| 835 | 		vm_address_t address; | ||
| 836 | 		natural_t nesting_depth; | ||
| 837 | 		mach_msg_type_number_t infoCnt; | ||
| 838 | 	} __Request__vm_region_recurse_t __attribute__((unused)); | ||
| 839 | #ifdef __MigPackStructs | ||
| 840 | #pragma pack(pop) | ||
| 841 | #endif | ||
| 842 | |||
| 843 | #ifdef __MigPackStructs | ||
| 844 | #pragma pack(push, 4) | ||
| 845 | #endif | ||
| 846 | 	typedef struct { | ||
| 847 | 		mach_msg_header_t Head; | ||
| 848 | 		NDR_record_t NDR; | ||
| 849 | 		vm_address_t address; | ||
| 850 | 		natural_t nesting_depth; | ||
| 851 | 		mach_msg_type_number_t infoCnt; | ||
| 852 | 	} __Request__vm_region_recurse_64_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		NDR_record_t NDR; | ||
| 863 | 		vm_address_t address; | ||
| 864 | 	} __Request__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 865 | #ifdef __MigPackStructs | ||
| 866 | #pragma pack(pop) | ||
| 867 | #endif | ||
| 868 | |||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(push, 4) | ||
| 871 | #endif | ||
| 872 | 	typedef struct { | ||
| 873 | 		mach_msg_header_t Head; | ||
| 874 | 		NDR_record_t NDR; | ||
| 875 | 		vm_address_t address; | ||
| 876 | 		vm_region_flavor_t flavor; | ||
| 877 | 		mach_msg_type_number_t infoCnt; | ||
| 878 | 	} __Request__vm_region_64_t __attribute__((unused)); | ||
| 879 | #ifdef __MigPackStructs | ||
| 880 | #pragma pack(pop) | ||
| 881 | #endif | ||
| 882 | |||
| 883 | #ifdef __MigPackStructs | ||
| 884 | #pragma pack(push, 4) | ||
| 885 | #endif | ||
| 886 | 	typedef struct { | ||
| 887 | 		mach_msg_header_t Head; | ||
| 888 | 		/* start of the kernel processed data */ | ||
| 889 | 		mach_msg_body_t msgh_body; | ||
| 890 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 891 | 		/* end of the kernel processed data */ | ||
| 892 | 		NDR_record_t NDR; | ||
| 893 | 		memory_object_size_t size; | ||
| 894 | 		memory_object_offset_t offset; | ||
| 895 | 		vm_prot_t permission; | ||
| 896 | 	} __Request__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(pop) | ||
| 899 | #endif | ||
| 900 | |||
| 901 | #ifdef __MigPackStructs | ||
| 902 | #pragma pack(push, 4) | ||
| 903 | #endif | ||
| 904 | 	typedef struct { | ||
| 905 | 		mach_msg_header_t Head; | ||
| 906 | 		/* start of the kernel processed data */ | ||
| 907 | 		mach_msg_body_t msgh_body; | ||
| 908 | 		mach_msg_port_descriptor_t object; | ||
| 909 | 		/* end of the kernel processed data */ | ||
| 910 | 		NDR_record_t NDR; | ||
| 911 | 		vm_address_t address; | ||
| 912 | 		vm_size_t size; | ||
| 913 | 		vm_address_t mask; | ||
| 914 | 		int flags; | ||
| 915 | 		memory_object_offset_t offset; | ||
| 916 | 		boolean_t copy; | ||
| 917 | 		vm_prot_t cur_protection; | ||
| 918 | 		vm_prot_t max_protection; | ||
| 919 | 		vm_inherit_t inheritance; | ||
| 920 | 	} __Request__vm_map_64_t __attribute__((unused)); | ||
| 921 | #ifdef __MigPackStructs | ||
| 922 | #pragma pack(pop) | ||
| 923 | #endif | ||
| 924 | |||
| 925 | #ifdef __MigPackStructs | ||
| 926 | #pragma pack(push, 4) | ||
| 927 | #endif | ||
| 928 | 	typedef struct { | ||
| 929 | 		mach_msg_header_t Head; | ||
| 930 | 		NDR_record_t NDR; | ||
| 931 | 		vm_address_t address; | ||
| 932 | 		vm_purgable_t control; | ||
| 933 | 		int state; | ||
| 934 | 	} __Request__vm_purgable_control_t __attribute__((unused)); | ||
| 935 | #ifdef __MigPackStructs | ||
| 936 | #pragma pack(pop) | ||
| 937 | #endif | ||
| 938 | |||
| 939 | #ifdef __MigPackStructs | ||
| 940 | #pragma pack(push, 4) | ||
| 941 | #endif | ||
| 942 | 	typedef struct { | ||
| 943 | 		mach_msg_header_t Head; | ||
| 944 | 	} __Request__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 945 | #ifdef __MigPackStructs | ||
| 946 | #pragma pack(pop) | ||
| 947 | #endif | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		/* start of the kernel processed data */ | ||
| 955 | 		mach_msg_body_t msgh_body; | ||
| 956 | 		mach_msg_port_descriptor_t src_task; | ||
| 957 | 		/* end of the kernel processed data */ | ||
| 958 | 		NDR_record_t NDR; | ||
| 959 | 		vm_address_t target_address; | ||
| 960 | 		vm_size_t size; | ||
| 961 | 		vm_address_t mask; | ||
| 962 | 		int flags; | ||
| 963 | 		vm_address_t src_address; | ||
| 964 | 		boolean_t copy; | ||
| 965 | 		vm_prot_t cur_protection; | ||
| 966 | 		vm_prot_t max_protection; | ||
| 967 | 		vm_inherit_t inheritance; | ||
| 968 | 	} __Request__vm_remap_new_t __attribute__((unused)); | ||
| 969 | #ifdef __MigPackStructs | ||
| 970 | #pragma pack(pop) | ||
| 971 | #endif | ||
| 972 | #endif /* !__Request__vm_map_subsystem__defined */ | ||
| 973 | |||
| 974 | /* union of all requests */ | ||
| 975 | |||
| 976 | #ifndef __RequestUnion__vm_map_subsystem__defined | ||
| 977 | #define __RequestUnion__vm_map_subsystem__defined | ||
| 978 | union __RequestUnion__vm_map_subsystem { | ||
| 979 | 	__Request__vm_region_t Request_vm_region; | ||
| 980 | 	__Request__vm_allocate_t Request_vm_allocate; | ||
| 981 | 	__Request__vm_deallocate_t Request_vm_deallocate; | ||
| 982 | 	__Request__vm_protect_t Request_vm_protect; | ||
| 983 | 	__Request__vm_inherit_t Request_vm_inherit; | ||
| 984 | 	__Request__vm_read_t Request_vm_read; | ||
| 985 | 	__Request__vm_read_list_t Request_vm_read_list; | ||
| 986 | 	__Request__vm_write_t Request_vm_write; | ||
| 987 | 	__Request__vm_copy_t Request_vm_copy; | ||
| 988 | 	__Request__vm_read_overwrite_t Request_vm_read_overwrite; | ||
| 989 | 	__Request__vm_msync_t Request_vm_msync; | ||
| 990 | 	__Request__vm_behavior_set_t Request_vm_behavior_set; | ||
| 991 | 	__Request__vm_map_t Request_vm_map; | ||
| 992 | 	__Request__vm_machine_attribute_t Request_vm_machine_attribute; | ||
| 993 | 	__Request__vm_remap_t Request_vm_remap; | ||
| 994 | 	__Request__task_wire_t Request_task_wire; | ||
| 995 | 	__Request__mach_make_memory_entry_t Request_mach_make_memory_entry; | ||
| 996 | 	__Request__vm_map_page_query_t Request_vm_map_page_query; | ||
| 997 | 	__Request__mach_vm_region_info_t Request_mach_vm_region_info; | ||
| 998 | 	__Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; | ||
| 999 | 	__Request__vm_region_recurse_t Request_vm_region_recurse; | ||
| 1000 | 	__Request__vm_region_recurse_64_t Request_vm_region_recurse_64; | ||
| 1001 | 	__Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; | ||
| 1002 | 	__Request__vm_region_64_t Request_vm_region_64; | ||
| 1003 | 	__Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; | ||
| 1004 | 	__Request__vm_map_64_t Request_vm_map_64; | ||
| 1005 | 	__Request__vm_purgable_control_t Request_vm_purgable_control; | ||
| 1006 | 	__Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown; | ||
| 1007 | 	__Request__vm_remap_new_t Request_vm_remap_new; | ||
| 1008 | }; | ||
| 1009 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1010 | /* typedefs for all replies */ | ||
| 1011 | |||
| 1012 | #ifndef __Reply__vm_map_subsystem__defined | ||
| 1013 | #define __Reply__vm_map_subsystem__defined | ||
| 1014 | |||
| 1015 | #ifdef __MigPackStructs | ||
| 1016 | #pragma pack(push, 4) | ||
| 1017 | #endif | ||
| 1018 | 	typedef struct { | ||
| 1019 | 		mach_msg_header_t Head; | ||
| 1020 | 		/* start of the kernel processed data */ | ||
| 1021 | 		mach_msg_body_t msgh_body; | ||
| 1022 | 		mach_msg_port_descriptor_t object_name; | ||
| 1023 | 		/* end of the kernel processed data */ | ||
| 1024 | 		NDR_record_t NDR; | ||
| 1025 | 		vm_address_t address; | ||
| 1026 | 		vm_size_t size; | ||
| 1027 | 		mach_msg_type_number_t infoCnt; | ||
| 1028 | 		int info[10]; | ||
| 1029 | 	} __Reply__vm_region_t __attribute__((unused)); | ||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(pop) | ||
| 1032 | #endif | ||
| 1033 | |||
| 1034 | #ifdef __MigPackStructs | ||
| 1035 | #pragma pack(push, 4) | ||
| 1036 | #endif | ||
| 1037 | 	typedef struct { | ||
| 1038 | 		mach_msg_header_t Head; | ||
| 1039 | 		NDR_record_t NDR; | ||
| 1040 | 		kern_return_t RetCode; | ||
| 1041 | 		vm_address_t address; | ||
| 1042 | 	} __Reply__vm_allocate_t __attribute__((unused)); | ||
| 1043 | #ifdef __MigPackStructs | ||
| 1044 | #pragma pack(pop) | ||
| 1045 | #endif | ||
| 1046 | |||
| 1047 | #ifdef __MigPackStructs | ||
| 1048 | #pragma pack(push, 4) | ||
| 1049 | #endif | ||
| 1050 | 	typedef struct { | ||
| 1051 | 		mach_msg_header_t Head; | ||
| 1052 | 		NDR_record_t NDR; | ||
| 1053 | 		kern_return_t RetCode; | ||
| 1054 | 	} __Reply__vm_deallocate_t __attribute__((unused)); | ||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(pop) | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | #ifdef __MigPackStructs | ||
| 1060 | #pragma pack(push, 4) | ||
| 1061 | #endif | ||
| 1062 | 	typedef struct { | ||
| 1063 | 		mach_msg_header_t Head; | ||
| 1064 | 		NDR_record_t NDR; | ||
| 1065 | 		kern_return_t RetCode; | ||
| 1066 | 	} __Reply__vm_protect_t __attribute__((unused)); | ||
| 1067 | #ifdef __MigPackStructs | ||
| 1068 | #pragma pack(pop) | ||
| 1069 | #endif | ||
| 1070 | |||
| 1071 | #ifdef __MigPackStructs | ||
| 1072 | #pragma pack(push, 4) | ||
| 1073 | #endif | ||
| 1074 | 	typedef struct { | ||
| 1075 | 		mach_msg_header_t Head; | ||
| 1076 | 		NDR_record_t NDR; | ||
| 1077 | 		kern_return_t RetCode; | ||
| 1078 | 	} __Reply__vm_inherit_t __attribute__((unused)); | ||
| 1079 | #ifdef __MigPackStructs | ||
| 1080 | #pragma pack(pop) | ||
| 1081 | #endif | ||
| 1082 | |||
| 1083 | #ifdef __MigPackStructs | ||
| 1084 | #pragma pack(push, 4) | ||
| 1085 | #endif | ||
| 1086 | 	typedef struct { | ||
| 1087 | 		mach_msg_header_t Head; | ||
| 1088 | 		/* start of the kernel processed data */ | ||
| 1089 | 		mach_msg_body_t msgh_body; | ||
| 1090 | 		mach_msg_ool_descriptor_t data; | ||
| 1091 | 		/* end of the kernel processed data */ | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		mach_msg_type_number_t dataCnt; | ||
| 1094 | 	} __Reply__vm_read_t __attribute__((unused)); | ||
| 1095 | #ifdef __MigPackStructs | ||
| 1096 | #pragma pack(pop) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(push, 4) | ||
| 1101 | #endif | ||
| 1102 | 	typedef struct { | ||
| 1103 | 		mach_msg_header_t Head; | ||
| 1104 | 		NDR_record_t NDR; | ||
| 1105 | 		kern_return_t RetCode; | ||
| 1106 | 		vm_read_entry_t data_list; | ||
| 1107 | 	} __Reply__vm_read_list_t __attribute__((unused)); | ||
| 1108 | #ifdef __MigPackStructs | ||
| 1109 | #pragma pack(pop) | ||
| 1110 | #endif | ||
| 1111 | |||
| 1112 | #ifdef __MigPackStructs | ||
| 1113 | #pragma pack(push, 4) | ||
| 1114 | #endif | ||
| 1115 | 	typedef struct { | ||
| 1116 | 		mach_msg_header_t Head; | ||
| 1117 | 		NDR_record_t NDR; | ||
| 1118 | 		kern_return_t RetCode; | ||
| 1119 | 	} __Reply__vm_write_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		kern_return_t RetCode; | ||
| 1131 | 	} __Reply__vm_copy_t __attribute__((unused)); | ||
| 1132 | #ifdef __MigPackStructs | ||
| 1133 | #pragma pack(pop) | ||
| 1134 | #endif | ||
| 1135 | |||
| 1136 | #ifdef __MigPackStructs | ||
| 1137 | #pragma pack(push, 4) | ||
| 1138 | #endif | ||
| 1139 | 	typedef struct { | ||
| 1140 | 		mach_msg_header_t Head; | ||
| 1141 | 		NDR_record_t NDR; | ||
| 1142 | 		kern_return_t RetCode; | ||
| 1143 | 		vm_size_t outsize; | ||
| 1144 | 	} __Reply__vm_read_overwrite_t __attribute__((unused)); | ||
| 1145 | #ifdef __MigPackStructs | ||
| 1146 | #pragma pack(pop) | ||
| 1147 | #endif | ||
| 1148 | |||
| 1149 | #ifdef __MigPackStructs | ||
| 1150 | #pragma pack(push, 4) | ||
| 1151 | #endif | ||
| 1152 | 	typedef struct { | ||
| 1153 | 		mach_msg_header_t Head; | ||
| 1154 | 		NDR_record_t NDR; | ||
| 1155 | 		kern_return_t RetCode; | ||
| 1156 | 	} __Reply__vm_msync_t __attribute__((unused)); | ||
| 1157 | #ifdef __MigPackStructs | ||
| 1158 | #pragma pack(pop) | ||
| 1159 | #endif | ||
| 1160 | |||
| 1161 | #ifdef __MigPackStructs | ||
| 1162 | #pragma pack(push, 4) | ||
| 1163 | #endif | ||
| 1164 | 	typedef struct { | ||
| 1165 | 		mach_msg_header_t Head; | ||
| 1166 | 		NDR_record_t NDR; | ||
| 1167 | 		kern_return_t RetCode; | ||
| 1168 | 	} __Reply__vm_behavior_set_t __attribute__((unused)); | ||
| 1169 | #ifdef __MigPackStructs | ||
| 1170 | #pragma pack(pop) | ||
| 1171 | #endif | ||
| 1172 | |||
| 1173 | #ifdef __MigPackStructs | ||
| 1174 | #pragma pack(push, 4) | ||
| 1175 | #endif | ||
| 1176 | 	typedef struct { | ||
| 1177 | 		mach_msg_header_t Head; | ||
| 1178 | 		NDR_record_t NDR; | ||
| 1179 | 		kern_return_t RetCode; | ||
| 1180 | 		vm_address_t address; | ||
| 1181 | 	} __Reply__vm_map_t __attribute__((unused)); | ||
| 1182 | #ifdef __MigPackStructs | ||
| 1183 | #pragma pack(pop) | ||
| 1184 | #endif | ||
| 1185 | |||
| 1186 | #ifdef __MigPackStructs | ||
| 1187 | #pragma pack(push, 4) | ||
| 1188 | #endif | ||
| 1189 | 	typedef struct { | ||
| 1190 | 		mach_msg_header_t Head; | ||
| 1191 | 		NDR_record_t NDR; | ||
| 1192 | 		kern_return_t RetCode; | ||
| 1193 | 		vm_machine_attribute_val_t value; | ||
| 1194 | 	} __Reply__vm_machine_attribute_t __attribute__((unused)); | ||
| 1195 | #ifdef __MigPackStructs | ||
| 1196 | #pragma pack(pop) | ||
| 1197 | #endif | ||
| 1198 | |||
| 1199 | #ifdef __MigPackStructs | ||
| 1200 | #pragma pack(push, 4) | ||
| 1201 | #endif | ||
| 1202 | 	typedef struct { | ||
| 1203 | 		mach_msg_header_t Head; | ||
| 1204 | 		NDR_record_t NDR; | ||
| 1205 | 		kern_return_t RetCode; | ||
| 1206 | 		vm_address_t target_address; | ||
| 1207 | 		vm_prot_t cur_protection; | ||
| 1208 | 		vm_prot_t max_protection; | ||
| 1209 | 	} __Reply__vm_remap_t __attribute__((unused)); | ||
| 1210 | #ifdef __MigPackStructs | ||
| 1211 | #pragma pack(pop) | ||
| 1212 | #endif | ||
| 1213 | |||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(push, 4) | ||
| 1216 | #endif | ||
| 1217 | 	typedef struct { | ||
| 1218 | 		mach_msg_header_t Head; | ||
| 1219 | 		NDR_record_t NDR; | ||
| 1220 | 		kern_return_t RetCode; | ||
| 1221 | 	} __Reply__task_wire_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		/* start of the kernel processed data */ | ||
| 1232 | 		mach_msg_body_t msgh_body; | ||
| 1233 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1234 | 		/* end of the kernel processed data */ | ||
| 1235 | 		NDR_record_t NDR; | ||
| 1236 | 		vm_size_t size; | ||
| 1237 | 	} __Reply__mach_make_memory_entry_t __attribute__((unused)); | ||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(pop) | ||
| 1240 | #endif | ||
| 1241 | |||
| 1242 | #ifdef __MigPackStructs | ||
| 1243 | #pragma pack(push, 4) | ||
| 1244 | #endif | ||
| 1245 | 	typedef struct { | ||
| 1246 | 		mach_msg_header_t Head; | ||
| 1247 | 		NDR_record_t NDR; | ||
| 1248 | 		kern_return_t RetCode; | ||
| 1249 | 		integer_t disposition; | ||
| 1250 | 		integer_t ref_count; | ||
| 1251 | 	} __Reply__vm_map_page_query_t __attribute__((unused)); | ||
| 1252 | #ifdef __MigPackStructs | ||
| 1253 | #pragma pack(pop) | ||
| 1254 | #endif | ||
| 1255 | |||
| 1256 | #ifdef __MigPackStructs | ||
| 1257 | #pragma pack(push, 4) | ||
| 1258 | #endif | ||
| 1259 | 	typedef struct { | ||
| 1260 | 		mach_msg_header_t Head; | ||
| 1261 | 		/* start of the kernel processed data */ | ||
| 1262 | 		mach_msg_body_t msgh_body; | ||
| 1263 | 		mach_msg_ool_descriptor_t objects; | ||
| 1264 | 		/* end of the kernel processed data */ | ||
| 1265 | 		NDR_record_t NDR; | ||
| 1266 | 		vm_info_region_t region; | ||
| 1267 | 		mach_msg_type_number_t objectsCnt; | ||
| 1268 | 	} __Reply__mach_vm_region_info_t __attribute__((unused)); | ||
| 1269 | #ifdef __MigPackStructs | ||
| 1270 | #pragma pack(pop) | ||
| 1271 | #endif | ||
| 1272 | |||
| 1273 | #ifdef __MigPackStructs | ||
| 1274 | #pragma pack(push, 4) | ||
| 1275 | #endif | ||
| 1276 | 	typedef struct { | ||
| 1277 | 		mach_msg_header_t Head; | ||
| 1278 | 		/* start of the kernel processed data */ | ||
| 1279 | 		mach_msg_body_t msgh_body; | ||
| 1280 | 		mach_msg_ool_descriptor_t pages; | ||
| 1281 | 		/* end of the kernel processed data */ | ||
| 1282 | 		NDR_record_t NDR; | ||
| 1283 | 		mach_msg_type_number_t pagesCnt; | ||
| 1284 | 	} __Reply__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 1285 | #ifdef __MigPackStructs | ||
| 1286 | #pragma pack(pop) | ||
| 1287 | #endif | ||
| 1288 | |||
| 1289 | #ifdef __MigPackStructs | ||
| 1290 | #pragma pack(push, 4) | ||
| 1291 | #endif | ||
| 1292 | 	typedef struct { | ||
| 1293 | 		mach_msg_header_t Head; | ||
| 1294 | 		NDR_record_t NDR; | ||
| 1295 | 		kern_return_t RetCode; | ||
| 1296 | 		vm_address_t address; | ||
| 1297 | 		vm_size_t size; | ||
| 1298 | 		natural_t nesting_depth; | ||
| 1299 | 		mach_msg_type_number_t infoCnt; | ||
| 1300 | 		int info[19]; | ||
| 1301 | 	} __Reply__vm_region_recurse_t __attribute__((unused)); | ||
| 1302 | #ifdef __MigPackStructs | ||
| 1303 | #pragma pack(pop) | ||
| 1304 | #endif | ||
| 1305 | |||
| 1306 | #ifdef __MigPackStructs | ||
| 1307 | #pragma pack(push, 4) | ||
| 1308 | #endif | ||
| 1309 | 	typedef struct { | ||
| 1310 | 		mach_msg_header_t Head; | ||
| 1311 | 		NDR_record_t NDR; | ||
| 1312 | 		kern_return_t RetCode; | ||
| 1313 | 		vm_address_t address; | ||
| 1314 | 		vm_size_t size; | ||
| 1315 | 		natural_t nesting_depth; | ||
| 1316 | 		mach_msg_type_number_t infoCnt; | ||
| 1317 | 		int info[19]; | ||
| 1318 | 	} __Reply__vm_region_recurse_64_t __attribute__((unused)); | ||
| 1319 | #ifdef __MigPackStructs | ||
| 1320 | #pragma pack(pop) | ||
| 1321 | #endif | ||
| 1322 | |||
| 1323 | #ifdef __MigPackStructs | ||
| 1324 | #pragma pack(push, 4) | ||
| 1325 | #endif | ||
| 1326 | 	typedef struct { | ||
| 1327 | 		mach_msg_header_t Head; | ||
| 1328 | 		/* start of the kernel processed data */ | ||
| 1329 | 		mach_msg_body_t msgh_body; | ||
| 1330 | 		mach_msg_ool_descriptor_t objects; | ||
| 1331 | 		/* end of the kernel processed data */ | ||
| 1332 | 		NDR_record_t NDR; | ||
| 1333 | 		vm_info_region_64_t region; | ||
| 1334 | 		mach_msg_type_number_t objectsCnt; | ||
| 1335 | 	} __Reply__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 1336 | #ifdef __MigPackStructs | ||
| 1337 | #pragma pack(pop) | ||
| 1338 | #endif | ||
| 1339 | |||
| 1340 | #ifdef __MigPackStructs | ||
| 1341 | #pragma pack(push, 4) | ||
| 1342 | #endif | ||
| 1343 | 	typedef struct { | ||
| 1344 | 		mach_msg_header_t Head; | ||
| 1345 | 		/* start of the kernel processed data */ | ||
| 1346 | 		mach_msg_body_t msgh_body; | ||
| 1347 | 		mach_msg_port_descriptor_t object_name; | ||
| 1348 | 		/* end of the kernel processed data */ | ||
| 1349 | 		NDR_record_t NDR; | ||
| 1350 | 		vm_address_t address; | ||
| 1351 | 		vm_size_t size; | ||
| 1352 | 		mach_msg_type_number_t infoCnt; | ||
| 1353 | 		int info[10]; | ||
| 1354 | 	} __Reply__vm_region_64_t __attribute__((unused)); | ||
| 1355 | #ifdef __MigPackStructs | ||
| 1356 | #pragma pack(pop) | ||
| 1357 | #endif | ||
| 1358 | |||
| 1359 | #ifdef __MigPackStructs | ||
| 1360 | #pragma pack(push, 4) | ||
| 1361 | #endif | ||
| 1362 | 	typedef struct { | ||
| 1363 | 		mach_msg_header_t Head; | ||
| 1364 | 		/* start of the kernel processed data */ | ||
| 1365 | 		mach_msg_body_t msgh_body; | ||
| 1366 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1367 | 		/* end of the kernel processed data */ | ||
| 1368 | 		NDR_record_t NDR; | ||
| 1369 | 		memory_object_size_t size; | ||
| 1370 | 	} __Reply__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 1371 | #ifdef __MigPackStructs | ||
| 1372 | #pragma pack(pop) | ||
| 1373 | #endif | ||
| 1374 | |||
| 1375 | #ifdef __MigPackStructs | ||
| 1376 | #pragma pack(push, 4) | ||
| 1377 | #endif | ||
| 1378 | 	typedef struct { | ||
| 1379 | 		mach_msg_header_t Head; | ||
| 1380 | 		NDR_record_t NDR; | ||
| 1381 | 		kern_return_t RetCode; | ||
| 1382 | 		vm_address_t address; | ||
| 1383 | 	} __Reply__vm_map_64_t __attribute__((unused)); | ||
| 1384 | #ifdef __MigPackStructs | ||
| 1385 | #pragma pack(pop) | ||
| 1386 | #endif | ||
| 1387 | |||
| 1388 | #ifdef __MigPackStructs | ||
| 1389 | #pragma pack(push, 4) | ||
| 1390 | #endif | ||
| 1391 | 	typedef struct { | ||
| 1392 | 		mach_msg_header_t Head; | ||
| 1393 | 		NDR_record_t NDR; | ||
| 1394 | 		kern_return_t RetCode; | ||
| 1395 | 		int state; | ||
| 1396 | 	} __Reply__vm_purgable_control_t __attribute__((unused)); | ||
| 1397 | #ifdef __MigPackStructs | ||
| 1398 | #pragma pack(pop) | ||
| 1399 | #endif | ||
| 1400 | |||
| 1401 | #ifdef __MigPackStructs | ||
| 1402 | #pragma pack(push, 4) | ||
| 1403 | #endif | ||
| 1404 | 	typedef struct { | ||
| 1405 | 		mach_msg_header_t Head; | ||
| 1406 | 		NDR_record_t NDR; | ||
| 1407 | 		kern_return_t RetCode; | ||
| 1408 | 	} __Reply__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 1409 | #ifdef __MigPackStructs | ||
| 1410 | #pragma pack(pop) | ||
| 1411 | #endif | ||
| 1412 | |||
| 1413 | #ifdef __MigPackStructs | ||
| 1414 | #pragma pack(push, 4) | ||
| 1415 | #endif | ||
| 1416 | 	typedef struct { | ||
| 1417 | 		mach_msg_header_t Head; | ||
| 1418 | 		NDR_record_t NDR; | ||
| 1419 | 		kern_return_t RetCode; | ||
| 1420 | 		vm_address_t target_address; | ||
| 1421 | 		vm_prot_t cur_protection; | ||
| 1422 | 		vm_prot_t max_protection; | ||
| 1423 | 	} __Reply__vm_remap_new_t __attribute__((unused)); | ||
| 1424 | #ifdef __MigPackStructs | ||
| 1425 | #pragma pack(pop) | ||
| 1426 | #endif | ||
| 1427 | #endif /* !__Reply__vm_map_subsystem__defined */ | ||
| 1428 | |||
| 1429 | /* union of all replies */ | ||
| 1430 | |||
| 1431 | #ifndef __ReplyUnion__vm_map_subsystem__defined | ||
| 1432 | #define __ReplyUnion__vm_map_subsystem__defined | ||
| 1433 | union __ReplyUnion__vm_map_subsystem { | ||
| 1434 | 	__Reply__vm_region_t Reply_vm_region; | ||
| 1435 | 	__Reply__vm_allocate_t Reply_vm_allocate; | ||
| 1436 | 	__Reply__vm_deallocate_t Reply_vm_deallocate; | ||
| 1437 | 	__Reply__vm_protect_t Reply_vm_protect; | ||
| 1438 | 	__Reply__vm_inherit_t Reply_vm_inherit; | ||
| 1439 | 	__Reply__vm_read_t Reply_vm_read; | ||
| 1440 | 	__Reply__vm_read_list_t Reply_vm_read_list; | ||
| 1441 | 	__Reply__vm_write_t Reply_vm_write; | ||
| 1442 | 	__Reply__vm_copy_t Reply_vm_copy; | ||
| 1443 | 	__Reply__vm_read_overwrite_t Reply_vm_read_overwrite; | ||
| 1444 | 	__Reply__vm_msync_t Reply_vm_msync; | ||
| 1445 | 	__Reply__vm_behavior_set_t Reply_vm_behavior_set; | ||
| 1446 | 	__Reply__vm_map_t Reply_vm_map; | ||
| 1447 | 	__Reply__vm_machine_attribute_t Reply_vm_machine_attribute; | ||
| 1448 | 	__Reply__vm_remap_t Reply_vm_remap; | ||
| 1449 | 	__Reply__task_wire_t Reply_task_wire; | ||
| 1450 | 	__Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; | ||
| 1451 | 	__Reply__vm_map_page_query_t Reply_vm_map_page_query; | ||
| 1452 | 	__Reply__mach_vm_region_info_t Reply_mach_vm_region_info; | ||
| 1453 | 	__Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; | ||
| 1454 | 	__Reply__vm_region_recurse_t Reply_vm_region_recurse; | ||
| 1455 | 	__Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; | ||
| 1456 | 	__Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; | ||
| 1457 | 	__Reply__vm_region_64_t Reply_vm_region_64; | ||
| 1458 | 	__Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; | ||
| 1459 | 	__Reply__vm_map_64_t Reply_vm_map_64; | ||
| 1460 | 	__Reply__vm_purgable_control_t Reply_vm_purgable_control; | ||
| 1461 | 	__Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown; | ||
| 1462 | 	__Reply__vm_remap_new_t Reply_vm_remap_new; | ||
| 1463 | }; | ||
| 1464 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1465 | |||
| 1466 | #ifndef subsystem_to_name_map_vm_map | ||
| 1467 | #define subsystem_to_name_map_vm_map \ | ||
| 1468 | { "vm_region", 3800 },\ | ||
| 1469 | { "vm_allocate", 3801 },\ | ||
| 1470 | { "vm_deallocate", 3802 },\ | ||
| 1471 | { "vm_protect", 3803 },\ | ||
| 1472 | { "vm_inherit", 3804 },\ | ||
| 1473 | { "vm_read", 3805 },\ | ||
| 1474 | { "vm_read_list", 3806 },\ | ||
| 1475 | { "vm_write", 3807 },\ | ||
| 1476 | { "vm_copy", 3808 },\ | ||
| 1477 | { "vm_read_overwrite", 3809 },\ | ||
| 1478 | { "vm_msync", 3810 },\ | ||
| 1479 | { "vm_behavior_set", 3811 },\ | ||
| 1480 | { "vm_map", 3812 },\ | ||
| 1481 | { "vm_machine_attribute", 3813 },\ | ||
| 1482 | { "vm_remap", 3814 },\ | ||
| 1483 | { "task_wire", 3815 },\ | ||
| 1484 | { "mach_make_memory_entry", 3816 },\ | ||
| 1485 | { "vm_map_page_query", 3817 },\ | ||
| 1486 | { "mach_vm_region_info", 3818 },\ | ||
| 1487 | { "vm_mapped_pages_info", 3819 },\ | ||
| 1488 | { "vm_region_recurse", 3821 },\ | ||
| 1489 | { "vm_region_recurse_64", 3822 },\ | ||
| 1490 | { "mach_vm_region_info_64", 3823 },\ | ||
| 1491 | { "vm_region_64", 3824 },\ | ||
| 1492 | { "mach_make_memory_entry_64", 3825 },\ | ||
| 1493 | { "vm_map_64", 3826 },\ | ||
| 1494 | { "vm_purgable_control", 3830 },\ | ||
| 1495 | { "vm_map_exec_lockdown", 3831 },\ | ||
| 1496 | { "vm_remap_new", 3832 } | ||
| 1497 | #endif | ||
| 1498 | |||
| 1499 | #ifdef __AfterMigUserHeader | ||
| 1500 | __AfterMigUserHeader | ||
| 1501 | #endif /* __AfterMigUserHeader */ | ||
| 1502 | |||
| 1503 | #endif	 /* _vm_map_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/vm_prot.h deleted-153| ... | @@ -1,153 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_prot.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young | ||
| 61 | * | ||
| 62 | *	Virtual memory protection definitions. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_PROT_H_ | ||
| 67 | #define _MACH_VM_PROT_H_ | ||
| 68 | |||
| 69 | /* | ||
| 70 | *	Types defined: | ||
| 71 | * | ||
| 72 | *	vm_prot_t		VM protection values. | ||
| 73 | */ | ||
| 74 | |||
| 75 | typedef int vm_prot_t; | ||
| 76 | |||
| 77 | /* | ||
| 78 | *	Protection values, defined as bits within the vm_prot_t type | ||
| 79 | */ | ||
| 80 | |||
| 81 | #define VM_PROT_NONE ((vm_prot_t) 0x00) | ||
| 82 | |||
| 83 | #define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ | ||
| 84 | #define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ | ||
| 85 | #define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ | ||
| 86 | |||
| 87 | /* | ||
| 88 | *	The default protection for newly-created virtual memory | ||
| 89 | */ | ||
| 90 | |||
| 91 | #define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE) | ||
| 92 | |||
| 93 | /* | ||
| 94 | *	The maximum privileges possible, for parameter checking. | ||
| 95 | */ | ||
| 96 | |||
| 97 | #define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) | ||
| 98 | |||
| 99 | /* | ||
| 100 | *	An invalid protection value. | ||
| 101 | *	Used only by memory_object_lock_request to indicate no change | ||
| 102 | *	to page locks. Using -1 here is a bad idea because it | ||
| 103 | *	looks like VM_PROT_ALL and then some. | ||
| 104 | */ | ||
| 105 | |||
| 106 | #define VM_PROT_NO_CHANGE ((vm_prot_t) 0x08) | ||
| 107 | |||
| 108 | /* | ||
| 109 | * When a caller finds that he cannot obtain write permission on a | ||
| 110 | * mapped entry, the following flag can be used. The entry will | ||
| 111 | * be made "needs copy" effectively copying the object (using COW), | ||
| 112 | * and write permission will be added to the maximum protections | ||
| 113 | * for the associated entry. | ||
| 114 | */ | ||
| 115 | |||
| 116 | #define VM_PROT_COPY ((vm_prot_t) 0x10) | ||
| 117 | |||
| 118 | |||
| 119 | /* | ||
| 120 | *	Another invalid protection value. | ||
| 121 | *	Used only by memory_object_data_request upon an object | ||
| 122 | *	which has specified a copy_call copy strategy. It is used | ||
| 123 | *	when the kernel wants a page belonging to a copy of the | ||
| 124 | *	object, and is only asking the object as a result of | ||
| 125 | *	following a shadow chain. This solves the race between pages | ||
| 126 | *	being pushed up by the memory manager and the kernel | ||
| 127 | *	walking down the shadow chain. | ||
| 128 | */ | ||
| 129 | |||
| 130 | #define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10) | ||
| 131 | |||
| 132 | |||
| 133 | /* | ||
| 134 | * Another invalid protection value. | ||
| 135 | *	Indicates that the other protection bits are to be applied as a mask | ||
| 136 | *	against the actual protection bits of the map entry. | ||
| 137 | */ | ||
| 138 | #define VM_PROT_IS_MASK ((vm_prot_t) 0x40) | ||
| 139 | |||
| 140 | /* | ||
| 141 | * Another invalid protection value to support execute-only protection. | ||
| 142 | * VM_PROT_STRIP_READ is a special marker that tells mprotect to not | ||
| 143 | * set VM_PROT_READ. We have to do it this way because existing code | ||
| 144 | * expects the system to set VM_PROT_READ if VM_PROT_EXECUTE is set. | ||
| 145 | * VM_PROT_EXECUTE_ONLY is just a convenience value to indicate that | ||
| 146 | * the memory should be executable and explicitly not readable. It will | ||
| 147 | * be ignored on platforms that do not support this type of protection. | ||
| 148 | */ | ||
| 149 | #define VM_PROT_STRIP_READ ((vm_prot_t) 0x80) | ||
| 150 | #define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ) | ||
| 151 | |||
| 152 | |||
| 153 | #endif /* _MACH_VM_PROT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/vm_statistics.h deleted-552| ... | @@ -1,552 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_statistics.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young, David Golub | ||
| 61 | * | ||
| 62 | *	Virtual memory statistics structure. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_STATISTICS_H_ | ||
| 67 | #define _MACH_VM_STATISTICS_H_ | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #include <mach/machine/vm_types.h> | ||
| 74 | #include <mach/machine/kern_return.h> | ||
| 75 | |||
| 76 | /* | ||
| 77 | * vm_statistics | ||
| 78 | * | ||
| 79 | * History: | ||
| 80 | *	rev0 - original structure. | ||
| 81 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 82 | *	rev2 - added speculative_count. | ||
| 83 | * | ||
| 84 | * Note: you cannot add any new fields to this structure. Add them below in | ||
| 85 | * vm_statistics64. | ||
| 86 | */ | ||
| 87 | |||
| 88 | struct vm_statistics { | ||
| 89 | 	natural_t free_count; /* # of pages free */ | ||
| 90 | 	natural_t active_count; /* # of pages active */ | ||
| 91 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 92 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 93 | 	natural_t zero_fill_count; /* # of zero fill pages */ | ||
| 94 | 	natural_t reactivations; /* # of pages reactivated */ | ||
| 95 | 	natural_t pageins; /* # of pageins */ | ||
| 96 | 	natural_t pageouts; /* # of pageouts */ | ||
| 97 | 	natural_t faults; /* # of faults */ | ||
| 98 | 	natural_t cow_faults; /* # of copy-on-writes */ | ||
| 99 | 	natural_t lookups; /* object cache lookups */ | ||
| 100 | 	natural_t hits; /* object cache hits */ | ||
| 101 | |||
| 102 | 	/* added for rev1 */ | ||
| 103 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 104 | 	natural_t purges; /* # of pages purged */ | ||
| 105 | |||
| 106 | 	/* added for rev2 */ | ||
| 107 | 	/* | ||
| 108 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 109 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 110 | 	 * used to hold data that was read speculatively from disk but | ||
| 111 | 	 * haven't actually been used by anyone so far. | ||
| 112 | 	 */ | ||
| 113 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 114 | }; | ||
| 115 | |||
| 116 | /* Used by all architectures */ | ||
| 117 | typedef struct vm_statistics *vm_statistics_t; | ||
| 118 | typedef struct vm_statistics vm_statistics_data_t; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * vm_statistics64 | ||
| 122 | * | ||
| 123 | * History: | ||
| 124 | *	rev0 - original structure. | ||
| 125 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 126 | *	rev2 - added speculative_count. | ||
| 127 | *	 ---- | ||
| 128 | *	rev3 - changed name to vm_statistics64. | ||
| 129 | *		changed some fields in structure to 64-bit on | ||
| 130 | *		arm, i386 and x86_64 architectures. | ||
| 131 | *	rev4 - require 64-bit alignment for efficient access | ||
| 132 | *		in the kernel. No change to reported data. | ||
| 133 | * | ||
| 134 | */ | ||
| 135 | |||
| 136 | struct vm_statistics64 { | ||
| 137 | 	natural_t free_count; /* # of pages free */ | ||
| 138 | 	natural_t active_count; /* # of pages active */ | ||
| 139 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 140 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 141 | 	uint64_t zero_fill_count; /* # of zero fill pages */ | ||
| 142 | 	uint64_t reactivations; /* # of pages reactivated */ | ||
| 143 | 	uint64_t pageins; /* # of pageins */ | ||
| 144 | 	uint64_t pageouts; /* # of pageouts */ | ||
| 145 | 	uint64_t faults; /* # of faults */ | ||
| 146 | 	uint64_t cow_faults; /* # of copy-on-writes */ | ||
| 147 | 	uint64_t lookups; /* object cache lookups */ | ||
| 148 | 	uint64_t hits; /* object cache hits */ | ||
| 149 | 	uint64_t purges; /* # of pages purged */ | ||
| 150 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 151 | 	/* | ||
| 152 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 153 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 154 | 	 * used to hold data that was read speculatively from disk but | ||
| 155 | 	 * haven't actually been used by anyone so far. | ||
| 156 | 	 */ | ||
| 157 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 158 | |||
| 159 | 	/* added for rev1 */ | ||
| 160 | 	uint64_t decompressions; /* # of pages decompressed */ | ||
| 161 | 	uint64_t compressions; /* # of pages compressed */ | ||
| 162 | 	uint64_t swapins; /* # of pages swapped in (via compression segments) */ | ||
| 163 | 	uint64_t swapouts; /* # of pages swapped out (via compression segments) */ | ||
| 164 | 	natural_t compressor_page_count; /* # of pages used by the compressed pager to hold all the compressed data */ | ||
| 165 | 	natural_t throttled_count; /* # of pages throttled */ | ||
| 166 | 	natural_t external_page_count; /* # of pages that are file-backed (non-swap) */ | ||
| 167 | 	natural_t internal_page_count; /* # of pages that are anonymous */ | ||
| 168 | 	uint64_t total_uncompressed_pages_in_compressor; /* # of pages (uncompressed) held within the compressor. */ | ||
| 169 | } __attribute__((aligned(8))); | ||
| 170 | |||
| 171 | typedef struct vm_statistics64 *vm_statistics64_t; | ||
| 172 | typedef struct vm_statistics64 vm_statistics64_data_t; | ||
| 173 | |||
| 174 | kern_return_t vm_stats(void *info, unsigned int *count); | ||
| 175 | |||
| 176 | /* | ||
| 177 | * VM_STATISTICS_TRUNCATE_TO_32_BIT | ||
| 178 | * | ||
| 179 | * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from | ||
| 180 | * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics). | ||
| 181 | */ | ||
| 182 | #define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value))) | ||
| 183 | |||
| 184 | /* | ||
| 185 | * vm_extmod_statistics | ||
| 186 | * | ||
| 187 | * Structure to record modifications to a task by an | ||
| 188 | * external agent. | ||
| 189 | * | ||
| 190 | * History: | ||
| 191 | *	rev0 - original structure. | ||
| 192 | */ | ||
| 193 | |||
| 194 | struct vm_extmod_statistics { | ||
| 195 | 	int64_t task_for_pid_count; /* # of times task port was looked up */ | ||
| 196 | 	int64_t task_for_pid_caller_count; /* # of times this task called task_for_pid */ | ||
| 197 | 	int64_t thread_creation_count; /* # of threads created in task */ | ||
| 198 | 	int64_t thread_creation_caller_count; /* # of threads created by task */ | ||
| 199 | 	int64_t thread_set_state_count; /* # of register state sets in task */ | ||
| 200 | 	int64_t thread_set_state_caller_count; /* # of register state sets by task */ | ||
| 201 | } __attribute__((aligned(8))); | ||
| 202 | |||
| 203 | typedef struct vm_extmod_statistics *vm_extmod_statistics_t; | ||
| 204 | typedef struct vm_extmod_statistics vm_extmod_statistics_data_t; | ||
| 205 | |||
| 206 | typedef struct vm_purgeable_stat { | ||
| 207 | 	uint64_t count; | ||
| 208 | 	uint64_t size; | ||
| 209 | }vm_purgeable_stat_t; | ||
| 210 | |||
| 211 | struct vm_purgeable_info { | ||
| 212 | 	vm_purgeable_stat_t fifo_data[8]; | ||
| 213 | 	vm_purgeable_stat_t obsolete_data; | ||
| 214 | 	vm_purgeable_stat_t lifo_data[8]; | ||
| 215 | }; | ||
| 216 | |||
| 217 | typedef struct vm_purgeable_info *vm_purgeable_info_t; | ||
| 218 | |||
| 219 | /* included for the vm_map_page_query call */ | ||
| 220 | |||
| 221 | #define VM_PAGE_QUERY_PAGE_PRESENT 0x1 | ||
| 222 | #define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2 | ||
| 223 | #define VM_PAGE_QUERY_PAGE_REF 0x4 | ||
| 224 | #define VM_PAGE_QUERY_PAGE_DIRTY 0x8 | ||
| 225 | #define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10 | ||
| 226 | #define VM_PAGE_QUERY_PAGE_COPIED 0x20 | ||
| 227 | #define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40 | ||
| 228 | #define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80 | ||
| 229 | #define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100 | ||
| 230 | #define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200 | ||
| 231 | #define VM_PAGE_QUERY_PAGE_CS_NX 0x400 | ||
| 232 | #define VM_PAGE_QUERY_PAGE_REUSABLE 0x800 | ||
| 233 | |||
| 234 | |||
| 235 | /* | ||
| 236 | * VM allocation flags: | ||
| 237 | * | ||
| 238 | * VM_FLAGS_FIXED | ||
| 239 | * (really the absence of VM_FLAGS_ANYWHERE) | ||
| 240 | *	Allocate new VM region at the specified virtual address, if possible. | ||
| 241 | * | ||
| 242 | * VM_FLAGS_ANYWHERE | ||
| 243 | *	Allocate new VM region anywhere it would fit in the address space. | ||
| 244 | * | ||
| 245 | * VM_FLAGS_PURGABLE | ||
| 246 | *	Create a purgable VM object for that new VM region. | ||
| 247 | * | ||
| 248 | * VM_FLAGS_4GB_CHUNK | ||
| 249 | *	The new VM region will be chunked up into 4GB sized pieces. | ||
| 250 | * | ||
| 251 | * VM_FLAGS_NO_PMAP_CHECK | ||
| 252 | *	(for DEBUG kernel config only, ignored for other configs) | ||
| 253 | *	Do not check that there is no stale pmap mapping for the new VM region. | ||
| 254 | *	This is useful for kernel memory allocations at bootstrap when building | ||
| 255 | *	the initial kernel address space while some memory is already in use. | ||
| 256 | * | ||
| 257 | * VM_FLAGS_OVERWRITE | ||
| 258 | *	The new VM region can replace existing VM regions if necessary | ||
| 259 | *	(to be used in combination with VM_FLAGS_FIXED). | ||
| 260 | * | ||
| 261 | * VM_FLAGS_NO_CACHE | ||
| 262 | *	Pages brought in to this VM region are placed on the speculative | ||
| 263 | *	queue instead of the active queue. In other words, they are not | ||
| 264 | *	cached so that they will be stolen first if memory runs low. | ||
| 265 | */ | ||
| 266 | |||
| 267 | #define VM_FLAGS_FIXED 0x0000 | ||
| 268 | #define VM_FLAGS_ANYWHERE 0x0001 | ||
| 269 | #define VM_FLAGS_PURGABLE 0x0002 | ||
| 270 | #define VM_FLAGS_4GB_CHUNK 0x0004 | ||
| 271 | #define VM_FLAGS_RANDOM_ADDR 0x0008 | ||
| 272 | #define VM_FLAGS_NO_CACHE 0x0010 | ||
| 273 | #define VM_FLAGS_RESILIENT_CODESIGN 0x0020 | ||
| 274 | #define VM_FLAGS_RESILIENT_MEDIA 0x0040 | ||
| 275 | #define VM_FLAGS_PERMANENT 0x0080 | ||
| 276 | #define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */ | ||
| 277 | /* | ||
| 278 | * VM_FLAGS_SUPERPAGE_MASK | ||
| 279 | *	3 bits that specify whether large pages should be used instead of | ||
| 280 | *	base pages (!=0), as well as the requested page size. | ||
| 281 | */ | ||
| 282 | #define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ | ||
| 283 | #define VM_FLAGS_RETURN_DATA_ADDR 0x100000 /* Return address of target data, rather than base of page */ | ||
| 284 | #define VM_FLAGS_RETURN_4K_DATA_ADDR 0x800000 /* Return 4K aligned address of target data */ | ||
| 285 | #define VM_FLAGS_ALIAS_MASK 0xFF000000 | ||
| 286 | #define VM_GET_FLAGS_ALIAS(flags, alias) \ | ||
| 287 | 	 (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 | ||
| 288 | #define VM_SET_FLAGS_ALIAS(flags, alias) \ | ||
| 289 | 	 (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ | ||
| 290 | 	 (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) | ||
| 291 | |||
| 292 | /* These are the flags that we accept from user-space */ | ||
| 293 | #define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ | ||
| 294 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 295 | 	 VM_FLAGS_PURGABLE | \ | ||
| 296 | 	 VM_FLAGS_4GB_CHUNK | \ | ||
| 297 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 298 | 	 VM_FLAGS_NO_CACHE | \ | ||
| 299 | 	 VM_FLAGS_PERMANENT | \ | ||
| 300 | 	 VM_FLAGS_OVERWRITE | \ | ||
| 301 | 	 VM_FLAGS_SUPERPAGE_MASK | \ | ||
| 302 | 	 VM_FLAGS_ALIAS_MASK) | ||
| 303 | #define VM_FLAGS_USER_MAP (VM_FLAGS_USER_ALLOCATE | \ | ||
| 304 | 	 VM_FLAGS_RETURN_4K_DATA_ADDR | \ | ||
| 305 | 	 VM_FLAGS_RETURN_DATA_ADDR) | ||
| 306 | #define VM_FLAGS_USER_REMAP (VM_FLAGS_FIXED | \ | ||
| 307 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 308 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 309 | 	 VM_FLAGS_OVERWRITE| \ | ||
| 310 | 	 VM_FLAGS_RETURN_DATA_ADDR | \ | ||
| 311 | 	 VM_FLAGS_RESILIENT_CODESIGN | \ | ||
| 312 | 	 VM_FLAGS_RESILIENT_MEDIA) | ||
| 313 | |||
| 314 | #define VM_FLAGS_SUPERPAGE_SHIFT 16 | ||
| 315 | #define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ | ||
| 316 | #define SUPERPAGE_SIZE_ANY 1 | ||
| 317 | #define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 318 | #define VM_FLAGS_SUPERPAGE_SIZE_ANY (SUPERPAGE_SIZE_ANY << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 319 | #define SUPERPAGE_SIZE_2MB 2 | ||
| 320 | #define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 321 | |||
| 322 | /* | ||
| 323 | * EXC_GUARD definitions for virtual memory. | ||
| 324 | */ | ||
| 325 | #define GUARD_TYPE_VIRT_MEMORY 0x5 | ||
| 326 | |||
| 327 | /* Reasons for exception for virtual memory */ | ||
| 328 | enum virtual_memory_guard_exception_codes { | ||
| 329 | 	kGUARD_EXC_DEALLOC_GAP = 1u << 0 | ||
| 330 | }; | ||
| 331 | |||
| 332 | |||
| 333 | /* current accounting postmark */ | ||
| 334 | #define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600 | ||
| 335 | |||
| 336 | /* discrete values: */ | ||
| 337 | #define VM_LEDGER_TAG_NONE 0x00000000 | ||
| 338 | #define VM_LEDGER_TAG_DEFAULT 0x00000001 | ||
| 339 | #define VM_LEDGER_TAG_NETWORK 0x00000002 | ||
| 340 | #define VM_LEDGER_TAG_MEDIA 0x00000003 | ||
| 341 | #define VM_LEDGER_TAG_GRAPHICS 0x00000004 | ||
| 342 | #define VM_LEDGER_TAG_NEURAL 0x00000005 | ||
| 343 | #define VM_LEDGER_TAG_MAX 0x00000005 | ||
| 344 | /* individual bits: */ | ||
| 345 | #define VM_LEDGER_FLAG_NO_FOOTPRINT 0x00000001 | ||
| 346 | #define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT) | ||
| 347 | |||
| 348 | |||
| 349 | #define VM_MEMORY_MALLOC 1 | ||
| 350 | #define VM_MEMORY_MALLOC_SMALL 2 | ||
| 351 | #define VM_MEMORY_MALLOC_LARGE 3 | ||
| 352 | #define VM_MEMORY_MALLOC_HUGE 4 | ||
| 353 | #define VM_MEMORY_SBRK 5// uninteresting -- no one should call | ||
| 354 | #define VM_MEMORY_REALLOC 6 | ||
| 355 | #define VM_MEMORY_MALLOC_TINY 7 | ||
| 356 | #define VM_MEMORY_MALLOC_LARGE_REUSABLE 8 | ||
| 357 | #define VM_MEMORY_MALLOC_LARGE_REUSED 9 | ||
| 358 | |||
| 359 | #define VM_MEMORY_ANALYSIS_TOOL 10 | ||
| 360 | |||
| 361 | #define VM_MEMORY_MALLOC_NANO 11 | ||
| 362 | #define VM_MEMORY_MALLOC_MEDIUM 12 | ||
| 363 | #define VM_MEMORY_MALLOC_PGUARD 13 | ||
| 364 | |||
| 365 | #define VM_MEMORY_MACH_MSG 20 | ||
| 366 | #define VM_MEMORY_IOKIT 21 | ||
| 367 | #define VM_MEMORY_STACK 30 | ||
| 368 | #define VM_MEMORY_GUARD 31 | ||
| 369 | #define VM_MEMORY_SHARED_PMAP 32 | ||
| 370 | /* memory containing a dylib */ | ||
| 371 | #define VM_MEMORY_DYLIB 33 | ||
| 372 | #define VM_MEMORY_OBJC_DISPATCHERS 34 | ||
| 373 | |||
| 374 | /* Was a nested pmap (VM_MEMORY_SHARED_PMAP) which has now been unnested */ | ||
| 375 | #define VM_MEMORY_UNSHARED_PMAP 35 | ||
| 376 | |||
| 377 | |||
| 378 | // Placeholders for now -- as we analyze the libraries and find how they | ||
| 379 | // use memory, we can make these labels more specific. | ||
| 380 | #define VM_MEMORY_APPKIT 40 | ||
| 381 | #define VM_MEMORY_FOUNDATION 41 | ||
| 382 | #define VM_MEMORY_COREGRAPHICS 42 | ||
| 383 | #define VM_MEMORY_CORESERVICES 43 | ||
| 384 | #define VM_MEMORY_CARBON VM_MEMORY_CORESERVICES | ||
| 385 | #define VM_MEMORY_JAVA 44 | ||
| 386 | #define VM_MEMORY_COREDATA 45 | ||
| 387 | #define VM_MEMORY_COREDATA_OBJECTIDS 46 | ||
| 388 | #define VM_MEMORY_ATS 50 | ||
| 389 | #define VM_MEMORY_LAYERKIT 51 | ||
| 390 | #define VM_MEMORY_CGIMAGE 52 | ||
| 391 | #define VM_MEMORY_TCMALLOC 53 | ||
| 392 | |||
| 393 | /* private raster data (i.e. layers, some images, QGL allocator) */ | ||
| 394 | #define VM_MEMORY_COREGRAPHICS_DATA 54 | ||
| 395 | |||
| 396 | /* shared image and font caches */ | ||
| 397 | #define VM_MEMORY_COREGRAPHICS_SHARED 55 | ||
| 398 | |||
| 399 | /* Memory used for virtual framebuffers, shadowing buffers, etc... */ | ||
| 400 | #define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 | ||
| 401 | |||
| 402 | /* Window backing stores, custom shadow data, and compressed backing stores */ | ||
| 403 | #define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 | ||
| 404 | |||
| 405 | /* x-alloc'd memory */ | ||
| 406 | #define VM_MEMORY_COREGRAPHICS_XALLOC 58 | ||
| 407 | |||
| 408 | /* catch-all for other uses, such as the read-only shared data page */ | ||
| 409 | #define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS | ||
| 410 | |||
| 411 | /* memory allocated by the dynamic loader for itself */ | ||
| 412 | #define VM_MEMORY_DYLD 60 | ||
| 413 | /* malloc'd memory created by dyld */ | ||
| 414 | #define VM_MEMORY_DYLD_MALLOC 61 | ||
| 415 | |||
| 416 | /* Used for sqlite page cache */ | ||
| 417 | #define VM_MEMORY_SQLITE 62 | ||
| 418 | |||
| 419 | /* JavaScriptCore heaps */ | ||
| 420 | #define VM_MEMORY_JAVASCRIPT_CORE 63 | ||
| 421 | #define VM_MEMORY_WEBASSEMBLY VM_MEMORY_JAVASCRIPT_CORE | ||
| 422 | /* memory allocated for the JIT */ | ||
| 423 | #define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 | ||
| 424 | #define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 | ||
| 425 | |||
| 426 | /* memory allocated for GLSL */ | ||
| 427 | #define VM_MEMORY_GLSL 66 | ||
| 428 | |||
| 429 | /* memory allocated for OpenCL.framework */ | ||
| 430 | #define VM_MEMORY_OPENCL 67 | ||
| 431 | |||
| 432 | /* memory allocated for QuartzCore.framework */ | ||
| 433 | #define VM_MEMORY_COREIMAGE 68 | ||
| 434 | |||
| 435 | /* memory allocated for WebCore Purgeable Buffers */ | ||
| 436 | #define VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69 | ||
| 437 | |||
| 438 | /* ImageIO memory */ | ||
| 439 | #define VM_MEMORY_IMAGEIO 70 | ||
| 440 | |||
| 441 | /* CoreProfile memory */ | ||
| 442 | #define VM_MEMORY_COREPROFILE 71 | ||
| 443 | |||
| 444 | /* assetsd / MobileSlideShow memory */ | ||
| 445 | #define VM_MEMORY_ASSETSD 72 | ||
| 446 | |||
| 447 | /* libsystem_kernel os_once_alloc */ | ||
| 448 | #define VM_MEMORY_OS_ALLOC_ONCE 73 | ||
| 449 | |||
| 450 | /* libdispatch internal allocator */ | ||
| 451 | #define VM_MEMORY_LIBDISPATCH 74 | ||
| 452 | |||
| 453 | /* Accelerate.framework image backing stores */ | ||
| 454 | #define VM_MEMORY_ACCELERATE 75 | ||
| 455 | |||
| 456 | /* CoreUI image block data */ | ||
| 457 | #define VM_MEMORY_COREUI 76 | ||
| 458 | |||
| 459 | /* CoreUI image file */ | ||
| 460 | #define VM_MEMORY_COREUIFILE 77 | ||
| 461 | |||
| 462 | /* Genealogy buffers */ | ||
| 463 | #define VM_MEMORY_GENEALOGY 78 | ||
| 464 | |||
| 465 | /* RawCamera VM allocated memory */ | ||
| 466 | #define VM_MEMORY_RAWCAMERA 79 | ||
| 467 | |||
| 468 | /* corpse info for dead process */ | ||
| 469 | #define VM_MEMORY_CORPSEINFO 80 | ||
| 470 | |||
| 471 | /* Apple System Logger (ASL) messages */ | ||
| 472 | #define VM_MEMORY_ASL 81 | ||
| 473 | |||
| 474 | /* Swift runtime */ | ||
| 475 | #define VM_MEMORY_SWIFT_RUNTIME 82 | ||
| 476 | |||
| 477 | /* Swift metadata */ | ||
| 478 | #define VM_MEMORY_SWIFT_METADATA 83 | ||
| 479 | |||
| 480 | /* DHMM data */ | ||
| 481 | #define VM_MEMORY_DHMM 84 | ||
| 482 | |||
| 483 | |||
| 484 | /* memory allocated by SceneKit.framework */ | ||
| 485 | #define VM_MEMORY_SCENEKIT 86 | ||
| 486 | |||
| 487 | /* memory allocated by skywalk networking */ | ||
| 488 | #define VM_MEMORY_SKYWALK 87 | ||
| 489 | |||
| 490 | #define VM_MEMORY_IOSURFACE 88 | ||
| 491 | |||
| 492 | #define VM_MEMORY_LIBNETWORK 89 | ||
| 493 | |||
| 494 | #define VM_MEMORY_AUDIO 90 | ||
| 495 | |||
| 496 | #define VM_MEMORY_VIDEOBITSTREAM 91 | ||
| 497 | |||
| 498 | /* memory allocated by CoreMedia */ | ||
| 499 | #define VM_MEMORY_CM_XPC 92 | ||
| 500 | |||
| 501 | #define VM_MEMORY_CM_RPC 93 | ||
| 502 | |||
| 503 | #define VM_MEMORY_CM_MEMORYPOOL 94 | ||
| 504 | |||
| 505 | #define VM_MEMORY_CM_READCACHE 95 | ||
| 506 | |||
| 507 | #define VM_MEMORY_CM_CRABS 96 | ||
| 508 | |||
| 509 | /* memory allocated for QuickLookThumbnailing */ | ||
| 510 | #define VM_MEMORY_QUICKLOOK_THUMBNAILS 97 | ||
| 511 | |||
| 512 | /* memory allocated by Accounts framework */ | ||
| 513 | #define VM_MEMORY_ACCOUNTS 98 | ||
| 514 | |||
| 515 | /* memory allocated by Sanitizer runtime libraries */ | ||
| 516 | #define VM_MEMORY_SANITIZER 99 | ||
| 517 | |||
| 518 | /* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */ | ||
| 519 | #define VM_MEMORY_IOACCELERATOR 100 | ||
| 520 | |||
| 521 | /* memory allocated by CoreMedia for global image registration of frames */ | ||
| 522 | #define VM_MEMORY_CM_REGWARP 101 | ||
| 523 | |||
| 524 | /* memory allocated by EmbeddedAcousticRecognition for speech decoder */ | ||
| 525 | #define VM_MEMORY_EAR_DECODER 102 | ||
| 526 | |||
| 527 | /* CoreUI cached image data */ | ||
| 528 | #define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103 | ||
| 529 | |||
| 530 | /* Reserve 230-239 for Rosetta */ | ||
| 531 | #define VM_MEMORY_ROSETTA 230 | ||
| 532 | #define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231 | ||
| 533 | #define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232 | ||
| 534 | #define VM_MEMORY_ROSETTA_RETURN_STACK 233 | ||
| 535 | #define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234 | ||
| 536 | #define VM_MEMORY_ROSETTA_USER_LDT 235 | ||
| 537 | #define VM_MEMORY_ROSETTA_ARENA 236 | ||
| 538 | #define VM_MEMORY_ROSETTA_10 239 | ||
| 539 | |||
| 540 | /* Reserve 240-255 for application */ | ||
| 541 | #define VM_MEMORY_APPLICATION_SPECIFIC_1 240 | ||
| 542 | #define VM_MEMORY_APPLICATION_SPECIFIC_16 255 | ||
| 543 | |||
| 544 | #define VM_MAKE_TAG(tag) ((tag) << 24) | ||
| 545 | |||
| 546 | |||
| 547 | |||
| 548 | #ifdef __cplusplus | ||
| 549 | } | ||
| 550 | #endif | ||
| 551 | |||
| 552 | #endif /* _MACH_VM_STATISTICS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/mach/vm_types.h deleted-97| ... | @@ -1,97 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | * | ||
| 31 | */ | ||
| 32 | #ifndef _MACH_VM_TYPES_H_ | ||
| 33 | #define _MACH_VM_TYPES_H_ | ||
| 34 | |||
| 35 | #include <mach/port.h> | ||
| 36 | #include <mach/machine/vm_types.h> | ||
| 37 | |||
| 38 | #include <stdint.h> | ||
| 39 | |||
| 40 | typedef vm_offset_t pointer_t; | ||
| 41 | typedef vm_offset_t vm_address_t; | ||
| 42 | |||
| 43 | /* | ||
| 44 | * We use addr64_t for 64-bit addresses that are used on both | ||
| 45 | * 32 and 64-bit machines. On PPC, they are passed and returned as | ||
| 46 | * two adjacent 32-bit GPRs. We use addr64_t in places where | ||
| 47 | * common code must be useable both on 32 and 64-bit machines. | ||
| 48 | */ | ||
| 49 | typedef uint64_t addr64_t; /* Basic effective address */ | ||
| 50 | |||
| 51 | /* | ||
| 52 | * We use reg64_t for addresses that are 32 bits on a 32-bit | ||
| 53 | * machine, and 64 bits on a 64-bit machine, but are always | ||
| 54 | * passed and returned in a single GPR on PPC. This type | ||
| 55 | * cannot be used in generic 32-bit c, since on a 64-bit | ||
| 56 | * machine the upper half of the register will be ignored | ||
| 57 | * by the c compiler in 32-bit mode. In c, we can only use the | ||
| 58 | * type in prototypes of functions that are written in and called | ||
| 59 | * from assembly language. This type is basically a comment. | ||
| 60 | */ | ||
| 61 | typedef uint32_t reg64_t; | ||
| 62 | |||
| 63 | /* | ||
| 64 | * To minimize the use of 64-bit fields, we keep some physical | ||
| 65 | * addresses (that are page aligned) as 32-bit page numbers. | ||
| 66 | * This limits the physical address space to 16TB of RAM. | ||
| 67 | */ | ||
| 68 | typedef uint32_t ppnum_t; /* Physical page number */ | ||
| 69 | #define PPNUM_MAX UINT32_MAX | ||
| 70 | |||
| 71 | |||
| 72 | |||
| 73 | typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t; | ||
| 74 | |||
| 75 | |||
| 76 | #define VM_MAP_NULL ((vm_map_t) 0) | ||
| 77 | #define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) 0) | ||
| 78 | #define VM_MAP_READ_NULL ((vm_map_read_t) 0) | ||
| 79 | |||
| 80 | /* | ||
| 81 | * Evolving definitions, likely to change. | ||
| 82 | */ | ||
| 83 | |||
| 84 | typedef uint64_t vm_object_offset_t; | ||
| 85 | typedef uint64_t vm_object_size_t; | ||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | typedef mach_port_t upl_t; | ||
| 91 | typedef mach_port_t vm_named_entry_t; | ||
| 92 | |||
| 93 | |||
| 94 | #define UPL_NULL ((upl_t) 0) | ||
| 95 | #define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) | ||
| 96 | |||
| 97 | #endif /* _MACH_VM_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/machine/_mcontext.h deleted-34| ... | @@ -1,34 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2003-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #if defined (__i386__) || defined (__x86_64__) | ||
| 29 | #include "i386/_mcontext.h" | ||
| 30 | #elif defined (__arm__) || defined (__arm64__) | ||
| 31 | #include "arm/_mcontext.h" | ||
| 32 | #else | ||
| 33 | #error architecture not supported | ||
| 34 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/machine/_param.h deleted-34| ... | @@ -1,34 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2004-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #if defined (__i386__) || defined (__x86_64__) | ||
| 29 | #include <i386/_param.h> | ||
| 30 | #elif defined (__arm__) || defined (__arm64__) | ||
| 31 | #include <arm/_param.h> | ||
| 32 | #else | ||
| 33 | #error architecture not supported | ||
| 34 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/machine/limits.h deleted-11| ... | @@ -1,11 +0,0 @@ | ||
| 1 | /* This is the `system' limits.h, independent of any particular | ||
| 2 | * compiler. GCC provides its own limits.h which can be found in | ||
| 3 | * /usr/lib/gcc, although it is not very informative. | ||
| 4 | * This file is public domain. */ | ||
| 5 | #if defined (__i386__) || defined(__x86_64__) | ||
| 6 | #include <i386/limits.h> | ||
| 7 | #elif defined (__arm__) || defined (__arm64__) | ||
| 8 | #include <arm/limits.h> | ||
| 9 | #else | ||
| 10 | #error architecture not supported | ||
| 11 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/malloc/malloc.h deleted-314| ... | @@ -1,314 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 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 _MALLOC_MALLOC_H_ | ||
| 25 | #define _MALLOC_MALLOC_H_ | ||
| 26 | |||
| 27 | #include <stddef.h> | ||
| 28 | #include <mach/mach_types.h> | ||
| 29 | #include <sys/cdefs.h> | ||
| 30 | #include <Availability.h> | ||
| 31 | |||
| 32 | #if __has_feature(ptrauth_calls) | ||
| 33 | #include <ptrauth.h> | ||
| 34 | |||
| 35 | // Zone function pointer, type-diversified but not address-diversified (because | ||
| 36 | // the zone can be copied). Process-independent because the zone structure may | ||
| 37 | // be in the shared library cache. | ||
| 38 | #define MALLOC_ZONE_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 39 | 		FALSE, ptrauth_string_discriminator("malloc_zone_fn." #fn)) fn | ||
| 40 | |||
| 41 | // Introspection function pointer, address- and type-diversified. | ||
| 42 | // Process-independent because the malloc_introspection_t structure that contains | ||
| 43 | // these pointers may be in the shared library cache. | ||
| 44 | #define MALLOC_INTROSPECT_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 45 | 		TRUE, ptrauth_string_discriminator("malloc_introspect_fn." #fn)) fn | ||
| 46 | |||
| 47 | // Pointer to the introspection pointer table, type-diversified but not | ||
| 48 | // address-diversified (because the zone can be copied). | ||
| 49 | // Process-independent because the table pointer may be in the shared library cache. | ||
| 50 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) __ptrauth(ptrauth_key_process_independent_data,\ | ||
| 51 | 		FALSE, ptrauth_string_discriminator("malloc_introspect_tbl")) ptr | ||
| 52 | |||
| 53 | #endif	// __has_feature(ptrauth_calls) | ||
| 54 | |||
| 55 | #ifndef MALLOC_ZONE_FN_PTR | ||
| 56 | #define MALLOC_ZONE_FN_PTR(fn) fn | ||
| 57 | #define MALLOC_INTROSPECT_FN_PTR(fn) fn | ||
| 58 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) ptr | ||
| 59 | #endif // MALLOC_ZONE_FN_PTR | ||
| 60 | |||
| 61 | __BEGIN_DECLS | ||
| 62 | /*********	Type definitions	************/ | ||
| 63 | |||
| 64 | typedef struct _malloc_zone_t { | ||
| 65 | /* Only zone implementors should depend on the layout of this structure; | ||
| 66 | Regular callers should use the access functions below */ | ||
| 67 | void	*reserved1;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 68 | void	*reserved2;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 69 | size_t 	(* MALLOC_ZONE_FN_PTR(size))(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ | ||
| 70 | void 	*(* MALLOC_ZONE_FN_PTR(malloc))(struct _malloc_zone_t *zone, size_t size); | ||
| 71 | void 	*(* MALLOC_ZONE_FN_PTR(calloc))(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ | ||
| 72 | void 	*(* MALLOC_ZONE_FN_PTR(valloc))(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ | ||
| 73 | void 	(* MALLOC_ZONE_FN_PTR(free))(struct _malloc_zone_t *zone, void *ptr); | ||
| 74 | void 	*(* MALLOC_ZONE_FN_PTR(realloc))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 75 | void 	(* MALLOC_ZONE_FN_PTR(destroy))(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ | ||
| 76 | const char	*zone_name; | ||
| 77 | |||
| 78 | /* Optional batch callbacks; these may be NULL */ | ||
| 79 | unsigned	(* MALLOC_ZONE_FN_PTR(batch_malloc))(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ | ||
| 80 | void	(* MALLOC_ZONE_FN_PTR(batch_free))(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ | ||
| 81 | |||
| 82 | struct malloc_introspection_t	* MALLOC_INTROSPECT_TBL_PTR(introspect); | ||
| 83 | unsigned	version; | ||
| 84 | 	 | ||
| 85 | /* aligned memory allocation. The callback may be NULL. Present in version >= 5. */ | ||
| 86 | void *(* MALLOC_ZONE_FN_PTR(memalign))(struct _malloc_zone_t *zone, size_t alignment, size_t size); | ||
| 87 | |||
| 88 | /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. Present in version >= 6.*/ | ||
| 89 | void (* MALLOC_ZONE_FN_PTR(free_definite_size))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 90 | |||
| 91 | /* Empty out caches in the face of memory pressure. The callback may be NULL. Present in version >= 8. */ | ||
| 92 | size_t 	(* MALLOC_ZONE_FN_PTR(pressure_relief))(struct _malloc_zone_t *zone, size_t goal); | ||
| 93 | |||
| 94 | 	/* | ||
| 95 | 	 * Checks whether an address might belong to the zone. May be NULL. Present in version >= 10. | ||
| 96 | 	 * False positives are allowed (e.g. the pointer was freed, or it's in zone space that has | ||
| 97 | 	 * not yet been allocated. False negatives are not allowed. | ||
| 98 | 	 */ | ||
| 99 | boolean_t (* MALLOC_ZONE_FN_PTR(claimed_address))(struct _malloc_zone_t *zone, void *ptr); | ||
| 100 | } malloc_zone_t; | ||
| 101 | |||
| 102 | /*********	Creation and destruction	************/ | ||
| 103 | |||
| 104 | extern malloc_zone_t *malloc_default_zone(void); | ||
| 105 | /* The initial zone */ | ||
| 106 | |||
| 107 | extern malloc_zone_t *malloc_create_zone(vm_size_t start_size, unsigned flags); | ||
| 108 | /* Creates a new zone with default behavior and registers it */ | ||
| 109 | |||
| 110 | extern void malloc_destroy_zone(malloc_zone_t *zone); | ||
| 111 | /* Destroys zone and everything it allocated */ | ||
| 112 | |||
| 113 | /*********	Block creation and manipulation	************/ | ||
| 114 | |||
| 115 | extern void *malloc_zone_malloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 116 | /* Allocates a new pointer of size size; zone must be non-NULL */ | ||
| 117 | |||
| 118 | extern void *malloc_zone_calloc(malloc_zone_t *zone, size_t num_items, size_t size) __alloc_size(2,3); | ||
| 119 | /* Allocates a new pointer of size num_items * size; block is cleared; zone must be non-NULL */ | ||
| 120 | |||
| 121 | extern void *malloc_zone_valloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 122 | /* Allocates a new pointer of size size; zone must be non-NULL; Pointer is guaranteed to be page-aligned and block is cleared */ | ||
| 123 | |||
| 124 | extern void malloc_zone_free(malloc_zone_t *zone, void *ptr); | ||
| 125 | /* Frees pointer in zone; zone must be non-NULL */ | ||
| 126 | |||
| 127 | extern void *malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size) __alloc_size(3); | ||
| 128 | /* Enlarges block if necessary; zone must be non-NULL */ | ||
| 129 | |||
| 130 | extern malloc_zone_t *malloc_zone_from_ptr(const void *ptr); | ||
| 131 | /* Returns the zone for a pointer, or NULL if not in any zone. | ||
| 132 | The ptr must have been returned from a malloc or realloc call. */ | ||
| 133 | |||
| 134 | extern size_t malloc_size(const void *ptr); | ||
| 135 | /* Returns size of given ptr */ | ||
| 136 | |||
| 137 | extern size_t malloc_good_size(size_t size); | ||
| 138 | /* Returns number of bytes greater than or equal to size that can be allocated without padding */ | ||
| 139 | |||
| 140 | extern void *malloc_zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size) __alloc_size(3) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 141 | /* | ||
| 142 | * Allocates a new pointer of size size whose address is an exact multiple of alignment. | ||
| 143 | * alignment must be a power of two and at least as large as sizeof(void *). | ||
| 144 | * zone must be non-NULL. | ||
| 145 | */ | ||
| 146 | |||
| 147 | /*********	Batch methods	************/ | ||
| 148 | |||
| 149 | extern unsigned malloc_zone_batch_malloc(malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); | ||
| 150 | /* Allocates num blocks of the same size; Returns the number truly allocated (may be 0) */ | ||
| 151 | |||
| 152 | extern void malloc_zone_batch_free(malloc_zone_t *zone, void **to_be_freed, unsigned num); | ||
| 153 | /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process; This function will always free even if the zone has no batch callback */ | ||
| 154 | |||
| 155 | /*********	Functions for libcache	************/ | ||
| 156 | |||
| 157 | extern malloc_zone_t *malloc_default_purgeable_zone(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 158 | /* Returns a pointer to the default purgeable_zone. */ | ||
| 159 | |||
| 160 | extern void malloc_make_purgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 161 | /* Make an allocation from the purgeable zone purgeable if possible. */ | ||
| 162 | |||
| 163 | extern int malloc_make_nonpurgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 164 | /* Makes an allocation from the purgeable zone nonpurgeable. | ||
| 165 | * Returns zero if the contents were not purged since the last | ||
| 166 | * call to malloc_make_purgeable, else returns non-zero. */ | ||
| 167 | |||
| 168 | /*********	Functions for zone implementors	************/ | ||
| 169 | |||
| 170 | extern void malloc_zone_register(malloc_zone_t *zone); | ||
| 171 | /* Registers a custom malloc zone; Should typically be called after a | ||
| 172 | * malloc_zone_t has been filled in with custom methods by a client. See | ||
| 173 | * malloc_create_zone for creating additional malloc zones with the | ||
| 174 | * default allocation and free behavior. */ | ||
| 175 | |||
| 176 | extern void malloc_zone_unregister(malloc_zone_t *zone); | ||
| 177 | /* De-registers a zone | ||
| 178 | Should typically be called before calling the zone destruction routine */ | ||
| 179 | |||
| 180 | extern void malloc_set_zone_name(malloc_zone_t *zone, const char *name); | ||
| 181 | /* Sets the name of a zone */ | ||
| 182 | |||
| 183 | extern const char *malloc_get_zone_name(malloc_zone_t *zone); | ||
| 184 | /* Returns the name of a zone */ | ||
| 185 | |||
| 186 | size_t malloc_zone_pressure_relief(malloc_zone_t *zone, size_t goal) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 187 | /* malloc_zone_pressure_relief() advises the malloc subsystem that the process is under memory pressure and | ||
| 188 | * that the subsystem should make its best effort towards releasing (i.e. munmap()-ing) "goal" bytes from "zone". | ||
| 189 | * If "goal" is passed as zero, the malloc subsystem will attempt to achieve maximal pressure relief in "zone". | ||
| 190 | * If "zone" is passed as NULL, all zones are examined for pressure relief opportunities. | ||
| 191 | * malloc_zone_pressure_relief() returns the number of bytes released. | ||
| 192 | */ | ||
| 193 | |||
| 194 | typedef struct { | ||
| 195 | vm_address_t	address; | ||
| 196 | vm_size_t		size; | ||
| 197 | } vm_range_t; | ||
| 198 | |||
| 199 | typedef struct malloc_statistics_t { | ||
| 200 | unsigned	blocks_in_use; | ||
| 201 | size_t	size_in_use; | ||
| 202 | size_t	max_size_in_use;	/* high water mark of touched memory */ | ||
| 203 | size_t	size_allocated;		/* reserved in memory */ | ||
| 204 | } malloc_statistics_t; | ||
| 205 | |||
| 206 | typedef kern_return_t memory_reader_t(task_t remote_task, vm_address_t remote_address, vm_size_t size, void **local_memory); | ||
| 207 | /* given a task, "reads" the memory at the given address and size | ||
| 208 | local_memory: set to a contiguous chunk of memory; validity of local_memory is assumed to be limited (until next call) */ | ||
| 209 | |||
| 210 | #define MALLOC_PTR_IN_USE_RANGE_TYPE	1	/* for allocated pointers */ | ||
| 211 | #define MALLOC_PTR_REGION_RANGE_TYPE	2	/* for region containing pointers */ | ||
| 212 | #define MALLOC_ADMIN_REGION_RANGE_TYPE	4	/* for region used internally */ | ||
| 213 | #define MALLOC_ZONE_SPECIFIC_FLAGS	0xff00	/* bits reserved for zone-specific purposes */ | ||
| 214 | |||
| 215 | typedef void vm_range_recorder_t(task_t, void *, unsigned type, vm_range_t *, unsigned); | ||
| 216 | /* given a task and context, "records" the specified addresses */ | ||
| 217 | |||
| 218 | /* Print function for the print_task() operation. */ | ||
| 219 | typedef void print_task_printer_t(const char *fmt, ...) __printflike(1,2); | ||
| 220 | |||
| 221 | typedef struct malloc_introspection_t { | ||
| 222 | 	kern_return_t (* MALLOC_INTROSPECT_FN_PTR(enumerator))(task_t task, void *, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder); /* enumerates all the malloc pointers in use */ | ||
| 223 | 	size_t	(* MALLOC_INTROSPECT_FN_PTR(good_size))(malloc_zone_t *zone, size_t size); | ||
| 224 | 	boolean_t 	(* MALLOC_INTROSPECT_FN_PTR(check))(malloc_zone_t *zone); /* Consistency checker */ | ||
| 225 | 	void 	(* MALLOC_INTROSPECT_FN_PTR(print))(malloc_zone_t *zone, boolean_t verbose); /* Prints zone */ | ||
| 226 | 	void	(* MALLOC_INTROSPECT_FN_PTR(log))(malloc_zone_t *zone, void *address); /* Enables logging of activity */ | ||
| 227 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_lock))(malloc_zone_t *zone); /* Forces locking zone */ | ||
| 228 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_unlock))(malloc_zone_t *zone); /* Forces unlocking zone */ | ||
| 229 | 	void	(* MALLOC_INTROSPECT_FN_PTR(statistics))(malloc_zone_t *zone, malloc_statistics_t *stats); /* Fills statistics */ | ||
| 230 | 	boolean_t (* MALLOC_INTROSPECT_FN_PTR(zone_locked))(malloc_zone_t *zone); /* Are any zone locks held */ | ||
| 231 | |||
| 232 | /* Discharge checking. Present in version >= 7. */ | ||
| 233 | 	boolean_t	(* MALLOC_INTROSPECT_FN_PTR(enable_discharge_checking))(malloc_zone_t *zone); | ||
| 234 | 	void	(* MALLOC_INTROSPECT_FN_PTR(disable_discharge_checking))(malloc_zone_t *zone); | ||
| 235 | 	void	(* MALLOC_INTROSPECT_FN_PTR(discharge))(malloc_zone_t *zone, void *memory); | ||
| 236 | #ifdef __BLOCKS__ | ||
| 237 | 	void (* MALLOC_INTROSPECT_FN_PTR(enumerate_discharged_pointers))(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)); | ||
| 238 | 	#else | ||
| 239 | void	*enumerate_unavailable_without_blocks; | ||
| 240 | #endif /* __BLOCKS__ */ | ||
| 241 | 	void	(* MALLOC_INTROSPECT_FN_PTR(reinit_lock))(malloc_zone_t *zone); /* Reinitialize zone locks, called only from atfork_child handler. Present in version >= 9. */ | ||
| 242 | 	void	(* MALLOC_INTROSPECT_FN_PTR(print_task))(task_t task, unsigned level, vm_address_t zone_address, memory_reader_t reader, print_task_printer_t printer); /* debug print for another process. Present in version >= 11. */ | ||
| 243 | 	void (* MALLOC_INTROSPECT_FN_PTR(task_statistics))(task_t task, vm_address_t zone_address, memory_reader_t reader, malloc_statistics_t *stats); /* Present in version >= 12 */ | ||
| 244 | } malloc_introspection_t; | ||
| 245 | |||
| 246 | // The value of "level" when passed to print_task() that corresponds to | ||
| 247 | // verbose passed to print() | ||
| 248 | #define MALLOC_VERBOSE_PRINT_LEVEL	2 | ||
| 249 | |||
| 250 | extern void malloc_printf(const char *format, ...); | ||
| 251 | /* Convenience for logging errors and warnings; | ||
| 252 | No allocation is performed during execution of this function; | ||
| 253 | Only understands usual %p %d %s formats, and %y that expresses a number of bytes (5b,10KB,1MB...) | ||
| 254 | */ | ||
| 255 | |||
| 256 | /*********	Functions for performance tools	************/ | ||
| 257 | |||
| 258 | extern kern_return_t malloc_get_all_zones(task_t task, memory_reader_t reader, vm_address_t **addresses, unsigned *count); | ||
| 259 | /* Fills addresses and count with the addresses of the zones in task; | ||
| 260 | Note that the validity of the addresses returned correspond to the validity of the memory returned by reader */ | ||
| 261 | |||
| 262 | /*********	Debug helpers	************/ | ||
| 263 | |||
| 264 | extern void malloc_zone_print_ptr_info(void *ptr); | ||
| 265 | /* print to stdout if this pointer is in the malloc heap, free status, and size */ | ||
| 266 | |||
| 267 | extern boolean_t malloc_zone_check(malloc_zone_t *zone); | ||
| 268 | /* Checks zone is well formed; if !zone, checks all zones */ | ||
| 269 | |||
| 270 | extern void malloc_zone_print(malloc_zone_t *zone, boolean_t verbose); | ||
| 271 | /* Prints summary on zone; if !zone, prints all zones */ | ||
| 272 | |||
| 273 | extern void malloc_zone_statistics(malloc_zone_t *zone, malloc_statistics_t *stats); | ||
| 274 | /* Fills statistics for zone; if !zone, sums up all zones */ | ||
| 275 | |||
| 276 | extern void malloc_zone_log(malloc_zone_t *zone, void *address); | ||
| 277 | /* Controls logging of all activity; if !zone, for all zones; | ||
| 278 | If address==0 nothing is logged; | ||
| 279 | If address==-1 all activity is logged; | ||
| 280 | Else only the activity regarding address is logged */ | ||
| 281 | |||
| 282 | struct mstats { | ||
| 283 | size_t	bytes_total; | ||
| 284 | size_t	chunks_used; | ||
| 285 | size_t	bytes_used; | ||
| 286 | size_t	chunks_free; | ||
| 287 | size_t	bytes_free; | ||
| 288 | }; | ||
| 289 | |||
| 290 | extern struct mstats mstats(void); | ||
| 291 | |||
| 292 | extern boolean_t malloc_zone_enable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 293 | /* Increment the discharge checking enabled counter for a zone. Returns true if the zone supports checking, false if it does not. */ | ||
| 294 | |||
| 295 | extern void malloc_zone_disable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 296 | /* Decrement the discharge checking enabled counter for a zone. */ | ||
| 297 | |||
| 298 | extern void malloc_zone_discharge(malloc_zone_t *zone, void *memory) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 299 | /* Register memory that the programmer expects to be freed soon. | ||
| 300 | zone may be NULL in which case the zone is determined using malloc_zone_from_ptr(). | ||
| 301 | If discharge checking is off for the zone this function is a no-op. */ | ||
| 302 | |||
| 303 | #ifdef __BLOCKS__ | ||
| 304 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 305 | /* Calls report_discharged for each block that was registered using malloc_zone_discharge() but has not yet been freed. | ||
| 306 | info is used to provide zone defined information about the memory block. | ||
| 307 | If zone is NULL then the enumeration covers all zones. */ | ||
| 308 | #else | ||
| 309 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 310 | #endif /* __BLOCKS__ */ | ||
| 311 | |||
| 312 | __END_DECLS | ||
| 313 | |||
| 314 | #endif /* _MALLOC_MALLOC_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/net/if.h+6-7| ... | @@ -63,21 +63,24 @@ | ... | @@ -63,21 +63,24 @@ |
| 63 | #ifndef _NET_IF_H_ | 63 | #ifndef _NET_IF_H_ |
| 64 | #define _NET_IF_H_ | 64 | #define _NET_IF_H_ |
| 65 | 65 | ||
| 66 | #include <sys/cdefs.h> | ||
| 67 | #include <net/net_kev.h> | ||
| 68 | |||
| 69 | #define IF_NAMESIZE 16 | 66 | #define IF_NAMESIZE 16 |
| 70 | 67 | ||
| 71 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | 68 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) |
| 69 | #include <sys/cdefs.h> | ||
| 72 | #include <sys/appleapiopts.h> | 70 | #include <sys/appleapiopts.h> |
| 73 | #ifdef __APPLE__ | 71 | #ifdef __APPLE__ |
| 74 | 72 | ||
| 75 | #include <net/if_var.h> | 73 | #include <net/if_var.h> |
| 74 | #include <net/net_kev.h> | ||
| 76 | #include <sys/types.h> | 75 | #include <sys/types.h> |
| 77 | #include <sys/socket.h> | 76 | #include <sys/socket.h> |
| 78 | 77 | ||
| 79 | #endif | 78 | #endif |
| 80 | 79 | ||
| 80 | #ifndef IFNAMSIZ | ||
| 81 | #define IFNAMSIZ IF_NAMESIZE | ||
| 82 | #endif | ||
| 83 | |||
| 81 | struct if_clonereq { | 84 | struct if_clonereq { |
| 82 | 	int ifcr_total; /* total cloners (out) */ | 85 | 	int ifcr_total; /* total cloners (out) */ |
| 83 | 	int ifcr_count; /* room for this many in user buffer */ | 86 | 	int ifcr_count; /* room for this many in user buffer */ |
| ... | @@ -285,9 +288,6 @@ struct ifkpi { | ... | @@ -285,9 +288,6 @@ struct ifkpi { |
| 285 | * remainder may be interface specific. | 288 | * remainder may be interface specific. |
| 286 | */ | 289 | */ |
| 287 | struct ifreq { | 290 | struct ifreq { |
| 288 | #ifndef IFNAMSIZ | ||
| 289 | #define IFNAMSIZ IF_NAMESIZE | ||
| 290 | #endif | ||
| 291 | 	char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ | 291 | 	char ifr_name[IFNAMSIZ]; /* if name, e.g. "en0" */ |
| 292 | 	union { | 292 | 	union { |
| 293 | 		struct sockaddr ifru_addr; | 293 | 		struct sockaddr ifru_addr; |
| ... | @@ -371,7 +371,6 @@ struct ifmediareq { | ... | @@ -371,7 +371,6 @@ struct ifmediareq { |
| 371 | #pragma pack() | 371 | #pragma pack() |
| 372 | 372 | ||
| 373 | 373 | ||
| 374 | |||
| 375 | #pragma pack(4) | 374 | #pragma pack(4) |
| 376 | struct ifdrv { | 375 | struct ifdrv { |
| 377 | 	char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */ | 376 | 	char ifd_name[IFNAMSIZ]; /* if name, e.g. "en0" */ |
lib/libc/include/any-macos.11-any/net/if_var.h+119-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
| ... | @@ -222,6 +222,124 @@ struct if_data64 { | ... | @@ -222,6 +222,124 @@ struct if_data64 { |
| 222 | }; | 222 | }; |
| 223 | 223 | ||
| 224 | 224 | ||
| 225 | #if defined (PRIVATE) || defined (DRIVERKIT_PRIVATE) | ||
| 226 | /* | ||
| 227 | * This structure is used to define the parameters for advisory notifications | ||
| 228 | * on an interface. | ||
| 229 | */ | ||
| 230 | #pragma pack(push, 1) | ||
| 231 | struct ifnet_interface_advisory { | ||
| 232 | 	/* The current structure version */ | ||
| 233 | 	uint8_t version; | ||
| 234 | #define IF_INTERFACE_ADVISORY_VERSION_1 0x1 | ||
| 235 | #define IF_INTERFACE_ADVISORY_VERSION_CURRENT IF_INTERFACE_ADVISORY_VERSION_1 | ||
| 236 | 	/* Specifies if the advisory is for transmit or receive path */ | ||
| 237 | 	uint8_t direction; | ||
| 238 | #define IF_INTERFACE_ADVISORY_DIRECTION_TX 0x1 | ||
| 239 | #define IF_INTERFACE_ADVISORY_DIRECTION_RX 0x2 | ||
| 240 | 	/* reserved for future use */ | ||
| 241 | 	uint16_t _reserved; | ||
| 242 | 	/* | ||
| 243 | 	 * suggestion for data rate change to keep the latency low. | ||
| 244 | 	 * unit: bits per second (bps) | ||
| 245 | 	 * NOTE: if the interface cannot provide suggestions in terms of bps, | ||
| 246 | 	 * it should use the following values: | ||
| 247 | 	 * INT32_MAX : ramp up | ||
| 248 | 	 * INT32_MIN : ramp down | ||
| 249 | 	 * 0 : neutral | ||
| 250 | 	 */ | ||
| 251 | #define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_UP INT32_MAX | ||
| 252 | #define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_DOWN INT32_MIN | ||
| 253 | #define IF_INTERFACE_ADVISORY_RATE_SUGGESTION_RAMP_NEUTRAL 0 | ||
| 254 | 	int32_t rate_trend_suggestion; | ||
| 255 | 	/* | ||
| 256 | 	 * Time of the issue of advisory. | ||
| 257 | 	 * Timestamp should be in the host domain. | ||
| 258 | 	 * unit: mach absolute time | ||
| 259 | 	 */ | ||
| 260 | 	uint64_t timestamp; | ||
| 261 | 	/* | ||
| 262 | 	 * Maximum theoretical bandwidth of the interface. | ||
| 263 | 	 * unit: bits per second (bps) | ||
| 264 | 	 */ | ||
| 265 | 	uint64_t max_bandwidth; | ||
| 266 | 	/* | ||
| 267 | 	 * Total bytes sent or received on the interface. | ||
| 268 | 	 * wrap around possible and the application should account for that. | ||
| 269 | 	 * unit: byte | ||
| 270 | 	 */ | ||
| 271 | 	uint64_t total_byte_count; | ||
| 272 | 	/* | ||
| 273 | 	 * average throughput observed at the driver stack. | ||
| 274 | 	 * unit: bits per second (bps) | ||
| 275 | 	 */ | ||
| 276 | 	uint64_t average_throughput; | ||
| 277 | 	/* | ||
| 278 | 	 * flushable queue size at the driver. | ||
| 279 | 	 * should be set to UINT32_MAX if not available. | ||
| 280 | 	 * unit: byte | ||
| 281 | 	 */ | ||
| 282 | 	uint32_t flushable_queue_size; | ||
| 283 | 	/* | ||
| 284 | 	 * non flushable queue size at the driver. | ||
| 285 | 	 * should be set to UINT32_MAX if not available. | ||
| 286 | 	 * unit: byte | ||
| 287 | 	 */ | ||
| 288 | 	uint32_t non_flushable_queue_size; | ||
| 289 | 	/* | ||
| 290 | 	 * average delay observed at the interface. | ||
| 291 | 	 * unit: milliseconds (ms) | ||
| 292 | 	 */ | ||
| 293 | 	uint32_t average_delay; | ||
| 294 | 	/* | ||
| 295 | 	 * Current frequency band (enumeration). | ||
| 296 | 	 */ | ||
| 297 | #define IF_INTERFACE_ADVISORY_FREQ_BAND_NOT_AVAIL 0 | ||
| 298 | #define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_24GHZ 1 | ||
| 299 | #define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_5GHZ 2 | ||
| 300 | #define IF_INTERFACE_ADVISORY_FREQ_BAND_WIFI_6GHZ 3 | ||
| 301 | 	uint8_t frequency_band; | ||
| 302 | 	/* | ||
| 303 | 	 * Intermittent WiFi state [true(1)/false(0)] | ||
| 304 | 	 */ | ||
| 305 | 	uint8_t intermittent_state; | ||
| 306 | 	/* | ||
| 307 | 	 * Estimated period for which intermittent state is expected to last. | ||
| 308 | 	 * 1 tick -> 1 ms UNDEF => UINT16_MAX | ||
| 309 | 	 */ | ||
| 310 | 	uint16_t estimated_intermittent_period; | ||
| 311 | 	/* | ||
| 312 | 	 * Expected wifi outage period during intermittent state | ||
| 313 | 	 * 1 tick -> 1 ms UNDEF => UINT16_MAX | ||
| 314 | 	 */ | ||
| 315 | 	uint16_t single_outage_period; | ||
| 316 | |||
| 317 | 	/* | ||
| 318 | 	 * WiFi-BT coexistence, 1-ON, 0-OFF | ||
| 319 | 	 */ | ||
| 320 | 	uint8_t bt_coex; | ||
| 321 | 	/* | ||
| 322 | 	 * on scale of 1 to 5 | ||
| 323 | 	 */ | ||
| 324 | 	uint8_t quality_score_delay; | ||
| 325 | 	/* | ||
| 326 | 	 * on scale of 1 to 5 | ||
| 327 | 	 */ | ||
| 328 | 	uint8_t quality_score_loss; | ||
| 329 | 	/* | ||
| 330 | 	 * on scale of 1 to 5 | ||
| 331 | 	 */ | ||
| 332 | 	uint8_t quality_score_channel; | ||
| 333 | } __attribute__((aligned(sizeof(uint64_t)))); | ||
| 334 | #pragma pack(pop) | ||
| 335 | |||
| 336 | #else | ||
| 337 | |||
| 338 | struct ifnet_interface_advisory; | ||
| 339 | |||
| 340 | #endif /* defined (PRIVATE) || defined (DRIVERKIT_PRIVATE) */ | ||
| 341 | |||
| 342 | |||
| 225 | #pragma pack() | 343 | #pragma pack() |
| 226 | 344 | ||
| 227 | /* | 345 | /* |
lib/libc/include/any-macos.11-any/net/route.h created+258| ... | @@ -0,0 +1,258 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Copyright (c) 1980, 1986, 1993 | ||
| 30 | *	The Regents of the University of California. All rights reserved. | ||
| 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 | *	@(#)route.h	8.3 (Berkeley) 4/19/94 | ||
| 61 | * $FreeBSD: src/sys/net/route.h,v 1.36.2.1 2000/08/16 06:14:23 jayanth Exp $ | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _NET_ROUTE_H_ | ||
| 65 | #define _NET_ROUTE_H_ | ||
| 66 | #include <sys/appleapiopts.h> | ||
| 67 | #include <stdint.h> | ||
| 68 | #include <sys/types.h> | ||
| 69 | #include <sys/socket.h> | ||
| 70 | |||
| 71 | /* | ||
| 72 | * These numbers are used by reliable protocols for determining | ||
| 73 | * retransmission behavior and are included in the routing structure. | ||
| 74 | */ | ||
| 75 | struct rt_metrics { | ||
| 76 | 	u_int32_t rmx_locks; /* Kernel leaves these values alone */ | ||
| 77 | 	u_int32_t rmx_mtu; /* MTU for this path */ | ||
| 78 | 	u_int32_t rmx_hopcount; /* max hops expected */ | ||
| 79 | 	int32_t rmx_expire; /* lifetime for route, e.g. redirect */ | ||
| 80 | 	u_int32_t rmx_recvpipe; /* inbound delay-bandwidth product */ | ||
| 81 | 	u_int32_t rmx_sendpipe; /* outbound delay-bandwidth product */ | ||
| 82 | 	u_int32_t rmx_ssthresh; /* outbound gateway buffer limit */ | ||
| 83 | 	u_int32_t rmx_rtt; /* estimated round trip time */ | ||
| 84 | 	u_int32_t rmx_rttvar; /* estimated rtt variance */ | ||
| 85 | 	u_int32_t rmx_pksent; /* packets sent using this route */ | ||
| 86 | 	u_int32_t rmx_state; /* route state */ | ||
| 87 | 	u_int32_t rmx_filler[3]; /* will be used for TCP's peer-MSS cache */ | ||
| 88 | }; | ||
| 89 | |||
| 90 | /* | ||
| 91 | * rmx_rtt and rmx_rttvar are stored as microseconds; | ||
| 92 | */ | ||
| 93 | #define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */ | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | #define RTF_UP 0x1 /* route usable */ | ||
| 98 | #define RTF_GATEWAY 0x2 /* destination is a gateway */ | ||
| 99 | #define RTF_HOST 0x4 /* host entry (net otherwise) */ | ||
| 100 | #define RTF_REJECT 0x8 /* host or net unreachable */ | ||
| 101 | #define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */ | ||
| 102 | #define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */ | ||
| 103 | #define RTF_DONE 0x40 /* message confirmed */ | ||
| 104 | #define RTF_DELCLONE 0x80 /* delete cloned route */ | ||
| 105 | #define RTF_CLONING 0x100 /* generate new routes on use */ | ||
| 106 | #define RTF_XRESOLVE 0x200 /* external daemon resolves name */ | ||
| 107 | #define RTF_LLINFO 0x400 /* DEPRECATED - exists ONLY for backward | ||
| 108 | 	 * compatibility */ | ||
| 109 | #define RTF_LLDATA 0x400 /* used by apps to add/del L2 entries */ | ||
| 110 | #define RTF_STATIC 0x800 /* manually added */ | ||
| 111 | #define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ | ||
| 112 | #define RTF_NOIFREF 0x2000 /* not eligible for RTF_IFREF */ | ||
| 113 | #define RTF_PROTO2 0x4000 /* protocol specific routing flag */ | ||
| 114 | #define RTF_PROTO1 0x8000 /* protocol specific routing flag */ | ||
| 115 | |||
| 116 | #define RTF_PRCLONING 0x10000 /* protocol requires cloning */ | ||
| 117 | #define RTF_WASCLONED 0x20000 /* route generated through cloning */ | ||
| 118 | #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ | ||
| 119 | /* 0x80000 unused */ | ||
| 120 | #define RTF_PINNED 0x100000 /* future use */ | ||
| 121 | #define RTF_LOCAL 0x200000 /* route represents a local address */ | ||
| 122 | #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ | ||
| 123 | #define RTF_MULTICAST 0x800000 /* route represents a mcast address */ | ||
| 124 | #define RTF_IFSCOPE 0x1000000 /* has valid interface scope */ | ||
| 125 | #define RTF_CONDEMNED 0x2000000 /* defunct; no longer modifiable */ | ||
| 126 | #define RTF_IFREF 0x4000000 /* route holds a ref to interface */ | ||
| 127 | #define RTF_PROXY 0x8000000 /* proxying, no interface scope */ | ||
| 128 | #define RTF_ROUTER 0x10000000 /* host is a router */ | ||
| 129 | #define RTF_DEAD 0x20000000 /* Route entry is being freed */ | ||
| 130 | #define RTF_GLOBAL 0x40000000 /* route to destination of the global internet */ | ||
| 131 | /* 0x80000000 unassigned */ | ||
| 132 | |||
| 133 | #define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */ | ||
| 134 | #define RTF_BITS \ | ||
| 135 | 	"\020\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" \ | ||
| 136 | 	"\10DELCLONE\11CLONING\12XRESOLVE\13LLINFO\14STATIC\15BLACKHOLE" \ | ||
| 137 | 	"\16NOIFREF\17PROTO2\20PROTO1\21PRCLONING\22WASCLONED\23PROTO3" \ | ||
| 138 | 	"\25PINNED\26LOCAL\27BROADCAST\30MULTICAST\31IFSCOPE\32CONDEMNED" \ | ||
| 139 | 	"\33IFREF\34PROXY\35ROUTER\37GLOBAL" | ||
| 140 | |||
| 141 | #define IS_DIRECT_HOSTROUTE(rt) \ | ||
| 142 | 	(((rt)->rt_flags & (RTF_HOST | RTF_GATEWAY)) == RTF_HOST) | ||
| 143 | /* | ||
| 144 | * Routing statistics. | ||
| 145 | */ | ||
| 146 | struct rtstat { | ||
| 147 | 	short rts_badredirect; /* bogus redirect calls */ | ||
| 148 | 	short rts_dynamic; /* routes created by redirects */ | ||
| 149 | 	short rts_newgateway; /* routes modified by redirects */ | ||
| 150 | 	short rts_unreach; /* lookups which failed */ | ||
| 151 | 	short rts_wildcard; /* lookups satisfied by a wildcard */ | ||
| 152 | 	short rts_badrtgwroute; /* route to gateway is not direct */ | ||
| 153 | }; | ||
| 154 | |||
| 155 | /* | ||
| 156 | * Structures for routing messages. | ||
| 157 | */ | ||
| 158 | struct rt_msghdr { | ||
| 159 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 160 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 161 | 	u_char rtm_type; /* message type */ | ||
| 162 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 163 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 164 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 165 | 	pid_t rtm_pid; /* identify sender */ | ||
| 166 | 	int rtm_seq; /* for sender to identify action */ | ||
| 167 | 	int rtm_errno; /* why failed */ | ||
| 168 | 	int rtm_use; /* from rtentry */ | ||
| 169 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 170 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 171 | }; | ||
| 172 | |||
| 173 | struct rt_msghdr2 { | ||
| 174 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 175 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 176 | 	u_char rtm_type; /* message type */ | ||
| 177 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 178 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 179 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 180 | 	int32_t rtm_refcnt; /* reference count */ | ||
| 181 | 	int rtm_parentflags; /* flags of the parent route */ | ||
| 182 | 	int rtm_reserved; /* reserved field set to 0 */ | ||
| 183 | 	int rtm_use; /* from rtentry */ | ||
| 184 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 185 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 186 | }; | ||
| 187 | |||
| 188 | |||
| 189 | #define RTM_VERSION 5 /* Up the ante and ignore older versions */ | ||
| 190 | |||
| 191 | /* | ||
| 192 | * Message types. | ||
| 193 | */ | ||
| 194 | #define RTM_ADD 0x1 /* Add Route */ | ||
| 195 | #define RTM_DELETE 0x2 /* Delete Route */ | ||
| 196 | #define RTM_CHANGE 0x3 /* Change Metrics or flags */ | ||
| 197 | #define RTM_GET 0x4 /* Report Metrics */ | ||
| 198 | #define RTM_LOSING 0x5 /* RTM_LOSING is no longer generated by xnu | ||
| 199 | 	 * and is deprecated */ | ||
| 200 | #define RTM_REDIRECT 0x6 /* Told to use different route */ | ||
| 201 | #define RTM_MISS 0x7 /* Lookup failed on this address */ | ||
| 202 | #define RTM_LOCK 0x8 /* fix specified metrics */ | ||
| 203 | #define RTM_OLDADD 0x9 /* caused by SIOCADDRT */ | ||
| 204 | #define RTM_OLDDEL 0xa /* caused by SIOCDELRT */ | ||
| 205 | #define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */ | ||
| 206 | #define RTM_NEWADDR 0xc /* address being added to iface */ | ||
| 207 | #define RTM_DELADDR 0xd /* address being removed from iface */ | ||
| 208 | #define RTM_IFINFO 0xe /* iface going up/down etc. */ | ||
| 209 | #define RTM_NEWMADDR 0xf /* mcast group membership being added to if */ | ||
| 210 | #define RTM_DELMADDR 0x10 /* mcast group membership being deleted */ | ||
| 211 | #define RTM_IFINFO2 0x12 /* */ | ||
| 212 | #define RTM_NEWMADDR2 0x13 /* */ | ||
| 213 | #define RTM_GET2 0x14 /* */ | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Bitmask values for rtm_inits and rmx_locks. | ||
| 217 | */ | ||
| 218 | #define RTV_MTU 0x1 /* init or lock _mtu */ | ||
| 219 | #define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */ | ||
| 220 | #define RTV_EXPIRE 0x4 /* init or lock _expire */ | ||
| 221 | #define RTV_RPIPE 0x8 /* init or lock _recvpipe */ | ||
| 222 | #define RTV_SPIPE 0x10 /* init or lock _sendpipe */ | ||
| 223 | #define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */ | ||
| 224 | #define RTV_RTT 0x40 /* init or lock _rtt */ | ||
| 225 | #define RTV_RTTVAR 0x80 /* init or lock _rttvar */ | ||
| 226 | |||
| 227 | /* | ||
| 228 | * Bitmask values for rtm_addrs. | ||
| 229 | */ | ||
| 230 | #define RTA_DST 0x1 /* destination sockaddr present */ | ||
| 231 | #define RTA_GATEWAY 0x2 /* gateway sockaddr present */ | ||
| 232 | #define RTA_NETMASK 0x4 /* netmask sockaddr present */ | ||
| 233 | #define RTA_GENMASK 0x8 /* cloning mask sockaddr present */ | ||
| 234 | #define RTA_IFP 0x10 /* interface name sockaddr present */ | ||
| 235 | #define RTA_IFA 0x20 /* interface addr sockaddr present */ | ||
| 236 | #define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */ | ||
| 237 | #define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Index offsets for sockaddr array for alternate internal encoding. | ||
| 241 | */ | ||
| 242 | #define RTAX_DST 0 /* destination sockaddr present */ | ||
| 243 | #define RTAX_GATEWAY 1 /* gateway sockaddr present */ | ||
| 244 | #define RTAX_NETMASK 2 /* netmask sockaddr present */ | ||
| 245 | #define RTAX_GENMASK 3 /* cloning mask sockaddr present */ | ||
| 246 | #define RTAX_IFP 4 /* interface name sockaddr present */ | ||
| 247 | #define RTAX_IFA 5 /* interface addr sockaddr present */ | ||
| 248 | #define RTAX_AUTHOR 6 /* sockaddr for author of redirect */ | ||
| 249 | #define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 250 | #define RTAX_MAX 8 /* size of array to allocate */ | ||
| 251 | |||
| 252 | struct rt_addrinfo { | ||
| 253 | 	int rti_addrs; | ||
| 254 | 	struct sockaddr *rti_info[RTAX_MAX]; | ||
| 255 | }; | ||
| 256 | |||
| 257 | |||
| 258 | #endif /* _NET_ROUTE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/netinet6/in6.h deleted-681| ... | @@ -1,681 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | ||
| 31 | * All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. Neither the name of the project nor the names of its contributors | ||
| 42 | * may be used to endorse or promote products derived from this software | ||
| 43 | * without specific prior written permission. | ||
| 44 | * | ||
| 45 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | ||
| 46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | ||
| 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 55 | * SUCH DAMAGE. | ||
| 56 | */ | ||
| 57 | |||
| 58 | /* | ||
| 59 | * Copyright (c) 1982, 1986, 1990, 1993 | ||
| 60 | *	The Regents of the University of California. All rights reserved. | ||
| 61 | * | ||
| 62 | * Redistribution and use in source and binary forms, with or without | ||
| 63 | * modification, are permitted provided that the following conditions | ||
| 64 | * are met: | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 68 | * notice, this list of conditions and the following disclaimer in the | ||
| 69 | * documentation and/or other materials provided with the distribution. | ||
| 70 | * 3. All advertising materials mentioning features or use of this software | ||
| 71 | * must display the following acknowledgement: | ||
| 72 | *	This product includes software developed by the University of | ||
| 73 | *	California, Berkeley and its contributors. | ||
| 74 | * 4. Neither the name of the University nor the names of its contributors | ||
| 75 | * may be used to endorse or promote products derived from this software | ||
| 76 | * without specific prior written permission. | ||
| 77 | * | ||
| 78 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 79 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 80 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 81 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 82 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 83 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 84 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 85 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 86 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 87 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 88 | * SUCH DAMAGE. | ||
| 89 | * | ||
| 90 | *	@(#)in.h	8.3 (Berkeley) 1/3/94 | ||
| 91 | */ | ||
| 92 | |||
| 93 | #ifndef __KAME_NETINET_IN_H_INCLUDED_ | ||
| 94 | #error "do not include netinet6/in6.h directly, include netinet/in.h. " \ | ||
| 95 | " see RFC2553" | ||
| 96 | #endif | ||
| 97 | |||
| 98 | #ifndef _NETINET6_IN6_H_ | ||
| 99 | #define _NETINET6_IN6_H_ | ||
| 100 | #include <sys/appleapiopts.h> | ||
| 101 | |||
| 102 | #include <sys/_types.h> | ||
| 103 | #include <sys/_types/_sa_family_t.h> | ||
| 104 | |||
| 105 | /* | ||
| 106 | * Identification of the network protocol stack | ||
| 107 | * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE | ||
| 108 | * has the table of implementation/integration differences. | ||
| 109 | */ | ||
| 110 | #define __KAME__ | ||
| 111 | #define __KAME_VERSION "2009/apple-darwin" | ||
| 112 | |||
| 113 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 114 | /* | ||
| 115 | * Local port number conventions: | ||
| 116 | * | ||
| 117 | * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), | ||
| 118 | * unless a kernel is compiled with IPNOPRIVPORTS defined. | ||
| 119 | * | ||
| 120 | * When a user does a bind(2) or connect(2) with a port number of zero, | ||
| 121 | * a non-conflicting local port address is chosen. | ||
| 122 | * | ||
| 123 | * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although | ||
| 124 | * that is settable by sysctl(3); net.inet.ip.anonportmin and | ||
| 125 | * net.inet.ip.anonportmax respectively. | ||
| 126 | * | ||
| 127 | * A user may set the IPPROTO_IP option IP_PORTRANGE to change this | ||
| 128 | * default assignment range. | ||
| 129 | * | ||
| 130 | * The value IP_PORTRANGE_DEFAULT causes the default behavior. | ||
| 131 | * | ||
| 132 | * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, | ||
| 133 | * and exists only for FreeBSD compatibility purposes. | ||
| 134 | * | ||
| 135 | * The value IP_PORTRANGE_LOW changes the range to the "low" are | ||
| 136 | * that is (by convention) restricted to privileged processes. | ||
| 137 | * This convention is based on "vouchsafe" principles only. | ||
| 138 | * It is only secure if you trust the remote host to restrict these ports. | ||
| 139 | * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. | ||
| 140 | */ | ||
| 141 | |||
| 142 | #define IPV6PORT_RESERVED 1024 | ||
| 143 | #define IPV6PORT_ANONMIN 49152 | ||
| 144 | #define IPV6PORT_ANONMAX 65535 | ||
| 145 | #define IPV6PORT_RESERVEDMIN 600 | ||
| 146 | #define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1) | ||
| 147 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 148 | |||
| 149 | /* | ||
| 150 | * IPv6 address | ||
| 151 | */ | ||
| 152 | typedef struct in6_addr { | ||
| 153 | 	union { | ||
| 154 | 		__uint8_t __u6_addr8[16]; | ||
| 155 | 		__uint16_t __u6_addr16[8]; | ||
| 156 | 		__uint32_t __u6_addr32[4]; | ||
| 157 | 	} __u6_addr; /* 128-bit IP6 address */ | ||
| 158 | } in6_addr_t; | ||
| 159 | |||
| 160 | #define s6_addr __u6_addr.__u6_addr8 | ||
| 161 | |||
| 162 | #define INET6_ADDRSTRLEN 46 | ||
| 163 | |||
| 164 | /* | ||
| 165 | * Socket address for IPv6 | ||
| 166 | */ | ||
| 167 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 168 | #define SIN6_LEN | ||
| 169 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 170 | struct sockaddr_in6 { | ||
| 171 | 	__uint8_t sin6_len; /* length of this struct(sa_family_t) */ | ||
| 172 | 	sa_family_t sin6_family; /* AF_INET6 (sa_family_t) */ | ||
| 173 | 	in_port_t sin6_port; /* Transport layer port # (in_port_t) */ | ||
| 174 | 	__uint32_t sin6_flowinfo; /* IP6 flow information */ | ||
| 175 | 	struct in6_addr sin6_addr; /* IP6 address */ | ||
| 176 | 	__uint32_t sin6_scope_id; /* scope zone index */ | ||
| 177 | }; | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | /* | ||
| 184 | * Definition of some useful macros to handle IP6 addresses | ||
| 185 | */ | ||
| 186 | #define IN6ADDR_ANY_INIT \ | ||
| 187 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 188 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 189 | #define IN6ADDR_LOOPBACK_INIT \ | ||
| 190 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 191 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 192 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 193 | #define IN6ADDR_NODELOCAL_ALLNODES_INIT \ | ||
| 194 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 195 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 196 | #define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \ | ||
| 197 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 198 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 199 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | ||
| 200 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 201 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 202 | #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ | ||
| 203 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 204 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}} | ||
| 205 | #define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \ | ||
| 206 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 207 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}} | ||
| 208 | #define IN6ADDR_V4MAPPED_INIT \ | ||
| 209 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 210 | 	 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 211 | #define IN6ADDR_MULTICAST_PREFIX IN6MASK8 | ||
| 212 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 213 | |||
| 214 | extern const struct in6_addr in6addr_any; | ||
| 215 | extern const struct in6_addr in6addr_loopback; | ||
| 216 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 217 | extern const struct in6_addr in6addr_nodelocal_allnodes; | ||
| 218 | extern const struct in6_addr in6addr_linklocal_allnodes; | ||
| 219 | extern const struct in6_addr in6addr_linklocal_allrouters; | ||
| 220 | extern const struct in6_addr in6addr_linklocal_allv2routers; | ||
| 221 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 222 | |||
| 223 | /* | ||
| 224 | * Equality | ||
| 225 | * NOTE: Some of kernel programming environment (for example, openbsd/sparc) | ||
| 226 | * does not supply memcmp(). For userland memcmp() is preferred as it is | ||
| 227 | * in ANSI standard. | ||
| 228 | */ | ||
| 229 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 230 | #define IN6_ARE_ADDR_EQUAL(a, b) \ | ||
| 231 | 	(memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof (struct in6_addr)) \ | ||
| 232 | 	== 0) | ||
| 233 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 234 | |||
| 235 | |||
| 236 | /* | ||
| 237 | * Unspecified | ||
| 238 | */ | ||
| 239 | #define IN6_IS_ADDR_UNSPECIFIED(a) \ | ||
| 240 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 241 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 242 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 243 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0)) | ||
| 244 | |||
| 245 | /* | ||
| 246 | * Loopback | ||
| 247 | */ | ||
| 248 | #define IN6_IS_ADDR_LOOPBACK(a) \ | ||
| 249 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 250 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 251 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 252 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1))) | ||
| 253 | |||
| 254 | /* | ||
| 255 | * IPv4 compatible | ||
| 256 | */ | ||
| 257 | #define IN6_IS_ADDR_V4COMPAT(a) \ | ||
| 258 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 259 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 260 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 261 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \ | ||
| 262 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1))) | ||
| 263 | |||
| 264 | /* | ||
| 265 | * Mapped | ||
| 266 | */ | ||
| 267 | #define IN6_IS_ADDR_V4MAPPED(a) \ | ||
| 268 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 269 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 270 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == \ | ||
| 271 | 	ntohl(0x0000ffff))) | ||
| 272 | |||
| 273 | /* | ||
| 274 | * 6to4 | ||
| 275 | */ | ||
| 276 | #define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002) | ||
| 277 | |||
| 278 | /* | ||
| 279 | * KAME Scope Values | ||
| 280 | */ | ||
| 281 | |||
| 282 | #define __IPV6_ADDR_SCOPE_NODELOCAL 0x01 | ||
| 283 | #define __IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 | ||
| 284 | #define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02 | ||
| 285 | #define __IPV6_ADDR_SCOPE_SITELOCAL 0x05 | ||
| 286 | #define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */ | ||
| 287 | #define __IPV6_ADDR_SCOPE_GLOBAL 0x0e | ||
| 288 | |||
| 289 | /* | ||
| 290 | * Unicast Scope | ||
| 291 | * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). | ||
| 292 | */ | ||
| 293 | #define IN6_IS_ADDR_LINKLOCAL(a) \ | ||
| 294 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) | ||
| 295 | #define IN6_IS_ADDR_SITELOCAL(a) \ | ||
| 296 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Multicast | ||
| 300 | */ | ||
| 301 | #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) | ||
| 302 | |||
| 303 | #define IPV6_ADDR_MC_FLAGS(a) ((a)->s6_addr[1] & 0xf0) | ||
| 304 | |||
| 305 | #define IPV6_ADDR_MC_FLAGS_TRANSIENT 0x10 | ||
| 306 | #define IPV6_ADDR_MC_FLAGS_PREFIX 0x20 | ||
| 307 | #define IPV6_ADDR_MC_FLAGS_UNICAST_BASED (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX) | ||
| 308 | |||
| 309 | #define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a) \ | ||
| 310 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 311 | 	(IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED)) | ||
| 312 | |||
| 313 | /* | ||
| 314 | * Unique Local IPv6 Unicast Addresses (per RFC 4193) | ||
| 315 | */ | ||
| 316 | #define IN6_IS_ADDR_UNIQUE_LOCAL(a) \ | ||
| 317 | 	(((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd)) | ||
| 318 | |||
| 319 | #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * Multicast Scope | ||
| 323 | */ | ||
| 324 | #define IN6_IS_ADDR_MC_NODELOCAL(a) \ | ||
| 325 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 326 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL)) | ||
| 327 | #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ | ||
| 328 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 329 | 	(IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) && \ | ||
| 330 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL)) | ||
| 331 | #define IN6_IS_ADDR_MC_SITELOCAL(a) \ | ||
| 332 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 333 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) | ||
| 334 | #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ | ||
| 335 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 336 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) | ||
| 337 | #define IN6_IS_ADDR_MC_GLOBAL(a) \ | ||
| 338 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 339 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL)) | ||
| 340 | |||
| 341 | |||
| 342 | |||
| 343 | |||
| 344 | /* | ||
| 345 | * Options for use with [gs]etsockopt at the IPV6 level. | ||
| 346 | * First word of comment is data type; bool is stored in int. | ||
| 347 | */ | ||
| 348 | /* no hdrincl */ | ||
| 349 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 350 | /* | ||
| 351 | * RFC 3542 define the following socket options in a manner incompatible | ||
| 352 | * with RFC 2292: | ||
| 353 | * IPV6_PKTINFO | ||
| 354 | * IPV6_HOPLIMIT | ||
| 355 | * IPV6_NEXTHOP | ||
| 356 | * IPV6_HOPOPTS | ||
| 357 | * IPV6_DSTOPTS | ||
| 358 | * IPV6_RTHDR | ||
| 359 | * | ||
| 360 | * To use the new IPv6 Sockets options introduced by RFC 3542 | ||
| 361 | * the constant __APPLE_USE_RFC_3542 must be defined before | ||
| 362 | * including <netinet/in.h> | ||
| 363 | * | ||
| 364 | * To use the old IPv6 Sockets options from RFC 2292 | ||
| 365 | * the constant __APPLE_USE_RFC_2292 must be defined before | ||
| 366 | * including <netinet/in.h> | ||
| 367 | * | ||
| 368 | * Note that eventually RFC 3542 is going to be the | ||
| 369 | * default and RFC 2292 will be obsolete. | ||
| 370 | */ | ||
| 371 | |||
| 372 | #if defined(__APPLE_USE_RFC_3542) && defined(__APPLE_USE_RFC_2292) | ||
| 373 | #error "__APPLE_USE_RFC_3542 and __APPLE_USE_RFC_2292 cannot be both defined" | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #if 0 /* the followings are relic in IPv4 and hence are disabled */ | ||
| 377 | #define IPV6_OPTIONS 1 /* buf/ip6_opts; set/get IP6 options */ | ||
| 378 | #define IPV6_RECVOPTS 5 /* bool; receive all IP6 opts w/dgram */ | ||
| 379 | #define IPV6_RECVRETOPTS 6 /* bool; receive IP6 opts for response */ | ||
| 380 | #define IPV6_RECVDSTADDR 7 /* bool; receive IP6 dst addr w/dgram */ | ||
| 381 | #define IPV6_RETOPTS 8 /* ip6_opts; set/get IP6 options */ | ||
| 382 | #endif /* 0 */ | ||
| 383 | #define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ | ||
| 384 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 385 | #define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ | ||
| 386 | #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ | ||
| 387 | #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ | ||
| 388 | #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 mcast loopback */ | ||
| 389 | #define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */ | ||
| 390 | #define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ | ||
| 391 | |||
| 392 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 393 | #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ | ||
| 394 | #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ | ||
| 395 | #define IPV6_2292PKTINFO 19 /* bool; send/recv if, src/dst addr */ | ||
| 396 | #define IPV6_2292HOPLIMIT 20 /* bool; hop limit */ | ||
| 397 | #define IPV6_2292NEXTHOP 21 /* bool; next hop addr */ | ||
| 398 | #define IPV6_2292HOPOPTS 22 /* bool; hop-by-hop option */ | ||
| 399 | #define IPV6_2292DSTOPTS 23 /* bool; destinaion option */ | ||
| 400 | #define IPV6_2292RTHDR 24 /* ip6_rthdr: routing header */ | ||
| 401 | |||
| 402 | /* buf/cmsghdr; set/get IPv6 options [obsoleted by RFC3542] */ | ||
| 403 | #define IPV6_2292PKTOPTIONS 25 | ||
| 404 | |||
| 405 | #ifdef __APPLE_USE_RFC_2292 | ||
| 406 | #define IPV6_PKTINFO IPV6_2292PKTINFO | ||
| 407 | #define IPV6_HOPLIMIT IPV6_2292HOPLIMIT | ||
| 408 | #define IPV6_NEXTHOP IPV6_2292NEXTHOP | ||
| 409 | #define IPV6_HOPOPTS IPV6_2292HOPOPTS | ||
| 410 | #define IPV6_DSTOPTS IPV6_2292DSTOPTS | ||
| 411 | #define IPV6_RTHDR IPV6_2292RTHDR | ||
| 412 | #define IPV6_PKTOPTIONS IPV6_2292PKTOPTIONS | ||
| 413 | #endif /* __APPLE_USE_RFC_2292 */ | ||
| 414 | |||
| 415 | #define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */ | ||
| 416 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 417 | #define IPV6_V6ONLY 27 /* bool; only bind INET6 at wildcard bind */ | ||
| 418 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 419 | #define IPV6_BINDV6ONLY IPV6_V6ONLY | ||
| 420 | |||
| 421 | |||
| 422 | #if 1 /* IPSEC */ | ||
| 423 | #define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ | ||
| 424 | #endif /* 1 */ | ||
| 425 | #define IPV6_FAITH 29 /* deprecated */ | ||
| 426 | |||
| 427 | #if 1 /* IPV6FIREWALL */ | ||
| 428 | #define IPV6_FW_ADD 30 /* add a firewall rule to chain */ | ||
| 429 | #define IPV6_FW_DEL 31 /* delete a firewall rule from chain */ | ||
| 430 | #define IPV6_FW_FLUSH 32 /* flush firewall rule chain */ | ||
| 431 | #define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */ | ||
| 432 | #define IPV6_FW_GET 34 /* get entire firewall rule chain */ | ||
| 433 | #endif /* 1 */ | ||
| 434 | |||
| 435 | /* | ||
| 436 | * APPLE: NOTE the value of those 2 options is kept unchanged from | ||
| 437 | * previous version of darwin/OS X for binary compatibility reasons | ||
| 438 | * and differ from FreeBSD (values 57 and 61). See below. | ||
| 439 | */ | ||
| 440 | #define IPV6_RECVTCLASS 35 /* bool; recv traffic class values */ | ||
| 441 | #define IPV6_TCLASS 36 /* int; send traffic class value */ | ||
| 442 | |||
| 443 | #ifdef __APPLE_USE_RFC_3542 | ||
| 444 | /* new socket options introduced in RFC3542 */ | ||
| 445 | /* | ||
| 446 | * ip6_dest; send dst option before rthdr | ||
| 447 | * APPLE: Value purposely different than FreeBSD (35) to avoid | ||
| 448 | * collision with definition of IPV6_RECVTCLASS in previous | ||
| 449 | * darwin implementations | ||
| 450 | */ | ||
| 451 | #define IPV6_RTHDRDSTOPTS 57 | ||
| 452 | |||
| 453 | /* | ||
| 454 | * bool; recv if, dst addr | ||
| 455 | * APPLE: Value purposely different than FreeBSD(36) to avoid | ||
| 456 | * collision with definition of IPV6_TCLASS in previous | ||
| 457 | * darwin implementations | ||
| 458 | */ | ||
| 459 | #define IPV6_RECVPKTINFO 61 | ||
| 460 | |||
| 461 | #define IPV6_RECVHOPLIMIT 37 /* bool; recv hop limit */ | ||
| 462 | #define IPV6_RECVRTHDR 38 /* bool; recv routing header */ | ||
| 463 | #define IPV6_RECVHOPOPTS 39 /* bool; recv hop-by-hop option */ | ||
| 464 | #define IPV6_RECVDSTOPTS 40 /* bool; recv dst option after rthdr */ | ||
| 465 | |||
| 466 | #define IPV6_USE_MIN_MTU 42 /* bool; send packets at the minimum MTU */ | ||
| 467 | #define IPV6_RECVPATHMTU 43 /* bool; notify an according MTU */ | ||
| 468 | |||
| 469 | /* | ||
| 470 | * mtuinfo; get the current path MTU (sopt), 4 bytes int; | ||
| 471 | * MTU notification (cmsg) | ||
| 472 | */ | ||
| 473 | #define IPV6_PATHMTU 44 | ||
| 474 | |||
| 475 | #if 0 /* obsoleted during 2292bis -> 3542 */ | ||
| 476 | /* no data; ND reachability confirm (cmsg only/not in of RFC3542) */ | ||
| 477 | #define IPV6_REACHCONF 45 | ||
| 478 | #endif | ||
| 479 | /* more new socket options introduced in RFC3542 */ | ||
| 480 | #define IPV6_3542PKTINFO 46 /* in6_pktinfo; send if, src addr */ | ||
| 481 | #define IPV6_3542HOPLIMIT 47 /* int; send hop limit */ | ||
| 482 | #define IPV6_3542NEXTHOP 48 /* sockaddr; next hop addr */ | ||
| 483 | #define IPV6_3542HOPOPTS 49 /* ip6_hbh; send hop-by-hop option */ | ||
| 484 | #define IPV6_3542DSTOPTS 50 /* ip6_dest; send dst option befor rthdr */ | ||
| 485 | #define IPV6_3542RTHDR 51 /* ip6_rthdr; send routing header */ | ||
| 486 | |||
| 487 | #define IPV6_PKTINFO IPV6_3542PKTINFO | ||
| 488 | #define IPV6_HOPLIMIT IPV6_3542HOPLIMIT | ||
| 489 | #define IPV6_NEXTHOP IPV6_3542NEXTHOP | ||
| 490 | #define IPV6_HOPOPTS IPV6_3542HOPOPTS | ||
| 491 | #define IPV6_DSTOPTS IPV6_3542DSTOPTS | ||
| 492 | #define IPV6_RTHDR IPV6_3542RTHDR | ||
| 493 | |||
| 494 | #define IPV6_AUTOFLOWLABEL 59 /* bool; attach flowlabel automagically */ | ||
| 495 | |||
| 496 | #define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */ | ||
| 497 | |||
| 498 | /* int; prefer temporary addresses as the source address. */ | ||
| 499 | #define IPV6_PREFER_TEMPADDR 63 | ||
| 500 | |||
| 501 | /* | ||
| 502 | * The following option is private; do not use it from user applications. | ||
| 503 | * It is deliberately defined to the same value as IP_MSFILTER. | ||
| 504 | */ | ||
| 505 | #define IPV6_MSFILTER 74 /* struct __msfilterreq; */ | ||
| 506 | #endif /* __APPLE_USE_RFC_3542 */ | ||
| 507 | |||
| 508 | #define IPV6_BOUND_IF 125 /* int; set/get bound interface */ | ||
| 509 | |||
| 510 | |||
| 511 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 512 | |||
| 513 | #define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. */ | ||
| 514 | #define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. */ | ||
| 515 | #define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */ | ||
| 516 | |||
| 517 | /* | ||
| 518 | * Defaults and limits for options | ||
| 519 | */ | ||
| 520 | #define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */ | ||
| 521 | #define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ | ||
| 522 | |||
| 523 | /* | ||
| 524 | * The im6o_membership vector for each socket is now dynamically allocated at | ||
| 525 | * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized | ||
| 526 | * according to a power-of-two increment. | ||
| 527 | */ | ||
| 528 | #define IPV6_MIN_MEMBERSHIPS 31 | ||
| 529 | #define IPV6_MAX_MEMBERSHIPS 4095 | ||
| 530 | |||
| 531 | /* | ||
| 532 | * Default resource limits for IPv6 multicast source filtering. | ||
| 533 | * These may be modified by sysctl. | ||
| 534 | */ | ||
| 535 | #define IPV6_MAX_GROUP_SRC_FILTER 512 /* sources per group */ | ||
| 536 | #define IPV6_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ | ||
| 537 | |||
| 538 | /* | ||
| 539 | * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. | ||
| 540 | */ | ||
| 541 | struct ipv6_mreq { | ||
| 542 | 	struct in6_addr ipv6mr_multiaddr; | ||
| 543 | 	unsigned int ipv6mr_interface; | ||
| 544 | }; | ||
| 545 | |||
| 546 | /* | ||
| 547 | * IPV6_2292PKTINFO: Packet information(RFC2292 sec 5) | ||
| 548 | */ | ||
| 549 | struct in6_pktinfo { | ||
| 550 | 	struct in6_addr ipi6_addr; /* src/dst IPv6 address */ | ||
| 551 | 	unsigned int ipi6_ifindex; /* send/recv interface index */ | ||
| 552 | }; | ||
| 553 | |||
| 554 | /* | ||
| 555 | * Control structure for IPV6_RECVPATHMTU socket option. | ||
| 556 | */ | ||
| 557 | struct ip6_mtuinfo { | ||
| 558 | 	struct sockaddr_in6 ip6m_addr; /* or sockaddr_storage? */ | ||
| 559 | 	uint32_t ip6m_mtu; | ||
| 560 | }; | ||
| 561 | |||
| 562 | /* | ||
| 563 | * Argument for IPV6_PORTRANGE: | ||
| 564 | * - which range to search when port is unspecified at bind() or connect() | ||
| 565 | */ | ||
| 566 | #define IPV6_PORTRANGE_DEFAULT 0 /* default range */ | ||
| 567 | #define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ | ||
| 568 | #define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ | ||
| 569 | |||
| 570 | /* | ||
| 571 | * Definitions for inet6 sysctl operations. | ||
| 572 | * | ||
| 573 | * Third level is protocol number. | ||
| 574 | * Fourth level is desired variable within that protocol. | ||
| 575 | */ | ||
| 576 | #define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */ | ||
| 577 | |||
| 578 | /* | ||
| 579 | * Names for IP sysctl objects | ||
| 580 | */ | ||
| 581 | #define IPV6CTL_FORWARDING 1 /* act as router */ | ||
| 582 | #define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ | ||
| 583 | #define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ | ||
| 584 | #ifdef notyet | ||
| 585 | #define IPV6CTL_DEFMTU 4 /* default MTU */ | ||
| 586 | #endif | ||
| 587 | #define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ | ||
| 588 | #define IPV6CTL_STATS 6 /* stats */ | ||
| 589 | #define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ | ||
| 590 | #define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */ | ||
| 591 | #define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */ | ||
| 592 | #define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */ | ||
| 593 | #define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */ | ||
| 594 | #define IPV6CTL_ACCEPT_RTADV 12 | ||
| 595 | #define IPV6CTL_KEEPFAITH 13 /* deprecated */ | ||
| 596 | #define IPV6CTL_LOG_INTERVAL 14 | ||
| 597 | #define IPV6CTL_HDRNESTLIMIT 15 | ||
| 598 | #define IPV6CTL_DAD_COUNT 16 | ||
| 599 | #define IPV6CTL_AUTO_FLOWLABEL 17 | ||
| 600 | #define IPV6CTL_DEFMCASTHLIM 18 | ||
| 601 | #define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */ | ||
| 602 | #define IPV6CTL_KAME_VERSION 20 | ||
| 603 | #define IPV6CTL_USE_DEPRECATED 21 /* use deprec addr (RFC2462 5.5.4) */ | ||
| 604 | #define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ | ||
| 605 | #if 0 /* obsolete */ | ||
| 606 | #define IPV6CTL_MAPPED_ADDR 23 | ||
| 607 | #endif | ||
| 608 | #define IPV6CTL_V6ONLY 24 | ||
| 609 | #define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */ | ||
| 610 | #define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */ | ||
| 611 | #define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */ | ||
| 612 | |||
| 613 | #define IPV6CTL_USETEMPADDR 32 /* use temporary addresses [RFC 4941] */ | ||
| 614 | #define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ | ||
| 615 | #define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ | ||
| 616 | #define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */ | ||
| 617 | #define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */ | ||
| 618 | #define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ | ||
| 619 | #define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ | ||
| 620 | #define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ | ||
| 621 | |||
| 622 | #define IPV6CTL_MAXFRAGS 41 /* max fragments */ | ||
| 623 | #define IPV6CTL_MCAST_PMTU 44 /* enable pMTU discovery for mcast? */ | ||
| 624 | |||
| 625 | #define IPV6CTL_NEIGHBORGCTHRESH 46 | ||
| 626 | #define IPV6CTL_MAXIFPREFIXES 47 | ||
| 627 | #define IPV6CTL_MAXIFDEFROUTERS 48 | ||
| 628 | #define IPV6CTL_MAXDYNROUTES 49 | ||
| 629 | #define ICMPV6CTL_ND6_ONLINKNSRFC4861 50 | ||
| 630 | |||
| 631 | /* New entries should be added here from current IPV6CTL_MAXID value. */ | ||
| 632 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 633 | #define IPV6CTL_MAXID 51 | ||
| 634 | |||
| 635 | |||
| 636 | |||
| 637 | |||
| 638 | |||
| 639 | __BEGIN_DECLS | ||
| 640 | struct cmsghdr; | ||
| 641 | |||
| 642 | extern int inet6_option_space(int); | ||
| 643 | extern int inet6_option_init(void *, struct cmsghdr **, int); | ||
| 644 | extern int inet6_option_append(struct cmsghdr *, const __uint8_t *, int, int); | ||
| 645 | extern __uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); | ||
| 646 | extern int inet6_option_next(const struct cmsghdr *, __uint8_t **); | ||
| 647 | extern int inet6_option_find(const struct cmsghdr *, __uint8_t **, int); | ||
| 648 | |||
| 649 | extern size_t inet6_rthdr_space(int, int); | ||
| 650 | extern struct cmsghdr *inet6_rthdr_init(void *, int); | ||
| 651 | extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, | ||
| 652 | unsigned int); | ||
| 653 | extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); | ||
| 654 | #if 0 /* not implemented yet */ | ||
| 655 | extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); | ||
| 656 | #endif | ||
| 657 | extern int inet6_rthdr_segments(const struct cmsghdr *); | ||
| 658 | extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); | ||
| 659 | extern int inet6_rthdr_getflags(const struct cmsghdr *, int); | ||
| 660 | |||
| 661 | extern int inet6_opt_init(void *, socklen_t); | ||
| 662 | extern int inet6_opt_append(void *, socklen_t, int, __uint8_t, socklen_t, | ||
| 663 | __uint8_t, void **); | ||
| 664 | extern int inet6_opt_finish(void *, socklen_t, int); | ||
| 665 | extern int inet6_opt_set_val(void *, int, void *, socklen_t); | ||
| 666 | |||
| 667 | extern int inet6_opt_next(void *, socklen_t, int, __uint8_t *, socklen_t *, | ||
| 668 | void **); | ||
| 669 | extern int inet6_opt_find(void *, socklen_t, int, __uint8_t, socklen_t *, | ||
| 670 | void **); | ||
| 671 | extern int inet6_opt_get_val(void *, int, void *, socklen_t); | ||
| 672 | extern socklen_t inet6_rth_space(int, int); | ||
| 673 | extern void *inet6_rth_init(void *, socklen_t, int, int); | ||
| 674 | extern int inet6_rth_add(void *, const struct in6_addr *); | ||
| 675 | extern int inet6_rth_reverse(const void *, void *); | ||
| 676 | extern int inet6_rth_segments(const void *); | ||
| 677 | extern struct in6_addr *inet6_rth_getaddr(const void *, int); | ||
| 678 | |||
| 679 | __END_DECLS | ||
| 680 | #endif /* PLATFORM_DriverKit */ | ||
| 681 | #endif /* !_NETINET6_IN6_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/objc/objc-api.h deleted-304| ... | @@ -1,304 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2006 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 | // Copyright 1988-1996 NeXT Software, Inc. | ||
| 24 | |||
| 25 | #ifndef _OBJC_OBJC_API_H_ | ||
| 26 | #define _OBJC_OBJC_API_H_ | ||
| 27 | |||
| 28 | #include <Availability.h> | ||
| 29 | #include <AvailabilityMacros.h> | ||
| 30 | #include <TargetConditionals.h> | ||
| 31 | #include <sys/types.h> | ||
| 32 | |||
| 33 | #ifndef __has_feature | ||
| 34 | # define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef __has_extension | ||
| 38 | # define __has_extension __has_feature | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifndef __has_attribute | ||
| 42 | # define __has_attribute(x) 0 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #if !__has_feature(nullability) | ||
| 46 | # ifndef _Nullable | ||
| 47 | # define _Nullable | ||
| 48 | # endif | ||
| 49 | # ifndef _Nonnull | ||
| 50 | # define _Nonnull | ||
| 51 | # endif | ||
| 52 | # ifndef _Null_unspecified | ||
| 53 | # define _Null_unspecified | ||
| 54 | # endif | ||
| 55 | #endif | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | /* | ||
| 60 | * OBJC_API_VERSION 0 or undef: Tiger and earlier API only | ||
| 61 | * OBJC_API_VERSION 2: Leopard and later API available | ||
| 62 | */ | ||
| 63 | #if !defined(OBJC_API_VERSION) | ||
| 64 | # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5 | ||
| 65 | # define OBJC_API_VERSION 0 | ||
| 66 | # else | ||
| 67 | # define OBJC_API_VERSION 2 | ||
| 68 | # endif | ||
| 69 | #endif | ||
| 70 | |||
| 71 | |||
| 72 | /* | ||
| 73 | * OBJC_NO_GC 1: GC is not supported | ||
| 74 | * OBJC_NO_GC undef: GC is supported. This SDK no longer supports this mode. | ||
| 75 | * | ||
| 76 | * OBJC_NO_GC_API undef: Libraries must export any symbols that | ||
| 77 | * dual-mode code may links to. | ||
| 78 | * OBJC_NO_GC_API 1: Libraries need not export GC-related symbols. | ||
| 79 | */ | ||
| 80 | #if defined(__OBJC_GC__) | ||
| 81 | # error Objective-C garbage collection is not supported. | ||
| 82 | #elif TARGET_OS_OSX | ||
| 83 | /* GC is unsupported. GC API symbols are exported. */ | ||
| 84 | # define OBJC_NO_GC 1 | ||
| 85 | # undef OBJC_NO_GC_API | ||
| 86 | #else | ||
| 87 | /* GC is unsupported. GC API symbols are not exported. */ | ||
| 88 | # define OBJC_NO_GC 1 | ||
| 89 | # define OBJC_NO_GC_API 1 | ||
| 90 | #endif | ||
| 91 | |||
| 92 | |||
| 93 | /* NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER == 1 | ||
| 94 | * marks -[NSObject init] as a designated initializer. */ | ||
| 95 | #if !defined(NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER) | ||
| 96 | # define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1 | ||
| 97 | #endif | ||
| 98 | |||
| 99 | /* The arm64 ABI requires proper casting to ensure arguments are passed | ||
| 100 | * * correctly. */ | ||
| 101 | #if defined(__arm64__) && !__swift__ | ||
| 102 | # undef OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 103 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch | ||
| 107 | * functions must be cast to an appropriate function pointer type. */ | ||
| 108 | #if !defined(OBJC_OLD_DISPATCH_PROTOTYPES) | ||
| 109 | # if __swift__ | ||
| 110 | // Existing Swift code expects IMP to be Comparable. | ||
| 111 | // Variadic IMP is comparable via OpaquePointer; non-variadic IMP isn't. | ||
| 112 | # define OBJC_OLD_DISPATCH_PROTOTYPES 1 | ||
| 113 | # else | ||
| 114 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 115 | # endif | ||
| 116 | #endif | ||
| 117 | |||
| 118 | |||
| 119 | /* OBJC_AVAILABLE: shorthand for all-OS availability */ | ||
| 120 | |||
| 121 | # if !defined(OBJC_AVAILABLE) | ||
| 122 | # define OBJC_AVAILABLE(x, i, t, w, b) \ | ||
| 123 | __OSX_AVAILABLE(x) __IOS_AVAILABLE(i) __TVOS_AVAILABLE(t) \ | ||
| 124 | __WATCHOS_AVAILABLE(w) | ||
| 125 | # endif | ||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | /* OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE: Deprecated on OS X, | ||
| 130 | * unavailable everywhere else. */ | ||
| 131 | |||
| 132 | # if !defined(OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE) | ||
| 133 | # define OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(_start, _dep, _msg) \ | ||
| 134 | __OSX_DEPRECATED(_start, _dep, _msg) \ | ||
| 135 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 136 | __WATCHOS_UNAVAILABLE | ||
| 137 | # endif | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | /* OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE: Available on OS X, | ||
| 142 | * unavailable everywhere else. */ | ||
| 143 | |||
| 144 | # if !defined(OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE) | ||
| 145 | # define OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE(vers) \ | ||
| 146 | __OSX_AVAILABLE(vers) \ | ||
| 147 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 148 | __WATCHOS_UNAVAILABLE | ||
| 149 | # endif | ||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | /* OBJC_ISA_AVAILABILITY: `isa` will be deprecated or unavailable | ||
| 154 | * in the future */ | ||
| 155 | #if !defined(OBJC_ISA_AVAILABILITY) | ||
| 156 | # if __OBJC2__ | ||
| 157 | # define OBJC_ISA_AVAILABILITY __attribute__((deprecated)) | ||
| 158 | # else | ||
| 159 | # define OBJC_ISA_AVAILABILITY /* still available */ | ||
| 160 | # endif | ||
| 161 | #endif | ||
| 162 | |||
| 163 | |||
| 164 | /* OBJC2_UNAVAILABLE: unavailable in objc 2.0, deprecated in Leopard */ | ||
| 165 | #if !defined(OBJC2_UNAVAILABLE) | ||
| 166 | # if __OBJC2__ | ||
| 167 | # define OBJC2_UNAVAILABLE UNAVAILABLE_ATTRIBUTE | ||
| 168 | # else | ||
| 169 | /* plain C code also falls here, but this is close enough */ | ||
| 170 | # define OBJC2_UNAVAILABLE \ | ||
| 171 | __OSX_DEPRECATED(10.5, 10.5, "not available in __OBJC2__") \ | ||
| 172 | __IOS_DEPRECATED(2.0, 2.0, "not available in __OBJC2__") \ | ||
| 173 | __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE | ||
| 174 | # endif | ||
| 175 | #endif | ||
| 176 | |||
| 177 | /* OBJC_UNAVAILABLE: unavailable, with a message where supported */ | ||
| 178 | #if !defined(OBJC_UNAVAILABLE) | ||
| 179 | # if __has_extension(attribute_unavailable_with_message) | ||
| 180 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable(_msg))) | ||
| 181 | # else | ||
| 182 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable)) | ||
| 183 | # endif | ||
| 184 | #endif | ||
| 185 | |||
| 186 | /* OBJC_DEPRECATED: deprecated, with a message where supported */ | ||
| 187 | #if !defined(OBJC_DEPRECATED) | ||
| 188 | # if __has_extension(attribute_deprecated_with_message) | ||
| 189 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated(_msg))) | ||
| 190 | # else | ||
| 191 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated)) | ||
| 192 | # endif | ||
| 193 | #endif | ||
| 194 | |||
| 195 | /* OBJC_ARC_UNAVAILABLE: unavailable with -fobjc-arc */ | ||
| 196 | #if !defined(OBJC_ARC_UNAVAILABLE) | ||
| 197 | # if __has_feature(objc_arc) | ||
| 198 | # define OBJC_ARC_UNAVAILABLE OBJC_UNAVAILABLE("not available in automatic reference counting mode") | ||
| 199 | # else | ||
| 200 | # define OBJC_ARC_UNAVAILABLE | ||
| 201 | # endif | ||
| 202 | #endif | ||
| 203 | |||
| 204 | /* OBJC_SWIFT_UNAVAILABLE: unavailable in Swift */ | ||
| 205 | #if !defined(OBJC_SWIFT_UNAVAILABLE) | ||
| 206 | # if __has_feature(attribute_availability_swift) | ||
| 207 | # define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg))) | ||
| 208 | # else | ||
| 209 | # define OBJC_SWIFT_UNAVAILABLE(_msg) | ||
| 210 | # endif | ||
| 211 | #endif | ||
| 212 | |||
| 213 | /* OBJC_ARM64_UNAVAILABLE: unavailable on arm64 (i.e. stret dispatch) */ | ||
| 214 | #if !defined(OBJC_ARM64_UNAVAILABLE) | ||
| 215 | # if defined(__arm64__) | ||
| 216 | # define OBJC_ARM64_UNAVAILABLE OBJC_UNAVAILABLE("not available in arm64") | ||
| 217 | # else | ||
| 218 | # define OBJC_ARM64_UNAVAILABLE | ||
| 219 | # endif | ||
| 220 | #endif | ||
| 221 | |||
| 222 | /* OBJC_GC_UNAVAILABLE: unavailable with -fobjc-gc or -fobjc-gc-only */ | ||
| 223 | #if !defined(OBJC_GC_UNAVAILABLE) | ||
| 224 | # define OBJC_GC_UNAVAILABLE | ||
| 225 | #endif | ||
| 226 | |||
| 227 | #if !defined(OBJC_EXTERN) | ||
| 228 | # if defined(__cplusplus) | ||
| 229 | # define OBJC_EXTERN extern "C" | ||
| 230 | # else | ||
| 231 | # define OBJC_EXTERN extern | ||
| 232 | # endif | ||
| 233 | #endif | ||
| 234 | |||
| 235 | #if !defined(OBJC_VISIBLE) | ||
| 236 | |||
| 237 | # define OBJC_VISIBLE __attribute__((visibility("default"))) | ||
| 238 | |||
| 239 | #endif | ||
| 240 | |||
| 241 | #if !defined(OBJC_EXPORT) | ||
| 242 | # define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE | ||
| 243 | #endif | ||
| 244 | |||
| 245 | #if !defined(OBJC_IMPORT) | ||
| 246 | # define OBJC_IMPORT extern | ||
| 247 | #endif | ||
| 248 | |||
| 249 | #if !defined(OBJC_ROOT_CLASS) | ||
| 250 | # if __has_attribute(objc_root_class) | ||
| 251 | # define OBJC_ROOT_CLASS __attribute__((objc_root_class)) | ||
| 252 | # else | ||
| 253 | # define OBJC_ROOT_CLASS | ||
| 254 | # endif | ||
| 255 | #endif | ||
| 256 | |||
| 257 | #ifndef __DARWIN_NULL | ||
| 258 | #define __DARWIN_NULL NULL | ||
| 259 | #endif | ||
| 260 | |||
| 261 | #if !defined(OBJC_INLINE) | ||
| 262 | # define OBJC_INLINE __inline | ||
| 263 | #endif | ||
| 264 | |||
| 265 | // Declares an enum type or option bits type as appropriate for each language. | ||
| 266 | #if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum)) | ||
| 267 | #define OBJC_ENUM(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 268 | #if (__cplusplus) | ||
| 269 | #define OBJC_OPTIONS(_type, _name) _type _name; enum : _type | ||
| 270 | #else | ||
| 271 | #define OBJC_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 272 | #endif | ||
| 273 | #else | ||
| 274 | #define OBJC_ENUM(_type, _name) _type _name; enum | ||
| 275 | #define OBJC_OPTIONS(_type, _name) _type _name; enum | ||
| 276 | #endif | ||
| 277 | |||
| 278 | #if !defined(OBJC_RETURNS_RETAINED) | ||
| 279 | # if __OBJC__ && __has_attribute(ns_returns_retained) | ||
| 280 | # define OBJC_RETURNS_RETAINED __attribute__((ns_returns_retained)) | ||
| 281 | # else | ||
| 282 | # define OBJC_RETURNS_RETAINED | ||
| 283 | # endif | ||
| 284 | #endif | ||
| 285 | |||
| 286 | /* OBJC_COLD: very rarely called, e.g. on error path */ | ||
| 287 | #if !defined(OBJC_COLD) | ||
| 288 | # if __OBJC__ && __has_attribute(cold) | ||
| 289 | # define OBJC_COLD __attribute__((cold)) | ||
| 290 | # else | ||
| 291 | # define OBJC_COLD | ||
| 292 | # endif | ||
| 293 | #endif | ||
| 294 | |||
| 295 | /* OBJC_NORETURN: does not return normally, but may throw */ | ||
| 296 | #if !defined(OBJC_NORETURN) | ||
| 297 | # if __OBJC__ && __has_attribute(noreturn) | ||
| 298 | # define OBJC_NORETURN __attribute__((noreturn)) | ||
| 299 | # else | ||
| 300 | # define OBJC_NORETURN | ||
| 301 | # endif | ||
| 302 | #endif | ||
| 303 | |||
| 304 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/objc/runtime.h-263| ... | @@ -52,24 +52,6 @@ typedef struct objc_category *Category; | ... | @@ -52,24 +52,6 @@ typedef struct objc_category *Category; |
| 52 | /// An opaque type that represents an Objective-C declared property. | 52 | /// An opaque type that represents an Objective-C declared property. |
| 53 | typedef struct objc_property *objc_property_t; | 53 | typedef struct objc_property *objc_property_t; |
| 54 | 54 | ||
| 55 | struct objc_class { | ||
| 56 | Class _Nonnull isa OBJC_ISA_AVAILABILITY; | ||
| 57 | |||
| 58 | #if !__OBJC2__ | ||
| 59 | Class _Nullable super_class OBJC2_UNAVAILABLE; | ||
| 60 | const char * _Nonnull name OBJC2_UNAVAILABLE; | ||
| 61 | long version OBJC2_UNAVAILABLE; | ||
| 62 | long info OBJC2_UNAVAILABLE; | ||
| 63 | long instance_size OBJC2_UNAVAILABLE; | ||
| 64 | struct objc_ivar_list * _Nullable ivars OBJC2_UNAVAILABLE; | ||
| 65 | struct objc_method_list * _Nullable * _Nullable methodLists OBJC2_UNAVAILABLE; | ||
| 66 | struct objc_cache * _Nonnull cache OBJC2_UNAVAILABLE; | ||
| 67 | struct objc_protocol_list * _Nullable protocols OBJC2_UNAVAILABLE; | ||
| 68 | #endif | ||
| 69 | |||
| 70 | } OBJC2_UNAVAILABLE; | ||
| 71 | /* Use `Class` instead of `struct objc_class *` */ | ||
| 72 | |||
| 73 | #endif | 55 | #endif |
| 74 | 56 | ||
| 75 | #ifdef __OBJC__ | 57 | #ifdef __OBJC__ |
| ... | @@ -1877,154 +1859,8 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously) | ... | @@ -1877,154 +1859,8 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously) |
| 1877 | #define _C_VECTOR '!' | 1859 | #define _C_VECTOR '!' |
| 1878 | #define _C_CONST 'r' | 1860 | #define _C_CONST 'r' |
| 1879 | 1861 | ||
| 1880 | |||
| 1881 | /* Obsolete types */ | ||
| 1882 | |||
| 1883 | #if !__OBJC2__ | ||
| 1884 | |||
| 1885 | #define CLS_GETINFO(cls,infomask) ((cls)->info & (infomask)) | ||
| 1886 | #define CLS_SETINFO(cls,infomask) ((cls)->info |= (infomask)) | ||
| 1887 | |||
| 1888 | // class is not a metaclass | ||
| 1889 | #define CLS_CLASS 0x1 | ||
| 1890 | // class is a metaclass | ||
| 1891 | #define CLS_META 0x2 | ||
| 1892 | // class's +initialize method has completed | ||
| 1893 | #define CLS_INITIALIZED 0x4 | ||
| 1894 | // class is posing | ||
| 1895 | #define CLS_POSING 0x8 | ||
| 1896 | // unused | ||
| 1897 | #define CLS_MAPPED 0x10 | ||
| 1898 | // class and subclasses need cache flush during image loading | ||
| 1899 | #define CLS_FLUSH_CACHE 0x20 | ||
| 1900 | // method cache should grow when full | ||
| 1901 | #define CLS_GROW_CACHE 0x40 | ||
| 1902 | // unused | ||
| 1903 | #define CLS_NEED_BIND 0x80 | ||
| 1904 | // methodLists is array of method lists | ||
| 1905 | #define CLS_METHOD_ARRAY 0x100 | ||
| 1906 | // the JavaBridge constructs classes with these markers | ||
| 1907 | #define CLS_JAVA_HYBRID 0x200 | ||
| 1908 | #define CLS_JAVA_CLASS 0x400 | ||
| 1909 | // thread-safe +initialize | ||
| 1910 | #define CLS_INITIALIZING 0x800 | ||
| 1911 | // bundle unloading | ||
| 1912 | #define CLS_FROM_BUNDLE 0x1000 | ||
| 1913 | // C++ ivar support | ||
| 1914 | #define CLS_HAS_CXX_STRUCTORS 0x2000 | ||
| 1915 | // Lazy method list arrays | ||
| 1916 | #define CLS_NO_METHOD_ARRAY 0x4000 | ||
| 1917 | // +load implementation | ||
| 1918 | #define CLS_HAS_LOAD_METHOD 0x8000 | ||
| 1919 | // objc_allocateClassPair API | ||
| 1920 | #define CLS_CONSTRUCTING 0x10000 | ||
| 1921 | // class compiled with bigger class structure | ||
| 1922 | #define CLS_EXT 0x20000 | ||
| 1923 | |||
| 1924 | |||
| 1925 | struct objc_method_description_list { | ||
| 1926 | int count; | ||
| 1927 | struct objc_method_description list[1]; | ||
| 1928 | }; | ||
| 1929 | |||
| 1930 | |||
| 1931 | struct objc_protocol_list { | ||
| 1932 | struct objc_protocol_list * _Nullable next; | ||
| 1933 | long count; | ||
| 1934 | __unsafe_unretained Protocol * _Nullable list[1]; | ||
| 1935 | }; | ||
| 1936 | |||
| 1937 | |||
| 1938 | struct objc_category { | ||
| 1939 | char * _Nonnull category_name OBJC2_UNAVAILABLE; | ||
| 1940 | char * _Nonnull class_name OBJC2_UNAVAILABLE; | ||
| 1941 | struct objc_method_list * _Nullable instance_methods OBJC2_UNAVAILABLE; | ||
| 1942 | struct objc_method_list * _Nullable class_methods OBJC2_UNAVAILABLE; | ||
| 1943 | struct objc_protocol_list * _Nullable protocols OBJC2_UNAVAILABLE; | ||
| 1944 | } OBJC2_UNAVAILABLE; | ||
| 1945 | |||
| 1946 | |||
| 1947 | struct objc_ivar { | ||
| 1948 | char * _Nullable ivar_name OBJC2_UNAVAILABLE; | ||
| 1949 | char * _Nullable ivar_type OBJC2_UNAVAILABLE; | ||
| 1950 | int ivar_offset OBJC2_UNAVAILABLE; | ||
| 1951 | #ifdef __LP64__ | ||
| 1952 | int space OBJC2_UNAVAILABLE; | ||
| 1953 | #endif | ||
| 1954 | } OBJC2_UNAVAILABLE; | ||
| 1955 | |||
| 1956 | struct objc_ivar_list { | ||
| 1957 | int ivar_count OBJC2_UNAVAILABLE; | ||
| 1958 | #ifdef __LP64__ | ||
| 1959 | int space OBJC2_UNAVAILABLE; | ||
| 1960 | #endif | ||
| 1961 | /* variable length structure */ | ||
| 1962 | struct objc_ivar ivar_list[1] OBJC2_UNAVAILABLE; | ||
| 1963 | } OBJC2_UNAVAILABLE; | ||
| 1964 | |||
| 1965 | |||
| 1966 | struct objc_method { | ||
| 1967 | SEL _Nonnull method_name OBJC2_UNAVAILABLE; | ||
| 1968 | char * _Nullable method_types OBJC2_UNAVAILABLE; | ||
| 1969 | IMP _Nonnull method_imp OBJC2_UNAVAILABLE; | ||
| 1970 | } OBJC2_UNAVAILABLE; | ||
| 1971 | |||
| 1972 | struct objc_method_list { | ||
| 1973 | struct objc_method_list * _Nullable obsolete OBJC2_UNAVAILABLE; | ||
| 1974 | |||
| 1975 | int method_count OBJC2_UNAVAILABLE; | ||
| 1976 | #ifdef __LP64__ | ||
| 1977 | int space OBJC2_UNAVAILABLE; | ||
| 1978 | #endif | ||
| 1979 | /* variable length structure */ | ||
| 1980 | struct objc_method method_list[1] OBJC2_UNAVAILABLE; | ||
| 1981 | } OBJC2_UNAVAILABLE; | ||
| 1982 | |||
| 1983 | |||
| 1984 | typedef struct objc_symtab *Symtab OBJC2_UNAVAILABLE; | ||
| 1985 | |||
| 1986 | struct objc_symtab { | ||
| 1987 | unsigned long sel_ref_cnt OBJC2_UNAVAILABLE; | ||
| 1988 | SEL _Nonnull * _Nullable refs OBJC2_UNAVAILABLE; | ||
| 1989 | unsigned short cls_def_cnt OBJC2_UNAVAILABLE; | ||
| 1990 | unsigned short cat_def_cnt OBJC2_UNAVAILABLE; | ||
| 1991 | void * _Nullable defs[1] /* variable size */ OBJC2_UNAVAILABLE; | ||
| 1992 | } OBJC2_UNAVAILABLE; | ||
| 1993 | |||
| 1994 | |||
| 1995 | typedef struct objc_cache *Cache OBJC2_UNAVAILABLE; | ||
| 1996 | |||
| 1997 | #define CACHE_BUCKET_NAME(B) ((B)->method_name) | ||
| 1998 | #define CACHE_BUCKET_IMP(B) ((B)->method_imp) | ||
| 1999 | #define CACHE_BUCKET_VALID(B) (B) | ||
| 2000 | #ifndef __LP64__ | ||
| 2001 | #define CACHE_HASH(sel, mask) (((uintptr_t)(sel)>>2) & (mask)) | ||
| 2002 | #else | ||
| 2003 | #define CACHE_HASH(sel, mask) (((unsigned int)((uintptr_t)(sel)>>3)) & (mask)) | ||
| 2004 | #endif | ||
| 2005 | struct objc_cache { | ||
| 2006 | unsigned int mask /* total = mask + 1 */ OBJC2_UNAVAILABLE; | ||
| 2007 | unsigned int occupied OBJC2_UNAVAILABLE; | ||
| 2008 | Method _Nullable buckets[1] OBJC2_UNAVAILABLE; | ||
| 2009 | }; | ||
| 2010 | |||
| 2011 | |||
| 2012 | typedef struct objc_module *Module OBJC2_UNAVAILABLE; | ||
| 2013 | |||
| 2014 | struct objc_module { | ||
| 2015 | unsigned long version OBJC2_UNAVAILABLE; | ||
| 2016 | unsigned long size OBJC2_UNAVAILABLE; | ||
| 2017 | const char * _Nullable name OBJC2_UNAVAILABLE; | ||
| 2018 | Symtab _Nullable symtab OBJC2_UNAVAILABLE; | ||
| 2019 | } OBJC2_UNAVAILABLE; | ||
| 2020 | |||
| 2021 | #else | ||
| 2022 | |||
| 2023 | struct objc_method_list; | 1862 | struct objc_method_list; |
| 2024 | 1863 | ||
| 2025 | #endif | ||
| 2026 | |||
| 2027 | |||
| 2028 | /* Obsolete functions */ | 1864 | /* Obsolete functions */ |
| 2029 | 1865 | ||
| 2030 | OBJC_EXPORT IMP _Nullable | 1866 | OBJC_EXPORT IMP _Nullable |
| ... | @@ -2057,108 +1893,9 @@ OBJC_EXPORT id _Nullable | ... | @@ -2057,108 +1893,9 @@ OBJC_EXPORT id _Nullable |
| 2057 | object_copyFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z) | 1893 | object_copyFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z) |
| 2058 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use object_copy instead"); | 1894 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use object_copy instead"); |
| 2059 | 1895 | ||
| 2060 | OBJC_EXPORT id _Nullable | ||
| 2061 | object_realloc(id _Nullable anObject, size_t nBytes) | ||
| 2062 | OBJC2_UNAVAILABLE; | ||
| 2063 | |||
| 2064 | OBJC_EXPORT id _Nullable | ||
| 2065 | object_reallocFromZone(id _Nullable anObject, size_t nBytes, void * _Nullable z) | ||
| 2066 | OBJC2_UNAVAILABLE; | ||
| 2067 | |||
| 2068 | #define OBSOLETE_OBJC_GETCLASSES 1 | ||
| 2069 | OBJC_EXPORT void * _Nonnull | ||
| 2070 | objc_getClasses(void) | ||
| 2071 | OBJC2_UNAVAILABLE; | ||
| 2072 | |||
| 2073 | OBJC_EXPORT void | ||
| 2074 | objc_addClass(Class _Nonnull myClass) | ||
| 2075 | OBJC2_UNAVAILABLE; | ||
| 2076 | |||
| 2077 | OBJC_EXPORT void | ||
| 2078 | objc_setClassHandler(int (* _Nullable )(const char * _Nonnull)) | ||
| 2079 | OBJC2_UNAVAILABLE; | ||
| 2080 | |||
| 2081 | OBJC_EXPORT void | ||
| 2082 | objc_setMultithreaded(BOOL flag) | ||
| 2083 | OBJC2_UNAVAILABLE; | ||
| 2084 | |||
| 2085 | OBJC_EXPORT id _Nullable | 1896 | OBJC_EXPORT id _Nullable |
| 2086 | class_createInstanceFromZone(Class _Nullable, size_t idxIvars, | 1897 | class_createInstanceFromZone(Class _Nullable, size_t idxIvars, |
| 2087 | void * _Nullable z) | 1898 | void * _Nullable z) |
| 2088 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use class_createInstance instead"); | 1899 | OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(10.0, 10.5, "use class_createInstance instead"); |
| 2089 | 1900 | ||
| 2090 | OBJC_EXPORT void | ||
| 2091 | class_addMethods(Class _Nullable, struct objc_method_list * _Nonnull) | ||
| 2092 | OBJC2_UNAVAILABLE; | ||
| 2093 | |||
| 2094 | OBJC_EXPORT void | ||
| 2095 | class_removeMethods(Class _Nullable, struct objc_method_list * _Nonnull) | ||
| 2096 | OBJC2_UNAVAILABLE; | ||
| 2097 | |||
| 2098 | OBJC_EXPORT void | ||
| 2099 | _objc_resolve_categories_for_class(Class _Nonnull cls) | ||
| 2100 | OBJC2_UNAVAILABLE; | ||
| 2101 | |||
| 2102 | OBJC_EXPORT Class _Nonnull | ||
| 2103 | class_poseAs(Class _Nonnull imposter, Class _Nonnull original) | ||
| 2104 | OBJC2_UNAVAILABLE; | ||
| 2105 | |||
| 2106 | OBJC_EXPORT unsigned int | ||
| 2107 | method_getSizeOfArguments(Method _Nonnull m) | ||
| 2108 | OBJC2_UNAVAILABLE; | ||
| 2109 | |||
| 2110 | OBJC_EXPORT unsigned | ||
| 2111 | method_getArgumentInfo(struct objc_method * _Nonnull m, int arg, | ||
| 2112 | const char * _Nullable * _Nonnull type, | ||
| 2113 | int * _Nonnull offset) | ||
| 2114 | UNAVAILABLE_ATTRIBUTE // This function was accidentally deleted in 10.9. | ||
| 2115 | OBJC2_UNAVAILABLE; | ||
| 2116 | |||
| 2117 | OBJC_EXPORT Class _Nullable | ||
| 2118 | objc_getOrigClass(const char * _Nonnull name) | ||
| 2119 | OBJC2_UNAVAILABLE; | ||
| 2120 | |||
| 2121 | #define OBJC_NEXT_METHOD_LIST 1 | ||
| 2122 | OBJC_EXPORT struct objc_method_list * _Nullable | ||
| 2123 | class_nextMethodList(Class _Nullable, void * _Nullable * _Nullable) | ||
| 2124 | OBJC2_UNAVAILABLE; | ||
| 2125 | // usage for nextMethodList | ||
| 2126 | // | ||
| 2127 | // void *iterator = 0; | ||
| 2128 | // struct objc_method_list *mlist; | ||
| 2129 | // while ( mlist = class_nextMethodList( cls, &iterator ) ) | ||
| 2130 | // ; | ||
| 2131 | |||
| 2132 | OBJC_EXPORT id _Nullable | ||
| 2133 | (* _Nonnull _alloc)(Class _Nullable, size_t) | ||
| 2134 | OBJC2_UNAVAILABLE; | ||
| 2135 | |||
| 2136 | OBJC_EXPORT id _Nullable | ||
| 2137 | (* _Nonnull _copy)(id _Nullable, size_t) | ||
| 2138 | OBJC2_UNAVAILABLE; | ||
| 2139 | |||
| 2140 | OBJC_EXPORT id _Nullable | ||
| 2141 | (* _Nonnull _realloc)(id _Nullable, size_t) | ||
| 2142 | OBJC2_UNAVAILABLE; | ||
| 2143 | |||
| 2144 | OBJC_EXPORT id _Nullable | ||
| 2145 | (* _Nonnull _dealloc)(id _Nullable) | ||
| 2146 | OBJC2_UNAVAILABLE; | ||
| 2147 | |||
| 2148 | OBJC_EXPORT id _Nullable | ||
| 2149 | (* _Nonnull _zoneAlloc)(Class _Nullable, size_t, void * _Nullable) | ||
| 2150 | OBJC2_UNAVAILABLE; | ||
| 2151 | |||
| 2152 | OBJC_EXPORT id _Nullable | ||
| 2153 | (* _Nonnull _zoneRealloc)(id _Nullable, size_t, void * _Nullable) | ||
| 2154 | OBJC2_UNAVAILABLE; | ||
| 2155 | |||
| 2156 | OBJC_EXPORT id _Nullable | ||
| 2157 | (* _Nonnull _zoneCopy)(id _Nullable, size_t, void * _Nullable) | ||
| 2158 | OBJC2_UNAVAILABLE; | ||
| 2159 | |||
| 2160 | OBJC_EXPORT void | ||
| 2161 | (* _Nonnull _error)(id _Nullable, const char * _Nonnull, va_list) | ||
| 2162 | OBJC2_UNAVAILABLE; | ||
| 2163 | |||
| 2164 | #endif | 1901 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/os/base.h deleted-322| ... | @@ -1,322 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 7 | * you may not use this file except in compliance with the License. | ||
| 8 | * You may obtain a copy of the License at | ||
| 9 | * | ||
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 11 | * | ||
| 12 | * Unless required by applicable law or agreed to in writing, software | ||
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 15 | * See the License for the specific language governing permissions and | ||
| 16 | * limitations under the License. | ||
| 17 | * | ||
| 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __OS_BASE__ | ||
| 22 | #define __OS_BASE__ | ||
| 23 | |||
| 24 | #include <sys/cdefs.h> | ||
| 25 | |||
| 26 | |||
| 27 | #ifndef __has_builtin | ||
| 28 | #define __has_builtin(x) 0 | ||
| 29 | #endif | ||
| 30 | #ifndef __has_include | ||
| 31 | #define __has_include(x) 0 | ||
| 32 | #endif | ||
| 33 | #ifndef __has_feature | ||
| 34 | #define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | #ifndef __has_attribute | ||
| 37 | #define __has_attribute(x) 0 | ||
| 38 | #endif | ||
| 39 | #ifndef __has_extension | ||
| 40 | #define __has_extension(x) 0 | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #undef OS_INLINE // <sys/_types/_os_inline.h> | ||
| 44 | #if __GNUC__ | ||
| 45 | #define OS_NORETURN __attribute__((__noreturn__)) | ||
| 46 | #define OS_NOTHROW __attribute__((__nothrow__)) | ||
| 47 | #define OS_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 48 | #define OS_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 49 | #define OS_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 50 | #define OS_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 51 | #define OS_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 52 | #define OS_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 53 | #define OS_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 54 | #define OS_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 55 | #define OS_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 56 | #define OS_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 57 | #define OS_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 58 | #define OS_NONNULL12 __attribute__((__nonnull__(12))) | ||
| 59 | #define OS_NONNULL13 __attribute__((__nonnull__(13))) | ||
| 60 | #define OS_NONNULL14 __attribute__((__nonnull__(14))) | ||
| 61 | #define OS_NONNULL15 __attribute__((__nonnull__(15))) | ||
| 62 | #define OS_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 63 | #define OS_SENTINEL __attribute__((__sentinel__)) | ||
| 64 | #define OS_PURE __attribute__((__pure__)) | ||
| 65 | #define OS_CONST __attribute__((__const__)) | ||
| 66 | #define OS_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 67 | #define OS_MALLOC __attribute__((__malloc__)) | ||
| 68 | #define OS_USED __attribute__((__used__)) | ||
| 69 | #define OS_UNUSED __attribute__((__unused__)) | ||
| 70 | #define OS_COLD __attribute__((__cold__)) | ||
| 71 | #define OS_WEAK __attribute__((__weak__)) | ||
| 72 | #define OS_WEAK_IMPORT __attribute__((__weak_import__)) | ||
| 73 | #define OS_NOINLINE __attribute__((__noinline__)) | ||
| 74 | #define OS_ALWAYS_INLINE __attribute__((__always_inline__)) | ||
| 75 | #define OS_TRANSPARENT_UNION __attribute__((__transparent_union__)) | ||
| 76 | #define OS_ALIGNED(n) __attribute__((__aligned__((n)))) | ||
| 77 | #define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y))) | ||
| 78 | #define OS_EXPORT extern __attribute__((__visibility__("default"))) | ||
| 79 | #define OS_INLINE static __inline__ | ||
| 80 | #define OS_EXPECT(x, v) __builtin_expect((x), (v)) | ||
| 81 | #else | ||
| 82 | #define OS_NORETURN | ||
| 83 | #define OS_NOTHROW | ||
| 84 | #define OS_NONNULL1 | ||
| 85 | #define OS_NONNULL2 | ||
| 86 | #define OS_NONNULL3 | ||
| 87 | #define OS_NONNULL4 | ||
| 88 | #define OS_NONNULL5 | ||
| 89 | #define OS_NONNULL6 | ||
| 90 | #define OS_NONNULL7 | ||
| 91 | #define OS_NONNULL8 | ||
| 92 | #define OS_NONNULL9 | ||
| 93 | #define OS_NONNULL10 | ||
| 94 | #define OS_NONNULL11 | ||
| 95 | #define OS_NONNULL12 | ||
| 96 | #define OS_NONNULL13 | ||
| 97 | #define OS_NONNULL14 | ||
| 98 | #define OS_NONNULL15 | ||
| 99 | #define OS_NONNULL_ALL | ||
| 100 | #define OS_SENTINEL | ||
| 101 | #define OS_PURE | ||
| 102 | #define OS_CONST | ||
| 103 | #define OS_WARN_RESULT | ||
| 104 | #define OS_MALLOC | ||
| 105 | #define OS_USED | ||
| 106 | #define OS_UNUSED | ||
| 107 | #define OS_COLD | ||
| 108 | #define OS_WEAK | ||
| 109 | #define OS_WEAK_IMPORT | ||
| 110 | #define OS_NOINLINE | ||
| 111 | #define OS_ALWAYS_INLINE | ||
| 112 | #define OS_TRANSPARENT_UNION | ||
| 113 | #define OS_ALIGNED(n) | ||
| 114 | #define OS_FORMAT_PRINTF(x, y) | ||
| 115 | #define OS_EXPORT extern | ||
| 116 | #define OS_INLINE static inline | ||
| 117 | #define OS_EXPECT(x, v) (x) | ||
| 118 | #endif | ||
| 119 | |||
| 120 | #if __has_attribute(noescape) | ||
| 121 | #define OS_NOESCAPE __attribute__((__noescape__)) | ||
| 122 | #else | ||
| 123 | #define OS_NOESCAPE | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #if defined(__cplusplus) && defined(__clang__) | ||
| 127 | #define OS_FALLTHROUGH [[clang::fallthrough]] | ||
| 128 | #elif __has_attribute(fallthrough) | ||
| 129 | #define OS_FALLTHROUGH __attribute__((__fallthrough__)) | ||
| 130 | #else | ||
| 131 | #define OS_FALLTHROUGH | ||
| 132 | #endif | ||
| 133 | |||
| 134 | #if __has_feature(assume_nonnull) | ||
| 135 | #define OS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 136 | #define OS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 137 | #else | ||
| 138 | #define OS_ASSUME_NONNULL_BEGIN | ||
| 139 | #define OS_ASSUME_NONNULL_END | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #if __has_builtin(__builtin_assume) | ||
| 143 | #define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | ||
| 144 | #else | ||
| 145 | #define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | ||
| 146 | #endif | ||
| 147 | |||
| 148 | #if __has_extension(attribute_overloadable) | ||
| 149 | #define OS_OVERLOADABLE __attribute__((__overloadable__)) | ||
| 150 | #else | ||
| 151 | #define OS_OVERLOADABLE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #if __has_attribute(enum_extensibility) | ||
| 155 | #define __OS_ENUM_ATTR __attribute__((enum_extensibility(open))) | ||
| 156 | #define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed))) | ||
| 157 | #else | ||
| 158 | #define __OS_ENUM_ATTR | ||
| 159 | #define __OS_ENUM_ATTR_CLOSED | ||
| 160 | #endif // __has_attribute(enum_extensibility) | ||
| 161 | |||
| 162 | #if __has_attribute(flag_enum) | ||
| 163 | /*! | ||
| 164 | * Compile with -Wflag-enum and -Wassign-enum to enforce at definition and | ||
| 165 | * assignment, respectively, i.e. -Wflag-enum prevents you from creating new | ||
| 166 | * enumeration values from illegal values within the enum definition, and | ||
| 167 | * -Wassign-enum prevents you from assigning illegal values to a variable of the | ||
| 168 | * enum type. | ||
| 169 | */ | ||
| 170 | #define __OS_OPTIONS_ATTR __attribute__((flag_enum)) | ||
| 171 | #else | ||
| 172 | #define __OS_OPTIONS_ATTR | ||
| 173 | #endif // __has_attribute(flag_enum) | ||
| 174 | |||
| 175 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \ | ||
| 176 | __has_extension(cxx_strong_enums) | ||
| 177 | #define OS_ENUM(_name, _type, ...) \ | ||
| 178 | 	typedef enum : _type { __VA_ARGS__ } _name##_t | ||
| 179 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 180 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t | ||
| 181 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 182 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t | ||
| 183 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 184 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t | ||
| 185 | #else | ||
| 186 | /*! | ||
| 187 | * There is unfortunately no good way in plain C to have both fixed-type enums | ||
| 188 | * and enforcement for clang's enum_extensibility extensions. The primary goal | ||
| 189 | * of these macros is to allow you to define an enum and specify its width in a | ||
| 190 | * single statement, and for plain C that is accomplished by defining an | ||
| 191 | * anonymous enum and then separately typedef'ing the requested type name to the | ||
| 192 | * requested underlying integer type. So the type emitted actually has no | ||
| 193 | * relationship at all to the enum, and therefore while the compiler could | ||
| 194 | * enforce enum extensibility if you used the enum type, it cannot do so if you | ||
| 195 | * use the "_t" type resulting from this expression. | ||
| 196 | * | ||
| 197 | * But we still define a named enum type and decorate it appropriately for you, | ||
| 198 | * so if you really want the enum extensibility enforcement, you can use the | ||
| 199 | * enum type yourself, i.e. when compiling with a C compiler: | ||
| 200 | * | ||
| 201 | * OS_CLOSED_ENUM(my_type, uint64_t, | ||
| 202 | * FOO, | ||
| 203 | * BAR, | ||
| 204 | * BAZ, | ||
| 205 | * ); | ||
| 206 | * | ||
| 207 | * my_type_t mt = 98; // legal | ||
| 208 | * enum my_type emt = 98; // illegal | ||
| 209 | * | ||
| 210 | * But be aware that the underlying enum type's width is subject only to the C | ||
| 211 | * language's guarantees -- namely that it will be compatible with int, char, | ||
| 212 | * and unsigned char. It is not safe to rely on the size of this type. | ||
| 213 | * | ||
| 214 | * When compiling in ObjC or C++, both of the above assignments are illegal. | ||
| 215 | */ | ||
| 216 | #define __OS_ENUM_C_FALLBACK(_name, _type, ...) \ | ||
| 217 | 	typedef _type _name##_t; enum _name { __VA_ARGS__ } | ||
| 218 | |||
| 219 | #define OS_ENUM(_name, _type, ...) \ | ||
| 220 | 	typedef _type _name##_t; enum { __VA_ARGS__ } | ||
| 221 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 222 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 223 | 	__OS_ENUM_ATTR_CLOSED | ||
| 224 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 225 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 226 | 	__OS_ENUM_ATTR __OS_OPTIONS_ATTR | ||
| 227 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 228 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 229 | 	__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR | ||
| 230 | #endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) | ||
| 231 | |||
| 232 | #if __has_feature(attribute_availability_swift) | ||
| 233 | // equivalent to __SWIFT_UNAVAILABLE from Availability.h | ||
| 234 | #define OS_SWIFT_UNAVAILABLE(_msg) \ | ||
| 235 | 	__attribute__((__availability__(swift, unavailable, message=_msg))) | ||
| 236 | #else | ||
| 237 | #define OS_SWIFT_UNAVAILABLE(_msg) | ||
| 238 | #endif | ||
| 239 | |||
| 240 | #if __has_attribute(swift_private) | ||
| 241 | # define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | ||
| 242 | #else | ||
| 243 | # define OS_REFINED_FOR_SWIFT | ||
| 244 | #endif | ||
| 245 | |||
| 246 | #if __has_attribute(swift_name) | ||
| 247 | # define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | ||
| 248 | #else | ||
| 249 | # define OS_SWIFT_NAME(_name) | ||
| 250 | #endif | ||
| 251 | |||
| 252 | #define __OS_STRINGIFY(s) #s | ||
| 253 | #define OS_STRINGIFY(s) __OS_STRINGIFY(s) | ||
| 254 | #define __OS_CONCAT(x, y) x ## y | ||
| 255 | #define OS_CONCAT(x, y) __OS_CONCAT(x, y) | ||
| 256 | |||
| 257 | #ifdef __GNUC__ | ||
| 258 | #define os_prevent_tail_call_optimization() __asm__("") | ||
| 259 | #define os_is_compile_time_constant(expr) __builtin_constant_p(expr) | ||
| 260 | #define os_compiler_barrier() __asm__ __volatile__("" ::: "memory") | ||
| 261 | #else | ||
| 262 | #define os_prevent_tail_call_optimization() do { } while (0) | ||
| 263 | #define os_is_compile_time_constant(expr) 0 | ||
| 264 | #define os_compiler_barrier() do { } while (0) | ||
| 265 | #endif | ||
| 266 | |||
| 267 | #if __has_attribute(not_tail_called) | ||
| 268 | #define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | ||
| 269 | #else | ||
| 270 | #define OS_NOT_TAIL_CALLED | ||
| 271 | #endif | ||
| 272 | |||
| 273 | |||
| 274 | typedef void (*os_function_t)(void *_Nullable); | ||
| 275 | |||
| 276 | #ifdef __BLOCKS__ | ||
| 277 | /*! | ||
| 278 | * @typedef os_block_t | ||
| 279 | * | ||
| 280 | * @abstract | ||
| 281 | * Generic type for a block taking no arguments and returning no value. | ||
| 282 | * | ||
| 283 | * @discussion | ||
| 284 | * When not building with Objective-C ARC, a block object allocated on or | ||
| 285 | * copied to the heap must be released with a -[release] message or the | ||
| 286 | * Block_release() function. | ||
| 287 | * | ||
| 288 | * The declaration of a block literal allocates storage on the stack. | ||
| 289 | * Therefore, this is an invalid construct: | ||
| 290 | * <code> | ||
| 291 | * os_block_t block; | ||
| 292 | * if (x) { | ||
| 293 | * block = ^{ printf("true\n"); }; | ||
| 294 | * } else { | ||
| 295 | * block = ^{ printf("false\n"); }; | ||
| 296 | * } | ||
| 297 | * block(); // unsafe!!! | ||
| 298 | * </code> | ||
| 299 | * | ||
| 300 | * What is happening behind the scenes: | ||
| 301 | * <code> | ||
| 302 | * if (x) { | ||
| 303 | * struct Block __tmp_1 = ...; // setup details | ||
| 304 | * block = &__tmp_1; | ||
| 305 | * } else { | ||
| 306 | * struct Block __tmp_2 = ...; // setup details | ||
| 307 | * block = &__tmp_2; | ||
| 308 | * } | ||
| 309 | * </code> | ||
| 310 | * | ||
| 311 | * As the example demonstrates, the address of a stack variable is escaping the | ||
| 312 | * scope in which it is allocated. That is a classic C bug. | ||
| 313 | * | ||
| 314 | * Instead, the block literal must be copied to the heap with the Block_copy() | ||
| 315 | * function or by sending it a -[copy] message. | ||
| 316 | */ | ||
| 317 | typedef void (^os_block_t)(void); | ||
| 318 | #endif | ||
| 319 | |||
| 320 | |||
| 321 | |||
| 322 | #endif // __OS_BASE__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/pthread.h deleted-592| ... | @@ -1,592 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2012 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 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991 | ||
| 25 | * All Rights Reserved | ||
| 26 | * | ||
| 27 | * Permission to use, copy, modify, and distribute this software and | ||
| 28 | * its documentation for any purpose and without fee is hereby granted, | ||
| 29 | * provided that the above copyright notice appears in all copies and | ||
| 30 | * that both the copyright notice and this permission notice appear in | ||
| 31 | * supporting documentation. | ||
| 32 | * | ||
| 33 | * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE | ||
| 34 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 35 | * FOR A PARTICULAR PURPOSE. | ||
| 36 | * | ||
| 37 | * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR | ||
| 38 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| 39 | * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, | ||
| 40 | * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION | ||
| 41 | * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | */ | ||
| 44 | /* | ||
| 45 | * MkLinux | ||
| 46 | */ | ||
| 47 | |||
| 48 | /* | ||
| 49 | * POSIX Threads - IEEE 1003.1c | ||
| 50 | */ | ||
| 51 | |||
| 52 | #ifndef _PTHREAD_H | ||
| 53 | #define _PTHREAD_H | ||
| 54 | |||
| 55 | #include <_types.h> | ||
| 56 | #include <pthread/sched.h> | ||
| 57 | #include <time.h> | ||
| 58 | #include <sys/_pthread/_pthread_types.h> | ||
| 59 | #include <sys/_pthread/_pthread_attr_t.h> | ||
| 60 | #include <sys/_pthread/_pthread_cond_t.h> | ||
| 61 | #include <sys/_pthread/_pthread_condattr_t.h> | ||
| 62 | #include <sys/_pthread/_pthread_key_t.h> | ||
| 63 | #include <sys/_pthread/_pthread_mutex_t.h> | ||
| 64 | #include <sys/_pthread/_pthread_mutexattr_t.h> | ||
| 65 | #include <sys/_pthread/_pthread_once_t.h> | ||
| 66 | #include <sys/_pthread/_pthread_rwlock_t.h> | ||
| 67 | #include <sys/_pthread/_pthread_rwlockattr_t.h> | ||
| 68 | #include <sys/_pthread/_pthread_t.h> | ||
| 69 | |||
| 70 | #include <pthread/qos.h> | ||
| 71 | |||
| 72 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 73 | |||
| 74 | #include <sys/_types/_mach_port_t.h> | ||
| 75 | #include <sys/_types/_sigset_t.h> | ||
| 76 | |||
| 77 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 78 | |||
| 79 | /* | ||
| 80 | * These symbols indicate which [optional] features are available | ||
| 81 | * They can be tested at compile time via '#ifdef XXX' | ||
| 82 | * The way to check for pthreads is like so: | ||
| 83 | |||
| 84 | * #include <unistd.h> | ||
| 85 | * #ifdef _POSIX_THREADS | ||
| 86 | * #include <pthread.h> | ||
| 87 | * #endif | ||
| 88 | |||
| 89 | */ | ||
| 90 | |||
| 91 | /* These will be moved to unistd.h */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Note: These data structures are meant to be opaque. Only enough | ||
| 95 | * structure is exposed to support initializers. | ||
| 96 | * All of the typedefs will be moved to <sys/types.h> | ||
| 97 | */ | ||
| 98 | |||
| 99 | #include <sys/cdefs.h> | ||
| 100 | #include <Availability.h> | ||
| 101 | |||
| 102 | #if __has_feature(assume_nonnull) | ||
| 103 | _Pragma("clang assume_nonnull begin") | ||
| 104 | #endif | ||
| 105 | __BEGIN_DECLS | ||
| 106 | /* | ||
| 107 | * Threads | ||
| 108 | */ | ||
| 109 | |||
| 110 | |||
| 111 | /* | ||
| 112 | * Cancel cleanup handler management. Note, since these are implemented as macros, | ||
| 113 | * they *MUST* occur in matched pairs! | ||
| 114 | */ | ||
| 115 | |||
| 116 | #define pthread_cleanup_push(func, val) \ | ||
| 117 | { \ | ||
| 118 | 	 struct __darwin_pthread_handler_rec __handler; \ | ||
| 119 | 	 pthread_t __self = pthread_self(); \ | ||
| 120 | 	 __handler.__routine = func; \ | ||
| 121 | 	 __handler.__arg = val; \ | ||
| 122 | 	 __handler.__next = __self->__cleanup_stack; \ | ||
| 123 | 	 __self->__cleanup_stack = &__handler; | ||
| 124 | |||
| 125 | #define pthread_cleanup_pop(execute) \ | ||
| 126 | 	 /* Note: 'handler' must be in this same lexical context! */ \ | ||
| 127 | 	 __self->__cleanup_stack = __handler.__next; \ | ||
| 128 | 	 if (execute) (__handler.__routine)(__handler.__arg); \ | ||
| 129 | } | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Thread attributes | ||
| 133 | */ | ||
| 134 | |||
| 135 | #define PTHREAD_CREATE_JOINABLE 1 | ||
| 136 | #define PTHREAD_CREATE_DETACHED 2 | ||
| 137 | |||
| 138 | #define PTHREAD_INHERIT_SCHED 1 | ||
| 139 | #define PTHREAD_EXPLICIT_SCHED 2 | ||
| 140 | |||
| 141 | #define PTHREAD_CANCEL_ENABLE 0x01 /* Cancel takes place at next cancellation point */ | ||
| 142 | #define PTHREAD_CANCEL_DISABLE 0x00 /* Cancel postponed */ | ||
| 143 | #define PTHREAD_CANCEL_DEFERRED 0x02 /* Cancel waits until cancellation point */ | ||
| 144 | #define PTHREAD_CANCEL_ASYNCHRONOUS 0x00 /* Cancel occurs immediately */ | ||
| 145 | |||
| 146 | /* Value returned from pthread_join() when a thread is canceled */ | ||
| 147 | #define PTHREAD_CANCELED	 ((void *) 1) | ||
| 148 | |||
| 149 | /* We only support PTHREAD_SCOPE_SYSTEM */ | ||
| 150 | #define PTHREAD_SCOPE_SYSTEM 1 | ||
| 151 | #define PTHREAD_SCOPE_PROCESS 2 | ||
| 152 | |||
| 153 | #define PTHREAD_PROCESS_SHARED 1 | ||
| 154 | #define PTHREAD_PROCESS_PRIVATE 2 | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Mutex protocol attributes | ||
| 158 | */ | ||
| 159 | #define PTHREAD_PRIO_NONE 0 | ||
| 160 | #define PTHREAD_PRIO_INHERIT 1 | ||
| 161 | #define PTHREAD_PRIO_PROTECT 2 | ||
| 162 | |||
| 163 | /* | ||
| 164 | * Mutex type attributes | ||
| 165 | */ | ||
| 166 | #define PTHREAD_MUTEX_NORMAL		0 | ||
| 167 | #define PTHREAD_MUTEX_ERRORCHECK	1 | ||
| 168 | #define PTHREAD_MUTEX_RECURSIVE		2 | ||
| 169 | #define PTHREAD_MUTEX_DEFAULT		PTHREAD_MUTEX_NORMAL | ||
| 170 | |||
| 171 | /* | ||
| 172 | * Mutex policy attributes | ||
| 173 | */ | ||
| 174 | #define PTHREAD_MUTEX_POLICY_FAIRSHARE_NP 1 | ||
| 175 | #define PTHREAD_MUTEX_POLICY_FIRSTFIT_NP 3 | ||
| 176 | |||
| 177 | /* | ||
| 178 | * RWLock variables | ||
| 179 | */ | ||
| 180 | #define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWLOCK_SIG_init, {0}} | ||
| 181 | |||
| 182 | /* | ||
| 183 | * Mutex variables | ||
| 184 | */ | ||
| 185 | #define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}} | ||
| 186 | |||
| 187 | /* <rdar://problem/10854763> */ | ||
| 188 | #if ((__MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) | ||
| 189 | #	if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) | ||
| 190 | #		define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {_PTHREAD_ERRORCHECK_MUTEX_SIG_init, {0}} | ||
| 191 | #		define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {_PTHREAD_RECURSIVE_MUTEX_SIG_init, {0}} | ||
| 192 | #	endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ | ||
| 193 | #endif | ||
| 194 | |||
| 195 | /* <rdar://problem/25944576> */ | ||
| 196 | #define _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT \ | ||
| 197 | 	defined(SWIFT_CLASS_EXTRA) && (!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH < 1)) | ||
| 198 | |||
| 199 | /* | ||
| 200 | * Condition variable attributes | ||
| 201 | */ | ||
| 202 | |||
| 203 | /* | ||
| 204 | * Condition variables | ||
| 205 | */ | ||
| 206 | |||
| 207 | #define PTHREAD_COND_INITIALIZER {_PTHREAD_COND_SIG_init, {0}} | ||
| 208 | |||
| 209 | /* | ||
| 210 | * Initialization control (once) variables | ||
| 211 | */ | ||
| 212 | |||
| 213 | #define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}} | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Prototypes for all PTHREAD interfaces | ||
| 217 | */ | ||
| 218 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 219 | int pthread_atfork(void (* _Nullable)(void), void (* _Nullable)(void), | ||
| 220 | 		void (* _Nullable)(void)); | ||
| 221 | |||
| 222 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 223 | int pthread_attr_destroy(pthread_attr_t *); | ||
| 224 | |||
| 225 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 226 | int pthread_attr_getdetachstate(const pthread_attr_t *, int *); | ||
| 227 | |||
| 228 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 229 | int pthread_attr_getguardsize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 230 | |||
| 231 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 232 | int pthread_attr_getinheritsched(const pthread_attr_t * __restrict, int * __restrict); | ||
| 233 | |||
| 234 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 235 | int pthread_attr_getschedparam(const pthread_attr_t * __restrict, | ||
| 236 | 		struct sched_param * __restrict); | ||
| 237 | |||
| 238 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 239 | int pthread_attr_getschedpolicy(const pthread_attr_t * __restrict, int * __restrict); | ||
| 240 | |||
| 241 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 242 | int pthread_attr_getscope(const pthread_attr_t * __restrict, int * __restrict); | ||
| 243 | |||
| 244 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 245 | int pthread_attr_getstack(const pthread_attr_t * __restrict, | ||
| 246 | 		void * _Nullable * _Nonnull __restrict, size_t * __restrict); | ||
| 247 | |||
| 248 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 249 | int pthread_attr_getstackaddr(const pthread_attr_t * __restrict, | ||
| 250 | 		void * _Nullable * _Nonnull __restrict); | ||
| 251 | |||
| 252 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 253 | int pthread_attr_getstacksize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 254 | |||
| 255 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 256 | int pthread_attr_init(pthread_attr_t *); | ||
| 257 | |||
| 258 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 259 | int pthread_attr_setdetachstate(pthread_attr_t *, int); | ||
| 260 | |||
| 261 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 262 | int pthread_attr_setguardsize(pthread_attr_t *, size_t); | ||
| 263 | |||
| 264 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 265 | int pthread_attr_setinheritsched(pthread_attr_t *, int); | ||
| 266 | |||
| 267 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 268 | int pthread_attr_setschedparam(pthread_attr_t * __restrict, | ||
| 269 | 		const struct sched_param * __restrict); | ||
| 270 | |||
| 271 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 272 | int pthread_attr_setschedpolicy(pthread_attr_t *, int); | ||
| 273 | |||
| 274 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 275 | int pthread_attr_setscope(pthread_attr_t *, int); | ||
| 276 | |||
| 277 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 278 | int pthread_attr_setstack(pthread_attr_t *, void *, size_t); | ||
| 279 | |||
| 280 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 281 | int pthread_attr_setstackaddr(pthread_attr_t *, void *); | ||
| 282 | |||
| 283 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 284 | int pthread_attr_setstacksize(pthread_attr_t *, size_t); | ||
| 285 | |||
| 286 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 287 | int pthread_cancel(pthread_t) __DARWIN_ALIAS(pthread_cancel); | ||
| 288 | |||
| 289 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 290 | int pthread_cond_broadcast(pthread_cond_t *); | ||
| 291 | |||
| 292 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 293 | int pthread_cond_destroy(pthread_cond_t *); | ||
| 294 | |||
| 295 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 296 | int pthread_cond_init( | ||
| 297 | 		pthread_cond_t * __restrict, | ||
| 298 | 		const pthread_condattr_t * _Nullable __restrict) | ||
| 299 | 		__DARWIN_ALIAS(pthread_cond_init); | ||
| 300 | |||
| 301 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 302 | int pthread_cond_signal(pthread_cond_t *); | ||
| 303 | |||
| 304 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 305 | int pthread_cond_timedwait( | ||
| 306 | 		pthread_cond_t * __restrict, pthread_mutex_t * __restrict, | ||
| 307 | 		const struct timespec * _Nullable __restrict) | ||
| 308 | 		__DARWIN_ALIAS_C(pthread_cond_timedwait); | ||
| 309 | |||
| 310 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 311 | int pthread_cond_wait(pthread_cond_t * __restrict, | ||
| 312 | 		pthread_mutex_t * __restrict) __DARWIN_ALIAS_C(pthread_cond_wait); | ||
| 313 | |||
| 314 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 315 | int pthread_condattr_destroy(pthread_condattr_t *); | ||
| 316 | |||
| 317 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 318 | int pthread_condattr_init(pthread_condattr_t *); | ||
| 319 | |||
| 320 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 321 | int pthread_condattr_getpshared(const pthread_condattr_t * __restrict, | ||
| 322 | 		int * __restrict); | ||
| 323 | |||
| 324 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 325 | int pthread_condattr_setpshared(pthread_condattr_t *, int); | ||
| 326 | |||
| 327 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 328 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 329 | int pthread_create(pthread_t _Nullable * _Nonnull __restrict, | ||
| 330 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 331 | 		void * _Nullable (* _Nonnull)(void * _Nullable), | ||
| 332 | 		void * _Nullable __restrict); | ||
| 333 | #else | ||
| 334 | int pthread_create(pthread_t * __restrict, | ||
| 335 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 336 | 		void *(* _Nonnull)(void *), void * _Nullable __restrict); | ||
| 337 | #endif // _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 338 | |||
| 339 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 340 | int pthread_detach(pthread_t); | ||
| 341 | |||
| 342 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 343 | int pthread_equal(pthread_t _Nullable, pthread_t _Nullable); | ||
| 344 | |||
| 345 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 346 | void pthread_exit(void * _Nullable) __dead2; | ||
| 347 | |||
| 348 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 349 | int pthread_getconcurrency(void); | ||
| 350 | |||
| 351 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 352 | int pthread_getschedparam(pthread_t , int * _Nullable __restrict, | ||
| 353 | 		struct sched_param * _Nullable __restrict); | ||
| 354 | |||
| 355 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 356 | void* _Nullable pthread_getspecific(pthread_key_t); | ||
| 357 | |||
| 358 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 359 | int pthread_join(pthread_t , void * _Nullable * _Nullable) | ||
| 360 | 		__DARWIN_ALIAS_C(pthread_join); | ||
| 361 | |||
| 362 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 363 | int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *)); | ||
| 364 | |||
| 365 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 366 | int pthread_key_delete(pthread_key_t); | ||
| 367 | |||
| 368 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 369 | int pthread_mutex_destroy(pthread_mutex_t *); | ||
| 370 | |||
| 371 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 372 | int pthread_mutex_getprioceiling(const pthread_mutex_t * __restrict, | ||
| 373 | 		int * __restrict); | ||
| 374 | |||
| 375 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 376 | int pthread_mutex_init(pthread_mutex_t * __restrict, | ||
| 377 | 		const pthread_mutexattr_t * _Nullable __restrict); | ||
| 378 | |||
| 379 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 380 | int pthread_mutex_lock(pthread_mutex_t *); | ||
| 381 | |||
| 382 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 383 | int pthread_mutex_setprioceiling(pthread_mutex_t * __restrict, int, | ||
| 384 | 		int * __restrict); | ||
| 385 | |||
| 386 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 387 | int pthread_mutex_trylock(pthread_mutex_t *); | ||
| 388 | |||
| 389 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 390 | int pthread_mutex_unlock(pthread_mutex_t *); | ||
| 391 | |||
| 392 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 393 | int pthread_mutexattr_destroy(pthread_mutexattr_t *) __DARWIN_ALIAS(pthread_mutexattr_destroy); | ||
| 394 | |||
| 395 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 396 | int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t * __restrict, | ||
| 397 | 		int * __restrict); | ||
| 398 | |||
| 399 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 400 | int pthread_mutexattr_getprotocol(const pthread_mutexattr_t * __restrict, | ||
| 401 | 		int * __restrict); | ||
| 402 | |||
| 403 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 404 | int pthread_mutexattr_getpshared(const pthread_mutexattr_t * __restrict, | ||
| 405 | 		int * __restrict); | ||
| 406 | |||
| 407 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 408 | int pthread_mutexattr_gettype(const pthread_mutexattr_t * __restrict, | ||
| 409 | 		int * __restrict); | ||
| 410 | |||
| 411 | __API_AVAILABLE(macos(10.13.4), ios(11.3), watchos(4.3), tvos(11.3)) | ||
| 412 | int pthread_mutexattr_getpolicy_np(const pthread_mutexattr_t * __restrict, | ||
| 413 | 		int * __restrict); | ||
| 414 | |||
| 415 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 416 | int pthread_mutexattr_init(pthread_mutexattr_t *); | ||
| 417 | |||
| 418 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 419 | int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int); | ||
| 420 | |||
| 421 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 422 | int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int); | ||
| 423 | |||
| 424 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 425 | int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); | ||
| 426 | |||
| 427 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 428 | int pthread_mutexattr_settype(pthread_mutexattr_t *, int); | ||
| 429 | |||
| 430 | __API_AVAILABLE(macos(10.7), ios(5.0)) | ||
| 431 | int pthread_mutexattr_setpolicy_np(pthread_mutexattr_t *, int); | ||
| 432 | |||
| 433 | __SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead") | ||
| 434 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 435 | int pthread_once(pthread_once_t *, void (* _Nonnull)(void)); | ||
| 436 | |||
| 437 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 438 | int pthread_rwlock_destroy(pthread_rwlock_t * ) __DARWIN_ALIAS(pthread_rwlock_destroy); | ||
| 439 | |||
| 440 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 441 | int pthread_rwlock_init(pthread_rwlock_t * __restrict, | ||
| 442 | 		const pthread_rwlockattr_t * _Nullable __restrict) | ||
| 443 | 		__DARWIN_ALIAS(pthread_rwlock_init); | ||
| 444 | |||
| 445 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 446 | int pthread_rwlock_rdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_rdlock); | ||
| 447 | |||
| 448 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 449 | int pthread_rwlock_tryrdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_tryrdlock); | ||
| 450 | |||
| 451 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 452 | int pthread_rwlock_trywrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_trywrlock); | ||
| 453 | |||
| 454 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 455 | int pthread_rwlock_wrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_wrlock); | ||
| 456 | |||
| 457 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 458 | int pthread_rwlock_unlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_unlock); | ||
| 459 | |||
| 460 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 461 | int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); | ||
| 462 | |||
| 463 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 464 | int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t * __restrict, | ||
| 465 | 		int * __restrict); | ||
| 466 | |||
| 467 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 468 | int pthread_rwlockattr_init(pthread_rwlockattr_t *); | ||
| 469 | |||
| 470 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 471 | int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); | ||
| 472 | |||
| 473 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 474 | pthread_t pthread_self(void); | ||
| 475 | |||
| 476 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 477 | int pthread_setcancelstate(int , int * _Nullable) | ||
| 478 | 		__DARWIN_ALIAS(pthread_setcancelstate); | ||
| 479 | |||
| 480 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 481 | int pthread_setcanceltype(int , int * _Nullable) | ||
| 482 | 		__DARWIN_ALIAS(pthread_setcanceltype); | ||
| 483 | |||
| 484 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 485 | int pthread_setconcurrency(int); | ||
| 486 | |||
| 487 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 488 | int pthread_setschedparam(pthread_t, int, const struct sched_param *); | ||
| 489 | |||
| 490 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 491 | int pthread_setspecific(pthread_key_t , const void * _Nullable); | ||
| 492 | |||
| 493 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 494 | void pthread_testcancel(void) __DARWIN_ALIAS(pthread_testcancel); | ||
| 495 | |||
| 496 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 497 | |||
| 498 | /* returns non-zero if pthread_create or cthread_fork have been called */ | ||
| 499 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 500 | int pthread_is_threaded_np(void); | ||
| 501 | |||
| 502 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 503 | int pthread_threadid_np(pthread_t _Nullable,__uint64_t* _Nullable); | ||
| 504 | |||
| 505 | /*SPI to set and get pthread name*/ | ||
| 506 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 507 | int	pthread_getname_np(pthread_t,char*,size_t); | ||
| 508 | |||
| 509 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 510 | int	pthread_setname_np(const char*); | ||
| 511 | |||
| 512 | /* returns non-zero if the current thread is the main thread */ | ||
| 513 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 514 | int	pthread_main_np(void); | ||
| 515 | |||
| 516 | /* return the mach thread bound to the pthread */ | ||
| 517 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 518 | mach_port_t pthread_mach_thread_np(pthread_t); | ||
| 519 | |||
| 520 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 521 | size_t pthread_get_stacksize_np(pthread_t); | ||
| 522 | |||
| 523 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 524 | void* pthread_get_stackaddr_np(pthread_t); | ||
| 525 | |||
| 526 | /* Like pthread_cond_signal(), but only wake up the specified pthread */ | ||
| 527 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 528 | int pthread_cond_signal_thread_np(pthread_cond_t *, pthread_t _Nullable); | ||
| 529 | |||
| 530 | /* Like pthread_cond_timedwait, but use a relative timeout */ | ||
| 531 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 532 | int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *, | ||
| 533 | 		const struct timespec * _Nullable); | ||
| 534 | |||
| 535 | /* Like pthread_create(), but leaves the thread suspended */ | ||
| 536 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 537 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 538 | int pthread_create_suspended_np( | ||
| 539 | 		pthread_t _Nullable * _Nonnull, const pthread_attr_t * _Nullable, | ||
| 540 | 		void * _Nullable (* _Nonnull)(void * _Nullable), void * _Nullable); | ||
| 541 | #else | ||
| 542 | int pthread_create_suspended_np(pthread_t *, const pthread_attr_t * _Nullable, | ||
| 543 | 		void *(* _Nonnull)(void *), void * _Nullable); | ||
| 544 | #endif | ||
| 545 | |||
| 546 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 547 | int pthread_kill(pthread_t, int); | ||
| 548 | |||
| 549 | __API_AVAILABLE(macos(10.5), ios(2.0)) | ||
| 550 | _Nullable pthread_t pthread_from_mach_thread_np(mach_port_t); | ||
| 551 | |||
| 552 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 553 | int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable) | ||
| 554 | 		__DARWIN_ALIAS(pthread_sigmask); | ||
| 555 | |||
| 556 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 557 | void pthread_yield_np(void); | ||
| 558 | |||
| 559 | __API_AVAILABLE(macos(11.0)) | ||
| 560 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 561 | void pthread_jit_write_protect_np(int enabled); | ||
| 562 | |||
| 563 | __API_AVAILABLE(macos(11.0)) | ||
| 564 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 565 | int pthread_jit_write_protect_supported_np(void); | ||
| 566 | |||
| 567 | /*! | ||
| 568 | * @function pthread_cpu_number_np | ||
| 569 | * | ||
| 570 | * @param cpu_number_out | ||
| 571 | * The CPU number that the thread was running on at the time of query. | ||
| 572 | * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu")) | ||
| 573 | * | ||
| 574 | * @result | ||
| 575 | * This function returns 0 or the value of errno if an error occurred. | ||
| 576 | * | ||
| 577 | * @note | ||
| 578 | * Optimizations of per-CPU datastructures based on the result of this function | ||
| 579 | * still require synchronization since it is not guaranteed that the thread will | ||
| 580 | * still be on the same CPU by the time the function returns. | ||
| 581 | */ | ||
| 582 | __API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1)) | ||
| 583 | int | ||
| 584 | pthread_cpu_number_np(size_t *cpu_number_out); | ||
| 585 | |||
| 586 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 587 | __END_DECLS | ||
| 588 | #if __has_feature(assume_nonnull) | ||
| 589 | _Pragma("clang assume_nonnull end") | ||
| 590 | #endif | ||
| 591 | |||
| 592 | #endif /* _PTHREAD_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/simd/common.h deleted-4458| ... | @@ -1,4458 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide "common" elementwise | ||
| 3 | * operations that are neither math nor logic functions. These are available | ||
| 4 | * only for floating-point vectors and scalars, except for min, max, abs, | ||
| 5 | * clamp, and the reduce operations, which also support integer vectors. | ||
| 6 | * | ||
| 7 | * simd_abs(x) Absolute value of x. Also available as fabs | ||
| 8 | * for floating-point vectors. If x is the | ||
| 9 | * smallest signed integer, x is returned. | ||
| 10 | * | ||
| 11 | * simd_max(x,y) Returns the maximum of x and y. Also available | ||
| 12 | * as fmax for floating-point vectors. | ||
| 13 | * | ||
| 14 | * simd_min(x,y) Returns the minimum of x and y. Also available | ||
| 15 | * as fmin for floating-point vectors. | ||
| 16 | * | ||
| 17 | * simd_clamp(x,min,max) x clamped to the range [min, max]. | ||
| 18 | * | ||
| 19 | * simd_sign(x) -1 if x is less than zero, 0 if x is zero or | ||
| 20 | * NaN, and +1 if x is greater than zero. | ||
| 21 | * | ||
| 22 | * simd_mix(x,y,t) If t is not in the range [0,1], the result is | ||
| 23 | * undefined. Otherwise the result is x+(y-x)*t, | ||
| 24 | * which linearly interpolates between x and y. | ||
| 25 | * | ||
| 26 | * simd_recip(x) An approximation to 1/x. If x is very near the | ||
| 27 | * limits of representable values, or is infinity | ||
| 28 | * or NaN, the result is undefined. There are | ||
| 29 | * two variants of this function: | ||
| 30 | * | ||
| 31 | * simd_precise_recip(x) | ||
| 32 | * | ||
| 33 | * and | ||
| 34 | * | ||
| 35 | * simd_fast_recip(x). | ||
| 36 | * | ||
| 37 | * The "precise" variant is accurate to a few ULPs, | ||
| 38 | * whereas the "fast" variant may have as little | ||
| 39 | * as 11 bits of accuracy in float and about 22 | ||
| 40 | * bits in double. | ||
| 41 | * | ||
| 42 | * The function simd_recip(x) resolves to | ||
| 43 | * simd_precise_recip(x) ordinarily, but to | ||
| 44 | * simd_fast_recip(x) when used in a translation | ||
| 45 | * unit compiled with -ffast-math (when | ||
| 46 | * -ffast-math is in effect, you may still use the | ||
| 47 | * precise version of this function by calling it | ||
| 48 | * explicitly by name). | ||
| 49 | * | ||
| 50 | * simd_rsqrt(x) An approximation to 1/sqrt(x). If x is | ||
| 51 | * infinity or NaN, the result is undefined. | ||
| 52 | * There are two variants of this function: | ||
| 53 | * | ||
| 54 | * simd_precise_rsqrt(x) | ||
| 55 | * | ||
| 56 | * and | ||
| 57 | * | ||
| 58 | * simd_fast_rsqrt(x). | ||
| 59 | * | ||
| 60 | * The "precise" variant is accurate to a few ULPs, | ||
| 61 | * whereas the "fast" variant may have as little | ||
| 62 | * as 11 bits of accuracy in float and about 22 | ||
| 63 | * bits in double. | ||
| 64 | * | ||
| 65 | * The function simd_rsqrt(x) resolves to | ||
| 66 | * simd_precise_rsqrt(x) ordinarily, but to | ||
| 67 | * simd_fast_rsqrt(x) when used in a translation | ||
| 68 | * unit compiled with -ffast-math (when | ||
| 69 | * -ffast-math is in effect, you may still use the | ||
| 70 | * precise version of this function by calling it | ||
| 71 | * explicitly by name). | ||
| 72 | * | ||
| 73 | * simd_fract(x) The "fractional part" of x, which lies strictly | ||
| 74 | * in the range [0, 0x1.fffffep-1]. | ||
| 75 | * | ||
| 76 | * simd_step(edge,x) 0 if x < edge, and 1 otherwise. | ||
| 77 | * | ||
| 78 | * simd_smoothstep(edge0,edge1,x) 0 if x <= edge0, 1 if x >= edge1, and | ||
| 79 | * a Hermite interpolation between 0 and 1 if | ||
| 80 | * edge0 < x < edge1. | ||
| 81 | * | ||
| 82 | * simd_reduce_add(x) Sum of the elements of x. | ||
| 83 | * | ||
| 84 | * simd_reduce_min(x) Minimum of the elements of x. | ||
| 85 | * | ||
| 86 | * simd_reduce_max(x) Maximum of the elements of x. | ||
| 87 | * | ||
| 88 | * simd_equal(x,y) True if and only if every lane of x is equal | ||
| 89 | * to the corresponding lane of y. | ||
| 90 | * | ||
| 91 | * The following common functions are available in the simd:: namespace: | ||
| 92 | * | ||
| 93 | * C++ Function Equivalent C Function | ||
| 94 | * -------------------------------------------------------------------- | ||
| 95 | * simd::abs(x) simd_abs(x) | ||
| 96 | * simd::max(x,y) simd_max(x,y) | ||
| 97 | * simd::min(x,y) simd_min(x,y) | ||
| 98 | * simd::clamp(x,min,max) simd_clamp(x,min,max) | ||
| 99 | * simd::sign(x) simd_sign(x) | ||
| 100 | * simd::mix(x,y,t) simd_mix(x,y,t) | ||
| 101 | * simd::recip(x) simd_recip(x) | ||
| 102 | * simd::rsqrt(x) simd_rsqrt(x) | ||
| 103 | * simd::fract(x) simd_fract(x) | ||
| 104 | * simd::step(edge,x) simd_step(edge,x) | ||
| 105 | * simd::smoothstep(e0,e1,x) simd_smoothstep(e0,e1,x) | ||
| 106 | * simd::reduce_add(x) simd_reduce_add(x) | ||
| 107 | * simd::reduce_max(x) simd_reduce_max(x) | ||
| 108 | * simd::reduce_min(x) simd_reduce_min(x) | ||
| 109 | * simd::equal(x,y) simd_equal(x,y) | ||
| 110 | * | ||
| 111 | * simd::precise::recip(x) simd_precise_recip(x) | ||
| 112 | * simd::precise::rsqrt(x) simd_precise_rsqrt(x) | ||
| 113 | * | ||
| 114 | * simd::fast::recip(x) simd_fast_recip(x) | ||
| 115 | * simd::fast::rsqrt(x) simd_fast_rsqrt(x) | ||
| 116 | * | ||
| 117 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 118 | * @unsorted */ | ||
| 119 | |||
| 120 | #ifndef SIMD_COMMON_HEADER | ||
| 121 | #define SIMD_COMMON_HEADER | ||
| 122 | |||
| 123 | #include <simd/base.h> | ||
| 124 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 125 | #include <simd/vector_make.h> | ||
| 126 | #include <simd/logic.h> | ||
| 127 | #include <simd/math.h> | ||
| 128 | |||
| 129 | #ifdef __cplusplus | ||
| 130 | extern "C" { | ||
| 131 | #endif | ||
| 132 | |||
| 133 | /*! @abstract The elementwise absolute value of x. */ | ||
| 134 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x); | ||
| 135 | /*! @abstract The elementwise absolute value of x. */ | ||
| 136 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x); | ||
| 137 | /*! @abstract The elementwise absolute value of x. */ | ||
| 138 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x); | ||
| 139 | /*! @abstract The elementwise absolute value of x. */ | ||
| 140 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x); | ||
| 141 | /*! @abstract The elementwise absolute value of x. */ | ||
| 142 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x); | ||
| 143 | /*! @abstract The elementwise absolute value of x. */ | ||
| 144 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x); | ||
| 145 | /*! @abstract The elementwise absolute value of x. */ | ||
| 146 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x); | ||
| 147 | /*! @abstract The elementwise absolute value of x. */ | ||
| 148 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x); | ||
| 149 | /*! @abstract The elementwise absolute value of x. */ | ||
| 150 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x); | ||
| 151 | /*! @abstract The elementwise absolute value of x. */ | ||
| 152 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x); | ||
| 153 | /*! @abstract The elementwise absolute value of x. */ | ||
| 154 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x); | ||
| 155 | /*! @abstract The elementwise absolute value of x. */ | ||
| 156 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x); | ||
| 157 | /*! @abstract The elementwise absolute value of x. */ | ||
| 158 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x); | ||
| 159 | /*! @abstract The elementwise absolute value of x. */ | ||
| 160 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x); | ||
| 161 | /*! @abstract The elementwise absolute value of x. */ | ||
| 162 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x); | ||
| 163 | /*! @abstract The elementwise absolute value of x. */ | ||
| 164 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x); | ||
| 165 | /*! @abstract The elementwise absolute value of x. */ | ||
| 166 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x); | ||
| 167 | /*! @abstract The elementwise absolute value of x. */ | ||
| 168 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x); | ||
| 169 | /*! @abstract The elementwise absolute value of x. */ | ||
| 170 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x); | ||
| 171 | /*! @abstract The elementwise absolute value of x. */ | ||
| 172 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x); | ||
| 173 | /*! @abstract The elementwise absolute value of x. */ | ||
| 174 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x); | ||
| 175 | /*! @abstract The elementwise absolute value of x. */ | ||
| 176 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x); | ||
| 177 | /*! @abstract The elementwise absolute value of x. */ | ||
| 178 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x); | ||
| 179 | /*! @abstract The elementwise absolute value of x. */ | ||
| 180 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x); | ||
| 181 | /*! @abstract The elementwise absolute value of x. */ | ||
| 182 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x); | ||
| 183 | /*! @abstract The elementwise absolute value of x. */ | ||
| 184 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x); | ||
| 185 | /*! @abstract The elementwise absolute value of x. */ | ||
| 186 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x); | ||
| 187 | /*! @abstract The elementwise absolute value of x. */ | ||
| 188 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x); | ||
| 189 | /*! @abstract The elementwise absolute value of x. */ | ||
| 190 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x); | ||
| 191 | /*! @abstract The elementwise absolute value of x. */ | ||
| 192 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x); | ||
| 193 | /*! @abstract The elementwise absolute value of x. */ | ||
| 194 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x); | ||
| 195 | /*! @abstract The elementwise absolute value of x. | ||
| 196 | * @discussion Deprecated. Use simd_abs(x) instead. */ | ||
| 197 | #define vector_abs simd_abs | ||
| 198 | |||
| 199 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 200 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y); | ||
| 201 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 202 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y); | ||
| 203 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 204 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y); | ||
| 205 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 206 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y); | ||
| 207 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 208 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y); | ||
| 209 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 210 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y); | ||
| 211 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 212 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y); | ||
| 213 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 214 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y); | ||
| 215 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 216 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y); | ||
| 217 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 218 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y); | ||
| 219 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 220 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y); | ||
| 221 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 222 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y); | ||
| 223 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 224 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y); | ||
| 225 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 226 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y); | ||
| 227 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 228 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y); | ||
| 229 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 230 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y); | ||
| 231 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 232 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y); | ||
| 233 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 234 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y); | ||
| 235 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 236 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y); | ||
| 237 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 238 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y); | ||
| 239 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 240 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y); | ||
| 241 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 242 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y); | ||
| 243 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 244 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y); | ||
| 245 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 246 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y); | ||
| 247 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 248 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y); | ||
| 249 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 250 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y); | ||
| 251 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 252 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y); | ||
| 253 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 254 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y); | ||
| 255 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 256 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y); | ||
| 257 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 258 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y); | ||
| 259 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 260 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y); | ||
| 261 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 262 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y); | ||
| 263 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 264 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y); | ||
| 265 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 266 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y); | ||
| 267 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 268 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y); | ||
| 269 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 270 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y); | ||
| 271 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 272 | static inline SIMD_CFUNC float simd_max(float x, float y); | ||
| 273 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 274 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y); | ||
| 275 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 276 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y); | ||
| 277 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 278 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y); | ||
| 279 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 280 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y); | ||
| 281 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 282 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y); | ||
| 283 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 284 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y); | ||
| 285 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 286 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y); | ||
| 287 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 288 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y); | ||
| 289 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 290 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y); | ||
| 291 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 292 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y); | ||
| 293 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 294 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y); | ||
| 295 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 296 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y); | ||
| 297 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 298 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y); | ||
| 299 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 300 | static inline SIMD_CFUNC double simd_max(double x, double y); | ||
| 301 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 302 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y); | ||
| 303 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 304 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y); | ||
| 305 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 306 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y); | ||
| 307 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 308 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y); | ||
| 309 | /*! @abstract The elementwise maximum of x and y. | ||
| 310 | * @discussion Deprecated. Use simd_max(x,y) instead. */ | ||
| 311 | #define vector_max simd_max | ||
| 312 | |||
| 313 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 314 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y); | ||
| 315 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 316 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y); | ||
| 317 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 318 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y); | ||
| 319 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 320 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y); | ||
| 321 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 322 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y); | ||
| 323 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 324 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y); | ||
| 325 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 326 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y); | ||
| 327 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 328 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y); | ||
| 329 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 330 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y); | ||
| 331 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 332 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y); | ||
| 333 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 334 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y); | ||
| 335 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 336 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y); | ||
| 337 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 338 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y); | ||
| 339 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 340 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y); | ||
| 341 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 342 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y); | ||
| 343 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 344 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y); | ||
| 345 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 346 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y); | ||
| 347 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 348 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y); | ||
| 349 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 350 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y); | ||
| 351 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 352 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y); | ||
| 353 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 354 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y); | ||
| 355 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 356 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y); | ||
| 357 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 358 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y); | ||
| 359 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 360 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y); | ||
| 361 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 362 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y); | ||
| 363 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 364 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y); | ||
| 365 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 366 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y); | ||
| 367 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 368 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y); | ||
| 369 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 370 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y); | ||
| 371 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 372 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y); | ||
| 373 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 374 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y); | ||
| 375 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 376 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y); | ||
| 377 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 378 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y); | ||
| 379 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 380 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y); | ||
| 381 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 382 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y); | ||
| 383 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 384 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y); | ||
| 385 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 386 | static inline SIMD_CFUNC float simd_min(float x, float y); | ||
| 387 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 388 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y); | ||
| 389 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 390 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y); | ||
| 391 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 392 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y); | ||
| 393 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 394 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y); | ||
| 395 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 396 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y); | ||
| 397 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 398 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y); | ||
| 399 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 400 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y); | ||
| 401 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 402 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y); | ||
| 403 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 404 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y); | ||
| 405 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 406 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y); | ||
| 407 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 408 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y); | ||
| 409 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 410 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y); | ||
| 411 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 412 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y); | ||
| 413 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 414 | static inline SIMD_CFUNC double simd_min(double x, double y); | ||
| 415 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 416 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y); | ||
| 417 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 418 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y); | ||
| 419 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 420 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y); | ||
| 421 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 422 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y); | ||
| 423 | /*! @abstract The elementwise minimum of x and y. | ||
| 424 | * @discussion Deprecated. Use simd_min(x,y) instead. */ | ||
| 425 | #define vector_min simd_min | ||
| 426 | |||
| 427 | |||
| 428 | /*! @abstract x clamped to the range [min, max]. | ||
| 429 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 430 | * you can use a scalar value for min and max. */ | ||
| 431 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max); | ||
| 432 | /*! @abstract x clamped to the range [min, max]. | ||
| 433 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 434 | * you can use a scalar value for min and max. */ | ||
| 435 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max); | ||
| 436 | /*! @abstract x clamped to the range [min, max]. | ||
| 437 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 438 | * you can use a scalar value for min and max. */ | ||
| 439 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max); | ||
| 440 | /*! @abstract x clamped to the range [min, max]. | ||
| 441 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 442 | * you can use a scalar value for min and max. */ | ||
| 443 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max); | ||
| 444 | /*! @abstract x clamped to the range [min, max]. | ||
| 445 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 446 | * you can use a scalar value for min and max. */ | ||
| 447 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max); | ||
| 448 | /*! @abstract x clamped to the range [min, max]. | ||
| 449 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 450 | * you can use a scalar value for min and max. */ | ||
| 451 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max); | ||
| 452 | /*! @abstract x clamped to the range [min, max]. | ||
| 453 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 454 | * you can use a scalar value for min and max. */ | ||
| 455 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max); | ||
| 456 | /*! @abstract x clamped to the range [min, max]. | ||
| 457 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 458 | * you can use a scalar value for min and max. */ | ||
| 459 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max); | ||
| 460 | /*! @abstract x clamped to the range [min, max]. | ||
| 461 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 462 | * you can use a scalar value for min and max. */ | ||
| 463 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max); | ||
| 464 | /*! @abstract x clamped to the range [min, max]. | ||
| 465 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 466 | * you can use a scalar value for min and max. */ | ||
| 467 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max); | ||
| 468 | /*! @abstract x clamped to the range [min, max]. | ||
| 469 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 470 | * you can use a scalar value for min and max. */ | ||
| 471 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max); | ||
| 472 | /*! @abstract x clamped to the range [min, max]. | ||
| 473 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 474 | * you can use a scalar value for min and max. */ | ||
| 475 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max); | ||
| 476 | /*! @abstract x clamped to the range [min, max]. | ||
| 477 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 478 | * you can use a scalar value for min and max. */ | ||
| 479 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max); | ||
| 480 | /*! @abstract x clamped to the range [min, max]. | ||
| 481 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 482 | * you can use a scalar value for min and max. */ | ||
| 483 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max); | ||
| 484 | /*! @abstract x clamped to the range [min, max]. | ||
| 485 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 486 | * you can use a scalar value for min and max. */ | ||
| 487 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max); | ||
| 488 | /*! @abstract x clamped to the range [min, max]. | ||
| 489 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 490 | * you can use a scalar value for min and max. */ | ||
| 491 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max); | ||
| 492 | /*! @abstract x clamped to the range [min, max]. | ||
| 493 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 494 | * you can use a scalar value for min and max. */ | ||
| 495 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max); | ||
| 496 | /*! @abstract x clamped to the range [min, max]. | ||
| 497 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 498 | * you can use a scalar value for min and max. */ | ||
| 499 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max); | ||
| 500 | /*! @abstract x clamped to the range [min, max]. | ||
| 501 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 502 | * you can use a scalar value for min and max. */ | ||
| 503 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max); | ||
| 504 | /*! @abstract x clamped to the range [min, max]. | ||
| 505 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 506 | * you can use a scalar value for min and max. */ | ||
| 507 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max); | ||
| 508 | /*! @abstract x clamped to the range [min, max]. | ||
| 509 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 510 | * you can use a scalar value for min and max. */ | ||
| 511 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max); | ||
| 512 | /*! @abstract x clamped to the range [min, max]. | ||
| 513 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 514 | * you can use a scalar value for min and max. */ | ||
| 515 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max); | ||
| 516 | /*! @abstract x clamped to the range [min, max]. | ||
| 517 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 518 | * you can use a scalar value for min and max. */ | ||
| 519 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max); | ||
| 520 | /*! @abstract x clamped to the range [min, max]. | ||
| 521 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 522 | * you can use a scalar value for min and max. */ | ||
| 523 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max); | ||
| 524 | /*! @abstract x clamped to the range [min, max]. | ||
| 525 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 526 | * you can use a scalar value for min and max. */ | ||
| 527 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max); | ||
| 528 | /*! @abstract x clamped to the range [min, max]. | ||
| 529 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 530 | * you can use a scalar value for min and max. */ | ||
| 531 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max); | ||
| 532 | /*! @abstract x clamped to the range [min, max]. | ||
| 533 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 534 | * you can use a scalar value for min and max. */ | ||
| 535 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max); | ||
| 536 | /*! @abstract x clamped to the range [min, max]. | ||
| 537 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 538 | * you can use a scalar value for min and max. */ | ||
| 539 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max); | ||
| 540 | /*! @abstract x clamped to the range [min, max]. | ||
| 541 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 542 | * you can use a scalar value for min and max. */ | ||
| 543 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max); | ||
| 544 | /*! @abstract x clamped to the range [min, max]. | ||
| 545 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 546 | * you can use a scalar value for min and max. */ | ||
| 547 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max); | ||
| 548 | /*! @abstract x clamped to the range [min, max]. | ||
| 549 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 550 | * you can use a scalar value for min and max. */ | ||
| 551 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max); | ||
| 552 | /*! @abstract x clamped to the range [min, max]. | ||
| 553 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 554 | * you can use a scalar value for min and max. */ | ||
| 555 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max); | ||
| 556 | /*! @abstract x clamped to the range [min, max]. | ||
| 557 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 558 | * you can use a scalar value for min and max. */ | ||
| 559 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max); | ||
| 560 | /*! @abstract x clamped to the range [min, max]. | ||
| 561 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 562 | * you can use a scalar value for min and max. */ | ||
| 563 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max); | ||
| 564 | /*! @abstract x clamped to the range [min, max]. | ||
| 565 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 566 | * you can use a scalar value for min and max. */ | ||
| 567 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max); | ||
| 568 | /*! @abstract x clamped to the range [min, max]. | ||
| 569 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 570 | * you can use a scalar value for min and max. */ | ||
| 571 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max); | ||
| 572 | /*! @abstract x clamped to the range [min, max]. | ||
| 573 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 574 | * you can use a scalar value for min and max. */ | ||
| 575 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max); | ||
| 576 | /*! @abstract x clamped to the range [min, max]. | ||
| 577 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 578 | * you can use a scalar value for min and max. */ | ||
| 579 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max); | ||
| 580 | /*! @abstract x clamped to the range [min, max]. | ||
| 581 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 582 | * you can use a scalar value for min and max. */ | ||
| 583 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max); | ||
| 584 | /*! @abstract x clamped to the range [min, max]. | ||
| 585 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 586 | * you can use a scalar value for min and max. */ | ||
| 587 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max); | ||
| 588 | /*! @abstract x clamped to the range [min, max]. | ||
| 589 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 590 | * you can use a scalar value for min and max. */ | ||
| 591 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max); | ||
| 592 | /*! @abstract x clamped to the range [min, max]. | ||
| 593 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 594 | * you can use a scalar value for min and max. */ | ||
| 595 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max); | ||
| 596 | /*! @abstract x clamped to the range [min, max]. | ||
| 597 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 598 | * you can use a scalar value for min and max. */ | ||
| 599 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max); | ||
| 600 | /*! @abstract x clamped to the range [min, max]. | ||
| 601 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 602 | * you can use a scalar value for min and max. */ | ||
| 603 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max); | ||
| 604 | /*! @abstract x clamped to the range [min, max]. | ||
| 605 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 606 | * you can use a scalar value for min and max. */ | ||
| 607 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max); | ||
| 608 | /*! @abstract x clamped to the range [min, max]. | ||
| 609 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 610 | * you can use a scalar value for min and max. */ | ||
| 611 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max); | ||
| 612 | /*! @abstract x clamped to the range [min, max]. | ||
| 613 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 614 | * you can use a scalar value for min and max. */ | ||
| 615 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max); | ||
| 616 | /*! @abstract x clamped to the range [min, max]. | ||
| 617 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 618 | * you can use a scalar value for min and max. */ | ||
| 619 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max); | ||
| 620 | /*! @abstract x clamped to the range [min, max]. | ||
| 621 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 622 | * you can use a scalar value for min and max. */ | ||
| 623 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max); | ||
| 624 | /*! @abstract x clamped to the range [min, max]. | ||
| 625 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 626 | * you can use a scalar value for min and max. */ | ||
| 627 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max); | ||
| 628 | /*! @abstract x clamped to the range [min, max]. | ||
| 629 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 630 | * you can use a scalar value for min and max. */ | ||
| 631 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max); | ||
| 632 | /*! @abstract x clamped to the range [min, max]. | ||
| 633 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 634 | * you can use a scalar value for min and max. */ | ||
| 635 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max); | ||
| 636 | /*! @abstract x clamped to the range [min, max]. | ||
| 637 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 638 | * you can use a scalar value for min and max. */ | ||
| 639 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max); | ||
| 640 | /*! @abstract x clamped to the range [min, max]. | ||
| 641 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 642 | * you can use a scalar value for min and max. */ | ||
| 643 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max); | ||
| 644 | /*! @abstract x clamped to the range [min, max]. | ||
| 645 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 646 | * you can use a scalar value for min and max. */ | ||
| 647 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max); | ||
| 648 | /*! @abstract x clamped to the range [min, max]. | ||
| 649 | * @discussion Deprecated. Use simd_clamp(x,min,max) instead. */ | ||
| 650 | #define vector_clamp simd_clamp | ||
| 651 | |||
| 652 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 653 | static inline SIMD_CFUNC float simd_sign(float x); | ||
| 654 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 655 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x); | ||
| 656 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 657 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x); | ||
| 658 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 659 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x); | ||
| 660 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 661 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x); | ||
| 662 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 663 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x); | ||
| 664 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 665 | static inline SIMD_CFUNC double simd_sign(double x); | ||
| 666 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 667 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x); | ||
| 668 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 669 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x); | ||
| 670 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 671 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x); | ||
| 672 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 673 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x); | ||
| 674 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. | ||
| 675 | * @discussion Deprecated. Use simd_sign(x) instead. */ | ||
| 676 | #define vector_sign simd_sign | ||
| 677 | |||
| 678 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 679 | * t=0 and y when t=1 */ | ||
| 680 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t); | ||
| 681 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 682 | * t=0 and y when t=1 */ | ||
| 683 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t); | ||
| 684 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 685 | * t=0 and y when t=1 */ | ||
| 686 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t); | ||
| 687 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 688 | * t=0 and y when t=1 */ | ||
| 689 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t); | ||
| 690 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 691 | * t=0 and y when t=1 */ | ||
| 692 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t); | ||
| 693 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 694 | * t=0 and y when t=1 */ | ||
| 695 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t); | ||
| 696 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 697 | * t=0 and y when t=1 */ | ||
| 698 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t); | ||
| 699 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 700 | * t=0 and y when t=1 */ | ||
| 701 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t); | ||
| 702 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 703 | * t=0 and y when t=1 */ | ||
| 704 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t); | ||
| 705 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 706 | * t=0 and y when t=1 */ | ||
| 707 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t); | ||
| 708 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 709 | * t=0 and y when t=1 */ | ||
| 710 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t); | ||
| 711 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 712 | * t=0 and y when t=1 | ||
| 713 | * @discussion Deprecated. Use simd_mix(x, y, t) instead. */ | ||
| 714 | #define vector_mix simd_mix | ||
| 715 | |||
| 716 | /*! @abstract A good approximation to 1/x. | ||
| 717 | * @discussion If x is very close to the limits of representation, the | ||
| 718 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 719 | * a few units in the last place (ULPs). */ | ||
| 720 | static inline SIMD_CFUNC float simd_precise_recip(float x); | ||
| 721 | /*! @abstract A good approximation to 1/x. | ||
| 722 | * @discussion If x is very close to the limits of representation, the | ||
| 723 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 724 | * a few units in the last place (ULPs). */ | ||
| 725 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x); | ||
| 726 | /*! @abstract A good approximation to 1/x. | ||
| 727 | * @discussion If x is very close to the limits of representation, the | ||
| 728 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 729 | * a few units in the last place (ULPs). */ | ||
| 730 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x); | ||
| 731 | /*! @abstract A good approximation to 1/x. | ||
| 732 | * @discussion If x is very close to the limits of representation, the | ||
| 733 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 734 | * a few units in the last place (ULPs). */ | ||
| 735 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x); | ||
| 736 | /*! @abstract A good approximation to 1/x. | ||
| 737 | * @discussion If x is very close to the limits of representation, the | ||
| 738 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 739 | * a few units in the last place (ULPs). */ | ||
| 740 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x); | ||
| 741 | /*! @abstract A good approximation to 1/x. | ||
| 742 | * @discussion If x is very close to the limits of representation, the | ||
| 743 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 744 | * a few units in the last place (ULPs). */ | ||
| 745 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x); | ||
| 746 | /*! @abstract A good approximation to 1/x. | ||
| 747 | * @discussion If x is very close to the limits of representation, the | ||
| 748 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 749 | * a few units in the last place (ULPs). */ | ||
| 750 | static inline SIMD_CFUNC double simd_precise_recip(double x); | ||
| 751 | /*! @abstract A good approximation to 1/x. | ||
| 752 | * @discussion If x is very close to the limits of representation, the | ||
| 753 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 754 | * a few units in the last place (ULPs). */ | ||
| 755 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x); | ||
| 756 | /*! @abstract A good approximation to 1/x. | ||
| 757 | * @discussion If x is very close to the limits of representation, the | ||
| 758 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 759 | * a few units in the last place (ULPs). */ | ||
| 760 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x); | ||
| 761 | /*! @abstract A good approximation to 1/x. | ||
| 762 | * @discussion If x is very close to the limits of representation, the | ||
| 763 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 764 | * a few units in the last place (ULPs). */ | ||
| 765 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x); | ||
| 766 | /*! @abstract A good approximation to 1/x. | ||
| 767 | * @discussion If x is very close to the limits of representation, the | ||
| 768 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 769 | * a few units in the last place (ULPs). */ | ||
| 770 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x); | ||
| 771 | /*! @abstract A good approximation to 1/x. | ||
| 772 | * @discussion Deprecated. Use simd_precise_recip(x) instead. */ | ||
| 773 | #define vector_precise_recip simd_precise_recip | ||
| 774 | |||
| 775 | /*! @abstract A fast approximation to 1/x. | ||
| 776 | * @discussion If x is very close to the limits of representation, the | ||
| 777 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 778 | * at least 11 bits for float and 22 bits for double. */ | ||
| 779 | static inline SIMD_CFUNC float simd_fast_recip(float x); | ||
| 780 | /*! @abstract A fast approximation to 1/x. | ||
| 781 | * @discussion If x is very close to the limits of representation, the | ||
| 782 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 783 | * at least 11 bits for float and 22 bits for double. */ | ||
| 784 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x); | ||
| 785 | /*! @abstract A fast approximation to 1/x. | ||
| 786 | * @discussion If x is very close to the limits of representation, the | ||
| 787 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 788 | * at least 11 bits for float and 22 bits for double. */ | ||
| 789 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x); | ||
| 790 | /*! @abstract A fast approximation to 1/x. | ||
| 791 | * @discussion If x is very close to the limits of representation, the | ||
| 792 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 793 | * at least 11 bits for float and 22 bits for double. */ | ||
| 794 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x); | ||
| 795 | /*! @abstract A fast approximation to 1/x. | ||
| 796 | * @discussion If x is very close to the limits of representation, the | ||
| 797 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 798 | * at least 11 bits for float and 22 bits for double. */ | ||
| 799 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x); | ||
| 800 | /*! @abstract A fast approximation to 1/x. | ||
| 801 | * @discussion If x is very close to the limits of representation, the | ||
| 802 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 803 | * at least 11 bits for float and 22 bits for double. */ | ||
| 804 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x); | ||
| 805 | /*! @abstract A fast approximation to 1/x. | ||
| 806 | * @discussion If x is very close to the limits of representation, the | ||
| 807 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 808 | * at least 11 bits for float and 22 bits for double. */ | ||
| 809 | static inline SIMD_CFUNC double simd_fast_recip(double x); | ||
| 810 | /*! @abstract A fast approximation to 1/x. | ||
| 811 | * @discussion If x is very close to the limits of representation, the | ||
| 812 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 813 | * at least 11 bits for float and 22 bits for double. */ | ||
| 814 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x); | ||
| 815 | /*! @abstract A fast approximation to 1/x. | ||
| 816 | * @discussion If x is very close to the limits of representation, the | ||
| 817 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 818 | * at least 11 bits for float and 22 bits for double. */ | ||
| 819 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x); | ||
| 820 | /*! @abstract A fast approximation to 1/x. | ||
| 821 | * @discussion If x is very close to the limits of representation, the | ||
| 822 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 823 | * at least 11 bits for float and 22 bits for double. */ | ||
| 824 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x); | ||
| 825 | /*! @abstract A fast approximation to 1/x. | ||
| 826 | * @discussion If x is very close to the limits of representation, the | ||
| 827 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 828 | * at least 11 bits for float and 22 bits for double. */ | ||
| 829 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x); | ||
| 830 | /*! @abstract A fast approximation to 1/x. | ||
| 831 | * @discussion Deprecated. Use simd_fast_recip(x) instead. */ | ||
| 832 | #define vector_fast_recip simd_fast_recip | ||
| 833 | |||
| 834 | /*! @abstract An approximation to 1/x. | ||
| 835 | * @discussion If x is very close to the limits of representation, the | ||
| 836 | * result may overflow or underflow. This function maps to | ||
| 837 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 838 | * simd_precise_recip(x) otherwise. */ | ||
| 839 | static inline SIMD_CFUNC float simd_recip(float x); | ||
| 840 | /*! @abstract An approximation to 1/x. | ||
| 841 | * @discussion If x is very close to the limits of representation, the | ||
| 842 | * result may overflow or underflow. This function maps to | ||
| 843 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 844 | * simd_precise_recip(x) otherwise. */ | ||
| 845 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x); | ||
| 846 | /*! @abstract An approximation to 1/x. | ||
| 847 | * @discussion If x is very close to the limits of representation, the | ||
| 848 | * result may overflow or underflow. This function maps to | ||
| 849 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 850 | * simd_precise_recip(x) otherwise. */ | ||
| 851 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x); | ||
| 852 | /*! @abstract An approximation to 1/x. | ||
| 853 | * @discussion If x is very close to the limits of representation, the | ||
| 854 | * result may overflow or underflow. This function maps to | ||
| 855 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 856 | * simd_precise_recip(x) otherwise. */ | ||
| 857 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x); | ||
| 858 | /*! @abstract An approximation to 1/x. | ||
| 859 | * @discussion If x is very close to the limits of representation, the | ||
| 860 | * result may overflow or underflow. This function maps to | ||
| 861 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 862 | * simd_precise_recip(x) otherwise. */ | ||
| 863 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x); | ||
| 864 | /*! @abstract An approximation to 1/x. | ||
| 865 | * @discussion If x is very close to the limits of representation, the | ||
| 866 | * result may overflow or underflow. This function maps to | ||
| 867 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 868 | * simd_precise_recip(x) otherwise. */ | ||
| 869 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x); | ||
| 870 | /*! @abstract An approximation to 1/x. | ||
| 871 | * @discussion If x is very close to the limits of representation, the | ||
| 872 | * result may overflow or underflow. This function maps to | ||
| 873 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 874 | * simd_precise_recip(x) otherwise. */ | ||
| 875 | static inline SIMD_CFUNC double simd_recip(double x); | ||
| 876 | /*! @abstract An approximation to 1/x. | ||
| 877 | * @discussion If x is very close to the limits of representation, the | ||
| 878 | * result may overflow or underflow. This function maps to | ||
| 879 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 880 | * simd_precise_recip(x) otherwise. */ | ||
| 881 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x); | ||
| 882 | /*! @abstract An approximation to 1/x. | ||
| 883 | * @discussion If x is very close to the limits of representation, the | ||
| 884 | * result may overflow or underflow. This function maps to | ||
| 885 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 886 | * simd_precise_recip(x) otherwise. */ | ||
| 887 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x); | ||
| 888 | /*! @abstract An approximation to 1/x. | ||
| 889 | * @discussion If x is very close to the limits of representation, the | ||
| 890 | * result may overflow or underflow. This function maps to | ||
| 891 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 892 | * simd_precise_recip(x) otherwise. */ | ||
| 893 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x); | ||
| 894 | /*! @abstract An approximation to 1/x. | ||
| 895 | * @discussion If x is very close to the limits of representation, the | ||
| 896 | * result may overflow or underflow. This function maps to | ||
| 897 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 898 | * simd_precise_recip(x) otherwise. */ | ||
| 899 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x); | ||
| 900 | /*! @abstract An approximation to 1/x. | ||
| 901 | * @discussion Deprecated. Use simd_recip(x) instead. */ | ||
| 902 | #define vector_recip simd_recip | ||
| 903 | |||
| 904 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 905 | * @discussion This function is accurate to a few units in the last place | ||
| 906 | * (ULPs). */ | ||
| 907 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x); | ||
| 908 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 909 | * @discussion This function is accurate to a few units in the last place | ||
| 910 | * (ULPs). */ | ||
| 911 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x); | ||
| 912 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 913 | * @discussion This function is accurate to a few units in the last place | ||
| 914 | * (ULPs). */ | ||
| 915 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x); | ||
| 916 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 917 | * @discussion This function is accurate to a few units in the last place | ||
| 918 | * (ULPs). */ | ||
| 919 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x); | ||
| 920 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 921 | * @discussion This function is accurate to a few units in the last place | ||
| 922 | * (ULPs). */ | ||
| 923 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x); | ||
| 924 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 925 | * @discussion This function is accurate to a few units in the last place | ||
| 926 | * (ULPs). */ | ||
| 927 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x); | ||
| 928 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 929 | * @discussion This function is accurate to a few units in the last place | ||
| 930 | * (ULPs). */ | ||
| 931 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x); | ||
| 932 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 933 | * @discussion This function is accurate to a few units in the last place | ||
| 934 | * (ULPs). */ | ||
| 935 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x); | ||
| 936 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 937 | * @discussion This function is accurate to a few units in the last place | ||
| 938 | * (ULPs). */ | ||
| 939 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x); | ||
| 940 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 941 | * @discussion This function is accurate to a few units in the last place | ||
| 942 | * (ULPs). */ | ||
| 943 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x); | ||
| 944 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 945 | * @discussion This function is accurate to a few units in the last place | ||
| 946 | * (ULPs). */ | ||
| 947 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x); | ||
| 948 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 949 | * @discussion Deprecated. Use simd_precise_rsqrt(x) instead. */ | ||
| 950 | #define vector_precise_rsqrt simd_precise_rsqrt | ||
| 951 | |||
| 952 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 953 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 954 | * 22 bits for double. */ | ||
| 955 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x); | ||
| 956 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 957 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 958 | * 22 bits for double. */ | ||
| 959 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x); | ||
| 960 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 961 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 962 | * 22 bits for double. */ | ||
| 963 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x); | ||
| 964 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 965 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 966 | * 22 bits for double. */ | ||
| 967 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x); | ||
| 968 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 969 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 970 | * 22 bits for double. */ | ||
| 971 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x); | ||
| 972 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 973 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 974 | * 22 bits for double. */ | ||
| 975 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x); | ||
| 976 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 977 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 978 | * 22 bits for double. */ | ||
| 979 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x); | ||
| 980 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 981 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 982 | * 22 bits for double. */ | ||
| 983 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x); | ||
| 984 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 985 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 986 | * 22 bits for double. */ | ||
| 987 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x); | ||
| 988 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 989 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 990 | * 22 bits for double. */ | ||
| 991 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x); | ||
| 992 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 993 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 994 | * 22 bits for double. */ | ||
| 995 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x); | ||
| 996 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 997 | * @discussion Deprecated. Use simd_fast_rsqrt(x) instead. */ | ||
| 998 | #define vector_fast_rsqrt simd_fast_rsqrt | ||
| 999 | |||
| 1000 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1001 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1002 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1003 | static inline SIMD_CFUNC float simd_rsqrt(float x); | ||
| 1004 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1005 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1006 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1007 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x); | ||
| 1008 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1009 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1010 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1011 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x); | ||
| 1012 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1013 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1014 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1015 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x); | ||
| 1016 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1017 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1018 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1019 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x); | ||
| 1020 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1021 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1022 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1023 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x); | ||
| 1024 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1025 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1026 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1027 | static inline SIMD_CFUNC double simd_rsqrt(double x); | ||
| 1028 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1029 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1030 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1031 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x); | ||
| 1032 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1033 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1034 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1035 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x); | ||
| 1036 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1037 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1038 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1039 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x); | ||
| 1040 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1041 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1042 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1043 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x); | ||
| 1044 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1045 | * @discussion Deprecated. Use simd_rsqrt(x) instead. */ | ||
| 1046 | #define vector_rsqrt simd_rsqrt | ||
| 1047 | |||
| 1048 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1049 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1050 | * positive and finite, then the two values are exactly equal. */ | ||
| 1051 | static inline SIMD_CFUNC float simd_fract(float x); | ||
| 1052 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1053 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1054 | * positive and finite, then the two values are exactly equal. */ | ||
| 1055 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x); | ||
| 1056 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1057 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1058 | * positive and finite, then the two values are exactly equal. */ | ||
| 1059 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x); | ||
| 1060 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1061 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1062 | * positive and finite, then the two values are exactly equal. */ | ||
| 1063 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x); | ||
| 1064 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1065 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1066 | * positive and finite, then the two values are exactly equal. */ | ||
| 1067 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x); | ||
| 1068 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1069 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1070 | * positive and finite, then the two values are exactly equal. */ | ||
| 1071 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x); | ||
| 1072 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1073 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1074 | * positive and finite, then the two values are exactly equal. */ | ||
| 1075 | static inline SIMD_CFUNC double simd_fract(double x); | ||
| 1076 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1077 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1078 | * positive and finite, then the two values are exactly equal. */ | ||
| 1079 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x); | ||
| 1080 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1081 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1082 | * positive and finite, then the two values are exactly equal. */ | ||
| 1083 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x); | ||
| 1084 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1085 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1086 | * positive and finite, then the two values are exactly equal. */ | ||
| 1087 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x); | ||
| 1088 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1089 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1090 | * positive and finite, then the two values are exactly equal. */ | ||
| 1091 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x); | ||
| 1092 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1093 | * @discussion Deprecated. Use simd_fract(x) instead. */ | ||
| 1094 | #define vector_fract simd_fract | ||
| 1095 | |||
| 1096 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1097 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1098 | * threshold to all lanes. */ | ||
| 1099 | static inline SIMD_CFUNC float simd_step(float edge, float x); | ||
| 1100 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1101 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1102 | * threshold to all lanes. */ | ||
| 1103 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x); | ||
| 1104 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1105 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1106 | * threshold to all lanes. */ | ||
| 1107 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x); | ||
| 1108 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1109 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1110 | * threshold to all lanes. */ | ||
| 1111 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x); | ||
| 1112 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1113 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1114 | * threshold to all lanes. */ | ||
| 1115 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x); | ||
| 1116 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1117 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1118 | * threshold to all lanes. */ | ||
| 1119 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x); | ||
| 1120 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1121 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1122 | * threshold to all lanes. */ | ||
| 1123 | static inline SIMD_CFUNC double simd_step(double edge, double x); | ||
| 1124 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1125 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1126 | * threshold to all lanes. */ | ||
| 1127 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x); | ||
| 1128 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1129 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1130 | * threshold to all lanes. */ | ||
| 1131 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x); | ||
| 1132 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1133 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1134 | * threshold to all lanes. */ | ||
| 1135 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x); | ||
| 1136 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1137 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1138 | * threshold to all lanes. */ | ||
| 1139 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x); | ||
| 1140 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1141 | * @discussion Deprecated. Use simd_step(edge, x) instead. */ | ||
| 1142 | #define vector_step simd_step | ||
| 1143 | |||
| 1144 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1145 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1146 | * to clamp all lanes at the same points. */ | ||
| 1147 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x); | ||
| 1148 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1149 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1150 | * to clamp all lanes at the same points. */ | ||
| 1151 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x); | ||
| 1152 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1153 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1154 | * to clamp all lanes at the same points. */ | ||
| 1155 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x); | ||
| 1156 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1157 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1158 | * to clamp all lanes at the same points. */ | ||
| 1159 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x); | ||
| 1160 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1161 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1162 | * to clamp all lanes at the same points. */ | ||
| 1163 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x); | ||
| 1164 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1165 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1166 | * to clamp all lanes at the same points. */ | ||
| 1167 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x); | ||
| 1168 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1169 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1170 | * to clamp all lanes at the same points. */ | ||
| 1171 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x); | ||
| 1172 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1173 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1174 | * to clamp all lanes at the same points. */ | ||
| 1175 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x); | ||
| 1176 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1177 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1178 | * to clamp all lanes at the same points. */ | ||
| 1179 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x); | ||
| 1180 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1181 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1182 | * to clamp all lanes at the same points. */ | ||
| 1183 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x); | ||
| 1184 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1185 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1186 | * to clamp all lanes at the same points. */ | ||
| 1187 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x); | ||
| 1188 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1189 | * @discussion Deprecated. Use simd_smoothstep(edge0, edge1, x) instead. */ | ||
| 1190 | #define vector_smoothstep simd_smoothstep | ||
| 1191 | |||
| 1192 | /*! @abstract Sum of elements in x. | ||
| 1193 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1194 | * may need to convert to a wider type before reducing. */ | ||
| 1195 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x); | ||
| 1196 | /*! @abstract Sum of elements in x. | ||
| 1197 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1198 | * may need to convert to a wider type before reducing. */ | ||
| 1199 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x); | ||
| 1200 | /*! @abstract Sum of elements in x. | ||
| 1201 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1202 | * may need to convert to a wider type before reducing. */ | ||
| 1203 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x); | ||
| 1204 | /*! @abstract Sum of elements in x. | ||
| 1205 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1206 | * may need to convert to a wider type before reducing. */ | ||
| 1207 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x); | ||
| 1208 | /*! @abstract Sum of elements in x. | ||
| 1209 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1210 | * may need to convert to a wider type before reducing. */ | ||
| 1211 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x); | ||
| 1212 | /*! @abstract Sum of elements in x. | ||
| 1213 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1214 | * may need to convert to a wider type before reducing. */ | ||
| 1215 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x); | ||
| 1216 | /*! @abstract Sum of elements in x. | ||
| 1217 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1218 | * may need to convert to a wider type before reducing. */ | ||
| 1219 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x); | ||
| 1220 | /*! @abstract Sum of elements in x. | ||
| 1221 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1222 | * may need to convert to a wider type before reducing. */ | ||
| 1223 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x); | ||
| 1224 | /*! @abstract Sum of elements in x. | ||
| 1225 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1226 | * may need to convert to a wider type before reducing. */ | ||
| 1227 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x); | ||
| 1228 | /*! @abstract Sum of elements in x. | ||
| 1229 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1230 | * may need to convert to a wider type before reducing. */ | ||
| 1231 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x); | ||
| 1232 | /*! @abstract Sum of elements in x. | ||
| 1233 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1234 | * may need to convert to a wider type before reducing. */ | ||
| 1235 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x); | ||
| 1236 | /*! @abstract Sum of elements in x. | ||
| 1237 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1238 | * may need to convert to a wider type before reducing. */ | ||
| 1239 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x); | ||
| 1240 | /*! @abstract Sum of elements in x. | ||
| 1241 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1242 | * may need to convert to a wider type before reducing. */ | ||
| 1243 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x); | ||
| 1244 | /*! @abstract Sum of elements in x. | ||
| 1245 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1246 | * may need to convert to a wider type before reducing. */ | ||
| 1247 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x); | ||
| 1248 | /*! @abstract Sum of elements in x. | ||
| 1249 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1250 | * may need to convert to a wider type before reducing. */ | ||
| 1251 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x); | ||
| 1252 | /*! @abstract Sum of elements in x. | ||
| 1253 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1254 | * may need to convert to a wider type before reducing. */ | ||
| 1255 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x); | ||
| 1256 | /*! @abstract Sum of elements in x. | ||
| 1257 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1258 | * may need to convert to a wider type before reducing. */ | ||
| 1259 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x); | ||
| 1260 | /*! @abstract Sum of elements in x. | ||
| 1261 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1262 | * may need to convert to a wider type before reducing. */ | ||
| 1263 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x); | ||
| 1264 | /*! @abstract Sum of elements in x. | ||
| 1265 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1266 | * may need to convert to a wider type before reducing. */ | ||
| 1267 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x); | ||
| 1268 | /*! @abstract Sum of elements in x. | ||
| 1269 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1270 | * may need to convert to a wider type before reducing. */ | ||
| 1271 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x); | ||
| 1272 | /*! @abstract Sum of elements in x. | ||
| 1273 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1274 | * may need to convert to a wider type before reducing. */ | ||
| 1275 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x); | ||
| 1276 | /*! @abstract Sum of elements in x. | ||
| 1277 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1278 | * may need to convert to a wider type before reducing. */ | ||
| 1279 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x); | ||
| 1280 | /*! @abstract Sum of elements in x. | ||
| 1281 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1282 | * may need to convert to a wider type before reducing. */ | ||
| 1283 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x); | ||
| 1284 | /*! @abstract Sum of elements in x. | ||
| 1285 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1286 | * may need to convert to a wider type before reducing. */ | ||
| 1287 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x); | ||
| 1288 | /*! @abstract Sum of elements in x. | ||
| 1289 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1290 | * may need to convert to a wider type before reducing. */ | ||
| 1291 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x); | ||
| 1292 | /*! @abstract Sum of elements in x. | ||
| 1293 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1294 | * may need to convert to a wider type before reducing. */ | ||
| 1295 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x); | ||
| 1296 | /*! @abstract Sum of elements in x. | ||
| 1297 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1298 | * may need to convert to a wider type before reducing. */ | ||
| 1299 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x); | ||
| 1300 | /*! @abstract Sum of elements in x. | ||
| 1301 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1302 | * may need to convert to a wider type before reducing. */ | ||
| 1303 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x); | ||
| 1304 | /*! @abstract Sum of elements in x. | ||
| 1305 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1306 | * may need to convert to a wider type before reducing. */ | ||
| 1307 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x); | ||
| 1308 | /*! @abstract Sum of elements in x. | ||
| 1309 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1310 | * may need to convert to a wider type before reducing. */ | ||
| 1311 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x); | ||
| 1312 | /*! @abstract Sum of elements in x. | ||
| 1313 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1314 | * may need to convert to a wider type before reducing. */ | ||
| 1315 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x); | ||
| 1316 | /*! @abstract Sum of elements in x. | ||
| 1317 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1318 | * may need to convert to a wider type before reducing. */ | ||
| 1319 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x); | ||
| 1320 | /*! @abstract Sum of elements in x. | ||
| 1321 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1322 | * may need to convert to a wider type before reducing. */ | ||
| 1323 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x); | ||
| 1324 | /*! @abstract Sum of elements in x. | ||
| 1325 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1326 | * may need to convert to a wider type before reducing. */ | ||
| 1327 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x); | ||
| 1328 | /*! @abstract Sum of elements in x. | ||
| 1329 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1330 | * may need to convert to a wider type before reducing. */ | ||
| 1331 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x); | ||
| 1332 | /*! @abstract Sum of elements in x. | ||
| 1333 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1334 | * may need to convert to a wider type before reducing. */ | ||
| 1335 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x); | ||
| 1336 | /*! @abstract Sum of elements in x. | ||
| 1337 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1338 | * may need to convert to a wider type before reducing. */ | ||
| 1339 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x); | ||
| 1340 | /*! @abstract Sum of elements in x. | ||
| 1341 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1342 | * may need to convert to a wider type before reducing. */ | ||
| 1343 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x); | ||
| 1344 | /*! @abstract Sum of elements in x. | ||
| 1345 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1346 | * may need to convert to a wider type before reducing. */ | ||
| 1347 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x); | ||
| 1348 | /*! @abstract Sum of elements in x. | ||
| 1349 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1350 | * may need to convert to a wider type before reducing. */ | ||
| 1351 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x); | ||
| 1352 | /*! @abstract Sum of elements in x. | ||
| 1353 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1354 | * may need to convert to a wider type before reducing. */ | ||
| 1355 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x); | ||
| 1356 | /*! @abstract Sum of elements in x. | ||
| 1357 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1358 | * may need to convert to a wider type before reducing. */ | ||
| 1359 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x); | ||
| 1360 | /*! @abstract Sum of elements in x. | ||
| 1361 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1362 | * may need to convert to a wider type before reducing. */ | ||
| 1363 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x); | ||
| 1364 | /*! @abstract Sum of elements in x. | ||
| 1365 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1366 | * may need to convert to a wider type before reducing. */ | ||
| 1367 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x); | ||
| 1368 | /*! @abstract Sum of elements in x. | ||
| 1369 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1370 | * may need to convert to a wider type before reducing. */ | ||
| 1371 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x); | ||
| 1372 | /*! @abstract Sum of elements in x. | ||
| 1373 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1374 | * may need to convert to a wider type before reducing. */ | ||
| 1375 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x); | ||
| 1376 | /*! @abstract Sum of elements in x. | ||
| 1377 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1378 | * may need to convert to a wider type before reducing. */ | ||
| 1379 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x); | ||
| 1380 | /*! @abstract Sum of elements in x. | ||
| 1381 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1382 | * may need to convert to a wider type before reducing. */ | ||
| 1383 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x); | ||
| 1384 | /*! @abstract Sum of elements in x. | ||
| 1385 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1386 | * may need to convert to a wider type before reducing. */ | ||
| 1387 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x); | ||
| 1388 | /*! @abstract Sum of elements in x. | ||
| 1389 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1390 | * may need to convert to a wider type before reducing. */ | ||
| 1391 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x); | ||
| 1392 | /*! @abstract Sum of elements in x. | ||
| 1393 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1394 | * may need to convert to a wider type before reducing. */ | ||
| 1395 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x); | ||
| 1396 | /*! @abstract Sum of elements in x. | ||
| 1397 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1398 | * may need to convert to a wider type before reducing. */ | ||
| 1399 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x); | ||
| 1400 | /*! @abstract Sum of elements in x. | ||
| 1401 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1402 | * may need to convert to a wider type before reducing. */ | ||
| 1403 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x); | ||
| 1404 | /*! @abstract Sum of elements in x. | ||
| 1405 | * @discussion Deprecated. Use simd_add(x) instead. */ | ||
| 1406 | #define vector_reduce_add simd_reduce_add | ||
| 1407 | |||
| 1408 | /*! @abstract Minimum of elements in x. */ | ||
| 1409 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x); | ||
| 1410 | /*! @abstract Minimum of elements in x. */ | ||
| 1411 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x); | ||
| 1412 | /*! @abstract Minimum of elements in x. */ | ||
| 1413 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x); | ||
| 1414 | /*! @abstract Minimum of elements in x. */ | ||
| 1415 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x); | ||
| 1416 | /*! @abstract Minimum of elements in x. */ | ||
| 1417 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x); | ||
| 1418 | /*! @abstract Minimum of elements in x. */ | ||
| 1419 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x); | ||
| 1420 | /*! @abstract Minimum of elements in x. */ | ||
| 1421 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x); | ||
| 1422 | /*! @abstract Minimum of elements in x. */ | ||
| 1423 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x); | ||
| 1424 | /*! @abstract Minimum of elements in x. */ | ||
| 1425 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x); | ||
| 1426 | /*! @abstract Minimum of elements in x. */ | ||
| 1427 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x); | ||
| 1428 | /*! @abstract Minimum of elements in x. */ | ||
| 1429 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x); | ||
| 1430 | /*! @abstract Minimum of elements in x. */ | ||
| 1431 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x); | ||
| 1432 | /*! @abstract Minimum of elements in x. */ | ||
| 1433 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x); | ||
| 1434 | /*! @abstract Minimum of elements in x. */ | ||
| 1435 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x); | ||
| 1436 | /*! @abstract Minimum of elements in x. */ | ||
| 1437 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x); | ||
| 1438 | /*! @abstract Minimum of elements in x. */ | ||
| 1439 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x); | ||
| 1440 | /*! @abstract Minimum of elements in x. */ | ||
| 1441 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x); | ||
| 1442 | /*! @abstract Minimum of elements in x. */ | ||
| 1443 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x); | ||
| 1444 | /*! @abstract Minimum of elements in x. */ | ||
| 1445 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x); | ||
| 1446 | /*! @abstract Minimum of elements in x. */ | ||
| 1447 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x); | ||
| 1448 | /*! @abstract Minimum of elements in x. */ | ||
| 1449 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x); | ||
| 1450 | /*! @abstract Minimum of elements in x. */ | ||
| 1451 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x); | ||
| 1452 | /*! @abstract Minimum of elements in x. */ | ||
| 1453 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x); | ||
| 1454 | /*! @abstract Minimum of elements in x. */ | ||
| 1455 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x); | ||
| 1456 | /*! @abstract Minimum of elements in x. */ | ||
| 1457 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x); | ||
| 1458 | /*! @abstract Minimum of elements in x. */ | ||
| 1459 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x); | ||
| 1460 | /*! @abstract Minimum of elements in x. */ | ||
| 1461 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x); | ||
| 1462 | /*! @abstract Minimum of elements in x. */ | ||
| 1463 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x); | ||
| 1464 | /*! @abstract Minimum of elements in x. */ | ||
| 1465 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x); | ||
| 1466 | /*! @abstract Minimum of elements in x. */ | ||
| 1467 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x); | ||
| 1468 | /*! @abstract Minimum of elements in x. */ | ||
| 1469 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x); | ||
| 1470 | /*! @abstract Minimum of elements in x. */ | ||
| 1471 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x); | ||
| 1472 | /*! @abstract Minimum of elements in x. */ | ||
| 1473 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x); | ||
| 1474 | /*! @abstract Minimum of elements in x. */ | ||
| 1475 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x); | ||
| 1476 | /*! @abstract Minimum of elements in x. */ | ||
| 1477 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x); | ||
| 1478 | /*! @abstract Minimum of elements in x. */ | ||
| 1479 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x); | ||
| 1480 | /*! @abstract Minimum of elements in x. */ | ||
| 1481 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x); | ||
| 1482 | /*! @abstract Minimum of elements in x. */ | ||
| 1483 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x); | ||
| 1484 | /*! @abstract Minimum of elements in x. */ | ||
| 1485 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x); | ||
| 1486 | /*! @abstract Minimum of elements in x. */ | ||
| 1487 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x); | ||
| 1488 | /*! @abstract Minimum of elements in x. */ | ||
| 1489 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x); | ||
| 1490 | /*! @abstract Minimum of elements in x. */ | ||
| 1491 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x); | ||
| 1492 | /*! @abstract Minimum of elements in x. */ | ||
| 1493 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x); | ||
| 1494 | /*! @abstract Minimum of elements in x. */ | ||
| 1495 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x); | ||
| 1496 | /*! @abstract Minimum of elements in x. */ | ||
| 1497 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x); | ||
| 1498 | /*! @abstract Minimum of elements in x. */ | ||
| 1499 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x); | ||
| 1500 | /*! @abstract Minimum of elements in x. */ | ||
| 1501 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x); | ||
| 1502 | /*! @abstract Minimum of elements in x. */ | ||
| 1503 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x); | ||
| 1504 | /*! @abstract Minimum of elements in x. */ | ||
| 1505 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x); | ||
| 1506 | /*! @abstract Minimum of elements in x. */ | ||
| 1507 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x); | ||
| 1508 | /*! @abstract Minimum of elements in x. */ | ||
| 1509 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x); | ||
| 1510 | /*! @abstract Minimum of elements in x. */ | ||
| 1511 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x); | ||
| 1512 | /*! @abstract Minimum of elements in x. */ | ||
| 1513 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x); | ||
| 1514 | /*! @abstract Minimum of elements in x. | ||
| 1515 | * @discussion Deprecated. Use simd_min(x) instead. */ | ||
| 1516 | #define vector_reduce_min simd_reduce_min | ||
| 1517 | |||
| 1518 | /*! @abstract Maximum of elements in x. */ | ||
| 1519 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x); | ||
| 1520 | /*! @abstract Maximum of elements in x. */ | ||
| 1521 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x); | ||
| 1522 | /*! @abstract Maximum of elements in x. */ | ||
| 1523 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x); | ||
| 1524 | /*! @abstract Maximum of elements in x. */ | ||
| 1525 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x); | ||
| 1526 | /*! @abstract Maximum of elements in x. */ | ||
| 1527 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x); | ||
| 1528 | /*! @abstract Maximum of elements in x. */ | ||
| 1529 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x); | ||
| 1530 | /*! @abstract Maximum of elements in x. */ | ||
| 1531 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x); | ||
| 1532 | /*! @abstract Maximum of elements in x. */ | ||
| 1533 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x); | ||
| 1534 | /*! @abstract Maximum of elements in x. */ | ||
| 1535 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x); | ||
| 1536 | /*! @abstract Maximum of elements in x. */ | ||
| 1537 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x); | ||
| 1538 | /*! @abstract Maximum of elements in x. */ | ||
| 1539 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x); | ||
| 1540 | /*! @abstract Maximum of elements in x. */ | ||
| 1541 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x); | ||
| 1542 | /*! @abstract Maximum of elements in x. */ | ||
| 1543 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x); | ||
| 1544 | /*! @abstract Maximum of elements in x. */ | ||
| 1545 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x); | ||
| 1546 | /*! @abstract Maximum of elements in x. */ | ||
| 1547 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x); | ||
| 1548 | /*! @abstract Maximum of elements in x. */ | ||
| 1549 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x); | ||
| 1550 | /*! @abstract Maximum of elements in x. */ | ||
| 1551 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x); | ||
| 1552 | /*! @abstract Maximum of elements in x. */ | ||
| 1553 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x); | ||
| 1554 | /*! @abstract Maximum of elements in x. */ | ||
| 1555 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x); | ||
| 1556 | /*! @abstract Maximum of elements in x. */ | ||
| 1557 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x); | ||
| 1558 | /*! @abstract Maximum of elements in x. */ | ||
| 1559 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x); | ||
| 1560 | /*! @abstract Maximum of elements in x. */ | ||
| 1561 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x); | ||
| 1562 | /*! @abstract Maximum of elements in x. */ | ||
| 1563 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x); | ||
| 1564 | /*! @abstract Maximum of elements in x. */ | ||
| 1565 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x); | ||
| 1566 | /*! @abstract Maximum of elements in x. */ | ||
| 1567 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x); | ||
| 1568 | /*! @abstract Maximum of elements in x. */ | ||
| 1569 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x); | ||
| 1570 | /*! @abstract Maximum of elements in x. */ | ||
| 1571 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x); | ||
| 1572 | /*! @abstract Maximum of elements in x. */ | ||
| 1573 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x); | ||
| 1574 | /*! @abstract Maximum of elements in x. */ | ||
| 1575 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x); | ||
| 1576 | /*! @abstract Maximum of elements in x. */ | ||
| 1577 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x); | ||
| 1578 | /*! @abstract Maximum of elements in x. */ | ||
| 1579 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x); | ||
| 1580 | /*! @abstract Maximum of elements in x. */ | ||
| 1581 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x); | ||
| 1582 | /*! @abstract Maximum of elements in x. */ | ||
| 1583 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x); | ||
| 1584 | /*! @abstract Maximum of elements in x. */ | ||
| 1585 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x); | ||
| 1586 | /*! @abstract Maximum of elements in x. */ | ||
| 1587 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x); | ||
| 1588 | /*! @abstract Maximum of elements in x. */ | ||
| 1589 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x); | ||
| 1590 | /*! @abstract Maximum of elements in x. */ | ||
| 1591 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x); | ||
| 1592 | /*! @abstract Maximum of elements in x. */ | ||
| 1593 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x); | ||
| 1594 | /*! @abstract Maximum of elements in x. */ | ||
| 1595 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x); | ||
| 1596 | /*! @abstract Maximum of elements in x. */ | ||
| 1597 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x); | ||
| 1598 | /*! @abstract Maximum of elements in x. */ | ||
| 1599 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x); | ||
| 1600 | /*! @abstract Maximum of elements in x. */ | ||
| 1601 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x); | ||
| 1602 | /*! @abstract Maximum of elements in x. */ | ||
| 1603 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x); | ||
| 1604 | /*! @abstract Maximum of elements in x. */ | ||
| 1605 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x); | ||
| 1606 | /*! @abstract Maximum of elements in x. */ | ||
| 1607 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x); | ||
| 1608 | /*! @abstract Maximum of elements in x. */ | ||
| 1609 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x); | ||
| 1610 | /*! @abstract Maximum of elements in x. */ | ||
| 1611 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x); | ||
| 1612 | /*! @abstract Maximum of elements in x. */ | ||
| 1613 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x); | ||
| 1614 | /*! @abstract Maximum of elements in x. */ | ||
| 1615 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x); | ||
| 1616 | /*! @abstract Maximum of elements in x. */ | ||
| 1617 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x); | ||
| 1618 | /*! @abstract Maximum of elements in x. */ | ||
| 1619 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x); | ||
| 1620 | /*! @abstract Maximum of elements in x. */ | ||
| 1621 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x); | ||
| 1622 | /*! @abstract Maximum of elements in x. */ | ||
| 1623 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x); | ||
| 1624 | /*! @abstract Maximum of elements in x. | ||
| 1625 | * @discussion Deprecated. Use simd_max(x) instead. */ | ||
| 1626 | #define vector_reduce_max simd_reduce_max | ||
| 1627 | |||
| 1628 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1629 | * corresponding lane of y. */ | ||
| 1630 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char2 x, simd_char2 y) { | ||
| 1631 | return simd_all(x == y); | ||
| 1632 | } | ||
| 1633 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1634 | * corresponding lane of y. */ | ||
| 1635 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char3 x, simd_char3 y) { | ||
| 1636 | return simd_all(x == y); | ||
| 1637 | } | ||
| 1638 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1639 | * corresponding lane of y. */ | ||
| 1640 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char4 x, simd_char4 y) { | ||
| 1641 | return simd_all(x == y); | ||
| 1642 | } | ||
| 1643 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1644 | * corresponding lane of y. */ | ||
| 1645 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char8 x, simd_char8 y) { | ||
| 1646 | return simd_all(x == y); | ||
| 1647 | } | ||
| 1648 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1649 | * corresponding lane of y. */ | ||
| 1650 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char16 x, simd_char16 y) { | ||
| 1651 | return simd_all(x == y); | ||
| 1652 | } | ||
| 1653 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1654 | * corresponding lane of y. */ | ||
| 1655 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char32 x, simd_char32 y) { | ||
| 1656 | return simd_all(x == y); | ||
| 1657 | } | ||
| 1658 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1659 | * corresponding lane of y. */ | ||
| 1660 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char64 x, simd_char64 y) { | ||
| 1661 | return simd_all(x == y); | ||
| 1662 | } | ||
| 1663 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1664 | * corresponding lane of y. */ | ||
| 1665 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar2 x, simd_uchar2 y) { | ||
| 1666 | return simd_all(x == y); | ||
| 1667 | } | ||
| 1668 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1669 | * corresponding lane of y. */ | ||
| 1670 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar3 x, simd_uchar3 y) { | ||
| 1671 | return simd_all(x == y); | ||
| 1672 | } | ||
| 1673 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1674 | * corresponding lane of y. */ | ||
| 1675 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar4 x, simd_uchar4 y) { | ||
| 1676 | return simd_all(x == y); | ||
| 1677 | } | ||
| 1678 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1679 | * corresponding lane of y. */ | ||
| 1680 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar8 x, simd_uchar8 y) { | ||
| 1681 | return simd_all(x == y); | ||
| 1682 | } | ||
| 1683 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1684 | * corresponding lane of y. */ | ||
| 1685 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar16 x, simd_uchar16 y) { | ||
| 1686 | return simd_all(x == y); | ||
| 1687 | } | ||
| 1688 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1689 | * corresponding lane of y. */ | ||
| 1690 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar32 x, simd_uchar32 y) { | ||
| 1691 | return simd_all(x == y); | ||
| 1692 | } | ||
| 1693 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1694 | * corresponding lane of y. */ | ||
| 1695 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar64 x, simd_uchar64 y) { | ||
| 1696 | return simd_all(x == y); | ||
| 1697 | } | ||
| 1698 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1699 | * corresponding lane of y. */ | ||
| 1700 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short2 x, simd_short2 y) { | ||
| 1701 | return simd_all(x == y); | ||
| 1702 | } | ||
| 1703 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1704 | * corresponding lane of y. */ | ||
| 1705 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short3 x, simd_short3 y) { | ||
| 1706 | return simd_all(x == y); | ||
| 1707 | } | ||
| 1708 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1709 | * corresponding lane of y. */ | ||
| 1710 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short4 x, simd_short4 y) { | ||
| 1711 | return simd_all(x == y); | ||
| 1712 | } | ||
| 1713 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1714 | * corresponding lane of y. */ | ||
| 1715 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short8 x, simd_short8 y) { | ||
| 1716 | return simd_all(x == y); | ||
| 1717 | } | ||
| 1718 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1719 | * corresponding lane of y. */ | ||
| 1720 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short16 x, simd_short16 y) { | ||
| 1721 | return simd_all(x == y); | ||
| 1722 | } | ||
| 1723 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1724 | * corresponding lane of y. */ | ||
| 1725 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short32 x, simd_short32 y) { | ||
| 1726 | return simd_all(x == y); | ||
| 1727 | } | ||
| 1728 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1729 | * corresponding lane of y. */ | ||
| 1730 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort2 x, simd_ushort2 y) { | ||
| 1731 | return simd_all(x == y); | ||
| 1732 | } | ||
| 1733 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1734 | * corresponding lane of y. */ | ||
| 1735 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort3 x, simd_ushort3 y) { | ||
| 1736 | return simd_all(x == y); | ||
| 1737 | } | ||
| 1738 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1739 | * corresponding lane of y. */ | ||
| 1740 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort4 x, simd_ushort4 y) { | ||
| 1741 | return simd_all(x == y); | ||
| 1742 | } | ||
| 1743 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1744 | * corresponding lane of y. */ | ||
| 1745 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort8 x, simd_ushort8 y) { | ||
| 1746 | return simd_all(x == y); | ||
| 1747 | } | ||
| 1748 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1749 | * corresponding lane of y. */ | ||
| 1750 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort16 x, simd_ushort16 y) { | ||
| 1751 | return simd_all(x == y); | ||
| 1752 | } | ||
| 1753 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1754 | * corresponding lane of y. */ | ||
| 1755 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort32 x, simd_ushort32 y) { | ||
| 1756 | return simd_all(x == y); | ||
| 1757 | } | ||
| 1758 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1759 | * corresponding lane of y. */ | ||
| 1760 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int2 x, simd_int2 y) { | ||
| 1761 | return simd_all(x == y); | ||
| 1762 | } | ||
| 1763 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1764 | * corresponding lane of y. */ | ||
| 1765 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int3 x, simd_int3 y) { | ||
| 1766 | return simd_all(x == y); | ||
| 1767 | } | ||
| 1768 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1769 | * corresponding lane of y. */ | ||
| 1770 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int4 x, simd_int4 y) { | ||
| 1771 | return simd_all(x == y); | ||
| 1772 | } | ||
| 1773 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1774 | * corresponding lane of y. */ | ||
| 1775 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int8 x, simd_int8 y) { | ||
| 1776 | return simd_all(x == y); | ||
| 1777 | } | ||
| 1778 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1779 | * corresponding lane of y. */ | ||
| 1780 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int16 x, simd_int16 y) { | ||
| 1781 | return simd_all(x == y); | ||
| 1782 | } | ||
| 1783 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1784 | * corresponding lane of y. */ | ||
| 1785 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint2 x, simd_uint2 y) { | ||
| 1786 | return simd_all(x == y); | ||
| 1787 | } | ||
| 1788 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1789 | * corresponding lane of y. */ | ||
| 1790 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint3 x, simd_uint3 y) { | ||
| 1791 | return simd_all(x == y); | ||
| 1792 | } | ||
| 1793 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1794 | * corresponding lane of y. */ | ||
| 1795 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint4 x, simd_uint4 y) { | ||
| 1796 | return simd_all(x == y); | ||
| 1797 | } | ||
| 1798 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1799 | * corresponding lane of y. */ | ||
| 1800 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint8 x, simd_uint8 y) { | ||
| 1801 | return simd_all(x == y); | ||
| 1802 | } | ||
| 1803 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1804 | * corresponding lane of y. */ | ||
| 1805 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint16 x, simd_uint16 y) { | ||
| 1806 | return simd_all(x == y); | ||
| 1807 | } | ||
| 1808 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1809 | * corresponding lane of y. */ | ||
| 1810 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float2 x, simd_float2 y) { | ||
| 1811 | return simd_all(x == y); | ||
| 1812 | } | ||
| 1813 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1814 | * corresponding lane of y. */ | ||
| 1815 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float3 x, simd_float3 y) { | ||
| 1816 | return simd_all(x == y); | ||
| 1817 | } | ||
| 1818 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1819 | * corresponding lane of y. */ | ||
| 1820 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float4 x, simd_float4 y) { | ||
| 1821 | return simd_all(x == y); | ||
| 1822 | } | ||
| 1823 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1824 | * corresponding lane of y. */ | ||
| 1825 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float8 x, simd_float8 y) { | ||
| 1826 | return simd_all(x == y); | ||
| 1827 | } | ||
| 1828 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1829 | * corresponding lane of y. */ | ||
| 1830 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float16 x, simd_float16 y) { | ||
| 1831 | return simd_all(x == y); | ||
| 1832 | } | ||
| 1833 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1834 | * corresponding lane of y. */ | ||
| 1835 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long2 x, simd_long2 y) { | ||
| 1836 | return simd_all(x == y); | ||
| 1837 | } | ||
| 1838 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1839 | * corresponding lane of y. */ | ||
| 1840 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long3 x, simd_long3 y) { | ||
| 1841 | return simd_all(x == y); | ||
| 1842 | } | ||
| 1843 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1844 | * corresponding lane of y. */ | ||
| 1845 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long4 x, simd_long4 y) { | ||
| 1846 | return simd_all(x == y); | ||
| 1847 | } | ||
| 1848 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1849 | * corresponding lane of y. */ | ||
| 1850 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long8 x, simd_long8 y) { | ||
| 1851 | return simd_all(x == y); | ||
| 1852 | } | ||
| 1853 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1854 | * corresponding lane of y. */ | ||
| 1855 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong2 x, simd_ulong2 y) { | ||
| 1856 | return simd_all(x == y); | ||
| 1857 | } | ||
| 1858 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1859 | * corresponding lane of y. */ | ||
| 1860 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong3 x, simd_ulong3 y) { | ||
| 1861 | return simd_all(x == y); | ||
| 1862 | } | ||
| 1863 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1864 | * corresponding lane of y. */ | ||
| 1865 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong4 x, simd_ulong4 y) { | ||
| 1866 | return simd_all(x == y); | ||
| 1867 | } | ||
| 1868 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1869 | * corresponding lane of y. */ | ||
| 1870 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong8 x, simd_ulong8 y) { | ||
| 1871 | return simd_all(x == y); | ||
| 1872 | } | ||
| 1873 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1874 | * corresponding lane of y. */ | ||
| 1875 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double2 x, simd_double2 y) { | ||
| 1876 | return simd_all(x == y); | ||
| 1877 | } | ||
| 1878 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1879 | * corresponding lane of y. */ | ||
| 1880 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double3 x, simd_double3 y) { | ||
| 1881 | return simd_all(x == y); | ||
| 1882 | } | ||
| 1883 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1884 | * corresponding lane of y. */ | ||
| 1885 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double4 x, simd_double4 y) { | ||
| 1886 | return simd_all(x == y); | ||
| 1887 | } | ||
| 1888 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1889 | * corresponding lane of y. */ | ||
| 1890 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double8 x, simd_double8 y) { | ||
| 1891 | return simd_all(x == y); | ||
| 1892 | } | ||
| 1893 | |||
| 1894 | #ifdef __cplusplus | ||
| 1895 | } /* extern "C" */ | ||
| 1896 | |||
| 1897 | namespace simd { | ||
| 1898 | /*! @abstract The lanewise absolute value of x. */ | ||
| 1899 | template <typename typeN> static SIMD_CPPFUNC typeN abs(const typeN x) { return ::simd_abs(x); } | ||
| 1900 | /*! @abstract The lanewise maximum of x and y. */ | ||
| 1901 | template <typename typeN> static SIMD_CPPFUNC typeN max(const typeN x, const typeN y) { return ::simd_max(x,y); } | ||
| 1902 | /*! @abstract The lanewise minimum of x and y. */ | ||
| 1903 | template <typename typeN> static SIMD_CPPFUNC typeN min(const typeN x, const typeN y) { return ::simd_min(x,y); } | ||
| 1904 | /*! @abstract x clamped to the interval [min, max]. */ | ||
| 1905 | template <typename typeN> static SIMD_CPPFUNC typeN clamp(const typeN x, const typeN min, const typeN max) { return ::simd_clamp(x,min,max); } | ||
| 1906 | /*! @abstract -1 if x < 0, +1 if x > 0, and 0 otherwise. */ | ||
| 1907 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN sign(const fptypeN x) { return ::simd_sign(x); } | ||
| 1908 | /*! @abstract Linearly interpolates between x and y, taking the value x when t=0 and y when t=1 */ | ||
| 1909 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN mix(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); } | ||
| 1910 | /*! @abstract An approximation to 1/x. */ | ||
| 1911 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return simd_recip(x); } | ||
| 1912 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1913 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return simd_rsqrt(x); } | ||
| 1914 | /*! @abstract The "fracional part" of x, in the range [0,1). */ | ||
| 1915 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN fract(const fptypeN x) { return ::simd_fract(x); } | ||
| 1916 | /*! @abstract 0 if x < edge, 1 otherwise. */ | ||
| 1917 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN step(const fptypeN edge, const fptypeN x) { return ::simd_step(edge,x); } | ||
| 1918 | /*! @abstract smoothly interpolates from 0 at edge0 to 1 at edge1. */ | ||
| 1919 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN smoothstep(const fptypeN edge0, const fptypeN edge1, const fptypeN x) { return ::simd_smoothstep(edge0,edge1,x); } | ||
| 1920 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1921 | * corresponding lane of y. | ||
| 1922 | * | ||
| 1923 | * @discussion This isn't operator== because that's already defined by | ||
| 1924 | * the compiler to return a lane mask. */ | ||
| 1925 | template <typename fptypeN> static SIMD_CPPFUNC simd_bool equal(const fptypeN x, const fptypeN y) { return ::simd_equal(x, y); } | ||
| 1926 | #if __cpp_decltype_auto | ||
| 1927 | /* If you are targeting an earlier version of the C++ standard that lacks | ||
| 1928 | decltype_auto support, you may use the C-style simd_reduce_* functions | ||
| 1929 | instead. */ | ||
| 1930 | /*! @abstract The sum of the elements in x. May overflow. */ | ||
| 1931 | template <typename typeN> static SIMD_CPPFUNC auto reduce_add(typeN x) { return ::simd_reduce_add(x); } | ||
| 1932 | /*! @abstract The least element in x. */ | ||
| 1933 | template <typename typeN> static SIMD_CPPFUNC auto reduce_min(typeN x) { return ::simd_reduce_min(x); } | ||
| 1934 | /*! @abstract The greatest element in x. */ | ||
| 1935 | template <typename typeN> static SIMD_CPPFUNC auto reduce_max(typeN x) { return ::simd_reduce_max(x); } | ||
| 1936 | #endif | ||
| 1937 | namespace precise { | ||
| 1938 | /*! @abstract An approximation to 1/x. */ | ||
| 1939 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_precise_recip(x); } | ||
| 1940 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1941 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_precise_rsqrt(x); } | ||
| 1942 | } | ||
| 1943 | namespace fast { | ||
| 1944 | /*! @abstract An approximation to 1/x. */ | ||
| 1945 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_fast_recip(x); } | ||
| 1946 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1947 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_fast_rsqrt(x); } | ||
| 1948 | } | ||
| 1949 | } | ||
| 1950 | |||
| 1951 | extern "C" { | ||
| 1952 | #endif /* __cplusplus */ | ||
| 1953 | |||
| 1954 | #pragma mark - Implementation | ||
| 1955 | |||
| 1956 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x) { | ||
| 1957 | return simd_make_char2(simd_abs(simd_make_char8_undef(x))); | ||
| 1958 | } | ||
| 1959 | |||
| 1960 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x) { | ||
| 1961 | return simd_make_char3(simd_abs(simd_make_char8_undef(x))); | ||
| 1962 | } | ||
| 1963 | |||
| 1964 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x) { | ||
| 1965 | return simd_make_char4(simd_abs(simd_make_char8_undef(x))); | ||
| 1966 | } | ||
| 1967 | |||
| 1968 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x) { | ||
| 1969 | #if defined __arm__ || defined __arm64__ | ||
| 1970 | return vabs_s8(x); | ||
| 1971 | #else | ||
| 1972 | return simd_make_char8(simd_abs(simd_make_char16_undef(x))); | ||
| 1973 | #endif | ||
| 1974 | } | ||
| 1975 | |||
| 1976 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) { | ||
| 1977 | #if defined __arm__ || defined __arm64__ | ||
| 1978 | return vabsq_s8(x); | ||
| 1979 | #elif defined __SSE4_1__ | ||
| 1980 | return (simd_char16) _mm_abs_epi8((__m128i)x); | ||
| 1981 | #else | ||
| 1982 | simd_char16 mask = x >> 7; return (x ^ mask) - mask; | ||
| 1983 | #endif | ||
| 1984 | } | ||
| 1985 | |||
| 1986 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x) { | ||
| 1987 | #if defined __AVX2__ | ||
| 1988 | return _mm256_abs_epi8(x); | ||
| 1989 | #else | ||
| 1990 | return simd_make_char32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 1991 | #endif | ||
| 1992 | } | ||
| 1993 | |||
| 1994 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x) { | ||
| 1995 | #if defined __AVX512BW__ | ||
| 1996 | return _mm512_abs_epi8(x); | ||
| 1997 | #else | ||
| 1998 | return simd_make_char64(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 1999 | #endif | ||
| 2000 | } | ||
| 2001 | |||
| 2002 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x) { | ||
| 2003 | return simd_make_short2(simd_abs(simd_make_short4_undef(x))); | ||
| 2004 | } | ||
| 2005 | |||
| 2006 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x) { | ||
| 2007 | return simd_make_short3(simd_abs(simd_make_short4_undef(x))); | ||
| 2008 | } | ||
| 2009 | |||
| 2010 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x) { | ||
| 2011 | #if defined __arm__ || defined __arm64__ | ||
| 2012 | return vabs_s16(x); | ||
| 2013 | #else | ||
| 2014 | return simd_make_short4(simd_abs(simd_make_short8_undef(x))); | ||
| 2015 | #endif | ||
| 2016 | } | ||
| 2017 | |||
| 2018 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) { | ||
| 2019 | #if defined __arm__ || defined __arm64__ | ||
| 2020 | return vabsq_s16(x); | ||
| 2021 | #elif defined __SSE4_1__ | ||
| 2022 | return (simd_short8) _mm_abs_epi16((__m128i)x); | ||
| 2023 | #else | ||
| 2024 | simd_short8 mask = x >> 15; return (x ^ mask) - mask; | ||
| 2025 | #endif | ||
| 2026 | } | ||
| 2027 | |||
| 2028 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x) { | ||
| 2029 | #if defined __AVX2__ | ||
| 2030 | return _mm256_abs_epi16(x); | ||
| 2031 | #else | ||
| 2032 | return simd_make_short16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2033 | #endif | ||
| 2034 | } | ||
| 2035 | |||
| 2036 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x) { | ||
| 2037 | #if defined __AVX512BW__ | ||
| 2038 | return _mm512_abs_epi16(x); | ||
| 2039 | #else | ||
| 2040 | return simd_make_short32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2041 | #endif | ||
| 2042 | } | ||
| 2043 | |||
| 2044 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x) { | ||
| 2045 | #if defined __arm__ || defined __arm64__ | ||
| 2046 | return vabs_s32(x); | ||
| 2047 | #else | ||
| 2048 | return simd_make_int2(simd_abs(simd_make_int4_undef(x))); | ||
| 2049 | #endif | ||
| 2050 | } | ||
| 2051 | |||
| 2052 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x) { | ||
| 2053 | return simd_make_int3(simd_abs(simd_make_int4_undef(x))); | ||
| 2054 | } | ||
| 2055 | |||
| 2056 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) { | ||
| 2057 | #if defined __arm__ || defined __arm64__ | ||
| 2058 | return vabsq_s32(x); | ||
| 2059 | #elif defined __SSE4_1__ | ||
| 2060 | return (simd_int4) _mm_abs_epi32((__m128i)x); | ||
| 2061 | #else | ||
| 2062 | simd_int4 mask = x >> 31; return (x ^ mask) - mask; | ||
| 2063 | #endif | ||
| 2064 | } | ||
| 2065 | |||
| 2066 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x) { | ||
| 2067 | #if defined __AVX2__ | ||
| 2068 | return _mm256_abs_epi32(x); | ||
| 2069 | #else | ||
| 2070 | return simd_make_int8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2071 | #endif | ||
| 2072 | } | ||
| 2073 | |||
| 2074 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x) { | ||
| 2075 | #if defined __AVX512F__ | ||
| 2076 | return _mm512_abs_epi32(x); | ||
| 2077 | #else | ||
| 2078 | return simd_make_int16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2079 | #endif | ||
| 2080 | } | ||
| 2081 | |||
| 2082 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x) { | ||
| 2083 | return __tg_fabs(x); | ||
| 2084 | } | ||
| 2085 | |||
| 2086 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x) { | ||
| 2087 | return __tg_fabs(x); | ||
| 2088 | } | ||
| 2089 | |||
| 2090 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x) { | ||
| 2091 | return __tg_fabs(x); | ||
| 2092 | } | ||
| 2093 | |||
| 2094 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x) { | ||
| 2095 | return __tg_fabs(x); | ||
| 2096 | } | ||
| 2097 | |||
| 2098 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x) { | ||
| 2099 | return __tg_fabs(x); | ||
| 2100 | } | ||
| 2101 | |||
| 2102 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) { | ||
| 2103 | #if defined __arm64__ | ||
| 2104 | return vabsq_s64(x); | ||
| 2105 | #elif defined __SSE4_1__ | ||
| 2106 | return (simd_long2) _mm_abs_epi64((__m128i)x); | ||
| 2107 | #else | ||
| 2108 | simd_long2 mask = x >> 63; return (x ^ mask) - mask; | ||
| 2109 | #endif | ||
| 2110 | } | ||
| 2111 | |||
| 2112 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x) { | ||
| 2113 | return simd_make_long3(simd_abs(simd_make_long4_undef(x))); | ||
| 2114 | } | ||
| 2115 | |||
| 2116 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x) { | ||
| 2117 | #if defined __AVX2__ | ||
| 2118 | return _mm256_abs_epi64(x); | ||
| 2119 | #else | ||
| 2120 | return simd_make_long4(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2121 | #endif | ||
| 2122 | } | ||
| 2123 | |||
| 2124 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x) { | ||
| 2125 | #if defined __AVX512F__ | ||
| 2126 | return _mm512_abs_epi64(x); | ||
| 2127 | #else | ||
| 2128 | return simd_make_long8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2129 | #endif | ||
| 2130 | } | ||
| 2131 | |||
| 2132 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x) { | ||
| 2133 | return __tg_fabs(x); | ||
| 2134 | } | ||
| 2135 | |||
| 2136 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x) { | ||
| 2137 | return __tg_fabs(x); | ||
| 2138 | } | ||
| 2139 | |||
| 2140 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x) { | ||
| 2141 | return __tg_fabs(x); | ||
| 2142 | } | ||
| 2143 | |||
| 2144 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x) { | ||
| 2145 | return __tg_fabs(x); | ||
| 2146 | } | ||
| 2147 | |||
| 2148 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y) { | ||
| 2149 | return simd_make_char2(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2150 | } | ||
| 2151 | |||
| 2152 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y) { | ||
| 2153 | return simd_make_char3(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2154 | } | ||
| 2155 | |||
| 2156 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y) { | ||
| 2157 | return simd_make_char4(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2158 | } | ||
| 2159 | |||
| 2160 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y) { | ||
| 2161 | #if defined __arm__ || defined __arm64__ | ||
| 2162 | return vmin_s8(x, y); | ||
| 2163 | #else | ||
| 2164 | return simd_make_char8(simd_min(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2165 | #endif | ||
| 2166 | |||
| 2167 | } | ||
| 2168 | |||
| 2169 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) { | ||
| 2170 | #if defined __arm__ || defined __arm64__ | ||
| 2171 | return vminq_s8(x, y); | ||
| 2172 | #elif defined __SSE4_1__ | ||
| 2173 | return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y); | ||
| 2174 | #else | ||
| 2175 | return simd_bitselect(x, y, y < x); | ||
| 2176 | #endif | ||
| 2177 | } | ||
| 2178 | |||
| 2179 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y) { | ||
| 2180 | #if defined __AVX2__ | ||
| 2181 | return _mm256_min_epi8(x, y); | ||
| 2182 | #else | ||
| 2183 | return simd_bitselect(x, y, y < x); | ||
| 2184 | #endif | ||
| 2185 | } | ||
| 2186 | |||
| 2187 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y) { | ||
| 2188 | #if defined __AVX512BW__ | ||
| 2189 | return _mm512_min_epi8(x, y); | ||
| 2190 | #else | ||
| 2191 | return simd_bitselect(x, y, y < x); | ||
| 2192 | #endif | ||
| 2193 | } | ||
| 2194 | |||
| 2195 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y) { | ||
| 2196 | return simd_make_uchar2(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2197 | } | ||
| 2198 | |||
| 2199 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y) { | ||
| 2200 | return simd_make_uchar3(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2201 | } | ||
| 2202 | |||
| 2203 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y) { | ||
| 2204 | return simd_make_uchar4(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2205 | } | ||
| 2206 | |||
| 2207 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y) { | ||
| 2208 | #if defined __arm__ || defined __arm64__ | ||
| 2209 | return vmin_u8(x, y); | ||
| 2210 | #else | ||
| 2211 | return simd_make_uchar8(simd_min(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2212 | #endif | ||
| 2213 | |||
| 2214 | } | ||
| 2215 | |||
| 2216 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) { | ||
| 2217 | #if defined __arm__ || defined __arm64__ | ||
| 2218 | return vminq_u8(x, y); | ||
| 2219 | #elif defined __SSE4_1__ | ||
| 2220 | return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y); | ||
| 2221 | #else | ||
| 2222 | return simd_bitselect(x, y, y < x); | ||
| 2223 | #endif | ||
| 2224 | } | ||
| 2225 | |||
| 2226 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y) { | ||
| 2227 | #if defined __AVX2__ | ||
| 2228 | return _mm256_min_epu8(x, y); | ||
| 2229 | #else | ||
| 2230 | return simd_bitselect(x, y, y < x); | ||
| 2231 | #endif | ||
| 2232 | } | ||
| 2233 | |||
| 2234 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y) { | ||
| 2235 | #if defined __AVX512BW__ | ||
| 2236 | return _mm512_min_epu8(x, y); | ||
| 2237 | #else | ||
| 2238 | return simd_bitselect(x, y, y < x); | ||
| 2239 | #endif | ||
| 2240 | } | ||
| 2241 | |||
| 2242 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y) { | ||
| 2243 | return simd_make_short2(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2244 | } | ||
| 2245 | |||
| 2246 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y) { | ||
| 2247 | return simd_make_short3(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2248 | } | ||
| 2249 | |||
| 2250 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y) { | ||
| 2251 | #if defined __arm__ || defined __arm64__ | ||
| 2252 | return vmin_s16(x, y); | ||
| 2253 | #else | ||
| 2254 | return simd_make_short4(simd_min(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2255 | #endif | ||
| 2256 | |||
| 2257 | } | ||
| 2258 | |||
| 2259 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) { | ||
| 2260 | #if defined __arm__ || defined __arm64__ | ||
| 2261 | return vminq_s16(x, y); | ||
| 2262 | #elif defined __SSE4_1__ | ||
| 2263 | return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y); | ||
| 2264 | #else | ||
| 2265 | return simd_bitselect(x, y, y < x); | ||
| 2266 | #endif | ||
| 2267 | } | ||
| 2268 | |||
| 2269 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y) { | ||
| 2270 | #if defined __AVX2__ | ||
| 2271 | return _mm256_min_epi16(x, y); | ||
| 2272 | #else | ||
| 2273 | return simd_bitselect(x, y, y < x); | ||
| 2274 | #endif | ||
| 2275 | } | ||
| 2276 | |||
| 2277 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y) { | ||
| 2278 | #if defined __AVX512BW__ | ||
| 2279 | return _mm512_min_epi16(x, y); | ||
| 2280 | #else | ||
| 2281 | return simd_bitselect(x, y, y < x); | ||
| 2282 | #endif | ||
| 2283 | } | ||
| 2284 | |||
| 2285 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y) { | ||
| 2286 | return simd_make_ushort2(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2287 | } | ||
| 2288 | |||
| 2289 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y) { | ||
| 2290 | return simd_make_ushort3(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2291 | } | ||
| 2292 | |||
| 2293 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y) { | ||
| 2294 | #if defined __arm__ || defined __arm64__ | ||
| 2295 | return vmin_u16(x, y); | ||
| 2296 | #else | ||
| 2297 | return simd_make_ushort4(simd_min(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2298 | #endif | ||
| 2299 | |||
| 2300 | } | ||
| 2301 | |||
| 2302 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) { | ||
| 2303 | #if defined __arm__ || defined __arm64__ | ||
| 2304 | return vminq_u16(x, y); | ||
| 2305 | #elif defined __SSE4_1__ | ||
| 2306 | return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y); | ||
| 2307 | #else | ||
| 2308 | return simd_bitselect(x, y, y < x); | ||
| 2309 | #endif | ||
| 2310 | } | ||
| 2311 | |||
| 2312 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y) { | ||
| 2313 | #if defined __AVX2__ | ||
| 2314 | return _mm256_min_epu16(x, y); | ||
| 2315 | #else | ||
| 2316 | return simd_bitselect(x, y, y < x); | ||
| 2317 | #endif | ||
| 2318 | } | ||
| 2319 | |||
| 2320 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y) { | ||
| 2321 | #if defined __AVX512BW__ | ||
| 2322 | return _mm512_min_epu16(x, y); | ||
| 2323 | #else | ||
| 2324 | return simd_bitselect(x, y, y < x); | ||
| 2325 | #endif | ||
| 2326 | } | ||
| 2327 | |||
| 2328 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y) { | ||
| 2329 | #if defined __arm__ || defined __arm64__ | ||
| 2330 | return vmin_s32(x, y); | ||
| 2331 | #else | ||
| 2332 | return simd_make_int2(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2333 | #endif | ||
| 2334 | |||
| 2335 | } | ||
| 2336 | |||
| 2337 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y) { | ||
| 2338 | return simd_make_int3(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2339 | } | ||
| 2340 | |||
| 2341 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) { | ||
| 2342 | #if defined __arm__ || defined __arm64__ | ||
| 2343 | return vminq_s32(x, y); | ||
| 2344 | #elif defined __SSE4_1__ | ||
| 2345 | return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y); | ||
| 2346 | #else | ||
| 2347 | return simd_bitselect(x, y, y < x); | ||
| 2348 | #endif | ||
| 2349 | } | ||
| 2350 | |||
| 2351 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y) { | ||
| 2352 | #if defined __AVX2__ | ||
| 2353 | return _mm256_min_epi32(x, y); | ||
| 2354 | #else | ||
| 2355 | return simd_bitselect(x, y, y < x); | ||
| 2356 | #endif | ||
| 2357 | } | ||
| 2358 | |||
| 2359 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y) { | ||
| 2360 | #if defined __AVX512F__ | ||
| 2361 | return _mm512_min_epi32(x, y); | ||
| 2362 | #else | ||
| 2363 | return simd_bitselect(x, y, y < x); | ||
| 2364 | #endif | ||
| 2365 | } | ||
| 2366 | |||
| 2367 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y) { | ||
| 2368 | #if defined __arm__ || defined __arm64__ | ||
| 2369 | return vmin_u32(x, y); | ||
| 2370 | #else | ||
| 2371 | return simd_make_uint2(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2372 | #endif | ||
| 2373 | |||
| 2374 | } | ||
| 2375 | |||
| 2376 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y) { | ||
| 2377 | return simd_make_uint3(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2378 | } | ||
| 2379 | |||
| 2380 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) { | ||
| 2381 | #if defined __arm__ || defined __arm64__ | ||
| 2382 | return vminq_u32(x, y); | ||
| 2383 | #elif defined __SSE4_1__ | ||
| 2384 | return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y); | ||
| 2385 | #else | ||
| 2386 | return simd_bitselect(x, y, y < x); | ||
| 2387 | #endif | ||
| 2388 | } | ||
| 2389 | |||
| 2390 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y) { | ||
| 2391 | #if defined __AVX2__ | ||
| 2392 | return _mm256_min_epu32(x, y); | ||
| 2393 | #else | ||
| 2394 | return simd_bitselect(x, y, y < x); | ||
| 2395 | #endif | ||
| 2396 | } | ||
| 2397 | |||
| 2398 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y) { | ||
| 2399 | #if defined __AVX512F__ | ||
| 2400 | return _mm512_min_epu32(x, y); | ||
| 2401 | #else | ||
| 2402 | return simd_bitselect(x, y, y < x); | ||
| 2403 | #endif | ||
| 2404 | } | ||
| 2405 | |||
| 2406 | static inline SIMD_CFUNC float simd_min(float x, float y) { | ||
| 2407 | return __tg_fmin(x,y); | ||
| 2408 | } | ||
| 2409 | |||
| 2410 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y) { | ||
| 2411 | return __tg_fmin(x,y); | ||
| 2412 | } | ||
| 2413 | |||
| 2414 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y) { | ||
| 2415 | return __tg_fmin(x,y); | ||
| 2416 | } | ||
| 2417 | |||
| 2418 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y) { | ||
| 2419 | return __tg_fmin(x,y); | ||
| 2420 | } | ||
| 2421 | |||
| 2422 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y) { | ||
| 2423 | return __tg_fmin(x,y); | ||
| 2424 | } | ||
| 2425 | |||
| 2426 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y) { | ||
| 2427 | return __tg_fmin(x,y); | ||
| 2428 | } | ||
| 2429 | |||
| 2430 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y) { | ||
| 2431 | #if defined __AVX512VL__ | ||
| 2432 | return _mm_min_epi64(x, y); | ||
| 2433 | #else | ||
| 2434 | return simd_bitselect(x, y, y < x); | ||
| 2435 | #endif | ||
| 2436 | } | ||
| 2437 | |||
| 2438 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y) { | ||
| 2439 | return simd_make_long3(simd_min(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2440 | } | ||
| 2441 | |||
| 2442 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y) { | ||
| 2443 | #if defined __AVX512VL__ | ||
| 2444 | return _mm256_min_epi64(x, y); | ||
| 2445 | #else | ||
| 2446 | return simd_bitselect(x, y, y < x); | ||
| 2447 | #endif | ||
| 2448 | } | ||
| 2449 | |||
| 2450 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y) { | ||
| 2451 | #if defined __AVX512F__ | ||
| 2452 | return _mm512_min_epi64(x, y); | ||
| 2453 | #else | ||
| 2454 | return simd_bitselect(x, y, y < x); | ||
| 2455 | #endif | ||
| 2456 | } | ||
| 2457 | |||
| 2458 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y) { | ||
| 2459 | #if defined __AVX512VL__ | ||
| 2460 | return _mm_min_epu64(x, y); | ||
| 2461 | #else | ||
| 2462 | return simd_bitselect(x, y, y < x); | ||
| 2463 | #endif | ||
| 2464 | } | ||
| 2465 | |||
| 2466 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y) { | ||
| 2467 | return simd_make_ulong3(simd_min(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2468 | } | ||
| 2469 | |||
| 2470 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y) { | ||
| 2471 | #if defined __AVX512VL__ | ||
| 2472 | return _mm256_min_epu64(x, y); | ||
| 2473 | #else | ||
| 2474 | return simd_bitselect(x, y, y < x); | ||
| 2475 | #endif | ||
| 2476 | } | ||
| 2477 | |||
| 2478 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y) { | ||
| 2479 | #if defined __AVX512F__ | ||
| 2480 | return _mm512_min_epu64(x, y); | ||
| 2481 | #else | ||
| 2482 | return simd_bitselect(x, y, y < x); | ||
| 2483 | #endif | ||
| 2484 | } | ||
| 2485 | |||
| 2486 | static inline SIMD_CFUNC double simd_min(double x, double y) { | ||
| 2487 | return __tg_fmin(x,y); | ||
| 2488 | } | ||
| 2489 | |||
| 2490 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y) { | ||
| 2491 | return __tg_fmin(x,y); | ||
| 2492 | } | ||
| 2493 | |||
| 2494 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y) { | ||
| 2495 | return __tg_fmin(x,y); | ||
| 2496 | } | ||
| 2497 | |||
| 2498 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y) { | ||
| 2499 | return __tg_fmin(x,y); | ||
| 2500 | } | ||
| 2501 | |||
| 2502 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y) { | ||
| 2503 | return __tg_fmin(x,y); | ||
| 2504 | } | ||
| 2505 | |||
| 2506 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y) { | ||
| 2507 | return simd_make_char2(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2508 | } | ||
| 2509 | |||
| 2510 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y) { | ||
| 2511 | return simd_make_char3(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2512 | } | ||
| 2513 | |||
| 2514 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y) { | ||
| 2515 | return simd_make_char4(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2516 | } | ||
| 2517 | |||
| 2518 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y) { | ||
| 2519 | #if defined __arm__ || defined __arm64__ | ||
| 2520 | return vmax_s8(x, y); | ||
| 2521 | #else | ||
| 2522 | return simd_make_char8(simd_max(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2523 | #endif | ||
| 2524 | |||
| 2525 | } | ||
| 2526 | |||
| 2527 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) { | ||
| 2528 | #if defined __arm__ || defined __arm64__ | ||
| 2529 | return vmaxq_s8(x, y); | ||
| 2530 | #elif defined __SSE4_1__ | ||
| 2531 | return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y); | ||
| 2532 | #else | ||
| 2533 | return simd_bitselect(x, y, x < y); | ||
| 2534 | #endif | ||
| 2535 | } | ||
| 2536 | |||
| 2537 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y) { | ||
| 2538 | #if defined __AVX2__ | ||
| 2539 | return _mm256_max_epi8(x, y); | ||
| 2540 | #else | ||
| 2541 | return simd_bitselect(x, y, x < y); | ||
| 2542 | #endif | ||
| 2543 | } | ||
| 2544 | |||
| 2545 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y) { | ||
| 2546 | #if defined __AVX512BW__ | ||
| 2547 | return _mm512_max_epi8(x, y); | ||
| 2548 | #else | ||
| 2549 | return simd_bitselect(x, y, x < y); | ||
| 2550 | #endif | ||
| 2551 | } | ||
| 2552 | |||
| 2553 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y) { | ||
| 2554 | return simd_make_uchar2(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2555 | } | ||
| 2556 | |||
| 2557 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y) { | ||
| 2558 | return simd_make_uchar3(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2559 | } | ||
| 2560 | |||
| 2561 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y) { | ||
| 2562 | return simd_make_uchar4(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2563 | } | ||
| 2564 | |||
| 2565 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y) { | ||
| 2566 | #if defined __arm__ || defined __arm64__ | ||
| 2567 | return vmax_u8(x, y); | ||
| 2568 | #else | ||
| 2569 | return simd_make_uchar8(simd_max(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2570 | #endif | ||
| 2571 | |||
| 2572 | } | ||
| 2573 | |||
| 2574 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) { | ||
| 2575 | #if defined __arm__ || defined __arm64__ | ||
| 2576 | return vmaxq_u8(x, y); | ||
| 2577 | #elif defined __SSE4_1__ | ||
| 2578 | return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y); | ||
| 2579 | #else | ||
| 2580 | return simd_bitselect(x, y, x < y); | ||
| 2581 | #endif | ||
| 2582 | } | ||
| 2583 | |||
| 2584 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y) { | ||
| 2585 | #if defined __AVX2__ | ||
| 2586 | return _mm256_max_epu8(x, y); | ||
| 2587 | #else | ||
| 2588 | return simd_bitselect(x, y, x < y); | ||
| 2589 | #endif | ||
| 2590 | } | ||
| 2591 | |||
| 2592 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y) { | ||
| 2593 | #if defined __AVX512BW__ | ||
| 2594 | return _mm512_max_epu8(x, y); | ||
| 2595 | #else | ||
| 2596 | return simd_bitselect(x, y, x < y); | ||
| 2597 | #endif | ||
| 2598 | } | ||
| 2599 | |||
| 2600 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y) { | ||
| 2601 | return simd_make_short2(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2602 | } | ||
| 2603 | |||
| 2604 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y) { | ||
| 2605 | return simd_make_short3(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2606 | } | ||
| 2607 | |||
| 2608 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y) { | ||
| 2609 | #if defined __arm__ || defined __arm64__ | ||
| 2610 | return vmax_s16(x, y); | ||
| 2611 | #else | ||
| 2612 | return simd_make_short4(simd_max(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2613 | #endif | ||
| 2614 | |||
| 2615 | } | ||
| 2616 | |||
| 2617 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) { | ||
| 2618 | #if defined __arm__ || defined __arm64__ | ||
| 2619 | return vmaxq_s16(x, y); | ||
| 2620 | #elif defined __SSE4_1__ | ||
| 2621 | return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y); | ||
| 2622 | #else | ||
| 2623 | return simd_bitselect(x, y, x < y); | ||
| 2624 | #endif | ||
| 2625 | } | ||
| 2626 | |||
| 2627 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y) { | ||
| 2628 | #if defined __AVX2__ | ||
| 2629 | return _mm256_max_epi16(x, y); | ||
| 2630 | #else | ||
| 2631 | return simd_bitselect(x, y, x < y); | ||
| 2632 | #endif | ||
| 2633 | } | ||
| 2634 | |||
| 2635 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y) { | ||
| 2636 | #if defined __AVX512BW__ | ||
| 2637 | return _mm512_max_epi16(x, y); | ||
| 2638 | #else | ||
| 2639 | return simd_bitselect(x, y, x < y); | ||
| 2640 | #endif | ||
| 2641 | } | ||
| 2642 | |||
| 2643 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y) { | ||
| 2644 | return simd_make_ushort2(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2645 | } | ||
| 2646 | |||
| 2647 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y) { | ||
| 2648 | return simd_make_ushort3(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2649 | } | ||
| 2650 | |||
| 2651 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y) { | ||
| 2652 | #if defined __arm__ || defined __arm64__ | ||
| 2653 | return vmax_u16(x, y); | ||
| 2654 | #else | ||
| 2655 | return simd_make_ushort4(simd_max(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2656 | #endif | ||
| 2657 | |||
| 2658 | } | ||
| 2659 | |||
| 2660 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) { | ||
| 2661 | #if defined __arm__ || defined __arm64__ | ||
| 2662 | return vmaxq_u16(x, y); | ||
| 2663 | #elif defined __SSE4_1__ | ||
| 2664 | return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y); | ||
| 2665 | #else | ||
| 2666 | return simd_bitselect(x, y, x < y); | ||
| 2667 | #endif | ||
| 2668 | } | ||
| 2669 | |||
| 2670 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y) { | ||
| 2671 | #if defined __AVX2__ | ||
| 2672 | return _mm256_max_epu16(x, y); | ||
| 2673 | #else | ||
| 2674 | return simd_bitselect(x, y, x < y); | ||
| 2675 | #endif | ||
| 2676 | } | ||
| 2677 | |||
| 2678 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y) { | ||
| 2679 | #if defined __AVX512BW__ | ||
| 2680 | return _mm512_max_epu16(x, y); | ||
| 2681 | #else | ||
| 2682 | return simd_bitselect(x, y, x < y); | ||
| 2683 | #endif | ||
| 2684 | } | ||
| 2685 | |||
| 2686 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y) { | ||
| 2687 | #if defined __arm__ || defined __arm64__ | ||
| 2688 | return vmax_s32(x, y); | ||
| 2689 | #else | ||
| 2690 | return simd_make_int2(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2691 | #endif | ||
| 2692 | |||
| 2693 | } | ||
| 2694 | |||
| 2695 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y) { | ||
| 2696 | return simd_make_int3(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2697 | } | ||
| 2698 | |||
| 2699 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) { | ||
| 2700 | #if defined __arm__ || defined __arm64__ | ||
| 2701 | return vmaxq_s32(x, y); | ||
| 2702 | #elif defined __SSE4_1__ | ||
| 2703 | return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y); | ||
| 2704 | #else | ||
| 2705 | return simd_bitselect(x, y, x < y); | ||
| 2706 | #endif | ||
| 2707 | } | ||
| 2708 | |||
| 2709 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y) { | ||
| 2710 | #if defined __AVX2__ | ||
| 2711 | return _mm256_max_epi32(x, y); | ||
| 2712 | #else | ||
| 2713 | return simd_bitselect(x, y, x < y); | ||
| 2714 | #endif | ||
| 2715 | } | ||
| 2716 | |||
| 2717 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y) { | ||
| 2718 | #if defined __AVX512F__ | ||
| 2719 | return _mm512_max_epi32(x, y); | ||
| 2720 | #else | ||
| 2721 | return simd_bitselect(x, y, x < y); | ||
| 2722 | #endif | ||
| 2723 | } | ||
| 2724 | |||
| 2725 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y) { | ||
| 2726 | #if defined __arm__ || defined __arm64__ | ||
| 2727 | return vmax_u32(x, y); | ||
| 2728 | #else | ||
| 2729 | return simd_make_uint2(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2730 | #endif | ||
| 2731 | |||
| 2732 | } | ||
| 2733 | |||
| 2734 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y) { | ||
| 2735 | return simd_make_uint3(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2736 | } | ||
| 2737 | |||
| 2738 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) { | ||
| 2739 | #if defined __arm__ || defined __arm64__ | ||
| 2740 | return vmaxq_u32(x, y); | ||
| 2741 | #elif defined __SSE4_1__ | ||
| 2742 | return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y); | ||
| 2743 | #else | ||
| 2744 | return simd_bitselect(x, y, x < y); | ||
| 2745 | #endif | ||
| 2746 | } | ||
| 2747 | |||
| 2748 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y) { | ||
| 2749 | #if defined __AVX2__ | ||
| 2750 | return _mm256_max_epu32(x, y); | ||
| 2751 | #else | ||
| 2752 | return simd_bitselect(x, y, x < y); | ||
| 2753 | #endif | ||
| 2754 | } | ||
| 2755 | |||
| 2756 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y) { | ||
| 2757 | #if defined __AVX512F__ | ||
| 2758 | return _mm512_max_epu32(x, y); | ||
| 2759 | #else | ||
| 2760 | return simd_bitselect(x, y, x < y); | ||
| 2761 | #endif | ||
| 2762 | } | ||
| 2763 | |||
| 2764 | static inline SIMD_CFUNC float simd_max(float x, float y) { | ||
| 2765 | return __tg_fmax(x,y); | ||
| 2766 | } | ||
| 2767 | |||
| 2768 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y) { | ||
| 2769 | return __tg_fmax(x,y); | ||
| 2770 | } | ||
| 2771 | |||
| 2772 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y) { | ||
| 2773 | return __tg_fmax(x,y); | ||
| 2774 | } | ||
| 2775 | |||
| 2776 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y) { | ||
| 2777 | return __tg_fmax(x,y); | ||
| 2778 | } | ||
| 2779 | |||
| 2780 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y) { | ||
| 2781 | return __tg_fmax(x,y); | ||
| 2782 | } | ||
| 2783 | |||
| 2784 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y) { | ||
| 2785 | return __tg_fmax(x,y); | ||
| 2786 | } | ||
| 2787 | |||
| 2788 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y) { | ||
| 2789 | #if defined __AVX512VL__ | ||
| 2790 | return _mm_max_epi64(x, y); | ||
| 2791 | #else | ||
| 2792 | return simd_bitselect(x, y, x < y); | ||
| 2793 | #endif | ||
| 2794 | } | ||
| 2795 | |||
| 2796 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y) { | ||
| 2797 | return simd_make_long3(simd_max(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2798 | } | ||
| 2799 | |||
| 2800 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y) { | ||
| 2801 | #if defined __AVX512VL__ | ||
| 2802 | return _mm256_max_epi64(x, y); | ||
| 2803 | #else | ||
| 2804 | return simd_bitselect(x, y, x < y); | ||
| 2805 | #endif | ||
| 2806 | } | ||
| 2807 | |||
| 2808 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y) { | ||
| 2809 | #if defined __AVX512F__ | ||
| 2810 | return _mm512_max_epi64(x, y); | ||
| 2811 | #else | ||
| 2812 | return simd_bitselect(x, y, x < y); | ||
| 2813 | #endif | ||
| 2814 | } | ||
| 2815 | |||
| 2816 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y) { | ||
| 2817 | #if defined __AVX512VL__ | ||
| 2818 | return _mm_max_epu64(x, y); | ||
| 2819 | #else | ||
| 2820 | return simd_bitselect(x, y, x < y); | ||
| 2821 | #endif | ||
| 2822 | } | ||
| 2823 | |||
| 2824 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y) { | ||
| 2825 | return simd_make_ulong3(simd_max(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2826 | } | ||
| 2827 | |||
| 2828 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y) { | ||
| 2829 | #if defined __AVX512VL__ | ||
| 2830 | return _mm256_max_epu64(x, y); | ||
| 2831 | #else | ||
| 2832 | return simd_bitselect(x, y, x < y); | ||
| 2833 | #endif | ||
| 2834 | } | ||
| 2835 | |||
| 2836 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y) { | ||
| 2837 | #if defined __AVX512F__ | ||
| 2838 | return _mm512_max_epu64(x, y); | ||
| 2839 | #else | ||
| 2840 | return simd_bitselect(x, y, x < y); | ||
| 2841 | #endif | ||
| 2842 | } | ||
| 2843 | |||
| 2844 | static inline SIMD_CFUNC double simd_max(double x, double y) { | ||
| 2845 | return __tg_fmax(x,y); | ||
| 2846 | } | ||
| 2847 | |||
| 2848 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y) { | ||
| 2849 | return __tg_fmax(x,y); | ||
| 2850 | } | ||
| 2851 | |||
| 2852 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y) { | ||
| 2853 | return __tg_fmax(x,y); | ||
| 2854 | } | ||
| 2855 | |||
| 2856 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y) { | ||
| 2857 | return __tg_fmax(x,y); | ||
| 2858 | } | ||
| 2859 | |||
| 2860 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y) { | ||
| 2861 | return __tg_fmax(x,y); | ||
| 2862 | } | ||
| 2863 | |||
| 2864 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max) { | ||
| 2865 | return simd_min(simd_max(x, min), max); | ||
| 2866 | } | ||
| 2867 | |||
| 2868 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max) { | ||
| 2869 | return simd_min(simd_max(x, min), max); | ||
| 2870 | } | ||
| 2871 | |||
| 2872 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max) { | ||
| 2873 | return simd_min(simd_max(x, min), max); | ||
| 2874 | } | ||
| 2875 | |||
| 2876 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max) { | ||
| 2877 | return simd_min(simd_max(x, min), max); | ||
| 2878 | } | ||
| 2879 | |||
| 2880 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max) { | ||
| 2881 | return simd_min(simd_max(x, min), max); | ||
| 2882 | } | ||
| 2883 | |||
| 2884 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max) { | ||
| 2885 | return simd_min(simd_max(x, min), max); | ||
| 2886 | } | ||
| 2887 | |||
| 2888 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max) { | ||
| 2889 | return simd_min(simd_max(x, min), max); | ||
| 2890 | } | ||
| 2891 | |||
| 2892 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max) { | ||
| 2893 | return simd_min(simd_max(x, min), max); | ||
| 2894 | } | ||
| 2895 | |||
| 2896 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max) { | ||
| 2897 | return simd_min(simd_max(x, min), max); | ||
| 2898 | } | ||
| 2899 | |||
| 2900 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max) { | ||
| 2901 | return simd_min(simd_max(x, min), max); | ||
| 2902 | } | ||
| 2903 | |||
| 2904 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max) { | ||
| 2905 | return simd_min(simd_max(x, min), max); | ||
| 2906 | } | ||
| 2907 | |||
| 2908 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max) { | ||
| 2909 | return simd_min(simd_max(x, min), max); | ||
| 2910 | } | ||
| 2911 | |||
| 2912 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max) { | ||
| 2913 | return simd_min(simd_max(x, min), max); | ||
| 2914 | } | ||
| 2915 | |||
| 2916 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max) { | ||
| 2917 | return simd_min(simd_max(x, min), max); | ||
| 2918 | } | ||
| 2919 | |||
| 2920 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max) { | ||
| 2921 | return simd_min(simd_max(x, min), max); | ||
| 2922 | } | ||
| 2923 | |||
| 2924 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max) { | ||
| 2925 | return simd_min(simd_max(x, min), max); | ||
| 2926 | } | ||
| 2927 | |||
| 2928 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max) { | ||
| 2929 | return simd_min(simd_max(x, min), max); | ||
| 2930 | } | ||
| 2931 | |||
| 2932 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max) { | ||
| 2933 | return simd_min(simd_max(x, min), max); | ||
| 2934 | } | ||
| 2935 | |||
| 2936 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max) { | ||
| 2937 | return simd_min(simd_max(x, min), max); | ||
| 2938 | } | ||
| 2939 | |||
| 2940 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max) { | ||
| 2941 | return simd_min(simd_max(x, min), max); | ||
| 2942 | } | ||
| 2943 | |||
| 2944 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max) { | ||
| 2945 | return simd_min(simd_max(x, min), max); | ||
| 2946 | } | ||
| 2947 | |||
| 2948 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max) { | ||
| 2949 | return simd_min(simd_max(x, min), max); | ||
| 2950 | } | ||
| 2951 | |||
| 2952 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max) { | ||
| 2953 | return simd_min(simd_max(x, min), max); | ||
| 2954 | } | ||
| 2955 | |||
| 2956 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max) { | ||
| 2957 | return simd_min(simd_max(x, min), max); | ||
| 2958 | } | ||
| 2959 | |||
| 2960 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max) { | ||
| 2961 | return simd_min(simd_max(x, min), max); | ||
| 2962 | } | ||
| 2963 | |||
| 2964 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max) { | ||
| 2965 | return simd_min(simd_max(x, min), max); | ||
| 2966 | } | ||
| 2967 | |||
| 2968 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max) { | ||
| 2969 | return simd_min(simd_max(x, min), max); | ||
| 2970 | } | ||
| 2971 | |||
| 2972 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max) { | ||
| 2973 | return simd_min(simd_max(x, min), max); | ||
| 2974 | } | ||
| 2975 | |||
| 2976 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max) { | ||
| 2977 | return simd_min(simd_max(x, min), max); | ||
| 2978 | } | ||
| 2979 | |||
| 2980 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max) { | ||
| 2981 | return simd_min(simd_max(x, min), max); | ||
| 2982 | } | ||
| 2983 | |||
| 2984 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max) { | ||
| 2985 | return simd_min(simd_max(x, min), max); | ||
| 2986 | } | ||
| 2987 | |||
| 2988 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max) { | ||
| 2989 | return simd_min(simd_max(x, min), max); | ||
| 2990 | } | ||
| 2991 | |||
| 2992 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max) { | ||
| 2993 | return simd_min(simd_max(x, min), max); | ||
| 2994 | } | ||
| 2995 | |||
| 2996 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max) { | ||
| 2997 | return simd_min(simd_max(x, min), max); | ||
| 2998 | } | ||
| 2999 | |||
| 3000 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max) { | ||
| 3001 | return simd_min(simd_max(x, min), max); | ||
| 3002 | } | ||
| 3003 | |||
| 3004 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max) { | ||
| 3005 | return simd_min(simd_max(x, min), max); | ||
| 3006 | } | ||
| 3007 | |||
| 3008 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max) { | ||
| 3009 | return simd_min(simd_max(x, min), max); | ||
| 3010 | } | ||
| 3011 | |||
| 3012 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max) { | ||
| 3013 | return simd_min(simd_max(x, min), max); | ||
| 3014 | } | ||
| 3015 | |||
| 3016 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max) { | ||
| 3017 | return simd_min(simd_max(x, min), max); | ||
| 3018 | } | ||
| 3019 | |||
| 3020 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max) { | ||
| 3021 | return simd_min(simd_max(x, min), max); | ||
| 3022 | } | ||
| 3023 | |||
| 3024 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max) { | ||
| 3025 | return simd_min(simd_max(x, min), max); | ||
| 3026 | } | ||
| 3027 | |||
| 3028 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max) { | ||
| 3029 | return simd_min(simd_max(x, min), max); | ||
| 3030 | } | ||
| 3031 | |||
| 3032 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max) { | ||
| 3033 | return simd_min(simd_max(x, min), max); | ||
| 3034 | } | ||
| 3035 | |||
| 3036 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max) { | ||
| 3037 | return simd_min(simd_max(x, min), max); | ||
| 3038 | } | ||
| 3039 | |||
| 3040 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max) { | ||
| 3041 | return simd_min(simd_max(x, min), max); | ||
| 3042 | } | ||
| 3043 | |||
| 3044 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max) { | ||
| 3045 | return simd_min(simd_max(x, min), max); | ||
| 3046 | } | ||
| 3047 | |||
| 3048 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max) { | ||
| 3049 | return simd_min(simd_max(x, min), max); | ||
| 3050 | } | ||
| 3051 | |||
| 3052 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max) { | ||
| 3053 | return simd_min(simd_max(x, min), max); | ||
| 3054 | } | ||
| 3055 | |||
| 3056 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max) { | ||
| 3057 | return simd_min(simd_max(x, min), max); | ||
| 3058 | } | ||
| 3059 | |||
| 3060 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max) { | ||
| 3061 | return simd_min(simd_max(x, min), max); | ||
| 3062 | } | ||
| 3063 | |||
| 3064 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max) { | ||
| 3065 | return simd_min(simd_max(x, min), max); | ||
| 3066 | } | ||
| 3067 | |||
| 3068 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max) { | ||
| 3069 | return simd_min(simd_max(x, min), max); | ||
| 3070 | } | ||
| 3071 | |||
| 3072 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max) { | ||
| 3073 | return simd_min(simd_max(x, min), max); | ||
| 3074 | } | ||
| 3075 | |||
| 3076 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max) { | ||
| 3077 | return simd_min(simd_max(x, min), max); | ||
| 3078 | } | ||
| 3079 | |||
| 3080 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max) { | ||
| 3081 | return simd_min(simd_max(x, min), max); | ||
| 3082 | } | ||
| 3083 | |||
| 3084 | |||
| 3085 | static inline SIMD_CFUNC float simd_sign(float x) { | ||
| 3086 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3087 | } | ||
| 3088 | |||
| 3089 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) { | ||
| 3090 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3091 | } | ||
| 3092 | |||
| 3093 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x) { | ||
| 3094 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3095 | } | ||
| 3096 | |||
| 3097 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x) { | ||
| 3098 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3099 | } | ||
| 3100 | |||
| 3101 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x) { | ||
| 3102 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3103 | } | ||
| 3104 | |||
| 3105 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) { | ||
| 3106 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3107 | } | ||
| 3108 | |||
| 3109 | static inline SIMD_CFUNC double simd_sign(double x) { | ||
| 3110 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3111 | } | ||
| 3112 | |||
| 3113 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) { | ||
| 3114 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3115 | } | ||
| 3116 | |||
| 3117 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x) { | ||
| 3118 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3119 | } | ||
| 3120 | |||
| 3121 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x) { | ||
| 3122 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3123 | } | ||
| 3124 | |||
| 3125 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x) { | ||
| 3126 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3127 | } | ||
| 3128 | |||
| 3129 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t) { | ||
| 3130 | return x + t*(y - x); | ||
| 3131 | } | ||
| 3132 | |||
| 3133 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t) { | ||
| 3134 | return x + t*(y - x); | ||
| 3135 | } | ||
| 3136 | |||
| 3137 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t) { | ||
| 3138 | return x + t*(y - x); | ||
| 3139 | } | ||
| 3140 | |||
| 3141 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t) { | ||
| 3142 | return x + t*(y - x); | ||
| 3143 | } | ||
| 3144 | |||
| 3145 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t) { | ||
| 3146 | return x + t*(y - x); | ||
| 3147 | } | ||
| 3148 | |||
| 3149 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t) { | ||
| 3150 | return x + t*(y - x); | ||
| 3151 | } | ||
| 3152 | |||
| 3153 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t) { | ||
| 3154 | return x + t*(y - x); | ||
| 3155 | } | ||
| 3156 | |||
| 3157 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t) { | ||
| 3158 | return x + t*(y - x); | ||
| 3159 | } | ||
| 3160 | |||
| 3161 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t) { | ||
| 3162 | return x + t*(y - x); | ||
| 3163 | } | ||
| 3164 | |||
| 3165 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t) { | ||
| 3166 | return x + t*(y - x); | ||
| 3167 | } | ||
| 3168 | |||
| 3169 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t) { | ||
| 3170 | return x + t*(y - x); | ||
| 3171 | } | ||
| 3172 | |||
| 3173 | static inline SIMD_CFUNC float simd_recip(float x) { | ||
| 3174 | #if __FAST_MATH__ | ||
| 3175 | return simd_fast_recip(x); | ||
| 3176 | #else | ||
| 3177 | return simd_precise_recip(x); | ||
| 3178 | #endif | ||
| 3179 | } | ||
| 3180 | |||
| 3181 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x) { | ||
| 3182 | #if __FAST_MATH__ | ||
| 3183 | return simd_fast_recip(x); | ||
| 3184 | #else | ||
| 3185 | return simd_precise_recip(x); | ||
| 3186 | #endif | ||
| 3187 | } | ||
| 3188 | |||
| 3189 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x) { | ||
| 3190 | #if __FAST_MATH__ | ||
| 3191 | return simd_fast_recip(x); | ||
| 3192 | #else | ||
| 3193 | return simd_precise_recip(x); | ||
| 3194 | #endif | ||
| 3195 | } | ||
| 3196 | |||
| 3197 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x) { | ||
| 3198 | #if __FAST_MATH__ | ||
| 3199 | return simd_fast_recip(x); | ||
| 3200 | #else | ||
| 3201 | return simd_precise_recip(x); | ||
| 3202 | #endif | ||
| 3203 | } | ||
| 3204 | |||
| 3205 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x) { | ||
| 3206 | #if __FAST_MATH__ | ||
| 3207 | return simd_fast_recip(x); | ||
| 3208 | #else | ||
| 3209 | return simd_precise_recip(x); | ||
| 3210 | #endif | ||
| 3211 | } | ||
| 3212 | |||
| 3213 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x) { | ||
| 3214 | #if __FAST_MATH__ | ||
| 3215 | return simd_fast_recip(x); | ||
| 3216 | #else | ||
| 3217 | return simd_precise_recip(x); | ||
| 3218 | #endif | ||
| 3219 | } | ||
| 3220 | |||
| 3221 | static inline SIMD_CFUNC double simd_recip(double x) { | ||
| 3222 | #if __FAST_MATH__ | ||
| 3223 | return simd_fast_recip(x); | ||
| 3224 | #else | ||
| 3225 | return simd_precise_recip(x); | ||
| 3226 | #endif | ||
| 3227 | } | ||
| 3228 | |||
| 3229 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x) { | ||
| 3230 | #if __FAST_MATH__ | ||
| 3231 | return simd_fast_recip(x); | ||
| 3232 | #else | ||
| 3233 | return simd_precise_recip(x); | ||
| 3234 | #endif | ||
| 3235 | } | ||
| 3236 | |||
| 3237 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x) { | ||
| 3238 | #if __FAST_MATH__ | ||
| 3239 | return simd_fast_recip(x); | ||
| 3240 | #else | ||
| 3241 | return simd_precise_recip(x); | ||
| 3242 | #endif | ||
| 3243 | } | ||
| 3244 | |||
| 3245 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x) { | ||
| 3246 | #if __FAST_MATH__ | ||
| 3247 | return simd_fast_recip(x); | ||
| 3248 | #else | ||
| 3249 | return simd_precise_recip(x); | ||
| 3250 | #endif | ||
| 3251 | } | ||
| 3252 | |||
| 3253 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x) { | ||
| 3254 | #if __FAST_MATH__ | ||
| 3255 | return simd_fast_recip(x); | ||
| 3256 | #else | ||
| 3257 | return simd_precise_recip(x); | ||
| 3258 | #endif | ||
| 3259 | } | ||
| 3260 | |||
| 3261 | static inline SIMD_CFUNC float simd_fast_recip(float x) { | ||
| 3262 | #if defined __AVX512VL__ | ||
| 3263 | simd_float4 x4 = simd_make_float4(x); | ||
| 3264 | return ((simd_float4)_mm_rcp14_ss(x4, x4)).x; | ||
| 3265 | #elif defined __SSE__ | ||
| 3266 | return ((simd_float4)_mm_rcp_ss(simd_make_float4(x))).x; | ||
| 3267 | #elif defined __ARM_NEON__ | ||
| 3268 | return simd_fast_recip(simd_make_float2_undef(x)).x; | ||
| 3269 | #else | ||
| 3270 | return simd_precise_recip(x); | ||
| 3271 | #endif | ||
| 3272 | } | ||
| 3273 | |||
| 3274 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x) { | ||
| 3275 | #if defined __SSE__ | ||
| 3276 | return simd_make_float2(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3277 | #elif defined __ARM_NEON__ | ||
| 3278 | simd_float2 r = vrecpe_f32(x); | ||
| 3279 | return r * vrecps_f32(x, r); | ||
| 3280 | #else | ||
| 3281 | return simd_precise_recip(x); | ||
| 3282 | #endif | ||
| 3283 | } | ||
| 3284 | |||
| 3285 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x) { | ||
| 3286 | return simd_make_float3(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3287 | } | ||
| 3288 | |||
| 3289 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x) { | ||
| 3290 | #if defined __AVX512VL__ | ||
| 3291 | return _mm_rcp14_ps(x); | ||
| 3292 | #elif defined __SSE__ | ||
| 3293 | return _mm_rcp_ps(x); | ||
| 3294 | #elif defined __ARM_NEON__ | ||
| 3295 | simd_float4 r = vrecpeq_f32(x); | ||
| 3296 | return r * vrecpsq_f32(x, r); | ||
| 3297 | #else | ||
| 3298 | return simd_precise_recip(x); | ||
| 3299 | #endif | ||
| 3300 | } | ||
| 3301 | |||
| 3302 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x) { | ||
| 3303 | #if defined __AVX512VL__ | ||
| 3304 | return _mm256_rcp14_ps(x); | ||
| 3305 | #elif defined __AVX__ | ||
| 3306 | return _mm256_rcp_ps(x); | ||
| 3307 | #else | ||
| 3308 | return simd_make_float8(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3309 | #endif | ||
| 3310 | } | ||
| 3311 | |||
| 3312 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x) { | ||
| 3313 | #if defined __AVX512F__ | ||
| 3314 | return _mm512_rcp14_ps(x); | ||
| 3315 | #else | ||
| 3316 | return simd_make_float16(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3317 | #endif | ||
| 3318 | } | ||
| 3319 | |||
| 3320 | static inline SIMD_CFUNC double simd_fast_recip(double x) { | ||
| 3321 | return simd_precise_recip(x); | ||
| 3322 | } | ||
| 3323 | |||
| 3324 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x) { | ||
| 3325 | return simd_precise_recip(x); | ||
| 3326 | } | ||
| 3327 | |||
| 3328 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x) { | ||
| 3329 | return simd_precise_recip(x); | ||
| 3330 | } | ||
| 3331 | |||
| 3332 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x) { | ||
| 3333 | return simd_precise_recip(x); | ||
| 3334 | } | ||
| 3335 | |||
| 3336 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x) { | ||
| 3337 | return simd_precise_recip(x); | ||
| 3338 | } | ||
| 3339 | |||
| 3340 | static inline SIMD_CFUNC float simd_precise_recip(float x) { | ||
| 3341 | #if defined __SSE__ | ||
| 3342 | float r = simd_fast_recip(x); | ||
| 3343 | return r*(2 - (x == 0 ? -INFINITY : x)*r); | ||
| 3344 | #elif defined __ARM_NEON__ | ||
| 3345 | return simd_precise_recip(simd_make_float2_undef(x)).x; | ||
| 3346 | #else | ||
| 3347 | return 1/x; | ||
| 3348 | #endif | ||
| 3349 | } | ||
| 3350 | |||
| 3351 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x) { | ||
| 3352 | #if defined __SSE__ | ||
| 3353 | return simd_make_float2(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3354 | #elif defined __ARM_NEON__ | ||
| 3355 | simd_float2 r = simd_fast_recip(x); | ||
| 3356 | return r*vrecps_f32(x, r); | ||
| 3357 | #else | ||
| 3358 | return 1/x; | ||
| 3359 | #endif | ||
| 3360 | } | ||
| 3361 | |||
| 3362 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x) { | ||
| 3363 | return simd_make_float3(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3364 | } | ||
| 3365 | |||
| 3366 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x) { | ||
| 3367 | #if defined __SSE__ | ||
| 3368 | simd_float4 r = simd_fast_recip(x); | ||
| 3369 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3370 | #elif defined __ARM_NEON__ | ||
| 3371 | simd_float4 r = simd_fast_recip(x); | ||
| 3372 | return r*vrecpsq_f32(x, r); | ||
| 3373 | #else | ||
| 3374 | return 1/x; | ||
| 3375 | #endif | ||
| 3376 | } | ||
| 3377 | |||
| 3378 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x) { | ||
| 3379 | #if defined __AVX__ | ||
| 3380 | simd_float8 r = simd_fast_recip(x); | ||
| 3381 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3382 | #else | ||
| 3383 | return simd_make_float8(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3384 | #endif | ||
| 3385 | } | ||
| 3386 | |||
| 3387 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x) { | ||
| 3388 | #if defined __AVX512F__ | ||
| 3389 | simd_float16 r = simd_fast_recip(x); | ||
| 3390 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3391 | #else | ||
| 3392 | return simd_make_float16(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3393 | #endif | ||
| 3394 | } | ||
| 3395 | |||
| 3396 | static inline SIMD_CFUNC double simd_precise_recip(double x) { | ||
| 3397 | return 1/x; | ||
| 3398 | } | ||
| 3399 | |||
| 3400 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x) { | ||
| 3401 | return 1/x; | ||
| 3402 | } | ||
| 3403 | |||
| 3404 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x) { | ||
| 3405 | return 1/x; | ||
| 3406 | } | ||
| 3407 | |||
| 3408 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x) { | ||
| 3409 | return 1/x; | ||
| 3410 | } | ||
| 3411 | |||
| 3412 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x) { | ||
| 3413 | return 1/x; | ||
| 3414 | } | ||
| 3415 | |||
| 3416 | static inline SIMD_CFUNC float simd_rsqrt(float x) { | ||
| 3417 | #if __FAST_MATH__ | ||
| 3418 | return simd_fast_rsqrt(x); | ||
| 3419 | #else | ||
| 3420 | return simd_precise_rsqrt(x); | ||
| 3421 | #endif | ||
| 3422 | } | ||
| 3423 | |||
| 3424 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x) { | ||
| 3425 | #if __FAST_MATH__ | ||
| 3426 | return simd_fast_rsqrt(x); | ||
| 3427 | #else | ||
| 3428 | return simd_precise_rsqrt(x); | ||
| 3429 | #endif | ||
| 3430 | } | ||
| 3431 | |||
| 3432 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x) { | ||
| 3433 | #if __FAST_MATH__ | ||
| 3434 | return simd_fast_rsqrt(x); | ||
| 3435 | #else | ||
| 3436 | return simd_precise_rsqrt(x); | ||
| 3437 | #endif | ||
| 3438 | } | ||
| 3439 | |||
| 3440 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x) { | ||
| 3441 | #if __FAST_MATH__ | ||
| 3442 | return simd_fast_rsqrt(x); | ||
| 3443 | #else | ||
| 3444 | return simd_precise_rsqrt(x); | ||
| 3445 | #endif | ||
| 3446 | } | ||
| 3447 | |||
| 3448 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x) { | ||
| 3449 | #if __FAST_MATH__ | ||
| 3450 | return simd_fast_rsqrt(x); | ||
| 3451 | #else | ||
| 3452 | return simd_precise_rsqrt(x); | ||
| 3453 | #endif | ||
| 3454 | } | ||
| 3455 | |||
| 3456 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x) { | ||
| 3457 | #if __FAST_MATH__ | ||
| 3458 | return simd_fast_rsqrt(x); | ||
| 3459 | #else | ||
| 3460 | return simd_precise_rsqrt(x); | ||
| 3461 | #endif | ||
| 3462 | } | ||
| 3463 | |||
| 3464 | static inline SIMD_CFUNC double simd_rsqrt(double x) { | ||
| 3465 | #if __FAST_MATH__ | ||
| 3466 | return simd_fast_rsqrt(x); | ||
| 3467 | #else | ||
| 3468 | return simd_precise_rsqrt(x); | ||
| 3469 | #endif | ||
| 3470 | } | ||
| 3471 | |||
| 3472 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x) { | ||
| 3473 | #if __FAST_MATH__ | ||
| 3474 | return simd_fast_rsqrt(x); | ||
| 3475 | #else | ||
| 3476 | return simd_precise_rsqrt(x); | ||
| 3477 | #endif | ||
| 3478 | } | ||
| 3479 | |||
| 3480 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x) { | ||
| 3481 | #if __FAST_MATH__ | ||
| 3482 | return simd_fast_rsqrt(x); | ||
| 3483 | #else | ||
| 3484 | return simd_precise_rsqrt(x); | ||
| 3485 | #endif | ||
| 3486 | } | ||
| 3487 | |||
| 3488 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x) { | ||
| 3489 | #if __FAST_MATH__ | ||
| 3490 | return simd_fast_rsqrt(x); | ||
| 3491 | #else | ||
| 3492 | return simd_precise_rsqrt(x); | ||
| 3493 | #endif | ||
| 3494 | } | ||
| 3495 | |||
| 3496 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x) { | ||
| 3497 | #if __FAST_MATH__ | ||
| 3498 | return simd_fast_rsqrt(x); | ||
| 3499 | #else | ||
| 3500 | return simd_precise_rsqrt(x); | ||
| 3501 | #endif | ||
| 3502 | } | ||
| 3503 | |||
| 3504 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x) { | ||
| 3505 | #if defined __AVX512VL__ | ||
| 3506 | simd_float4 x4 = simd_make_float4(x); | ||
| 3507 | return ((simd_float4)_mm_rsqrt14_ss(x4, x4)).x; | ||
| 3508 | #elif defined __SSE__ | ||
| 3509 | return ((simd_float4)_mm_rsqrt_ss(simd_make_float4(x))).x; | ||
| 3510 | #elif defined __ARM_NEON__ | ||
| 3511 | return simd_fast_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3512 | #else | ||
| 3513 | return simd_precise_rsqrt(x); | ||
| 3514 | #endif | ||
| 3515 | } | ||
| 3516 | |||
| 3517 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x) { | ||
| 3518 | #if defined __SSE__ | ||
| 3519 | return simd_make_float2(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3520 | #elif defined __ARM_NEON__ | ||
| 3521 | simd_float2 r = vrsqrte_f32(x); | ||
| 3522 | return r * vrsqrts_f32(x, r*r); | ||
| 3523 | #else | ||
| 3524 | return simd_precise_rsqrt(x); | ||
| 3525 | #endif | ||
| 3526 | } | ||
| 3527 | |||
| 3528 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x) { | ||
| 3529 | return simd_make_float3(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3530 | } | ||
| 3531 | |||
| 3532 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x) { | ||
| 3533 | #if defined __AVX512VL__ | ||
| 3534 | return _mm_rsqrt14_ps(x); | ||
| 3535 | #elif defined __SSE__ | ||
| 3536 | return _mm_rsqrt_ps(x); | ||
| 3537 | #elif defined __ARM_NEON__ | ||
| 3538 | simd_float4 r = vrsqrteq_f32(x); | ||
| 3539 | return r * vrsqrtsq_f32(x, r*r); | ||
| 3540 | #else | ||
| 3541 | return simd_precise_rsqrt(x); | ||
| 3542 | #endif | ||
| 3543 | } | ||
| 3544 | |||
| 3545 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x) { | ||
| 3546 | #if defined __AVX512VL__ | ||
| 3547 | return _mm256_rsqrt14_ps(x); | ||
| 3548 | #elif defined __AVX__ | ||
| 3549 | return _mm256_rsqrt_ps(x); | ||
| 3550 | #else | ||
| 3551 | return simd_make_float8(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3552 | #endif | ||
| 3553 | } | ||
| 3554 | |||
| 3555 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x) { | ||
| 3556 | #if defined __AVX512F__ | ||
| 3557 | return _mm512_rsqrt14_ps(x); | ||
| 3558 | #else | ||
| 3559 | return simd_make_float16(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3560 | #endif | ||
| 3561 | } | ||
| 3562 | |||
| 3563 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x) { | ||
| 3564 | return simd_precise_rsqrt(x); | ||
| 3565 | } | ||
| 3566 | |||
| 3567 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x) { | ||
| 3568 | return simd_precise_rsqrt(x); | ||
| 3569 | } | ||
| 3570 | |||
| 3571 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x) { | ||
| 3572 | return simd_precise_rsqrt(x); | ||
| 3573 | } | ||
| 3574 | |||
| 3575 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x) { | ||
| 3576 | return simd_precise_rsqrt(x); | ||
| 3577 | } | ||
| 3578 | |||
| 3579 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x) { | ||
| 3580 | return simd_precise_rsqrt(x); | ||
| 3581 | } | ||
| 3582 | |||
| 3583 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x) { | ||
| 3584 | #if defined __SSE__ | ||
| 3585 | float r = simd_fast_rsqrt(x); | ||
| 3586 | return r*(1.5f - 0.5f*(r == INFINITY ? -INFINITY : x)*r*r); | ||
| 3587 | #elif defined __ARM_NEON__ | ||
| 3588 | return simd_precise_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3589 | #else | ||
| 3590 | return 1/sqrt(x); | ||
| 3591 | #endif | ||
| 3592 | } | ||
| 3593 | |||
| 3594 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x) { | ||
| 3595 | #if defined __SSE__ | ||
| 3596 | return simd_make_float2(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3597 | #elif defined __ARM_NEON__ | ||
| 3598 | simd_float2 r = simd_fast_rsqrt(x); | ||
| 3599 | return r*vrsqrts_f32(x, r*r); | ||
| 3600 | #else | ||
| 3601 | return 1/__tg_sqrt(x); | ||
| 3602 | #endif | ||
| 3603 | } | ||
| 3604 | |||
| 3605 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x) { | ||
| 3606 | return simd_make_float3(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3607 | } | ||
| 3608 | |||
| 3609 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x) { | ||
| 3610 | #if defined __SSE__ | ||
| 3611 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3612 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3613 | #elif defined __ARM_NEON__ | ||
| 3614 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3615 | return r*vrsqrtsq_f32(x, r*r); | ||
| 3616 | #else | ||
| 3617 | return 1/__tg_sqrt(x); | ||
| 3618 | #endif | ||
| 3619 | } | ||
| 3620 | |||
| 3621 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x) { | ||
| 3622 | #if defined __AVX__ | ||
| 3623 | simd_float8 r = simd_fast_rsqrt(x); | ||
| 3624 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3625 | #else | ||
| 3626 | return simd_make_float8(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3627 | #endif | ||
| 3628 | } | ||
| 3629 | |||
| 3630 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x) { | ||
| 3631 | #if defined __AVX512F__ | ||
| 3632 | simd_float16 r = simd_fast_rsqrt(x); | ||
| 3633 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3634 | #else | ||
| 3635 | return simd_make_float16(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3636 | #endif | ||
| 3637 | } | ||
| 3638 | |||
| 3639 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x) { | ||
| 3640 | return 1/sqrt(x); | ||
| 3641 | } | ||
| 3642 | |||
| 3643 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x) { | ||
| 3644 | return 1/__tg_sqrt(x); | ||
| 3645 | } | ||
| 3646 | |||
| 3647 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x) { | ||
| 3648 | return 1/__tg_sqrt(x); | ||
| 3649 | } | ||
| 3650 | |||
| 3651 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x) { | ||
| 3652 | return 1/__tg_sqrt(x); | ||
| 3653 | } | ||
| 3654 | |||
| 3655 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x) { | ||
| 3656 | return 1/__tg_sqrt(x); | ||
| 3657 | } | ||
| 3658 | |||
| 3659 | static inline SIMD_CFUNC float simd_fract(float x) { | ||
| 3660 | return fmin(x - floor(x), 0x1.fffffep-1f); | ||
| 3661 | } | ||
| 3662 | |||
| 3663 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x) { | ||
| 3664 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3665 | } | ||
| 3666 | |||
| 3667 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x) { | ||
| 3668 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3669 | } | ||
| 3670 | |||
| 3671 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x) { | ||
| 3672 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3673 | } | ||
| 3674 | |||
| 3675 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x) { | ||
| 3676 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3677 | } | ||
| 3678 | |||
| 3679 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x) { | ||
| 3680 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3681 | } | ||
| 3682 | |||
| 3683 | static inline SIMD_CFUNC double simd_fract(double x) { | ||
| 3684 | return fmin(x - floor(x), 0x1.fffffffffffffp-1); | ||
| 3685 | } | ||
| 3686 | |||
| 3687 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x) { | ||
| 3688 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3689 | } | ||
| 3690 | |||
| 3691 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x) { | ||
| 3692 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3693 | } | ||
| 3694 | |||
| 3695 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x) { | ||
| 3696 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3697 | } | ||
| 3698 | |||
| 3699 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x) { | ||
| 3700 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3701 | } | ||
| 3702 | |||
| 3703 | static inline SIMD_CFUNC float simd_step(float edge, float x) { | ||
| 3704 | return !(x < edge); | ||
| 3705 | } | ||
| 3706 | |||
| 3707 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x) { | ||
| 3708 | return simd_bitselect((simd_float2)1, 0, x < edge); | ||
| 3709 | } | ||
| 3710 | |||
| 3711 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x) { | ||
| 3712 | return simd_bitselect((simd_float3)1, 0, x < edge); | ||
| 3713 | } | ||
| 3714 | |||
| 3715 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x) { | ||
| 3716 | return simd_bitselect((simd_float4)1, 0, x < edge); | ||
| 3717 | } | ||
| 3718 | |||
| 3719 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x) { | ||
| 3720 | return simd_bitselect((simd_float8)1, 0, x < edge); | ||
| 3721 | } | ||
| 3722 | |||
| 3723 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x) { | ||
| 3724 | return simd_bitselect((simd_float16)1, 0, x < edge); | ||
| 3725 | } | ||
| 3726 | |||
| 3727 | static inline SIMD_CFUNC double simd_step(double edge, double x) { | ||
| 3728 | return !(x < edge); | ||
| 3729 | } | ||
| 3730 | |||
| 3731 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x) { | ||
| 3732 | return simd_bitselect((simd_double2)1, 0, x < edge); | ||
| 3733 | } | ||
| 3734 | |||
| 3735 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x) { | ||
| 3736 | return simd_bitselect((simd_double3)1, 0, x < edge); | ||
| 3737 | } | ||
| 3738 | |||
| 3739 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x) { | ||
| 3740 | return simd_bitselect((simd_double4)1, 0, x < edge); | ||
| 3741 | } | ||
| 3742 | |||
| 3743 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x) { | ||
| 3744 | return simd_bitselect((simd_double8)1, 0, x < edge); | ||
| 3745 | } | ||
| 3746 | |||
| 3747 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x) { | ||
| 3748 | float t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3749 | return t*t*(3 - 2*t); | ||
| 3750 | } | ||
| 3751 | |||
| 3752 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x) { | ||
| 3753 | simd_float2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3754 | return t*t*(3 - 2*t); | ||
| 3755 | } | ||
| 3756 | |||
| 3757 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x) { | ||
| 3758 | simd_float3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3759 | return t*t*(3 - 2*t); | ||
| 3760 | } | ||
| 3761 | |||
| 3762 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x) { | ||
| 3763 | simd_float4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3764 | return t*t*(3 - 2*t); | ||
| 3765 | } | ||
| 3766 | |||
| 3767 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x) { | ||
| 3768 | simd_float8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3769 | return t*t*(3 - 2*t); | ||
| 3770 | } | ||
| 3771 | |||
| 3772 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x) { | ||
| 3773 | simd_float16 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3774 | return t*t*(3 - 2*t); | ||
| 3775 | } | ||
| 3776 | |||
| 3777 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x) { | ||
| 3778 | double t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3779 | return t*t*(3 - 2*t); | ||
| 3780 | } | ||
| 3781 | |||
| 3782 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x) { | ||
| 3783 | simd_double2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3784 | return t*t*(3 - 2*t); | ||
| 3785 | } | ||
| 3786 | |||
| 3787 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x) { | ||
| 3788 | simd_double3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3789 | return t*t*(3 - 2*t); | ||
| 3790 | } | ||
| 3791 | |||
| 3792 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x) { | ||
| 3793 | simd_double4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3794 | return t*t*(3 - 2*t); | ||
| 3795 | } | ||
| 3796 | |||
| 3797 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x) { | ||
| 3798 | simd_double8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3799 | return t*t*(3 - 2*t); | ||
| 3800 | } | ||
| 3801 | |||
| 3802 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x) { | ||
| 3803 | return x.x + x.y; | ||
| 3804 | } | ||
| 3805 | |||
| 3806 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x) { | ||
| 3807 | return x.x + x.y + x.z; | ||
| 3808 | } | ||
| 3809 | |||
| 3810 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x) { | ||
| 3811 | return simd_reduce_add(x.lo + x.hi); | ||
| 3812 | } | ||
| 3813 | |||
| 3814 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x) { | ||
| 3815 | return simd_reduce_add(x.lo + x.hi); | ||
| 3816 | } | ||
| 3817 | |||
| 3818 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x) { | ||
| 3819 | return simd_reduce_add(x.lo + x.hi); | ||
| 3820 | } | ||
| 3821 | |||
| 3822 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x) { | ||
| 3823 | return simd_reduce_add(x.lo + x.hi); | ||
| 3824 | } | ||
| 3825 | |||
| 3826 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x) { | ||
| 3827 | return simd_reduce_add(x.lo + x.hi); | ||
| 3828 | } | ||
| 3829 | |||
| 3830 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x) { | ||
| 3831 | return x.x + x.y; | ||
| 3832 | } | ||
| 3833 | |||
| 3834 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x) { | ||
| 3835 | return x.x + x.y + x.z; | ||
| 3836 | } | ||
| 3837 | |||
| 3838 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x) { | ||
| 3839 | return simd_reduce_add(x.lo + x.hi); | ||
| 3840 | } | ||
| 3841 | |||
| 3842 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x) { | ||
| 3843 | return simd_reduce_add(x.lo + x.hi); | ||
| 3844 | } | ||
| 3845 | |||
| 3846 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x) { | ||
| 3847 | return simd_reduce_add(x.lo + x.hi); | ||
| 3848 | } | ||
| 3849 | |||
| 3850 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x) { | ||
| 3851 | return simd_reduce_add(x.lo + x.hi); | ||
| 3852 | } | ||
| 3853 | |||
| 3854 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x) { | ||
| 3855 | return simd_reduce_add(x.lo + x.hi); | ||
| 3856 | } | ||
| 3857 | |||
| 3858 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x) { | ||
| 3859 | return x.x + x.y; | ||
| 3860 | } | ||
| 3861 | |||
| 3862 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x) { | ||
| 3863 | return x.x + x.y + x.z; | ||
| 3864 | } | ||
| 3865 | |||
| 3866 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x) { | ||
| 3867 | return simd_reduce_add(x.lo + x.hi); | ||
| 3868 | } | ||
| 3869 | |||
| 3870 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x) { | ||
| 3871 | return simd_reduce_add(x.lo + x.hi); | ||
| 3872 | } | ||
| 3873 | |||
| 3874 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x) { | ||
| 3875 | return simd_reduce_add(x.lo + x.hi); | ||
| 3876 | } | ||
| 3877 | |||
| 3878 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x) { | ||
| 3879 | return simd_reduce_add(x.lo + x.hi); | ||
| 3880 | } | ||
| 3881 | |||
| 3882 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x) { | ||
| 3883 | return x.x + x.y; | ||
| 3884 | } | ||
| 3885 | |||
| 3886 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x) { | ||
| 3887 | return x.x + x.y + x.z; | ||
| 3888 | } | ||
| 3889 | |||
| 3890 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x) { | ||
| 3891 | return simd_reduce_add(x.lo + x.hi); | ||
| 3892 | } | ||
| 3893 | |||
| 3894 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x) { | ||
| 3895 | return simd_reduce_add(x.lo + x.hi); | ||
| 3896 | } | ||
| 3897 | |||
| 3898 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x) { | ||
| 3899 | return simd_reduce_add(x.lo + x.hi); | ||
| 3900 | } | ||
| 3901 | |||
| 3902 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x) { | ||
| 3903 | return simd_reduce_add(x.lo + x.hi); | ||
| 3904 | } | ||
| 3905 | |||
| 3906 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x) { | ||
| 3907 | return x.x + x.y; | ||
| 3908 | } | ||
| 3909 | |||
| 3910 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x) { | ||
| 3911 | return x.x + x.y + x.z; | ||
| 3912 | } | ||
| 3913 | |||
| 3914 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x) { | ||
| 3915 | return simd_reduce_add(x.lo + x.hi); | ||
| 3916 | } | ||
| 3917 | |||
| 3918 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x) { | ||
| 3919 | return simd_reduce_add(x.lo + x.hi); | ||
| 3920 | } | ||
| 3921 | |||
| 3922 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x) { | ||
| 3923 | return simd_reduce_add(x.lo + x.hi); | ||
| 3924 | } | ||
| 3925 | |||
| 3926 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x) { | ||
| 3927 | return x.x + x.y; | ||
| 3928 | } | ||
| 3929 | |||
| 3930 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x) { | ||
| 3931 | return x.x + x.y + x.z; | ||
| 3932 | } | ||
| 3933 | |||
| 3934 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x) { | ||
| 3935 | return simd_reduce_add(x.lo + x.hi); | ||
| 3936 | } | ||
| 3937 | |||
| 3938 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x) { | ||
| 3939 | return simd_reduce_add(x.lo + x.hi); | ||
| 3940 | } | ||
| 3941 | |||
| 3942 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x) { | ||
| 3943 | return simd_reduce_add(x.lo + x.hi); | ||
| 3944 | } | ||
| 3945 | |||
| 3946 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x) { | ||
| 3947 | return x.x + x.y; | ||
| 3948 | } | ||
| 3949 | |||
| 3950 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x) { | ||
| 3951 | return x.x + x.y + x.z; | ||
| 3952 | } | ||
| 3953 | |||
| 3954 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x) { | ||
| 3955 | return simd_reduce_add(x.lo + x.hi); | ||
| 3956 | } | ||
| 3957 | |||
| 3958 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x) { | ||
| 3959 | return simd_reduce_add(x.lo + x.hi); | ||
| 3960 | } | ||
| 3961 | |||
| 3962 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x) { | ||
| 3963 | return simd_reduce_add(x.lo + x.hi); | ||
| 3964 | } | ||
| 3965 | |||
| 3966 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x) { | ||
| 3967 | return x.x + x.y; | ||
| 3968 | } | ||
| 3969 | |||
| 3970 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x) { | ||
| 3971 | return x.x + x.y + x.z; | ||
| 3972 | } | ||
| 3973 | |||
| 3974 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x) { | ||
| 3975 | return simd_reduce_add(x.lo + x.hi); | ||
| 3976 | } | ||
| 3977 | |||
| 3978 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x) { | ||
| 3979 | return simd_reduce_add(x.lo + x.hi); | ||
| 3980 | } | ||
| 3981 | |||
| 3982 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x) { | ||
| 3983 | return x.x + x.y; | ||
| 3984 | } | ||
| 3985 | |||
| 3986 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x) { | ||
| 3987 | return x.x + x.y + x.z; | ||
| 3988 | } | ||
| 3989 | |||
| 3990 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x) { | ||
| 3991 | return simd_reduce_add(x.lo + x.hi); | ||
| 3992 | } | ||
| 3993 | |||
| 3994 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x) { | ||
| 3995 | return simd_reduce_add(x.lo + x.hi); | ||
| 3996 | } | ||
| 3997 | |||
| 3998 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x) { | ||
| 3999 | return x.x + x.y; | ||
| 4000 | } | ||
| 4001 | |||
| 4002 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x) { | ||
| 4003 | return x.x + x.y + x.z; | ||
| 4004 | } | ||
| 4005 | |||
| 4006 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x) { | ||
| 4007 | return simd_reduce_add(x.lo + x.hi); | ||
| 4008 | } | ||
| 4009 | |||
| 4010 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x) { | ||
| 4011 | return simd_reduce_add(x.lo + x.hi); | ||
| 4012 | } | ||
| 4013 | |||
| 4014 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x) { | ||
| 4015 | return x.y < x.x ? x.y : x.x; | ||
| 4016 | } | ||
| 4017 | |||
| 4018 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x) { | ||
| 4019 | char t = x.z < x.x ? x.z : x.x; | ||
| 4020 | return x.y < t ? x.y : t; | ||
| 4021 | } | ||
| 4022 | |||
| 4023 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x) { | ||
| 4024 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4025 | } | ||
| 4026 | |||
| 4027 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x) { | ||
| 4028 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4029 | } | ||
| 4030 | |||
| 4031 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x) { | ||
| 4032 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4033 | } | ||
| 4034 | |||
| 4035 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x) { | ||
| 4036 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4037 | } | ||
| 4038 | |||
| 4039 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x) { | ||
| 4040 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4041 | } | ||
| 4042 | |||
| 4043 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x) { | ||
| 4044 | return x.y < x.x ? x.y : x.x; | ||
| 4045 | } | ||
| 4046 | |||
| 4047 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x) { | ||
| 4048 | unsigned char t = x.z < x.x ? x.z : x.x; | ||
| 4049 | return x.y < t ? x.y : t; | ||
| 4050 | } | ||
| 4051 | |||
| 4052 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x) { | ||
| 4053 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4054 | } | ||
| 4055 | |||
| 4056 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x) { | ||
| 4057 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4058 | } | ||
| 4059 | |||
| 4060 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x) { | ||
| 4061 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4062 | } | ||
| 4063 | |||
| 4064 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x) { | ||
| 4065 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4066 | } | ||
| 4067 | |||
| 4068 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x) { | ||
| 4069 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4070 | } | ||
| 4071 | |||
| 4072 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x) { | ||
| 4073 | return x.y < x.x ? x.y : x.x; | ||
| 4074 | } | ||
| 4075 | |||
| 4076 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x) { | ||
| 4077 | short t = x.z < x.x ? x.z : x.x; | ||
| 4078 | return x.y < t ? x.y : t; | ||
| 4079 | } | ||
| 4080 | |||
| 4081 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x) { | ||
| 4082 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4083 | } | ||
| 4084 | |||
| 4085 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x) { | ||
| 4086 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4087 | } | ||
| 4088 | |||
| 4089 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x) { | ||
| 4090 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4091 | } | ||
| 4092 | |||
| 4093 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x) { | ||
| 4094 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4095 | } | ||
| 4096 | |||
| 4097 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x) { | ||
| 4098 | return x.y < x.x ? x.y : x.x; | ||
| 4099 | } | ||
| 4100 | |||
| 4101 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x) { | ||
| 4102 | unsigned short t = x.z < x.x ? x.z : x.x; | ||
| 4103 | return x.y < t ? x.y : t; | ||
| 4104 | } | ||
| 4105 | |||
| 4106 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x) { | ||
| 4107 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4108 | } | ||
| 4109 | |||
| 4110 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x) { | ||
| 4111 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4112 | } | ||
| 4113 | |||
| 4114 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x) { | ||
| 4115 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4116 | } | ||
| 4117 | |||
| 4118 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x) { | ||
| 4119 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4120 | } | ||
| 4121 | |||
| 4122 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x) { | ||
| 4123 | return x.y < x.x ? x.y : x.x; | ||
| 4124 | } | ||
| 4125 | |||
| 4126 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x) { | ||
| 4127 | int t = x.z < x.x ? x.z : x.x; | ||
| 4128 | return x.y < t ? x.y : t; | ||
| 4129 | } | ||
| 4130 | |||
| 4131 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x) { | ||
| 4132 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4133 | } | ||
| 4134 | |||
| 4135 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x) { | ||
| 4136 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4137 | } | ||
| 4138 | |||
| 4139 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x) { | ||
| 4140 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4141 | } | ||
| 4142 | |||
| 4143 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x) { | ||
| 4144 | return x.y < x.x ? x.y : x.x; | ||
| 4145 | } | ||
| 4146 | |||
| 4147 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x) { | ||
| 4148 | unsigned int t = x.z < x.x ? x.z : x.x; | ||
| 4149 | return x.y < t ? x.y : t; | ||
| 4150 | } | ||
| 4151 | |||
| 4152 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x) { | ||
| 4153 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4154 | } | ||
| 4155 | |||
| 4156 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x) { | ||
| 4157 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4158 | } | ||
| 4159 | |||
| 4160 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x) { | ||
| 4161 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4162 | } | ||
| 4163 | |||
| 4164 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x) { | ||
| 4165 | return fmin(x.x, x.y); | ||
| 4166 | } | ||
| 4167 | |||
| 4168 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x) { | ||
| 4169 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4170 | } | ||
| 4171 | |||
| 4172 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x) { | ||
| 4173 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4174 | } | ||
| 4175 | |||
| 4176 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x) { | ||
| 4177 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4178 | } | ||
| 4179 | |||
| 4180 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x) { | ||
| 4181 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4182 | } | ||
| 4183 | |||
| 4184 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x) { | ||
| 4185 | return x.y < x.x ? x.y : x.x; | ||
| 4186 | } | ||
| 4187 | |||
| 4188 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x) { | ||
| 4189 | simd_long1 t = x.z < x.x ? x.z : x.x; | ||
| 4190 | return x.y < t ? x.y : t; | ||
| 4191 | } | ||
| 4192 | |||
| 4193 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x) { | ||
| 4194 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4195 | } | ||
| 4196 | |||
| 4197 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x) { | ||
| 4198 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4199 | } | ||
| 4200 | |||
| 4201 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x) { | ||
| 4202 | return x.y < x.x ? x.y : x.x; | ||
| 4203 | } | ||
| 4204 | |||
| 4205 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x) { | ||
| 4206 | simd_ulong1 t = x.z < x.x ? x.z : x.x; | ||
| 4207 | return x.y < t ? x.y : t; | ||
| 4208 | } | ||
| 4209 | |||
| 4210 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x) { | ||
| 4211 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4212 | } | ||
| 4213 | |||
| 4214 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x) { | ||
| 4215 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4216 | } | ||
| 4217 | |||
| 4218 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x) { | ||
| 4219 | return fmin(x.x, x.y); | ||
| 4220 | } | ||
| 4221 | |||
| 4222 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x) { | ||
| 4223 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4224 | } | ||
| 4225 | |||
| 4226 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x) { | ||
| 4227 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4228 | } | ||
| 4229 | |||
| 4230 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x) { | ||
| 4231 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4232 | } | ||
| 4233 | |||
| 4234 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x) { | ||
| 4235 | return x.y > x.x ? x.y : x.x; | ||
| 4236 | } | ||
| 4237 | |||
| 4238 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x) { | ||
| 4239 | char t = x.z > x.x ? x.z : x.x; | ||
| 4240 | return x.y > t ? x.y : t; | ||
| 4241 | } | ||
| 4242 | |||
| 4243 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x) { | ||
| 4244 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4245 | } | ||
| 4246 | |||
| 4247 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x) { | ||
| 4248 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4249 | } | ||
| 4250 | |||
| 4251 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x) { | ||
| 4252 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4253 | } | ||
| 4254 | |||
| 4255 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x) { | ||
| 4256 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4257 | } | ||
| 4258 | |||
| 4259 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x) { | ||
| 4260 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4261 | } | ||
| 4262 | |||
| 4263 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x) { | ||
| 4264 | return x.y > x.x ? x.y : x.x; | ||
| 4265 | } | ||
| 4266 | |||
| 4267 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x) { | ||
| 4268 | unsigned char t = x.z > x.x ? x.z : x.x; | ||
| 4269 | return x.y > t ? x.y : t; | ||
| 4270 | } | ||
| 4271 | |||
| 4272 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x) { | ||
| 4273 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4274 | } | ||
| 4275 | |||
| 4276 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x) { | ||
| 4277 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4278 | } | ||
| 4279 | |||
| 4280 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x) { | ||
| 4281 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4282 | } | ||
| 4283 | |||
| 4284 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x) { | ||
| 4285 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4286 | } | ||
| 4287 | |||
| 4288 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x) { | ||
| 4289 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4290 | } | ||
| 4291 | |||
| 4292 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x) { | ||
| 4293 | return x.y > x.x ? x.y : x.x; | ||
| 4294 | } | ||
| 4295 | |||
| 4296 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x) { | ||
| 4297 | short t = x.z > x.x ? x.z : x.x; | ||
| 4298 | return x.y > t ? x.y : t; | ||
| 4299 | } | ||
| 4300 | |||
| 4301 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x) { | ||
| 4302 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4303 | } | ||
| 4304 | |||
| 4305 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x) { | ||
| 4306 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4307 | } | ||
| 4308 | |||
| 4309 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x) { | ||
| 4310 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4311 | } | ||
| 4312 | |||
| 4313 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x) { | ||
| 4314 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4315 | } | ||
| 4316 | |||
| 4317 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x) { | ||
| 4318 | return x.y > x.x ? x.y : x.x; | ||
| 4319 | } | ||
| 4320 | |||
| 4321 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x) { | ||
| 4322 | unsigned short t = x.z > x.x ? x.z : x.x; | ||
| 4323 | return x.y > t ? x.y : t; | ||
| 4324 | } | ||
| 4325 | |||
| 4326 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x) { | ||
| 4327 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4328 | } | ||
| 4329 | |||
| 4330 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x) { | ||
| 4331 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4332 | } | ||
| 4333 | |||
| 4334 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x) { | ||
| 4335 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4336 | } | ||
| 4337 | |||
| 4338 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x) { | ||
| 4339 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4340 | } | ||
| 4341 | |||
| 4342 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x) { | ||
| 4343 | return x.y > x.x ? x.y : x.x; | ||
| 4344 | } | ||
| 4345 | |||
| 4346 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x) { | ||
| 4347 | int t = x.z > x.x ? x.z : x.x; | ||
| 4348 | return x.y > t ? x.y : t; | ||
| 4349 | } | ||
| 4350 | |||
| 4351 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x) { | ||
| 4352 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4353 | } | ||
| 4354 | |||
| 4355 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x) { | ||
| 4356 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4357 | } | ||
| 4358 | |||
| 4359 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x) { | ||
| 4360 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4361 | } | ||
| 4362 | |||
| 4363 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x) { | ||
| 4364 | return x.y > x.x ? x.y : x.x; | ||
| 4365 | } | ||
| 4366 | |||
| 4367 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x) { | ||
| 4368 | unsigned int t = x.z > x.x ? x.z : x.x; | ||
| 4369 | return x.y > t ? x.y : t; | ||
| 4370 | } | ||
| 4371 | |||
| 4372 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x) { | ||
| 4373 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4374 | } | ||
| 4375 | |||
| 4376 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x) { | ||
| 4377 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4378 | } | ||
| 4379 | |||
| 4380 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x) { | ||
| 4381 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4382 | } | ||
| 4383 | |||
| 4384 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x) { | ||
| 4385 | return fmax(x.x, x.y); | ||
| 4386 | } | ||
| 4387 | |||
| 4388 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x) { | ||
| 4389 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4390 | } | ||
| 4391 | |||
| 4392 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x) { | ||
| 4393 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4394 | } | ||
| 4395 | |||
| 4396 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x) { | ||
| 4397 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4398 | } | ||
| 4399 | |||
| 4400 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x) { | ||
| 4401 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4402 | } | ||
| 4403 | |||
| 4404 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x) { | ||
| 4405 | return x.y > x.x ? x.y : x.x; | ||
| 4406 | } | ||
| 4407 | |||
| 4408 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x) { | ||
| 4409 | simd_long1 t = x.z > x.x ? x.z : x.x; | ||
| 4410 | return x.y > t ? x.y : t; | ||
| 4411 | } | ||
| 4412 | |||
| 4413 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x) { | ||
| 4414 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4415 | } | ||
| 4416 | |||
| 4417 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x) { | ||
| 4418 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4419 | } | ||
| 4420 | |||
| 4421 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x) { | ||
| 4422 | return x.y > x.x ? x.y : x.x; | ||
| 4423 | } | ||
| 4424 | |||
| 4425 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x) { | ||
| 4426 | simd_ulong1 t = x.z > x.x ? x.z : x.x; | ||
| 4427 | return x.y > t ? x.y : t; | ||
| 4428 | } | ||
| 4429 | |||
| 4430 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x) { | ||
| 4431 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4432 | } | ||
| 4433 | |||
| 4434 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x) { | ||
| 4435 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4436 | } | ||
| 4437 | |||
| 4438 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x) { | ||
| 4439 | return fmax(x.x, x.y); | ||
| 4440 | } | ||
| 4441 | |||
| 4442 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x) { | ||
| 4443 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4444 | } | ||
| 4445 | |||
| 4446 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x) { | ||
| 4447 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4448 | } | ||
| 4449 | |||
| 4450 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x) { | ||
| 4451 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4452 | } | ||
| 4453 | |||
| 4454 | #ifdef __cplusplus | ||
| 4455 | } | ||
| 4456 | #endif | ||
| 4457 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 4458 | #endif /* SIMD_COMMON_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/simd/conversion.h deleted-1966| ... | @@ -1,1966 +0,0 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * The interfaces declared in this header provide conversions between vector | ||
| 4 | * types. The following functions are available: | ||
| 5 | * | ||
| 6 | * simd_char(x) simd_uchar(x) | ||
| 7 | * simd_short(x) simd_ushort(x) | ||
| 8 | * simd_int(x) simd_uint(x) | ||
| 9 | * simd_long(x) simd_ulong(x) | ||
| 10 | * simd_float(x) | ||
| 11 | * simd_double(x) | ||
| 12 | * | ||
| 13 | * Each of these functions converts x to a vector whose elements have the | ||
| 14 | * type named by the function, with the same number of elements as x. Unlike | ||
| 15 | * a vector cast, these functions convert the elements to the new element | ||
| 16 | * type. These conversions behave exactly as C scalar conversions, except | ||
| 17 | * that conversions from integer vector types to signed integer vector types | ||
| 18 | * are guaranteed to wrap modulo 2^N (where N is the number of bits in an | ||
| 19 | * element of the result type). | ||
| 20 | * | ||
| 21 | * For integer vector types, saturating conversions are also available: | ||
| 22 | * | ||
| 23 | * simd_char_sat(x) simd_uchar_sat(x) | ||
| 24 | * simd_short_sat(x) simd_ushort_sat(x) | ||
| 25 | * simd_int_sat(x) simd_uint_sat(x) | ||
| 26 | * simd_long_sat(x) simd_ulong_sat(x) | ||
| 27 | * | ||
| 28 | * These conversions clamp x to the representable range of the result type | ||
| 29 | * before converting. | ||
| 30 | * | ||
| 31 | * Unlike most vector operations in <simd/>, there are no abbreviated C++ | ||
| 32 | * names for these functions in the simd:: namespace. | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef __SIMD_CONVERSION_HEADER__ | ||
| 36 | #define __SIMD_CONVERSION_HEADER__ | ||
| 37 | |||
| 38 | #include <simd/base.h> | ||
| 39 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 40 | #include <simd/vector_types.h> | ||
| 41 | #include <simd/common.h> | ||
| 42 | #include <simd/logic.h> | ||
| 43 | |||
| 44 | #ifdef __cplusplus | ||
| 45 | extern "C" { | ||
| 46 | #endif | ||
| 47 | |||
| 48 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x); | ||
| 49 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x); | ||
| 50 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x); | ||
| 51 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x); | ||
| 52 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x); | ||
| 53 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x); | ||
| 54 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x); | ||
| 55 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x); | ||
| 56 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x); | ||
| 57 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x); | ||
| 58 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x); | ||
| 59 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x); | ||
| 60 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x); | ||
| 61 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x); | ||
| 62 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x); | ||
| 63 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x); | ||
| 64 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x); | ||
| 65 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x); | ||
| 66 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x); | ||
| 67 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x); | ||
| 68 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x); | ||
| 69 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x); | ||
| 70 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x); | ||
| 71 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x); | ||
| 72 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x); | ||
| 73 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x); | ||
| 74 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x); | ||
| 75 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x); | ||
| 76 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x); | ||
| 77 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x); | ||
| 78 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x); | ||
| 79 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x); | ||
| 80 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x); | ||
| 81 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x); | ||
| 82 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x); | ||
| 83 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x); | ||
| 84 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x); | ||
| 85 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x); | ||
| 86 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x); | ||
| 87 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x); | ||
| 88 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x); | ||
| 89 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x); | ||
| 90 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x); | ||
| 91 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x); | ||
| 92 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x); | ||
| 93 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x); | ||
| 94 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x); | ||
| 95 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x); | ||
| 96 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x); | ||
| 97 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x); | ||
| 98 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x); | ||
| 99 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x); | ||
| 100 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x); | ||
| 101 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x); | ||
| 102 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x); | ||
| 103 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x); | ||
| 104 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x); | ||
| 105 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x); | ||
| 106 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x); | ||
| 107 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x); | ||
| 108 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x); | ||
| 109 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x); | ||
| 110 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x); | ||
| 111 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x); | ||
| 112 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x); | ||
| 113 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x); | ||
| 114 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x); | ||
| 115 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x); | ||
| 116 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x); | ||
| 117 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x); | ||
| 118 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x); | ||
| 119 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x); | ||
| 120 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x); | ||
| 121 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x); | ||
| 122 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x); | ||
| 123 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x); | ||
| 124 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x); | ||
| 125 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x); | ||
| 126 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x); | ||
| 127 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x); | ||
| 128 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x); | ||
| 129 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x); | ||
| 130 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x); | ||
| 131 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x); | ||
| 132 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x); | ||
| 133 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x); | ||
| 134 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x); | ||
| 135 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x); | ||
| 136 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x); | ||
| 137 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x); | ||
| 138 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x); | ||
| 139 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x); | ||
| 140 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x); | ||
| 141 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x); | ||
| 142 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x); | ||
| 143 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x); | ||
| 144 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x); | ||
| 145 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x); | ||
| 146 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x); | ||
| 147 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x); | ||
| 148 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x); | ||
| 149 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x); | ||
| 150 | #define vector_char simd_char | ||
| 151 | #define vector_char_sat simd_char_sat | ||
| 152 | |||
| 153 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x); | ||
| 154 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x); | ||
| 155 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x); | ||
| 156 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x); | ||
| 157 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x); | ||
| 158 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x); | ||
| 159 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x); | ||
| 160 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x); | ||
| 161 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x); | ||
| 162 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x); | ||
| 163 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x); | ||
| 164 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x); | ||
| 165 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x); | ||
| 166 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x); | ||
| 167 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x); | ||
| 168 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x); | ||
| 169 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x); | ||
| 170 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x); | ||
| 171 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x); | ||
| 172 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x); | ||
| 173 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x); | ||
| 174 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x); | ||
| 175 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x); | ||
| 176 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x); | ||
| 177 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x); | ||
| 178 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x); | ||
| 179 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x); | ||
| 180 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x); | ||
| 181 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x); | ||
| 182 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x); | ||
| 183 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x); | ||
| 184 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x); | ||
| 185 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x); | ||
| 186 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x); | ||
| 187 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x); | ||
| 188 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x); | ||
| 189 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x); | ||
| 190 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x); | ||
| 191 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x); | ||
| 192 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x); | ||
| 193 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x); | ||
| 194 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x); | ||
| 195 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x); | ||
| 196 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x); | ||
| 197 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x); | ||
| 198 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x); | ||
| 199 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x); | ||
| 200 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x); | ||
| 201 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x); | ||
| 202 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x); | ||
| 203 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x); | ||
| 204 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x); | ||
| 205 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x); | ||
| 206 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x); | ||
| 207 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x); | ||
| 208 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x); | ||
| 209 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x); | ||
| 210 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x); | ||
| 211 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x); | ||
| 212 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x); | ||
| 213 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x); | ||
| 214 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x); | ||
| 215 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x); | ||
| 216 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x); | ||
| 217 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x); | ||
| 218 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x); | ||
| 219 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x); | ||
| 220 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x); | ||
| 221 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x); | ||
| 222 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x); | ||
| 223 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x); | ||
| 224 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x); | ||
| 225 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x); | ||
| 226 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x); | ||
| 227 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x); | ||
| 228 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x); | ||
| 229 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x); | ||
| 230 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x); | ||
| 231 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x); | ||
| 232 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x); | ||
| 233 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x); | ||
| 234 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x); | ||
| 235 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x); | ||
| 236 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x); | ||
| 237 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x); | ||
| 238 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x); | ||
| 239 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x); | ||
| 240 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x); | ||
| 241 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x); | ||
| 242 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x); | ||
| 243 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x); | ||
| 244 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x); | ||
| 245 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x); | ||
| 246 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x); | ||
| 247 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x); | ||
| 248 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x); | ||
| 249 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x); | ||
| 250 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x); | ||
| 251 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x); | ||
| 252 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x); | ||
| 253 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x); | ||
| 254 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x); | ||
| 255 | #define vector_uchar simd_uchar | ||
| 256 | #define vector_uchar_sat simd_uchar_sat | ||
| 257 | |||
| 258 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x); | ||
| 259 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x); | ||
| 260 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x); | ||
| 261 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x); | ||
| 262 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x); | ||
| 263 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x); | ||
| 264 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x); | ||
| 265 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x); | ||
| 266 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x); | ||
| 267 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x); | ||
| 268 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x); | ||
| 269 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x); | ||
| 270 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x); | ||
| 271 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x); | ||
| 272 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x); | ||
| 273 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x); | ||
| 274 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x); | ||
| 275 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x); | ||
| 276 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x); | ||
| 277 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x); | ||
| 278 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x); | ||
| 279 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x); | ||
| 280 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x); | ||
| 281 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x); | ||
| 282 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x); | ||
| 283 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x); | ||
| 284 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x); | ||
| 285 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x); | ||
| 286 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x); | ||
| 287 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x); | ||
| 288 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x); | ||
| 289 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x); | ||
| 290 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x); | ||
| 291 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x); | ||
| 292 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x); | ||
| 293 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x); | ||
| 294 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x); | ||
| 295 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x); | ||
| 296 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x); | ||
| 297 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x); | ||
| 298 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x); | ||
| 299 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x); | ||
| 300 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x); | ||
| 301 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x); | ||
| 302 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x); | ||
| 303 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x); | ||
| 304 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x); | ||
| 305 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x); | ||
| 306 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x); | ||
| 307 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x); | ||
| 308 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x); | ||
| 309 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x); | ||
| 310 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x); | ||
| 311 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x); | ||
| 312 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x); | ||
| 313 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x); | ||
| 314 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x); | ||
| 315 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x); | ||
| 316 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x); | ||
| 317 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x); | ||
| 318 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x); | ||
| 319 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x); | ||
| 320 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x); | ||
| 321 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x); | ||
| 322 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x); | ||
| 323 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x); | ||
| 324 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x); | ||
| 325 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x); | ||
| 326 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x); | ||
| 327 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x); | ||
| 328 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x); | ||
| 329 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x); | ||
| 330 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x); | ||
| 331 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x); | ||
| 332 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x); | ||
| 333 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x); | ||
| 334 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x); | ||
| 335 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x); | ||
| 336 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x); | ||
| 337 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x); | ||
| 338 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x); | ||
| 339 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x); | ||
| 340 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x); | ||
| 341 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x); | ||
| 342 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x); | ||
| 343 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x); | ||
| 344 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x); | ||
| 345 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x); | ||
| 346 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x); | ||
| 347 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x); | ||
| 348 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x); | ||
| 349 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x); | ||
| 350 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x); | ||
| 351 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x); | ||
| 352 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x); | ||
| 353 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x); | ||
| 354 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x); | ||
| 355 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x); | ||
| 356 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x); | ||
| 357 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x); | ||
| 358 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x); | ||
| 359 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x); | ||
| 360 | #define vector_short simd_short | ||
| 361 | #define vector_short_sat simd_short_sat | ||
| 362 | |||
| 363 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x); | ||
| 364 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x); | ||
| 365 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x); | ||
| 366 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x); | ||
| 367 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x); | ||
| 368 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x); | ||
| 369 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x); | ||
| 370 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x); | ||
| 371 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x); | ||
| 372 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x); | ||
| 373 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x); | ||
| 374 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x); | ||
| 375 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x); | ||
| 376 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x); | ||
| 377 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x); | ||
| 378 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x); | ||
| 379 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x); | ||
| 380 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x); | ||
| 381 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x); | ||
| 382 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x); | ||
| 383 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x); | ||
| 384 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x); | ||
| 385 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x); | ||
| 386 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x); | ||
| 387 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x); | ||
| 388 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x); | ||
| 389 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x); | ||
| 390 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x); | ||
| 391 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x); | ||
| 392 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x); | ||
| 393 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x); | ||
| 394 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x); | ||
| 395 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x); | ||
| 396 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x); | ||
| 397 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x); | ||
| 398 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x); | ||
| 399 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x); | ||
| 400 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x); | ||
| 401 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x); | ||
| 402 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x); | ||
| 403 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x); | ||
| 404 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x); | ||
| 405 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x); | ||
| 406 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x); | ||
| 407 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x); | ||
| 408 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x); | ||
| 409 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x); | ||
| 410 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x); | ||
| 411 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x); | ||
| 412 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x); | ||
| 413 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x); | ||
| 414 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x); | ||
| 415 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x); | ||
| 416 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x); | ||
| 417 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x); | ||
| 418 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x); | ||
| 419 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x); | ||
| 420 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x); | ||
| 421 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x); | ||
| 422 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x); | ||
| 423 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x); | ||
| 424 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x); | ||
| 425 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x); | ||
| 426 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x); | ||
| 427 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x); | ||
| 428 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x); | ||
| 429 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x); | ||
| 430 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x); | ||
| 431 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x); | ||
| 432 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x); | ||
| 433 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x); | ||
| 434 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x); | ||
| 435 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x); | ||
| 436 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x); | ||
| 437 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x); | ||
| 438 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x); | ||
| 439 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x); | ||
| 440 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x); | ||
| 441 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x); | ||
| 442 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x); | ||
| 443 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x); | ||
| 444 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x); | ||
| 445 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x); | ||
| 446 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x); | ||
| 447 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x); | ||
| 448 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x); | ||
| 449 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x); | ||
| 450 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x); | ||
| 451 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x); | ||
| 452 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x); | ||
| 453 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x); | ||
| 454 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x); | ||
| 455 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x); | ||
| 456 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x); | ||
| 457 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x); | ||
| 458 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x); | ||
| 459 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x); | ||
| 460 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x); | ||
| 461 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x); | ||
| 462 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x); | ||
| 463 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x); | ||
| 464 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x); | ||
| 465 | #define vector_ushort simd_ushort | ||
| 466 | #define vector_ushort_sat simd_ushort_sat | ||
| 467 | |||
| 468 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x); | ||
| 469 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x); | ||
| 470 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x); | ||
| 471 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x); | ||
| 472 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x); | ||
| 473 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x); | ||
| 474 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x); | ||
| 475 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x); | ||
| 476 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x); | ||
| 477 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x); | ||
| 478 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x); | ||
| 479 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x); | ||
| 480 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x); | ||
| 481 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x); | ||
| 482 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x); | ||
| 483 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x); | ||
| 484 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x); | ||
| 485 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x); | ||
| 486 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x); | ||
| 487 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x); | ||
| 488 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x); | ||
| 489 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x); | ||
| 490 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x); | ||
| 491 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x); | ||
| 492 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x); | ||
| 493 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x); | ||
| 494 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x); | ||
| 495 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x); | ||
| 496 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x); | ||
| 497 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x); | ||
| 498 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x); | ||
| 499 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x); | ||
| 500 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x); | ||
| 501 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x); | ||
| 502 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x); | ||
| 503 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x); | ||
| 504 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x); | ||
| 505 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x); | ||
| 506 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x); | ||
| 507 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x); | ||
| 508 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x); | ||
| 509 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x); | ||
| 510 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x); | ||
| 511 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x); | ||
| 512 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x); | ||
| 513 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x); | ||
| 514 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x); | ||
| 515 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x); | ||
| 516 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x); | ||
| 517 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x); | ||
| 518 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x); | ||
| 519 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x); | ||
| 520 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x); | ||
| 521 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x); | ||
| 522 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x); | ||
| 523 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x); | ||
| 524 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x); | ||
| 525 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x); | ||
| 526 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x); | ||
| 527 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x); | ||
| 528 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x); | ||
| 529 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x); | ||
| 530 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x); | ||
| 531 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x); | ||
| 532 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x); | ||
| 533 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x); | ||
| 534 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x); | ||
| 535 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x); | ||
| 536 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x); | ||
| 537 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x); | ||
| 538 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x); | ||
| 539 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x); | ||
| 540 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x); | ||
| 541 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x); | ||
| 542 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x); | ||
| 543 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x); | ||
| 544 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x); | ||
| 545 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x); | ||
| 546 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x); | ||
| 547 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x); | ||
| 548 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x); | ||
| 549 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x); | ||
| 550 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x); | ||
| 551 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x); | ||
| 552 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x); | ||
| 553 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x); | ||
| 554 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x); | ||
| 555 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x); | ||
| 556 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x); | ||
| 557 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x); | ||
| 558 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x); | ||
| 559 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x); | ||
| 560 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x); | ||
| 561 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x); | ||
| 562 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x); | ||
| 563 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x); | ||
| 564 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x); | ||
| 565 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x); | ||
| 566 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x); | ||
| 567 | #define vector_int simd_int | ||
| 568 | #define vector_int_sat simd_int_sat | ||
| 569 | |||
| 570 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x); | ||
| 571 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x); | ||
| 572 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x); | ||
| 573 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x); | ||
| 574 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x); | ||
| 575 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x); | ||
| 576 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x); | ||
| 577 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x); | ||
| 578 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x); | ||
| 579 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x); | ||
| 580 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x); | ||
| 581 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x); | ||
| 582 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x); | ||
| 583 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x); | ||
| 584 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x); | ||
| 585 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x); | ||
| 586 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x); | ||
| 587 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x); | ||
| 588 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x); | ||
| 589 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x); | ||
| 590 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x); | ||
| 591 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x); | ||
| 592 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x); | ||
| 593 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x); | ||
| 594 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x); | ||
| 595 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x); | ||
| 596 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x); | ||
| 597 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x); | ||
| 598 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x); | ||
| 599 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x); | ||
| 600 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x); | ||
| 601 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x); | ||
| 602 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x); | ||
| 603 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x); | ||
| 604 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x); | ||
| 605 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x); | ||
| 606 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x); | ||
| 607 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x); | ||
| 608 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x); | ||
| 609 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x); | ||
| 610 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x); | ||
| 611 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x); | ||
| 612 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x); | ||
| 613 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x); | ||
| 614 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x); | ||
| 615 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x); | ||
| 616 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x); | ||
| 617 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x); | ||
| 618 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x); | ||
| 619 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x); | ||
| 620 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x); | ||
| 621 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x); | ||
| 622 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x); | ||
| 623 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x); | ||
| 624 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x); | ||
| 625 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x); | ||
| 626 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x); | ||
| 627 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x); | ||
| 628 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x); | ||
| 629 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x); | ||
| 630 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x); | ||
| 631 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x); | ||
| 632 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x); | ||
| 633 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x); | ||
| 634 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x); | ||
| 635 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x); | ||
| 636 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x); | ||
| 637 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x); | ||
| 638 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x); | ||
| 639 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x); | ||
| 640 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x); | ||
| 641 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x); | ||
| 642 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x); | ||
| 643 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x); | ||
| 644 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x); | ||
| 645 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x); | ||
| 646 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x); | ||
| 647 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x); | ||
| 648 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x); | ||
| 649 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x); | ||
| 650 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x); | ||
| 651 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x); | ||
| 652 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x); | ||
| 653 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x); | ||
| 654 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x); | ||
| 655 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x); | ||
| 656 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x); | ||
| 657 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x); | ||
| 658 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x); | ||
| 659 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x); | ||
| 660 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x); | ||
| 661 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x); | ||
| 662 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x); | ||
| 663 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x); | ||
| 664 | #define vector_uint simd_uint | ||
| 665 | #define vector_uint_sat simd_uint_sat | ||
| 666 | |||
| 667 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x); | ||
| 668 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x); | ||
| 669 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x); | ||
| 670 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x); | ||
| 671 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x); | ||
| 672 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x); | ||
| 673 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x); | ||
| 674 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x); | ||
| 675 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x); | ||
| 676 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x); | ||
| 677 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x); | ||
| 678 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x); | ||
| 679 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x); | ||
| 680 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x); | ||
| 681 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x); | ||
| 682 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x); | ||
| 683 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x); | ||
| 684 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x); | ||
| 685 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x); | ||
| 686 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x); | ||
| 687 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x); | ||
| 688 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x); | ||
| 689 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x); | ||
| 690 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x); | ||
| 691 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x); | ||
| 692 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x); | ||
| 693 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x); | ||
| 694 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x); | ||
| 695 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x); | ||
| 696 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x); | ||
| 697 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x); | ||
| 698 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x); | ||
| 699 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x); | ||
| 700 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x); | ||
| 701 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x); | ||
| 702 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x); | ||
| 703 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x); | ||
| 704 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x); | ||
| 705 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x); | ||
| 706 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x); | ||
| 707 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x); | ||
| 708 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x); | ||
| 709 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x); | ||
| 710 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x); | ||
| 711 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x); | ||
| 712 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x); | ||
| 713 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x); | ||
| 714 | #define vector_float simd_float | ||
| 715 | |||
| 716 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x); | ||
| 717 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x); | ||
| 718 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x); | ||
| 719 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x); | ||
| 720 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x); | ||
| 721 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x); | ||
| 722 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x); | ||
| 723 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x); | ||
| 724 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x); | ||
| 725 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x); | ||
| 726 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x); | ||
| 727 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x); | ||
| 728 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x); | ||
| 729 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x); | ||
| 730 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x); | ||
| 731 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x); | ||
| 732 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x); | ||
| 733 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x); | ||
| 734 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x); | ||
| 735 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x); | ||
| 736 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x); | ||
| 737 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x); | ||
| 738 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x); | ||
| 739 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x); | ||
| 740 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x); | ||
| 741 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x); | ||
| 742 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x); | ||
| 743 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x); | ||
| 744 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x); | ||
| 745 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x); | ||
| 746 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x); | ||
| 747 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x); | ||
| 748 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x); | ||
| 749 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x); | ||
| 750 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x); | ||
| 751 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x); | ||
| 752 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x); | ||
| 753 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x); | ||
| 754 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x); | ||
| 755 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x); | ||
| 756 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x); | ||
| 757 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x); | ||
| 758 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x); | ||
| 759 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x); | ||
| 760 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x); | ||
| 761 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x); | ||
| 762 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x); | ||
| 763 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x); | ||
| 764 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x); | ||
| 765 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x); | ||
| 766 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x); | ||
| 767 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x); | ||
| 768 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x); | ||
| 769 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x); | ||
| 770 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x); | ||
| 771 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x); | ||
| 772 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x); | ||
| 773 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x); | ||
| 774 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x); | ||
| 775 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x); | ||
| 776 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x); | ||
| 777 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x); | ||
| 778 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x); | ||
| 779 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x); | ||
| 780 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x); | ||
| 781 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x); | ||
| 782 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x); | ||
| 783 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x); | ||
| 784 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x); | ||
| 785 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x); | ||
| 786 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x); | ||
| 787 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x); | ||
| 788 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x); | ||
| 789 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x); | ||
| 790 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x); | ||
| 791 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x); | ||
| 792 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x); | ||
| 793 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x); | ||
| 794 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x); | ||
| 795 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x); | ||
| 796 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x); | ||
| 797 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x); | ||
| 798 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x); | ||
| 799 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x); | ||
| 800 | #define vector_long simd_long | ||
| 801 | #define vector_long_sat simd_long_sat | ||
| 802 | |||
| 803 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x); | ||
| 804 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x); | ||
| 805 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x); | ||
| 806 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x); | ||
| 807 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x); | ||
| 808 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x); | ||
| 809 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x); | ||
| 810 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x); | ||
| 811 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x); | ||
| 812 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x); | ||
| 813 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x); | ||
| 814 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x); | ||
| 815 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x); | ||
| 816 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x); | ||
| 817 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x); | ||
| 818 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x); | ||
| 819 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x); | ||
| 820 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x); | ||
| 821 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x); | ||
| 822 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x); | ||
| 823 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x); | ||
| 824 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x); | ||
| 825 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x); | ||
| 826 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x); | ||
| 827 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x); | ||
| 828 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x); | ||
| 829 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x); | ||
| 830 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x); | ||
| 831 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x); | ||
| 832 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x); | ||
| 833 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x); | ||
| 834 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x); | ||
| 835 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x); | ||
| 836 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x); | ||
| 837 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x); | ||
| 838 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x); | ||
| 839 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x); | ||
| 840 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x); | ||
| 841 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x); | ||
| 842 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x); | ||
| 843 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x); | ||
| 844 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x); | ||
| 845 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x); | ||
| 846 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x); | ||
| 847 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x); | ||
| 848 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x); | ||
| 849 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x); | ||
| 850 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x); | ||
| 851 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x); | ||
| 852 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x); | ||
| 853 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x); | ||
| 854 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x); | ||
| 855 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x); | ||
| 856 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x); | ||
| 857 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x); | ||
| 858 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x); | ||
| 859 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x); | ||
| 860 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x); | ||
| 861 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x); | ||
| 862 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x); | ||
| 863 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x); | ||
| 864 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x); | ||
| 865 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x); | ||
| 866 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x); | ||
| 867 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x); | ||
| 868 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x); | ||
| 869 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x); | ||
| 870 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x); | ||
| 871 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x); | ||
| 872 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x); | ||
| 873 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x); | ||
| 874 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x); | ||
| 875 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x); | ||
| 876 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x); | ||
| 877 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x); | ||
| 878 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x); | ||
| 879 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x); | ||
| 880 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x); | ||
| 881 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x); | ||
| 882 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x); | ||
| 883 | #define vector_ulong simd_ulong | ||
| 884 | #define vector_ulong_sat simd_ulong_sat | ||
| 885 | |||
| 886 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x); | ||
| 887 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x); | ||
| 888 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x); | ||
| 889 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x); | ||
| 890 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x); | ||
| 891 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x); | ||
| 892 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x); | ||
| 893 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x); | ||
| 894 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x); | ||
| 895 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x); | ||
| 896 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x); | ||
| 897 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x); | ||
| 898 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x); | ||
| 899 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x); | ||
| 900 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x); | ||
| 901 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x); | ||
| 902 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x); | ||
| 903 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x); | ||
| 904 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x); | ||
| 905 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x); | ||
| 906 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x); | ||
| 907 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x); | ||
| 908 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x); | ||
| 909 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x); | ||
| 910 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x); | ||
| 911 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x); | ||
| 912 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x); | ||
| 913 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x); | ||
| 914 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x); | ||
| 915 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x); | ||
| 916 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x); | ||
| 917 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x); | ||
| 918 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x); | ||
| 919 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x); | ||
| 920 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x); | ||
| 921 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x); | ||
| 922 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x); | ||
| 923 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x); | ||
| 924 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x); | ||
| 925 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x); | ||
| 926 | #define vector_double simd_double | ||
| 927 | |||
| 928 | static simd_char2 SIMD_CFUNC vector2(char __x, char __y) { return ( simd_char2){__x, __y}; } | ||
| 929 | static simd_uchar2 SIMD_CFUNC vector2(unsigned char __x, unsigned char __y) { return ( simd_uchar2){__x, __y}; } | ||
| 930 | static simd_short2 SIMD_CFUNC vector2(short __x, short __y) { return ( simd_short2){__x, __y}; } | ||
| 931 | static simd_ushort2 SIMD_CFUNC vector2(unsigned short __x, unsigned short __y) { return (simd_ushort2){__x, __y}; } | ||
| 932 | static simd_int2 SIMD_CFUNC vector2(int __x, int __y) { return ( simd_int2){__x, __y}; } | ||
| 933 | static simd_uint2 SIMD_CFUNC vector2(unsigned int __x, unsigned int __y) { return ( simd_uint2){__x, __y}; } | ||
| 934 | static simd_float2 SIMD_CFUNC vector2(float __x, float __y) { return ( simd_float2){__x, __y}; } | ||
| 935 | static simd_long2 SIMD_CFUNC vector2(simd_long1 __x, simd_long1 __y) { return ( simd_long2){__x, __y}; } | ||
| 936 | static simd_ulong2 SIMD_CFUNC vector2(simd_ulong1 __x, simd_ulong1 __y) { return ( simd_ulong2){__x, __y}; } | ||
| 937 | static simd_double2 SIMD_CFUNC vector2(double __x, double __y) { return (simd_double2){__x, __y}; } | ||
| 938 | |||
| 939 | static simd_char3 SIMD_CFUNC vector3(char __x, char __y, char __z) { return ( simd_char3){__x, __y, __z}; } | ||
| 940 | static simd_uchar3 SIMD_CFUNC vector3(unsigned char __x, unsigned char __y, unsigned char __z) { return ( simd_uchar3){__x, __y, __z}; } | ||
| 941 | static simd_short3 SIMD_CFUNC vector3(short __x, short __y, short __z) { return ( simd_short3){__x, __y, __z}; } | ||
| 942 | static simd_ushort3 SIMD_CFUNC vector3(unsigned short __x, unsigned short __y, unsigned short __z) { return (simd_ushort3){__x, __y, __z}; } | ||
| 943 | static simd_int3 SIMD_CFUNC vector3(int __x, int __y, int __z) { return ( simd_int3){__x, __y, __z}; } | ||
| 944 | static simd_uint3 SIMD_CFUNC vector3(unsigned int __x, unsigned int __y, unsigned int __z) { return ( simd_uint3){__x, __y, __z}; } | ||
| 945 | static simd_float3 SIMD_CFUNC vector3(float __x, float __y, float __z) { return ( simd_float3){__x, __y, __z}; } | ||
| 946 | static simd_long3 SIMD_CFUNC vector3(simd_long1 __x, simd_long1 __y, simd_long1 __z) { return ( simd_long3){__x, __y, __z}; } | ||
| 947 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z) { return ( simd_ulong3){__x, __y, __z}; } | ||
| 948 | static simd_double3 SIMD_CFUNC vector3(double __x, double __y, double __z) { return (simd_double3){__x, __y, __z}; } | ||
| 949 | |||
| 950 | static simd_char3 SIMD_CFUNC vector3(simd_char2 __xy, char __z) { simd_char3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 951 | static simd_uchar3 SIMD_CFUNC vector3(simd_uchar2 __xy, unsigned char __z) { simd_uchar3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 952 | static simd_short3 SIMD_CFUNC vector3(simd_short2 __xy, short __z) { simd_short3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 953 | static simd_ushort3 SIMD_CFUNC vector3(simd_ushort2 __xy, unsigned short __z) { simd_ushort3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 954 | static simd_int3 SIMD_CFUNC vector3(simd_int2 __xy, int __z) { simd_int3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 955 | static simd_uint3 SIMD_CFUNC vector3(simd_uint2 __xy, unsigned int __z) { simd_uint3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 956 | static simd_float3 SIMD_CFUNC vector3(simd_float2 __xy, float __z) { simd_float3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 957 | static simd_long3 SIMD_CFUNC vector3(simd_long2 __xy, simd_long1 __z) { simd_long3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 958 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong2 __xy, simd_ulong1 __z) { simd_ulong3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 959 | static simd_double3 SIMD_CFUNC vector3(simd_double2 __xy, double __z) { simd_double3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 960 | |||
| 961 | static simd_char4 SIMD_CFUNC vector4(char __x, char __y, char __z, char __w) { return ( simd_char4){__x, __y, __z, __w}; } | ||
| 962 | static simd_uchar4 SIMD_CFUNC vector4(unsigned char __x, unsigned char __y, unsigned char __z, unsigned char __w) { return ( simd_uchar4){__x, __y, __z, __w}; } | ||
| 963 | static simd_short4 SIMD_CFUNC vector4(short __x, short __y, short __z, short __w) { return ( simd_short4){__x, __y, __z, __w}; } | ||
| 964 | static simd_ushort4 SIMD_CFUNC vector4(unsigned short __x, unsigned short __y, unsigned short __z, unsigned short __w) { return (simd_ushort4){__x, __y, __z, __w}; } | ||
| 965 | static simd_int4 SIMD_CFUNC vector4(int __x, int __y, int __z, int __w) { return ( simd_int4){__x, __y, __z, __w}; } | ||
| 966 | static simd_uint4 SIMD_CFUNC vector4(unsigned int __x, unsigned int __y, unsigned int __z, unsigned int __w) { return ( simd_uint4){__x, __y, __z, __w}; } | ||
| 967 | static simd_float4 SIMD_CFUNC vector4(float __x, float __y, float __z, float __w) { return ( simd_float4){__x, __y, __z, __w}; } | ||
| 968 | static simd_long4 SIMD_CFUNC vector4(simd_long1 __x, simd_long1 __y, simd_long1 __z, simd_long1 __w) { return ( simd_long4){__x, __y, __z, __w}; } | ||
| 969 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z, simd_ulong1 __w) { return ( simd_ulong4){__x, __y, __z, __w}; } | ||
| 970 | static simd_double4 SIMD_CFUNC vector4(double __x, double __y, double __z, double __w) { return (simd_double4){__x, __y, __z, __w}; } | ||
| 971 | |||
| 972 | static simd_char4 SIMD_CFUNC vector4(simd_char2 __xy, simd_char2 __zw) { simd_char4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 973 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar2 __xy, simd_uchar2 __zw) { simd_uchar4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 974 | static simd_short4 SIMD_CFUNC vector4(simd_short2 __xy, simd_short2 __zw) { simd_short4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 975 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort2 __xy, simd_ushort2 __zw) { simd_ushort4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 976 | static simd_int4 SIMD_CFUNC vector4(simd_int2 __xy, simd_int2 __zw) { simd_int4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 977 | static simd_uint4 SIMD_CFUNC vector4(simd_uint2 __xy, simd_uint2 __zw) { simd_uint4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 978 | static simd_float4 SIMD_CFUNC vector4(simd_float2 __xy, simd_float2 __zw) { simd_float4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 979 | static simd_long4 SIMD_CFUNC vector4(simd_long2 __xy, simd_long2 __zw) { simd_long4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 980 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong2 __xy, simd_ulong2 __zw) { simd_ulong4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 981 | static simd_double4 SIMD_CFUNC vector4(simd_double2 __xy, simd_double2 __zw) { simd_double4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 982 | |||
| 983 | static simd_char4 SIMD_CFUNC vector4(simd_char3 __xyz, char __w) { simd_char4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 984 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar3 __xyz, unsigned char __w) { simd_uchar4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 985 | static simd_short4 SIMD_CFUNC vector4(simd_short3 __xyz, short __w) { simd_short4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 986 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort3 __xyz, unsigned short __w) { simd_ushort4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 987 | static simd_int4 SIMD_CFUNC vector4(simd_int3 __xyz, int __w) { simd_int4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 988 | static simd_uint4 SIMD_CFUNC vector4(simd_uint3 __xyz, unsigned int __w) { simd_uint4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 989 | static simd_float4 SIMD_CFUNC vector4(simd_float3 __xyz, float __w) { simd_float4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 990 | static simd_long4 SIMD_CFUNC vector4(simd_long3 __xyz, simd_long1 __w) { simd_long4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 991 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong3 __xyz, simd_ulong1 __w) { simd_ulong4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 992 | static simd_double4 SIMD_CFUNC vector4(simd_double3 __xyz, double __w) { simd_double4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 993 | |||
| 994 | static simd_char8 SIMD_CFUNC vector8(simd_char4 __lo, simd_char4 __hi) { simd_char8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 995 | static simd_uchar8 SIMD_CFUNC vector8(simd_uchar4 __lo, simd_uchar4 __hi) { simd_uchar8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 996 | static simd_short8 SIMD_CFUNC vector8(simd_short4 __lo, simd_short4 __hi) { simd_short8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 997 | static simd_ushort8 SIMD_CFUNC vector8(simd_ushort4 __lo, simd_ushort4 __hi) { simd_ushort8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 998 | static simd_int8 SIMD_CFUNC vector8(simd_int4 __lo, simd_int4 __hi) { simd_int8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 999 | static simd_uint8 SIMD_CFUNC vector8(simd_uint4 __lo, simd_uint4 __hi) { simd_uint8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1000 | static simd_float8 SIMD_CFUNC vector8(simd_float4 __lo, simd_float4 __hi) { simd_float8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1001 | static simd_long8 SIMD_CFUNC vector8(simd_long4 __lo, simd_long4 __hi) { simd_long8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1002 | static simd_ulong8 SIMD_CFUNC vector8(simd_ulong4 __lo, simd_ulong4 __hi) { simd_ulong8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1003 | static simd_double8 SIMD_CFUNC vector8(simd_double4 __lo, simd_double4 __hi) { simd_double8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1004 | |||
| 1005 | static simd_char16 SIMD_CFUNC vector16(simd_char8 __lo, simd_char8 __hi) { simd_char16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1006 | static simd_uchar16 SIMD_CFUNC vector16(simd_uchar8 __lo, simd_uchar8 __hi) { simd_uchar16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1007 | static simd_short16 SIMD_CFUNC vector16(simd_short8 __lo, simd_short8 __hi) { simd_short16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1008 | static simd_ushort16 SIMD_CFUNC vector16(simd_ushort8 __lo, simd_ushort8 __hi) { simd_ushort16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1009 | static simd_int16 SIMD_CFUNC vector16(simd_int8 __lo, simd_int8 __hi) { simd_int16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1010 | static simd_uint16 SIMD_CFUNC vector16(simd_uint8 __lo, simd_uint8 __hi) { simd_uint16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1011 | static simd_float16 SIMD_CFUNC vector16(simd_float8 __lo, simd_float8 __hi) { simd_float16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1012 | |||
| 1013 | static simd_char32 SIMD_CFUNC vector32(simd_char16 __lo, simd_char16 __hi) { simd_char32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1014 | static simd_uchar32 SIMD_CFUNC vector32(simd_uchar16 __lo, simd_uchar16 __hi) { simd_uchar32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1015 | static simd_short32 SIMD_CFUNC vector32(simd_short16 __lo, simd_short16 __hi) { simd_short32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1016 | static simd_ushort32 SIMD_CFUNC vector32(simd_ushort16 __lo, simd_ushort16 __hi) { simd_ushort32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1017 | |||
| 1018 | #pragma mark - Implementation | ||
| 1019 | |||
| 1020 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x) { return __x; } | ||
| 1021 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x) { return __x; } | ||
| 1022 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x) { return __x; } | ||
| 1023 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x) { return __x; } | ||
| 1024 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x) { return __x; } | ||
| 1025 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x) { return __x; } | ||
| 1026 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x) { return (simd_char2)__x; } | ||
| 1027 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x) { return (simd_char3)__x; } | ||
| 1028 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x) { return (simd_char4)__x; } | ||
| 1029 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x) { return (simd_char8)__x; } | ||
| 1030 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x) { return (simd_char16)__x; } | ||
| 1031 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x) { return (simd_char32)__x; } | ||
| 1032 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x) { return __builtin_convertvector(__x & 0xff, simd_char2); } | ||
| 1033 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x) { return __builtin_convertvector(__x & 0xff, simd_char3); } | ||
| 1034 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x) { return __builtin_convertvector(__x & 0xff, simd_char4); } | ||
| 1035 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x) { return __builtin_convertvector(__x & 0xff, simd_char8); } | ||
| 1036 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x) { return __builtin_convertvector(__x & 0xff, simd_char16); } | ||
| 1037 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x) { return __builtin_convertvector(__x & 0xff, simd_char32); } | ||
| 1038 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x) { return simd_char(simd_short(__x)); } | ||
| 1039 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x) { return simd_char(simd_short(__x)); } | ||
| 1040 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x) { return simd_char(simd_short(__x)); } | ||
| 1041 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x) { return simd_char(simd_short(__x)); } | ||
| 1042 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x) { return simd_char(simd_short(__x)); } | ||
| 1043 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x) { return simd_char(simd_short(__x)); } | ||
| 1044 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x) { return simd_char(simd_short(__x)); } | ||
| 1045 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x) { return simd_char(simd_short(__x)); } | ||
| 1046 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x) { return simd_char(simd_short(__x)); } | ||
| 1047 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x) { return simd_char(simd_short(__x)); } | ||
| 1048 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x) { return simd_char(simd_short(__x)); } | ||
| 1049 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x) { return simd_char(simd_short(__x)); } | ||
| 1050 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x) { return simd_char(simd_short(__x)); } | ||
| 1051 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x) { return simd_char(simd_short(__x)); } | ||
| 1052 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x) { return simd_char(simd_short(__x)); } | ||
| 1053 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x) { return simd_char(simd_short(__x)); } | ||
| 1054 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x) { return simd_char(simd_short(__x)); } | ||
| 1055 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x) { return simd_char(simd_short(__x)); } | ||
| 1056 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x) { return simd_char(simd_short(__x)); } | ||
| 1057 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x) { return simd_char(simd_short(__x)); } | ||
| 1058 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x) { return simd_char(simd_short(__x)); } | ||
| 1059 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x) { return simd_char(simd_short(__x)); } | ||
| 1060 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x) { return simd_char(simd_short(__x)); } | ||
| 1061 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x) { return simd_char(simd_short(__x)); } | ||
| 1062 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x) { return simd_char(simd_short(__x)); } | ||
| 1063 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x) { return simd_char(simd_short(__x)); } | ||
| 1064 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x) { return simd_char(simd_short(__x)); } | ||
| 1065 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x) { return simd_char(simd_short(__x)); } | ||
| 1066 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x) { return simd_char(simd_short(__x)); } | ||
| 1067 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x) { return simd_char(simd_short(__x)); } | ||
| 1068 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x) { return simd_char(simd_short(__x)); } | ||
| 1069 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x) { return simd_char(simd_short(__x)); } | ||
| 1070 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x) { return simd_char(simd_short(__x)); } | ||
| 1071 | |||
| 1072 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x) { return __x; } | ||
| 1073 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x) { return __x; } | ||
| 1074 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x) { return __x; } | ||
| 1075 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x) { return __x; } | ||
| 1076 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x) { return __x; } | ||
| 1077 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x) { return __x; } | ||
| 1078 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1079 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1080 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1081 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1082 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1083 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1084 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1085 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1086 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1087 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1088 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1089 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1090 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1091 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1092 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1093 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1094 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1095 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1096 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1097 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1098 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1099 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1100 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1101 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1102 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1103 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1104 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1105 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1106 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1107 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1108 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1109 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1110 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1111 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1112 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1113 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1114 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1115 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1116 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1117 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1118 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1119 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1120 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1121 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1122 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1123 | |||
| 1124 | |||
| 1125 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; } | ||
| 1126 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; } | ||
| 1127 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x) { return (simd_uchar4)__x; } | ||
| 1128 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x) { return (simd_uchar8)__x; } | ||
| 1129 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x) { return (simd_uchar16)__x; } | ||
| 1130 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x) { return (simd_uchar32)__x; } | ||
| 1131 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x) { return __x; } | ||
| 1132 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x) { return __x; } | ||
| 1133 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x) { return __x; } | ||
| 1134 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x) { return __x; } | ||
| 1135 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x) { return __x; } | ||
| 1136 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x) { return __x; } | ||
| 1137 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1138 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1139 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1140 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1141 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1142 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1143 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1144 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1145 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1146 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1147 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1148 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1149 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1150 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1151 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1152 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1153 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1154 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1155 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1156 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1157 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1158 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1159 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1160 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1161 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1162 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1163 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1164 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1165 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1166 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1167 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1168 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1169 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1170 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1171 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1172 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1173 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1174 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1175 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1176 | |||
| 1177 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1178 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1179 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1180 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1181 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1182 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1183 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1184 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1185 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1186 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1187 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1188 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1189 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1190 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1191 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1192 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1193 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1194 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1195 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1196 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1197 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1198 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1199 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1200 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1201 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1202 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1203 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1204 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1205 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1206 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1207 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x) { return __x; } | ||
| 1208 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x) { return __x; } | ||
| 1209 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x) { return __x; } | ||
| 1210 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x) { return __x; } | ||
| 1211 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x) { return __x; } | ||
| 1212 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x) { return __x; } | ||
| 1213 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1214 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1215 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1216 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1217 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1218 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1219 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1220 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1221 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1222 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1223 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1224 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1225 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1226 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1227 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1228 | |||
| 1229 | |||
| 1230 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1231 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1232 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1233 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1234 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1235 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1236 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1237 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1238 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1239 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1240 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1241 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1242 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x) { return __x; } | ||
| 1243 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x) { return __x; } | ||
| 1244 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x) { return __x; } | ||
| 1245 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x) { return __x; } | ||
| 1246 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x) { return __x; } | ||
| 1247 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x) { return __x; } | ||
| 1248 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x) { return (simd_short2)__x; } | ||
| 1249 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x) { return (simd_short3)__x; } | ||
| 1250 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x) { return (simd_short4)__x; } | ||
| 1251 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x) { return (simd_short8)__x; } | ||
| 1252 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x) { return (simd_short16)__x; } | ||
| 1253 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x) { return (simd_short32)__x; } | ||
| 1254 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x) { return __builtin_convertvector(__x & 0xffff, simd_short2); } | ||
| 1255 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x) { return __builtin_convertvector(__x & 0xffff, simd_short3); } | ||
| 1256 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x) { return __builtin_convertvector(__x & 0xffff, simd_short4); } | ||
| 1257 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x) { return __builtin_convertvector(__x & 0xffff, simd_short8); } | ||
| 1258 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x) { return __builtin_convertvector(__x & 0xffff, simd_short16); } | ||
| 1259 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x) { return simd_short(simd_int(__x)); } | ||
| 1260 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x) { return simd_short(simd_int(__x)); } | ||
| 1261 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x) { return simd_short(simd_int(__x)); } | ||
| 1262 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x) { return simd_short(simd_int(__x)); } | ||
| 1263 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x) { return simd_short(simd_int(__x)); } | ||
| 1264 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x) { return simd_short(simd_int(__x)); } | ||
| 1265 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x) { return simd_short(simd_int(__x)); } | ||
| 1266 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x) { return simd_short(simd_int(__x)); } | ||
| 1267 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x) { return simd_short(simd_int(__x)); } | ||
| 1268 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x) { return simd_short(simd_int(__x)); } | ||
| 1269 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x) { return simd_short(simd_int(__x)); } | ||
| 1270 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x) { return simd_short(simd_int(__x)); } | ||
| 1271 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x) { return simd_short(simd_int(__x)); } | ||
| 1272 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x) { return simd_short(simd_int(__x)); } | ||
| 1273 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x) { return simd_short(simd_int(__x)); } | ||
| 1274 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x) { return simd_short(simd_int(__x)); } | ||
| 1275 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x) { return simd_short(simd_int(__x)); } | ||
| 1276 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x) { return simd_short(simd_int(__x)); } | ||
| 1277 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x) { return simd_short(simd_int(__x)); } | ||
| 1278 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x) { return simd_short(simd_int(__x)); } | ||
| 1279 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x) { return simd_short(simd_int(__x)); } | ||
| 1280 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x) { return simd_short(simd_int(__x)); } | ||
| 1281 | |||
| 1282 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x) { return simd_short(__x); } | ||
| 1283 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x) { return simd_short(__x); } | ||
| 1284 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x) { return simd_short(__x); } | ||
| 1285 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x) { return simd_short(__x); } | ||
| 1286 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x) { return simd_short(__x); } | ||
| 1287 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x) { return simd_short(__x); } | ||
| 1288 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x) { return __x; } | ||
| 1289 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x) { return __x; } | ||
| 1290 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x) { return __x; } | ||
| 1291 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x) { return __x; } | ||
| 1292 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x) { return __x; } | ||
| 1293 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x) { return __x; } | ||
| 1294 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1295 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1296 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1297 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1298 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1299 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1300 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1301 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1302 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1303 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1304 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1305 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1306 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1307 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1308 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1309 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1310 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1311 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1312 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x) { return simd_short(__x); } | ||
| 1313 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x) { return simd_short(__x); } | ||
| 1314 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x) { return simd_short(__x); } | ||
| 1315 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x) { return simd_short(__x); } | ||
| 1316 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x) { return simd_short(__x); } | ||
| 1317 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x) { return simd_short(__x); } | ||
| 1318 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1319 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1320 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1321 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1322 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1323 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1324 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1325 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1326 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1327 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1328 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1329 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1330 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1331 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1332 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1333 | |||
| 1334 | |||
| 1335 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1336 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1337 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1338 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1339 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1340 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1341 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1342 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1343 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1344 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1345 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1346 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1347 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x) { return (simd_ushort2)__x; } | ||
| 1348 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x) { return (simd_ushort3)__x; } | ||
| 1349 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x) { return (simd_ushort4)__x; } | ||
| 1350 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x) { return (simd_ushort8)__x; } | ||
| 1351 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x) { return (simd_ushort16)__x; } | ||
| 1352 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x) { return (simd_ushort32)__x; } | ||
| 1353 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x) { return __x; } | ||
| 1354 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x) { return __x; } | ||
| 1355 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x) { return __x; } | ||
| 1356 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x) { return __x; } | ||
| 1357 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x) { return __x; } | ||
| 1358 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x) { return __x; } | ||
| 1359 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1360 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1361 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1362 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1363 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1364 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1365 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1366 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1367 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1368 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1369 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1370 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1371 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1372 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1373 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1374 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1375 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1376 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1377 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1378 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1379 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1380 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1381 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1382 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1383 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1384 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1385 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1386 | |||
| 1387 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1388 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1389 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1390 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1391 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1392 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1393 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1394 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1395 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1396 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1397 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1398 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1399 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1400 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1401 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1402 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1403 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1404 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1405 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1406 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1407 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1408 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1409 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1410 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1411 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1412 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1413 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1414 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1415 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1416 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1417 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x) { return simd_ushort(__x); } | ||
| 1418 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x) { return simd_ushort(__x); } | ||
| 1419 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x) { return simd_ushort(__x); } | ||
| 1420 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x) { return simd_ushort(__x); } | ||
| 1421 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x) { return simd_ushort(__x); } | ||
| 1422 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x) { return simd_ushort(__x); } | ||
| 1423 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x) { return __x; } | ||
| 1424 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x) { return __x; } | ||
| 1425 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x) { return __x; } | ||
| 1426 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x) { return __x; } | ||
| 1427 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x) { return __x; } | ||
| 1428 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x) { return __x; } | ||
| 1429 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1430 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1431 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1432 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1433 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1434 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1435 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1436 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1437 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1438 | |||
| 1439 | |||
| 1440 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1441 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1442 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1443 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1444 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1445 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1446 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1447 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1448 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1449 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1450 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1451 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1452 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1453 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1454 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1455 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1456 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1457 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1458 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1459 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1460 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x) { return __x; } | ||
| 1461 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x) { return __x; } | ||
| 1462 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x) { return __x; } | ||
| 1463 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x) { return __x; } | ||
| 1464 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x) { return __x; } | ||
| 1465 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x) { return (simd_int2)__x; } | ||
| 1466 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x) { return (simd_int3)__x; } | ||
| 1467 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x) { return (simd_int4)__x; } | ||
| 1468 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x) { return (simd_int8)__x; } | ||
| 1469 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x) { return (simd_int16)__x; } | ||
| 1470 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1471 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1472 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1473 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1474 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1475 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int2); } | ||
| 1476 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int3); } | ||
| 1477 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int4); } | ||
| 1478 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int8); } | ||
| 1479 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x) { return simd_int(simd_long(__x)); } | ||
| 1480 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x) { return simd_int(simd_long(__x)); } | ||
| 1481 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x) { return simd_int(simd_long(__x)); } | ||
| 1482 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x) { return simd_int(simd_long(__x)); } | ||
| 1483 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1484 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1485 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1486 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1487 | |||
| 1488 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x) { return simd_int(__x); } | ||
| 1489 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x) { return simd_int(__x); } | ||
| 1490 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x) { return simd_int(__x); } | ||
| 1491 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x) { return simd_int(__x); } | ||
| 1492 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x) { return simd_int(__x); } | ||
| 1493 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x) { return simd_int(__x); } | ||
| 1494 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x) { return simd_int(__x); } | ||
| 1495 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x) { return simd_int(__x); } | ||
| 1496 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x) { return simd_int(__x); } | ||
| 1497 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x) { return simd_int(__x); } | ||
| 1498 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x) { return __x; } | ||
| 1499 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x) { return __x; } | ||
| 1500 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x) { return __x; } | ||
| 1501 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x) { return __x; } | ||
| 1502 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x) { return __x; } | ||
| 1503 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1504 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1505 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1506 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1507 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1508 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1509 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1510 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1511 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1512 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1513 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1514 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1515 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1516 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x) { return simd_int(__x); } | ||
| 1517 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x) { return simd_int(__x); } | ||
| 1518 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x) { return simd_int(__x); } | ||
| 1519 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x) { return simd_int(__x); } | ||
| 1520 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x) { return simd_int(__x); } | ||
| 1521 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x) { return simd_int(__x); } | ||
| 1522 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x) { return simd_int(__x); } | ||
| 1523 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x) { return simd_int(__x); } | ||
| 1524 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x) { return simd_int(__x); } | ||
| 1525 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x) { return simd_int(__x); } | ||
| 1526 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1527 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1528 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1529 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1530 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1531 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1532 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1533 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1534 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1535 | |||
| 1536 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) { | ||
| 1537 | #if defined __arm64__ | ||
| 1538 | return vcvtn_s32_f32(__x); | ||
| 1539 | #else | ||
| 1540 | return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1541 | #endif | ||
| 1542 | } | ||
| 1543 | |||
| 1544 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) { | ||
| 1545 | return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1546 | } | ||
| 1547 | |||
| 1548 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) { | ||
| 1549 | #if defined __SSE2__ | ||
| 1550 | return _mm_cvtps_epi32(__x); | ||
| 1551 | #elif defined __arm64__ | ||
| 1552 | return vcvtnq_s32_f32(__x); | ||
| 1553 | #else | ||
| 1554 | simd_float4 magic = __tg_copysign(0x1.0p23, __x); | ||
| 1555 | simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23; | ||
| 1556 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4); | ||
| 1557 | #endif | ||
| 1558 | } | ||
| 1559 | |||
| 1560 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) { | ||
| 1561 | #if defined __AVX__ | ||
| 1562 | return _mm256_cvtps_epi32(__x); | ||
| 1563 | #else | ||
| 1564 | return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1565 | #endif | ||
| 1566 | } | ||
| 1567 | |||
| 1568 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) { | ||
| 1569 | #if defined __AVX512F__ | ||
| 1570 | return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT); | ||
| 1571 | #else | ||
| 1572 | return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1573 | #endif | ||
| 1574 | } | ||
| 1575 | |||
| 1576 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1577 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1578 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1579 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1580 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1581 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1582 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1583 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1584 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1585 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1586 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1587 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1588 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1589 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1590 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1591 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1592 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1593 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1594 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1595 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1596 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x) { return (simd_uint2)__x; } | ||
| 1597 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x) { return (simd_uint3)__x; } | ||
| 1598 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x) { return (simd_uint4)__x; } | ||
| 1599 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x) { return (simd_uint8)__x; } | ||
| 1600 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x) { return (simd_uint16)__x; } | ||
| 1601 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x) { return __x; } | ||
| 1602 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x) { return __x; } | ||
| 1603 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x) { return __x; } | ||
| 1604 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x) { return __x; } | ||
| 1605 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x) { return __x; } | ||
| 1606 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x) { simd_int2 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float2)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint2)0,0x80000000,__big); } | ||
| 1607 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x) { simd_int3 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float3)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint3)0,0x80000000,__big); } | ||
| 1608 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x) { simd_int4 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float4)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint4)0,0x80000000,__big); } | ||
| 1609 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x) { simd_int8 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float8)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint8)0,0x80000000,__big); } | ||
| 1610 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x) { simd_int16 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float16)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint16)0,0x80000000,__big); } | ||
| 1611 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1612 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1613 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1614 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1615 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1616 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1617 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1618 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1619 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x) { simd_long2 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double2)0,0x1.0p31,__big))) + simd_bitselect((simd_uint2)0,0x80000000,simd_int(__big)); } | ||
| 1620 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x) { simd_long3 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double3)0,0x1.0p31,__big))) + simd_bitselect((simd_uint3)0,0x80000000,simd_int(__big)); } | ||
| 1621 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x) { simd_long4 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double4)0,0x1.0p31,__big))) + simd_bitselect((simd_uint4)0,0x80000000,simd_int(__big)); } | ||
| 1622 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x) { simd_long8 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double8)0,0x1.0p31,__big))) + simd_bitselect((simd_uint8)0,0x80000000,simd_int(__big)); } | ||
| 1623 | |||
| 1624 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1625 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1626 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1627 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1628 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1629 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1630 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1631 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1632 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1633 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1634 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1635 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1636 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1637 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1638 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1639 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1640 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1641 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1642 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1643 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1644 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1645 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1646 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1647 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1648 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1649 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1650 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1651 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1652 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x) { return simd_uint(__x); } | ||
| 1653 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x) { return simd_uint(__x); } | ||
| 1654 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x) { return simd_uint(__x); } | ||
| 1655 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x) { return simd_uint(__x); } | ||
| 1656 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x) { return simd_uint(__x); } | ||
| 1657 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x) { return simd_uint(__x); } | ||
| 1658 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x) { return simd_uint(__x); } | ||
| 1659 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x) { return simd_uint(__x); } | ||
| 1660 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x) { return simd_uint(__x); } | ||
| 1661 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x) { return simd_uint(__x); } | ||
| 1662 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x) { return __x; } | ||
| 1663 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x) { return __x; } | ||
| 1664 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x) { return __x; } | ||
| 1665 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x) { return __x; } | ||
| 1666 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x) { return __x; } | ||
| 1667 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1668 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1669 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1670 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1671 | |||
| 1672 | |||
| 1673 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1674 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1675 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1676 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1677 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1678 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1679 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1680 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1681 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1682 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1683 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1684 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1685 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1686 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1687 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1688 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1689 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1690 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1691 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1692 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1693 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1694 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1695 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1696 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1697 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1698 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1699 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1700 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1701 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1702 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1703 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x) { return __x; } | ||
| 1704 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x) { return __x; } | ||
| 1705 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x) { return __x; } | ||
| 1706 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x) { return __x; } | ||
| 1707 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x) { return __x; } | ||
| 1708 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1709 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1710 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1711 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1712 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1713 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1714 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1715 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1716 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1717 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1718 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1719 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1720 | |||
| 1721 | |||
| 1722 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1723 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1724 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1725 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1726 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1727 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1728 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1729 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1730 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1731 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1732 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1733 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1734 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1735 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1736 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1737 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1738 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1739 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1740 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1741 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1742 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1743 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1744 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1745 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1746 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1747 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1748 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1749 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1750 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x) { return __x; } | ||
| 1751 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x) { return __x; } | ||
| 1752 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x) { return __x; } | ||
| 1753 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x) { return __x; } | ||
| 1754 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x) { return (simd_long2)__x; } | ||
| 1755 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x) { return (simd_long3)__x; } | ||
| 1756 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x) { return (simd_long4)__x; } | ||
| 1757 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x) { return (simd_long8)__x; } | ||
| 1758 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1759 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1760 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1761 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1762 | |||
| 1763 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x) { return simd_long(__x); } | ||
| 1764 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x) { return simd_long(__x); } | ||
| 1765 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x) { return simd_long(__x); } | ||
| 1766 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x) { return simd_long(__x); } | ||
| 1767 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x) { return simd_long(__x); } | ||
| 1768 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x) { return simd_long(__x); } | ||
| 1769 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x) { return simd_long(__x); } | ||
| 1770 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x) { return simd_long(__x); } | ||
| 1771 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x) { return simd_long(__x); } | ||
| 1772 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x) { return simd_long(__x); } | ||
| 1773 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x) { return simd_long(__x); } | ||
| 1774 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x) { return simd_long(__x); } | ||
| 1775 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1776 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1777 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1778 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1779 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x) { return __x; } | ||
| 1780 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x) { return __x; } | ||
| 1781 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x) { return __x; } | ||
| 1782 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x) { return __x; } | ||
| 1783 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1784 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1785 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1786 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1787 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x) { return simd_long(__x); } | ||
| 1788 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x) { return simd_long(__x); } | ||
| 1789 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x) { return simd_long(__x); } | ||
| 1790 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x) { return simd_long(__x); } | ||
| 1791 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x) { return simd_long(__x); } | ||
| 1792 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x) { return simd_long(__x); } | ||
| 1793 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x) { return simd_long(__x); } | ||
| 1794 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x) { return simd_long(__x); } | ||
| 1795 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x) { return simd_long(__x); } | ||
| 1796 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x) { return simd_long(__x); } | ||
| 1797 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x) { return simd_long(__x); } | ||
| 1798 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x) { return simd_long(__x); } | ||
| 1799 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1800 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1801 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1802 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1803 | |||
| 1804 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) { | ||
| 1805 | #if defined __AVX512F__ | ||
| 1806 | return _mm_cvtpd_epi64(__x); | ||
| 1807 | #elif defined __arm64__ | ||
| 1808 | return vcvtnq_s64_f64(__x); | ||
| 1809 | #else | ||
| 1810 | simd_double2 magic = __tg_copysign(0x1.0p52, __x); | ||
| 1811 | simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52; | ||
| 1812 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2); | ||
| 1813 | #endif | ||
| 1814 | } | ||
| 1815 | |||
| 1816 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) { | ||
| 1817 | return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x))); | ||
| 1818 | } | ||
| 1819 | |||
| 1820 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) { | ||
| 1821 | #if defined __AVX512F__ | ||
| 1822 | return _mm256_cvtpd_epi64(__x); | ||
| 1823 | #else | ||
| 1824 | return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1825 | #endif | ||
| 1826 | } | ||
| 1827 | |||
| 1828 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) { | ||
| 1829 | #if defined __AVX512F__ | ||
| 1830 | return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT); | ||
| 1831 | #else | ||
| 1832 | return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1833 | #endif | ||
| 1834 | } | ||
| 1835 | |||
| 1836 | |||
| 1837 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1838 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1839 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1840 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1841 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1842 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1843 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1844 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1845 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1846 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1847 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1848 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1849 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1850 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1851 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1852 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1853 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1854 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1855 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1856 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1857 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1858 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1859 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1860 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1861 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x) { simd_int2 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float2)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,simd_long(__big)); } | ||
| 1862 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x) { simd_int3 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float3)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,simd_long(__big)); } | ||
| 1863 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x) { simd_int4 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float4)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,simd_long(__big)); } | ||
| 1864 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x) { simd_int8 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float8)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,simd_long(__big)); } | ||
| 1865 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x) { return (simd_ulong2)__x; } | ||
| 1866 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x) { return (simd_ulong3)__x; } | ||
| 1867 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x) { return (simd_ulong4)__x; } | ||
| 1868 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x) { return (simd_ulong8)__x; } | ||
| 1869 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x) { return __x; } | ||
| 1870 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x) { return __x; } | ||
| 1871 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x) { return __x; } | ||
| 1872 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x) { return __x; } | ||
| 1873 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x) { simd_long2 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double2)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,__big); } | ||
| 1874 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x) { simd_long3 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double3)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,__big); } | ||
| 1875 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x) { simd_long4 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double4)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,__big); } | ||
| 1876 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x) { simd_long8 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double8)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,__big); } | ||
| 1877 | |||
| 1878 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1879 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1880 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1881 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1882 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1883 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1884 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1885 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1886 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1887 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1888 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1889 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1890 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1891 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1892 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1893 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1894 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1895 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1896 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1897 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1898 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1899 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1900 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1901 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1902 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x) { return simd_ulong(__x); } | ||
| 1903 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x) { return simd_ulong(__x); } | ||
| 1904 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x) { return simd_ulong(__x); } | ||
| 1905 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x) { return simd_ulong(__x); } | ||
| 1906 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x) { return simd_ulong(__x); } | ||
| 1907 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x) { return simd_ulong(__x); } | ||
| 1908 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x) { return simd_ulong(__x); } | ||
| 1909 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x) { return simd_ulong(__x); } | ||
| 1910 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x) { return simd_ulong(__x); } | ||
| 1911 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x) { return simd_ulong(__x); } | ||
| 1912 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x) { return simd_ulong(__x); } | ||
| 1913 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x) { return simd_ulong(__x); } | ||
| 1914 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; } | ||
| 1915 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; } | ||
| 1916 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; } | ||
| 1917 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; } | ||
| 1918 | |||
| 1919 | |||
| 1920 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); } | ||
| 1921 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); } | ||
| 1922 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x) { return simd_double(simd_int(__x)); } | ||
| 1923 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x) { return simd_double(simd_int(__x)); } | ||
| 1924 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x) { return simd_double(simd_int(__x)); } | ||
| 1925 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x) { return simd_double(simd_int(__x)); } | ||
| 1926 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x) { return simd_double(simd_int(__x)); } | ||
| 1927 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x) { return simd_double(simd_int(__x)); } | ||
| 1928 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x) { return simd_double(simd_int(__x)); } | ||
| 1929 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x) { return simd_double(simd_int(__x)); } | ||
| 1930 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x) { return simd_double(simd_int(__x)); } | ||
| 1931 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x) { return simd_double(simd_int(__x)); } | ||
| 1932 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x) { return simd_double(simd_int(__x)); } | ||
| 1933 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x) { return simd_double(simd_int(__x)); } | ||
| 1934 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x) { return simd_double(simd_int(__x)); } | ||
| 1935 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x) { return simd_double(simd_int(__x)); } | ||
| 1936 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1937 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1938 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1939 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1940 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1941 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1942 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1943 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1944 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1945 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1946 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1947 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1948 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1949 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1950 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1951 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1952 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1953 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1954 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1955 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1956 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1957 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1958 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1959 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1960 | |||
| 1961 | |||
| 1962 | #ifdef __cplusplus | ||
| 1963 | } | ||
| 1964 | #endif | ||
| 1965 | #endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 1966 | #endif // __SIMD_CONVERSION_HEADER__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/simd/math.h deleted-5380| ... | @@ -1,5380 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide elementwise math operations | ||
| 3 | * on vectors; each lane of the result vector depends only on the data in the | ||
| 4 | * corresponding lane of the argument(s) to the function. | ||
| 5 | * | ||
| 6 | * You should not use the C functions declared in this header directly (these | ||
| 7 | * are functions with names like `__tg_cos(x)`). These are merely | ||
| 8 | * implementation details of <tgmath.h> overloading; instead of calling | ||
| 9 | * `__tg_cos(x)`, call `cos(x)`. If you are writing C++, use `simd::cos(x)`. | ||
| 10 | * | ||
| 11 | * Note that while these vector functions are relatively recent additions, | ||
| 12 | * scalar fallback is provided for all of them, so they are available even | ||
| 13 | * when targeting older OS versions. | ||
| 14 | * | ||
| 15 | * The following functions are available: | ||
| 16 | * | ||
| 17 | * C name C++ name Notes | ||
| 18 | * ---------------------------------------------------------------------- | ||
| 19 | * acos(x) simd::acos(x) | ||
| 20 | * asin(x) simd::asin(x) | ||
| 21 | * atan(x) simd::atan(x) | ||
| 22 | * atan2(y,x) simd::atan2(y,x) The argument order matches the scalar | ||
| 23 | * atan2 function, which gives the angle | ||
| 24 | * of a line with slope y/x. | ||
| 25 | * cos(x) simd::cos(x) | ||
| 26 | * sin(x) simd::sin(x) | ||
| 27 | * tan(x) simd::tan(x) | ||
| 28 | * | ||
| 29 | * cospi(x) simd::cospi(x) Returns cos(pi*x), sin(pi*x), tan(pi*x) | ||
| 30 | * sinpi(x) simd::sinpi(x) more efficiently and accurately than | ||
| 31 | * tanpi(x) simd::tanpi(x) would otherwise be possible | ||
| 32 | * | ||
| 33 | * acosh(x) simd::acosh(x) | ||
| 34 | * asinh(x) simd::asinh(x) | ||
| 35 | * atanh(x) simd::atanh(x) | ||
| 36 | * | ||
| 37 | * cosh(x) simd::cosh(x) | ||
| 38 | * sinh(x) simd::sinh(x) | ||
| 39 | * tanh(x) simd::tanh(x) | ||
| 40 | * | ||
| 41 | * exp(x) simd::exp(x) | ||
| 42 | * exp2(x) simd::exp2(x) | ||
| 43 | * exp10(x) simd::exp10(x) More efficient that pow(10,x). | ||
| 44 | * expm1(x) simd::expm1(x) exp(x)-1, accurate even for tiny x. | ||
| 45 | * | ||
| 46 | * log(x) simd::log(x) | ||
| 47 | * log2(x) simd::log2(x) | ||
| 48 | * log10(x) simd::log10(x) | ||
| 49 | * log1p(x) simd::log1p(x) log(1+x), accurate even for tiny x. | ||
| 50 | * | ||
| 51 | * fabs(x) simd::fabs(x) | ||
| 52 | * cbrt(x) simd::cbrt(x) | ||
| 53 | * sqrt(x) simd::sqrt(x) | ||
| 54 | * pow(x,y) simd::pow(x,y) | ||
| 55 | * copysign(x,y) simd::copysign(x,y) | ||
| 56 | * hypot(x,y) simd::hypot(x,y) sqrt(x*x + y*y), computed without | ||
| 57 | * overflow.1 | ||
| 58 | * erf(x) simd::erf(x) | ||
| 59 | * erfc(x) simd::erfc(x) | ||
| 60 | * tgamma(x) simd::tgamma(x) | ||
| 61 | * | ||
| 62 | * fmod(x,y) simd::fmod(x,y) | ||
| 63 | * remainder(x,y) simd::remainder(x,y) | ||
| 64 | * | ||
| 65 | * ceil(x) simd::ceil(x) | ||
| 66 | * floor(x) simd::floor(x) | ||
| 67 | * rint(x) simd::rint(x) | ||
| 68 | * round(x) simd::round(x) | ||
| 69 | * trunc(x) simd::trunc(x) | ||
| 70 | * | ||
| 71 | * fdim(x,y) simd::fdim(x,y) | ||
| 72 | * fmax(x,y) simd::fmax(x,y) When one argument to fmin or fmax is | ||
| 73 | * fmin(x,y) simd::fmin(x,y) constant, use it as the *second* (y) | ||
| 74 | * argument to get better codegen on some | ||
| 75 | * architectures. E.g., write fmin(x,2) | ||
| 76 | * instead of fmin(2,x). | ||
| 77 | * fma(x,y,z) simd::fma(x,y,z) Fast on arm64 and when targeting AVX2 | ||
| 78 | * and later; may be quite expensive on | ||
| 79 | * older hardware. | ||
| 80 | * simd_muladd(x,y,z) simd::muladd(x,y,z) | ||
| 81 | * | ||
| 82 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 83 | * @unsorted */ | ||
| 84 | |||
| 85 | #ifndef SIMD_MATH_HEADER | ||
| 86 | #define SIMD_MATH_HEADER | ||
| 87 | |||
| 88 | #include <simd/base.h> | ||
| 89 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 90 | #include <simd/vector_make.h> | ||
| 91 | #include <simd/logic.h> | ||
| 92 | |||
| 93 | #ifdef __cplusplus | ||
| 94 | extern "C" { | ||
| 95 | #endif | ||
| 96 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 97 | * Objective-C, and `simd::acos` in C++. */ | ||
| 98 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x); | ||
| 99 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 100 | * Objective-C, and `simd::acos` in C++. */ | ||
| 101 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x); | ||
| 102 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 103 | * Objective-C, and `simd::acos` in C++. */ | ||
| 104 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x); | ||
| 105 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 106 | * Objective-C, and `simd::acos` in C++. */ | ||
| 107 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x); | ||
| 108 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 109 | * Objective-C, and `simd::acos` in C++. */ | ||
| 110 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x); | ||
| 111 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 112 | * Objective-C, and `simd::acos` in C++. */ | ||
| 113 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x); | ||
| 114 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 115 | * Objective-C, and `simd::acos` in C++. */ | ||
| 116 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x); | ||
| 117 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 118 | * Objective-C, and `simd::acos` in C++. */ | ||
| 119 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x); | ||
| 120 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 121 | * Objective-C, and `simd::acos` in C++. */ | ||
| 122 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x); | ||
| 123 | |||
| 124 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 125 | * Objective-C, and `simd::asin` in C++. */ | ||
| 126 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x); | ||
| 127 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 128 | * Objective-C, and `simd::asin` in C++. */ | ||
| 129 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x); | ||
| 130 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 131 | * Objective-C, and `simd::asin` in C++. */ | ||
| 132 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x); | ||
| 133 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 134 | * Objective-C, and `simd::asin` in C++. */ | ||
| 135 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x); | ||
| 136 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 137 | * Objective-C, and `simd::asin` in C++. */ | ||
| 138 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x); | ||
| 139 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 140 | * Objective-C, and `simd::asin` in C++. */ | ||
| 141 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x); | ||
| 142 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 143 | * Objective-C, and `simd::asin` in C++. */ | ||
| 144 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x); | ||
| 145 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 146 | * Objective-C, and `simd::asin` in C++. */ | ||
| 147 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x); | ||
| 148 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 149 | * Objective-C, and `simd::asin` in C++. */ | ||
| 150 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x); | ||
| 151 | |||
| 152 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 153 | * Objective-C, and `simd::atan` in C++. */ | ||
| 154 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x); | ||
| 155 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 156 | * Objective-C, and `simd::atan` in C++. */ | ||
| 157 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x); | ||
| 158 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 159 | * Objective-C, and `simd::atan` in C++. */ | ||
| 160 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x); | ||
| 161 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 162 | * Objective-C, and `simd::atan` in C++. */ | ||
| 163 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x); | ||
| 164 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 165 | * Objective-C, and `simd::atan` in C++. */ | ||
| 166 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x); | ||
| 167 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 168 | * Objective-C, and `simd::atan` in C++. */ | ||
| 169 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x); | ||
| 170 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 171 | * Objective-C, and `simd::atan` in C++. */ | ||
| 172 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x); | ||
| 173 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 174 | * Objective-C, and `simd::atan` in C++. */ | ||
| 175 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x); | ||
| 176 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 177 | * Objective-C, and `simd::atan` in C++. */ | ||
| 178 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x); | ||
| 179 | |||
| 180 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 181 | * Objective-C, and `simd::cos` in C++. */ | ||
| 182 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x); | ||
| 183 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 184 | * Objective-C, and `simd::cos` in C++. */ | ||
| 185 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x); | ||
| 186 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 187 | * Objective-C, and `simd::cos` in C++. */ | ||
| 188 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x); | ||
| 189 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 190 | * Objective-C, and `simd::cos` in C++. */ | ||
| 191 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x); | ||
| 192 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 193 | * Objective-C, and `simd::cos` in C++. */ | ||
| 194 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x); | ||
| 195 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 196 | * Objective-C, and `simd::cos` in C++. */ | ||
| 197 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x); | ||
| 198 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 199 | * Objective-C, and `simd::cos` in C++. */ | ||
| 200 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x); | ||
| 201 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 202 | * Objective-C, and `simd::cos` in C++. */ | ||
| 203 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x); | ||
| 204 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 205 | * Objective-C, and `simd::cos` in C++. */ | ||
| 206 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x); | ||
| 207 | |||
| 208 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 209 | * Objective-C, and `simd::sin` in C++. */ | ||
| 210 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x); | ||
| 211 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 212 | * Objective-C, and `simd::sin` in C++. */ | ||
| 213 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x); | ||
| 214 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 215 | * Objective-C, and `simd::sin` in C++. */ | ||
| 216 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x); | ||
| 217 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 218 | * Objective-C, and `simd::sin` in C++. */ | ||
| 219 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x); | ||
| 220 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 221 | * Objective-C, and `simd::sin` in C++. */ | ||
| 222 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x); | ||
| 223 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 224 | * Objective-C, and `simd::sin` in C++. */ | ||
| 225 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x); | ||
| 226 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 227 | * Objective-C, and `simd::sin` in C++. */ | ||
| 228 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x); | ||
| 229 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 230 | * Objective-C, and `simd::sin` in C++. */ | ||
| 231 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x); | ||
| 232 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 233 | * Objective-C, and `simd::sin` in C++. */ | ||
| 234 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x); | ||
| 235 | |||
| 236 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 237 | * Objective-C, and `simd::tan` in C++. */ | ||
| 238 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x); | ||
| 239 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 240 | * Objective-C, and `simd::tan` in C++. */ | ||
| 241 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x); | ||
| 242 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 243 | * Objective-C, and `simd::tan` in C++. */ | ||
| 244 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x); | ||
| 245 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 246 | * Objective-C, and `simd::tan` in C++. */ | ||
| 247 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x); | ||
| 248 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 249 | * Objective-C, and `simd::tan` in C++. */ | ||
| 250 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x); | ||
| 251 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 252 | * Objective-C, and `simd::tan` in C++. */ | ||
| 253 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x); | ||
| 254 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 255 | * Objective-C, and `simd::tan` in C++. */ | ||
| 256 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x); | ||
| 257 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 258 | * Objective-C, and `simd::tan` in C++. */ | ||
| 259 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x); | ||
| 260 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 261 | * Objective-C, and `simd::tan` in C++. */ | ||
| 262 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x); | ||
| 263 | |||
| 264 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 265 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 266 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 267 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x); | ||
| 268 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 269 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 270 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x); | ||
| 271 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 272 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 273 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x); | ||
| 274 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 275 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 276 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x); | ||
| 277 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 278 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 279 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x); | ||
| 280 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 281 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 282 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x); | ||
| 283 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 284 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 285 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x); | ||
| 286 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 287 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 288 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x); | ||
| 289 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 290 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 291 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x); | ||
| 292 | #endif | ||
| 293 | |||
| 294 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 295 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 296 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 297 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x); | ||
| 298 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 299 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 300 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x); | ||
| 301 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 302 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 303 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x); | ||
| 304 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 305 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 306 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x); | ||
| 307 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 308 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 309 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x); | ||
| 310 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 311 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 312 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x); | ||
| 313 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 314 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 315 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x); | ||
| 316 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 317 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 318 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x); | ||
| 319 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 320 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 321 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x); | ||
| 322 | #endif | ||
| 323 | |||
| 324 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 325 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 326 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 327 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x); | ||
| 328 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 329 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 330 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x); | ||
| 331 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 332 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 333 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x); | ||
| 334 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 335 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 336 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x); | ||
| 337 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 338 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 339 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x); | ||
| 340 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 341 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 342 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x); | ||
| 343 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 344 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 345 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x); | ||
| 346 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 347 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 348 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x); | ||
| 349 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 350 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 351 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x); | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 355 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 356 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x); | ||
| 357 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 358 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 359 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x); | ||
| 360 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 361 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 362 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x); | ||
| 363 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 364 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 365 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x); | ||
| 366 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 367 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 368 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x); | ||
| 369 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 370 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 371 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x); | ||
| 372 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 373 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 374 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x); | ||
| 375 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 376 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 377 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x); | ||
| 378 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 379 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 380 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x); | ||
| 381 | |||
| 382 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 383 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 384 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x); | ||
| 385 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 386 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 387 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x); | ||
| 388 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 389 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 390 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x); | ||
| 391 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 392 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 393 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x); | ||
| 394 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 395 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 396 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x); | ||
| 397 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 398 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 399 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x); | ||
| 400 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 401 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 402 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x); | ||
| 403 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 404 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 405 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x); | ||
| 406 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 407 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 408 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x); | ||
| 409 | |||
| 410 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 411 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 412 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x); | ||
| 413 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 414 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 415 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x); | ||
| 416 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 417 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 418 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x); | ||
| 419 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 420 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 421 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x); | ||
| 422 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 423 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 424 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x); | ||
| 425 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 426 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 427 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x); | ||
| 428 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 429 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 430 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x); | ||
| 431 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 432 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 433 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x); | ||
| 434 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 435 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 436 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x); | ||
| 437 | |||
| 438 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 439 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 440 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x); | ||
| 441 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 442 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 443 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x); | ||
| 444 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 445 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 446 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x); | ||
| 447 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 448 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 449 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x); | ||
| 450 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 451 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 452 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x); | ||
| 453 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 454 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 455 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x); | ||
| 456 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 457 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 458 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x); | ||
| 459 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 460 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 461 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x); | ||
| 462 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 463 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 464 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x); | ||
| 465 | |||
| 466 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 467 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 468 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x); | ||
| 469 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 470 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 471 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x); | ||
| 472 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 473 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 474 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x); | ||
| 475 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 476 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 477 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x); | ||
| 478 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 479 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 480 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x); | ||
| 481 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 482 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 483 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x); | ||
| 484 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 485 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 486 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x); | ||
| 487 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 488 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 489 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x); | ||
| 490 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 491 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 492 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x); | ||
| 493 | |||
| 494 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 495 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 496 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x); | ||
| 497 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 498 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 499 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x); | ||
| 500 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 501 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 502 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x); | ||
| 503 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 504 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 505 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x); | ||
| 506 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 507 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 508 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x); | ||
| 509 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 510 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 511 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x); | ||
| 512 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 513 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 514 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x); | ||
| 515 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 516 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 517 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x); | ||
| 518 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 519 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 520 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x); | ||
| 521 | |||
| 522 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 523 | * Objective-C, and `simd::exp` in C++. */ | ||
| 524 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x); | ||
| 525 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 526 | * Objective-C, and `simd::exp` in C++. */ | ||
| 527 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x); | ||
| 528 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 529 | * Objective-C, and `simd::exp` in C++. */ | ||
| 530 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x); | ||
| 531 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 532 | * Objective-C, and `simd::exp` in C++. */ | ||
| 533 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x); | ||
| 534 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 535 | * Objective-C, and `simd::exp` in C++. */ | ||
| 536 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x); | ||
| 537 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 538 | * Objective-C, and `simd::exp` in C++. */ | ||
| 539 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x); | ||
| 540 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 541 | * Objective-C, and `simd::exp` in C++. */ | ||
| 542 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x); | ||
| 543 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 544 | * Objective-C, and `simd::exp` in C++. */ | ||
| 545 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x); | ||
| 546 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 547 | * Objective-C, and `simd::exp` in C++. */ | ||
| 548 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x); | ||
| 549 | |||
| 550 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 551 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 552 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x); | ||
| 553 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 554 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 555 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x); | ||
| 556 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 557 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 558 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x); | ||
| 559 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 560 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 561 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x); | ||
| 562 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 563 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 564 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x); | ||
| 565 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 566 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 567 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x); | ||
| 568 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 569 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 570 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x); | ||
| 571 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 572 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 573 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x); | ||
| 574 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 575 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 576 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x); | ||
| 577 | |||
| 578 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 579 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 580 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 581 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x); | ||
| 582 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 583 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 584 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x); | ||
| 585 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 586 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 587 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x); | ||
| 588 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 589 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 590 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x); | ||
| 591 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 592 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 593 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x); | ||
| 594 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 595 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 596 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x); | ||
| 597 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 598 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 599 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x); | ||
| 600 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 601 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 602 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x); | ||
| 603 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 604 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 605 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x); | ||
| 606 | #endif | ||
| 607 | |||
| 608 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 609 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 610 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x); | ||
| 611 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 612 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 613 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x); | ||
| 614 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 615 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 616 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x); | ||
| 617 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 618 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 619 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x); | ||
| 620 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 621 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 622 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x); | ||
| 623 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 624 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 625 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x); | ||
| 626 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 627 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 628 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x); | ||
| 629 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 630 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 631 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x); | ||
| 632 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 633 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 634 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x); | ||
| 635 | |||
| 636 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 637 | * Objective-C, and `simd::log` in C++. */ | ||
| 638 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x); | ||
| 639 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 640 | * Objective-C, and `simd::log` in C++. */ | ||
| 641 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x); | ||
| 642 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 643 | * Objective-C, and `simd::log` in C++. */ | ||
| 644 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x); | ||
| 645 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 646 | * Objective-C, and `simd::log` in C++. */ | ||
| 647 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x); | ||
| 648 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 649 | * Objective-C, and `simd::log` in C++. */ | ||
| 650 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x); | ||
| 651 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 652 | * Objective-C, and `simd::log` in C++. */ | ||
| 653 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x); | ||
| 654 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 655 | * Objective-C, and `simd::log` in C++. */ | ||
| 656 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x); | ||
| 657 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 658 | * Objective-C, and `simd::log` in C++. */ | ||
| 659 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x); | ||
| 660 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 661 | * Objective-C, and `simd::log` in C++. */ | ||
| 662 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x); | ||
| 663 | |||
| 664 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 665 | * Objective-C, and `simd::log2` in C++. */ | ||
| 666 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x); | ||
| 667 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 668 | * Objective-C, and `simd::log2` in C++. */ | ||
| 669 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x); | ||
| 670 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 671 | * Objective-C, and `simd::log2` in C++. */ | ||
| 672 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x); | ||
| 673 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 674 | * Objective-C, and `simd::log2` in C++. */ | ||
| 675 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x); | ||
| 676 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 677 | * Objective-C, and `simd::log2` in C++. */ | ||
| 678 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x); | ||
| 679 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 680 | * Objective-C, and `simd::log2` in C++. */ | ||
| 681 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x); | ||
| 682 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 683 | * Objective-C, and `simd::log2` in C++. */ | ||
| 684 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x); | ||
| 685 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 686 | * Objective-C, and `simd::log2` in C++. */ | ||
| 687 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x); | ||
| 688 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 689 | * Objective-C, and `simd::log2` in C++. */ | ||
| 690 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x); | ||
| 691 | |||
| 692 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 693 | * Objective-C, and `simd::log10` in C++. */ | ||
| 694 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x); | ||
| 695 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 696 | * Objective-C, and `simd::log10` in C++. */ | ||
| 697 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x); | ||
| 698 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 699 | * Objective-C, and `simd::log10` in C++. */ | ||
| 700 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x); | ||
| 701 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 702 | * Objective-C, and `simd::log10` in C++. */ | ||
| 703 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x); | ||
| 704 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 705 | * Objective-C, and `simd::log10` in C++. */ | ||
| 706 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x); | ||
| 707 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 708 | * Objective-C, and `simd::log10` in C++. */ | ||
| 709 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x); | ||
| 710 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 711 | * Objective-C, and `simd::log10` in C++. */ | ||
| 712 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x); | ||
| 713 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 714 | * Objective-C, and `simd::log10` in C++. */ | ||
| 715 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x); | ||
| 716 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 717 | * Objective-C, and `simd::log10` in C++. */ | ||
| 718 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x); | ||
| 719 | |||
| 720 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 721 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 722 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x); | ||
| 723 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 724 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 725 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x); | ||
| 726 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 727 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 728 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x); | ||
| 729 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 730 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 731 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x); | ||
| 732 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 733 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 734 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x); | ||
| 735 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 736 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 737 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x); | ||
| 738 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 739 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 740 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x); | ||
| 741 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 742 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 743 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x); | ||
| 744 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 745 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 746 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x); | ||
| 747 | |||
| 748 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 749 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 750 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x); | ||
| 751 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 752 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 753 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x); | ||
| 754 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 755 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 756 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x); | ||
| 757 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 758 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 759 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x); | ||
| 760 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 761 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 762 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x); | ||
| 763 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 764 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 765 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x); | ||
| 766 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 767 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 768 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x); | ||
| 769 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 770 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 771 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x); | ||
| 772 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 773 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 774 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x); | ||
| 775 | |||
| 776 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 777 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 778 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x); | ||
| 779 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 780 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 781 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x); | ||
| 782 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 783 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 784 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x); | ||
| 785 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 786 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 787 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x); | ||
| 788 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 789 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 790 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x); | ||
| 791 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 792 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 793 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x); | ||
| 794 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 795 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 796 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x); | ||
| 797 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 798 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 799 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x); | ||
| 800 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 801 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 802 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x); | ||
| 803 | |||
| 804 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 805 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 806 | static inline SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x); | ||
| 807 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 808 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 809 | static inline SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x); | ||
| 810 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 811 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 812 | static inline SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x); | ||
| 813 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 814 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 815 | static inline SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x); | ||
| 816 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 817 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 818 | static inline SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x); | ||
| 819 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 820 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 821 | static inline SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x); | ||
| 822 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 823 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 824 | static inline SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x); | ||
| 825 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 826 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 827 | static inline SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x); | ||
| 828 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 829 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 830 | static inline SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x); | ||
| 831 | |||
| 832 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 833 | * Objective-C, and `simd::erf` in C++. */ | ||
| 834 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x); | ||
| 835 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 836 | * Objective-C, and `simd::erf` in C++. */ | ||
| 837 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x); | ||
| 838 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 839 | * Objective-C, and `simd::erf` in C++. */ | ||
| 840 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x); | ||
| 841 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 842 | * Objective-C, and `simd::erf` in C++. */ | ||
| 843 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x); | ||
| 844 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 845 | * Objective-C, and `simd::erf` in C++. */ | ||
| 846 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x); | ||
| 847 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 848 | * Objective-C, and `simd::erf` in C++. */ | ||
| 849 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x); | ||
| 850 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 851 | * Objective-C, and `simd::erf` in C++. */ | ||
| 852 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x); | ||
| 853 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 854 | * Objective-C, and `simd::erf` in C++. */ | ||
| 855 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x); | ||
| 856 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 857 | * Objective-C, and `simd::erf` in C++. */ | ||
| 858 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x); | ||
| 859 | |||
| 860 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 861 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 862 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x); | ||
| 863 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 864 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 865 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x); | ||
| 866 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 867 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 868 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x); | ||
| 869 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 870 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 871 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x); | ||
| 872 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 873 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 874 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x); | ||
| 875 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 876 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 877 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x); | ||
| 878 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 879 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 880 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x); | ||
| 881 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 882 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 883 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x); | ||
| 884 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 885 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 886 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x); | ||
| 887 | |||
| 888 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 889 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 890 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x); | ||
| 891 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 892 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 893 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x); | ||
| 894 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 895 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 896 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x); | ||
| 897 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 898 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 899 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x); | ||
| 900 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 901 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 902 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x); | ||
| 903 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 904 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 905 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x); | ||
| 906 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 907 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 908 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x); | ||
| 909 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 910 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 911 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x); | ||
| 912 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 913 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 914 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x); | ||
| 915 | |||
| 916 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 917 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 918 | static inline SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x); | ||
| 919 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 920 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 921 | static inline SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x); | ||
| 922 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 923 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 924 | static inline SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x); | ||
| 925 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 926 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 927 | static inline SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x); | ||
| 928 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 929 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 930 | static inline SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x); | ||
| 931 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 932 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 933 | static inline SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x); | ||
| 934 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 935 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 936 | static inline SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x); | ||
| 937 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 938 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 939 | static inline SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x); | ||
| 940 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 941 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 942 | static inline SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x); | ||
| 943 | |||
| 944 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 945 | * Objective-C, and `simd::floor` in C++. */ | ||
| 946 | static inline SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x); | ||
| 947 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 948 | * Objective-C, and `simd::floor` in C++. */ | ||
| 949 | static inline SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x); | ||
| 950 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 951 | * Objective-C, and `simd::floor` in C++. */ | ||
| 952 | static inline SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x); | ||
| 953 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 954 | * Objective-C, and `simd::floor` in C++. */ | ||
| 955 | static inline SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x); | ||
| 956 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 957 | * Objective-C, and `simd::floor` in C++. */ | ||
| 958 | static inline SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x); | ||
| 959 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 960 | * Objective-C, and `simd::floor` in C++. */ | ||
| 961 | static inline SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x); | ||
| 962 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 963 | * Objective-C, and `simd::floor` in C++. */ | ||
| 964 | static inline SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x); | ||
| 965 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 966 | * Objective-C, and `simd::floor` in C++. */ | ||
| 967 | static inline SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x); | ||
| 968 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 969 | * Objective-C, and `simd::floor` in C++. */ | ||
| 970 | static inline SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x); | ||
| 971 | |||
| 972 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 973 | * Objective-C, and `simd::rint` in C++. */ | ||
| 974 | static inline SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x); | ||
| 975 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 976 | * Objective-C, and `simd::rint` in C++. */ | ||
| 977 | static inline SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x); | ||
| 978 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 979 | * Objective-C, and `simd::rint` in C++. */ | ||
| 980 | static inline SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x); | ||
| 981 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 982 | * Objective-C, and `simd::rint` in C++. */ | ||
| 983 | static inline SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x); | ||
| 984 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 985 | * Objective-C, and `simd::rint` in C++. */ | ||
| 986 | static inline SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x); | ||
| 987 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 988 | * Objective-C, and `simd::rint` in C++. */ | ||
| 989 | static inline SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x); | ||
| 990 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 991 | * Objective-C, and `simd::rint` in C++. */ | ||
| 992 | static inline SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x); | ||
| 993 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 994 | * Objective-C, and `simd::rint` in C++. */ | ||
| 995 | static inline SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x); | ||
| 996 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 997 | * Objective-C, and `simd::rint` in C++. */ | ||
| 998 | static inline SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x); | ||
| 999 | |||
| 1000 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1001 | * Objective-C, and `simd::round` in C++. */ | ||
| 1002 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x); | ||
| 1003 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1004 | * Objective-C, and `simd::round` in C++. */ | ||
| 1005 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x); | ||
| 1006 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1007 | * Objective-C, and `simd::round` in C++. */ | ||
| 1008 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x); | ||
| 1009 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1010 | * Objective-C, and `simd::round` in C++. */ | ||
| 1011 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x); | ||
| 1012 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1013 | * Objective-C, and `simd::round` in C++. */ | ||
| 1014 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x); | ||
| 1015 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1016 | * Objective-C, and `simd::round` in C++. */ | ||
| 1017 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x); | ||
| 1018 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1019 | * Objective-C, and `simd::round` in C++. */ | ||
| 1020 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x); | ||
| 1021 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1022 | * Objective-C, and `simd::round` in C++. */ | ||
| 1023 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x); | ||
| 1024 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1025 | * Objective-C, and `simd::round` in C++. */ | ||
| 1026 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x); | ||
| 1027 | |||
| 1028 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1029 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1030 | static inline SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x); | ||
| 1031 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1032 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1033 | static inline SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x); | ||
| 1034 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1035 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1036 | static inline SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x); | ||
| 1037 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1038 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1039 | static inline SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x); | ||
| 1040 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1041 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1042 | static inline SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x); | ||
| 1043 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1044 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1045 | static inline SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x); | ||
| 1046 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1047 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1048 | static inline SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x); | ||
| 1049 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1050 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1051 | static inline SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x); | ||
| 1052 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1053 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1054 | static inline SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x); | ||
| 1055 | |||
| 1056 | |||
| 1057 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1058 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1059 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x); | ||
| 1060 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1061 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1062 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x); | ||
| 1063 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1064 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1065 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x); | ||
| 1066 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1067 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1068 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x); | ||
| 1069 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1070 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1071 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x); | ||
| 1072 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1073 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1074 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x); | ||
| 1075 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1076 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1077 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x); | ||
| 1078 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1079 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1080 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x); | ||
| 1081 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1082 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1083 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x); | ||
| 1084 | |||
| 1085 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1086 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1087 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y); | ||
| 1088 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1089 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1090 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y); | ||
| 1091 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1092 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1093 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y); | ||
| 1094 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1095 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1096 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y); | ||
| 1097 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1098 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1099 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y); | ||
| 1100 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1101 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1102 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y); | ||
| 1103 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1104 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1105 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y); | ||
| 1106 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1107 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1108 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y); | ||
| 1109 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1110 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1111 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y); | ||
| 1112 | |||
| 1113 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1114 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1115 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y); | ||
| 1116 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1117 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1118 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y); | ||
| 1119 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1120 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1121 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y); | ||
| 1122 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1123 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1124 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y); | ||
| 1125 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1126 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1127 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y); | ||
| 1128 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1129 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1130 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y); | ||
| 1131 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1132 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1133 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y); | ||
| 1134 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1135 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1136 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y); | ||
| 1137 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1138 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1139 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y); | ||
| 1140 | |||
| 1141 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1142 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1143 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y); | ||
| 1144 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1145 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1146 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y); | ||
| 1147 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1148 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1149 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y); | ||
| 1150 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1151 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1152 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y); | ||
| 1153 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1154 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1155 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y); | ||
| 1156 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1157 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1158 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y); | ||
| 1159 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1160 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1161 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y); | ||
| 1162 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1163 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1164 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y); | ||
| 1165 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1166 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1167 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y); | ||
| 1168 | |||
| 1169 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1170 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1171 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y); | ||
| 1172 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1173 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1174 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y); | ||
| 1175 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1176 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1177 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y); | ||
| 1178 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1179 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1180 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y); | ||
| 1181 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1182 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1183 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y); | ||
| 1184 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1185 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1186 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y); | ||
| 1187 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1188 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1189 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y); | ||
| 1190 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1191 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1192 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y); | ||
| 1193 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1194 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1195 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y); | ||
| 1196 | |||
| 1197 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1198 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1199 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y); | ||
| 1200 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1201 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1202 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y); | ||
| 1203 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1204 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1205 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y); | ||
| 1206 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1207 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1208 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y); | ||
| 1209 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1210 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1211 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y); | ||
| 1212 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1213 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1214 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y); | ||
| 1215 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1216 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1217 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y); | ||
| 1218 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1219 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1220 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y); | ||
| 1221 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1222 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1223 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y); | ||
| 1224 | |||
| 1225 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1226 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1227 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y); | ||
| 1228 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1229 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1230 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y); | ||
| 1231 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1232 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1233 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y); | ||
| 1234 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1235 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1236 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y); | ||
| 1237 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1238 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1239 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y); | ||
| 1240 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1241 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1242 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y); | ||
| 1243 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1244 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1245 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y); | ||
| 1246 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1247 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1248 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y); | ||
| 1249 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1250 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1251 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y); | ||
| 1252 | |||
| 1253 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1254 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1255 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y); | ||
| 1256 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1257 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1258 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y); | ||
| 1259 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1260 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1261 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y); | ||
| 1262 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1263 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1264 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y); | ||
| 1265 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1266 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1267 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y); | ||
| 1268 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1269 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1270 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y); | ||
| 1271 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1272 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1273 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y); | ||
| 1274 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1275 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1276 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y); | ||
| 1277 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1278 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1279 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y); | ||
| 1280 | |||
| 1281 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1282 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1283 | static inline SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y); | ||
| 1284 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1285 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1286 | static inline SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y); | ||
| 1287 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1288 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1289 | static inline SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y); | ||
| 1290 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1291 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1292 | static inline SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y); | ||
| 1293 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1294 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1295 | static inline SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y); | ||
| 1296 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1297 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1298 | static inline SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y); | ||
| 1299 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1300 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1301 | static inline SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y); | ||
| 1302 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1303 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1304 | static inline SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y); | ||
| 1305 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1306 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1307 | static inline SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y); | ||
| 1308 | |||
| 1309 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1310 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1311 | static inline SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y); | ||
| 1312 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1313 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1314 | static inline SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y); | ||
| 1315 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1316 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1317 | static inline SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y); | ||
| 1318 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1319 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1320 | static inline SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y); | ||
| 1321 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1322 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1323 | static inline SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y); | ||
| 1324 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1325 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1326 | static inline SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y); | ||
| 1327 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1328 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1329 | static inline SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y); | ||
| 1330 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1331 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1332 | static inline SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y); | ||
| 1333 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1334 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1335 | static inline SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y); | ||
| 1336 | |||
| 1337 | |||
| 1338 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1339 | * and `simd::fma` in C++. */ | ||
| 1340 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1341 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1342 | * and `simd::fma` in C++. */ | ||
| 1343 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1344 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1345 | * and `simd::fma` in C++. */ | ||
| 1346 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1347 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1348 | * and `simd::fma` in C++. */ | ||
| 1349 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1350 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1351 | * and `simd::fma` in C++. */ | ||
| 1352 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1353 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1354 | * and `simd::fma` in C++. */ | ||
| 1355 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1356 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1357 | * and `simd::fma` in C++. */ | ||
| 1358 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1359 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1360 | * and `simd::fma` in C++. */ | ||
| 1361 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1362 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1363 | * and `simd::fma` in C++. */ | ||
| 1364 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1365 | |||
| 1366 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1367 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1368 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z); | ||
| 1369 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1370 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1371 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1372 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1373 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1374 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1375 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1376 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1377 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1378 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1379 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1380 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1381 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1382 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1383 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1384 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1385 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1386 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z); | ||
| 1387 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1388 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1389 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1390 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1391 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1392 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1393 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1394 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1395 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1396 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1397 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1398 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1399 | |||
| 1400 | #ifdef __cplusplus | ||
| 1401 | } /* extern "C" */ | ||
| 1402 | |||
| 1403 | #include <cmath> | ||
| 1404 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1405 | static SIMD_CPPFUNC float __tg_acos(float x) { return ::acos(x); } | ||
| 1406 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1407 | static SIMD_CPPFUNC double __tg_acos(double x) { return ::acos(x); } | ||
| 1408 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1409 | static SIMD_CPPFUNC float __tg_asin(float x) { return ::asin(x); } | ||
| 1410 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1411 | static SIMD_CPPFUNC double __tg_asin(double x) { return ::asin(x); } | ||
| 1412 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1413 | static SIMD_CPPFUNC float __tg_atan(float x) { return ::atan(x); } | ||
| 1414 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1415 | static SIMD_CPPFUNC double __tg_atan(double x) { return ::atan(x); } | ||
| 1416 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1417 | static SIMD_CPPFUNC float __tg_cos(float x) { return ::cos(x); } | ||
| 1418 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1419 | static SIMD_CPPFUNC double __tg_cos(double x) { return ::cos(x); } | ||
| 1420 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1421 | static SIMD_CPPFUNC float __tg_sin(float x) { return ::sin(x); } | ||
| 1422 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1423 | static SIMD_CPPFUNC double __tg_sin(double x) { return ::sin(x); } | ||
| 1424 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1425 | static SIMD_CPPFUNC float __tg_tan(float x) { return ::tan(x); } | ||
| 1426 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1427 | static SIMD_CPPFUNC double __tg_tan(double x) { return ::tan(x); } | ||
| 1428 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1429 | static SIMD_CPPFUNC float __tg_cospi(float x) { return ::__cospi(x); } | ||
| 1430 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1431 | static SIMD_CPPFUNC double __tg_cospi(double x) { return ::__cospi(x); } | ||
| 1432 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1433 | static SIMD_CPPFUNC float __tg_sinpi(float x) { return ::__sinpi(x); } | ||
| 1434 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1435 | static SIMD_CPPFUNC double __tg_sinpi(double x) { return ::__sinpi(x); } | ||
| 1436 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1437 | static SIMD_CPPFUNC float __tg_tanpi(float x) { return ::__tanpi(x); } | ||
| 1438 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1439 | static SIMD_CPPFUNC double __tg_tanpi(double x) { return ::__tanpi(x); } | ||
| 1440 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1441 | static SIMD_CPPFUNC float __tg_acosh(float x) { return ::acosh(x); } | ||
| 1442 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1443 | static SIMD_CPPFUNC double __tg_acosh(double x) { return ::acosh(x); } | ||
| 1444 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1445 | static SIMD_CPPFUNC float __tg_asinh(float x) { return ::asinh(x); } | ||
| 1446 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1447 | static SIMD_CPPFUNC double __tg_asinh(double x) { return ::asinh(x); } | ||
| 1448 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1449 | static SIMD_CPPFUNC float __tg_atanh(float x) { return ::atanh(x); } | ||
| 1450 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1451 | static SIMD_CPPFUNC double __tg_atanh(double x) { return ::atanh(x); } | ||
| 1452 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1453 | static SIMD_CPPFUNC float __tg_cosh(float x) { return ::cosh(x); } | ||
| 1454 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1455 | static SIMD_CPPFUNC double __tg_cosh(double x) { return ::cosh(x); } | ||
| 1456 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1457 | static SIMD_CPPFUNC float __tg_sinh(float x) { return ::sinh(x); } | ||
| 1458 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1459 | static SIMD_CPPFUNC double __tg_sinh(double x) { return ::sinh(x); } | ||
| 1460 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1461 | static SIMD_CPPFUNC float __tg_tanh(float x) { return ::tanh(x); } | ||
| 1462 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1463 | static SIMD_CPPFUNC double __tg_tanh(double x) { return ::tanh(x); } | ||
| 1464 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1465 | static SIMD_CPPFUNC float __tg_exp(float x) { return ::exp(x); } | ||
| 1466 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1467 | static SIMD_CPPFUNC double __tg_exp(double x) { return ::exp(x); } | ||
| 1468 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1469 | static SIMD_CPPFUNC float __tg_exp2(float x) { return ::exp2(x); } | ||
| 1470 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1471 | static SIMD_CPPFUNC double __tg_exp2(double x) { return ::exp2(x); } | ||
| 1472 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1473 | static SIMD_CPPFUNC float __tg_exp10(float x) { return ::__exp10(x); } | ||
| 1474 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1475 | static SIMD_CPPFUNC double __tg_exp10(double x) { return ::__exp10(x); } | ||
| 1476 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1477 | static SIMD_CPPFUNC float __tg_expm1(float x) { return ::expm1(x); } | ||
| 1478 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1479 | static SIMD_CPPFUNC double __tg_expm1(double x) { return ::expm1(x); } | ||
| 1480 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1481 | static SIMD_CPPFUNC float __tg_log(float x) { return ::log(x); } | ||
| 1482 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1483 | static SIMD_CPPFUNC double __tg_log(double x) { return ::log(x); } | ||
| 1484 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1485 | static SIMD_CPPFUNC float __tg_log2(float x) { return ::log2(x); } | ||
| 1486 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1487 | static SIMD_CPPFUNC double __tg_log2(double x) { return ::log2(x); } | ||
| 1488 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1489 | static SIMD_CPPFUNC float __tg_log10(float x) { return ::log10(x); } | ||
| 1490 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1491 | static SIMD_CPPFUNC double __tg_log10(double x) { return ::log10(x); } | ||
| 1492 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1493 | static SIMD_CPPFUNC float __tg_log1p(float x) { return ::log1p(x); } | ||
| 1494 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1495 | static SIMD_CPPFUNC double __tg_log1p(double x) { return ::log1p(x); } | ||
| 1496 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1497 | static SIMD_CPPFUNC float __tg_fabs(float x) { return ::fabs(x); } | ||
| 1498 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1499 | static SIMD_CPPFUNC double __tg_fabs(double x) { return ::fabs(x); } | ||
| 1500 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1501 | static SIMD_CPPFUNC float __tg_cbrt(float x) { return ::cbrt(x); } | ||
| 1502 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1503 | static SIMD_CPPFUNC double __tg_cbrt(double x) { return ::cbrt(x); } | ||
| 1504 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1505 | static SIMD_CPPFUNC float __tg_sqrt(float x) { return ::sqrt(x); } | ||
| 1506 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1507 | static SIMD_CPPFUNC double __tg_sqrt(double x) { return ::sqrt(x); } | ||
| 1508 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1509 | static SIMD_CPPFUNC float __tg_erf(float x) { return ::erf(x); } | ||
| 1510 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1511 | static SIMD_CPPFUNC double __tg_erf(double x) { return ::erf(x); } | ||
| 1512 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1513 | static SIMD_CPPFUNC float __tg_erfc(float x) { return ::erfc(x); } | ||
| 1514 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1515 | static SIMD_CPPFUNC double __tg_erfc(double x) { return ::erfc(x); } | ||
| 1516 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1517 | static SIMD_CPPFUNC float __tg_tgamma(float x) { return ::tgamma(x); } | ||
| 1518 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1519 | static SIMD_CPPFUNC double __tg_tgamma(double x) { return ::tgamma(x); } | ||
| 1520 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1521 | static SIMD_CPPFUNC float __tg_ceil(float x) { return ::ceil(x); } | ||
| 1522 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1523 | static SIMD_CPPFUNC double __tg_ceil(double x) { return ::ceil(x); } | ||
| 1524 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1525 | static SIMD_CPPFUNC float __tg_floor(float x) { return ::floor(x); } | ||
| 1526 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1527 | static SIMD_CPPFUNC double __tg_floor(double x) { return ::floor(x); } | ||
| 1528 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1529 | static SIMD_CPPFUNC float __tg_rint(float x) { return ::rint(x); } | ||
| 1530 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1531 | static SIMD_CPPFUNC double __tg_rint(double x) { return ::rint(x); } | ||
| 1532 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1533 | static SIMD_CPPFUNC float __tg_round(float x) { return ::round(x); } | ||
| 1534 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1535 | static SIMD_CPPFUNC double __tg_round(double x) { return ::round(x); } | ||
| 1536 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1537 | static SIMD_CPPFUNC float __tg_trunc(float x) { return ::trunc(x); } | ||
| 1538 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1539 | static SIMD_CPPFUNC double __tg_trunc(double x) { return ::trunc(x); } | ||
| 1540 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1541 | static SIMD_CPPFUNC float __tg_atan2(float x, float y) { return ::atan2(x, y); } | ||
| 1542 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1543 | static SIMD_CPPFUNC double __tg_atan2(double x, float y) { return ::atan2(x, y); } | ||
| 1544 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1545 | static SIMD_CPPFUNC float __tg_hypot(float x, float y) { return ::hypot(x, y); } | ||
| 1546 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1547 | static SIMD_CPPFUNC double __tg_hypot(double x, float y) { return ::hypot(x, y); } | ||
| 1548 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1549 | static SIMD_CPPFUNC float __tg_pow(float x, float y) { return ::pow(x, y); } | ||
| 1550 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1551 | static SIMD_CPPFUNC double __tg_pow(double x, float y) { return ::pow(x, y); } | ||
| 1552 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1553 | static SIMD_CPPFUNC float __tg_fmod(float x, float y) { return ::fmod(x, y); } | ||
| 1554 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1555 | static SIMD_CPPFUNC double __tg_fmod(double x, float y) { return ::fmod(x, y); } | ||
| 1556 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1557 | * instead. */ | ||
| 1558 | static SIMD_CPPFUNC float __tg_remainder(float x, float y) { return ::remainder(x, y); } | ||
| 1559 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1560 | * instead. */ | ||
| 1561 | static SIMD_CPPFUNC double __tg_remainder(double x, float y) { return ::remainder(x, y); } | ||
| 1562 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1563 | * instead. */ | ||
| 1564 | static SIMD_CPPFUNC float __tg_copysign(float x, float y) { return ::copysign(x, y); } | ||
| 1565 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1566 | * instead. */ | ||
| 1567 | static SIMD_CPPFUNC double __tg_copysign(double x, float y) { return ::copysign(x, y); } | ||
| 1568 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1569 | * instead. */ | ||
| 1570 | static SIMD_CPPFUNC float __tg_nextafter(float x, float y) { return ::nextafter(x, y); } | ||
| 1571 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1572 | * instead. */ | ||
| 1573 | static SIMD_CPPFUNC double __tg_nextafter(double x, float y) { return ::nextafter(x, y); } | ||
| 1574 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1575 | static SIMD_CPPFUNC float __tg_fdim(float x, float y) { return ::fdim(x, y); } | ||
| 1576 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1577 | static SIMD_CPPFUNC double __tg_fdim(double x, float y) { return ::fdim(x, y); } | ||
| 1578 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1579 | static SIMD_CPPFUNC float __tg_fmax(float x, float y) { return ::fmax(x, y); } | ||
| 1580 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1581 | static SIMD_CPPFUNC double __tg_fmax(double x, float y) { return ::fmax(x, y); } | ||
| 1582 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1583 | static SIMD_CPPFUNC float __tg_fmin(float x, float y) { return ::fmin(x, y); } | ||
| 1584 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1585 | static SIMD_CPPFUNC double __tg_fmin(double x, float y) { return ::fmin(x, y); } | ||
| 1586 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1587 | static SIMD_CPPFUNC float __tg_fma(float x, float y, float z) { return ::fma(x, y, z); } | ||
| 1588 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1589 | static SIMD_CPPFUNC double __tg_fma(double x, double y, double z) { return ::fma(x, y, z); } | ||
| 1590 | |||
| 1591 | namespace simd { | ||
| 1592 | /*! @abstract Generalizes the <cmath> function acos to operate on vectors of | ||
| 1593 | * floats and doubles. */ | ||
| 1594 | template <typename fptypeN> | ||
| 1595 | static SIMD_CPPFUNC fptypeN acos(fptypeN x) { return ::__tg_acos(x); } | ||
| 1596 | |||
| 1597 | /*! @abstract Generalizes the <cmath> function asin to operate on vectors of | ||
| 1598 | * floats and doubles. */ | ||
| 1599 | template <typename fptypeN> | ||
| 1600 | static SIMD_CPPFUNC fptypeN asin(fptypeN x) { return ::__tg_asin(x); } | ||
| 1601 | |||
| 1602 | /*! @abstract Generalizes the <cmath> function atan to operate on vectors of | ||
| 1603 | * floats and doubles. */ | ||
| 1604 | template <typename fptypeN> | ||
| 1605 | static SIMD_CPPFUNC fptypeN atan(fptypeN x) { return ::__tg_atan(x); } | ||
| 1606 | |||
| 1607 | /*! @abstract Generalizes the <cmath> function cos to operate on vectors of | ||
| 1608 | * floats and doubles. */ | ||
| 1609 | template <typename fptypeN> | ||
| 1610 | static SIMD_CPPFUNC fptypeN cos(fptypeN x) { return ::__tg_cos(x); } | ||
| 1611 | |||
| 1612 | /*! @abstract Generalizes the <cmath> function sin to operate on vectors of | ||
| 1613 | * floats and doubles. */ | ||
| 1614 | template <typename fptypeN> | ||
| 1615 | static SIMD_CPPFUNC fptypeN sin(fptypeN x) { return ::__tg_sin(x); } | ||
| 1616 | |||
| 1617 | /*! @abstract Generalizes the <cmath> function tan to operate on vectors of | ||
| 1618 | * floats and doubles. */ | ||
| 1619 | template <typename fptypeN> | ||
| 1620 | static SIMD_CPPFUNC fptypeN tan(fptypeN x) { return ::__tg_tan(x); } | ||
| 1621 | |||
| 1622 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1623 | /*! @abstract Generalizes the <cmath> function cospi to operate on vectors | ||
| 1624 | * of floats and doubles. */ | ||
| 1625 | template <typename fptypeN> | ||
| 1626 | static SIMD_CPPFUNC fptypeN cospi(fptypeN x) { return ::__tg_cospi(x); } | ||
| 1627 | #endif | ||
| 1628 | |||
| 1629 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1630 | /*! @abstract Generalizes the <cmath> function sinpi to operate on vectors | ||
| 1631 | * of floats and doubles. */ | ||
| 1632 | template <typename fptypeN> | ||
| 1633 | static SIMD_CPPFUNC fptypeN sinpi(fptypeN x) { return ::__tg_sinpi(x); } | ||
| 1634 | #endif | ||
| 1635 | |||
| 1636 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1637 | /*! @abstract Generalizes the <cmath> function tanpi to operate on vectors | ||
| 1638 | * of floats and doubles. */ | ||
| 1639 | template <typename fptypeN> | ||
| 1640 | static SIMD_CPPFUNC fptypeN tanpi(fptypeN x) { return ::__tg_tanpi(x); } | ||
| 1641 | #endif | ||
| 1642 | |||
| 1643 | /*! @abstract Generalizes the <cmath> function acosh to operate on vectors | ||
| 1644 | * of floats and doubles. */ | ||
| 1645 | template <typename fptypeN> | ||
| 1646 | static SIMD_CPPFUNC fptypeN acosh(fptypeN x) { return ::__tg_acosh(x); } | ||
| 1647 | |||
| 1648 | /*! @abstract Generalizes the <cmath> function asinh to operate on vectors | ||
| 1649 | * of floats and doubles. */ | ||
| 1650 | template <typename fptypeN> | ||
| 1651 | static SIMD_CPPFUNC fptypeN asinh(fptypeN x) { return ::__tg_asinh(x); } | ||
| 1652 | |||
| 1653 | /*! @abstract Generalizes the <cmath> function atanh to operate on vectors | ||
| 1654 | * of floats and doubles. */ | ||
| 1655 | template <typename fptypeN> | ||
| 1656 | static SIMD_CPPFUNC fptypeN atanh(fptypeN x) { return ::__tg_atanh(x); } | ||
| 1657 | |||
| 1658 | /*! @abstract Generalizes the <cmath> function cosh to operate on vectors of | ||
| 1659 | * floats and doubles. */ | ||
| 1660 | template <typename fptypeN> | ||
| 1661 | static SIMD_CPPFUNC fptypeN cosh(fptypeN x) { return ::__tg_cosh(x); } | ||
| 1662 | |||
| 1663 | /*! @abstract Generalizes the <cmath> function sinh to operate on vectors of | ||
| 1664 | * floats and doubles. */ | ||
| 1665 | template <typename fptypeN> | ||
| 1666 | static SIMD_CPPFUNC fptypeN sinh(fptypeN x) { return ::__tg_sinh(x); } | ||
| 1667 | |||
| 1668 | /*! @abstract Generalizes the <cmath> function tanh to operate on vectors of | ||
| 1669 | * floats and doubles. */ | ||
| 1670 | template <typename fptypeN> | ||
| 1671 | static SIMD_CPPFUNC fptypeN tanh(fptypeN x) { return ::__tg_tanh(x); } | ||
| 1672 | |||
| 1673 | /*! @abstract Generalizes the <cmath> function exp to operate on vectors of | ||
| 1674 | * floats and doubles. */ | ||
| 1675 | template <typename fptypeN> | ||
| 1676 | static SIMD_CPPFUNC fptypeN exp(fptypeN x) { return ::__tg_exp(x); } | ||
| 1677 | |||
| 1678 | /*! @abstract Generalizes the <cmath> function exp2 to operate on vectors of | ||
| 1679 | * floats and doubles. */ | ||
| 1680 | template <typename fptypeN> | ||
| 1681 | static SIMD_CPPFUNC fptypeN exp2(fptypeN x) { return ::__tg_exp2(x); } | ||
| 1682 | |||
| 1683 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1684 | /*! @abstract Generalizes the <cmath> function exp10 to operate on vectors | ||
| 1685 | * of floats and doubles. */ | ||
| 1686 | template <typename fptypeN> | ||
| 1687 | static SIMD_CPPFUNC fptypeN exp10(fptypeN x) { return ::__tg_exp10(x); } | ||
| 1688 | #endif | ||
| 1689 | |||
| 1690 | /*! @abstract Generalizes the <cmath> function expm1 to operate on vectors | ||
| 1691 | * of floats and doubles. */ | ||
| 1692 | template <typename fptypeN> | ||
| 1693 | static SIMD_CPPFUNC fptypeN expm1(fptypeN x) { return ::__tg_expm1(x); } | ||
| 1694 | |||
| 1695 | /*! @abstract Generalizes the <cmath> function log to operate on vectors of | ||
| 1696 | * floats and doubles. */ | ||
| 1697 | template <typename fptypeN> | ||
| 1698 | static SIMD_CPPFUNC fptypeN log(fptypeN x) { return ::__tg_log(x); } | ||
| 1699 | |||
| 1700 | /*! @abstract Generalizes the <cmath> function log2 to operate on vectors of | ||
| 1701 | * floats and doubles. */ | ||
| 1702 | template <typename fptypeN> | ||
| 1703 | static SIMD_CPPFUNC fptypeN log2(fptypeN x) { return ::__tg_log2(x); } | ||
| 1704 | |||
| 1705 | /*! @abstract Generalizes the <cmath> function log10 to operate on vectors | ||
| 1706 | * of floats and doubles. */ | ||
| 1707 | template <typename fptypeN> | ||
| 1708 | static SIMD_CPPFUNC fptypeN log10(fptypeN x) { return ::__tg_log10(x); } | ||
| 1709 | |||
| 1710 | /*! @abstract Generalizes the <cmath> function log1p to operate on vectors | ||
| 1711 | * of floats and doubles. */ | ||
| 1712 | template <typename fptypeN> | ||
| 1713 | static SIMD_CPPFUNC fptypeN log1p(fptypeN x) { return ::__tg_log1p(x); } | ||
| 1714 | |||
| 1715 | /*! @abstract Generalizes the <cmath> function fabs to operate on vectors of | ||
| 1716 | * floats and doubles. */ | ||
| 1717 | template <typename fptypeN> | ||
| 1718 | static SIMD_CPPFUNC fptypeN fabs(fptypeN x) { return ::__tg_fabs(x); } | ||
| 1719 | |||
| 1720 | /*! @abstract Generalizes the <cmath> function cbrt to operate on vectors of | ||
| 1721 | * floats and doubles. */ | ||
| 1722 | template <typename fptypeN> | ||
| 1723 | static SIMD_CPPFUNC fptypeN cbrt(fptypeN x) { return ::__tg_cbrt(x); } | ||
| 1724 | |||
| 1725 | /*! @abstract Generalizes the <cmath> function sqrt to operate on vectors of | ||
| 1726 | * floats and doubles. */ | ||
| 1727 | template <typename fptypeN> | ||
| 1728 | static SIMD_CPPFUNC fptypeN sqrt(fptypeN x) { return ::__tg_sqrt(x); } | ||
| 1729 | |||
| 1730 | /*! @abstract Generalizes the <cmath> function erf to operate on vectors of | ||
| 1731 | * floats and doubles. */ | ||
| 1732 | template <typename fptypeN> | ||
| 1733 | static SIMD_CPPFUNC fptypeN erf(fptypeN x) { return ::__tg_erf(x); } | ||
| 1734 | |||
| 1735 | /*! @abstract Generalizes the <cmath> function erfc to operate on vectors of | ||
| 1736 | * floats and doubles. */ | ||
| 1737 | template <typename fptypeN> | ||
| 1738 | static SIMD_CPPFUNC fptypeN erfc(fptypeN x) { return ::__tg_erfc(x); } | ||
| 1739 | |||
| 1740 | /*! @abstract Generalizes the <cmath> function tgamma to operate on vectors | ||
| 1741 | * of floats and doubles. */ | ||
| 1742 | template <typename fptypeN> | ||
| 1743 | static SIMD_CPPFUNC fptypeN tgamma(fptypeN x) { return ::__tg_tgamma(x); } | ||
| 1744 | |||
| 1745 | /*! @abstract Generalizes the <cmath> function ceil to operate on vectors of | ||
| 1746 | * floats and doubles. */ | ||
| 1747 | template <typename fptypeN> | ||
| 1748 | static SIMD_CPPFUNC fptypeN ceil(fptypeN x) { return ::__tg_ceil(x); } | ||
| 1749 | |||
| 1750 | /*! @abstract Generalizes the <cmath> function floor to operate on vectors | ||
| 1751 | * of floats and doubles. */ | ||
| 1752 | template <typename fptypeN> | ||
| 1753 | static SIMD_CPPFUNC fptypeN floor(fptypeN x) { return ::__tg_floor(x); } | ||
| 1754 | |||
| 1755 | /*! @abstract Generalizes the <cmath> function rint to operate on vectors of | ||
| 1756 | * floats and doubles. */ | ||
| 1757 | template <typename fptypeN> | ||
| 1758 | static SIMD_CPPFUNC fptypeN rint(fptypeN x) { return ::__tg_rint(x); } | ||
| 1759 | |||
| 1760 | /*! @abstract Generalizes the <cmath> function round to operate on vectors | ||
| 1761 | * of floats and doubles. */ | ||
| 1762 | template <typename fptypeN> | ||
| 1763 | static SIMD_CPPFUNC fptypeN round(fptypeN x) { return ::__tg_round(x); } | ||
| 1764 | |||
| 1765 | /*! @abstract Generalizes the <cmath> function trunc to operate on vectors | ||
| 1766 | * of floats and doubles. */ | ||
| 1767 | template <typename fptypeN> | ||
| 1768 | static SIMD_CPPFUNC fptypeN trunc(fptypeN x) { return ::__tg_trunc(x); } | ||
| 1769 | |||
| 1770 | /*! @abstract Generalizes the <cmath> function atan2 to operate on vectors | ||
| 1771 | * of floats and doubles. */ | ||
| 1772 | template <typename fptypeN> | ||
| 1773 | static SIMD_CPPFUNC fptypeN atan2(fptypeN y, fptypeN x) { return ::__tg_atan2(y, x); } | ||
| 1774 | |||
| 1775 | /*! @abstract Generalizes the <cmath> function hypot to operate on vectors | ||
| 1776 | * of floats and doubles. */ | ||
| 1777 | template <typename fptypeN> | ||
| 1778 | static SIMD_CPPFUNC fptypeN hypot(fptypeN x, fptypeN y) { return ::__tg_hypot(x, y); } | ||
| 1779 | |||
| 1780 | /*! @abstract Generalizes the <cmath> function pow to operate on vectors of | ||
| 1781 | * floats and doubles. */ | ||
| 1782 | template <typename fptypeN> | ||
| 1783 | static SIMD_CPPFUNC fptypeN pow(fptypeN x, fptypeN y) { return ::__tg_pow(x, y); } | ||
| 1784 | |||
| 1785 | /*! @abstract Generalizes the <cmath> function fmod to operate on vectors of | ||
| 1786 | * floats and doubles. */ | ||
| 1787 | template <typename fptypeN> | ||
| 1788 | static SIMD_CPPFUNC fptypeN fmod(fptypeN x, fptypeN y) { return ::__tg_fmod(x, y); } | ||
| 1789 | |||
| 1790 | /*! @abstract Generalizes the <cmath> function remainder to operate on | ||
| 1791 | * vectors of floats and doubles. */ | ||
| 1792 | template <typename fptypeN> | ||
| 1793 | static SIMD_CPPFUNC fptypeN remainder(fptypeN x, fptypeN y) { return ::__tg_remainder(x, y); } | ||
| 1794 | |||
| 1795 | /*! @abstract Generalizes the <cmath> function copysign to operate on | ||
| 1796 | * vectors of floats and doubles. */ | ||
| 1797 | template <typename fptypeN> | ||
| 1798 | static SIMD_CPPFUNC fptypeN copysign(fptypeN x, fptypeN y) { return ::__tg_copysign(x, y); } | ||
| 1799 | |||
| 1800 | /*! @abstract Generalizes the <cmath> function nextafter to operate on | ||
| 1801 | * vectors of floats and doubles. */ | ||
| 1802 | template <typename fptypeN> | ||
| 1803 | static SIMD_CPPFUNC fptypeN nextafter(fptypeN x, fptypeN y) { return ::__tg_nextafter(x, y); } | ||
| 1804 | |||
| 1805 | /*! @abstract Generalizes the <cmath> function fdim to operate on vectors of | ||
| 1806 | * floats and doubles. */ | ||
| 1807 | template <typename fptypeN> | ||
| 1808 | static SIMD_CPPFUNC fptypeN fdim(fptypeN x, fptypeN y) { return ::__tg_fdim(x, y); } | ||
| 1809 | |||
| 1810 | /*! @abstract Generalizes the <cmath> function fmax to operate on vectors of | ||
| 1811 | * floats and doubles. */ | ||
| 1812 | template <typename fptypeN> | ||
| 1813 | static SIMD_CPPFUNC fptypeN fmax(fptypeN x, fptypeN y) { return ::__tg_fmax(x, y); } | ||
| 1814 | |||
| 1815 | /*! @abstract Generalizes the <cmath> function fmin to operate on vectors of | ||
| 1816 | * floats and doubles. */ | ||
| 1817 | template <typename fptypeN> | ||
| 1818 | static SIMD_CPPFUNC fptypeN fmin(fptypeN x, fptypeN y) { return ::__tg_fmin(x, y); } | ||
| 1819 | |||
| 1820 | /*! @abstract Generalizes the <cmath> function fma to operate on vectors of | ||
| 1821 | * floats and doubles. */ | ||
| 1822 | template <typename fptypeN> | ||
| 1823 | static SIMD_CPPFUNC fptypeN fma(fptypeN x, fptypeN y, fptypeN z) { return ::__tg_fma(x, y, z); } | ||
| 1824 | |||
| 1825 | /*! @abstract Computes x*y + z by the most efficient means available; either | ||
| 1826 | * a fused multiply add or separate multiply and add. */ | ||
| 1827 | template <typename fptypeN> | ||
| 1828 | static SIMD_CPPFUNC fptypeN muladd(fptypeN x, fptypeN y, fptypeN z) { return ::simd_muladd(x, y, z); } | ||
| 1829 | }; | ||
| 1830 | |||
| 1831 | extern "C" { | ||
| 1832 | #else | ||
| 1833 | #include <tgmath.h> | ||
| 1834 | /* C and Objective-C, we need some infrastructure to piggyback on tgmath.h */ | ||
| 1835 | static SIMD_OVERLOAD simd_float2 __tg_promote(simd_float2); | ||
| 1836 | static SIMD_OVERLOAD simd_float3 __tg_promote(simd_float3); | ||
| 1837 | static SIMD_OVERLOAD simd_float4 __tg_promote(simd_float4); | ||
| 1838 | static SIMD_OVERLOAD simd_float8 __tg_promote(simd_float8); | ||
| 1839 | static SIMD_OVERLOAD simd_float16 __tg_promote(simd_float16); | ||
| 1840 | static SIMD_OVERLOAD simd_double2 __tg_promote(simd_double2); | ||
| 1841 | static SIMD_OVERLOAD simd_double3 __tg_promote(simd_double3); | ||
| 1842 | static SIMD_OVERLOAD simd_double4 __tg_promote(simd_double4); | ||
| 1843 | static SIMD_OVERLOAD simd_double8 __tg_promote(simd_double8); | ||
| 1844 | |||
| 1845 | /* Apple extensions to <math.h>, added in macOS 10.9 and iOS 7.0 */ | ||
| 1846 | #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 || \ | ||
| 1847 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || \ | ||
| 1848 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 | ||
| 1849 | static inline SIMD_CFUNC float __tg_cospi(float x) { return __cospif(x); } | ||
| 1850 | static inline SIMD_CFUNC double __tg_cospi(double x) { return __cospi(x); } | ||
| 1851 | #undef cospi | ||
| 1852 | /*! @abstract `cospi(x)` computes `cos(pi * x)` without intermediate rounding. | ||
| 1853 | * | ||
| 1854 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 1855 | * calling `cos`. Defined for `float` and `double` as well as vectors of | ||
| 1856 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 1857 | #define cospi(__x) __tg_cospi(__tg_promote1((__x))(__x)) | ||
| 1858 | |||
| 1859 | static inline SIMD_CFUNC float __tg_sinpi(float x) { return __sinpif(x); } | ||
| 1860 | static inline SIMD_CFUNC double __tg_sinpi(double x) { return __sinpi(x); } | ||
| 1861 | #undef sinpi | ||
| 1862 | /*! @abstract `sinpi(x)` computes `sin(pi * x)` without intermediate rounding. | ||
| 1863 | * | ||
| 1864 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 1865 | * calling `sin`. Defined for `float` and `double` as well as vectors | ||
| 1866 | * of floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 1867 | #define sinpi(__x) __tg_sinpi(__tg_promote1((__x))(__x)) | ||
| 1868 | |||
| 1869 | static inline SIMD_CFUNC float __tg_tanpi(float x) { return __tanpif(x); } | ||
| 1870 | static inline SIMD_CFUNC double __tg_tanpi(double x) { return __tanpi(x); } | ||
| 1871 | #undef tanpi | ||
| 1872 | /*! @abstract `tanpi(x)` computes `tan(pi * x)` without intermediate rounding. | ||
| 1873 | * | ||
| 1874 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 1875 | * calling `tan`. Defined for `float` and `double` as well as vectors of | ||
| 1876 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 1877 | #define tanpi(__x) __tg_tanpi(__tg_promote1((__x))(__x)) | ||
| 1878 | |||
| 1879 | static inline SIMD_CFUNC float __tg_exp10(float x) { return __exp10f(x); } | ||
| 1880 | static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); } | ||
| 1881 | #undef exp10 | ||
| 1882 | /*! @abstract `exp10(x)` computes `10**x` more efficiently and accurately | ||
| 1883 | * than `pow(10, x)`. | ||
| 1884 | * | ||
| 1885 | * @discussion Defined for `float` and `double` as well as vectors of floats | ||
| 1886 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 1887 | #define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x)) | ||
| 1888 | #endif | ||
| 1889 | |||
| 1890 | |||
| 1891 | #endif /* !__cplusplus */ | ||
| 1892 | |||
| 1893 | #pragma mark - fabs implementation | ||
| 1894 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 1895 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 1896 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 1897 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 1898 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 1899 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 1900 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 1901 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 1902 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 1903 | |||
| 1904 | #pragma mark - fmin, fmax implementation | ||
| 1905 | static SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y) { | ||
| 1906 | #if defined __SSE2__ | ||
| 1907 | return simd_make_float2(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 1908 | #elif defined __arm64__ | ||
| 1909 | return vminnm_f32(x, y); | ||
| 1910 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 1911 | return vmin_f32(x, y); | ||
| 1912 | #else | ||
| 1913 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 1914 | #endif | ||
| 1915 | } | ||
| 1916 | |||
| 1917 | static SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y) { | ||
| 1918 | return simd_make_float3(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 1919 | } | ||
| 1920 | |||
| 1921 | static SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y) { | ||
| 1922 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 1923 | return _mm_range_ps(x, y, 4); | ||
| 1924 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 1925 | return _mm_min_ps(x, y); | ||
| 1926 | #elif defined __SSE2__ | ||
| 1927 | return simd_bitselect(_mm_min_ps(x, y), x, y != y); | ||
| 1928 | #elif defined __arm64__ | ||
| 1929 | return vminnmq_f32(x, y); | ||
| 1930 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 1931 | return vminq_f32(x, y); | ||
| 1932 | #else | ||
| 1933 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 1934 | #endif | ||
| 1935 | } | ||
| 1936 | |||
| 1937 | static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) { | ||
| 1938 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 1939 | return _mm256_range_ps(x, y, 4); | ||
| 1940 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 1941 | return _mm256_min_ps(x, y); | ||
| 1942 | #elif defined __AVX__ | ||
| 1943 | return simd_bitselect(_mm256_min_ps(x, y), x, y != y); | ||
| 1944 | #else | ||
| 1945 | return simd_make_float8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 1946 | #endif | ||
| 1947 | } | ||
| 1948 | |||
| 1949 | static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) { | ||
| 1950 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 1951 | return _mm512_range_ps(x, y, 4); | ||
| 1952 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 1953 | return _mm512_min_ps(x, y); | ||
| 1954 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 1955 | return simd_bitselect(_mm512_min_ps(x, y), x, y != y); | ||
| 1956 | #else | ||
| 1957 | return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 1958 | #endif | ||
| 1959 | } | ||
| 1960 | |||
| 1961 | static SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y) { | ||
| 1962 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 1963 | return _mm_range_pd(x, y, 4); | ||
| 1964 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 1965 | return _mm_min_pd(x, y); | ||
| 1966 | #elif defined __SSE2__ | ||
| 1967 | return simd_bitselect(_mm_min_pd(x, y), x, y != y); | ||
| 1968 | #elif defined __arm64__ | ||
| 1969 | return vminnmq_f64(x, y); | ||
| 1970 | #else | ||
| 1971 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 1972 | #endif | ||
| 1973 | } | ||
| 1974 | |||
| 1975 | static SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y) { | ||
| 1976 | return simd_make_double3(__tg_fmin(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 1977 | } | ||
| 1978 | |||
| 1979 | static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) { | ||
| 1980 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 1981 | return _mm256_range_pd(x, y, 4); | ||
| 1982 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 1983 | return _mm256_min_pd(x, y); | ||
| 1984 | #elif defined __AVX__ | ||
| 1985 | return simd_bitselect(_mm256_min_pd(x, y), x, y != y); | ||
| 1986 | #else | ||
| 1987 | return simd_make_double4(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 1988 | #endif | ||
| 1989 | } | ||
| 1990 | |||
| 1991 | static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) { | ||
| 1992 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 1993 | return _mm512_range_pd(x, y, 4); | ||
| 1994 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 1995 | return _mm512_min_pd(x, y); | ||
| 1996 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 1997 | return simd_bitselect(_mm512_min_pd(x, y), x, y != y); | ||
| 1998 | #else | ||
| 1999 | return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2000 | #endif | ||
| 2001 | } | ||
| 2002 | |||
| 2003 | static SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y) { | ||
| 2004 | #if defined __SSE2__ | ||
| 2005 | return simd_make_float2(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2006 | #elif defined __arm64__ | ||
| 2007 | return vmaxnm_f32(x, y); | ||
| 2008 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2009 | return vmax_f32(x, y); | ||
| 2010 | #else | ||
| 2011 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2012 | #endif | ||
| 2013 | } | ||
| 2014 | |||
| 2015 | static SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y) { | ||
| 2016 | return simd_make_float3(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2017 | } | ||
| 2018 | |||
| 2019 | static SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y) { | ||
| 2020 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2021 | return _mm_range_ps(x, y, 5); | ||
| 2022 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2023 | return _mm_max_ps(x, y); | ||
| 2024 | #elif defined __SSE2__ | ||
| 2025 | return simd_bitselect(_mm_max_ps(x, y), x, y != y); | ||
| 2026 | #elif defined __arm64__ | ||
| 2027 | return vmaxnmq_f32(x, y); | ||
| 2028 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2029 | return vmaxq_f32(x, y); | ||
| 2030 | #else | ||
| 2031 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2032 | #endif | ||
| 2033 | } | ||
| 2034 | |||
| 2035 | static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) { | ||
| 2036 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2037 | return _mm256_range_ps(x, y, 5); | ||
| 2038 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2039 | return _mm256_max_ps(x, y); | ||
| 2040 | #elif defined __AVX__ | ||
| 2041 | return simd_bitselect(_mm256_max_ps(x, y), x, y != y); | ||
| 2042 | #else | ||
| 2043 | return simd_make_float8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2044 | #endif | ||
| 2045 | } | ||
| 2046 | |||
| 2047 | static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) { | ||
| 2048 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 2049 | return _mm512_range_ps(x, y, 5); | ||
| 2050 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2051 | return _mm512_max_ps(x, y); | ||
| 2052 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2053 | return simd_bitselect(_mm512_max_ps(x, y), x, y != y); | ||
| 2054 | #else | ||
| 2055 | return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2056 | #endif | ||
| 2057 | } | ||
| 2058 | |||
| 2059 | static SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y) { | ||
| 2060 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2061 | return _mm_range_pd(x, y, 5); | ||
| 2062 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2063 | return _mm_max_pd(x, y); | ||
| 2064 | #elif defined __SSE2__ | ||
| 2065 | return simd_bitselect(_mm_max_pd(x, y), x, y != y); | ||
| 2066 | #elif defined __arm64__ | ||
| 2067 | return vmaxnmq_f64(x, y); | ||
| 2068 | #else | ||
| 2069 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2070 | #endif | ||
| 2071 | } | ||
| 2072 | |||
| 2073 | static SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y) { | ||
| 2074 | return simd_make_double3(__tg_fmax(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 2075 | } | ||
| 2076 | |||
| 2077 | static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) { | ||
| 2078 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2079 | return _mm256_range_pd(x, y, 5); | ||
| 2080 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2081 | return _mm256_max_pd(x, y); | ||
| 2082 | #elif defined __AVX__ | ||
| 2083 | return simd_bitselect(_mm256_max_pd(x, y), x, y != y); | ||
| 2084 | #else | ||
| 2085 | return simd_make_double4(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2086 | #endif | ||
| 2087 | } | ||
| 2088 | |||
| 2089 | static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) { | ||
| 2090 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 2091 | return _mm512_range_pd(x, y, 5); | ||
| 2092 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2093 | return _mm512_max_pd(x, y); | ||
| 2094 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2095 | return simd_bitselect(_mm512_max_pd(x, y), x, y != y); | ||
| 2096 | #else | ||
| 2097 | return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2098 | #endif | ||
| 2099 | } | ||
| 2100 | |||
| 2101 | #pragma mark - copysign implementation | ||
| 2102 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2103 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2104 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2105 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2106 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2107 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2108 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2109 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2110 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2111 | |||
| 2112 | #pragma mark - sqrt implementation | ||
| 2113 | static SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x) { | ||
| 2114 | #if defined __SSE2__ | ||
| 2115 | return simd_make_float2(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2116 | #elif defined __arm64__ | ||
| 2117 | return vsqrt_f32(x); | ||
| 2118 | #else | ||
| 2119 | return simd_make_float2(sqrt(x.x), sqrt(x.y)); | ||
| 2120 | #endif | ||
| 2121 | } | ||
| 2122 | |||
| 2123 | static SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x) { | ||
| 2124 | return simd_make_float3(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2125 | } | ||
| 2126 | |||
| 2127 | static SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x) { | ||
| 2128 | #if defined __SSE2__ | ||
| 2129 | return _mm_sqrt_ps(x); | ||
| 2130 | #elif defined __arm64__ | ||
| 2131 | return vsqrtq_f32(x); | ||
| 2132 | #else | ||
| 2133 | return simd_make_float4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2134 | #endif | ||
| 2135 | } | ||
| 2136 | |||
| 2137 | static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) { | ||
| 2138 | #if defined __AVX__ | ||
| 2139 | return _mm256_sqrt_ps(x); | ||
| 2140 | #else | ||
| 2141 | return simd_make_float8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2142 | #endif | ||
| 2143 | } | ||
| 2144 | |||
| 2145 | static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) { | ||
| 2146 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2147 | return _mm512_sqrt_ps(x); | ||
| 2148 | #else | ||
| 2149 | return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2150 | #endif | ||
| 2151 | } | ||
| 2152 | |||
| 2153 | static SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x) { | ||
| 2154 | #if defined __SSE2__ | ||
| 2155 | return _mm_sqrt_pd(x); | ||
| 2156 | #elif defined __arm64__ | ||
| 2157 | return vsqrtq_f64(x); | ||
| 2158 | #else | ||
| 2159 | return simd_make_double2(sqrt(x.x), sqrt(x.y)); | ||
| 2160 | #endif | ||
| 2161 | } | ||
| 2162 | |||
| 2163 | static SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x) { | ||
| 2164 | return simd_make_double3(__tg_sqrt(simd_make_double4_undef(x))); | ||
| 2165 | } | ||
| 2166 | |||
| 2167 | static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) { | ||
| 2168 | #if defined __AVX__ | ||
| 2169 | return _mm256_sqrt_pd(x); | ||
| 2170 | #else | ||
| 2171 | return simd_make_double4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2172 | #endif | ||
| 2173 | } | ||
| 2174 | |||
| 2175 | static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) { | ||
| 2176 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2177 | return _mm512_sqrt_pd(x); | ||
| 2178 | #else | ||
| 2179 | return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2180 | #endif | ||
| 2181 | } | ||
| 2182 | |||
| 2183 | #pragma mark - ceil, floor, rint, trunc implementation | ||
| 2184 | static SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x) { | ||
| 2185 | #if defined __arm64__ | ||
| 2186 | return vrndp_f32(x); | ||
| 2187 | #else | ||
| 2188 | return simd_make_float2(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2189 | #endif | ||
| 2190 | } | ||
| 2191 | |||
| 2192 | static SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x) { | ||
| 2193 | return simd_make_float3(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2194 | } | ||
| 2195 | |||
| 2196 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2197 | extern simd_float4 _simd_ceil_f4(simd_float4 x); | ||
| 2198 | #endif | ||
| 2199 | |||
| 2200 | static SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x) { | ||
| 2201 | #if defined __SSE4_1__ | ||
| 2202 | return _mm_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2203 | #elif defined __arm64__ | ||
| 2204 | return vrndpq_f32(x); | ||
| 2205 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2206 | return _simd_ceil_f4(x); | ||
| 2207 | #else | ||
| 2208 | simd_float4 truncated = __tg_trunc(x); | ||
| 2209 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated < x); | ||
| 2210 | return __tg_copysign(truncated + adjust, x); | ||
| 2211 | #endif | ||
| 2212 | } | ||
| 2213 | |||
| 2214 | static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) { | ||
| 2215 | #if defined __AVX__ | ||
| 2216 | return _mm256_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2217 | #else | ||
| 2218 | return simd_make_float8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2219 | #endif | ||
| 2220 | } | ||
| 2221 | |||
| 2222 | static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) { | ||
| 2223 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2224 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2225 | #else | ||
| 2226 | return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2227 | #endif | ||
| 2228 | } | ||
| 2229 | |||
| 2230 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2231 | extern simd_double2 _simd_ceil_d2(simd_double2 x); | ||
| 2232 | #endif | ||
| 2233 | |||
| 2234 | static SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x) { | ||
| 2235 | #if defined __SSE4_1__ | ||
| 2236 | return _mm_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2237 | #elif defined __arm64__ | ||
| 2238 | return vrndpq_f64(x); | ||
| 2239 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2240 | return _simd_ceil_d2(x); | ||
| 2241 | #else | ||
| 2242 | simd_double2 truncated = __tg_trunc(x); | ||
| 2243 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated < x); | ||
| 2244 | return __tg_copysign(truncated + adjust, x); | ||
| 2245 | #endif | ||
| 2246 | } | ||
| 2247 | |||
| 2248 | static SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x) { | ||
| 2249 | return simd_make_double3(__tg_ceil(simd_make_double4_undef(x))); | ||
| 2250 | } | ||
| 2251 | |||
| 2252 | static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) { | ||
| 2253 | #if defined __AVX__ | ||
| 2254 | return _mm256_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2255 | #else | ||
| 2256 | return simd_make_double4(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2257 | #endif | ||
| 2258 | } | ||
| 2259 | |||
| 2260 | static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) { | ||
| 2261 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2262 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2263 | #else | ||
| 2264 | return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2265 | #endif | ||
| 2266 | } | ||
| 2267 | |||
| 2268 | static SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x) { | ||
| 2269 | #if defined __arm64__ | ||
| 2270 | return vrndm_f32(x); | ||
| 2271 | #else | ||
| 2272 | return simd_make_float2(__tg_floor(simd_make_float4_undef(x))); | ||
| 2273 | #endif | ||
| 2274 | } | ||
| 2275 | |||
| 2276 | static SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x) { | ||
| 2277 | return simd_make_float3(__tg_floor(simd_make_float4_undef(x))); | ||
| 2278 | } | ||
| 2279 | |||
| 2280 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2281 | extern simd_float4 _simd_floor_f4(simd_float4 x); | ||
| 2282 | #endif | ||
| 2283 | |||
| 2284 | static SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x) { | ||
| 2285 | #if defined __SSE4_1__ | ||
| 2286 | return _mm_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2287 | #elif defined __arm64__ | ||
| 2288 | return vrndmq_f32(x); | ||
| 2289 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2290 | return _simd_floor_f4(x); | ||
| 2291 | #else | ||
| 2292 | simd_float4 truncated = __tg_trunc(x); | ||
| 2293 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated > x); | ||
| 2294 | return truncated - adjust; | ||
| 2295 | #endif | ||
| 2296 | } | ||
| 2297 | |||
| 2298 | static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) { | ||
| 2299 | #if defined __AVX__ | ||
| 2300 | return _mm256_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2301 | #else | ||
| 2302 | return simd_make_float8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2303 | #endif | ||
| 2304 | } | ||
| 2305 | |||
| 2306 | static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) { | ||
| 2307 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2308 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2309 | #else | ||
| 2310 | return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2311 | #endif | ||
| 2312 | } | ||
| 2313 | |||
| 2314 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2315 | extern simd_double2 _simd_floor_d2(simd_double2 x); | ||
| 2316 | #endif | ||
| 2317 | |||
| 2318 | static SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x) { | ||
| 2319 | #if defined __SSE4_1__ | ||
| 2320 | return _mm_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2321 | #elif defined __arm64__ | ||
| 2322 | return vrndmq_f64(x); | ||
| 2323 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2324 | return _simd_floor_d2(x); | ||
| 2325 | #else | ||
| 2326 | simd_double2 truncated = __tg_trunc(x); | ||
| 2327 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated > x); | ||
| 2328 | return truncated - adjust; | ||
| 2329 | #endif | ||
| 2330 | } | ||
| 2331 | |||
| 2332 | static SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x) { | ||
| 2333 | return simd_make_double3(__tg_floor(simd_make_double4_undef(x))); | ||
| 2334 | } | ||
| 2335 | |||
| 2336 | static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) { | ||
| 2337 | #if defined __AVX__ | ||
| 2338 | return _mm256_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2339 | #else | ||
| 2340 | return simd_make_double4(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2341 | #endif | ||
| 2342 | } | ||
| 2343 | |||
| 2344 | static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) { | ||
| 2345 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2346 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2347 | #else | ||
| 2348 | return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2349 | #endif | ||
| 2350 | } | ||
| 2351 | |||
| 2352 | static SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x) { | ||
| 2353 | #if defined __arm64__ | ||
| 2354 | return vrndx_f32(x); | ||
| 2355 | #else | ||
| 2356 | return simd_make_float2(__tg_rint(simd_make_float4_undef(x))); | ||
| 2357 | #endif | ||
| 2358 | } | ||
| 2359 | |||
| 2360 | static SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x) { | ||
| 2361 | return simd_make_float3(__tg_rint(simd_make_float4_undef(x))); | ||
| 2362 | } | ||
| 2363 | |||
| 2364 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2365 | extern simd_float4 _simd_rint_f4(simd_float4 x); | ||
| 2366 | #endif | ||
| 2367 | |||
| 2368 | static SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x) { | ||
| 2369 | #if defined __SSE4_1__ | ||
| 2370 | return _mm_round_ps(x, _MM_FROUND_RINT); | ||
| 2371 | #elif defined __arm64__ | ||
| 2372 | return vrndxq_f32(x); | ||
| 2373 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2374 | return _simd_rint_f4(x); | ||
| 2375 | #else | ||
| 2376 | simd_float4 magic = __tg_copysign(0x1.0p23, x); | ||
| 2377 | simd_int4 x_is_small = __tg_fabs(x) < 0x1.0p23; | ||
| 2378 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffff); | ||
| 2379 | #endif | ||
| 2380 | } | ||
| 2381 | |||
| 2382 | static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) { | ||
| 2383 | #if defined __AVX__ | ||
| 2384 | return _mm256_round_ps(x, _MM_FROUND_RINT); | ||
| 2385 | #else | ||
| 2386 | return simd_make_float8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2387 | #endif | ||
| 2388 | } | ||
| 2389 | |||
| 2390 | static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) { | ||
| 2391 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2392 | return _mm512_roundscale_ps(x, _MM_FROUND_RINT); | ||
| 2393 | #else | ||
| 2394 | return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2395 | #endif | ||
| 2396 | } | ||
| 2397 | |||
| 2398 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2399 | extern simd_double2 _simd_rint_d2(simd_double2 x); | ||
| 2400 | #endif | ||
| 2401 | |||
| 2402 | static SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x) { | ||
| 2403 | #if defined __SSE4_1__ | ||
| 2404 | return _mm_round_pd(x, _MM_FROUND_RINT); | ||
| 2405 | #elif defined __arm64__ | ||
| 2406 | return vrndxq_f64(x); | ||
| 2407 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2408 | return _simd_rint_d2(x); | ||
| 2409 | #else | ||
| 2410 | simd_double2 magic = __tg_copysign(0x1.0p52, x); | ||
| 2411 | simd_long2 x_is_small = __tg_fabs(x) < 0x1.0p52; | ||
| 2412 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffffffffffff); | ||
| 2413 | #endif | ||
| 2414 | } | ||
| 2415 | |||
| 2416 | static SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x) { | ||
| 2417 | return simd_make_double3(__tg_rint(simd_make_double4_undef(x))); | ||
| 2418 | } | ||
| 2419 | |||
| 2420 | static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) { | ||
| 2421 | #if defined __AVX__ | ||
| 2422 | return _mm256_round_pd(x, _MM_FROUND_RINT); | ||
| 2423 | #else | ||
| 2424 | return simd_make_double4(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2425 | #endif | ||
| 2426 | } | ||
| 2427 | |||
| 2428 | static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) { | ||
| 2429 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2430 | return _mm512_roundscale_pd(x, _MM_FROUND_RINT); | ||
| 2431 | #else | ||
| 2432 | return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2433 | #endif | ||
| 2434 | } | ||
| 2435 | |||
| 2436 | static SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x) { | ||
| 2437 | #if defined __arm64__ | ||
| 2438 | return vrnd_f32(x); | ||
| 2439 | #else | ||
| 2440 | return simd_make_float2(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2441 | #endif | ||
| 2442 | } | ||
| 2443 | |||
| 2444 | static SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x) { | ||
| 2445 | return simd_make_float3(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2446 | } | ||
| 2447 | |||
| 2448 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2449 | extern simd_float4 _simd_trunc_f4(simd_float4 x); | ||
| 2450 | #endif | ||
| 2451 | |||
| 2452 | static SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x) { | ||
| 2453 | #if defined __SSE4_1__ | ||
| 2454 | return _mm_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2455 | #elif defined __arm64__ | ||
| 2456 | return vrndq_f32(x); | ||
| 2457 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2458 | return _simd_trunc_f4(x); | ||
| 2459 | #else | ||
| 2460 | simd_float4 binade = simd_bitselect(0, x, 0x7f800000); | ||
| 2461 | simd_int4 mask = (simd_int4)__tg_fmin(-2*binade + 1, -0); | ||
| 2462 | simd_float4 result = simd_bitselect(0, x, mask); | ||
| 2463 | return simd_bitselect(x, result, binade < 0x1.0p23); | ||
| 2464 | #endif | ||
| 2465 | } | ||
| 2466 | |||
| 2467 | static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) { | ||
| 2468 | #if defined __AVX__ | ||
| 2469 | return _mm256_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2470 | #else | ||
| 2471 | return simd_make_float8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2472 | #endif | ||
| 2473 | } | ||
| 2474 | |||
| 2475 | static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) { | ||
| 2476 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2477 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2478 | #else | ||
| 2479 | return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2480 | #endif | ||
| 2481 | } | ||
| 2482 | |||
| 2483 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2484 | extern simd_double2 _simd_trunc_d2(simd_double2 x); | ||
| 2485 | #endif | ||
| 2486 | |||
| 2487 | static SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x) { | ||
| 2488 | #if defined __SSE4_1__ | ||
| 2489 | return _mm_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2490 | #elif defined __arm64__ | ||
| 2491 | return vrndq_f64(x); | ||
| 2492 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2493 | return _simd_trunc_d2(x); | ||
| 2494 | #else | ||
| 2495 | simd_double2 binade = simd_bitselect(0, x, 0x7ff0000000000000); | ||
| 2496 | simd_long2 mask = (simd_long2)__tg_fmin(-2*binade + 1, -0); | ||
| 2497 | simd_double2 result = simd_bitselect(0, x, mask); | ||
| 2498 | return simd_bitselect(x, result, binade < 0x1.0p52); | ||
| 2499 | #endif | ||
| 2500 | } | ||
| 2501 | |||
| 2502 | static SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x) { | ||
| 2503 | return simd_make_double3(__tg_trunc(simd_make_double4_undef(x))); | ||
| 2504 | } | ||
| 2505 | |||
| 2506 | static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) { | ||
| 2507 | #if defined __AVX__ | ||
| 2508 | return _mm256_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2509 | #else | ||
| 2510 | return simd_make_double4(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2511 | #endif | ||
| 2512 | } | ||
| 2513 | |||
| 2514 | static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) { | ||
| 2515 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2516 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2517 | #else | ||
| 2518 | return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2519 | #endif | ||
| 2520 | } | ||
| 2521 | |||
| 2522 | #pragma mark - sine, cosine implementation | ||
| 2523 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x) { | ||
| 2524 | return simd_make_float2(__tg_sin(simd_make_float4(x))); | ||
| 2525 | } | ||
| 2526 | |||
| 2527 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x) { | ||
| 2528 | return simd_make_float3(__tg_sin(simd_make_float4(x))); | ||
| 2529 | } | ||
| 2530 | |||
| 2531 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2532 | extern simd_float4 _simd_sin_f4(simd_float4 x); | ||
| 2533 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2534 | return _simd_sin_f4(x); | ||
| 2535 | } | ||
| 2536 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2537 | extern simd_float4 __sin_f4(simd_float4 x); | ||
| 2538 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2539 | return __sin_f4(x); | ||
| 2540 | } | ||
| 2541 | #else | ||
| 2542 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2543 | return simd_make_float4(sin(x.x), sin(x.y), sin(x.z), sin(x.w)); | ||
| 2544 | } | ||
| 2545 | #endif | ||
| 2546 | |||
| 2547 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2548 | extern simd_float8 _simd_sin_f8(simd_float8 x); | ||
| 2549 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2550 | return _simd_sin_f8(x); | ||
| 2551 | } | ||
| 2552 | #else | ||
| 2553 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2554 | return simd_make_float8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2555 | } | ||
| 2556 | #endif | ||
| 2557 | |||
| 2558 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2559 | extern simd_float16 _simd_sin_f16(simd_float16 x); | ||
| 2560 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2561 | return _simd_sin_f16(x); | ||
| 2562 | } | ||
| 2563 | #else | ||
| 2564 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2565 | return simd_make_float16(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2566 | } | ||
| 2567 | #endif | ||
| 2568 | |||
| 2569 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2570 | extern simd_double2 _simd_sin_d2(simd_double2 x); | ||
| 2571 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2572 | return _simd_sin_d2(x); | ||
| 2573 | } | ||
| 2574 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2575 | extern simd_double2 __sin_d2(simd_double2 x); | ||
| 2576 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2577 | return __sin_d2(x); | ||
| 2578 | } | ||
| 2579 | #else | ||
| 2580 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2581 | return simd_make_double2(sin(x.x), sin(x.y)); | ||
| 2582 | } | ||
| 2583 | #endif | ||
| 2584 | |||
| 2585 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) { | ||
| 2586 | return simd_make_double3(__tg_sin(simd_make_double4(x))); | ||
| 2587 | } | ||
| 2588 | |||
| 2589 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2590 | extern simd_double4 _simd_sin_d4(simd_double4 x); | ||
| 2591 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2592 | return _simd_sin_d4(x); | ||
| 2593 | } | ||
| 2594 | #else | ||
| 2595 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2596 | return simd_make_double4(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2597 | } | ||
| 2598 | #endif | ||
| 2599 | |||
| 2600 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2601 | extern simd_double8 _simd_sin_d8(simd_double8 x); | ||
| 2602 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2603 | return _simd_sin_d8(x); | ||
| 2604 | } | ||
| 2605 | #else | ||
| 2606 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2607 | return simd_make_double8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2608 | } | ||
| 2609 | #endif | ||
| 2610 | |||
| 2611 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x) { | ||
| 2612 | return simd_make_float2(__tg_cos(simd_make_float4(x))); | ||
| 2613 | } | ||
| 2614 | |||
| 2615 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x) { | ||
| 2616 | return simd_make_float3(__tg_cos(simd_make_float4(x))); | ||
| 2617 | } | ||
| 2618 | |||
| 2619 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2620 | extern simd_float4 _simd_cos_f4(simd_float4 x); | ||
| 2621 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2622 | return _simd_cos_f4(x); | ||
| 2623 | } | ||
| 2624 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2625 | extern simd_float4 __cos_f4(simd_float4 x); | ||
| 2626 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2627 | return __cos_f4(x); | ||
| 2628 | } | ||
| 2629 | #else | ||
| 2630 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2631 | return simd_make_float4(cos(x.x), cos(x.y), cos(x.z), cos(x.w)); | ||
| 2632 | } | ||
| 2633 | #endif | ||
| 2634 | |||
| 2635 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2636 | extern simd_float8 _simd_cos_f8(simd_float8 x); | ||
| 2637 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2638 | return _simd_cos_f8(x); | ||
| 2639 | } | ||
| 2640 | #else | ||
| 2641 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2642 | return simd_make_float8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2643 | } | ||
| 2644 | #endif | ||
| 2645 | |||
| 2646 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2647 | extern simd_float16 _simd_cos_f16(simd_float16 x); | ||
| 2648 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2649 | return _simd_cos_f16(x); | ||
| 2650 | } | ||
| 2651 | #else | ||
| 2652 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2653 | return simd_make_float16(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2654 | } | ||
| 2655 | #endif | ||
| 2656 | |||
| 2657 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2658 | extern simd_double2 _simd_cos_d2(simd_double2 x); | ||
| 2659 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2660 | return _simd_cos_d2(x); | ||
| 2661 | } | ||
| 2662 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2663 | extern simd_double2 __cos_d2(simd_double2 x); | ||
| 2664 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2665 | return __cos_d2(x); | ||
| 2666 | } | ||
| 2667 | #else | ||
| 2668 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2669 | return simd_make_double2(cos(x.x), cos(x.y)); | ||
| 2670 | } | ||
| 2671 | #endif | ||
| 2672 | |||
| 2673 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) { | ||
| 2674 | return simd_make_double3(__tg_cos(simd_make_double4(x))); | ||
| 2675 | } | ||
| 2676 | |||
| 2677 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2678 | extern simd_double4 _simd_cos_d4(simd_double4 x); | ||
| 2679 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 2680 | return _simd_cos_d4(x); | ||
| 2681 | } | ||
| 2682 | #else | ||
| 2683 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 2684 | return simd_make_double4(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2685 | } | ||
| 2686 | #endif | ||
| 2687 | |||
| 2688 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2689 | extern simd_double8 _simd_cos_d8(simd_double8 x); | ||
| 2690 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 2691 | return _simd_cos_d8(x); | ||
| 2692 | } | ||
| 2693 | #else | ||
| 2694 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 2695 | return simd_make_double8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2696 | } | ||
| 2697 | #endif | ||
| 2698 | |||
| 2699 | |||
| 2700 | #pragma mark - acos implementation | ||
| 2701 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x) { | ||
| 2702 | return simd_make_float2(__tg_acos(simd_make_float4(x))); | ||
| 2703 | } | ||
| 2704 | |||
| 2705 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x) { | ||
| 2706 | return simd_make_float3(__tg_acos(simd_make_float4(x))); | ||
| 2707 | } | ||
| 2708 | |||
| 2709 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2710 | extern simd_float4 _simd_acos_f4(simd_float4 x); | ||
| 2711 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 2712 | return _simd_acos_f4(x); | ||
| 2713 | } | ||
| 2714 | #else | ||
| 2715 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 2716 | return simd_make_float4(acos(x.x), acos(x.y), acos(x.z), acos(x.w)); | ||
| 2717 | } | ||
| 2718 | #endif | ||
| 2719 | |||
| 2720 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2721 | extern simd_float8 _simd_acos_f8(simd_float8 x); | ||
| 2722 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 2723 | return _simd_acos_f8(x); | ||
| 2724 | } | ||
| 2725 | #else | ||
| 2726 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 2727 | return simd_make_float8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 2728 | } | ||
| 2729 | #endif | ||
| 2730 | |||
| 2731 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2732 | extern simd_float16 _simd_acos_f16(simd_float16 x); | ||
| 2733 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 2734 | return _simd_acos_f16(x); | ||
| 2735 | } | ||
| 2736 | #else | ||
| 2737 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 2738 | return simd_make_float16(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 2739 | } | ||
| 2740 | #endif | ||
| 2741 | |||
| 2742 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2743 | extern simd_double2 _simd_acos_d2(simd_double2 x); | ||
| 2744 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 2745 | return _simd_acos_d2(x); | ||
| 2746 | } | ||
| 2747 | #else | ||
| 2748 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 2749 | return simd_make_double2(acos(x.x), acos(x.y)); | ||
| 2750 | } | ||
| 2751 | #endif | ||
| 2752 | |||
| 2753 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) { | ||
| 2754 | return simd_make_double3(__tg_acos(simd_make_double4(x))); | ||
| 2755 | } | ||
| 2756 | |||
| 2757 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2758 | extern simd_double4 _simd_acos_d4(simd_double4 x); | ||
| 2759 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 2760 | return _simd_acos_d4(x); | ||
| 2761 | } | ||
| 2762 | #else | ||
| 2763 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 2764 | return simd_make_double4(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 2765 | } | ||
| 2766 | #endif | ||
| 2767 | |||
| 2768 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2769 | extern simd_double8 _simd_acos_d8(simd_double8 x); | ||
| 2770 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 2771 | return _simd_acos_d8(x); | ||
| 2772 | } | ||
| 2773 | #else | ||
| 2774 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 2775 | return simd_make_double8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 2776 | } | ||
| 2777 | #endif | ||
| 2778 | |||
| 2779 | #pragma mark - asin implementation | ||
| 2780 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x) { | ||
| 2781 | return simd_make_float2(__tg_asin(simd_make_float4(x))); | ||
| 2782 | } | ||
| 2783 | |||
| 2784 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x) { | ||
| 2785 | return simd_make_float3(__tg_asin(simd_make_float4(x))); | ||
| 2786 | } | ||
| 2787 | |||
| 2788 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2789 | extern simd_float4 _simd_asin_f4(simd_float4 x); | ||
| 2790 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 2791 | return _simd_asin_f4(x); | ||
| 2792 | } | ||
| 2793 | #else | ||
| 2794 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 2795 | return simd_make_float4(asin(x.x), asin(x.y), asin(x.z), asin(x.w)); | ||
| 2796 | } | ||
| 2797 | #endif | ||
| 2798 | |||
| 2799 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2800 | extern simd_float8 _simd_asin_f8(simd_float8 x); | ||
| 2801 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 2802 | return _simd_asin_f8(x); | ||
| 2803 | } | ||
| 2804 | #else | ||
| 2805 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 2806 | return simd_make_float8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 2807 | } | ||
| 2808 | #endif | ||
| 2809 | |||
| 2810 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2811 | extern simd_float16 _simd_asin_f16(simd_float16 x); | ||
| 2812 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 2813 | return _simd_asin_f16(x); | ||
| 2814 | } | ||
| 2815 | #else | ||
| 2816 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 2817 | return simd_make_float16(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 2818 | } | ||
| 2819 | #endif | ||
| 2820 | |||
| 2821 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2822 | extern simd_double2 _simd_asin_d2(simd_double2 x); | ||
| 2823 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 2824 | return _simd_asin_d2(x); | ||
| 2825 | } | ||
| 2826 | #else | ||
| 2827 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 2828 | return simd_make_double2(asin(x.x), asin(x.y)); | ||
| 2829 | } | ||
| 2830 | #endif | ||
| 2831 | |||
| 2832 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) { | ||
| 2833 | return simd_make_double3(__tg_asin(simd_make_double4(x))); | ||
| 2834 | } | ||
| 2835 | |||
| 2836 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2837 | extern simd_double4 _simd_asin_d4(simd_double4 x); | ||
| 2838 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 2839 | return _simd_asin_d4(x); | ||
| 2840 | } | ||
| 2841 | #else | ||
| 2842 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 2843 | return simd_make_double4(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 2844 | } | ||
| 2845 | #endif | ||
| 2846 | |||
| 2847 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2848 | extern simd_double8 _simd_asin_d8(simd_double8 x); | ||
| 2849 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 2850 | return _simd_asin_d8(x); | ||
| 2851 | } | ||
| 2852 | #else | ||
| 2853 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 2854 | return simd_make_double8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 2855 | } | ||
| 2856 | #endif | ||
| 2857 | |||
| 2858 | #pragma mark - atan implementation | ||
| 2859 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x) { | ||
| 2860 | return simd_make_float2(__tg_atan(simd_make_float4(x))); | ||
| 2861 | } | ||
| 2862 | |||
| 2863 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x) { | ||
| 2864 | return simd_make_float3(__tg_atan(simd_make_float4(x))); | ||
| 2865 | } | ||
| 2866 | |||
| 2867 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2868 | extern simd_float4 _simd_atan_f4(simd_float4 x); | ||
| 2869 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 2870 | return _simd_atan_f4(x); | ||
| 2871 | } | ||
| 2872 | #else | ||
| 2873 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 2874 | return simd_make_float4(atan(x.x), atan(x.y), atan(x.z), atan(x.w)); | ||
| 2875 | } | ||
| 2876 | #endif | ||
| 2877 | |||
| 2878 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2879 | extern simd_float8 _simd_atan_f8(simd_float8 x); | ||
| 2880 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 2881 | return _simd_atan_f8(x); | ||
| 2882 | } | ||
| 2883 | #else | ||
| 2884 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 2885 | return simd_make_float8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 2886 | } | ||
| 2887 | #endif | ||
| 2888 | |||
| 2889 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2890 | extern simd_float16 _simd_atan_f16(simd_float16 x); | ||
| 2891 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 2892 | return _simd_atan_f16(x); | ||
| 2893 | } | ||
| 2894 | #else | ||
| 2895 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 2896 | return simd_make_float16(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 2897 | } | ||
| 2898 | #endif | ||
| 2899 | |||
| 2900 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2901 | extern simd_double2 _simd_atan_d2(simd_double2 x); | ||
| 2902 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 2903 | return _simd_atan_d2(x); | ||
| 2904 | } | ||
| 2905 | #else | ||
| 2906 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 2907 | return simd_make_double2(atan(x.x), atan(x.y)); | ||
| 2908 | } | ||
| 2909 | #endif | ||
| 2910 | |||
| 2911 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) { | ||
| 2912 | return simd_make_double3(__tg_atan(simd_make_double4(x))); | ||
| 2913 | } | ||
| 2914 | |||
| 2915 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2916 | extern simd_double4 _simd_atan_d4(simd_double4 x); | ||
| 2917 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 2918 | return _simd_atan_d4(x); | ||
| 2919 | } | ||
| 2920 | #else | ||
| 2921 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 2922 | return simd_make_double4(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 2923 | } | ||
| 2924 | #endif | ||
| 2925 | |||
| 2926 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2927 | extern simd_double8 _simd_atan_d8(simd_double8 x); | ||
| 2928 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 2929 | return _simd_atan_d8(x); | ||
| 2930 | } | ||
| 2931 | #else | ||
| 2932 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 2933 | return simd_make_double8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 2934 | } | ||
| 2935 | #endif | ||
| 2936 | |||
| 2937 | #pragma mark - tan implementation | ||
| 2938 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x) { | ||
| 2939 | return simd_make_float2(__tg_tan(simd_make_float4(x))); | ||
| 2940 | } | ||
| 2941 | |||
| 2942 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x) { | ||
| 2943 | return simd_make_float3(__tg_tan(simd_make_float4(x))); | ||
| 2944 | } | ||
| 2945 | |||
| 2946 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2947 | extern simd_float4 _simd_tan_f4(simd_float4 x); | ||
| 2948 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 2949 | return _simd_tan_f4(x); | ||
| 2950 | } | ||
| 2951 | #else | ||
| 2952 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 2953 | return simd_make_float4(tan(x.x), tan(x.y), tan(x.z), tan(x.w)); | ||
| 2954 | } | ||
| 2955 | #endif | ||
| 2956 | |||
| 2957 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2958 | extern simd_float8 _simd_tan_f8(simd_float8 x); | ||
| 2959 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 2960 | return _simd_tan_f8(x); | ||
| 2961 | } | ||
| 2962 | #else | ||
| 2963 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 2964 | return simd_make_float8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 2965 | } | ||
| 2966 | #endif | ||
| 2967 | |||
| 2968 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2969 | extern simd_float16 _simd_tan_f16(simd_float16 x); | ||
| 2970 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 2971 | return _simd_tan_f16(x); | ||
| 2972 | } | ||
| 2973 | #else | ||
| 2974 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 2975 | return simd_make_float16(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 2976 | } | ||
| 2977 | #endif | ||
| 2978 | |||
| 2979 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2980 | extern simd_double2 _simd_tan_d2(simd_double2 x); | ||
| 2981 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 2982 | return _simd_tan_d2(x); | ||
| 2983 | } | ||
| 2984 | #else | ||
| 2985 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 2986 | return simd_make_double2(tan(x.x), tan(x.y)); | ||
| 2987 | } | ||
| 2988 | #endif | ||
| 2989 | |||
| 2990 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) { | ||
| 2991 | return simd_make_double3(__tg_tan(simd_make_double4(x))); | ||
| 2992 | } | ||
| 2993 | |||
| 2994 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2995 | extern simd_double4 _simd_tan_d4(simd_double4 x); | ||
| 2996 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 2997 | return _simd_tan_d4(x); | ||
| 2998 | } | ||
| 2999 | #else | ||
| 3000 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 3001 | return simd_make_double4(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3002 | } | ||
| 3003 | #endif | ||
| 3004 | |||
| 3005 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3006 | extern simd_double8 _simd_tan_d8(simd_double8 x); | ||
| 3007 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3008 | return _simd_tan_d8(x); | ||
| 3009 | } | ||
| 3010 | #else | ||
| 3011 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3012 | return simd_make_double8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3013 | } | ||
| 3014 | #endif | ||
| 3015 | |||
| 3016 | #pragma mark - cospi implementation | ||
| 3017 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3018 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x) { | ||
| 3019 | return simd_make_float2(__tg_cospi(simd_make_float4(x))); | ||
| 3020 | } | ||
| 3021 | |||
| 3022 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x) { | ||
| 3023 | return simd_make_float3(__tg_cospi(simd_make_float4(x))); | ||
| 3024 | } | ||
| 3025 | |||
| 3026 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3027 | extern simd_float4 _simd_cospi_f4(simd_float4 x); | ||
| 3028 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3029 | return _simd_cospi_f4(x); | ||
| 3030 | } | ||
| 3031 | #else | ||
| 3032 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3033 | return simd_make_float4(__cospi(x.x), __cospi(x.y), __cospi(x.z), __cospi(x.w)); | ||
| 3034 | } | ||
| 3035 | #endif | ||
| 3036 | |||
| 3037 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3038 | extern simd_float8 _simd_cospi_f8(simd_float8 x); | ||
| 3039 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3040 | return _simd_cospi_f8(x); | ||
| 3041 | } | ||
| 3042 | #else | ||
| 3043 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3044 | return simd_make_float8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3045 | } | ||
| 3046 | #endif | ||
| 3047 | |||
| 3048 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3049 | extern simd_float16 _simd_cospi_f16(simd_float16 x); | ||
| 3050 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3051 | return _simd_cospi_f16(x); | ||
| 3052 | } | ||
| 3053 | #else | ||
| 3054 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3055 | return simd_make_float16(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3056 | } | ||
| 3057 | #endif | ||
| 3058 | |||
| 3059 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3060 | extern simd_double2 _simd_cospi_d2(simd_double2 x); | ||
| 3061 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3062 | return _simd_cospi_d2(x); | ||
| 3063 | } | ||
| 3064 | #else | ||
| 3065 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3066 | return simd_make_double2(__cospi(x.x), __cospi(x.y)); | ||
| 3067 | } | ||
| 3068 | #endif | ||
| 3069 | |||
| 3070 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) { | ||
| 3071 | return simd_make_double3(__tg_cospi(simd_make_double4(x))); | ||
| 3072 | } | ||
| 3073 | |||
| 3074 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3075 | extern simd_double4 _simd_cospi_d4(simd_double4 x); | ||
| 3076 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3077 | return _simd_cospi_d4(x); | ||
| 3078 | } | ||
| 3079 | #else | ||
| 3080 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3081 | return simd_make_double4(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3082 | } | ||
| 3083 | #endif | ||
| 3084 | |||
| 3085 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3086 | extern simd_double8 _simd_cospi_d8(simd_double8 x); | ||
| 3087 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3088 | return _simd_cospi_d8(x); | ||
| 3089 | } | ||
| 3090 | #else | ||
| 3091 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3092 | return simd_make_double8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3093 | } | ||
| 3094 | #endif | ||
| 3095 | |||
| 3096 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3097 | #pragma mark - sinpi implementation | ||
| 3098 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3099 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x) { | ||
| 3100 | return simd_make_float2(__tg_sinpi(simd_make_float4(x))); | ||
| 3101 | } | ||
| 3102 | |||
| 3103 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x) { | ||
| 3104 | return simd_make_float3(__tg_sinpi(simd_make_float4(x))); | ||
| 3105 | } | ||
| 3106 | |||
| 3107 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3108 | extern simd_float4 _simd_sinpi_f4(simd_float4 x); | ||
| 3109 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3110 | return _simd_sinpi_f4(x); | ||
| 3111 | } | ||
| 3112 | #else | ||
| 3113 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3114 | return simd_make_float4(__sinpi(x.x), __sinpi(x.y), __sinpi(x.z), __sinpi(x.w)); | ||
| 3115 | } | ||
| 3116 | #endif | ||
| 3117 | |||
| 3118 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3119 | extern simd_float8 _simd_sinpi_f8(simd_float8 x); | ||
| 3120 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3121 | return _simd_sinpi_f8(x); | ||
| 3122 | } | ||
| 3123 | #else | ||
| 3124 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3125 | return simd_make_float8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3126 | } | ||
| 3127 | #endif | ||
| 3128 | |||
| 3129 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3130 | extern simd_float16 _simd_sinpi_f16(simd_float16 x); | ||
| 3131 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3132 | return _simd_sinpi_f16(x); | ||
| 3133 | } | ||
| 3134 | #else | ||
| 3135 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3136 | return simd_make_float16(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3137 | } | ||
| 3138 | #endif | ||
| 3139 | |||
| 3140 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3141 | extern simd_double2 _simd_sinpi_d2(simd_double2 x); | ||
| 3142 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3143 | return _simd_sinpi_d2(x); | ||
| 3144 | } | ||
| 3145 | #else | ||
| 3146 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3147 | return simd_make_double2(__sinpi(x.x), __sinpi(x.y)); | ||
| 3148 | } | ||
| 3149 | #endif | ||
| 3150 | |||
| 3151 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) { | ||
| 3152 | return simd_make_double3(__tg_sinpi(simd_make_double4(x))); | ||
| 3153 | } | ||
| 3154 | |||
| 3155 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3156 | extern simd_double4 _simd_sinpi_d4(simd_double4 x); | ||
| 3157 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3158 | return _simd_sinpi_d4(x); | ||
| 3159 | } | ||
| 3160 | #else | ||
| 3161 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3162 | return simd_make_double4(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3163 | } | ||
| 3164 | #endif | ||
| 3165 | |||
| 3166 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3167 | extern simd_double8 _simd_sinpi_d8(simd_double8 x); | ||
| 3168 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3169 | return _simd_sinpi_d8(x); | ||
| 3170 | } | ||
| 3171 | #else | ||
| 3172 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3173 | return simd_make_double8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3174 | } | ||
| 3175 | #endif | ||
| 3176 | |||
| 3177 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3178 | #pragma mark - tanpi implementation | ||
| 3179 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3180 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x) { | ||
| 3181 | return simd_make_float2(__tg_tanpi(simd_make_float4(x))); | ||
| 3182 | } | ||
| 3183 | |||
| 3184 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x) { | ||
| 3185 | return simd_make_float3(__tg_tanpi(simd_make_float4(x))); | ||
| 3186 | } | ||
| 3187 | |||
| 3188 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3189 | extern simd_float4 _simd_tanpi_f4(simd_float4 x); | ||
| 3190 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3191 | return _simd_tanpi_f4(x); | ||
| 3192 | } | ||
| 3193 | #else | ||
| 3194 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3195 | return simd_make_float4(__tanpi(x.x), __tanpi(x.y), __tanpi(x.z), __tanpi(x.w)); | ||
| 3196 | } | ||
| 3197 | #endif | ||
| 3198 | |||
| 3199 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3200 | extern simd_float8 _simd_tanpi_f8(simd_float8 x); | ||
| 3201 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3202 | return _simd_tanpi_f8(x); | ||
| 3203 | } | ||
| 3204 | #else | ||
| 3205 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3206 | return simd_make_float8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3207 | } | ||
| 3208 | #endif | ||
| 3209 | |||
| 3210 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3211 | extern simd_float16 _simd_tanpi_f16(simd_float16 x); | ||
| 3212 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3213 | return _simd_tanpi_f16(x); | ||
| 3214 | } | ||
| 3215 | #else | ||
| 3216 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3217 | return simd_make_float16(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3218 | } | ||
| 3219 | #endif | ||
| 3220 | |||
| 3221 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3222 | extern simd_double2 _simd_tanpi_d2(simd_double2 x); | ||
| 3223 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3224 | return _simd_tanpi_d2(x); | ||
| 3225 | } | ||
| 3226 | #else | ||
| 3227 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3228 | return simd_make_double2(__tanpi(x.x), __tanpi(x.y)); | ||
| 3229 | } | ||
| 3230 | #endif | ||
| 3231 | |||
| 3232 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) { | ||
| 3233 | return simd_make_double3(__tg_tanpi(simd_make_double4(x))); | ||
| 3234 | } | ||
| 3235 | |||
| 3236 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3237 | extern simd_double4 _simd_tanpi_d4(simd_double4 x); | ||
| 3238 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3239 | return _simd_tanpi_d4(x); | ||
| 3240 | } | ||
| 3241 | #else | ||
| 3242 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3243 | return simd_make_double4(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3244 | } | ||
| 3245 | #endif | ||
| 3246 | |||
| 3247 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3248 | extern simd_double8 _simd_tanpi_d8(simd_double8 x); | ||
| 3249 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3250 | return _simd_tanpi_d8(x); | ||
| 3251 | } | ||
| 3252 | #else | ||
| 3253 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3254 | return simd_make_double8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3255 | } | ||
| 3256 | #endif | ||
| 3257 | |||
| 3258 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3259 | #pragma mark - acosh implementation | ||
| 3260 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x) { | ||
| 3261 | return simd_make_float2(__tg_acosh(simd_make_float4(x))); | ||
| 3262 | } | ||
| 3263 | |||
| 3264 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x) { | ||
| 3265 | return simd_make_float3(__tg_acosh(simd_make_float4(x))); | ||
| 3266 | } | ||
| 3267 | |||
| 3268 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3269 | extern simd_float4 _simd_acosh_f4(simd_float4 x); | ||
| 3270 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3271 | return _simd_acosh_f4(x); | ||
| 3272 | } | ||
| 3273 | #else | ||
| 3274 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3275 | return simd_make_float4(acosh(x.x), acosh(x.y), acosh(x.z), acosh(x.w)); | ||
| 3276 | } | ||
| 3277 | #endif | ||
| 3278 | |||
| 3279 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3280 | extern simd_float8 _simd_acosh_f8(simd_float8 x); | ||
| 3281 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3282 | return _simd_acosh_f8(x); | ||
| 3283 | } | ||
| 3284 | #else | ||
| 3285 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3286 | return simd_make_float8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3287 | } | ||
| 3288 | #endif | ||
| 3289 | |||
| 3290 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3291 | extern simd_float16 _simd_acosh_f16(simd_float16 x); | ||
| 3292 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3293 | return _simd_acosh_f16(x); | ||
| 3294 | } | ||
| 3295 | #else | ||
| 3296 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3297 | return simd_make_float16(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3298 | } | ||
| 3299 | #endif | ||
| 3300 | |||
| 3301 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3302 | extern simd_double2 _simd_acosh_d2(simd_double2 x); | ||
| 3303 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3304 | return _simd_acosh_d2(x); | ||
| 3305 | } | ||
| 3306 | #else | ||
| 3307 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3308 | return simd_make_double2(acosh(x.x), acosh(x.y)); | ||
| 3309 | } | ||
| 3310 | #endif | ||
| 3311 | |||
| 3312 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) { | ||
| 3313 | return simd_make_double3(__tg_acosh(simd_make_double4(x))); | ||
| 3314 | } | ||
| 3315 | |||
| 3316 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3317 | extern simd_double4 _simd_acosh_d4(simd_double4 x); | ||
| 3318 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3319 | return _simd_acosh_d4(x); | ||
| 3320 | } | ||
| 3321 | #else | ||
| 3322 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3323 | return simd_make_double4(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3324 | } | ||
| 3325 | #endif | ||
| 3326 | |||
| 3327 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3328 | extern simd_double8 _simd_acosh_d8(simd_double8 x); | ||
| 3329 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3330 | return _simd_acosh_d8(x); | ||
| 3331 | } | ||
| 3332 | #else | ||
| 3333 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3334 | return simd_make_double8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3335 | } | ||
| 3336 | #endif | ||
| 3337 | |||
| 3338 | #pragma mark - asinh implementation | ||
| 3339 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x) { | ||
| 3340 | return simd_make_float2(__tg_asinh(simd_make_float4(x))); | ||
| 3341 | } | ||
| 3342 | |||
| 3343 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x) { | ||
| 3344 | return simd_make_float3(__tg_asinh(simd_make_float4(x))); | ||
| 3345 | } | ||
| 3346 | |||
| 3347 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3348 | extern simd_float4 _simd_asinh_f4(simd_float4 x); | ||
| 3349 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3350 | return _simd_asinh_f4(x); | ||
| 3351 | } | ||
| 3352 | #else | ||
| 3353 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3354 | return simd_make_float4(asinh(x.x), asinh(x.y), asinh(x.z), asinh(x.w)); | ||
| 3355 | } | ||
| 3356 | #endif | ||
| 3357 | |||
| 3358 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3359 | extern simd_float8 _simd_asinh_f8(simd_float8 x); | ||
| 3360 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3361 | return _simd_asinh_f8(x); | ||
| 3362 | } | ||
| 3363 | #else | ||
| 3364 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3365 | return simd_make_float8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3366 | } | ||
| 3367 | #endif | ||
| 3368 | |||
| 3369 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3370 | extern simd_float16 _simd_asinh_f16(simd_float16 x); | ||
| 3371 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3372 | return _simd_asinh_f16(x); | ||
| 3373 | } | ||
| 3374 | #else | ||
| 3375 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3376 | return simd_make_float16(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3377 | } | ||
| 3378 | #endif | ||
| 3379 | |||
| 3380 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3381 | extern simd_double2 _simd_asinh_d2(simd_double2 x); | ||
| 3382 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3383 | return _simd_asinh_d2(x); | ||
| 3384 | } | ||
| 3385 | #else | ||
| 3386 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3387 | return simd_make_double2(asinh(x.x), asinh(x.y)); | ||
| 3388 | } | ||
| 3389 | #endif | ||
| 3390 | |||
| 3391 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) { | ||
| 3392 | return simd_make_double3(__tg_asinh(simd_make_double4(x))); | ||
| 3393 | } | ||
| 3394 | |||
| 3395 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3396 | extern simd_double4 _simd_asinh_d4(simd_double4 x); | ||
| 3397 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3398 | return _simd_asinh_d4(x); | ||
| 3399 | } | ||
| 3400 | #else | ||
| 3401 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3402 | return simd_make_double4(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3403 | } | ||
| 3404 | #endif | ||
| 3405 | |||
| 3406 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3407 | extern simd_double8 _simd_asinh_d8(simd_double8 x); | ||
| 3408 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3409 | return _simd_asinh_d8(x); | ||
| 3410 | } | ||
| 3411 | #else | ||
| 3412 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3413 | return simd_make_double8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3414 | } | ||
| 3415 | #endif | ||
| 3416 | |||
| 3417 | #pragma mark - atanh implementation | ||
| 3418 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x) { | ||
| 3419 | return simd_make_float2(__tg_atanh(simd_make_float4(x))); | ||
| 3420 | } | ||
| 3421 | |||
| 3422 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x) { | ||
| 3423 | return simd_make_float3(__tg_atanh(simd_make_float4(x))); | ||
| 3424 | } | ||
| 3425 | |||
| 3426 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3427 | extern simd_float4 _simd_atanh_f4(simd_float4 x); | ||
| 3428 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3429 | return _simd_atanh_f4(x); | ||
| 3430 | } | ||
| 3431 | #else | ||
| 3432 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3433 | return simd_make_float4(atanh(x.x), atanh(x.y), atanh(x.z), atanh(x.w)); | ||
| 3434 | } | ||
| 3435 | #endif | ||
| 3436 | |||
| 3437 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3438 | extern simd_float8 _simd_atanh_f8(simd_float8 x); | ||
| 3439 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3440 | return _simd_atanh_f8(x); | ||
| 3441 | } | ||
| 3442 | #else | ||
| 3443 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3444 | return simd_make_float8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3445 | } | ||
| 3446 | #endif | ||
| 3447 | |||
| 3448 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3449 | extern simd_float16 _simd_atanh_f16(simd_float16 x); | ||
| 3450 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3451 | return _simd_atanh_f16(x); | ||
| 3452 | } | ||
| 3453 | #else | ||
| 3454 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3455 | return simd_make_float16(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3456 | } | ||
| 3457 | #endif | ||
| 3458 | |||
| 3459 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3460 | extern simd_double2 _simd_atanh_d2(simd_double2 x); | ||
| 3461 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3462 | return _simd_atanh_d2(x); | ||
| 3463 | } | ||
| 3464 | #else | ||
| 3465 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3466 | return simd_make_double2(atanh(x.x), atanh(x.y)); | ||
| 3467 | } | ||
| 3468 | #endif | ||
| 3469 | |||
| 3470 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) { | ||
| 3471 | return simd_make_double3(__tg_atanh(simd_make_double4(x))); | ||
| 3472 | } | ||
| 3473 | |||
| 3474 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3475 | extern simd_double4 _simd_atanh_d4(simd_double4 x); | ||
| 3476 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3477 | return _simd_atanh_d4(x); | ||
| 3478 | } | ||
| 3479 | #else | ||
| 3480 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3481 | return simd_make_double4(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3482 | } | ||
| 3483 | #endif | ||
| 3484 | |||
| 3485 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3486 | extern simd_double8 _simd_atanh_d8(simd_double8 x); | ||
| 3487 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3488 | return _simd_atanh_d8(x); | ||
| 3489 | } | ||
| 3490 | #else | ||
| 3491 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3492 | return simd_make_double8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3493 | } | ||
| 3494 | #endif | ||
| 3495 | |||
| 3496 | #pragma mark - cosh implementation | ||
| 3497 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x) { | ||
| 3498 | return simd_make_float2(__tg_cosh(simd_make_float4(x))); | ||
| 3499 | } | ||
| 3500 | |||
| 3501 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x) { | ||
| 3502 | return simd_make_float3(__tg_cosh(simd_make_float4(x))); | ||
| 3503 | } | ||
| 3504 | |||
| 3505 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3506 | extern simd_float4 _simd_cosh_f4(simd_float4 x); | ||
| 3507 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3508 | return _simd_cosh_f4(x); | ||
| 3509 | } | ||
| 3510 | #else | ||
| 3511 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3512 | return simd_make_float4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w)); | ||
| 3513 | } | ||
| 3514 | #endif | ||
| 3515 | |||
| 3516 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3517 | extern simd_float8 _simd_cosh_f8(simd_float8 x); | ||
| 3518 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3519 | return _simd_cosh_f8(x); | ||
| 3520 | } | ||
| 3521 | #else | ||
| 3522 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3523 | return simd_make_float8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3524 | } | ||
| 3525 | #endif | ||
| 3526 | |||
| 3527 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3528 | extern simd_float16 _simd_cosh_f16(simd_float16 x); | ||
| 3529 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3530 | return _simd_cosh_f16(x); | ||
| 3531 | } | ||
| 3532 | #else | ||
| 3533 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3534 | return simd_make_float16(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3535 | } | ||
| 3536 | #endif | ||
| 3537 | |||
| 3538 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3539 | extern simd_double2 _simd_cosh_d2(simd_double2 x); | ||
| 3540 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3541 | return _simd_cosh_d2(x); | ||
| 3542 | } | ||
| 3543 | #else | ||
| 3544 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3545 | return simd_make_double2(cosh(x.x), cosh(x.y)); | ||
| 3546 | } | ||
| 3547 | #endif | ||
| 3548 | |||
| 3549 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) { | ||
| 3550 | return simd_make_double3(__tg_cosh(simd_make_double4(x))); | ||
| 3551 | } | ||
| 3552 | |||
| 3553 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3554 | extern simd_double4 _simd_cosh_d4(simd_double4 x); | ||
| 3555 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3556 | return _simd_cosh_d4(x); | ||
| 3557 | } | ||
| 3558 | #else | ||
| 3559 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3560 | return simd_make_double4(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3561 | } | ||
| 3562 | #endif | ||
| 3563 | |||
| 3564 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3565 | extern simd_double8 _simd_cosh_d8(simd_double8 x); | ||
| 3566 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3567 | return _simd_cosh_d8(x); | ||
| 3568 | } | ||
| 3569 | #else | ||
| 3570 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3571 | return simd_make_double8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3572 | } | ||
| 3573 | #endif | ||
| 3574 | |||
| 3575 | #pragma mark - sinh implementation | ||
| 3576 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x) { | ||
| 3577 | return simd_make_float2(__tg_sinh(simd_make_float4(x))); | ||
| 3578 | } | ||
| 3579 | |||
| 3580 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x) { | ||
| 3581 | return simd_make_float3(__tg_sinh(simd_make_float4(x))); | ||
| 3582 | } | ||
| 3583 | |||
| 3584 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3585 | extern simd_float4 _simd_sinh_f4(simd_float4 x); | ||
| 3586 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3587 | return _simd_sinh_f4(x); | ||
| 3588 | } | ||
| 3589 | #else | ||
| 3590 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3591 | return simd_make_float4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w)); | ||
| 3592 | } | ||
| 3593 | #endif | ||
| 3594 | |||
| 3595 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3596 | extern simd_float8 _simd_sinh_f8(simd_float8 x); | ||
| 3597 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3598 | return _simd_sinh_f8(x); | ||
| 3599 | } | ||
| 3600 | #else | ||
| 3601 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3602 | return simd_make_float8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3603 | } | ||
| 3604 | #endif | ||
| 3605 | |||
| 3606 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3607 | extern simd_float16 _simd_sinh_f16(simd_float16 x); | ||
| 3608 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3609 | return _simd_sinh_f16(x); | ||
| 3610 | } | ||
| 3611 | #else | ||
| 3612 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3613 | return simd_make_float16(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3614 | } | ||
| 3615 | #endif | ||
| 3616 | |||
| 3617 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3618 | extern simd_double2 _simd_sinh_d2(simd_double2 x); | ||
| 3619 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3620 | return _simd_sinh_d2(x); | ||
| 3621 | } | ||
| 3622 | #else | ||
| 3623 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3624 | return simd_make_double2(sinh(x.x), sinh(x.y)); | ||
| 3625 | } | ||
| 3626 | #endif | ||
| 3627 | |||
| 3628 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) { | ||
| 3629 | return simd_make_double3(__tg_sinh(simd_make_double4(x))); | ||
| 3630 | } | ||
| 3631 | |||
| 3632 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3633 | extern simd_double4 _simd_sinh_d4(simd_double4 x); | ||
| 3634 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3635 | return _simd_sinh_d4(x); | ||
| 3636 | } | ||
| 3637 | #else | ||
| 3638 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3639 | return simd_make_double4(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3640 | } | ||
| 3641 | #endif | ||
| 3642 | |||
| 3643 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3644 | extern simd_double8 _simd_sinh_d8(simd_double8 x); | ||
| 3645 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3646 | return _simd_sinh_d8(x); | ||
| 3647 | } | ||
| 3648 | #else | ||
| 3649 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3650 | return simd_make_double8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3651 | } | ||
| 3652 | #endif | ||
| 3653 | |||
| 3654 | #pragma mark - tanh implementation | ||
| 3655 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x) { | ||
| 3656 | return simd_make_float2(__tg_tanh(simd_make_float4(x))); | ||
| 3657 | } | ||
| 3658 | |||
| 3659 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x) { | ||
| 3660 | return simd_make_float3(__tg_tanh(simd_make_float4(x))); | ||
| 3661 | } | ||
| 3662 | |||
| 3663 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3664 | extern simd_float4 _simd_tanh_f4(simd_float4 x); | ||
| 3665 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3666 | return _simd_tanh_f4(x); | ||
| 3667 | } | ||
| 3668 | #else | ||
| 3669 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3670 | return simd_make_float4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w)); | ||
| 3671 | } | ||
| 3672 | #endif | ||
| 3673 | |||
| 3674 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3675 | extern simd_float8 _simd_tanh_f8(simd_float8 x); | ||
| 3676 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 3677 | return _simd_tanh_f8(x); | ||
| 3678 | } | ||
| 3679 | #else | ||
| 3680 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 3681 | return simd_make_float8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 3682 | } | ||
| 3683 | #endif | ||
| 3684 | |||
| 3685 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3686 | extern simd_float16 _simd_tanh_f16(simd_float16 x); | ||
| 3687 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 3688 | return _simd_tanh_f16(x); | ||
| 3689 | } | ||
| 3690 | #else | ||
| 3691 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 3692 | return simd_make_float16(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 3693 | } | ||
| 3694 | #endif | ||
| 3695 | |||
| 3696 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3697 | extern simd_double2 _simd_tanh_d2(simd_double2 x); | ||
| 3698 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 3699 | return _simd_tanh_d2(x); | ||
| 3700 | } | ||
| 3701 | #else | ||
| 3702 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 3703 | return simd_make_double2(tanh(x.x), tanh(x.y)); | ||
| 3704 | } | ||
| 3705 | #endif | ||
| 3706 | |||
| 3707 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) { | ||
| 3708 | return simd_make_double3(__tg_tanh(simd_make_double4(x))); | ||
| 3709 | } | ||
| 3710 | |||
| 3711 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3712 | extern simd_double4 _simd_tanh_d4(simd_double4 x); | ||
| 3713 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 3714 | return _simd_tanh_d4(x); | ||
| 3715 | } | ||
| 3716 | #else | ||
| 3717 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 3718 | return simd_make_double4(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 3719 | } | ||
| 3720 | #endif | ||
| 3721 | |||
| 3722 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3723 | extern simd_double8 _simd_tanh_d8(simd_double8 x); | ||
| 3724 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 3725 | return _simd_tanh_d8(x); | ||
| 3726 | } | ||
| 3727 | #else | ||
| 3728 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 3729 | return simd_make_double8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 3730 | } | ||
| 3731 | #endif | ||
| 3732 | |||
| 3733 | #pragma mark - exp implementation | ||
| 3734 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x) { | ||
| 3735 | return simd_make_float2(__tg_exp(simd_make_float4(x))); | ||
| 3736 | } | ||
| 3737 | |||
| 3738 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x) { | ||
| 3739 | return simd_make_float3(__tg_exp(simd_make_float4(x))); | ||
| 3740 | } | ||
| 3741 | |||
| 3742 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3743 | extern simd_float4 _simd_exp_f4(simd_float4 x); | ||
| 3744 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 3745 | return _simd_exp_f4(x); | ||
| 3746 | } | ||
| 3747 | #else | ||
| 3748 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 3749 | return simd_make_float4(exp(x.x), exp(x.y), exp(x.z), exp(x.w)); | ||
| 3750 | } | ||
| 3751 | #endif | ||
| 3752 | |||
| 3753 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3754 | extern simd_float8 _simd_exp_f8(simd_float8 x); | ||
| 3755 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 3756 | return _simd_exp_f8(x); | ||
| 3757 | } | ||
| 3758 | #else | ||
| 3759 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 3760 | return simd_make_float8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 3761 | } | ||
| 3762 | #endif | ||
| 3763 | |||
| 3764 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3765 | extern simd_float16 _simd_exp_f16(simd_float16 x); | ||
| 3766 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 3767 | return _simd_exp_f16(x); | ||
| 3768 | } | ||
| 3769 | #else | ||
| 3770 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 3771 | return simd_make_float16(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 3772 | } | ||
| 3773 | #endif | ||
| 3774 | |||
| 3775 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3776 | extern simd_double2 _simd_exp_d2(simd_double2 x); | ||
| 3777 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 3778 | return _simd_exp_d2(x); | ||
| 3779 | } | ||
| 3780 | #else | ||
| 3781 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 3782 | return simd_make_double2(exp(x.x), exp(x.y)); | ||
| 3783 | } | ||
| 3784 | #endif | ||
| 3785 | |||
| 3786 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) { | ||
| 3787 | return simd_make_double3(__tg_exp(simd_make_double4(x))); | ||
| 3788 | } | ||
| 3789 | |||
| 3790 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3791 | extern simd_double4 _simd_exp_d4(simd_double4 x); | ||
| 3792 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 3793 | return _simd_exp_d4(x); | ||
| 3794 | } | ||
| 3795 | #else | ||
| 3796 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 3797 | return simd_make_double4(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 3798 | } | ||
| 3799 | #endif | ||
| 3800 | |||
| 3801 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3802 | extern simd_double8 _simd_exp_d8(simd_double8 x); | ||
| 3803 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 3804 | return _simd_exp_d8(x); | ||
| 3805 | } | ||
| 3806 | #else | ||
| 3807 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 3808 | return simd_make_double8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 3809 | } | ||
| 3810 | #endif | ||
| 3811 | |||
| 3812 | #pragma mark - exp2 implementation | ||
| 3813 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x) { | ||
| 3814 | return simd_make_float2(__tg_exp2(simd_make_float4(x))); | ||
| 3815 | } | ||
| 3816 | |||
| 3817 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x) { | ||
| 3818 | return simd_make_float3(__tg_exp2(simd_make_float4(x))); | ||
| 3819 | } | ||
| 3820 | |||
| 3821 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3822 | extern simd_float4 _simd_exp2_f4(simd_float4 x); | ||
| 3823 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 3824 | return _simd_exp2_f4(x); | ||
| 3825 | } | ||
| 3826 | #else | ||
| 3827 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 3828 | return simd_make_float4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w)); | ||
| 3829 | } | ||
| 3830 | #endif | ||
| 3831 | |||
| 3832 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3833 | extern simd_float8 _simd_exp2_f8(simd_float8 x); | ||
| 3834 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 3835 | return _simd_exp2_f8(x); | ||
| 3836 | } | ||
| 3837 | #else | ||
| 3838 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 3839 | return simd_make_float8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 3840 | } | ||
| 3841 | #endif | ||
| 3842 | |||
| 3843 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3844 | extern simd_float16 _simd_exp2_f16(simd_float16 x); | ||
| 3845 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 3846 | return _simd_exp2_f16(x); | ||
| 3847 | } | ||
| 3848 | #else | ||
| 3849 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 3850 | return simd_make_float16(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 3851 | } | ||
| 3852 | #endif | ||
| 3853 | |||
| 3854 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3855 | extern simd_double2 _simd_exp2_d2(simd_double2 x); | ||
| 3856 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 3857 | return _simd_exp2_d2(x); | ||
| 3858 | } | ||
| 3859 | #else | ||
| 3860 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 3861 | return simd_make_double2(exp2(x.x), exp2(x.y)); | ||
| 3862 | } | ||
| 3863 | #endif | ||
| 3864 | |||
| 3865 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) { | ||
| 3866 | return simd_make_double3(__tg_exp2(simd_make_double4(x))); | ||
| 3867 | } | ||
| 3868 | |||
| 3869 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3870 | extern simd_double4 _simd_exp2_d4(simd_double4 x); | ||
| 3871 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 3872 | return _simd_exp2_d4(x); | ||
| 3873 | } | ||
| 3874 | #else | ||
| 3875 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 3876 | return simd_make_double4(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 3877 | } | ||
| 3878 | #endif | ||
| 3879 | |||
| 3880 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3881 | extern simd_double8 _simd_exp2_d8(simd_double8 x); | ||
| 3882 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 3883 | return _simd_exp2_d8(x); | ||
| 3884 | } | ||
| 3885 | #else | ||
| 3886 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 3887 | return simd_make_double8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 3888 | } | ||
| 3889 | #endif | ||
| 3890 | |||
| 3891 | #pragma mark - exp10 implementation | ||
| 3892 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3893 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x) { | ||
| 3894 | return simd_make_float2(__tg_exp10(simd_make_float4(x))); | ||
| 3895 | } | ||
| 3896 | |||
| 3897 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x) { | ||
| 3898 | return simd_make_float3(__tg_exp10(simd_make_float4(x))); | ||
| 3899 | } | ||
| 3900 | |||
| 3901 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3902 | extern simd_float4 _simd_exp10_f4(simd_float4 x); | ||
| 3903 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 3904 | return _simd_exp10_f4(x); | ||
| 3905 | } | ||
| 3906 | #else | ||
| 3907 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 3908 | return simd_make_float4(__exp10(x.x), __exp10(x.y), __exp10(x.z), __exp10(x.w)); | ||
| 3909 | } | ||
| 3910 | #endif | ||
| 3911 | |||
| 3912 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3913 | extern simd_float8 _simd_exp10_f8(simd_float8 x); | ||
| 3914 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 3915 | return _simd_exp10_f8(x); | ||
| 3916 | } | ||
| 3917 | #else | ||
| 3918 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 3919 | return simd_make_float8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 3920 | } | ||
| 3921 | #endif | ||
| 3922 | |||
| 3923 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3924 | extern simd_float16 _simd_exp10_f16(simd_float16 x); | ||
| 3925 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 3926 | return _simd_exp10_f16(x); | ||
| 3927 | } | ||
| 3928 | #else | ||
| 3929 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 3930 | return simd_make_float16(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 3931 | } | ||
| 3932 | #endif | ||
| 3933 | |||
| 3934 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3935 | extern simd_double2 _simd_exp10_d2(simd_double2 x); | ||
| 3936 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 3937 | return _simd_exp10_d2(x); | ||
| 3938 | } | ||
| 3939 | #else | ||
| 3940 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 3941 | return simd_make_double2(__exp10(x.x), __exp10(x.y)); | ||
| 3942 | } | ||
| 3943 | #endif | ||
| 3944 | |||
| 3945 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) { | ||
| 3946 | return simd_make_double3(__tg_exp10(simd_make_double4(x))); | ||
| 3947 | } | ||
| 3948 | |||
| 3949 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3950 | extern simd_double4 _simd_exp10_d4(simd_double4 x); | ||
| 3951 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 3952 | return _simd_exp10_d4(x); | ||
| 3953 | } | ||
| 3954 | #else | ||
| 3955 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 3956 | return simd_make_double4(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 3957 | } | ||
| 3958 | #endif | ||
| 3959 | |||
| 3960 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3961 | extern simd_double8 _simd_exp10_d8(simd_double8 x); | ||
| 3962 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 3963 | return _simd_exp10_d8(x); | ||
| 3964 | } | ||
| 3965 | #else | ||
| 3966 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 3967 | return simd_make_double8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 3968 | } | ||
| 3969 | #endif | ||
| 3970 | |||
| 3971 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3972 | #pragma mark - expm1 implementation | ||
| 3973 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x) { | ||
| 3974 | return simd_make_float2(__tg_expm1(simd_make_float4(x))); | ||
| 3975 | } | ||
| 3976 | |||
| 3977 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x) { | ||
| 3978 | return simd_make_float3(__tg_expm1(simd_make_float4(x))); | ||
| 3979 | } | ||
| 3980 | |||
| 3981 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3982 | extern simd_float4 _simd_expm1_f4(simd_float4 x); | ||
| 3983 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 3984 | return _simd_expm1_f4(x); | ||
| 3985 | } | ||
| 3986 | #else | ||
| 3987 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 3988 | return simd_make_float4(expm1(x.x), expm1(x.y), expm1(x.z), expm1(x.w)); | ||
| 3989 | } | ||
| 3990 | #endif | ||
| 3991 | |||
| 3992 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3993 | extern simd_float8 _simd_expm1_f8(simd_float8 x); | ||
| 3994 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 3995 | return _simd_expm1_f8(x); | ||
| 3996 | } | ||
| 3997 | #else | ||
| 3998 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 3999 | return simd_make_float8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4000 | } | ||
| 4001 | #endif | ||
| 4002 | |||
| 4003 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4004 | extern simd_float16 _simd_expm1_f16(simd_float16 x); | ||
| 4005 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4006 | return _simd_expm1_f16(x); | ||
| 4007 | } | ||
| 4008 | #else | ||
| 4009 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4010 | return simd_make_float16(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4011 | } | ||
| 4012 | #endif | ||
| 4013 | |||
| 4014 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4015 | extern simd_double2 _simd_expm1_d2(simd_double2 x); | ||
| 4016 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4017 | return _simd_expm1_d2(x); | ||
| 4018 | } | ||
| 4019 | #else | ||
| 4020 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4021 | return simd_make_double2(expm1(x.x), expm1(x.y)); | ||
| 4022 | } | ||
| 4023 | #endif | ||
| 4024 | |||
| 4025 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) { | ||
| 4026 | return simd_make_double3(__tg_expm1(simd_make_double4(x))); | ||
| 4027 | } | ||
| 4028 | |||
| 4029 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4030 | extern simd_double4 _simd_expm1_d4(simd_double4 x); | ||
| 4031 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4032 | return _simd_expm1_d4(x); | ||
| 4033 | } | ||
| 4034 | #else | ||
| 4035 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4036 | return simd_make_double4(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4037 | } | ||
| 4038 | #endif | ||
| 4039 | |||
| 4040 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4041 | extern simd_double8 _simd_expm1_d8(simd_double8 x); | ||
| 4042 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4043 | return _simd_expm1_d8(x); | ||
| 4044 | } | ||
| 4045 | #else | ||
| 4046 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4047 | return simd_make_double8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4048 | } | ||
| 4049 | #endif | ||
| 4050 | |||
| 4051 | #pragma mark - log implementation | ||
| 4052 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x) { | ||
| 4053 | return simd_make_float2(__tg_log(simd_make_float4(x))); | ||
| 4054 | } | ||
| 4055 | |||
| 4056 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x) { | ||
| 4057 | return simd_make_float3(__tg_log(simd_make_float4(x))); | ||
| 4058 | } | ||
| 4059 | |||
| 4060 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4061 | extern simd_float4 _simd_log_f4(simd_float4 x); | ||
| 4062 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4063 | return _simd_log_f4(x); | ||
| 4064 | } | ||
| 4065 | #else | ||
| 4066 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4067 | return simd_make_float4(log(x.x), log(x.y), log(x.z), log(x.w)); | ||
| 4068 | } | ||
| 4069 | #endif | ||
| 4070 | |||
| 4071 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4072 | extern simd_float8 _simd_log_f8(simd_float8 x); | ||
| 4073 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4074 | return _simd_log_f8(x); | ||
| 4075 | } | ||
| 4076 | #else | ||
| 4077 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4078 | return simd_make_float8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4079 | } | ||
| 4080 | #endif | ||
| 4081 | |||
| 4082 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4083 | extern simd_float16 _simd_log_f16(simd_float16 x); | ||
| 4084 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4085 | return _simd_log_f16(x); | ||
| 4086 | } | ||
| 4087 | #else | ||
| 4088 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4089 | return simd_make_float16(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4090 | } | ||
| 4091 | #endif | ||
| 4092 | |||
| 4093 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4094 | extern simd_double2 _simd_log_d2(simd_double2 x); | ||
| 4095 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4096 | return _simd_log_d2(x); | ||
| 4097 | } | ||
| 4098 | #else | ||
| 4099 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4100 | return simd_make_double2(log(x.x), log(x.y)); | ||
| 4101 | } | ||
| 4102 | #endif | ||
| 4103 | |||
| 4104 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) { | ||
| 4105 | return simd_make_double3(__tg_log(simd_make_double4(x))); | ||
| 4106 | } | ||
| 4107 | |||
| 4108 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4109 | extern simd_double4 _simd_log_d4(simd_double4 x); | ||
| 4110 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4111 | return _simd_log_d4(x); | ||
| 4112 | } | ||
| 4113 | #else | ||
| 4114 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4115 | return simd_make_double4(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4116 | } | ||
| 4117 | #endif | ||
| 4118 | |||
| 4119 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4120 | extern simd_double8 _simd_log_d8(simd_double8 x); | ||
| 4121 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4122 | return _simd_log_d8(x); | ||
| 4123 | } | ||
| 4124 | #else | ||
| 4125 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4126 | return simd_make_double8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4127 | } | ||
| 4128 | #endif | ||
| 4129 | |||
| 4130 | #pragma mark - log2 implementation | ||
| 4131 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x) { | ||
| 4132 | return simd_make_float2(__tg_log2(simd_make_float4(x))); | ||
| 4133 | } | ||
| 4134 | |||
| 4135 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x) { | ||
| 4136 | return simd_make_float3(__tg_log2(simd_make_float4(x))); | ||
| 4137 | } | ||
| 4138 | |||
| 4139 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4140 | extern simd_float4 _simd_log2_f4(simd_float4 x); | ||
| 4141 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4142 | return _simd_log2_f4(x); | ||
| 4143 | } | ||
| 4144 | #else | ||
| 4145 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4146 | return simd_make_float4(log2(x.x), log2(x.y), log2(x.z), log2(x.w)); | ||
| 4147 | } | ||
| 4148 | #endif | ||
| 4149 | |||
| 4150 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4151 | extern simd_float8 _simd_log2_f8(simd_float8 x); | ||
| 4152 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4153 | return _simd_log2_f8(x); | ||
| 4154 | } | ||
| 4155 | #else | ||
| 4156 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4157 | return simd_make_float8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4158 | } | ||
| 4159 | #endif | ||
| 4160 | |||
| 4161 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4162 | extern simd_float16 _simd_log2_f16(simd_float16 x); | ||
| 4163 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4164 | return _simd_log2_f16(x); | ||
| 4165 | } | ||
| 4166 | #else | ||
| 4167 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4168 | return simd_make_float16(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4169 | } | ||
| 4170 | #endif | ||
| 4171 | |||
| 4172 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4173 | extern simd_double2 _simd_log2_d2(simd_double2 x); | ||
| 4174 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4175 | return _simd_log2_d2(x); | ||
| 4176 | } | ||
| 4177 | #else | ||
| 4178 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4179 | return simd_make_double2(log2(x.x), log2(x.y)); | ||
| 4180 | } | ||
| 4181 | #endif | ||
| 4182 | |||
| 4183 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) { | ||
| 4184 | return simd_make_double3(__tg_log2(simd_make_double4(x))); | ||
| 4185 | } | ||
| 4186 | |||
| 4187 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4188 | extern simd_double4 _simd_log2_d4(simd_double4 x); | ||
| 4189 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4190 | return _simd_log2_d4(x); | ||
| 4191 | } | ||
| 4192 | #else | ||
| 4193 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4194 | return simd_make_double4(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4195 | } | ||
| 4196 | #endif | ||
| 4197 | |||
| 4198 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4199 | extern simd_double8 _simd_log2_d8(simd_double8 x); | ||
| 4200 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4201 | return _simd_log2_d8(x); | ||
| 4202 | } | ||
| 4203 | #else | ||
| 4204 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4205 | return simd_make_double8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4206 | } | ||
| 4207 | #endif | ||
| 4208 | |||
| 4209 | #pragma mark - log10 implementation | ||
| 4210 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x) { | ||
| 4211 | return simd_make_float2(__tg_log10(simd_make_float4(x))); | ||
| 4212 | } | ||
| 4213 | |||
| 4214 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x) { | ||
| 4215 | return simd_make_float3(__tg_log10(simd_make_float4(x))); | ||
| 4216 | } | ||
| 4217 | |||
| 4218 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4219 | extern simd_float4 _simd_log10_f4(simd_float4 x); | ||
| 4220 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4221 | return _simd_log10_f4(x); | ||
| 4222 | } | ||
| 4223 | #else | ||
| 4224 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4225 | return simd_make_float4(log10(x.x), log10(x.y), log10(x.z), log10(x.w)); | ||
| 4226 | } | ||
| 4227 | #endif | ||
| 4228 | |||
| 4229 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4230 | extern simd_float8 _simd_log10_f8(simd_float8 x); | ||
| 4231 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4232 | return _simd_log10_f8(x); | ||
| 4233 | } | ||
| 4234 | #else | ||
| 4235 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4236 | return simd_make_float8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4237 | } | ||
| 4238 | #endif | ||
| 4239 | |||
| 4240 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4241 | extern simd_float16 _simd_log10_f16(simd_float16 x); | ||
| 4242 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4243 | return _simd_log10_f16(x); | ||
| 4244 | } | ||
| 4245 | #else | ||
| 4246 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4247 | return simd_make_float16(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4248 | } | ||
| 4249 | #endif | ||
| 4250 | |||
| 4251 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4252 | extern simd_double2 _simd_log10_d2(simd_double2 x); | ||
| 4253 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4254 | return _simd_log10_d2(x); | ||
| 4255 | } | ||
| 4256 | #else | ||
| 4257 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4258 | return simd_make_double2(log10(x.x), log10(x.y)); | ||
| 4259 | } | ||
| 4260 | #endif | ||
| 4261 | |||
| 4262 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) { | ||
| 4263 | return simd_make_double3(__tg_log10(simd_make_double4(x))); | ||
| 4264 | } | ||
| 4265 | |||
| 4266 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4267 | extern simd_double4 _simd_log10_d4(simd_double4 x); | ||
| 4268 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4269 | return _simd_log10_d4(x); | ||
| 4270 | } | ||
| 4271 | #else | ||
| 4272 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4273 | return simd_make_double4(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4274 | } | ||
| 4275 | #endif | ||
| 4276 | |||
| 4277 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4278 | extern simd_double8 _simd_log10_d8(simd_double8 x); | ||
| 4279 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4280 | return _simd_log10_d8(x); | ||
| 4281 | } | ||
| 4282 | #else | ||
| 4283 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4284 | return simd_make_double8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4285 | } | ||
| 4286 | #endif | ||
| 4287 | |||
| 4288 | #pragma mark - log1p implementation | ||
| 4289 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x) { | ||
| 4290 | return simd_make_float2(__tg_log1p(simd_make_float4(x))); | ||
| 4291 | } | ||
| 4292 | |||
| 4293 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x) { | ||
| 4294 | return simd_make_float3(__tg_log1p(simd_make_float4(x))); | ||
| 4295 | } | ||
| 4296 | |||
| 4297 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4298 | extern simd_float4 _simd_log1p_f4(simd_float4 x); | ||
| 4299 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4300 | return _simd_log1p_f4(x); | ||
| 4301 | } | ||
| 4302 | #else | ||
| 4303 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4304 | return simd_make_float4(log1p(x.x), log1p(x.y), log1p(x.z), log1p(x.w)); | ||
| 4305 | } | ||
| 4306 | #endif | ||
| 4307 | |||
| 4308 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4309 | extern simd_float8 _simd_log1p_f8(simd_float8 x); | ||
| 4310 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4311 | return _simd_log1p_f8(x); | ||
| 4312 | } | ||
| 4313 | #else | ||
| 4314 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4315 | return simd_make_float8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4316 | } | ||
| 4317 | #endif | ||
| 4318 | |||
| 4319 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4320 | extern simd_float16 _simd_log1p_f16(simd_float16 x); | ||
| 4321 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4322 | return _simd_log1p_f16(x); | ||
| 4323 | } | ||
| 4324 | #else | ||
| 4325 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4326 | return simd_make_float16(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4327 | } | ||
| 4328 | #endif | ||
| 4329 | |||
| 4330 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4331 | extern simd_double2 _simd_log1p_d2(simd_double2 x); | ||
| 4332 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4333 | return _simd_log1p_d2(x); | ||
| 4334 | } | ||
| 4335 | #else | ||
| 4336 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4337 | return simd_make_double2(log1p(x.x), log1p(x.y)); | ||
| 4338 | } | ||
| 4339 | #endif | ||
| 4340 | |||
| 4341 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) { | ||
| 4342 | return simd_make_double3(__tg_log1p(simd_make_double4(x))); | ||
| 4343 | } | ||
| 4344 | |||
| 4345 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4346 | extern simd_double4 _simd_log1p_d4(simd_double4 x); | ||
| 4347 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4348 | return _simd_log1p_d4(x); | ||
| 4349 | } | ||
| 4350 | #else | ||
| 4351 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4352 | return simd_make_double4(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4353 | } | ||
| 4354 | #endif | ||
| 4355 | |||
| 4356 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4357 | extern simd_double8 _simd_log1p_d8(simd_double8 x); | ||
| 4358 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4359 | return _simd_log1p_d8(x); | ||
| 4360 | } | ||
| 4361 | #else | ||
| 4362 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4363 | return simd_make_double8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4364 | } | ||
| 4365 | #endif | ||
| 4366 | |||
| 4367 | #pragma mark - cbrt implementation | ||
| 4368 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x) { | ||
| 4369 | return simd_make_float2(__tg_cbrt(simd_make_float4(x))); | ||
| 4370 | } | ||
| 4371 | |||
| 4372 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x) { | ||
| 4373 | return simd_make_float3(__tg_cbrt(simd_make_float4(x))); | ||
| 4374 | } | ||
| 4375 | |||
| 4376 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4377 | extern simd_float4 _simd_cbrt_f4(simd_float4 x); | ||
| 4378 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4379 | return _simd_cbrt_f4(x); | ||
| 4380 | } | ||
| 4381 | #else | ||
| 4382 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4383 | return simd_make_float4(cbrt(x.x), cbrt(x.y), cbrt(x.z), cbrt(x.w)); | ||
| 4384 | } | ||
| 4385 | #endif | ||
| 4386 | |||
| 4387 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4388 | extern simd_float8 _simd_cbrt_f8(simd_float8 x); | ||
| 4389 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4390 | return _simd_cbrt_f8(x); | ||
| 4391 | } | ||
| 4392 | #else | ||
| 4393 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4394 | return simd_make_float8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4395 | } | ||
| 4396 | #endif | ||
| 4397 | |||
| 4398 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4399 | extern simd_float16 _simd_cbrt_f16(simd_float16 x); | ||
| 4400 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4401 | return _simd_cbrt_f16(x); | ||
| 4402 | } | ||
| 4403 | #else | ||
| 4404 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4405 | return simd_make_float16(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4406 | } | ||
| 4407 | #endif | ||
| 4408 | |||
| 4409 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4410 | extern simd_double2 _simd_cbrt_d2(simd_double2 x); | ||
| 4411 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4412 | return _simd_cbrt_d2(x); | ||
| 4413 | } | ||
| 4414 | #else | ||
| 4415 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4416 | return simd_make_double2(cbrt(x.x), cbrt(x.y)); | ||
| 4417 | } | ||
| 4418 | #endif | ||
| 4419 | |||
| 4420 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) { | ||
| 4421 | return simd_make_double3(__tg_cbrt(simd_make_double4(x))); | ||
| 4422 | } | ||
| 4423 | |||
| 4424 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4425 | extern simd_double4 _simd_cbrt_d4(simd_double4 x); | ||
| 4426 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4427 | return _simd_cbrt_d4(x); | ||
| 4428 | } | ||
| 4429 | #else | ||
| 4430 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4431 | return simd_make_double4(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4432 | } | ||
| 4433 | #endif | ||
| 4434 | |||
| 4435 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4436 | extern simd_double8 _simd_cbrt_d8(simd_double8 x); | ||
| 4437 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4438 | return _simd_cbrt_d8(x); | ||
| 4439 | } | ||
| 4440 | #else | ||
| 4441 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4442 | return simd_make_double8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4443 | } | ||
| 4444 | #endif | ||
| 4445 | |||
| 4446 | #pragma mark - erf implementation | ||
| 4447 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x) { | ||
| 4448 | return simd_make_float2(__tg_erf(simd_make_float4(x))); | ||
| 4449 | } | ||
| 4450 | |||
| 4451 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x) { | ||
| 4452 | return simd_make_float3(__tg_erf(simd_make_float4(x))); | ||
| 4453 | } | ||
| 4454 | |||
| 4455 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4456 | extern simd_float4 _simd_erf_f4(simd_float4 x); | ||
| 4457 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4458 | return _simd_erf_f4(x); | ||
| 4459 | } | ||
| 4460 | #else | ||
| 4461 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4462 | return simd_make_float4(erf(x.x), erf(x.y), erf(x.z), erf(x.w)); | ||
| 4463 | } | ||
| 4464 | #endif | ||
| 4465 | |||
| 4466 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4467 | extern simd_float8 _simd_erf_f8(simd_float8 x); | ||
| 4468 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4469 | return _simd_erf_f8(x); | ||
| 4470 | } | ||
| 4471 | #else | ||
| 4472 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4473 | return simd_make_float8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4474 | } | ||
| 4475 | #endif | ||
| 4476 | |||
| 4477 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4478 | extern simd_float16 _simd_erf_f16(simd_float16 x); | ||
| 4479 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4480 | return _simd_erf_f16(x); | ||
| 4481 | } | ||
| 4482 | #else | ||
| 4483 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4484 | return simd_make_float16(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4485 | } | ||
| 4486 | #endif | ||
| 4487 | |||
| 4488 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4489 | extern simd_double2 _simd_erf_d2(simd_double2 x); | ||
| 4490 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4491 | return _simd_erf_d2(x); | ||
| 4492 | } | ||
| 4493 | #else | ||
| 4494 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4495 | return simd_make_double2(erf(x.x), erf(x.y)); | ||
| 4496 | } | ||
| 4497 | #endif | ||
| 4498 | |||
| 4499 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) { | ||
| 4500 | return simd_make_double3(__tg_erf(simd_make_double4(x))); | ||
| 4501 | } | ||
| 4502 | |||
| 4503 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4504 | extern simd_double4 _simd_erf_d4(simd_double4 x); | ||
| 4505 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4506 | return _simd_erf_d4(x); | ||
| 4507 | } | ||
| 4508 | #else | ||
| 4509 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4510 | return simd_make_double4(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4511 | } | ||
| 4512 | #endif | ||
| 4513 | |||
| 4514 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4515 | extern simd_double8 _simd_erf_d8(simd_double8 x); | ||
| 4516 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4517 | return _simd_erf_d8(x); | ||
| 4518 | } | ||
| 4519 | #else | ||
| 4520 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4521 | return simd_make_double8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4522 | } | ||
| 4523 | #endif | ||
| 4524 | |||
| 4525 | #pragma mark - erfc implementation | ||
| 4526 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x) { | ||
| 4527 | return simd_make_float2(__tg_erfc(simd_make_float4(x))); | ||
| 4528 | } | ||
| 4529 | |||
| 4530 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x) { | ||
| 4531 | return simd_make_float3(__tg_erfc(simd_make_float4(x))); | ||
| 4532 | } | ||
| 4533 | |||
| 4534 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4535 | extern simd_float4 _simd_erfc_f4(simd_float4 x); | ||
| 4536 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4537 | return _simd_erfc_f4(x); | ||
| 4538 | } | ||
| 4539 | #else | ||
| 4540 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4541 | return simd_make_float4(erfc(x.x), erfc(x.y), erfc(x.z), erfc(x.w)); | ||
| 4542 | } | ||
| 4543 | #endif | ||
| 4544 | |||
| 4545 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4546 | extern simd_float8 _simd_erfc_f8(simd_float8 x); | ||
| 4547 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4548 | return _simd_erfc_f8(x); | ||
| 4549 | } | ||
| 4550 | #else | ||
| 4551 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4552 | return simd_make_float8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4553 | } | ||
| 4554 | #endif | ||
| 4555 | |||
| 4556 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4557 | extern simd_float16 _simd_erfc_f16(simd_float16 x); | ||
| 4558 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4559 | return _simd_erfc_f16(x); | ||
| 4560 | } | ||
| 4561 | #else | ||
| 4562 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4563 | return simd_make_float16(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4564 | } | ||
| 4565 | #endif | ||
| 4566 | |||
| 4567 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4568 | extern simd_double2 _simd_erfc_d2(simd_double2 x); | ||
| 4569 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4570 | return _simd_erfc_d2(x); | ||
| 4571 | } | ||
| 4572 | #else | ||
| 4573 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4574 | return simd_make_double2(erfc(x.x), erfc(x.y)); | ||
| 4575 | } | ||
| 4576 | #endif | ||
| 4577 | |||
| 4578 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) { | ||
| 4579 | return simd_make_double3(__tg_erfc(simd_make_double4(x))); | ||
| 4580 | } | ||
| 4581 | |||
| 4582 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4583 | extern simd_double4 _simd_erfc_d4(simd_double4 x); | ||
| 4584 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4585 | return _simd_erfc_d4(x); | ||
| 4586 | } | ||
| 4587 | #else | ||
| 4588 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4589 | return simd_make_double4(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4590 | } | ||
| 4591 | #endif | ||
| 4592 | |||
| 4593 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4594 | extern simd_double8 _simd_erfc_d8(simd_double8 x); | ||
| 4595 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4596 | return _simd_erfc_d8(x); | ||
| 4597 | } | ||
| 4598 | #else | ||
| 4599 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4600 | return simd_make_double8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4601 | } | ||
| 4602 | #endif | ||
| 4603 | |||
| 4604 | #pragma mark - tgamma implementation | ||
| 4605 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x) { | ||
| 4606 | return simd_make_float2(__tg_tgamma(simd_make_float4(x))); | ||
| 4607 | } | ||
| 4608 | |||
| 4609 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x) { | ||
| 4610 | return simd_make_float3(__tg_tgamma(simd_make_float4(x))); | ||
| 4611 | } | ||
| 4612 | |||
| 4613 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4614 | extern simd_float4 _simd_tgamma_f4(simd_float4 x); | ||
| 4615 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4616 | return _simd_tgamma_f4(x); | ||
| 4617 | } | ||
| 4618 | #else | ||
| 4619 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4620 | return simd_make_float4(tgamma(x.x), tgamma(x.y), tgamma(x.z), tgamma(x.w)); | ||
| 4621 | } | ||
| 4622 | #endif | ||
| 4623 | |||
| 4624 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4625 | extern simd_float8 _simd_tgamma_f8(simd_float8 x); | ||
| 4626 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4627 | return _simd_tgamma_f8(x); | ||
| 4628 | } | ||
| 4629 | #else | ||
| 4630 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4631 | return simd_make_float8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4632 | } | ||
| 4633 | #endif | ||
| 4634 | |||
| 4635 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4636 | extern simd_float16 _simd_tgamma_f16(simd_float16 x); | ||
| 4637 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4638 | return _simd_tgamma_f16(x); | ||
| 4639 | } | ||
| 4640 | #else | ||
| 4641 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4642 | return simd_make_float16(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4643 | } | ||
| 4644 | #endif | ||
| 4645 | |||
| 4646 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4647 | extern simd_double2 _simd_tgamma_d2(simd_double2 x); | ||
| 4648 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4649 | return _simd_tgamma_d2(x); | ||
| 4650 | } | ||
| 4651 | #else | ||
| 4652 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4653 | return simd_make_double2(tgamma(x.x), tgamma(x.y)); | ||
| 4654 | } | ||
| 4655 | #endif | ||
| 4656 | |||
| 4657 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) { | ||
| 4658 | return simd_make_double3(__tg_tgamma(simd_make_double4(x))); | ||
| 4659 | } | ||
| 4660 | |||
| 4661 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4662 | extern simd_double4 _simd_tgamma_d4(simd_double4 x); | ||
| 4663 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4664 | return _simd_tgamma_d4(x); | ||
| 4665 | } | ||
| 4666 | #else | ||
| 4667 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4668 | return simd_make_double4(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4669 | } | ||
| 4670 | #endif | ||
| 4671 | |||
| 4672 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4673 | extern simd_double8 _simd_tgamma_d8(simd_double8 x); | ||
| 4674 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 4675 | return _simd_tgamma_d8(x); | ||
| 4676 | } | ||
| 4677 | #else | ||
| 4678 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 4679 | return simd_make_double8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4680 | } | ||
| 4681 | #endif | ||
| 4682 | |||
| 4683 | #pragma mark - round implementation | ||
| 4684 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x) { | ||
| 4685 | return simd_make_float2(__tg_round(simd_make_float4(x))); | ||
| 4686 | } | ||
| 4687 | |||
| 4688 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x) { | ||
| 4689 | return simd_make_float3(__tg_round(simd_make_float4(x))); | ||
| 4690 | } | ||
| 4691 | |||
| 4692 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4693 | extern simd_float4 _simd_round_f4(simd_float4 x); | ||
| 4694 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 4695 | #if defined __arm64__ | ||
| 4696 | return vrndaq_f32(x); | ||
| 4697 | #else | ||
| 4698 | return _simd_round_f4(x); | ||
| 4699 | #endif | ||
| 4700 | } | ||
| 4701 | #else | ||
| 4702 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 4703 | return simd_make_float4(round(x.x), round(x.y), round(x.z), round(x.w)); | ||
| 4704 | } | ||
| 4705 | #endif | ||
| 4706 | |||
| 4707 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4708 | extern simd_float8 _simd_round_f8(simd_float8 x); | ||
| 4709 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 4710 | return _simd_round_f8(x); | ||
| 4711 | } | ||
| 4712 | #else | ||
| 4713 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 4714 | return simd_make_float8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 4715 | } | ||
| 4716 | #endif | ||
| 4717 | |||
| 4718 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4719 | extern simd_float16 _simd_round_f16(simd_float16 x); | ||
| 4720 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 4721 | return _simd_round_f16(x); | ||
| 4722 | } | ||
| 4723 | #else | ||
| 4724 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 4725 | return simd_make_float16(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 4726 | } | ||
| 4727 | #endif | ||
| 4728 | |||
| 4729 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4730 | extern simd_double2 _simd_round_d2(simd_double2 x); | ||
| 4731 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 4732 | #if defined __arm64__ | ||
| 4733 | return vrndaq_f64(x); | ||
| 4734 | #else | ||
| 4735 | return _simd_round_d2(x); | ||
| 4736 | #endif | ||
| 4737 | } | ||
| 4738 | #else | ||
| 4739 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 4740 | return simd_make_double2(round(x.x), round(x.y)); | ||
| 4741 | } | ||
| 4742 | #endif | ||
| 4743 | |||
| 4744 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) { | ||
| 4745 | return simd_make_double3(__tg_round(simd_make_double4(x))); | ||
| 4746 | } | ||
| 4747 | |||
| 4748 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4749 | extern simd_double4 _simd_round_d4(simd_double4 x); | ||
| 4750 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 4751 | return _simd_round_d4(x); | ||
| 4752 | } | ||
| 4753 | #else | ||
| 4754 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 4755 | return simd_make_double4(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 4756 | } | ||
| 4757 | #endif | ||
| 4758 | |||
| 4759 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4760 | extern simd_double8 _simd_round_d8(simd_double8 x); | ||
| 4761 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 4762 | return _simd_round_d8(x); | ||
| 4763 | } | ||
| 4764 | #else | ||
| 4765 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 4766 | return simd_make_double8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 4767 | } | ||
| 4768 | #endif | ||
| 4769 | |||
| 4770 | #pragma mark - atan2 implementation | ||
| 4771 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x) { | ||
| 4772 | return simd_make_float2(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 4773 | } | ||
| 4774 | |||
| 4775 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x) { | ||
| 4776 | return simd_make_float3(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 4777 | } | ||
| 4778 | |||
| 4779 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4780 | extern simd_float4 _simd_atan2_f4(simd_float4 y, simd_float4 x); | ||
| 4781 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 4782 | return _simd_atan2_f4(y, x); | ||
| 4783 | } | ||
| 4784 | #else | ||
| 4785 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 4786 | return simd_make_float4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w)); | ||
| 4787 | } | ||
| 4788 | #endif | ||
| 4789 | |||
| 4790 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4791 | extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x); | ||
| 4792 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 4793 | return _simd_atan2_f8(y, x); | ||
| 4794 | } | ||
| 4795 | #else | ||
| 4796 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 4797 | return simd_make_float8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 4798 | } | ||
| 4799 | #endif | ||
| 4800 | |||
| 4801 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4802 | extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x); | ||
| 4803 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 4804 | return _simd_atan2_f16(y, x); | ||
| 4805 | } | ||
| 4806 | #else | ||
| 4807 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 4808 | return simd_make_float16(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 4809 | } | ||
| 4810 | #endif | ||
| 4811 | |||
| 4812 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4813 | extern simd_double2 _simd_atan2_d2(simd_double2 y, simd_double2 x); | ||
| 4814 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 4815 | return _simd_atan2_d2(y, x); | ||
| 4816 | } | ||
| 4817 | #else | ||
| 4818 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 4819 | return simd_make_double2(atan2(y.x, x.x), atan2(y.y, x.y)); | ||
| 4820 | } | ||
| 4821 | #endif | ||
| 4822 | |||
| 4823 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x) { | ||
| 4824 | return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x))); | ||
| 4825 | } | ||
| 4826 | |||
| 4827 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4828 | extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x); | ||
| 4829 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 4830 | return _simd_atan2_d4(y, x); | ||
| 4831 | } | ||
| 4832 | #else | ||
| 4833 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 4834 | return simd_make_double4(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 4835 | } | ||
| 4836 | #endif | ||
| 4837 | |||
| 4838 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4839 | extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x); | ||
| 4840 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 4841 | return _simd_atan2_d8(y, x); | ||
| 4842 | } | ||
| 4843 | #else | ||
| 4844 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 4845 | return simd_make_double8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 4846 | } | ||
| 4847 | #endif | ||
| 4848 | |||
| 4849 | #pragma mark - hypot implementation | ||
| 4850 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y) { | ||
| 4851 | return simd_make_float2(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 4852 | } | ||
| 4853 | |||
| 4854 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y) { | ||
| 4855 | return simd_make_float3(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 4856 | } | ||
| 4857 | |||
| 4858 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4859 | extern simd_float4 _simd_hypot_f4(simd_float4 x, simd_float4 y); | ||
| 4860 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 4861 | return _simd_hypot_f4(x, y); | ||
| 4862 | } | ||
| 4863 | #else | ||
| 4864 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 4865 | return simd_make_float4(hypot(x.x, y.x), hypot(x.y, y.y), hypot(x.z, y.z), hypot(x.w, y.w)); | ||
| 4866 | } | ||
| 4867 | #endif | ||
| 4868 | |||
| 4869 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4870 | extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y); | ||
| 4871 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 4872 | return _simd_hypot_f8(x, y); | ||
| 4873 | } | ||
| 4874 | #else | ||
| 4875 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 4876 | return simd_make_float8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 4877 | } | ||
| 4878 | #endif | ||
| 4879 | |||
| 4880 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4881 | extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y); | ||
| 4882 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 4883 | return _simd_hypot_f16(x, y); | ||
| 4884 | } | ||
| 4885 | #else | ||
| 4886 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 4887 | return simd_make_float16(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 4888 | } | ||
| 4889 | #endif | ||
| 4890 | |||
| 4891 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4892 | extern simd_double2 _simd_hypot_d2(simd_double2 x, simd_double2 y); | ||
| 4893 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 4894 | return _simd_hypot_d2(x, y); | ||
| 4895 | } | ||
| 4896 | #else | ||
| 4897 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 4898 | return simd_make_double2(hypot(x.x, y.x), hypot(x.y, y.y)); | ||
| 4899 | } | ||
| 4900 | #endif | ||
| 4901 | |||
| 4902 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y) { | ||
| 4903 | return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y))); | ||
| 4904 | } | ||
| 4905 | |||
| 4906 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4907 | extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y); | ||
| 4908 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 4909 | return _simd_hypot_d4(x, y); | ||
| 4910 | } | ||
| 4911 | #else | ||
| 4912 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 4913 | return simd_make_double4(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 4914 | } | ||
| 4915 | #endif | ||
| 4916 | |||
| 4917 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4918 | extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y); | ||
| 4919 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 4920 | return _simd_hypot_d8(x, y); | ||
| 4921 | } | ||
| 4922 | #else | ||
| 4923 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 4924 | return simd_make_double8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 4925 | } | ||
| 4926 | #endif | ||
| 4927 | |||
| 4928 | #pragma mark - pow implementation | ||
| 4929 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y) { | ||
| 4930 | return simd_make_float2(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 4931 | } | ||
| 4932 | |||
| 4933 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y) { | ||
| 4934 | return simd_make_float3(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 4935 | } | ||
| 4936 | |||
| 4937 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4938 | extern simd_float4 _simd_pow_f4(simd_float4 x, simd_float4 y); | ||
| 4939 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 4940 | return _simd_pow_f4(x, y); | ||
| 4941 | } | ||
| 4942 | #else | ||
| 4943 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 4944 | return simd_make_float4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w)); | ||
| 4945 | } | ||
| 4946 | #endif | ||
| 4947 | |||
| 4948 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4949 | extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y); | ||
| 4950 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 4951 | return _simd_pow_f8(x, y); | ||
| 4952 | } | ||
| 4953 | #else | ||
| 4954 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 4955 | return simd_make_float8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 4956 | } | ||
| 4957 | #endif | ||
| 4958 | |||
| 4959 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4960 | extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y); | ||
| 4961 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 4962 | return _simd_pow_f16(x, y); | ||
| 4963 | } | ||
| 4964 | #else | ||
| 4965 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 4966 | return simd_make_float16(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 4967 | } | ||
| 4968 | #endif | ||
| 4969 | |||
| 4970 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4971 | extern simd_double2 _simd_pow_d2(simd_double2 x, simd_double2 y); | ||
| 4972 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 4973 | return _simd_pow_d2(x, y); | ||
| 4974 | } | ||
| 4975 | #else | ||
| 4976 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 4977 | return simd_make_double2(pow(x.x, y.x), pow(x.y, y.y)); | ||
| 4978 | } | ||
| 4979 | #endif | ||
| 4980 | |||
| 4981 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) { | ||
| 4982 | return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y))); | ||
| 4983 | } | ||
| 4984 | |||
| 4985 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4986 | extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y); | ||
| 4987 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 4988 | return _simd_pow_d4(x, y); | ||
| 4989 | } | ||
| 4990 | #else | ||
| 4991 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 4992 | return simd_make_double4(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 4993 | } | ||
| 4994 | #endif | ||
| 4995 | |||
| 4996 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4997 | extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y); | ||
| 4998 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 4999 | return _simd_pow_d8(x, y); | ||
| 5000 | } | ||
| 5001 | #else | ||
| 5002 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 5003 | return simd_make_double8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5004 | } | ||
| 5005 | #endif | ||
| 5006 | |||
| 5007 | #pragma mark - fmod implementation | ||
| 5008 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y) { | ||
| 5009 | return simd_make_float2(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5010 | } | ||
| 5011 | |||
| 5012 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y) { | ||
| 5013 | return simd_make_float3(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5014 | } | ||
| 5015 | |||
| 5016 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5017 | extern simd_float4 _simd_fmod_f4(simd_float4 x, simd_float4 y); | ||
| 5018 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5019 | return _simd_fmod_f4(x, y); | ||
| 5020 | } | ||
| 5021 | #else | ||
| 5022 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5023 | return simd_make_float4(fmod(x.x, y.x), fmod(x.y, y.y), fmod(x.z, y.z), fmod(x.w, y.w)); | ||
| 5024 | } | ||
| 5025 | #endif | ||
| 5026 | |||
| 5027 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5028 | extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y); | ||
| 5029 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5030 | return _simd_fmod_f8(x, y); | ||
| 5031 | } | ||
| 5032 | #else | ||
| 5033 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5034 | return simd_make_float8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5035 | } | ||
| 5036 | #endif | ||
| 5037 | |||
| 5038 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5039 | extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y); | ||
| 5040 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5041 | return _simd_fmod_f16(x, y); | ||
| 5042 | } | ||
| 5043 | #else | ||
| 5044 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5045 | return simd_make_float16(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5046 | } | ||
| 5047 | #endif | ||
| 5048 | |||
| 5049 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5050 | extern simd_double2 _simd_fmod_d2(simd_double2 x, simd_double2 y); | ||
| 5051 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5052 | return _simd_fmod_d2(x, y); | ||
| 5053 | } | ||
| 5054 | #else | ||
| 5055 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5056 | return simd_make_double2(fmod(x.x, y.x), fmod(x.y, y.y)); | ||
| 5057 | } | ||
| 5058 | #endif | ||
| 5059 | |||
| 5060 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y) { | ||
| 5061 | return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y))); | ||
| 5062 | } | ||
| 5063 | |||
| 5064 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5065 | extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y); | ||
| 5066 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5067 | return _simd_fmod_d4(x, y); | ||
| 5068 | } | ||
| 5069 | #else | ||
| 5070 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5071 | return simd_make_double4(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5072 | } | ||
| 5073 | #endif | ||
| 5074 | |||
| 5075 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5076 | extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y); | ||
| 5077 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5078 | return _simd_fmod_d8(x, y); | ||
| 5079 | } | ||
| 5080 | #else | ||
| 5081 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5082 | return simd_make_double8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5083 | } | ||
| 5084 | #endif | ||
| 5085 | |||
| 5086 | #pragma mark - remainder implementation | ||
| 5087 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y) { | ||
| 5088 | return simd_make_float2(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5089 | } | ||
| 5090 | |||
| 5091 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y) { | ||
| 5092 | return simd_make_float3(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5093 | } | ||
| 5094 | |||
| 5095 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5096 | extern simd_float4 _simd_remainder_f4(simd_float4 x, simd_float4 y); | ||
| 5097 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5098 | return _simd_remainder_f4(x, y); | ||
| 5099 | } | ||
| 5100 | #else | ||
| 5101 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5102 | return simd_make_float4(remainder(x.x, y.x), remainder(x.y, y.y), remainder(x.z, y.z), remainder(x.w, y.w)); | ||
| 5103 | } | ||
| 5104 | #endif | ||
| 5105 | |||
| 5106 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5107 | extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y); | ||
| 5108 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5109 | return _simd_remainder_f8(x, y); | ||
| 5110 | } | ||
| 5111 | #else | ||
| 5112 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5113 | return simd_make_float8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5114 | } | ||
| 5115 | #endif | ||
| 5116 | |||
| 5117 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5118 | extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y); | ||
| 5119 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5120 | return _simd_remainder_f16(x, y); | ||
| 5121 | } | ||
| 5122 | #else | ||
| 5123 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5124 | return simd_make_float16(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5125 | } | ||
| 5126 | #endif | ||
| 5127 | |||
| 5128 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5129 | extern simd_double2 _simd_remainder_d2(simd_double2 x, simd_double2 y); | ||
| 5130 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5131 | return _simd_remainder_d2(x, y); | ||
| 5132 | } | ||
| 5133 | #else | ||
| 5134 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5135 | return simd_make_double2(remainder(x.x, y.x), remainder(x.y, y.y)); | ||
| 5136 | } | ||
| 5137 | #endif | ||
| 5138 | |||
| 5139 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y) { | ||
| 5140 | return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y))); | ||
| 5141 | } | ||
| 5142 | |||
| 5143 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5144 | extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y); | ||
| 5145 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5146 | return _simd_remainder_d4(x, y); | ||
| 5147 | } | ||
| 5148 | #else | ||
| 5149 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5150 | return simd_make_double4(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5151 | } | ||
| 5152 | #endif | ||
| 5153 | |||
| 5154 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5155 | extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y); | ||
| 5156 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5157 | return _simd_remainder_d8(x, y); | ||
| 5158 | } | ||
| 5159 | #else | ||
| 5160 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5161 | return simd_make_double8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5162 | } | ||
| 5163 | #endif | ||
| 5164 | |||
| 5165 | #pragma mark - nextafter implementation | ||
| 5166 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y) { | ||
| 5167 | return simd_make_float2(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5168 | } | ||
| 5169 | |||
| 5170 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y) { | ||
| 5171 | return simd_make_float3(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5172 | } | ||
| 5173 | |||
| 5174 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5175 | extern simd_float4 _simd_nextafter_f4(simd_float4 x, simd_float4 y); | ||
| 5176 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5177 | return _simd_nextafter_f4(x, y); | ||
| 5178 | } | ||
| 5179 | #else | ||
| 5180 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5181 | return simd_make_float4(nextafter(x.x, y.x), nextafter(x.y, y.y), nextafter(x.z, y.z), nextafter(x.w, y.w)); | ||
| 5182 | } | ||
| 5183 | #endif | ||
| 5184 | |||
| 5185 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5186 | extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y); | ||
| 5187 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5188 | return _simd_nextafter_f8(x, y); | ||
| 5189 | } | ||
| 5190 | #else | ||
| 5191 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5192 | return simd_make_float8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5193 | } | ||
| 5194 | #endif | ||
| 5195 | |||
| 5196 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5197 | extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y); | ||
| 5198 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5199 | return _simd_nextafter_f16(x, y); | ||
| 5200 | } | ||
| 5201 | #else | ||
| 5202 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5203 | return simd_make_float16(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5204 | } | ||
| 5205 | #endif | ||
| 5206 | |||
| 5207 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5208 | extern simd_double2 _simd_nextafter_d2(simd_double2 x, simd_double2 y); | ||
| 5209 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5210 | return _simd_nextafter_d2(x, y); | ||
| 5211 | } | ||
| 5212 | #else | ||
| 5213 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5214 | return simd_make_double2(nextafter(x.x, y.x), nextafter(x.y, y.y)); | ||
| 5215 | } | ||
| 5216 | #endif | ||
| 5217 | |||
| 5218 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y) { | ||
| 5219 | return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y))); | ||
| 5220 | } | ||
| 5221 | |||
| 5222 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5223 | extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y); | ||
| 5224 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5225 | return _simd_nextafter_d4(x, y); | ||
| 5226 | } | ||
| 5227 | #else | ||
| 5228 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5229 | return simd_make_double4(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5230 | } | ||
| 5231 | #endif | ||
| 5232 | |||
| 5233 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5234 | extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y); | ||
| 5235 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5236 | return _simd_nextafter_d8(x, y); | ||
| 5237 | } | ||
| 5238 | #else | ||
| 5239 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5240 | return simd_make_double8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5241 | } | ||
| 5242 | #endif | ||
| 5243 | |||
| 5244 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5245 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5246 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5247 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5248 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5249 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5250 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5251 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5252 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5253 | |||
| 5254 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5255 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5256 | return vfma_f32(z, x, y); | ||
| 5257 | #else | ||
| 5258 | return simd_make_float2(__tg_fma(simd_make_float4_undef(x), simd_make_float4_undef(y), simd_make_float4_undef(z))); | ||
| 5259 | #endif | ||
| 5260 | } | ||
| 5261 | |||
| 5262 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5263 | return simd_make_float3(__tg_fma(simd_make_float4(x), simd_make_float4(y), simd_make_float4(z))); | ||
| 5264 | } | ||
| 5265 | |||
| 5266 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5267 | extern simd_float4 _simd_fma_f4(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 5268 | #endif | ||
| 5269 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5270 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5271 | return vfmaq_f32(z, x, y); | ||
| 5272 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5273 | return _mm_fmadd_ps(x, y, z); | ||
| 5274 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5275 | return _simd_fma_f4(x, y, z); | ||
| 5276 | #else | ||
| 5277 | return simd_make_float4(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y), fma(x.z, y.z, z.z), fma(x.w, y.w, z.w)); | ||
| 5278 | #endif | ||
| 5279 | } | ||
| 5280 | |||
| 5281 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5282 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5283 | return _mm256_fmadd_ps(x, y, z); | ||
| 5284 | #else | ||
| 5285 | return simd_make_float8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5286 | #endif | ||
| 5287 | } | ||
| 5288 | |||
| 5289 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5290 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5291 | return _mm512_fmadd_ps(x, y, z); | ||
| 5292 | #else | ||
| 5293 | return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5294 | #endif | ||
| 5295 | } | ||
| 5296 | |||
| 5297 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5298 | extern simd_double2 _simd_fma_d2(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 5299 | #endif | ||
| 5300 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5301 | #if defined __arm64__ | ||
| 5302 | return vfmaq_f64(z, x, y); | ||
| 5303 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5304 | return _mm_fmadd_pd(x, y, z); | ||
| 5305 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5306 | return _simd_fma_d2(x, y, z); | ||
| 5307 | #else | ||
| 5308 | return simd_make_double2(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y)); | ||
| 5309 | #endif | ||
| 5310 | } | ||
| 5311 | |||
| 5312 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5313 | return simd_make_double3(__tg_fma(simd_make_double4(x), simd_make_double4(y), simd_make_double4(z))); | ||
| 5314 | } | ||
| 5315 | |||
| 5316 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5317 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5318 | return _mm256_fmadd_pd(x, y, z); | ||
| 5319 | #else | ||
| 5320 | return simd_make_double4(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5321 | #endif | ||
| 5322 | } | ||
| 5323 | |||
| 5324 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5325 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5326 | return _mm512_fmadd_pd(x, y, z); | ||
| 5327 | #else | ||
| 5328 | return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5329 | #endif | ||
| 5330 | } | ||
| 5331 | |||
| 5332 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z) { | ||
| 5333 | #pragma STDC FP_CONTRACT ON | ||
| 5334 | return x*y + z; | ||
| 5335 | } | ||
| 5336 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5337 | #pragma STDC FP_CONTRACT ON | ||
| 5338 | return x*y + z; | ||
| 5339 | } | ||
| 5340 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5341 | #pragma STDC FP_CONTRACT ON | ||
| 5342 | return x*y + z; | ||
| 5343 | } | ||
| 5344 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5345 | #pragma STDC FP_CONTRACT ON | ||
| 5346 | return x*y + z; | ||
| 5347 | } | ||
| 5348 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5349 | #pragma STDC FP_CONTRACT ON | ||
| 5350 | return x*y + z; | ||
| 5351 | } | ||
| 5352 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5353 | #pragma STDC FP_CONTRACT ON | ||
| 5354 | return x*y + z; | ||
| 5355 | } | ||
| 5356 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z) { | ||
| 5357 | #pragma STDC FP_CONTRACT ON | ||
| 5358 | return x*y + z; | ||
| 5359 | } | ||
| 5360 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5361 | #pragma STDC FP_CONTRACT ON | ||
| 5362 | return x*y + z; | ||
| 5363 | } | ||
| 5364 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5365 | #pragma STDC FP_CONTRACT ON | ||
| 5366 | return x*y + z; | ||
| 5367 | } | ||
| 5368 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5369 | #pragma STDC FP_CONTRACT ON | ||
| 5370 | return x*y + z; | ||
| 5371 | } | ||
| 5372 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5373 | #pragma STDC FP_CONTRACT ON | ||
| 5374 | return x*y + z; | ||
| 5375 | } | ||
| 5376 | #ifdef __cplusplus | ||
| 5377 | } /* extern "C" */ | ||
| 5378 | #endif | ||
| 5379 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 5380 | #endif /* SIMD_MATH_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/simd/quaternion.h deleted-1194| ... | @@ -1,1194 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines functions for constructing and using quaternions. | ||
| 3 | * @copyright 2015-2016 Apple, Inc. All rights reserved. | ||
| 4 | * @unsorted */ | ||
| 5 | |||
| 6 | #ifndef SIMD_QUATERNIONS | ||
| 7 | #define SIMD_QUATERNIONS | ||
| 8 | |||
| 9 | #include <simd/base.h> | ||
| 10 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 11 | #include <simd/vector.h> | ||
| 12 | #include <simd/types.h> | ||
| 13 | |||
| 14 | #ifdef __cplusplus | ||
| 15 | extern "C" { | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* MARK: - C and Objective-C float interfaces */ | ||
| 19 | |||
| 20 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 21 | * | ||
| 22 | * @param ix The first component of the imaginary (vector) part. | ||
| 23 | * @param iy The second component of the imaginary (vector) part. | ||
| 24 | * @param iz The third component of the imaginary (vector) part. | ||
| 25 | * | ||
| 26 | * @param r The real (scalar) part. */ | ||
| 27 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float ix, float iy, float iz, float r) { | ||
| 28 | return (simd_quatf){ { ix, iy, iz, r } }; | ||
| 29 | } | ||
| 30 | |||
| 31 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 32 | * | ||
| 33 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 34 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 35 | static inline SIMD_NONCONST simd_quatf simd_quaternion(const float xyzr[4]) { | ||
| 36 | return (simd_quatf){ *(const simd_packed_float4 *)xyzr }; | ||
| 37 | } | ||
| 38 | |||
| 39 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 40 | * | ||
| 41 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 42 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 43 | * lane 3. */ | ||
| 44 | static inline SIMD_CFUNC simd_quatf simd_quaternion(simd_float4 xyzr) { | ||
| 45 | return (simd_quatf){ xyzr }; | ||
| 46 | } | ||
| 47 | |||
| 48 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 49 | * `axis`. */ | ||
| 50 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis); | ||
| 51 | |||
| 52 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 53 | * | ||
| 54 | * @param from A normalized three-element vector. | ||
| 55 | * @param to A normalized three-element vector. | ||
| 56 | * | ||
| 57 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 58 | * `to` point in opposite directions (to within machine precision), an | ||
| 59 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 60 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to); | ||
| 61 | |||
| 62 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 63 | * | ||
| 64 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 65 | * is undefined. */ | ||
| 66 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix); | ||
| 67 | |||
| 68 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 69 | * | ||
| 70 | * @discussion The last row and column of the matrix are ignored. This | ||
| 71 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 72 | * submatrix . */ | ||
| 73 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix); | ||
| 74 | |||
| 75 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 76 | static inline SIMD_CFUNC float simd_real(simd_quatf q) { | ||
| 77 | return q.vector.w; | ||
| 78 | } | ||
| 79 | |||
| 80 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 81 | static inline SIMD_CFUNC simd_float3 simd_imag(simd_quatf q) { | ||
| 82 | return q.vector.xyz; | ||
| 83 | } | ||
| 84 | |||
| 85 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 86 | static inline SIMD_CFUNC float simd_angle(simd_quatf q); | ||
| 87 | |||
| 88 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 89 | * action of the quaternion `q` rotates. */ | ||
| 90 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q); | ||
| 91 | |||
| 92 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 93 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q); | ||
| 94 | |||
| 95 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 96 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q); | ||
| 97 | |||
| 98 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 99 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q); | ||
| 100 | |||
| 101 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 102 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a); | ||
| 103 | |||
| 104 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 105 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q); | ||
| 106 | |||
| 107 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 108 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q); | ||
| 109 | |||
| 110 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 111 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q); | ||
| 112 | |||
| 113 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 114 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q); | ||
| 115 | |||
| 116 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 117 | * four-dimensional vectors. */ | ||
| 118 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q); | ||
| 119 | |||
| 120 | /*! @abstract The length of the quaternion `q`. */ | ||
| 121 | static inline SIMD_CFUNC float simd_length(simd_quatf q); | ||
| 122 | |||
| 123 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 124 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q); | ||
| 125 | |||
| 126 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 127 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v); | ||
| 128 | |||
| 129 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 130 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 131 | * | ||
| 132 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 133 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 134 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 135 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 136 | * | ||
| 137 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 138 | * quaternions, because it is primarily used for spline interpolation of | ||
| 139 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 140 | * quaternions, you can use the following approach: | ||
| 141 | * | ||
| 142 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 143 | * logq = log(simd_recip(scale)*q); | ||
| 144 | * logq.real += log(scale); | ||
| 145 | * return logq; */ | ||
| 146 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q); | ||
| 147 | |||
| 148 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 149 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 150 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q); | ||
| 151 | |||
| 152 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 153 | * quaternions `q0` and `q1`. */ | ||
| 154 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t); | ||
| 155 | |||
| 156 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 157 | * quaternions `q0` and `q1`. */ | ||
| 158 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t); | ||
| 159 | |||
| 160 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 161 | * | ||
| 162 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 163 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 164 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 165 | * rotations. */ | ||
| 166 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 167 | |||
| 168 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 169 | * | ||
| 170 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 171 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 172 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 173 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 174 | * curve does not hold on the sphere. */ | ||
| 175 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 176 | |||
| 177 | #ifdef __cplusplus | ||
| 178 | } /* extern "C" */ | ||
| 179 | /* MARK: - C++ float interfaces */ | ||
| 180 | |||
| 181 | namespace simd { | ||
| 182 | struct quatf : ::simd_quatf { | ||
| 183 | /*! @abstract The identity quaternion. */ | ||
| 184 | quatf( ) : ::simd_quatf(::simd_quaternion((float4){0,0,0,1})) { } | ||
| 185 | |||
| 186 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 187 | quatf(::simd_quatf q) : ::simd_quatf(q) { } | ||
| 188 | |||
| 189 | /*! @abstract Constructs a quaternion from components. */ | ||
| 190 | quatf(float ix, float iy, float iz, float r) : ::simd_quatf(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 191 | |||
| 192 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 193 | quatf(const float xyzr[4]) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 194 | |||
| 195 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 196 | quatf(float4 xyzr) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 197 | |||
| 198 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 199 | * radians. */ | ||
| 200 | quatf(float angle, float3 axis) : ::simd_quatf(::simd_quaternion(angle, axis)) { } | ||
| 201 | |||
| 202 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 203 | quatf(float3 from, float3 to) : ::simd_quatf(::simd_quaternion(from, to)) { } | ||
| 204 | |||
| 205 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 206 | quatf(::simd_float3x3 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 207 | |||
| 208 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 209 | quatf(::simd_float4x4 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 210 | |||
| 211 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 212 | float real(void) const { return ::simd_real(*this); } | ||
| 213 | |||
| 214 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 215 | float3 imag(void) const { return ::simd_imag(*this); } | ||
| 216 | |||
| 217 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 218 | float angle(void) const { return ::simd_angle(*this); } | ||
| 219 | |||
| 220 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 221 | float3 axis(void) const { return ::simd_axis(*this); } | ||
| 222 | |||
| 223 | /*! @abstract The length of the quaternion. */ | ||
| 224 | float length(void) const { return ::simd_length(*this); } | ||
| 225 | |||
| 226 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 227 | float3 operator()(const ::simd_float3 v) const { return ::simd_act(*this, v); } | ||
| 228 | }; | ||
| 229 | |||
| 230 | static SIMD_CPPFUNC quatf operator+(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_add(p, q); } | ||
| 231 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_sub(p, q); } | ||
| 232 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p) { return ::simd_negate(p); } | ||
| 233 | static SIMD_CPPFUNC quatf operator*(const float r, const ::simd_quatf p) { return ::simd_mul(r, p); } | ||
| 234 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const float r) { return ::simd_mul(p, r); } | ||
| 235 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, q); } | ||
| 236 | static SIMD_CPPFUNC quatf operator/(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 237 | static SIMD_CPPFUNC quatf operator+=(quatf &p, const ::simd_quatf q) { return p = p+q; } | ||
| 238 | static SIMD_CPPFUNC quatf operator-=(quatf &p, const ::simd_quatf q) { return p = p-q; } | ||
| 239 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const float r) { return p = p*r; } | ||
| 240 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const ::simd_quatf q) { return p = p*q; } | ||
| 241 | static SIMD_CPPFUNC quatf operator/=(quatf &p, const ::simd_quatf q) { return p = p/q; } | ||
| 242 | |||
| 243 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 244 | static SIMD_CPPFUNC quatf conjugate(const ::simd_quatf p) { return ::simd_conjugate(p); } | ||
| 245 | |||
| 246 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 247 | static SIMD_CPPFUNC quatf inverse(const ::simd_quatf p) { return ::simd_inverse(p); } | ||
| 248 | |||
| 249 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 250 | * four-dimensional vectors. */ | ||
| 251 | static SIMD_CPPFUNC float dot(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_dot(p, q); } | ||
| 252 | |||
| 253 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 254 | static SIMD_CPPFUNC quatf normalize(const ::simd_quatf p) { return ::simd_normalize(p); } | ||
| 255 | |||
| 256 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 257 | static SIMD_CPPFUNC quatf log(const ::simd_quatf q) { return ::__tg_log(q); } | ||
| 258 | |||
| 259 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 260 | static SIMD_CPPFUNC quatf exp(const ::simd_quatf q) { return ::__tg_exp(q); } | ||
| 261 | |||
| 262 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 263 | * quaternions `q0` and `q1`. */ | ||
| 264 | static SIMD_CPPFUNC quatf slerp(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp(p0, p1, t); } | ||
| 265 | |||
| 266 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 267 | * quaternions `q0` and `q1`. */ | ||
| 268 | static SIMD_CPPFUNC quatf slerp_longest(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 269 | |||
| 270 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 271 | * | ||
| 272 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 273 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 274 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 275 | * rotations. */ | ||
| 276 | static SIMD_CPPFUNC quatf spline(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 277 | |||
| 278 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 279 | * | ||
| 280 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 281 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 282 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 283 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 284 | * curve does not hold on the sphere. */ | ||
| 285 | static SIMD_CPPFUNC quatf bezier(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 286 | } | ||
| 287 | |||
| 288 | extern "C" { | ||
| 289 | #endif /* __cplusplus */ | ||
| 290 | |||
| 291 | /* MARK: - float implementations */ | ||
| 292 | |||
| 293 | #include <simd/math.h> | ||
| 294 | #include <simd/geometry.h> | ||
| 295 | |||
| 296 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 297 | * dispatching in tgmath.h to work its magic. */ | ||
| 298 | static simd_quatf __attribute__((__overloadable__)) __tg_promote(simd_quatf); | ||
| 299 | |||
| 300 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 301 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 302 | * with the angle-axis constructor. */ | ||
| 303 | static inline SIMD_CFUNC simd_quatf _simd_quaternion(simd_float3 imag, float real) { | ||
| 304 | return simd_quaternion(simd_make_float4(imag, real)); | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis) { | ||
| 308 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 309 | } | ||
| 310 | |||
| 311 | static inline SIMD_CFUNC float simd_angle(simd_quatf q) { | ||
| 312 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 313 | } | ||
| 314 | |||
| 315 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q) { | ||
| 316 | return simd_normalize(q.vector.xyz); | ||
| 317 | } | ||
| 318 | |||
| 319 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q) { | ||
| 320 | return simd_quaternion(p.vector + q.vector); | ||
| 321 | } | ||
| 322 | |||
| 323 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q) { | ||
| 324 | return simd_quaternion(p.vector - q.vector); | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q) { | ||
| 328 | #pragma STDC FP_CONTRACT ON | ||
| 329 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 330 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 331 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 332 | p.vector.w * q.vector)); | ||
| 333 | } | ||
| 334 | |||
| 335 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a) { | ||
| 336 | return simd_quaternion(a * q.vector); | ||
| 337 | } | ||
| 338 | |||
| 339 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q) { | ||
| 340 | return simd_mul(q,a); | ||
| 341 | } | ||
| 342 | |||
| 343 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q) { | ||
| 344 | return simd_quaternion(q.vector * (simd_float4){-1,-1,-1, 1}); | ||
| 345 | } | ||
| 346 | |||
| 347 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q) { | ||
| 348 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 349 | } | ||
| 350 | |||
| 351 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q) { | ||
| 352 | return simd_quaternion(-q.vector); | ||
| 353 | } | ||
| 354 | |||
| 355 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q) { | ||
| 356 | return simd_dot(p.vector, q.vector); | ||
| 357 | } | ||
| 358 | |||
| 359 | static inline SIMD_CFUNC float simd_length(simd_quatf q) { | ||
| 360 | return simd_length(q.vector); | ||
| 361 | } | ||
| 362 | |||
| 363 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q) { | ||
| 364 | float length_squared = simd_length_squared(q.vector); | ||
| 365 | if (length_squared == 0) { | ||
| 366 | return simd_quaternion((simd_float4){0,0,0,1}); | ||
| 367 | } | ||
| 368 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 369 | } | ||
| 370 | |||
| 371 | #if defined __arm__ || defined __arm64__ | ||
| 372 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 373 | * | ||
| 374 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 375 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 376 | * implementation detail and you should not call it directly. It may be | ||
| 377 | * removed or modified in future versions of the simd module. */ | ||
| 378 | static inline SIMD_CFUNC simd_quatf _simd_mul_vq(simd_float3 v, simd_quatf q) { | ||
| 379 | #pragma STDC FP_CONTRACT ON | ||
| 380 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 381 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 382 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 383 | } | ||
| 384 | #endif | ||
| 385 | |||
| 386 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v) { | ||
| 387 | #if defined __arm__ || defined __arm64__ | ||
| 388 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 389 | #else | ||
| 390 | #pragma STDC FP_CONTRACT ON | ||
| 391 | simd_float3 t = 2*simd_cross(simd_imag(q),v); | ||
| 392 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 393 | #endif | ||
| 394 | } | ||
| 395 | |||
| 396 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q) { | ||
| 397 | float real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 398 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 399 | simd_float3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 400 | return _simd_quaternion(imag, real); | ||
| 401 | } | ||
| 402 | |||
| 403 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q) { | ||
| 404 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 405 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 406 | // axis) constructor to generate `unit`. | ||
| 407 | float angle = simd_length(simd_imag(q)); | ||
| 408 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 409 | simd_float3 axis = simd_normalize(simd_imag(q)); | ||
| 410 | simd_quatf unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 411 | return simd_mul(exp(simd_real(q)), unit); | ||
| 412 | } | ||
| 413 | |||
| 414 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 415 | * initializer. | ||
| 416 | * | ||
| 417 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 418 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 419 | * angles. This function is an implementation detail and you should not | ||
| 420 | * call it directly. It may be removed or modified in future versions of the | ||
| 421 | * simd module. */ | ||
| 422 | static inline SIMD_CFUNC simd_quatf _simd_quaternion_reduced(simd_float3 from, simd_float3 to) { | ||
| 423 | simd_float3 half = simd_normalize(from + to); | ||
| 424 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 425 | } | ||
| 426 | |||
| 427 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to) { | ||
| 428 | |||
| 429 | // If the angle between from and to is not too big, we can compute the | ||
| 430 | // rotation accurately using a simple implementation. | ||
| 431 | if (simd_dot(from, to) >= 0) { | ||
| 432 | return _simd_quaternion_reduced(from, to); | ||
| 433 | } | ||
| 434 | |||
| 435 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 436 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 437 | // accuracy. | ||
| 438 | simd_float3 half = from + to; | ||
| 439 | |||
| 440 | if (simd_length_squared(half) == 0) { | ||
| 441 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 442 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 443 | // to the vectors, and use an angle of pi radians. | ||
| 444 | simd_float3 abs_from = simd_abs(from); | ||
| 445 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 446 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){1,0,0})), 0.f); | ||
| 447 | else if (abs_from.y <= abs_from.z) | ||
| 448 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,1,0})), 0.f); | ||
| 449 | else | ||
| 450 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f); | ||
| 451 | } | ||
| 452 | |||
| 453 | // Compute the two-step rotation. */ | ||
| 454 | half = simd_normalize(half); | ||
| 455 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 456 | _simd_quaternion_reduced(half, to)); | ||
| 457 | } | ||
| 458 | |||
| 459 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix) { | ||
| 460 | const simd_float3 *mat = matrix.columns; | ||
| 461 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 462 | if (trace >= 0.0) { | ||
| 463 | float r = 2*sqrt(1 + trace); | ||
| 464 | float rinv = simd_recip(r); | ||
| 465 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 466 | rinv*(mat[2][0] - mat[0][2]), | ||
| 467 | rinv*(mat[0][1] - mat[1][0]), | ||
| 468 | r/4); | ||
| 469 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 470 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 471 | float rinv = simd_recip(r); | ||
| 472 | return simd_quaternion(r/4, | ||
| 473 | rinv*(mat[0][1] + mat[1][0]), | ||
| 474 | rinv*(mat[0][2] + mat[2][0]), | ||
| 475 | rinv*(mat[1][2] - mat[2][1])); | ||
| 476 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 477 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 478 | float rinv = simd_recip(r); | ||
| 479 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 480 | r/4, | ||
| 481 | rinv*(mat[1][2] + mat[2][1]), | ||
| 482 | rinv*(mat[2][0] - mat[0][2])); | ||
| 483 | } else { | ||
| 484 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 485 | float rinv = simd_recip(r); | ||
| 486 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 487 | rinv*(mat[1][2] + mat[2][1]), | ||
| 488 | r/4, | ||
| 489 | rinv*(mat[0][1] - mat[1][0])); | ||
| 490 | } | ||
| 491 | } | ||
| 492 | |||
| 493 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix) { | ||
| 494 | const simd_float4 *mat = matrix.columns; | ||
| 495 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 496 | if (trace >= 0.0) { | ||
| 497 | float r = 2*sqrt(1 + trace); | ||
| 498 | float rinv = simd_recip(r); | ||
| 499 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 500 | rinv*(mat[2][0] - mat[0][2]), | ||
| 501 | rinv*(mat[0][1] - mat[1][0]), | ||
| 502 | r/4); | ||
| 503 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 504 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 505 | float rinv = simd_recip(r); | ||
| 506 | return simd_quaternion(r/4, | ||
| 507 | rinv*(mat[0][1] + mat[1][0]), | ||
| 508 | rinv*(mat[0][2] + mat[2][0]), | ||
| 509 | rinv*(mat[1][2] - mat[2][1])); | ||
| 510 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 511 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 512 | float rinv = simd_recip(r); | ||
| 513 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 514 | r/4, | ||
| 515 | rinv*(mat[1][2] + mat[2][1]), | ||
| 516 | rinv*(mat[2][0] - mat[0][2])); | ||
| 517 | } else { | ||
| 518 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 519 | float rinv = simd_recip(r); | ||
| 520 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 521 | rinv*(mat[1][2] + mat[2][1]), | ||
| 522 | r/4, | ||
| 523 | rinv*(mat[0][1] - mat[1][0])); | ||
| 524 | } | ||
| 525 | } | ||
| 526 | |||
| 527 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 528 | * | ||
| 529 | * @discussion This function is an implementation detail and you should not | ||
| 530 | * call it directly. It may be removed or modified in future versions of the | ||
| 531 | * simd module. */ | ||
| 532 | static SIMD_NOINLINE float _simd_angle(simd_quatf p, simd_quatf q) { | ||
| 533 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 534 | } | ||
| 535 | |||
| 536 | /*! @abstract sin(x)/x. | ||
| 537 | * | ||
| 538 | * @discussion This function is an implementation detail and you should not | ||
| 539 | * call it directly. It may be removed or modified in future versions of the | ||
| 540 | * simd module. */ | ||
| 541 | static SIMD_CFUNC float _simd_sinc(float x) { | ||
| 542 | if (x == 0) return 1; | ||
| 543 | return sin(x)/x; | ||
| 544 | } | ||
| 545 | |||
| 546 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 547 | * | ||
| 548 | * @discussion This function may interpolate along either the longer or | ||
| 549 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 550 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 551 | * instead of calling this directly. */ | ||
| 552 | static SIMD_NOINLINE simd_quatf _simd_slerp_internal(simd_quatf q0, simd_quatf q1, float t) { | ||
| 553 | float s = 1 - t; | ||
| 554 | float a = _simd_angle(q0, q1); | ||
| 555 | float r = simd_recip(_simd_sinc(a)); | ||
| 556 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 557 | } | ||
| 558 | |||
| 559 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t) { | ||
| 560 | if (simd_dot(q0, q1) >= 0) | ||
| 561 | return _simd_slerp_internal(q0, q1, t); | ||
| 562 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 563 | } | ||
| 564 | |||
| 565 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t) { | ||
| 566 | if (simd_dot(q0, q1) >= 0) | ||
| 567 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 568 | return _simd_slerp_internal(q0, q1, t); | ||
| 569 | } | ||
| 570 | |||
| 571 | /*! @discussion This function is an implementation detail and you should not | ||
| 572 | * call it directly. It may be removed or modified in future versions of the | ||
| 573 | * simd module. */ | ||
| 574 | static SIMD_NOINLINE simd_quatf _simd_intermediate(simd_quatf q0, simd_quatf q1, simd_quatf q2) { | ||
| 575 | simd_quatf p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 576 | simd_quatf p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 577 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 578 | } | ||
| 579 | |||
| 580 | /*! @discussion This function is an implementation detail and you should not | ||
| 581 | * call it directly. It may be removed or modified in future versions of the | ||
| 582 | * simd module. */ | ||
| 583 | static SIMD_NOINLINE simd_quatf _simd_squad(simd_quatf q0, simd_quatf qa, simd_quatf qb, simd_quatf q1, float t) { | ||
| 584 | simd_quatf r0 = _simd_slerp_internal(q0, q1, t); | ||
| 585 | simd_quatf r1 = _simd_slerp_internal(qa, qb, t); | ||
| 586 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 587 | } | ||
| 588 | |||
| 589 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 590 | simd_quatf qa = _simd_intermediate(q0, q1, q2); | ||
| 591 | simd_quatf qb = _simd_intermediate(q1, q2, q3); | ||
| 592 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 593 | } | ||
| 594 | |||
| 595 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 596 | simd_quatf q01 = _simd_slerp_internal(q0, q1, t); | ||
| 597 | simd_quatf q12 = _simd_slerp_internal(q1, q2, t); | ||
| 598 | simd_quatf q23 = _simd_slerp_internal(q2, q3, t); | ||
| 599 | simd_quatf q012 = _simd_slerp_internal(q01, q12, t); | ||
| 600 | simd_quatf q123 = _simd_slerp_internal(q12, q23, t); | ||
| 601 | return _simd_slerp_internal(q012, q123, t); | ||
| 602 | } | ||
| 603 | |||
| 604 | /* MARK: - C and Objective-C double interfaces */ | ||
| 605 | |||
| 606 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 607 | * | ||
| 608 | * @param ix The first component of the imaginary (vector) part. | ||
| 609 | * @param iy The second component of the imaginary (vector) part. | ||
| 610 | * @param iz The third component of the imaginary (vector) part. | ||
| 611 | * | ||
| 612 | * @param r The real (scalar) part. */ | ||
| 613 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double ix, double iy, double iz, double r) { | ||
| 614 | return (simd_quatd){ { ix, iy, iz, r } }; | ||
| 615 | } | ||
| 616 | |||
| 617 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 618 | * | ||
| 619 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 620 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 621 | static inline SIMD_NONCONST simd_quatd simd_quaternion(const double xyzr[4]) { | ||
| 622 | return (simd_quatd){ *(const simd_packed_double4 *)xyzr }; | ||
| 623 | } | ||
| 624 | |||
| 625 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 626 | * | ||
| 627 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 628 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 629 | * lane 3. */ | ||
| 630 | static inline SIMD_CFUNC simd_quatd simd_quaternion(simd_double4 xyzr) { | ||
| 631 | return (simd_quatd){ xyzr }; | ||
| 632 | } | ||
| 633 | |||
| 634 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 635 | * `axis`. */ | ||
| 636 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis); | ||
| 637 | |||
| 638 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 639 | * | ||
| 640 | * @param from A normalized three-element vector. | ||
| 641 | * @param to A normalized three-element vector. | ||
| 642 | * | ||
| 643 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 644 | * `to` point in opposite directions (to within machine precision), an | ||
| 645 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 646 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to); | ||
| 647 | |||
| 648 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 649 | * | ||
| 650 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 651 | * is undefined. */ | ||
| 652 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix); | ||
| 653 | |||
| 654 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 655 | * | ||
| 656 | * @discussion The last row and column of the matrix are ignored. This | ||
| 657 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 658 | * submatrix . */ | ||
| 659 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix); | ||
| 660 | |||
| 661 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 662 | static inline SIMD_CFUNC double simd_real(simd_quatd q) { | ||
| 663 | return q.vector.w; | ||
| 664 | } | ||
| 665 | |||
| 666 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 667 | static inline SIMD_CFUNC simd_double3 simd_imag(simd_quatd q) { | ||
| 668 | return q.vector.xyz; | ||
| 669 | } | ||
| 670 | |||
| 671 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 672 | static inline SIMD_CFUNC double simd_angle(simd_quatd q); | ||
| 673 | |||
| 674 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 675 | * action of the quaternion `q` rotates. */ | ||
| 676 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q); | ||
| 677 | |||
| 678 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 679 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q); | ||
| 680 | |||
| 681 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 682 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q); | ||
| 683 | |||
| 684 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 685 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q); | ||
| 686 | |||
| 687 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 688 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a); | ||
| 689 | |||
| 690 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 691 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q); | ||
| 692 | |||
| 693 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 694 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q); | ||
| 695 | |||
| 696 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 697 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q); | ||
| 698 | |||
| 699 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 700 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q); | ||
| 701 | |||
| 702 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 703 | * four-dimensional vectors. */ | ||
| 704 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q); | ||
| 705 | |||
| 706 | /*! @abstract The length of the quaternion `q`. */ | ||
| 707 | static inline SIMD_CFUNC double simd_length(simd_quatd q); | ||
| 708 | |||
| 709 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 710 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q); | ||
| 711 | |||
| 712 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 713 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v); | ||
| 714 | |||
| 715 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 716 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 717 | * | ||
| 718 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 719 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 720 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 721 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 722 | * | ||
| 723 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 724 | * quaternions, because it is primarily used for spline interpolation of | ||
| 725 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 726 | * quaternions, you can use the following approach: | ||
| 727 | * | ||
| 728 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 729 | * logq = log(simd_recip(scale)*q); | ||
| 730 | * logq.real += log(scale); | ||
| 731 | * return logq; */ | ||
| 732 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q); | ||
| 733 | |||
| 734 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 735 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 736 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q); | ||
| 737 | |||
| 738 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 739 | * quaternions `q0` and `q1`. */ | ||
| 740 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t); | ||
| 741 | |||
| 742 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 743 | * quaternions `q0` and `q1`. */ | ||
| 744 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t); | ||
| 745 | |||
| 746 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 747 | * | ||
| 748 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 749 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 750 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 751 | * rotations. */ | ||
| 752 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 753 | |||
| 754 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 755 | * | ||
| 756 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 757 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 758 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 759 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 760 | * curve does not hold on the sphere. */ | ||
| 761 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 762 | |||
| 763 | #ifdef __cplusplus | ||
| 764 | } /* extern "C" */ | ||
| 765 | /* MARK: - C++ double interfaces */ | ||
| 766 | |||
| 767 | namespace simd { | ||
| 768 | struct quatd : ::simd_quatd { | ||
| 769 | /*! @abstract The identity quaternion. */ | ||
| 770 | quatd( ) : ::simd_quatd(::simd_quaternion((double4){0,0,0,1})) { } | ||
| 771 | |||
| 772 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 773 | quatd(::simd_quatd q) : ::simd_quatd(q) { } | ||
| 774 | |||
| 775 | /*! @abstract Constructs a quaternion from components. */ | ||
| 776 | quatd(double ix, double iy, double iz, double r) : ::simd_quatd(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 777 | |||
| 778 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 779 | quatd(const double xyzr[4]) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 780 | |||
| 781 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 782 | quatd(double4 xyzr) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 783 | |||
| 784 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 785 | * radians. */ | ||
| 786 | quatd(double angle, double3 axis) : ::simd_quatd(::simd_quaternion(angle, axis)) { } | ||
| 787 | |||
| 788 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 789 | quatd(double3 from, double3 to) : ::simd_quatd(::simd_quaternion(from, to)) { } | ||
| 790 | |||
| 791 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 792 | quatd(::simd_double3x3 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 793 | |||
| 794 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 795 | quatd(::simd_double4x4 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 796 | |||
| 797 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 798 | double real(void) const { return ::simd_real(*this); } | ||
| 799 | |||
| 800 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 801 | double3 imag(void) const { return ::simd_imag(*this); } | ||
| 802 | |||
| 803 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 804 | double angle(void) const { return ::simd_angle(*this); } | ||
| 805 | |||
| 806 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 807 | double3 axis(void) const { return ::simd_axis(*this); } | ||
| 808 | |||
| 809 | /*! @abstract The length of the quaternion. */ | ||
| 810 | double length(void) const { return ::simd_length(*this); } | ||
| 811 | |||
| 812 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 813 | double3 operator()(const ::simd_double3 v) const { return ::simd_act(*this, v); } | ||
| 814 | }; | ||
| 815 | |||
| 816 | static SIMD_CPPFUNC quatd operator+(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_add(p, q); } | ||
| 817 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_sub(p, q); } | ||
| 818 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p) { return ::simd_negate(p); } | ||
| 819 | static SIMD_CPPFUNC quatd operator*(const double r, const ::simd_quatd p) { return ::simd_mul(r, p); } | ||
| 820 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const double r) { return ::simd_mul(p, r); } | ||
| 821 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, q); } | ||
| 822 | static SIMD_CPPFUNC quatd operator/(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 823 | static SIMD_CPPFUNC quatd operator+=(quatd &p, const ::simd_quatd q) { return p = p+q; } | ||
| 824 | static SIMD_CPPFUNC quatd operator-=(quatd &p, const ::simd_quatd q) { return p = p-q; } | ||
| 825 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const double r) { return p = p*r; } | ||
| 826 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const ::simd_quatd q) { return p = p*q; } | ||
| 827 | static SIMD_CPPFUNC quatd operator/=(quatd &p, const ::simd_quatd q) { return p = p/q; } | ||
| 828 | |||
| 829 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 830 | static SIMD_CPPFUNC quatd conjugate(const ::simd_quatd p) { return ::simd_conjugate(p); } | ||
| 831 | |||
| 832 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 833 | static SIMD_CPPFUNC quatd inverse(const ::simd_quatd p) { return ::simd_inverse(p); } | ||
| 834 | |||
| 835 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 836 | * four-dimensional vectors. */ | ||
| 837 | static SIMD_CPPFUNC double dot(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_dot(p, q); } | ||
| 838 | |||
| 839 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 840 | static SIMD_CPPFUNC quatd normalize(const ::simd_quatd p) { return ::simd_normalize(p); } | ||
| 841 | |||
| 842 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 843 | static SIMD_CPPFUNC quatd log(const ::simd_quatd q) { return ::__tg_log(q); } | ||
| 844 | |||
| 845 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 846 | static SIMD_CPPFUNC quatd exp(const ::simd_quatd q) { return ::__tg_exp(q); } | ||
| 847 | |||
| 848 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 849 | * quaternions `q0` and `q1`. */ | ||
| 850 | static SIMD_CPPFUNC quatd slerp(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp(p0, p1, t); } | ||
| 851 | |||
| 852 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 853 | * quaternions `q0` and `q1`. */ | ||
| 854 | static SIMD_CPPFUNC quatd slerp_longest(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 855 | |||
| 856 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 857 | * | ||
| 858 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 859 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 860 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 861 | * rotations. */ | ||
| 862 | static SIMD_CPPFUNC quatd spline(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 863 | |||
| 864 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 865 | * | ||
| 866 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 867 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 868 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 869 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 870 | * curve does not hold on the sphere. */ | ||
| 871 | static SIMD_CPPFUNC quatd bezier(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 872 | } | ||
| 873 | |||
| 874 | extern "C" { | ||
| 875 | #endif /* __cplusplus */ | ||
| 876 | |||
| 877 | /* MARK: - double implementations */ | ||
| 878 | |||
| 879 | #include <simd/math.h> | ||
| 880 | #include <simd/geometry.h> | ||
| 881 | |||
| 882 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 883 | * dispatching in tgmath.h to work its magic. */ | ||
| 884 | static simd_quatd __attribute__((__overloadable__)) __tg_promote(simd_quatd); | ||
| 885 | |||
| 886 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 887 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 888 | * with the angle-axis constructor. */ | ||
| 889 | static inline SIMD_CFUNC simd_quatd _simd_quaternion(simd_double3 imag, double real) { | ||
| 890 | return simd_quaternion(simd_make_double4(imag, real)); | ||
| 891 | } | ||
| 892 | |||
| 893 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis) { | ||
| 894 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 895 | } | ||
| 896 | |||
| 897 | static inline SIMD_CFUNC double simd_angle(simd_quatd q) { | ||
| 898 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 899 | } | ||
| 900 | |||
| 901 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q) { | ||
| 902 | return simd_normalize(q.vector.xyz); | ||
| 903 | } | ||
| 904 | |||
| 905 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q) { | ||
| 906 | return simd_quaternion(p.vector + q.vector); | ||
| 907 | } | ||
| 908 | |||
| 909 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q) { | ||
| 910 | return simd_quaternion(p.vector - q.vector); | ||
| 911 | } | ||
| 912 | |||
| 913 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q) { | ||
| 914 | #pragma STDC FP_CONTRACT ON | ||
| 915 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 916 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 917 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 918 | p.vector.w * q.vector)); | ||
| 919 | } | ||
| 920 | |||
| 921 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a) { | ||
| 922 | return simd_quaternion(a * q.vector); | ||
| 923 | } | ||
| 924 | |||
| 925 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q) { | ||
| 926 | return simd_mul(q,a); | ||
| 927 | } | ||
| 928 | |||
| 929 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q) { | ||
| 930 | return simd_quaternion(q.vector * (simd_double4){-1,-1,-1, 1}); | ||
| 931 | } | ||
| 932 | |||
| 933 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q) { | ||
| 934 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 935 | } | ||
| 936 | |||
| 937 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q) { | ||
| 938 | return simd_quaternion(-q.vector); | ||
| 939 | } | ||
| 940 | |||
| 941 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q) { | ||
| 942 | return simd_dot(p.vector, q.vector); | ||
| 943 | } | ||
| 944 | |||
| 945 | static inline SIMD_CFUNC double simd_length(simd_quatd q) { | ||
| 946 | return simd_length(q.vector); | ||
| 947 | } | ||
| 948 | |||
| 949 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q) { | ||
| 950 | double length_squared = simd_length_squared(q.vector); | ||
| 951 | if (length_squared == 0) { | ||
| 952 | return simd_quaternion((simd_double4){0,0,0,1}); | ||
| 953 | } | ||
| 954 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 955 | } | ||
| 956 | |||
| 957 | #if defined __arm__ || defined __arm64__ | ||
| 958 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 959 | * | ||
| 960 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 961 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 962 | * implementation detail and you should not call it directly. It may be | ||
| 963 | * removed or modified in future versions of the simd module. */ | ||
| 964 | static inline SIMD_CFUNC simd_quatd _simd_mul_vq(simd_double3 v, simd_quatd q) { | ||
| 965 | #pragma STDC FP_CONTRACT ON | ||
| 966 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 967 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 968 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 969 | } | ||
| 970 | #endif | ||
| 971 | |||
| 972 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v) { | ||
| 973 | #if defined __arm__ || defined __arm64__ | ||
| 974 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 975 | #else | ||
| 976 | #pragma STDC FP_CONTRACT ON | ||
| 977 | simd_double3 t = 2*simd_cross(simd_imag(q),v); | ||
| 978 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 979 | #endif | ||
| 980 | } | ||
| 981 | |||
| 982 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q) { | ||
| 983 | double real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 984 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 985 | simd_double3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 986 | return _simd_quaternion(imag, real); | ||
| 987 | } | ||
| 988 | |||
| 989 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q) { | ||
| 990 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 991 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 992 | // axis) constructor to generate `unit`. | ||
| 993 | double angle = simd_length(simd_imag(q)); | ||
| 994 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 995 | simd_double3 axis = simd_normalize(simd_imag(q)); | ||
| 996 | simd_quatd unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 997 | return simd_mul(exp(simd_real(q)), unit); | ||
| 998 | } | ||
| 999 | |||
| 1000 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 1001 | * initializer. | ||
| 1002 | * | ||
| 1003 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 1004 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 1005 | * angles. This function is an implementation detail and you should not | ||
| 1006 | * call it directly. It may be removed or modified in future versions of the | ||
| 1007 | * simd module. */ | ||
| 1008 | static inline SIMD_CFUNC simd_quatd _simd_quaternion_reduced(simd_double3 from, simd_double3 to) { | ||
| 1009 | simd_double3 half = simd_normalize(from + to); | ||
| 1010 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to) { | ||
| 1014 | |||
| 1015 | // If the angle between from and to is not too big, we can compute the | ||
| 1016 | // rotation accurately using a simple implementation. | ||
| 1017 | if (simd_dot(from, to) >= 0) { | ||
| 1018 | return _simd_quaternion_reduced(from, to); | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 1022 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 1023 | // accuracy. | ||
| 1024 | simd_double3 half = from + to; | ||
| 1025 | |||
| 1026 | if (simd_length_squared(half) == 0) { | ||
| 1027 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 1028 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 1029 | // to the vectors, and use an angle of pi radians. | ||
| 1030 | simd_double3 abs_from = simd_abs(from); | ||
| 1031 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 1032 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){1,0,0})), 0.f); | ||
| 1033 | else if (abs_from.y <= abs_from.z) | ||
| 1034 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,1,0})), 0.f); | ||
| 1035 | else | ||
| 1036 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f); | ||
| 1037 | } | ||
| 1038 | |||
| 1039 | // Compute the two-step rotation. */ | ||
| 1040 | half = simd_normalize(half); | ||
| 1041 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 1042 | _simd_quaternion_reduced(half, to)); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix) { | ||
| 1046 | const simd_double3 *mat = matrix.columns; | ||
| 1047 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1048 | if (trace >= 0.0) { | ||
| 1049 | double r = 2*sqrt(1 + trace); | ||
| 1050 | double rinv = simd_recip(r); | ||
| 1051 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1052 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1053 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1054 | r/4); | ||
| 1055 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1056 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1057 | double rinv = simd_recip(r); | ||
| 1058 | return simd_quaternion(r/4, | ||
| 1059 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1060 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1061 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1062 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1063 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1064 | double rinv = simd_recip(r); | ||
| 1065 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1066 | r/4, | ||
| 1067 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1068 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1069 | } else { | ||
| 1070 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1071 | double rinv = simd_recip(r); | ||
| 1072 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1073 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1074 | r/4, | ||
| 1075 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1076 | } | ||
| 1077 | } | ||
| 1078 | |||
| 1079 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix) { | ||
| 1080 | const simd_double4 *mat = matrix.columns; | ||
| 1081 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1082 | if (trace >= 0.0) { | ||
| 1083 | double r = 2*sqrt(1 + trace); | ||
| 1084 | double rinv = simd_recip(r); | ||
| 1085 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1086 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1087 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1088 | r/4); | ||
| 1089 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1090 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1091 | double rinv = simd_recip(r); | ||
| 1092 | return simd_quaternion(r/4, | ||
| 1093 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1094 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1095 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1096 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1097 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1098 | double rinv = simd_recip(r); | ||
| 1099 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1100 | r/4, | ||
| 1101 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1102 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1103 | } else { | ||
| 1104 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1105 | double rinv = simd_recip(r); | ||
| 1106 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1107 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1108 | r/4, | ||
| 1109 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1110 | } | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 1114 | * | ||
| 1115 | * @discussion This function is an implementation detail and you should not | ||
| 1116 | * call it directly. It may be removed or modified in future versions of the | ||
| 1117 | * simd module. */ | ||
| 1118 | static SIMD_NOINLINE double _simd_angle(simd_quatd p, simd_quatd q) { | ||
| 1119 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | /*! @abstract sin(x)/x. | ||
| 1123 | * | ||
| 1124 | * @discussion This function is an implementation detail and you should not | ||
| 1125 | * call it directly. It may be removed or modified in future versions of the | ||
| 1126 | * simd module. */ | ||
| 1127 | static SIMD_CFUNC double _simd_sinc(double x) { | ||
| 1128 | if (x == 0) return 1; | ||
| 1129 | return sin(x)/x; | ||
| 1130 | } | ||
| 1131 | |||
| 1132 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 1133 | * | ||
| 1134 | * @discussion This function may interpolate along either the longer or | ||
| 1135 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 1136 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 1137 | * instead of calling this directly. */ | ||
| 1138 | static SIMD_NOINLINE simd_quatd _simd_slerp_internal(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1139 | double s = 1 - t; | ||
| 1140 | double a = _simd_angle(q0, q1); | ||
| 1141 | double r = simd_recip(_simd_sinc(a)); | ||
| 1142 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1146 | if (simd_dot(q0, q1) >= 0) | ||
| 1147 | return _simd_slerp_internal(q0, q1, t); | ||
| 1148 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1149 | } | ||
| 1150 | |||
| 1151 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1152 | if (simd_dot(q0, q1) >= 0) | ||
| 1153 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1154 | return _simd_slerp_internal(q0, q1, t); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | /*! @discussion This function is an implementation detail and you should not | ||
| 1158 | * call it directly. It may be removed or modified in future versions of the | ||
| 1159 | * simd module. */ | ||
| 1160 | static SIMD_NOINLINE simd_quatd _simd_intermediate(simd_quatd q0, simd_quatd q1, simd_quatd q2) { | ||
| 1161 | simd_quatd p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 1162 | simd_quatd p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 1163 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 1164 | } | ||
| 1165 | |||
| 1166 | /*! @discussion This function is an implementation detail and you should not | ||
| 1167 | * call it directly. It may be removed or modified in future versions of the | ||
| 1168 | * simd module. */ | ||
| 1169 | static SIMD_NOINLINE simd_quatd _simd_squad(simd_quatd q0, simd_quatd qa, simd_quatd qb, simd_quatd q1, double t) { | ||
| 1170 | simd_quatd r0 = _simd_slerp_internal(q0, q1, t); | ||
| 1171 | simd_quatd r1 = _simd_slerp_internal(qa, qb, t); | ||
| 1172 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1176 | simd_quatd qa = _simd_intermediate(q0, q1, q2); | ||
| 1177 | simd_quatd qb = _simd_intermediate(q1, q2, q3); | ||
| 1178 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1182 | simd_quatd q01 = _simd_slerp_internal(q0, q1, t); | ||
| 1183 | simd_quatd q12 = _simd_slerp_internal(q1, q2, t); | ||
| 1184 | simd_quatd q23 = _simd_slerp_internal(q2, q3, t); | ||
| 1185 | simd_quatd q012 = _simd_slerp_internal(q01, q12, t); | ||
| 1186 | simd_quatd q123 = _simd_slerp_internal(q12, q23, t); | ||
| 1187 | return _simd_slerp_internal(q012, q123, t); | ||
| 1188 | } | ||
| 1189 | |||
| 1190 | #ifdef __cplusplus | ||
| 1191 | } /* extern "C" */ | ||
| 1192 | #endif /* __cplusplus */ | ||
| 1193 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 1194 | #endif /* SIMD_QUATERNIONS */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/spawn.h created+187| ... | @@ -0,0 +1,187 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2006, 2010 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | |||
| 25 | #ifndef _SPAWN_H_ | ||
| 26 | #define _SPAWN_H_ | ||
| 27 | |||
| 28 | /* | ||
| 29 | * [SPN] Support for _POSIX_SPAWN | ||
| 30 | */ | ||
| 31 | |||
| 32 | #include <sys/cdefs.h> | ||
| 33 | #include <_types.h> | ||
| 34 | #include <sys/spawn.h> /* shared types */ | ||
| 35 | |||
| 36 | #include <Availability.h> | ||
| 37 | |||
| 38 | /* | ||
| 39 | * [SPN] Inclusion of the <spawn.h> header may make visible symbols defined | ||
| 40 | * in the <sched.h>, <signal.h>, and <sys/types.h> headers. | ||
| 41 | */ | ||
| 42 | #include <sys/_types/_pid_t.h> | ||
| 43 | #include <sys/_types/_sigset_t.h> | ||
| 44 | #include <sys/_types/_mode_t.h> | ||
| 45 | |||
| 46 | /* | ||
| 47 | * Opaque types for use with posix_spawn() family functions. Internals are | ||
| 48 | * not defined, and should not be accessed directly. Types are defined as | ||
| 49 | * mandated by POSIX. | ||
| 50 | */ | ||
| 51 | typedef void *posix_spawnattr_t; | ||
| 52 | typedef void *posix_spawn_file_actions_t; | ||
| 53 | |||
| 54 | __BEGIN_DECLS | ||
| 55 | /* | ||
| 56 | * gcc under c99 mode won't compile "[ __restrict]" by itself. As a workaround, | ||
| 57 | * a dummy argument name is added. | ||
| 58 | */ | ||
| 59 | |||
| 60 | int posix_spawn(pid_t * __restrict, const char * __restrict, | ||
| 61 | const posix_spawn_file_actions_t *, | ||
| 62 | const posix_spawnattr_t * __restrict, | ||
| 63 | char *const __argv[__restrict], | ||
| 64 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 65 | |||
| 66 | int posix_spawnp(pid_t * __restrict, const char * __restrict, | ||
| 67 | const posix_spawn_file_actions_t *, | ||
| 68 | const posix_spawnattr_t * __restrict, | ||
| 69 | char *const __argv[__restrict], | ||
| 70 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)); | ||
| 71 | |||
| 72 | int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 73 | |||
| 74 | int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, | ||
| 75 | int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 76 | |||
| 77 | int posix_spawn_file_actions_addopen( | ||
| 78 | 	posix_spawn_file_actions_t * __restrict, int, | ||
| 79 | 	const char * __restrict, int, mode_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 80 | |||
| 81 | int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 82 | |||
| 83 | int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 84 | |||
| 85 | int posix_spawnattr_destroy(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 86 | |||
| 87 | int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, | ||
| 88 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 89 | |||
| 90 | int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict, | ||
| 91 | short * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 92 | |||
| 93 | int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict, | ||
| 94 | pid_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 95 | |||
| 96 | int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict, | ||
| 97 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 98 | |||
| 99 | int posix_spawnattr_init(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 100 | |||
| 101 | int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict, | ||
| 102 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 103 | |||
| 104 | int posix_spawnattr_setflags(posix_spawnattr_t *, short) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 105 | |||
| 106 | int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 107 | |||
| 108 | int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict, | ||
| 109 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 110 | |||
| 111 | #if 0 /* _POSIX_PRIORITY_SCHEDULING [PS] : not supported */ | ||
| 112 | int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict, | ||
| 113 | const struct sched_param * __restrict); | ||
| 114 | int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); | ||
| 115 | int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict, | ||
| 116 | struct sched_param * __restrict); | ||
| 117 | int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict, | ||
| 118 | int * __restrict); | ||
| 119 | #endif /* 0 */ | ||
| 120 | |||
| 121 | __END_DECLS | ||
| 122 | |||
| 123 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 124 | /* | ||
| 125 | * Darwin-specific extensions below | ||
| 126 | */ | ||
| 127 | #include <mach/exception_types.h> | ||
| 128 | #include <mach/machine.h> | ||
| 129 | #include <mach/port.h> | ||
| 130 | |||
| 131 | #include <sys/_types/_size_t.h> | ||
| 132 | |||
| 133 | __BEGIN_DECLS | ||
| 134 | |||
| 135 | int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict, | ||
| 136 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 137 | |||
| 138 | int posix_spawnattr_getarchpref_np(const posix_spawnattr_t * __restrict, | ||
| 139 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 140 | |||
| 141 | int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict, | ||
| 142 | mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2)); | ||
| 143 | |||
| 144 | int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict, | ||
| 145 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 146 | |||
| 147 | int posix_spawnattr_setarchpref_np(posix_spawnattr_t * __restrict, | ||
| 148 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 149 | |||
| 150 | int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict, | ||
| 151 | exception_mask_t, mach_port_t, | ||
| 152 | exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 153 | |||
| 154 | int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict, | ||
| 155 | mach_port_t, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 156 | |||
| 157 | int posix_spawnattr_setsuidcredport_np(posix_spawnattr_t * __restrict, mach_port_t) __API_UNAVAILABLE(ios, macos); | ||
| 158 | |||
| 159 | int posix_spawnattr_setnosmt_np(const posix_spawnattr_t * __restrict attr) __API_AVAILABLE(macos(11.0)); | ||
| 160 | |||
| 161 | /* | ||
| 162 | * Set CPU Security Mitigation on the spawned process | ||
| 163 | * This attribute affects all threads and is inherited on fork and exec | ||
| 164 | */ | ||
| 165 | int posix_spawnattr_set_csm_np(const posix_spawnattr_t * __restrict attr, uint32_t flags) __API_AVAILABLE(macos(11.0)); | ||
| 166 | /* | ||
| 167 | * flags for CPU Security Mitigation attribute | ||
| 168 | * POSIX_SPAWN_NP_CSM_ALL should be used in most cases, | ||
| 169 | * the individual flags are provided only for performance evaluation etc | ||
| 170 | */ | ||
| 171 | #define POSIX_SPAWN_NP_CSM_ALL 0x0001 | ||
| 172 | #define POSIX_SPAWN_NP_CSM_NOSMT 0x0002 | ||
| 173 | #define POSIX_SPAWN_NP_CSM_TECS 0x0004 | ||
| 174 | |||
| 175 | int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *, | ||
| 176 | int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos); | ||
| 177 | |||
| 178 | int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *, | ||
| 179 | const char * __restrict) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 180 | |||
| 181 | int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, | ||
| 182 | int) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 183 | |||
| 184 | __END_DECLS | ||
| 185 | |||
| 186 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 187 | #endif /* _SPAWN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/stdio.h deleted-410| ... | @@ -1,410 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2005, 2007, 2009, 2010 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * This code is derived from software contributed to Berkeley by | ||
| 28 | * Chris Torek. | ||
| 29 | * | ||
| 30 | * Redistribution and use in source and binary forms, with or without | ||
| 31 | * modification, are permitted provided that the following conditions | ||
| 32 | * are met: | ||
| 33 | * 1. Redistributions of source code must retain the above copyright | ||
| 34 | * notice, this list of conditions and the following disclaimer. | ||
| 35 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 36 | * notice, this list of conditions and the following disclaimer in the | ||
| 37 | * documentation and/or other materials provided with the distribution. | ||
| 38 | * 3. All advertising materials mentioning features or use of this software | ||
| 39 | * must display the following acknowledgement: | ||
| 40 | *	This product includes software developed by the University of | ||
| 41 | *	California, Berkeley and its contributors. | ||
| 42 | * 4. Neither the name of the University nor the names of its contributors | ||
| 43 | * may be used to endorse or promote products derived from this software | ||
| 44 | * without specific prior written permission. | ||
| 45 | * | ||
| 46 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 56 | * SUCH DAMAGE. | ||
| 57 | * | ||
| 58 | *	@(#)stdio.h	8.5 (Berkeley) 4/29/95 | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef	_STDIO_H_ | ||
| 62 | #define	_STDIO_H_ | ||
| 63 | |||
| 64 | #include <_stdio.h> | ||
| 65 | |||
| 66 | __BEGIN_DECLS | ||
| 67 | extern FILE *__stdinp; | ||
| 68 | extern FILE *__stdoutp; | ||
| 69 | extern FILE *__stderrp; | ||
| 70 | __END_DECLS | ||
| 71 | |||
| 72 | #define	__SLBF	0x0001		/* line buffered */ | ||
| 73 | #define	__SNBF	0x0002		/* unbuffered */ | ||
| 74 | #define	__SRD	0x0004		/* OK to read */ | ||
| 75 | #define	__SWR	0x0008		/* OK to write */ | ||
| 76 | 	/* RD and WR are never simultaneously asserted */ | ||
| 77 | #define	__SRW	0x0010		/* open for reading & writing */ | ||
| 78 | #define	__SEOF	0x0020		/* found EOF */ | ||
| 79 | #define	__SERR	0x0040		/* found error */ | ||
| 80 | #define	__SMBF	0x0080		/* _buf is from malloc */ | ||
| 81 | #define	__SAPP	0x0100		/* fdopen()ed in append mode */ | ||
| 82 | #define	__SSTR	0x0200		/* this is an sprintf/snprintf string */ | ||
| 83 | #define	__SOPT	0x0400		/* do fseek() optimisation */ | ||
| 84 | #define	__SNPT	0x0800		/* do not do fseek() optimisation */ | ||
| 85 | #define	__SOFF	0x1000		/* set iff _offset is in fact correct */ | ||
| 86 | #define	__SMOD	0x2000		/* true => fgetln modified _p text */ | ||
| 87 | #define __SALC 0x4000		/* allocate string space dynamically */ | ||
| 88 | #define __SIGN 0x8000		/* ignore this file in _fwalk */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | * The following three definitions are for ANSI C, which took them | ||
| 92 | * from System V, which brilliantly took internal interface macros and | ||
| 93 | * made them official arguments to setvbuf(), without renaming them. | ||
| 94 | * Hence, these ugly _IOxxx names are *supposed* to appear in user code. | ||
| 95 | * | ||
| 96 | * Although numbered as their counterparts above, the implementation | ||
| 97 | * does not rely on this. | ||
| 98 | */ | ||
| 99 | #define	_IOFBF	0		/* setvbuf should set fully buffered */ | ||
| 100 | #define	_IOLBF	1		/* setvbuf should set line buffered */ | ||
| 101 | #define	_IONBF	2		/* setvbuf should set unbuffered */ | ||
| 102 | |||
| 103 | #define	BUFSIZ	1024		/* size of buffer used by setbuf */ | ||
| 104 | #define	EOF	(-1) | ||
| 105 | |||
| 106 | 				/* must be == _POSIX_STREAM_MAX <limits.h> */ | ||
| 107 | #define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */ | ||
| 108 | #define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */ | ||
| 109 | |||
| 110 | /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ | ||
| 111 | #ifndef _ANSI_SOURCE | ||
| 112 | #define	P_tmpdir	"/var/tmp/" | ||
| 113 | #endif | ||
| 114 | #define	L_tmpnam	1024	/* XXX must be == PATH_MAX */ | ||
| 115 | #define	TMP_MAX		308915776 | ||
| 116 | |||
| 117 | #ifndef SEEK_SET | ||
| 118 | #define	SEEK_SET	0	/* set file offset to offset */ | ||
| 119 | #endif | ||
| 120 | #ifndef SEEK_CUR | ||
| 121 | #define	SEEK_CUR	1	/* set file offset to current plus offset */ | ||
| 122 | #endif | ||
| 123 | #ifndef SEEK_END | ||
| 124 | #define	SEEK_END	2	/* set file offset to EOF plus offset */ | ||
| 125 | #endif | ||
| 126 | |||
| 127 | #define	stdin	__stdinp | ||
| 128 | #define	stdout	__stdoutp | ||
| 129 | #define	stderr	__stderrp | ||
| 130 | |||
| 131 | #ifdef _DARWIN_UNLIMITED_STREAMS | ||
| 132 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 | ||
| 133 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -miphoneos-version-min version does not support it." | ||
| 134 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 | ||
| 135 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -mmacosx-version-min version does not support it." | ||
| 136 | #endif | ||
| 137 | #endif | ||
| 138 | |||
| 139 | /* ANSI-C */ | ||
| 140 | |||
| 141 | __BEGIN_DECLS | ||
| 142 | void	 clearerr(FILE *); | ||
| 143 | int	 fclose(FILE *); | ||
| 144 | int	 feof(FILE *); | ||
| 145 | int	 ferror(FILE *); | ||
| 146 | int	 fflush(FILE *); | ||
| 147 | int	 fgetc(FILE *); | ||
| 148 | int	 fgetpos(FILE * __restrict, fpos_t *); | ||
| 149 | char	*fgets(char * __restrict, int, FILE *); | ||
| 150 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 151 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fopen)); | ||
| 152 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 153 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fopen)); | ||
| 154 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 155 | int	 fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 156 | int	 fputc(int, FILE *); | ||
| 157 | int	 fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs); | ||
| 158 | size_t	 fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream); | ||
| 159 | FILE	*freopen(const char * __restrict, const char * __restrict, | ||
| 160 | FILE * __restrict) __DARWIN_ALIAS(freopen); | ||
| 161 | int	 fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 162 | int	 fseek(FILE *, long, int); | ||
| 163 | int	 fsetpos(FILE *, const fpos_t *); | ||
| 164 | long	 ftell(FILE *); | ||
| 165 | size_t	 fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite); | ||
| 166 | int	 getc(FILE *); | ||
| 167 | int	 getchar(void); | ||
| 168 | char	*gets(char *); | ||
| 169 | void	 perror(const char *) __cold; | ||
| 170 | int	 printf(const char * __restrict, ...) __printflike(1, 2); | ||
| 171 | int	 putc(int, FILE *); | ||
| 172 | int	 putchar(int); | ||
| 173 | int	 puts(const char *); | ||
| 174 | int	 remove(const char *); | ||
| 175 | int	 rename (const char *__old, const char *__new); | ||
| 176 | void	 rewind(FILE *); | ||
| 177 | int	 scanf(const char * __restrict, ...) __scanflike(1, 2); | ||
| 178 | void	 setbuf(FILE * __restrict, char * __restrict); | ||
| 179 | int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t); | ||
| 180 | int	 sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3) __swift_unavailable("Use snprintf instead."); | ||
| 181 | int	 sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 182 | FILE	*tmpfile(void); | ||
| 183 | |||
| 184 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 185 | #if !defined(_POSIX_C_SOURCE) | ||
| 186 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 187 | #endif | ||
| 188 | char	*tmpnam(char *); | ||
| 189 | int	 ungetc(int, FILE *); | ||
| 190 | int	 vfprintf(FILE * __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 191 | int	 vprintf(const char * __restrict, va_list) __printflike(1, 0); | ||
| 192 | int	 vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0) __swift_unavailable("Use vsnprintf instead."); | ||
| 193 | __END_DECLS | ||
| 194 | |||
| 195 | |||
| 196 | |||
| 197 | /* Additional functionality provided by: | ||
| 198 | * POSIX.1-1988 | ||
| 199 | */ | ||
| 200 | |||
| 201 | #if __DARWIN_C_LEVEL >= 198808L | ||
| 202 | #define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */ | ||
| 203 | |||
| 204 | __BEGIN_DECLS | ||
| 205 | #include <_ctermid.h> | ||
| 206 | |||
| 207 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 208 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen)); | ||
| 209 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 210 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen)); | ||
| 211 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 212 | int	 fileno(FILE *); | ||
| 213 | __END_DECLS | ||
| 214 | #endif /* __DARWIN_C_LEVEL >= 198808L */ | ||
| 215 | |||
| 216 | |||
| 217 | /* Additional functionality provided by: | ||
| 218 | * POSIX.2-1992 C Language Binding Option | ||
| 219 | */ | ||
| 220 | #if TARGET_OS_IPHONE | ||
| 221 | #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg) | ||
| 222 | #else | ||
| 223 | #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg) | ||
| 224 | #endif | ||
| 225 | |||
| 226 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 227 | __BEGIN_DECLS | ||
| 228 | int	 pclose(FILE *) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable."); | ||
| 229 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 230 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable."); | ||
| 231 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 232 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(popen)) __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable."); | ||
| 233 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 234 | __END_DECLS | ||
| 235 | #endif /* __DARWIN_C_LEVEL >= 199209L */ | ||
| 236 | |||
| 237 | #undef __swift_unavailable_on | ||
| 238 | |||
| 239 | /* Additional functionality provided by: | ||
| 240 | * POSIX.1c-1995, | ||
| 241 | * POSIX.1i-1995, | ||
| 242 | * and the omnibus ISO/IEC 9945-1: 1996 | ||
| 243 | */ | ||
| 244 | |||
| 245 | #if __DARWIN_C_LEVEL >= 199506L | ||
| 246 | |||
| 247 | /* Functions internal to the implementation. */ | ||
| 248 | __BEGIN_DECLS | ||
| 249 | int	__srget(FILE *); | ||
| 250 | int	__svfscanf(FILE *, const char *, va_list) __scanflike(2, 0); | ||
| 251 | int	__swbuf(int, FILE *); | ||
| 252 | __END_DECLS | ||
| 253 | |||
| 254 | /* | ||
| 255 | * The __sfoo macros are here so that we can | ||
| 256 | * define function versions in the C library. | ||
| 257 | */ | ||
| 258 | #define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) | ||
| 259 | #if defined(__GNUC__) && defined(__STDC__) | ||
| 260 | __header_always_inline int __sputc(int _c, FILE *_p) { | ||
| 261 | 	if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) | ||
| 262 | 		return (*_p->_p++ = _c); | ||
| 263 | 	else | ||
| 264 | 		return (__swbuf(_c, _p)); | ||
| 265 | } | ||
| 266 | #else | ||
| 267 | /* | ||
| 268 | * This has been tuned to generate reasonable code on the vax using pcc. | ||
| 269 | */ | ||
| 270 | #define	__sputc(c, p) \ | ||
| 271 | 	(--(p)->_w < 0 ? \ | ||
| 272 | 		(p)->_w >= (p)->_lbfsize ? \ | ||
| 273 | 			(*(p)->_p = (c)), *(p)->_p != '\n' ? \ | ||
| 274 | 				(int)*(p)->_p++ : \ | ||
| 275 | 				__swbuf('\n', p) : \ | ||
| 276 | 			__swbuf((int)(c), p) : \ | ||
| 277 | 		(*(p)->_p = (c), (int)*(p)->_p++)) | ||
| 278 | #endif | ||
| 279 | |||
| 280 | #define	__sfeof(p)	(((p)->_flags & __SEOF) != 0) | ||
| 281 | #define	__sferror(p)	(((p)->_flags & __SERR) != 0) | ||
| 282 | #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF))) | ||
| 283 | #define	__sfileno(p)	((p)->_file) | ||
| 284 | |||
| 285 | __BEGIN_DECLS | ||
| 286 | void	 flockfile(FILE *); | ||
| 287 | int	 ftrylockfile(FILE *); | ||
| 288 | void	 funlockfile(FILE *); | ||
| 289 | int	 getc_unlocked(FILE *); | ||
| 290 | int	 getchar_unlocked(void); | ||
| 291 | int	 putc_unlocked(int, FILE *); | ||
| 292 | int	 putchar_unlocked(int); | ||
| 293 | |||
| 294 | /* Removed in Issue 6 */ | ||
| 295 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 296 | int	 getw(FILE *); | ||
| 297 | int	 putw(int, FILE *); | ||
| 298 | #endif | ||
| 299 | |||
| 300 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 301 | #if !defined(_POSIX_C_SOURCE) | ||
| 302 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 303 | #endif | ||
| 304 | char	*tempnam(const char *__dir, const char *__prefix) __DARWIN_ALIAS(tempnam); | ||
| 305 | __END_DECLS | ||
| 306 | |||
| 307 | #ifndef lint | ||
| 308 | #define	getc_unlocked(fp)	__sgetc(fp) | ||
| 309 | #define putc_unlocked(x, fp)	__sputc(x, fp) | ||
| 310 | #endif /* lint */ | ||
| 311 | |||
| 312 | #define	getchar_unlocked()	getc_unlocked(stdin) | ||
| 313 | #define	putchar_unlocked(x)	putc_unlocked(x, stdout) | ||
| 314 | #endif /* __DARWIN_C_LEVEL >= 199506L */ | ||
| 315 | |||
| 316 | |||
| 317 | |||
| 318 | /* Additional functionality provided by: | ||
| 319 | * POSIX.1-2001 | ||
| 320 | * ISO C99 | ||
| 321 | */ | ||
| 322 | |||
| 323 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 324 | #include <sys/_types/_off_t.h> | ||
| 325 | |||
| 326 | __BEGIN_DECLS | ||
| 327 | int	 fseeko(FILE * __stream, off_t __offset, int __whence); | ||
| 328 | off_t	 ftello(FILE * __stream); | ||
| 329 | __END_DECLS | ||
| 330 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 331 | |||
| 332 | #if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) | ||
| 333 | __BEGIN_DECLS | ||
| 334 | int	 snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4); | ||
| 335 | int	 vfscanf(FILE * __restrict __stream, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 336 | int	 vscanf(const char * __restrict __format, va_list) __scanflike(1, 0); | ||
| 337 | int	 vsnprintf(char * __restrict __str, size_t __size, const char * __restrict __format, va_list) __printflike(3, 0); | ||
| 338 | int	 vsscanf(const char * __restrict __str, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 339 | __END_DECLS | ||
| 340 | #endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */ | ||
| 341 | |||
| 342 | |||
| 343 | |||
| 344 | /* Additional functionality provided by: | ||
| 345 | * POSIX.1-2008 | ||
| 346 | */ | ||
| 347 | |||
| 348 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 349 | #include <sys/_types/_ssize_t.h> | ||
| 350 | |||
| 351 | __BEGIN_DECLS | ||
| 352 | int	dprintf(int, const char * __restrict, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 353 | int	vdprintf(int, const char * __restrict, va_list) __printflike(2, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 354 | ssize_t getdelim(char ** __restrict __linep, size_t * __restrict __linecapp, int __delimiter, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 355 | ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 356 | FILE *fmemopen(void * __restrict __buf, size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 357 | FILE *open_memstream(char **__bufp, size_t *__sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 358 | __END_DECLS | ||
| 359 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 360 | |||
| 361 | |||
| 362 | |||
| 363 | /* Darwin extensions */ | ||
| 364 | |||
| 365 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 366 | __BEGIN_DECLS | ||
| 367 | extern __const int sys_nerr;		/* perror(3) external variables */ | ||
| 368 | extern __const char *__const sys_errlist[]; | ||
| 369 | |||
| 370 | int	 asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 371 | char	*ctermid_r(char *); | ||
| 372 | char	*fgetln(FILE *, size_t *); | ||
| 373 | __const char *fmtcheck(const char *, const char *); | ||
| 374 | int	 fpurge(FILE *); | ||
| 375 | void	 setbuffer(FILE *, char *, int); | ||
| 376 | int	 setlinebuf(FILE *); | ||
| 377 | int	 vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 378 | FILE	*zopen(const char *, const char *, int); | ||
| 379 | |||
| 380 | |||
| 381 | /* | ||
| 382 | * Stdio function-access interface. | ||
| 383 | */ | ||
| 384 | FILE	*funopen(const void *, | ||
| 385 | int (* _Nullable)(void *, char *, int), | ||
| 386 | int (* _Nullable)(void *, const char *, int), | ||
| 387 | fpos_t (* _Nullable)(void *, fpos_t, int), | ||
| 388 | int (* _Nullable)(void *)); | ||
| 389 | __END_DECLS | ||
| 390 | #define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) | ||
| 391 | #define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) | ||
| 392 | |||
| 393 | #define	feof_unlocked(p)	__sfeof(p) | ||
| 394 | #define	ferror_unlocked(p)	__sferror(p) | ||
| 395 | #define	clearerr_unlocked(p)	__sclearerr(p) | ||
| 396 | #define	fileno_unlocked(p)	__sfileno(p) | ||
| 397 | |||
| 398 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 399 | |||
| 400 | |||
| 401 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 402 | #include <xlocale/_stdio.h> | ||
| 403 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 404 | |||
| 405 | #if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) | ||
| 406 | /* Security checking functions. */ | ||
| 407 | #include <secure/_stdio.h> | ||
| 408 | #endif | ||
| 409 | |||
| 410 | #endif /* _STDIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/stdlib.h deleted-373| ... | @@ -1,373 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2002 - 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * Redistribution and use in source and binary forms, with or without | ||
| 28 | * modification, are permitted provided that the following conditions | ||
| 29 | * are met: | ||
| 30 | * 1. Redistributions of source code must retain the above copyright | ||
| 31 | * notice, this list of conditions and the following disclaimer. | ||
| 32 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 33 | * notice, this list of conditions and the following disclaimer in the | ||
| 34 | * documentation and/or other materials provided with the distribution. | ||
| 35 | * 3. All advertising materials mentioning features or use of this software | ||
| 36 | * must display the following acknowledgement: | ||
| 37 | *	This product includes software developed by the University of | ||
| 38 | *	California, Berkeley and its contributors. | ||
| 39 | * 4. Neither the name of the University nor the names of its contributors | ||
| 40 | * may be used to endorse or promote products derived from this software | ||
| 41 | * without specific prior written permission. | ||
| 42 | * | ||
| 43 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 44 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 46 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 49 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 51 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 52 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 53 | * SUCH DAMAGE. | ||
| 54 | * | ||
| 55 | *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95 | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _STDLIB_H_ | ||
| 59 | #define _STDLIB_H_ | ||
| 60 | |||
| 61 | #include <Availability.h> | ||
| 62 | #include <sys/cdefs.h> | ||
| 63 | |||
| 64 | #include <_types.h> | ||
| 65 | #if !defined(_ANSI_SOURCE) | ||
| 66 | #include <sys/wait.h> | ||
| 67 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 68 | #include <alloca.h> | ||
| 69 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 70 | #endif /* !_ANSI_SOURCE */ | ||
| 71 | |||
| 72 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | ||
| 73 | * _GCC_SIZE_T */ | ||
| 74 | #include <sys/_types/_size_t.h> | ||
| 75 | |||
| 76 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 77 | #include <sys/_types/_ct_rune_t.h> | ||
| 78 | #include <sys/_types/_rune_t.h> | ||
| 79 | #endif	/* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 80 | |||
| 81 | #include <sys/_types/_wchar_t.h> | ||
| 82 | |||
| 83 | typedef struct { | ||
| 84 | 	int quot;		/* quotient */ | ||
| 85 | 	int rem;		/* remainder */ | ||
| 86 | } div_t; | ||
| 87 | |||
| 88 | typedef struct { | ||
| 89 | 	long quot;		/* quotient */ | ||
| 90 | 	long rem;		/* remainder */ | ||
| 91 | } ldiv_t; | ||
| 92 | |||
| 93 | #if !__DARWIN_NO_LONG_LONG | ||
| 94 | typedef struct { | ||
| 95 | 	long long quot; | ||
| 96 | 	long long rem; | ||
| 97 | } lldiv_t; | ||
| 98 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 99 | |||
| 100 | #include <sys/_types/_null.h> | ||
| 101 | |||
| 102 | #define	EXIT_FAILURE	1 | ||
| 103 | #define	EXIT_SUCCESS	0 | ||
| 104 | |||
| 105 | #define	RAND_MAX	0x7fffffff | ||
| 106 | |||
| 107 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 108 | #include <_xlocale.h> | ||
| 109 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 110 | |||
| 111 | #ifndef MB_CUR_MAX | ||
| 112 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 113 | #define	MB_CUR_MAX	(___mb_cur_max()) | ||
| 114 | #ifndef MB_CUR_MAX_L | ||
| 115 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 116 | #endif /* !MB_CUR_MAX_L */ | ||
| 117 | #else /* !_USE_EXTENDED_LOCALES_ */ | ||
| 118 | extern int __mb_cur_max; | ||
| 119 | #define	MB_CUR_MAX	__mb_cur_max | ||
| 120 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 121 | #endif /* MB_CUR_MAX */ | ||
| 122 | |||
| 123 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ | ||
| 124 | && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) | ||
| 125 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 126 | #endif | ||
| 127 | |||
| 128 | #include <malloc/_malloc.h> | ||
| 129 | |||
| 130 | __BEGIN_DECLS | ||
| 131 | void	 abort(void) __cold __dead2; | ||
| 132 | int	 abs(int) __pure2; | ||
| 133 | int	 atexit(void (* _Nonnull)(void)); | ||
| 134 | double	 atof(const char *); | ||
| 135 | int	 atoi(const char *); | ||
| 136 | long	 atol(const char *); | ||
| 137 | #if !__DARWIN_NO_LONG_LONG | ||
| 138 | long long | ||
| 139 | 	 atoll(const char *); | ||
| 140 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 141 | void	*bsearch(const void *__key, const void *__base, size_t __nel, | ||
| 142 | 	 size_t __width, int (* _Nonnull __compar)(const void *, const void *)); | ||
| 143 | /* calloc is now declared in _malloc.h */ | ||
| 144 | div_t	 div(int, int) __pure2; | ||
| 145 | void	 exit(int) __dead2; | ||
| 146 | /* free is now declared in _malloc.h */ | ||
| 147 | char	*getenv(const char *); | ||
| 148 | long	 labs(long) __pure2; | ||
| 149 | ldiv_t	 ldiv(long, long) __pure2; | ||
| 150 | #if !__DARWIN_NO_LONG_LONG | ||
| 151 | long long | ||
| 152 | 	 llabs(long long); | ||
| 153 | lldiv_t	 lldiv(long long, long long); | ||
| 154 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 155 | /* malloc is now declared in _malloc.h */ | ||
| 156 | int	 mblen(const char *__s, size_t __n); | ||
| 157 | size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); | ||
| 158 | int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t); | ||
| 159 | /* posix_memalign is now declared in _malloc.h */ | ||
| 160 | void	 qsort(void *__base, size_t __nel, size_t __width, | ||
| 161 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 162 | int	 rand(void) __swift_unavailable("Use arc4random instead."); | ||
| 163 | /* realloc is now declared in _malloc.h */ | ||
| 164 | void	 srand(unsigned) __swift_unavailable("Use arc4random instead."); | ||
| 165 | double	 strtod(const char *, char **) __DARWIN_ALIAS(strtod); | ||
| 166 | float	 strtof(const char *, char **) __DARWIN_ALIAS(strtof); | ||
| 167 | long	 strtol(const char *__str, char **__endptr, int __base); | ||
| 168 | long double | ||
| 169 | 	 strtold(const char *, char **); | ||
| 170 | #if !__DARWIN_NO_LONG_LONG | ||
| 171 | long long | ||
| 172 | 	 strtoll(const char *__str, char **__endptr, int __base); | ||
| 173 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 174 | unsigned long | ||
| 175 | 	 strtoul(const char *__str, char **__endptr, int __base); | ||
| 176 | #if !__DARWIN_NO_LONG_LONG | ||
| 177 | unsigned long long | ||
| 178 | 	 strtoull(const char *__str, char **__endptr, int __base); | ||
| 179 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 180 | |||
| 181 | #if TARGET_OS_IPHONE | ||
| 182 | #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(ios_msg) | ||
| 183 | #else | ||
| 184 | #define __swift_unavailable_on(osx_msg, ios_msg) __swift_unavailable(osx_msg) | ||
| 185 | #endif | ||
| 186 | |||
| 187 | __swift_unavailable_on("Use posix_spawn APIs or NSTask instead.", "Process spawning is unavailable") | ||
| 188 | __API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED | ||
| 189 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 190 | int	 system(const char *) __DARWIN_ALIAS_C(system); | ||
| 191 | |||
| 192 | #undef __swift_unavailable_on | ||
| 193 | |||
| 194 | size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t); | ||
| 195 | int	 wctomb(char *, wchar_t); | ||
| 196 | |||
| 197 | #ifndef _ANSI_SOURCE | ||
| 198 | void	_Exit(int) __dead2; | ||
| 199 | long	 a64l(const char *); | ||
| 200 | double	 drand48(void); | ||
| 201 | char	*ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 202 | double	 erand48(unsigned short[3]); | ||
| 203 | char	*fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 204 | char	*gcvt(double, int, char *); /* LEGACY */ | ||
| 205 | int	 getsubopt(char **, char * const *, char **); | ||
| 206 | int	 grantpt(int); | ||
| 207 | #if __DARWIN_UNIX03 | ||
| 208 | char	*initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ | ||
| 209 | #else /* !__DARWIN_UNIX03 */ | ||
| 210 | char	*initstate(unsigned long, char *, long); | ||
| 211 | #endif /* __DARWIN_UNIX03 */ | ||
| 212 | long	 jrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 213 | char	*l64a(long); | ||
| 214 | void	 lcong48(unsigned short[7]); | ||
| 215 | long	 lrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 216 | char	*mktemp(char *); | ||
| 217 | int	 mkstemp(char *); | ||
| 218 | long	 mrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 219 | long	 nrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 220 | int	 posix_openpt(int); | ||
| 221 | char	*ptsname(int); | ||
| 222 | |||
| 223 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 224 | int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3)); | ||
| 225 | #endif | ||
| 226 | |||
| 227 | int	 putenv(char *) __DARWIN_ALIAS(putenv); | ||
| 228 | long	 random(void) __swift_unavailable("Use arc4random instead."); | ||
| 229 | int	 rand_r(unsigned *) __swift_unavailable("Use arc4random instead."); | ||
| 230 | #if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) | ||
| 231 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); | ||
| 232 | #else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ | ||
| 233 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); | ||
| 234 | #endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ | ||
| 235 | unsigned short | ||
| 236 | 	*seed48(unsigned short[3]); | ||
| 237 | int	 setenv(const char * __name, const char * __value, int __overwrite) __DARWIN_ALIAS(setenv); | ||
| 238 | #if __DARWIN_UNIX03 | ||
| 239 | void	 setkey(const char *) __DARWIN_ALIAS(setkey); | ||
| 240 | #else /* !__DARWIN_UNIX03 */ | ||
| 241 | int	 setkey(const char *); | ||
| 242 | #endif /* __DARWIN_UNIX03 */ | ||
| 243 | char	*setstate(const char *); | ||
| 244 | void	 srand48(long); | ||
| 245 | #if __DARWIN_UNIX03 | ||
| 246 | void	 srandom(unsigned); | ||
| 247 | #else /* !__DARWIN_UNIX03 */ | ||
| 248 | void	 srandom(unsigned long); | ||
| 249 | #endif /* __DARWIN_UNIX03 */ | ||
| 250 | int	 unlockpt(int); | ||
| 251 | #if __DARWIN_UNIX03 | ||
| 252 | int	 unsetenv(const char *) __DARWIN_ALIAS(unsetenv); | ||
| 253 | #else /* !__DARWIN_UNIX03 */ | ||
| 254 | void	 unsetenv(const char *); | ||
| 255 | #endif /* __DARWIN_UNIX03 */ | ||
| 256 | #endif	/* !_ANSI_SOURCE */ | ||
| 257 | |||
| 258 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 259 | #include <machine/types.h> | ||
| 260 | #include <sys/_types/_dev_t.h> | ||
| 261 | #include <sys/_types/_mode_t.h> | ||
| 262 | #include <_types/_uint32_t.h> | ||
| 263 | |||
| 264 | uint32_t arc4random(void); | ||
| 265 | void	 arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/) | ||
| 266 | __OSX_DEPRECATED(10.0, 10.12, "use arc4random_stir") | ||
| 267 | __IOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 268 | __TVOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 269 | __WATCHOS_DEPRECATED(1.0, 3.0, "use arc4random_stir"); | ||
| 270 | void	 arc4random_buf(void * __buf, size_t __nbytes) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 271 | void	 arc4random_stir(void); | ||
| 272 | uint32_t | ||
| 273 | 	 arc4random_uniform(uint32_t __upper_bound) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 274 | #ifdef __BLOCKS__ | ||
| 275 | int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 276 | void	*bsearch_b(const void *__key, const void *__base, size_t __nel, | ||
| 277 | 	 size_t __width, int (^ _Nonnull __compar)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 278 | #endif /* __BLOCKS__ */ | ||
| 279 | |||
| 280 | 	 /* getcap(3) functions */ | ||
| 281 | char	*cgetcap(char *, const char *, int); | ||
| 282 | int	 cgetclose(void); | ||
| 283 | int	 cgetent(char **, char **, const char *); | ||
| 284 | int	 cgetfirst(char **, char **); | ||
| 285 | int	 cgetmatch(const char *, const char *); | ||
| 286 | int	 cgetnext(char **, char **); | ||
| 287 | int	 cgetnum(char *, const char *, long *); | ||
| 288 | int	 cgetset(const char *); | ||
| 289 | int	 cgetstr(char *, const char *, char **); | ||
| 290 | int	 cgetustr(char *, const char *, char **); | ||
| 291 | |||
| 292 | int	 daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 293 | char	*devname(dev_t, mode_t); | ||
| 294 | char	*devname_r(dev_t, mode_t, char *buf, int len); | ||
| 295 | char	*getbsize(int *, long *); | ||
| 296 | int	 getloadavg(double [], int); | ||
| 297 | const char | ||
| 298 | 	*getprogname(void); | ||
| 299 | void	 setprogname(const char *); | ||
| 300 | |||
| 301 | #ifdef __BLOCKS__ | ||
| 302 | #if __has_attribute(noescape) | ||
| 303 | #define __sort_noescape __attribute__((__noescape__)) | ||
| 304 | #else | ||
| 305 | #define __sort_noescape | ||
| 306 | #endif | ||
| 307 | #endif /* __BLOCKS__ */ | ||
| 308 | |||
| 309 | int	 heapsort(void *__base, size_t __nel, size_t __width, | ||
| 310 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 311 | #ifdef __BLOCKS__ | ||
| 312 | int	 heapsort_b(void *__base, size_t __nel, size_t __width, | ||
| 313 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 314 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 315 | #endif /* __BLOCKS__ */ | ||
| 316 | int	 mergesort(void *__base, size_t __nel, size_t __width, | ||
| 317 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 318 | #ifdef __BLOCKS__ | ||
| 319 | int	 mergesort_b(void *__base, size_t __nel, size_t __width, | ||
| 320 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 321 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 322 | #endif /* __BLOCKS__ */ | ||
| 323 | void	 psort(void *__base, size_t __nel, size_t __width, | ||
| 324 | 	 int (* _Nonnull __compar)(const void *, const void *)) | ||
| 325 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 326 | #ifdef __BLOCKS__ | ||
| 327 | void	 psort_b(void *__base, size_t __nel, size_t __width, | ||
| 328 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 329 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 330 | #endif /* __BLOCKS__ */ | ||
| 331 | void	 psort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 332 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)) | ||
| 333 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 334 | #ifdef __BLOCKS__ | ||
| 335 | void	 qsort_b(void *__base, size_t __nel, size_t __width, | ||
| 336 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 337 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 338 | #endif /* __BLOCKS__ */ | ||
| 339 | void	 qsort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 340 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)); | ||
| 341 | int	 radixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 342 | 	 unsigned __endbyte); | ||
| 343 | int	rpmatch(const char *) | ||
| 344 | 	__API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0)); | ||
| 345 | int	 sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 346 | 	 unsigned __endbyte); | ||
| 347 | void	 sranddev(void); | ||
| 348 | void	 srandomdev(void); | ||
| 349 | void	*reallocf(void *__ptr, size_t __size) __alloc_size(2); | ||
| 350 | long long | ||
| 351 | 	strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp) | ||
| 352 | 	__API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)); | ||
| 353 | #if !__DARWIN_NO_LONG_LONG | ||
| 354 | long long | ||
| 355 | 	 strtoq(const char *__str, char **__endptr, int __base); | ||
| 356 | unsigned long long | ||
| 357 | 	 strtouq(const char *__str, char **__endptr, int __base); | ||
| 358 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 359 | extern char *suboptarg;		/* getsubopt(3) external variable */ | ||
| 360 | /* valloc is now declared in _malloc.h */ | ||
| 361 | #endif	/* !_ANSI_SOURCE && !_POSIX_SOURCE */ | ||
| 362 | |||
| 363 | /* Poison the following routines if -fshort-wchar is set */ | ||
| 364 | #if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU | ||
| 365 | #pragma GCC poison mbstowcs mbtowc wcstombs wctomb | ||
| 366 | #endif | ||
| 367 | __END_DECLS | ||
| 368 | |||
| 369 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 370 | #include <xlocale/_stdlib.h> | ||
| 371 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 372 | |||
| 373 | #endif /* _STDLIB_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/_symbol_aliasing.h+30| ... | @@ -341,6 +341,24 @@ | ... | @@ -341,6 +341,24 @@ |
| 341 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x) | 341 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_14_5(x) |
| 342 | #endif | 342 | #endif |
| 343 | 343 | ||
| 344 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150000 | ||
| 345 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) x | ||
| 346 | #else | ||
| 347 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) | ||
| 348 | #endif | ||
| 349 | |||
| 350 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150100 | ||
| 351 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x) x | ||
| 352 | #else | ||
| 353 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x) | ||
| 354 | #endif | ||
| 355 | |||
| 356 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150200 | ||
| 357 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x) x | ||
| 358 | #else | ||
| 359 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x) | ||
| 360 | #endif | ||
| 361 | |||
| 344 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 | 362 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 |
| 345 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x | 363 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x |
| 346 | #else | 364 | #else |
| ... | @@ -555,4 +573,16 @@ | ... | @@ -555,4 +573,16 @@ |
| 555 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) x | 573 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) x |
| 556 | #else | 574 | #else |
| 557 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) | 575 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_11_3(x) |
| 576 | #endif | ||
| 577 | |||
| 578 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120000 | ||
| 579 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) x | ||
| 580 | #else | ||
| 581 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) | ||
| 582 | #endif | ||
| 583 | |||
| 584 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120100 | ||
| 585 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x) x | ||
| 586 | #else | ||
| 587 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x) | ||
| 558 | #endif | 588 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/attr.h+6-1| ... | @@ -83,6 +83,7 @@ struct attrlist { | ... | @@ -83,6 +83,7 @@ struct attrlist { |
| 83 | 	attrgroup_t fileattr; /* file attribute group */ | 83 | 	attrgroup_t fileattr; /* file attribute group */ |
| 84 | 	attrgroup_t forkattr; /* fork attribute group */ | 84 | 	attrgroup_t forkattr; /* fork attribute group */ |
| 85 | }; | 85 | }; |
| 86 | |||
| 86 | #define ATTR_BIT_MAP_COUNT 5 | 87 | #define ATTR_BIT_MAP_COUNT 5 |
| 87 | 88 | ||
| 88 | typedef struct attribute_set { | 89 | typedef struct attribute_set { |
| ... | @@ -93,6 +94,9 @@ typedef struct attribute_set { | ... | @@ -93,6 +94,9 @@ typedef struct attribute_set { |
| 93 | 	attrgroup_t forkattr; /* fork attribute group */ | 94 | 	attrgroup_t forkattr; /* fork attribute group */ |
| 94 | } attribute_set_t; | 95 | } attribute_set_t; |
| 95 | 96 | ||
| 97 | #define ATTRIBUTE_SET_INIT(a) do {(a)->commonattr = (a)->volattr = (a)->dirattr = (a)->fileattr = (a)->forkattr = 0; } while(0) | ||
| 98 | |||
| 99 | |||
| 96 | typedef struct attrreference { | 100 | typedef struct attrreference { |
| 97 | 	int32_t attr_dataoffset; | 101 | 	int32_t attr_dataoffset; |
| 98 | 	u_int32_t attr_length; | 102 | 	u_int32_t attr_length; |
| ... | @@ -463,12 +467,13 @@ typedef struct vol_attributes_attr { | ... | @@ -463,12 +467,13 @@ typedef struct vol_attributes_attr { |
| 463 | #define ATTR_VOL_ENCODINGSUSED 0x00010000 | 467 | #define ATTR_VOL_ENCODINGSUSED 0x00010000 |
| 464 | #define ATTR_VOL_CAPABILITIES 0x00020000 | 468 | #define ATTR_VOL_CAPABILITIES 0x00020000 |
| 465 | #define ATTR_VOL_UUID 0x00040000 | 469 | #define ATTR_VOL_UUID 0x00040000 |
| 470 | #define ATTR_VOL_SPACEUSED 0x00800000 | ||
| 466 | #define ATTR_VOL_QUOTA_SIZE 0x10000000 | 471 | #define ATTR_VOL_QUOTA_SIZE 0x10000000 |
| 467 | #define ATTR_VOL_RESERVED_SIZE 0x20000000 | 472 | #define ATTR_VOL_RESERVED_SIZE 0x20000000 |
| 468 | #define ATTR_VOL_ATTRIBUTES 0x40000000 | 473 | #define ATTR_VOL_ATTRIBUTES 0x40000000 |
| 469 | #define ATTR_VOL_INFO 0x80000000 | 474 | #define ATTR_VOL_INFO 0x80000000 |
| 470 | 475 | ||
| 471 | #define ATTR_VOL_VALIDMASK 0xF007FFFF | 476 | #define ATTR_VOL_VALIDMASK 0xF087FFFF |
| 472 | 477 | ||
| 473 | /* | 478 | /* |
| 474 | * The list of settable ATTR_VOL_* attributes include the following: | 479 | * The list of settable ATTR_VOL_* attributes include the following: |
lib/libc/include/any-macos.11-any/sys/cdefs.h+19-3| ... | @@ -152,8 +152,16 @@ | ... | @@ -152,8 +152,16 @@ |
| 152 | #endif /* !NO_ANSI_KEYWORDS */ | 152 | #endif /* !NO_ANSI_KEYWORDS */ |
| 153 | #endif /* !(__STDC__ || __cplusplus) */ | 153 | #endif /* !(__STDC__ || __cplusplus) */ |
| 154 | 154 | ||
| 155 | /* | ||
| 156 | * __pure2 can be used for functions that are only a function of their scalar | ||
| 157 | * arguments (meaning they can't dereference pointers). | ||
| 158 | * | ||
| 159 | * __stateful_pure can be used for functions that have no side effects, | ||
| 160 | * but depend on the state of the memory. | ||
| 161 | */ | ||
| 155 | #define __dead2 __attribute__((__noreturn__)) | 162 | #define __dead2 __attribute__((__noreturn__)) |
| 156 | #define __pure2 __attribute__((__const__)) | 163 | #define __pure2 __attribute__((__const__)) |
| 164 | #define __stateful_pure __attribute__((__pure__)) | ||
| 157 | 165 | ||
| 158 | /* __unused denotes variables and functions that may not be used, preventing | 166 | /* __unused denotes variables and functions that may not be used, preventing |
| 159 | * the compiler from warning about it if not used. | 167 | * the compiler from warning about it if not used. |
| ... | @@ -179,9 +187,9 @@ | ... | @@ -179,9 +187,9 @@ |
| 179 | * __exported_push/_exported_pop are pragmas used to delimit a range of | 187 | * __exported_push/_exported_pop are pragmas used to delimit a range of |
| 180 | * symbols that should be exported even when symbols are hidden by default. | 188 | * symbols that should be exported even when symbols are hidden by default. |
| 181 | */ | 189 | */ |
| 182 | #define __exported __attribute__((__visibility__("default"))) | 190 | #define __exported __attribute__((__visibility__("default"))) |
| 183 | #define __exported_push _Pragma("GCC visibility push(default)") | 191 | #define __exported_push _Pragma("GCC visibility push(default)") |
| 184 | #define __exported_pop _Pragma("GCC visibility pop") | 192 | #define __exported_pop _Pragma("GCC visibility pop") |
| 185 | 193 | ||
| 186 | /* __deprecated causes the compiler to produce a warning when encountering | 194 | /* __deprecated causes the compiler to produce a warning when encountering |
| 187 | * code using the deprecated functionality. | 195 | * code using the deprecated functionality. |
| ... | @@ -817,6 +825,7 @@ | ... | @@ -817,6 +825,7 @@ |
| 817 | #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden"))) | 825 | #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden"))) |
| 818 | #endif | 826 | #endif |
| 819 | 827 | ||
| 828 | |||
| 820 | /* | 829 | /* |
| 821 | * Architecture validation for current SDK | 830 | * Architecture validation for current SDK |
| 822 | */ | 831 | */ |
| ... | @@ -873,4 +882,11 @@ | ... | @@ -873,4 +882,11 @@ |
| 873 | 	 typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options | 882 | 	 typedef _type _name; enum __VA_ARGS__ __enum_closed __enum_options |
| 874 | #endif | 883 | #endif |
| 875 | 884 | ||
| 885 | |||
| 886 | |||
| 887 | #define __kernel_ptr_semantics | ||
| 888 | #define __kernel_data_semantics | ||
| 889 | #define __kernel_dual_semantics | ||
| 890 | |||
| 891 | |||
| 876 | #endif /* !_CDEFS_H_ */ | 892 | #endif /* !_CDEFS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/event.h+2-3| ... | @@ -58,7 +58,9 @@ | ... | @@ -58,7 +58,9 @@ |
| 58 | 58 | ||
| 59 | #include <machine/types.h> | 59 | #include <machine/types.h> |
| 60 | #include <sys/cdefs.h> | 60 | #include <sys/cdefs.h> |
| 61 | #include <sys/queue.h> | ||
| 61 | #include <stdint.h> | 62 | #include <stdint.h> |
| 63 | #include <sys/types.h> | ||
| 62 | 64 | ||
| 63 | /* | 65 | /* |
| 64 | * Filter types | 66 | * Filter types |
| ... | @@ -366,13 +368,10 @@ enum { | ... | @@ -366,13 +368,10 @@ enum { |
| 366 | 368 | ||
| 367 | 369 | ||
| 368 | /* Temporay solution for BootX to use inode.h till kqueue moves to vfs layer */ | 370 | /* Temporay solution for BootX to use inode.h till kqueue moves to vfs layer */ |
| 369 | #include <sys/queue.h> | ||
| 370 | struct knote; | 371 | struct knote; |
| 371 | SLIST_HEAD(klist, knote); | 372 | SLIST_HEAD(klist, knote); |
| 372 | 373 | ||
| 373 | 374 | ||
| 374 | #include <sys/types.h> | ||
| 375 | |||
| 376 | struct timespec; | 375 | struct timespec; |
| 377 | 376 | ||
| 378 | __BEGIN_DECLS | 377 | __BEGIN_DECLS |
lib/libc/include/any-macos.11-any/sys/fcntl.h+11-2| ... | @@ -134,8 +134,11 @@ | ... | @@ -134,8 +134,11 @@ |
| 134 | #define O_NOCTTY 0x00020000 /* don't assign controlling terminal */ | 134 | #define O_NOCTTY 0x00020000 /* don't assign controlling terminal */ |
| 135 | 135 | ||
| 136 | 136 | ||
| 137 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | 137 | #if __DARWIN_C_LEVEL >= 200809L |
| 138 | #define O_DIRECTORY 0x00100000 | 138 | #define O_DIRECTORY 0x00100000 |
| 139 | #endif | ||
| 140 | |||
| 141 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 139 | #define O_SYMLINK 0x00200000 /* allow open of a symlink */ | 142 | #define O_SYMLINK 0x00200000 /* allow open of a symlink */ |
| 140 | #endif | 143 | #endif |
| 141 | 144 | ||
| ... | @@ -256,7 +259,13 @@ | ... | @@ -256,7 +259,13 @@ |
| 256 | 259 | ||
| 257 | #define F_LOG2PHYS_EXT 65 /* file offset to device offset, extended */ | 260 | #define F_LOG2PHYS_EXT 65 /* file offset to device offset, extended */ |
| 258 | 261 | ||
| 259 | #define F_GETLKPID 66 /* get record locking information, per-process */ | 262 | #define F_GETLKPID 66 /* See man fcntl(2) F_GETLK |
| 263 | 	 * Similar to F_GETLK but in addition l_pid is treated as an input parameter | ||
| 264 | 	 * which is used as a matching value when searching locks on the file | ||
| 265 | 	 * so that only locks owned by the process with pid l_pid are returned. | ||
| 266 | 	 * However, any flock(2) type lock will also be found with the returned value | ||
| 267 | 	 * of l_pid set to -1 (as with F_GETLK). | ||
| 268 | 	 */ | ||
| 260 | 269 | ||
| 261 | /* See F_DUPFD_CLOEXEC below for 67 */ | 270 | /* See F_DUPFD_CLOEXEC below for 67 */ |
| 262 | 271 |
lib/libc/include/any-macos.11-any/sys/mount.h+1-1| ... | @@ -388,7 +388,6 @@ struct netfs_status { | ... | @@ -388,7 +388,6 @@ struct netfs_status { |
| 388 | 388 | ||
| 389 | 389 | ||
| 390 | 390 | ||
| 391 | |||
| 392 | /* | 391 | /* |
| 393 | * Generic file handle | 392 | * Generic file handle |
| 394 | */ | 393 | */ |
| ... | @@ -403,6 +402,7 @@ struct fhandle { | ... | @@ -403,6 +402,7 @@ struct fhandle { |
| 403 | typedef struct fhandle fhandle_t; | 402 | typedef struct fhandle fhandle_t; |
| 404 | 403 | ||
| 405 | 404 | ||
| 405 | |||
| 406 | __BEGIN_DECLS | 406 | __BEGIN_DECLS |
| 407 | int fhopen(const struct fhandle *, int); | 407 | int fhopen(const struct fhandle *, int); |
| 408 | int fstatfs(int, struct statfs *) __DARWIN_INODE64(fstatfs); | 408 | int fstatfs(int, struct statfs *) __DARWIN_INODE64(fstatfs); |
lib/libc/include/any-macos.11-any/sys/proc_info.h+5-6| ... | @@ -620,12 +620,11 @@ struct kqueue_dyninfo { | ... | @@ -620,12 +620,11 @@ struct kqueue_dyninfo { |
| 620 | }; | 620 | }; |
| 621 | 621 | ||
| 622 | /* keep in sync with KQ_* in sys/eventvar.h */ | 622 | /* keep in sync with KQ_* in sys/eventvar.h */ |
| 623 | #define PROC_KQUEUE_SELECT 0x01 | 623 | #define PROC_KQUEUE_SELECT 0x0001 |
| 624 | #define PROC_KQUEUE_SLEEP 0x02 | 624 | #define PROC_KQUEUE_SLEEP 0x0002 |
| 625 | #define PROC_KQUEUE_32 0x08 | 625 | #define PROC_KQUEUE_32 0x0008 |
| 626 | #define PROC_KQUEUE_64 0x10 | 626 | #define PROC_KQUEUE_64 0x0010 |
| 627 | #define PROC_KQUEUE_QOS 0x20 | 627 | #define PROC_KQUEUE_QOS 0x0020 |
| 628 | |||
| 629 | 628 | ||
| 630 | struct kqueue_fdinfo { | 629 | struct kqueue_fdinfo { |
| 631 | 	struct proc_fileinfo pfi; | 630 | 	struct proc_fileinfo pfi; |
lib/libc/include/any-macos.11-any/sys/resource.h deleted-520| ... | @@ -1,520 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /* | ||
| 30 | * Copyright (c) 1982, 1986, 1993 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)resource.h	8.2 (Berkeley) 1/4/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_RESOURCE_H_ | ||
| 65 | #define _SYS_RESOURCE_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | #include <sys/cdefs.h> | ||
| 69 | #include <sys/_types.h> | ||
| 70 | |||
| 71 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 72 | #include <stdint.h> | ||
| 73 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 74 | |||
| 75 | #include <Availability.h> | ||
| 76 | |||
| 77 | /* [XSI] The timeval structure shall be defined as described in | ||
| 78 | * <sys/time.h> | ||
| 79 | */ | ||
| 80 | #include <sys/_types/_timeval.h> | ||
| 81 | |||
| 82 | /* The id_t type shall be defined as described in <sys/types.h> */ | ||
| 83 | #include <sys/_types/_id_t.h> | ||
| 84 | |||
| 85 | |||
| 86 | /* | ||
| 87 | * Resource limit type (low 63 bits, excluding the sign bit) | ||
| 88 | */ | ||
| 89 | typedef __uint64_t rlim_t; | ||
| 90 | |||
| 91 | |||
| 92 | /***** | ||
| 93 | * PRIORITY | ||
| 94 | */ | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Possible values of the first parameter to getpriority()/setpriority(), | ||
| 98 | * used to indicate the type of the second parameter. | ||
| 99 | */ | ||
| 100 | #define PRIO_PROCESS 0 /* Second argument is a PID */ | ||
| 101 | #define PRIO_PGRP 1 /* Second argument is a GID */ | ||
| 102 | #define PRIO_USER 2 /* Second argument is a UID */ | ||
| 103 | |||
| 104 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 105 | #define PRIO_DARWIN_THREAD 3 /* Second argument is always 0 (current thread) */ | ||
| 106 | #define PRIO_DARWIN_PROCESS 4 /* Second argument is a PID */ | ||
| 107 | |||
| 108 | |||
| 109 | /* | ||
| 110 | * Range limitations for the value of the third parameter to setpriority(). | ||
| 111 | */ | ||
| 112 | #define PRIO_MIN -20 | ||
| 113 | #define PRIO_MAX 20 | ||
| 114 | |||
| 115 | /* | ||
| 116 | * use PRIO_DARWIN_BG to set the current thread into "background" state | ||
| 117 | * which lowers CPU, disk IO, and networking priorites until thread terminates | ||
| 118 | * or "background" state is revoked | ||
| 119 | */ | ||
| 120 | #define PRIO_DARWIN_BG 0x1000 | ||
| 121 | |||
| 122 | /* | ||
| 123 | * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to | ||
| 124 | * the GPU. (deprecated) | ||
| 125 | */ | ||
| 126 | #define PRIO_DARWIN_NONUI 0x1001 | ||
| 127 | |||
| 128 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | /***** | ||
| 133 | * RESOURCE USAGE | ||
| 134 | */ | ||
| 135 | |||
| 136 | /* | ||
| 137 | * Possible values of the first parameter to getrusage(), used to indicate | ||
| 138 | * the scope of the information to be returned. | ||
| 139 | */ | ||
| 140 | #define RUSAGE_SELF 0 /* Current process information */ | ||
| 141 | #define RUSAGE_CHILDREN -1 /* Current process' children */ | ||
| 142 | |||
| 143 | /* | ||
| 144 | * A structure representing an accounting of resource utilization. The | ||
| 145 | * address of an instance of this structure is the second parameter to | ||
| 146 | * getrusage(). | ||
| 147 | * | ||
| 148 | * Note: All values other than ru_utime and ru_stime are implementaiton | ||
| 149 | * defined and subject to change in a future release. Their use | ||
| 150 | * is discouraged for standards compliant programs. | ||
| 151 | */ | ||
| 152 | struct rusage { | ||
| 153 | 	struct timeval ru_utime; /* user time used (PL) */ | ||
| 154 | 	struct timeval ru_stime; /* system time used (PL) */ | ||
| 155 | #if __DARWIN_C_LEVEL < __DARWIN_C_FULL | ||
| 156 | 	long ru_opaque[14]; /* implementation defined */ | ||
| 157 | #else | ||
| 158 | 	/* | ||
| 159 | 	 * Informational aliases for source compatibility with programs | ||
| 160 | 	 * that need more information than that provided by standards, | ||
| 161 | 	 * and which do not mind being OS-dependent. | ||
| 162 | 	 */ | ||
| 163 | 	long ru_maxrss; /* max resident set size (PL) */ | ||
| 164 | #define ru_first ru_ixrss /* internal: ruadd() range start */ | ||
| 165 | 	long ru_ixrss; /* integral shared memory size (NU) */ | ||
| 166 | 	long ru_idrss; /* integral unshared data (NU) */ | ||
| 167 | 	long ru_isrss; /* integral unshared stack (NU) */ | ||
| 168 | 	long ru_minflt; /* page reclaims (NU) */ | ||
| 169 | 	long ru_majflt; /* page faults (NU) */ | ||
| 170 | 	long ru_nswap; /* swaps (NU) */ | ||
| 171 | 	long ru_inblock; /* block input operations (atomic) */ | ||
| 172 | 	long ru_oublock; /* block output operations (atomic) */ | ||
| 173 | 	long ru_msgsnd; /* messages sent (atomic) */ | ||
| 174 | 	long ru_msgrcv; /* messages received (atomic) */ | ||
| 175 | 	long ru_nsignals; /* signals received (atomic) */ | ||
| 176 | 	long ru_nvcsw; /* voluntary context switches (atomic) */ | ||
| 177 | 	long ru_nivcsw; /* involuntary " */ | ||
| 178 | #define ru_last ru_nivcsw /* internal: ruadd() range end */ | ||
| 179 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 183 | /* | ||
| 184 | * Flavors for proc_pid_rusage(). | ||
| 185 | */ | ||
| 186 | #define RUSAGE_INFO_V0 0 | ||
| 187 | #define RUSAGE_INFO_V1 1 | ||
| 188 | #define RUSAGE_INFO_V2 2 | ||
| 189 | #define RUSAGE_INFO_V3 3 | ||
| 190 | #define RUSAGE_INFO_V4 4 | ||
| 191 | #define RUSAGE_INFO_V5 5 | ||
| 192 | #define RUSAGE_INFO_CURRENT RUSAGE_INFO_V5 | ||
| 193 | |||
| 194 | /* | ||
| 195 | * Flags for RUSAGE_INFO_V5 | ||
| 196 | */ | ||
| 197 | #define RU_PROC_RUNS_RESLIDE 0x00000001 /* proc has reslid shared cache */ | ||
| 198 | |||
| 199 | typedef void *rusage_info_t; | ||
| 200 | |||
| 201 | struct rusage_info_v0 { | ||
| 202 | 	uint8_t ri_uuid[16]; | ||
| 203 | 	uint64_t ri_user_time; | ||
| 204 | 	uint64_t ri_system_time; | ||
| 205 | 	uint64_t ri_pkg_idle_wkups; | ||
| 206 | 	uint64_t ri_interrupt_wkups; | ||
| 207 | 	uint64_t ri_pageins; | ||
| 208 | 	uint64_t ri_wired_size; | ||
| 209 | 	uint64_t ri_resident_size; | ||
| 210 | 	uint64_t ri_phys_footprint; | ||
| 211 | 	uint64_t ri_proc_start_abstime; | ||
| 212 | 	uint64_t ri_proc_exit_abstime; | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct rusage_info_v1 { | ||
| 216 | 	uint8_t ri_uuid[16]; | ||
| 217 | 	uint64_t ri_user_time; | ||
| 218 | 	uint64_t ri_system_time; | ||
| 219 | 	uint64_t ri_pkg_idle_wkups; | ||
| 220 | 	uint64_t ri_interrupt_wkups; | ||
| 221 | 	uint64_t ri_pageins; | ||
| 222 | 	uint64_t ri_wired_size; | ||
| 223 | 	uint64_t ri_resident_size; | ||
| 224 | 	uint64_t ri_phys_footprint; | ||
| 225 | 	uint64_t ri_proc_start_abstime; | ||
| 226 | 	uint64_t ri_proc_exit_abstime; | ||
| 227 | 	uint64_t ri_child_user_time; | ||
| 228 | 	uint64_t ri_child_system_time; | ||
| 229 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 230 | 	uint64_t ri_child_interrupt_wkups; | ||
| 231 | 	uint64_t ri_child_pageins; | ||
| 232 | 	uint64_t ri_child_elapsed_abstime; | ||
| 233 | }; | ||
| 234 | |||
| 235 | struct rusage_info_v2 { | ||
| 236 | 	uint8_t ri_uuid[16]; | ||
| 237 | 	uint64_t ri_user_time; | ||
| 238 | 	uint64_t ri_system_time; | ||
| 239 | 	uint64_t ri_pkg_idle_wkups; | ||
| 240 | 	uint64_t ri_interrupt_wkups; | ||
| 241 | 	uint64_t ri_pageins; | ||
| 242 | 	uint64_t ri_wired_size; | ||
| 243 | 	uint64_t ri_resident_size; | ||
| 244 | 	uint64_t ri_phys_footprint; | ||
| 245 | 	uint64_t ri_proc_start_abstime; | ||
| 246 | 	uint64_t ri_proc_exit_abstime; | ||
| 247 | 	uint64_t ri_child_user_time; | ||
| 248 | 	uint64_t ri_child_system_time; | ||
| 249 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 250 | 	uint64_t ri_child_interrupt_wkups; | ||
| 251 | 	uint64_t ri_child_pageins; | ||
| 252 | 	uint64_t ri_child_elapsed_abstime; | ||
| 253 | 	uint64_t ri_diskio_bytesread; | ||
| 254 | 	uint64_t ri_diskio_byteswritten; | ||
| 255 | }; | ||
| 256 | |||
| 257 | struct rusage_info_v3 { | ||
| 258 | 	uint8_t ri_uuid[16]; | ||
| 259 | 	uint64_t ri_user_time; | ||
| 260 | 	uint64_t ri_system_time; | ||
| 261 | 	uint64_t ri_pkg_idle_wkups; | ||
| 262 | 	uint64_t ri_interrupt_wkups; | ||
| 263 | 	uint64_t ri_pageins; | ||
| 264 | 	uint64_t ri_wired_size; | ||
| 265 | 	uint64_t ri_resident_size; | ||
| 266 | 	uint64_t ri_phys_footprint; | ||
| 267 | 	uint64_t ri_proc_start_abstime; | ||
| 268 | 	uint64_t ri_proc_exit_abstime; | ||
| 269 | 	uint64_t ri_child_user_time; | ||
| 270 | 	uint64_t ri_child_system_time; | ||
| 271 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 272 | 	uint64_t ri_child_interrupt_wkups; | ||
| 273 | 	uint64_t ri_child_pageins; | ||
| 274 | 	uint64_t ri_child_elapsed_abstime; | ||
| 275 | 	uint64_t ri_diskio_bytesread; | ||
| 276 | 	uint64_t ri_diskio_byteswritten; | ||
| 277 | 	uint64_t ri_cpu_time_qos_default; | ||
| 278 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 279 | 	uint64_t ri_cpu_time_qos_background; | ||
| 280 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 281 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 282 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 283 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 284 | 	uint64_t ri_billed_system_time; | ||
| 285 | 	uint64_t ri_serviced_system_time; | ||
| 286 | }; | ||
| 287 | |||
| 288 | struct rusage_info_v4 { | ||
| 289 | 	uint8_t ri_uuid[16]; | ||
| 290 | 	uint64_t ri_user_time; | ||
| 291 | 	uint64_t ri_system_time; | ||
| 292 | 	uint64_t ri_pkg_idle_wkups; | ||
| 293 | 	uint64_t ri_interrupt_wkups; | ||
| 294 | 	uint64_t ri_pageins; | ||
| 295 | 	uint64_t ri_wired_size; | ||
| 296 | 	uint64_t ri_resident_size; | ||
| 297 | 	uint64_t ri_phys_footprint; | ||
| 298 | 	uint64_t ri_proc_start_abstime; | ||
| 299 | 	uint64_t ri_proc_exit_abstime; | ||
| 300 | 	uint64_t ri_child_user_time; | ||
| 301 | 	uint64_t ri_child_system_time; | ||
| 302 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 303 | 	uint64_t ri_child_interrupt_wkups; | ||
| 304 | 	uint64_t ri_child_pageins; | ||
| 305 | 	uint64_t ri_child_elapsed_abstime; | ||
| 306 | 	uint64_t ri_diskio_bytesread; | ||
| 307 | 	uint64_t ri_diskio_byteswritten; | ||
| 308 | 	uint64_t ri_cpu_time_qos_default; | ||
| 309 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 310 | 	uint64_t ri_cpu_time_qos_background; | ||
| 311 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 312 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 313 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 314 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 315 | 	uint64_t ri_billed_system_time; | ||
| 316 | 	uint64_t ri_serviced_system_time; | ||
| 317 | 	uint64_t ri_logical_writes; | ||
| 318 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 319 | 	uint64_t ri_instructions; | ||
| 320 | 	uint64_t ri_cycles; | ||
| 321 | 	uint64_t ri_billed_energy; | ||
| 322 | 	uint64_t ri_serviced_energy; | ||
| 323 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 324 | 	uint64_t ri_runnable_time; | ||
| 325 | }; | ||
| 326 | |||
| 327 | struct rusage_info_v5 { | ||
| 328 | 	uint8_t ri_uuid[16]; | ||
| 329 | 	uint64_t ri_user_time; | ||
| 330 | 	uint64_t ri_system_time; | ||
| 331 | 	uint64_t ri_pkg_idle_wkups; | ||
| 332 | 	uint64_t ri_interrupt_wkups; | ||
| 333 | 	uint64_t ri_pageins; | ||
| 334 | 	uint64_t ri_wired_size; | ||
| 335 | 	uint64_t ri_resident_size; | ||
| 336 | 	uint64_t ri_phys_footprint; | ||
| 337 | 	uint64_t ri_proc_start_abstime; | ||
| 338 | 	uint64_t ri_proc_exit_abstime; | ||
| 339 | 	uint64_t ri_child_user_time; | ||
| 340 | 	uint64_t ri_child_system_time; | ||
| 341 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 342 | 	uint64_t ri_child_interrupt_wkups; | ||
| 343 | 	uint64_t ri_child_pageins; | ||
| 344 | 	uint64_t ri_child_elapsed_abstime; | ||
| 345 | 	uint64_t ri_diskio_bytesread; | ||
| 346 | 	uint64_t ri_diskio_byteswritten; | ||
| 347 | 	uint64_t ri_cpu_time_qos_default; | ||
| 348 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 349 | 	uint64_t ri_cpu_time_qos_background; | ||
| 350 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 351 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 352 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 353 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 354 | 	uint64_t ri_billed_system_time; | ||
| 355 | 	uint64_t ri_serviced_system_time; | ||
| 356 | 	uint64_t ri_logical_writes; | ||
| 357 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 358 | 	uint64_t ri_instructions; | ||
| 359 | 	uint64_t ri_cycles; | ||
| 360 | 	uint64_t ri_billed_energy; | ||
| 361 | 	uint64_t ri_serviced_energy; | ||
| 362 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 363 | 	uint64_t ri_runnable_time; | ||
| 364 | 	uint64_t ri_flags; | ||
| 365 | }; | ||
| 366 | |||
| 367 | typedef struct rusage_info_v5 rusage_info_current; | ||
| 368 | |||
| 369 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 370 | |||
| 371 | |||
| 372 | |||
| 373 | /***** | ||
| 374 | * RESOURCE LIMITS | ||
| 375 | */ | ||
| 376 | |||
| 377 | /* | ||
| 378 | * Symbolic constants for resource limits; since all limits are representable | ||
| 379 | * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of | ||
| 380 | * RLIM_INFINITY. | ||
| 381 | */ | ||
| 382 | #define RLIM_INFINITY (((__uint64_t)1 << 63) - 1) /* no limit */ | ||
| 383 | #define RLIM_SAVED_MAX RLIM_INFINITY /* Unrepresentable hard limit */ | ||
| 384 | #define RLIM_SAVED_CUR RLIM_INFINITY /* Unrepresentable soft limit */ | ||
| 385 | |||
| 386 | /* | ||
| 387 | * Possible values of the first parameter to getrlimit()/setrlimit(), to | ||
| 388 | * indicate for which resource the operation is being performed. | ||
| 389 | */ | ||
| 390 | #define RLIMIT_CPU 0 /* cpu time per process */ | ||
| 391 | #define RLIMIT_FSIZE 1 /* file size */ | ||
| 392 | #define RLIMIT_DATA 2 /* data segment size */ | ||
| 393 | #define RLIMIT_STACK 3 /* stack size */ | ||
| 394 | #define RLIMIT_CORE 4 /* core file size */ | ||
| 395 | #define RLIMIT_AS 5 /* address space (resident set size) */ | ||
| 396 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 397 | #define RLIMIT_RSS RLIMIT_AS /* source compatibility alias */ | ||
| 398 | #define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */ | ||
| 399 | #define RLIMIT_NPROC 7 /* number of processes */ | ||
| 400 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 401 | #define RLIMIT_NOFILE 8 /* number of open files */ | ||
| 402 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 403 | #define RLIM_NLIMITS 9 /* total number of resource limits */ | ||
| 404 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 405 | #define _RLIMIT_POSIX_FLAG 0x1000 /* Set bit for strict POSIX */ | ||
| 406 | |||
| 407 | /* | ||
| 408 | * A structure representing a resource limit. The address of an instance | ||
| 409 | * of this structure is the second parameter to getrlimit()/setrlimit(). | ||
| 410 | */ | ||
| 411 | struct rlimit { | ||
| 412 | 	rlim_t rlim_cur; /* current (soft) limit */ | ||
| 413 | 	rlim_t rlim_max; /* maximum value for rlim_cur */ | ||
| 414 | }; | ||
| 415 | |||
| 416 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 417 | /* | ||
| 418 | * proc_rlimit_control() | ||
| 419 | * | ||
| 420 | * Resource limit flavors | ||
| 421 | */ | ||
| 422 | #define RLIMIT_WAKEUPS_MONITOR 0x1 /* Configure the wakeups monitor. */ | ||
| 423 | #define RLIMIT_CPU_USAGE_MONITOR 0x2 /* Configure the CPU usage monitor. */ | ||
| 424 | #define RLIMIT_THREAD_CPULIMITS 0x3 /* Configure a blocking, per-thread, CPU limits. */ | ||
| 425 | #define RLIMIT_FOOTPRINT_INTERVAL 0x4 /* Configure memory footprint interval tracking */ | ||
| 426 | |||
| 427 | /* | ||
| 428 | * Flags for wakeups monitor control. | ||
| 429 | */ | ||
| 430 | #define WAKEMON_ENABLE 0x01 | ||
| 431 | #define WAKEMON_DISABLE 0x02 | ||
| 432 | #define WAKEMON_GET_PARAMS 0x04 | ||
| 433 | #define WAKEMON_SET_DEFAULTS 0x08 | ||
| 434 | #define WAKEMON_MAKE_FATAL 0x10 /* Configure the task so that violations are fatal. */ | ||
| 435 | |||
| 436 | /* | ||
| 437 | * Flags for CPU usage monitor control. | ||
| 438 | */ | ||
| 439 | #define CPUMON_MAKE_FATAL 0x1000 | ||
| 440 | |||
| 441 | /* | ||
| 442 | * Flags for memory footprint interval tracking. | ||
| 443 | */ | ||
| 444 | #define FOOTPRINT_INTERVAL_RESET 0x1 /* Reset the footprint interval counter to zero */ | ||
| 445 | |||
| 446 | struct proc_rlimit_control_wakeupmon { | ||
| 447 | 	uint32_t wm_flags; | ||
| 448 | 	int32_t wm_rate; | ||
| 449 | }; | ||
| 450 | |||
| 451 | |||
| 452 | |||
| 453 | /* I/O type */ | ||
| 454 | #define IOPOL_TYPE_DISK 0 | ||
| 455 | #define IOPOL_TYPE_VFS_ATIME_UPDATES 2 | ||
| 456 | #define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3 | ||
| 457 | #define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4 | ||
| 458 | #define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5 | ||
| 459 | #define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6 | ||
| 460 | #define IOPOL_TYPE_VFS_IGNORE_PERMISSIONS 7 | ||
| 461 | #define IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE 8 | ||
| 462 | |||
| 463 | /* scope */ | ||
| 464 | #define IOPOL_SCOPE_PROCESS 0 | ||
| 465 | #define IOPOL_SCOPE_THREAD 1 | ||
| 466 | #define IOPOL_SCOPE_DARWIN_BG 2 | ||
| 467 | |||
| 468 | /* I/O Priority */ | ||
| 469 | #define IOPOL_DEFAULT 0 | ||
| 470 | #define IOPOL_IMPORTANT 1 | ||
| 471 | #define IOPOL_PASSIVE 2 | ||
| 472 | #define IOPOL_THROTTLE 3 | ||
| 473 | #define IOPOL_UTILITY 4 | ||
| 474 | #define IOPOL_STANDARD 5 | ||
| 475 | |||
| 476 | /* compatibility with older names */ | ||
| 477 | #define IOPOL_APPLICATION IOPOL_STANDARD | ||
| 478 | #define IOPOL_NORMAL IOPOL_IMPORTANT | ||
| 479 | |||
| 480 | |||
| 481 | #define IOPOL_ATIME_UPDATES_DEFAULT 0 | ||
| 482 | #define IOPOL_ATIME_UPDATES_OFF 1 | ||
| 483 | |||
| 484 | #define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0 | ||
| 485 | #define IOPOL_MATERIALIZE_DATALESS_FILES_OFF 1 | ||
| 486 | #define IOPOL_MATERIALIZE_DATALESS_FILES_ON 2 | ||
| 487 | |||
| 488 | #define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0 | ||
| 489 | #define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1 | ||
| 490 | |||
| 491 | #define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0 | ||
| 492 | #define IOPOL_VFS_TRIGGER_RESOLVE_OFF 1 | ||
| 493 | |||
| 494 | #define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0 | ||
| 495 | #define IOPOL_VFS_CONTENT_PROTECTION_IGNORE 1 | ||
| 496 | |||
| 497 | #define IOPOL_VFS_IGNORE_PERMISSIONS_OFF 0 | ||
| 498 | #define IOPOL_VFS_IGNORE_PERMISSIONS_ON 1 | ||
| 499 | |||
| 500 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_OFF 0 | ||
| 501 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_ON 1 | ||
| 502 | |||
| 503 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 504 | |||
| 505 | |||
| 506 | __BEGIN_DECLS | ||
| 507 | int getpriority(int, id_t); | ||
| 508 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 509 | int getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 510 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 511 | int getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit); | ||
| 512 | int getrusage(int, struct rusage *); | ||
| 513 | int setpriority(int, id_t, int); | ||
| 514 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 515 | int setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 516 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 517 | int setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit); | ||
| 518 | __END_DECLS | ||
| 519 | |||
| 520 | #endif /* !_SYS_RESOURCE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/socket.h deleted-741| ... | @@ -1,741 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2019 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */ | ||
| 29 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 30 | /* | ||
| 31 | * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 | ||
| 32 | *	The Regents of the University of California. All rights reserved. | ||
| 33 | * | ||
| 34 | * Redistribution and use in source and binary forms, with or without | ||
| 35 | * modification, are permitted provided that the following conditions | ||
| 36 | * are met: | ||
| 37 | * 1. Redistributions of source code must retain the above copyright | ||
| 38 | * notice, this list of conditions and the following disclaimer. | ||
| 39 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 40 | * notice, this list of conditions and the following disclaimer in the | ||
| 41 | * documentation and/or other materials provided with the distribution. | ||
| 42 | * 3. All advertising materials mentioning features or use of this software | ||
| 43 | * must display the following acknowledgement: | ||
| 44 | *	This product includes software developed by the University of | ||
| 45 | *	California, Berkeley and its contributors. | ||
| 46 | * 4. Neither the name of the University nor the names of its contributors | ||
| 47 | * may be used to endorse or promote products derived from this software | ||
| 48 | * without specific prior written permission. | ||
| 49 | * | ||
| 50 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 51 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 53 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 54 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 55 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 56 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 57 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 58 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 59 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 60 | * SUCH DAMAGE. | ||
| 61 | * | ||
| 62 | *	@(#)socket.h	8.4 (Berkeley) 2/21/94 | ||
| 63 | * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $ | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce | ||
| 67 | * support for mandatory and extensible security protections. This notice | ||
| 68 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 69 | * Version 2.0. | ||
| 70 | */ | ||
| 71 | |||
| 72 | #ifndef _SYS_SOCKET_H_ | ||
| 73 | #define _SYS_SOCKET_H_ | ||
| 74 | |||
| 75 | #include <sys/types.h> | ||
| 76 | #include <sys/cdefs.h> | ||
| 77 | #include <machine/_param.h> | ||
| 78 | #include <net/net_kev.h> | ||
| 79 | |||
| 80 | |||
| 81 | #include <Availability.h> | ||
| 82 | |||
| 83 | /* | ||
| 84 | * Definitions related to sockets: types, address families, options. | ||
| 85 | */ | ||
| 86 | |||
| 87 | /* | ||
| 88 | * Data types. | ||
| 89 | */ | ||
| 90 | |||
| 91 | #include <sys/_types/_gid_t.h> | ||
| 92 | #include <sys/_types/_off_t.h> | ||
| 93 | #include <sys/_types/_pid_t.h> | ||
| 94 | #include <sys/_types/_sa_family_t.h> | ||
| 95 | #include <sys/_types/_socklen_t.h> | ||
| 96 | |||
| 97 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 98 | #include <sys/_types/_size_t.h> | ||
| 99 | |||
| 100 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 101 | #include <sys/_types/_ssize_t.h> | ||
| 102 | |||
| 103 | /* | ||
| 104 | * [XSI] The iovec structure shall be defined as described in <sys/uio.h>. | ||
| 105 | */ | ||
| 106 | #include <sys/_types/_iovec_t.h> | ||
| 107 | |||
| 108 | /* | ||
| 109 | * Types | ||
| 110 | */ | ||
| 111 | #define SOCK_STREAM 1 /* stream socket */ | ||
| 112 | #define SOCK_DGRAM 2 /* datagram socket */ | ||
| 113 | #define SOCK_RAW 3 /* raw-protocol interface */ | ||
| 114 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 115 | #define SOCK_RDM 4 /* reliably-delivered message */ | ||
| 116 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 117 | #define SOCK_SEQPACKET 5 /* sequenced packet stream */ | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Option flags per-socket. | ||
| 121 | */ | ||
| 122 | #define SO_DEBUG 0x0001 /* turn on debugging info recording */ | ||
| 123 | #define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ | ||
| 124 | #define SO_REUSEADDR 0x0004 /* allow local address reuse */ | ||
| 125 | #define SO_KEEPALIVE 0x0008 /* keep connections alive */ | ||
| 126 | #define SO_DONTROUTE 0x0010 /* just use interface addresses */ | ||
| 127 | #define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ | ||
| 128 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 129 | #define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ | ||
| 130 | #define SO_LINGER 0x0080 /* linger on close if data present (in ticks) */ | ||
| 131 | #else | ||
| 132 | #define SO_LINGER 0x1080 /* linger on close if data present (in seconds) */ | ||
| 133 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 134 | #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ | ||
| 135 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 136 | #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ | ||
| 137 | #define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ | ||
| 138 | #define SO_TIMESTAMP_MONOTONIC 0x0800 /* Monotonically increasing timestamp on rcvd dgram */ | ||
| 139 | #ifndef __APPLE__ | ||
| 140 | #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ | ||
| 141 | #else | ||
| 142 | #define SO_DONTTRUNC 0x2000 /* APPLE: Retain unread data */ | ||
| 143 | /* (ATOMIC proto) */ | ||
| 144 | #define SO_WANTMORE 0x4000 /* APPLE: Give hint when more data ready */ | ||
| 145 | #define SO_WANTOOBFLAG 0x8000 /* APPLE: Want OOB in MSG_FLAG on receive */ | ||
| 146 | |||
| 147 | |||
| 148 | #endif /* (!__APPLE__) */ | ||
| 149 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 150 | |||
| 151 | /* | ||
| 152 | * Additional options, not kept in so_options. | ||
| 153 | */ | ||
| 154 | #define SO_SNDBUF 0x1001 /* send buffer size */ | ||
| 155 | #define SO_RCVBUF 0x1002 /* receive buffer size */ | ||
| 156 | #define SO_SNDLOWAT 0x1003 /* send low-water mark */ | ||
| 157 | #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ | ||
| 158 | #define SO_SNDTIMEO 0x1005 /* send timeout */ | ||
| 159 | #define SO_RCVTIMEO 0x1006 /* receive timeout */ | ||
| 160 | #define SO_ERROR 0x1007 /* get error status and clear */ | ||
| 161 | #define SO_TYPE 0x1008 /* get socket type */ | ||
| 162 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 163 | #define SO_LABEL 0x1010 /* deprecated */ | ||
| 164 | #define SO_PEERLABEL 0x1011 /* deprecated */ | ||
| 165 | #ifdef __APPLE__ | ||
| 166 | #define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */ | ||
| 167 | #define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */ | ||
| 168 | #define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */ | ||
| 169 | #define SO_NOADDRERR 0x1023 /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */ | ||
| 170 | #define SO_NWRITE 0x1024 /* APPLE: Get number of bytes currently in send socket buffer */ | ||
| 171 | #define SO_REUSESHAREUID 0x1025 /* APPLE: Allow reuse of port/socket by different userids */ | ||
| 172 | #ifdef __APPLE_API_PRIVATE | ||
| 173 | #define SO_NOTIFYCONFLICT 0x1026 /* APPLE: send notification if there is a bind on a port which is already in use */ | ||
| 174 | #define SO_UPCALLCLOSEWAIT 0x1027 /* APPLE: block on close until an upcall returns */ | ||
| 175 | #endif | ||
| 176 | #define SO_LINGER_SEC 0x1080 /* linger on close if data present (in seconds) */ | ||
| 177 | #define SO_RANDOMPORT 0x1082 /* APPLE: request local port randomization */ | ||
| 178 | #define SO_NP_EXTENSIONS 0x1083 /* To turn off some POSIX behavior */ | ||
| 179 | #endif | ||
| 180 | |||
| 181 | #define SO_NUMRCVPKT 0x1112 /* number of datagrams in receive socket buffer */ | ||
| 182 | #define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */ | ||
| 183 | |||
| 184 | |||
| 185 | #define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */ | ||
| 186 | |||
| 187 | /* | ||
| 188 | * Network Service Type for option SO_NET_SERVICE_TYPE | ||
| 189 | * | ||
| 190 | * The vast majority of sockets should use Best Effort that is the default | ||
| 191 | * Network Service Type. Other Network Service Types have to be used only if | ||
| 192 | * the traffic actually matches the description of the Network Service Type. | ||
| 193 | * | ||
| 194 | * Network Service Types do not represent priorities but rather describe | ||
| 195 | * different categories of delay, jitter and loss parameters. | ||
| 196 | * Those parameters may influence protocols from layer 4 protocols like TCP | ||
| 197 | * to layer 2 protocols like Wi-Fi. The Network Service Type can determine | ||
| 198 | * how the traffic is queued and scheduled by the host networking stack and | ||
| 199 | * by other entities on the network like switches and routers. For example | ||
| 200 | * for Wi-Fi, the Network Service Type can select the marking of the | ||
| 201 | * layer 2 packet with the appropriate WMM Access Category. | ||
| 202 | * | ||
| 203 | * There is no point in attempting to game the system and use | ||
| 204 | * a Network Service Type that does not correspond to the actual | ||
| 205 | * traffic characteristic but one that seems to have a higher precedence. | ||
| 206 | * The reason is that for service classes that have lower tolerance | ||
| 207 | * for delay and jitter, the queues size is lower than for service | ||
| 208 | * classes that are more tolerant to delay and jitter. | ||
| 209 | * | ||
| 210 | * For example using a voice service type for bulk data transfer will lead | ||
| 211 | * to disastrous results as soon as congestion happens because the voice | ||
| 212 | * queue overflows and packets get dropped. This is not only bad for the bulk | ||
| 213 | * data transfer but it is also bad for VoIP apps that legitimately are using | ||
| 214 | * the voice service type. | ||
| 215 | * | ||
| 216 | * The characteristics of the Network Service Types are based on the service | ||
| 217 | * classes defined in RFC 4594 "Configuration Guidelines for DiffServ Service | ||
| 218 | * Classes" | ||
| 219 | * | ||
| 220 | * When system detects the outgoing interface belongs to a DiffServ domain | ||
| 221 | * that follows the recommendation of the IETF draft "Guidelines for DiffServ to | ||
| 222 | * IEEE 802.11 Mapping", the packet will marked at layer 3 with a DSCP value | ||
| 223 | * that corresponds to Network Service Type. | ||
| 224 | * | ||
| 225 | * NET_SERVICE_TYPE_BE | ||
| 226 | *	"Best Effort", unclassified/standard. This is the default service | ||
| 227 | *	class and cover the majority of the traffic. | ||
| 228 | * | ||
| 229 | * NET_SERVICE_TYPE_BK | ||
| 230 | *	"Background", high delay tolerant, loss tolerant. elastic flow, | ||
| 231 | *	variable size & long-lived. E.g: non-interactive network bulk transfer | ||
| 232 | *	like synching or backup. | ||
| 233 | * | ||
| 234 | * NET_SERVICE_TYPE_RD | ||
| 235 | *	"Responsive Data", a notch higher than "Best Effort", medium delay | ||
| 236 | *	tolerant, elastic & inelastic flow, bursty, long-lived. E.g. email, | ||
| 237 | *	instant messaging, for which there is a sense of interactivity and | ||
| 238 | *	urgency (user waiting for output). | ||
| 239 | * | ||
| 240 | * NET_SERVICE_TYPE_OAM | ||
| 241 | *	"Operations, Administration, and Management", medium delay tolerant, | ||
| 242 | *	low-medium loss tolerant, elastic & inelastic flows, variable size. | ||
| 243 | *	E.g. VPN tunnels. | ||
| 244 | * | ||
| 245 | * NET_SERVICE_TYPE_AV | ||
| 246 | *	"Multimedia Audio/Video Streaming", medium delay tolerant, low-medium | ||
| 247 | *	loss tolerant, elastic flow, constant packet interval, variable rate | ||
| 248 | *	and size. E.g. video and audio playback with buffering. | ||
| 249 | * | ||
| 250 | * NET_SERVICE_TYPE_RV | ||
| 251 | *	"Responsive Multimedia Audio/Video", low delay tolerant, low-medium | ||
| 252 | *	loss tolerant, elastic flow, variable packet interval, rate and size. | ||
| 253 | *	E.g. screen sharing. | ||
| 254 | * | ||
| 255 | * NET_SERVICE_TYPE_VI | ||
| 256 | *	"Interactive Video", low delay tolerant, low-medium loss tolerant, | ||
| 257 | *	elastic flow, constant packet interval, variable rate & size. E.g. | ||
| 258 | *	video telephony. | ||
| 259 | * | ||
| 260 | * NET_SERVICE_TYPE_SIG | ||
| 261 | *	"Signaling", low delay tolerant, low loss tolerant, inelastic flow, | ||
| 262 | *	jitter tolerant, rate is bursty but short, variable size. E.g. SIP. | ||
| 263 | * | ||
| 264 | * NET_SERVICE_TYPE_VO | ||
| 265 | *	"Interactive Voice", very low delay tolerant, very low loss tolerant, | ||
| 266 | *	inelastic flow, constant packet rate, somewhat fixed size. | ||
| 267 | *	E.g. VoIP. | ||
| 268 | */ | ||
| 269 | |||
| 270 | #define NET_SERVICE_TYPE_BE 0 /* Best effort */ | ||
| 271 | #define NET_SERVICE_TYPE_BK 1 /* Background system initiated */ | ||
| 272 | #define NET_SERVICE_TYPE_SIG 2 /* Signaling */ | ||
| 273 | #define NET_SERVICE_TYPE_VI 3 /* Interactive Video */ | ||
| 274 | #define NET_SERVICE_TYPE_VO 4 /* Interactive Voice */ | ||
| 275 | #define NET_SERVICE_TYPE_RV 5 /* Responsive Multimedia Audio/Video */ | ||
| 276 | #define NET_SERVICE_TYPE_AV 6 /* Multimedia Audio/Video Streaming */ | ||
| 277 | #define NET_SERVICE_TYPE_OAM 7 /* Operations, Administration, and Management */ | ||
| 278 | #define NET_SERVICE_TYPE_RD 8 /* Responsive Data */ | ||
| 279 | |||
| 280 | |||
| 281 | /* These are supported values for SO_NETSVC_MARKING_LEVEL */ | ||
| 282 | #define NETSVC_MRKNG_UNKNOWN 0 /* The outgoing network interface is not known */ | ||
| 283 | #define NETSVC_MRKNG_LVL_L2 1 /* Default marking at layer 2 (for example Wi-Fi WMM) */ | ||
| 284 | #define NETSVC_MRKNG_LVL_L3L2_ALL 2 /* Layer 3 DSCP marking and layer 2 marking for all Network Service Types */ | ||
| 285 | #define NETSVC_MRKNG_LVL_L3L2_BK 3 /* The system policy limits layer 3 DSCP marking and layer 2 marking | ||
| 286 | 	 * to background Network Service Types */ | ||
| 287 | |||
| 288 | |||
| 289 | typedef __uint32_t sae_associd_t; | ||
| 290 | #define SAE_ASSOCID_ANY 0 | ||
| 291 | #define SAE_ASSOCID_ALL ((sae_associd_t)(-1ULL)) | ||
| 292 | |||
| 293 | typedef __uint32_t sae_connid_t; | ||
| 294 | #define SAE_CONNID_ANY 0 | ||
| 295 | #define SAE_CONNID_ALL ((sae_connid_t)(-1ULL)) | ||
| 296 | |||
| 297 | /* connectx() flag parameters */ | ||
| 298 | #define CONNECT_RESUME_ON_READ_WRITE 0x1 /* resume connect() on read/write */ | ||
| 299 | #define CONNECT_DATA_IDEMPOTENT 0x2 /* data is idempotent */ | ||
| 300 | #define CONNECT_DATA_AUTHENTICATED 0x4 /* data includes security that replaces the TFO-cookie */ | ||
| 301 | |||
| 302 | /* sockaddr endpoints */ | ||
| 303 | typedef struct sa_endpoints { | ||
| 304 | 	unsigned int sae_srcif; /* optional source interface */ | ||
| 305 | 	const struct sockaddr *sae_srcaddr; /* optional source address */ | ||
| 306 | 	socklen_t sae_srcaddrlen; /* size of source address */ | ||
| 307 | 	const struct sockaddr *sae_dstaddr; /* destination address */ | ||
| 308 | 	socklen_t sae_dstaddrlen; /* size of destination address */ | ||
| 309 | } sa_endpoints_t; | ||
| 310 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 311 | |||
| 312 | /* | ||
| 313 | * Structure used for manipulating linger option. | ||
| 314 | */ | ||
| 315 | struct linger { | ||
| 316 | 	int l_onoff; /* option on/off */ | ||
| 317 | 	int l_linger; /* linger time */ | ||
| 318 | }; | ||
| 319 | |||
| 320 | #ifndef __APPLE__ | ||
| 321 | struct accept_filter_arg { | ||
| 322 | 	char af_name[16]; | ||
| 323 | 	char af_arg[256 - 16]; | ||
| 324 | }; | ||
| 325 | #endif | ||
| 326 | |||
| 327 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 328 | #ifdef __APPLE__ | ||
| 329 | |||
| 330 | /* | ||
| 331 | * Structure to control non-portable Sockets extension to POSIX | ||
| 332 | */ | ||
| 333 | struct so_np_extensions { | ||
| 334 | 	u_int32_t npx_flags; | ||
| 335 | 	u_int32_t npx_mask; | ||
| 336 | }; | ||
| 337 | |||
| 338 | #define SONPX_SETOPTSHUT 0x000000001 /* flag for allowing setsockopt after shutdown */ | ||
| 339 | |||
| 340 | |||
| 341 | |||
| 342 | #endif | ||
| 343 | #endif | ||
| 344 | |||
| 345 | /* | ||
| 346 | * Level number for (get/set)sockopt() to apply to socket itself. | ||
| 347 | */ | ||
| 348 | #define SOL_SOCKET 0xffff /* options for socket level */ | ||
| 349 | |||
| 350 | |||
| 351 | /* | ||
| 352 | * Address families. | ||
| 353 | */ | ||
| 354 | #define AF_UNSPEC 0 /* unspecified */ | ||
| 355 | #define AF_UNIX 1 /* local to host (pipes) */ | ||
| 356 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 357 | #define AF_LOCAL AF_UNIX /* backward compatibility */ | ||
| 358 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 359 | #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ | ||
| 360 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 361 | #define AF_IMPLINK 3 /* arpanet imp addresses */ | ||
| 362 | #define AF_PUP 4 /* pup protocols: e.g. BSP */ | ||
| 363 | #define AF_CHAOS 5 /* mit CHAOS protocols */ | ||
| 364 | #define AF_NS 6 /* XEROX NS protocols */ | ||
| 365 | #define AF_ISO 7 /* ISO protocols */ | ||
| 366 | #define AF_OSI AF_ISO | ||
| 367 | #define AF_ECMA 8 /* European computer manufacturers */ | ||
| 368 | #define AF_DATAKIT 9 /* datakit protocols */ | ||
| 369 | #define AF_CCITT 10 /* CCITT protocols, X.25 etc */ | ||
| 370 | #define AF_SNA 11 /* IBM SNA */ | ||
| 371 | #define AF_DECnet 12 /* DECnet */ | ||
| 372 | #define AF_DLI 13 /* DEC Direct data link interface */ | ||
| 373 | #define AF_LAT 14 /* LAT */ | ||
| 374 | #define AF_HYLINK 15 /* NSC Hyperchannel */ | ||
| 375 | #define AF_APPLETALK 16 /* Apple Talk */ | ||
| 376 | #define AF_ROUTE 17 /* Internal Routing Protocol */ | ||
| 377 | #define AF_LINK 18 /* Link layer interface */ | ||
| 378 | #define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ | ||
| 379 | #define AF_COIP 20 /* connection-oriented IP, aka ST II */ | ||
| 380 | #define AF_CNT 21 /* Computer Network Technology */ | ||
| 381 | #define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ | ||
| 382 | #define AF_IPX 23 /* Novell Internet Protocol */ | ||
| 383 | #define AF_SIP 24 /* Simple Internet Protocol */ | ||
| 384 | #define pseudo_AF_PIP 25 /* Help Identify PIP packets */ | ||
| 385 | #define AF_NDRV 27 /* Network Driver 'raw' access */ | ||
| 386 | #define AF_ISDN 28 /* Integrated Services Digital Network */ | ||
| 387 | #define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ | ||
| 388 | #define pseudo_AF_KEY 29 /* Internal key-management function */ | ||
| 389 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 390 | #define AF_INET6 30 /* IPv6 */ | ||
| 391 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 392 | #define AF_NATM 31 /* native ATM access */ | ||
| 393 | #define AF_SYSTEM 32 /* Kernel event messages */ | ||
| 394 | #define AF_NETBIOS 33 /* NetBIOS */ | ||
| 395 | #define AF_PPP 34 /* PPP communication protocol */ | ||
| 396 | #define pseudo_AF_HDRCMPLT 35 /* Used by BPF to not rewrite headers | ||
| 397 | 	 * in interface output routine */ | ||
| 398 | #define AF_RESERVED_36 36 /* Reserved for internal usage */ | ||
| 399 | #define AF_IEEE80211 37 /* IEEE 802.11 protocol */ | ||
| 400 | #define AF_UTUN 38 | ||
| 401 | #define AF_VSOCK 40 /* VM Sockets */ | ||
| 402 | #define AF_MAX 41 | ||
| 403 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 404 | |||
| 405 | /* | ||
| 406 | * [XSI] Structure used by kernel to store most addresses. | ||
| 407 | */ | ||
| 408 | struct sockaddr { | ||
| 409 | 	__uint8_t sa_len; /* total length */ | ||
| 410 | 	sa_family_t sa_family; /* [XSI] address family */ | ||
| 411 | 	char sa_data[14]; /* [XSI] addr value (actually larger) */ | ||
| 412 | }; | ||
| 413 | |||
| 414 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 415 | #define SOCK_MAXADDRLEN 255 /* longest possible addresses */ | ||
| 416 | |||
| 417 | /* | ||
| 418 | * Structure used by kernel to pass protocol | ||
| 419 | * information in raw sockets. | ||
| 420 | */ | ||
| 421 | struct sockproto { | ||
| 422 | 	__uint16_t sp_family; /* address family */ | ||
| 423 | 	__uint16_t sp_protocol; /* protocol */ | ||
| 424 | }; | ||
| 425 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 426 | |||
| 427 | /* | ||
| 428 | * RFC 2553: protocol-independent placeholder for socket addresses | ||
| 429 | */ | ||
| 430 | #define _SS_MAXSIZE 128 | ||
| 431 | #define _SS_ALIGNSIZE (sizeof(__int64_t)) | ||
| 432 | #define _SS_PAD1SIZE \ | ||
| 433 | 	 (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t)) | ||
| 434 | #define _SS_PAD2SIZE \ | ||
| 435 | 	 (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \ | ||
| 436 | 	 _SS_PAD1SIZE - _SS_ALIGNSIZE) | ||
| 437 | |||
| 438 | /* | ||
| 439 | * [XSI] sockaddr_storage | ||
| 440 | */ | ||
| 441 | struct sockaddr_storage { | ||
| 442 | 	__uint8_t ss_len; /* address length */ | ||
| 443 | 	sa_family_t ss_family; /* [XSI] address family */ | ||
| 444 | 	char __ss_pad1[_SS_PAD1SIZE]; | ||
| 445 | 	__int64_t __ss_align; /* force structure storage alignment */ | ||
| 446 | 	char __ss_pad2[_SS_PAD2SIZE]; | ||
| 447 | }; | ||
| 448 | |||
| 449 | /* | ||
| 450 | * Protocol families, same as address families for now. | ||
| 451 | */ | ||
| 452 | #define PF_UNSPEC AF_UNSPEC | ||
| 453 | #define PF_LOCAL AF_LOCAL | ||
| 454 | #define PF_UNIX PF_LOCAL /* backward compatibility */ | ||
| 455 | #define PF_INET AF_INET | ||
| 456 | #define PF_IMPLINK AF_IMPLINK | ||
| 457 | #define PF_PUP AF_PUP | ||
| 458 | #define PF_CHAOS AF_CHAOS | ||
| 459 | #define PF_NS AF_NS | ||
| 460 | #define PF_ISO AF_ISO | ||
| 461 | #define PF_OSI AF_ISO | ||
| 462 | #define PF_ECMA AF_ECMA | ||
| 463 | #define PF_DATAKIT AF_DATAKIT | ||
| 464 | #define PF_CCITT AF_CCITT | ||
| 465 | #define PF_SNA AF_SNA | ||
| 466 | #define PF_DECnet AF_DECnet | ||
| 467 | #define PF_DLI AF_DLI | ||
| 468 | #define PF_LAT AF_LAT | ||
| 469 | #define PF_HYLINK AF_HYLINK | ||
| 470 | #define PF_APPLETALK AF_APPLETALK | ||
| 471 | #define PF_ROUTE AF_ROUTE | ||
| 472 | #define PF_LINK AF_LINK | ||
| 473 | #define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ | ||
| 474 | #define PF_COIP AF_COIP | ||
| 475 | #define PF_CNT AF_CNT | ||
| 476 | #define PF_SIP AF_SIP | ||
| 477 | #define PF_IPX AF_IPX /* same format as AF_NS */ | ||
| 478 | #define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ | ||
| 479 | #define PF_PIP pseudo_AF_PIP | ||
| 480 | #define PF_NDRV AF_NDRV | ||
| 481 | #define PF_ISDN AF_ISDN | ||
| 482 | #define PF_KEY pseudo_AF_KEY | ||
| 483 | #define PF_INET6 AF_INET6 | ||
| 484 | #define PF_NATM AF_NATM | ||
| 485 | #define PF_SYSTEM AF_SYSTEM | ||
| 486 | #define PF_NETBIOS AF_NETBIOS | ||
| 487 | #define PF_PPP AF_PPP | ||
| 488 | #define PF_RESERVED_36 AF_RESERVED_36 | ||
| 489 | #define PF_UTUN AF_UTUN | ||
| 490 | #define PF_VSOCK AF_VSOCK | ||
| 491 | #define PF_MAX AF_MAX | ||
| 492 | |||
| 493 | /* | ||
| 494 | * These do not have socket-layer support: | ||
| 495 | */ | ||
| 496 | #define PF_VLAN ((uint32_t)0x766c616e) /* 'vlan' */ | ||
| 497 | #define PF_BOND ((uint32_t)0x626f6e64) /* 'bond' */ | ||
| 498 | |||
| 499 | /* | ||
| 500 | * Definitions for network related sysctl, CTL_NET. | ||
| 501 | * | ||
| 502 | * Second level is protocol family. | ||
| 503 | * Third level is protocol number. | ||
| 504 | * | ||
| 505 | * Further levels are defined by the individual families below. | ||
| 506 | */ | ||
| 507 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 508 | #define NET_MAXID AF_MAX | ||
| 509 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 510 | |||
| 511 | |||
| 512 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 513 | /* | ||
| 514 | * PF_ROUTE - Routing table | ||
| 515 | * | ||
| 516 | * Three additional levels are defined: | ||
| 517 | *	Fourth: address family, 0 is wildcard | ||
| 518 | *	Fifth: type of info, defined below | ||
| 519 | *	Sixth: flag(s) to mask with for NET_RT_FLAGS | ||
| 520 | */ | ||
| 521 | #define NET_RT_DUMP 1 /* dump; may limit to a.f. */ | ||
| 522 | #define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ | ||
| 523 | #define NET_RT_IFLIST 3 /* survey interface list */ | ||
| 524 | #define NET_RT_STAT 4 /* routing statistics */ | ||
| 525 | #define NET_RT_TRASH 5 /* routes not in table but not freed */ | ||
| 526 | #define NET_RT_IFLIST2 6 /* interface list with addresses */ | ||
| 527 | #define NET_RT_DUMP2 7 /* dump; may limit to a.f. */ | ||
| 528 | /* | ||
| 529 | * Allows read access non-local host's MAC address | ||
| 530 | * if the process has neighbor cache entitlement. | ||
| 531 | */ | ||
| 532 | #define NET_RT_FLAGS_PRIV 10 | ||
| 533 | #define NET_RT_MAXID 11 | ||
| 534 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 535 | |||
| 536 | |||
| 537 | |||
| 538 | |||
| 539 | /* | ||
| 540 | * Maximum queue length specifiable by listen. | ||
| 541 | */ | ||
| 542 | #define SOMAXCONN 128 | ||
| 543 | |||
| 544 | /* | ||
| 545 | * [XSI] Message header for recvmsg and sendmsg calls. | ||
| 546 | * Used value-result for recvmsg, value only for sendmsg. | ||
| 547 | */ | ||
| 548 | struct msghdr { | ||
| 549 | 	void *msg_name; /* [XSI] optional address */ | ||
| 550 | 	socklen_t msg_namelen; /* [XSI] size of address */ | ||
| 551 | 	struct iovec *msg_iov; /* [XSI] scatter/gather array */ | ||
| 552 | 	int msg_iovlen; /* [XSI] # elements in msg_iov */ | ||
| 553 | 	void *msg_control; /* [XSI] ancillary data, see below */ | ||
| 554 | 	socklen_t msg_controllen; /* [XSI] ancillary data buffer len */ | ||
| 555 | 	int msg_flags; /* [XSI] flags on received message */ | ||
| 556 | }; | ||
| 557 | |||
| 558 | |||
| 559 | |||
| 560 | #define MSG_OOB 0x1 /* process out-of-band data */ | ||
| 561 | #define MSG_PEEK 0x2 /* peek at incoming message */ | ||
| 562 | #define MSG_DONTROUTE 0x4 /* send without using routing tables */ | ||
| 563 | #define MSG_EOR 0x8 /* data completes record */ | ||
| 564 | #define MSG_TRUNC 0x10 /* data discarded before delivery */ | ||
| 565 | #define MSG_CTRUNC 0x20 /* control data lost before delivery */ | ||
| 566 | #define MSG_WAITALL 0x40 /* wait for full request or error */ | ||
| 567 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 568 | #define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ | ||
| 569 | #define MSG_EOF 0x100 /* data completes connection */ | ||
| 570 | #ifdef __APPLE__ | ||
| 571 | #ifdef __APPLE_API_OBSOLETE | ||
| 572 | #define MSG_WAITSTREAM 0x200 /* wait up to full request.. may return partial */ | ||
| 573 | #endif | ||
| 574 | #define MSG_FLUSH 0x400 /* Start of 'hold' seq; dump so_temp, deprecated */ | ||
| 575 | #define MSG_HOLD 0x800 /* Hold frag in so_temp, deprecated */ | ||
| 576 | #define MSG_SEND 0x1000 /* Send the packet in so_temp, deprecated */ | ||
| 577 | #define MSG_HAVEMORE 0x2000 /* Data ready to be read */ | ||
| 578 | #define MSG_RCVMORE 0x4000 /* Data remains in current pkt */ | ||
| 579 | #endif | ||
| 580 | #define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */ | ||
| 581 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 582 | |||
| 583 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 584 | #define MSG_NOSIGNAL 0x80000 /* do not generate SIGPIPE on EOF */ | ||
| 585 | #endif /* __DARWIN_C_LEVEL */ | ||
| 586 | |||
| 587 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 588 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 589 | |||
| 590 | /* | ||
| 591 | * Header for ancillary data objects in msg_control buffer. | ||
| 592 | * Used for additional information with/about a datagram | ||
| 593 | * not expressible by flags. The format is a sequence | ||
| 594 | * of message elements headed by cmsghdr structures. | ||
| 595 | */ | ||
| 596 | struct cmsghdr { | ||
| 597 | 	socklen_t cmsg_len; /* [XSI] data byte count, including hdr */ | ||
| 598 | 	int cmsg_level; /* [XSI] originating protocol */ | ||
| 599 | 	int cmsg_type; /* [XSI] protocol-specific type */ | ||
| 600 | /* followed by	unsigned char cmsg_data[]; */ | ||
| 601 | }; | ||
| 602 | |||
| 603 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 604 | #ifndef __APPLE__ | ||
| 605 | /* | ||
| 606 | * While we may have more groups than this, the cmsgcred struct must | ||
| 607 | * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow | ||
| 608 | * this. | ||
| 609 | */ | ||
| 610 | #define CMGROUP_MAX 16 | ||
| 611 | |||
| 612 | /* | ||
| 613 | * Credentials structure, used to verify the identity of a peer | ||
| 614 | * process that has sent us a message. This is allocated by the | ||
| 615 | * peer process but filled in by the kernel. This prevents the | ||
| 616 | * peer from lying about its identity. (Note that cmcred_groups[0] | ||
| 617 | * is the effective GID.) | ||
| 618 | */ | ||
| 619 | struct cmsgcred { | ||
| 620 | 	pid_t cmcred_pid; /* PID of sending process */ | ||
| 621 | 	uid_t cmcred_uid; /* real UID of sending process */ | ||
| 622 | 	uid_t cmcred_euid; /* effective UID of sending process */ | ||
| 623 | 	gid_t cmcred_gid; /* real GID of sending process */ | ||
| 624 | 	short cmcred_ngroups; /* number or groups */ | ||
| 625 | 	gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ | ||
| 626 | }; | ||
| 627 | #endif | ||
| 628 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 629 | |||
| 630 | /* given pointer to struct cmsghdr, return pointer to data */ | ||
| 631 | #define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ | ||
| 632 | 	__DARWIN_ALIGN32(sizeof(struct cmsghdr))) | ||
| 633 | |||
| 634 | /* | ||
| 635 | * RFC 2292 requires to check msg_controllen, in case that the kernel returns | ||
| 636 | * an empty list for some reasons. | ||
| 637 | */ | ||
| 638 | #define CMSG_FIRSTHDR(mhdr) \ | ||
| 639 | 	((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ | ||
| 640 | 	 (struct cmsghdr *)(mhdr)->msg_control : \ | ||
| 641 | 	 (struct cmsghdr *)0L) | ||
| 642 | |||
| 643 | |||
| 644 | /* | ||
| 645 | * Given pointer to struct cmsghdr, return pointer to next cmsghdr | ||
| 646 | * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr) | ||
| 647 | */ | ||
| 648 | #define CMSG_NXTHDR(mhdr, cmsg) \ | ||
| 649 | 	((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) : \ | ||
| 650 | 	 ((((unsigned char *)(cmsg) + \ | ||
| 651 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) + \ | ||
| 652 | 	 __DARWIN_ALIGN32(sizeof(struct cmsghdr))) > \ | ||
| 653 | 	 ((unsigned char *)(mhdr)->msg_control + \ | ||
| 654 | 	 (mhdr)->msg_controllen)) ? \ | ||
| 655 | 	 (struct cmsghdr *)0L /* NULL */ : \ | ||
| 656 | 	 (struct cmsghdr *)(void *)((unsigned char *)(cmsg) + \ | ||
| 657 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len)))) | ||
| 658 | |||
| 659 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 660 | /* RFC 2292 additions */ | ||
| 661 | #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) | ||
| 662 | #define CMSG_LEN(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) | ||
| 663 | |||
| 664 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 665 | |||
| 666 | /* "Socket"-level control message types: */ | ||
| 667 | #define SCM_RIGHTS 0x01 /* access rights (array of int) */ | ||
| 668 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 669 | #define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ | ||
| 670 | #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ | ||
| 671 | #define SCM_TIMESTAMP_MONOTONIC 0x04 /* timestamp (uint64_t) */ | ||
| 672 | |||
| 673 | |||
| 674 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 675 | |||
| 676 | /* | ||
| 677 | * howto arguments for shutdown(2), specified by Posix.1g. | ||
| 678 | */ | ||
| 679 | #define SHUT_RD 0 /* shut down the reading side */ | ||
| 680 | #define SHUT_WR 1 /* shut down the writing side */ | ||
| 681 | #define SHUT_RDWR 2 /* shut down both sides */ | ||
| 682 | |||
| 683 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 684 | /* | ||
| 685 | * sendfile(2) header/trailer struct | ||
| 686 | */ | ||
| 687 | struct sf_hdtr { | ||
| 688 | 	struct iovec *headers; /* pointer to an array of header struct iovec's */ | ||
| 689 | 	int hdr_cnt; /* number of header iovec's */ | ||
| 690 | 	struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ | ||
| 691 | 	int trl_cnt; /* number of trailer iovec's */ | ||
| 692 | }; | ||
| 693 | |||
| 694 | |||
| 695 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 696 | |||
| 697 | |||
| 698 | __BEGIN_DECLS | ||
| 699 | |||
| 700 | int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 701 | __DARWIN_ALIAS_C(accept); | ||
| 702 | int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); | ||
| 703 | int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect); | ||
| 704 | int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 705 | __DARWIN_ALIAS(getpeername); | ||
| 706 | int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 707 | __DARWIN_ALIAS(getsockname); | ||
| 708 | int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); | ||
| 709 | int listen(int, int) __DARWIN_ALIAS(listen); | ||
| 710 | ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv); | ||
| 711 | ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, | ||
| 712 | socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); | ||
| 713 | ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg); | ||
| 714 | ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send); | ||
| 715 | ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg); | ||
| 716 | ssize_t sendto(int, const void *, size_t, | ||
| 717 | int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto); | ||
| 718 | int setsockopt(int, int, int, const void *, socklen_t); | ||
| 719 | int shutdown(int, int); | ||
| 720 | int sockatmark(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 721 | int socket(int, int, int); | ||
| 722 | int socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair); | ||
| 723 | |||
| 724 | #if !defined(_POSIX_C_SOURCE) | ||
| 725 | int sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int); | ||
| 726 | #endif /* !_POSIX_C_SOURCE */ | ||
| 727 | |||
| 728 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 729 | void pfctlinput(int, struct sockaddr *); | ||
| 730 | |||
| 731 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 732 | int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int, | ||
| 733 | const struct iovec *, unsigned int, size_t *, sae_connid_t *); | ||
| 734 | |||
| 735 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 736 | int disconnectx(int, sae_associd_t, sae_connid_t); | ||
| 737 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 738 | __END_DECLS | ||
| 739 | |||
| 740 | |||
| 741 | #endif /* !_SYS_SOCKET_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/sockio.h deleted-180| ... | @@ -1,180 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2019 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)sockio.h	8.1 (Berkeley) 3/28/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_SOCKIO_H_ | ||
| 65 | #define _SYS_SOCKIO_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | |||
| 69 | #include <sys/ioccom.h> | ||
| 70 | |||
| 71 | /* Socket ioctl's. */ | ||
| 72 | #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ | ||
| 73 | #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ | ||
| 74 | #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ | ||
| 75 | #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ | ||
| 76 | #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ | ||
| 77 | #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ | ||
| 78 | #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * OSIOCGIF* ioctls are deprecated; they are kept for binary compatibility. | ||
| 82 | */ | ||
| 83 | #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ | ||
| 84 | #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ | ||
| 85 | #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ | ||
| 86 | #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ | ||
| 87 | #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ | ||
| 88 | #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ | ||
| 89 | #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ | ||
| 90 | #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ | ||
| 91 | #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ | ||
| 92 | #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ | ||
| 93 | |||
| 94 | #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ | ||
| 95 | #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ | ||
| 96 | #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ | ||
| 97 | #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ | ||
| 98 | #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ | ||
| 99 | #define SIOCAUTOADDR _IOWR('i', 38, struct ifreq) /* autoconf address */ | ||
| 100 | #define SIOCAUTONETMASK _IOW('i', 39, struct ifreq) /* autoconf netmask */ | ||
| 101 | #define SIOCARPIPLL _IOWR('i', 40, struct ifreq) /* arp for IPv4LL address */ | ||
| 102 | |||
| 103 | #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ | ||
| 104 | #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ | ||
| 105 | #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ | ||
| 106 | #define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ | ||
| 107 | #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ | ||
| 108 | #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ | ||
| 109 | #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */ | ||
| 110 | |||
| 111 | /* | ||
| 112 | * The command SIOCGIFMEDIA does not allow a process to access the extended | ||
| 113 | * media subtype and extended subtype values are returned as IFM_OTHER. | ||
| 114 | */ | ||
| 115 | #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get compatible net media */ | ||
| 116 | |||
| 117 | #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ | ||
| 118 | #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ | ||
| 119 | #define SIOCRSLVMULTI _IOWR('i', 59, struct rslvmulti_req) | ||
| 120 | |||
| 121 | #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set link level addr */ | ||
| 122 | #define SIOCGIFSTATUS _IOWR('i', 61, struct ifstat) /* get IF status */ | ||
| 123 | #define SIOCSIFPHYADDR _IOW('i', 62, struct ifaliasreq) /* set gif addres */ | ||
| 124 | #define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq) /* get gif psrc addr */ | ||
| 125 | #define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq) /* get gif pdst addr */ | ||
| 126 | #define SIOCDIFPHYADDR _IOW('i', 65, struct ifreq) /* delete gif addrs */ | ||
| 127 | |||
| 128 | #define SIOCGIFDEVMTU _IOWR('i', 68, struct ifreq) /* get if ifdevmtu */ | ||
| 129 | #define SIOCSIFALTMTU _IOW('i', 69, struct ifreq) /* set if alternate mtu */ | ||
| 130 | #define SIOCGIFALTMTU _IOWR('i', 72, struct ifreq) /* get if alternate mtu */ | ||
| 131 | #define SIOCSIFBOND _IOW('i', 70, struct ifreq) /* set bond if config */ | ||
| 132 | #define SIOCGIFBOND _IOWR('i', 71, struct ifreq) /* get bond if config */ | ||
| 133 | |||
| 134 | /* | ||
| 135 | * The command SIOCGIFXMEDIA is meant to be used by processes only to be able | ||
| 136 | * to access the extended media subtypes with the extended IFM_TMASK. | ||
| 137 | * | ||
| 138 | * An ifnet must not implement SIOCGIFXMEDIA as it gets the extended | ||
| 139 | * media subtypes by simply compiling with <net/if_media.h> | ||
| 140 | */ | ||
| 141 | #define SIOCGIFXMEDIA _IOWR('i', 72, struct ifmediareq) /* get net extended media */ | ||
| 142 | |||
| 143 | |||
| 144 | #define SIOCSIFCAP _IOW('i', 90, struct ifreq) /* set IF features */ | ||
| 145 | #define SIOCGIFCAP _IOWR('i', 91, struct ifreq) /* get IF features */ | ||
| 146 | |||
| 147 | #define SIOCIFCREATE _IOWR('i', 120, struct ifreq) /* create clone if */ | ||
| 148 | #define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ | ||
| 149 | #define SIOCIFCREATE2 _IOWR('i', 122, struct ifreq) /* create clone if with data */ | ||
| 150 | |||
| 151 | #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific | ||
| 152 | 	 * parameters */ | ||
| 153 | #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific | ||
| 154 | 	 * parameters */ | ||
| 155 | #define SIOCSIFVLAN _IOW('i', 126, struct ifreq) /* set VLAN config */ | ||
| 156 | #define SIOCGIFVLAN _IOWR('i', 127, struct ifreq) /* get VLAN config */ | ||
| 157 | #define SIOCSETVLAN SIOCSIFVLAN | ||
| 158 | #define SIOCGETVLAN SIOCGIFVLAN | ||
| 159 | |||
| 160 | #define SIOCIFGCLONERS _IOWR('i', 129, struct if_clonereq) /* get cloners */ | ||
| 161 | |||
| 162 | #define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq) /* get ppp asyncmap */ | ||
| 163 | #define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) /* set ppp asyncmap */ | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | #define SIOCGIFMAC _IOWR('i', 130, struct ifreq) /* deprecated */ | ||
| 168 | #define SIOCSIFMAC _IOW('i', 131, struct ifreq) /* deprecated */ | ||
| 169 | #define SIOCSIFKPI _IOW('i', 134, struct ifreq) /* set interface kext param - root only */ | ||
| 170 | #define SIOCGIFKPI _IOWR('i', 135, struct ifreq) /* get interface kext param */ | ||
| 171 | |||
| 172 | #define SIOCGIFWAKEFLAGS _IOWR('i', 136, struct ifreq) /* get interface wake property flags */ | ||
| 173 | |||
| 174 | #define SIOCGIFFUNCTIONALTYPE _IOWR('i', 173, struct ifreq) /* get interface functional type */ | ||
| 175 | |||
| 176 | #define SIOCSIF6LOWPAN _IOW('i', 196, struct ifreq) /* set 6LOWPAN config */ | ||
| 177 | #define SIOCGIF6LOWPAN _IOWR('i', 197, struct ifreq) /* get 6LOWPAN config */ | ||
| 178 | |||
| 179 | |||
| 180 | #endif /* !_SYS_SOCKIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/sys/sysctl.h+24-2| ... | @@ -338,8 +338,8 @@ struct ctlname { | ... | @@ -338,8 +338,8 @@ struct ctlname { |
| 338 | #define KERN_KDSET_TYPEFILTER 22 | 338 | #define KERN_KDSET_TYPEFILTER 22 |
| 339 | #define KERN_KDBUFWAIT 23 | 339 | #define KERN_KDBUFWAIT 23 |
| 340 | #define KERN_KDCPUMAP 24 | 340 | #define KERN_KDCPUMAP 24 |
| 341 | /* 25 - 26 unused */ | 341 | #define KERN_KDCPUMAP_EXT 25 |
| 342 | #define KERN_KDWRITEMAP_V3 27 | 342 | /* 25 - 27 unused */ |
| 343 | #define KERN_KDWRITETR_V3 28 | 343 | #define KERN_KDWRITETR_V3 28 |
| 344 | 344 | ||
| 345 | #define CTL_KERN_NAMES { \ | 345 | #define CTL_KERN_NAMES { \ |
| ... | @@ -668,6 +668,28 @@ extern struct loadavg averunnable; | ... | @@ -668,6 +668,28 @@ extern struct loadavg averunnable; |
| 668 | * hw.l2cachesize - | 668 | * hw.l2cachesize - |
| 669 | * hw.l3cachesize - | 669 | * hw.l3cachesize - |
| 670 | * | 670 | * |
| 671 | * hw.nperflevels - Number of core types in the system. See the parameters below, which can be used to get | ||
| 672 | * - information associated with a specific perf level. | ||
| 673 | * | ||
| 674 | * The following parameters apply to perflevel N, where N is a number between 0 and the number of core types in the system minus one. | ||
| 675 | * perflevel 0 always refers to the highest performance core type in the system. | ||
| 676 | * | ||
| 677 | * hw.perflevelN.physicalcpu - The number of physical processors available in the current power management mode. | ||
| 678 | * hw.perflevelN.physicalcpumax - The maximum number of physical processors that could be available this boot. | ||
| 679 | * hw.perflevelN.logicalcpu - The number of logical processors available in the current power management mode. | ||
| 680 | * hw.perflevelN.logicalcpumax - The maximum number of logical processors that could be available this boot. | ||
| 681 | * | ||
| 682 | * hw.perflevelN.l1dcachesize - These values provide the size in bytes of the L1, L2 and L3 caches. If a cache is not present | ||
| 683 | * hw.perflevelN.l1icachesize - then the selector will return and error. | ||
| 684 | * hw.perflevelN.l2cachesize - | ||
| 685 | * hw.perflevelN.l3cachesize - | ||
| 686 | * | ||
| 687 | * hw.perflevelN.cpusperl2 - These values provide the number of CPUs of the same type that share L2 and L3 caches. | ||
| 688 | * hw.perflevelN.cpusperl3 - If a cache is not present then the selector will return and error. | ||
| 689 | * | ||
| 690 | * hw.perflevelN.l2perflevels - These values provide a bitmap, where bit number of CPUs of the same type that share L2 and L3 caches. | ||
| 691 | * hw.perflevelN.l3perflevels - If a cache is not present then the selector will return and error. | ||
| 692 | * | ||
| 671 | * hw.packages - Gives the number of processor packages. | 693 | * hw.packages - Gives the number of processor packages. |
| 672 | * | 694 | * |
| 673 | * These are the selectors for optional processor features for specific processors. Selectors that return errors are not support | 695 | * These are the selectors for optional processor features for specific processors. Selectors that return errors are not support |
lib/libc/include/any-macos.11-any/time.h created+208| ... | @@ -0,0 +1,208 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 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 <Availability.h> | ||
| 69 | #include <sys/_types/_clock_t.h> | ||
| 70 | #include <sys/_types/_null.h> | ||
| 71 | #include <sys/_types/_size_t.h> | ||
| 72 | #include <sys/_types/_time_t.h> | ||
| 73 | #include <sys/_types/_timespec.h> | ||
| 74 | |||
| 75 | struct tm { | ||
| 76 | 	int	tm_sec;		/* seconds after the minute [0-60] */ | ||
| 77 | 	int	tm_min;		/* minutes after the hour [0-59] */ | ||
| 78 | 	int	tm_hour;	/* hours since midnight [0-23] */ | ||
| 79 | 	int	tm_mday;	/* day of the month [1-31] */ | ||
| 80 | 	int	tm_mon;		/* months since January [0-11] */ | ||
| 81 | 	int	tm_year;	/* years since 1900 */ | ||
| 82 | 	int	tm_wday;	/* days since Sunday [0-6] */ | ||
| 83 | 	int	tm_yday;	/* days since January 1 [0-365] */ | ||
| 84 | 	int	tm_isdst;	/* Daylight Savings Time flag */ | ||
| 85 | 	long	tm_gmtoff;	/* offset from UTC in seconds */ | ||
| 86 | 	char	*tm_zone;	/* timezone abbreviation */ | ||
| 87 | }; | ||
| 88 | |||
| 89 | #if __DARWIN_UNIX03 | ||
| 90 | #define CLOCKS_PER_SEC 1000000	/* [XSI] */ | ||
| 91 | #else /* !__DARWIN_UNIX03 */ | ||
| 92 | #include <machine/_limits.h>	/* Include file containing CLK_TCK. */ | ||
| 93 | |||
| 94 | #define CLOCKS_PER_SEC (__DARWIN_CLK_TCK) | ||
| 95 | #endif /* __DARWIN_UNIX03 */ | ||
| 96 | |||
| 97 | #ifndef _ANSI_SOURCE | ||
| 98 | extern char *tzname[]; | ||
| 99 | #endif | ||
| 100 | |||
| 101 | extern int getdate_err; | ||
| 102 | #if __DARWIN_UNIX03 | ||
| 103 | extern long timezone __DARWIN_ALIAS(timezone); | ||
| 104 | #endif /* __DARWIN_UNIX03 */ | ||
| 105 | extern int daylight; | ||
| 106 | |||
| 107 | __BEGIN_DECLS | ||
| 108 | char *asctime(const struct tm *); | ||
| 109 | clock_t clock(void) __DARWIN_ALIAS(clock); | ||
| 110 | char *ctime(const time_t *); | ||
| 111 | double difftime(time_t, time_t); | ||
| 112 | struct tm *getdate(const char *); | ||
| 113 | struct tm *gmtime(const time_t *); | ||
| 114 | struct tm *localtime(const time_t *); | ||
| 115 | time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); | ||
| 116 | size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); | ||
| 117 | char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); | ||
| 118 | time_t time(time_t *); | ||
| 119 | |||
| 120 | #ifndef _ANSI_SOURCE | ||
| 121 | void tzset(void); | ||
| 122 | #endif /* not ANSI */ | ||
| 123 | |||
| 124 | /* [TSF] Thread safe functions */ | ||
| 125 | char *asctime_r(const struct tm * __restrict, char * __restrict); | ||
| 126 | char *ctime_r(const time_t *, char *); | ||
| 127 | struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 128 | struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 129 | |||
| 130 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 131 | time_t posix2time(time_t); | ||
| 132 | #if !__DARWIN_UNIX03 | ||
| 133 | char *timezone(int, int); | ||
| 134 | #endif /* !__DARWIN_UNIX03 */ | ||
| 135 | void tzsetwall(void); | ||
| 136 | time_t time2posix(time_t); | ||
| 137 | time_t timelocal(struct tm * const); | ||
| 138 | time_t timegm(struct tm * const); | ||
| 139 | #endif /* neither ANSI nor POSIX */ | ||
| 140 | |||
| 141 | #if !defined(_ANSI_SOURCE) | ||
| 142 | int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep); | ||
| 143 | #endif | ||
| 144 | |||
| 145 | #if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0 | ||
| 146 | #if __DARWIN_C_LEVEL >= 199309L | ||
| 147 | #if __has_feature(enumerator_attributes) | ||
| 148 | #define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 149 | #else | ||
| 150 | #define __CLOCK_AVAILABILITY | ||
| 151 | #endif | ||
| 152 | |||
| 153 | typedef enum { | ||
| 154 | _CLOCK_REALTIME __CLOCK_AVAILABILITY = 0, | ||
| 155 | #define CLOCK_REALTIME _CLOCK_REALTIME | ||
| 156 | _CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6, | ||
| 157 | #define CLOCK_MONOTONIC _CLOCK_MONOTONIC | ||
| 158 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 159 | _CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4, | ||
| 160 | #define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW | ||
| 161 | _CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5, | ||
| 162 | #define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX | ||
| 163 | _CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8, | ||
| 164 | #define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW | ||
| 165 | _CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9, | ||
| 166 | #define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX | ||
| 167 | #endif | ||
| 168 | _CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12, | ||
| 169 | #define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID | ||
| 170 | _CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16 | ||
| 171 | #define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID | ||
| 172 | } clockid_t; | ||
| 173 | |||
| 174 | __CLOCK_AVAILABILITY | ||
| 175 | int clock_getres(clockid_t __clock_id, struct timespec *__res); | ||
| 176 | |||
| 177 | __CLOCK_AVAILABILITY | ||
| 178 | int clock_gettime(clockid_t __clock_id, struct timespec *__tp); | ||
| 179 | |||
| 180 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 181 | __CLOCK_AVAILABILITY | ||
| 182 | __uint64_t clock_gettime_nsec_np(clockid_t __clock_id); | ||
| 183 | #endif | ||
| 184 | |||
| 185 | __OSX_AVAILABLE(10.12) __IOS_PROHIBITED | ||
| 186 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 187 | int clock_settime(clockid_t __clock_id, const struct timespec *__tp); | ||
| 188 | |||
| 189 | #undef __CLOCK_AVAILABILITY | ||
| 190 | #endif /* __DARWIN_C_LEVEL */ | ||
| 191 | #endif /* _DARWIN_FEATURE_CLOCK_GETTIME */ | ||
| 192 | |||
| 193 | #if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \ | ||
| 194 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ | ||
| 195 | (defined(__cplusplus) && __cplusplus >= 201703L) | ||
| 196 | /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ | ||
| 197 | #define TIME_UTC	1	/* time elapsed since epoch */ | ||
| 198 | __API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0)) | ||
| 199 | int timespec_get(struct timespec *ts, int base); | ||
| 200 | #endif | ||
| 201 | |||
| 202 | __END_DECLS | ||
| 203 | |||
| 204 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 205 | #include <xlocale/_time.h> | ||
| 206 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 207 | |||
| 208 | #endif /* !_TIME_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/xpc/availability.h deleted-124| ... | @@ -1,124 +0,0 @@ | ||
| 1 | #ifndef __XPC_AVAILABILITY_H__ | ||
| 2 | #define __XPC_AVAILABILITY_H__ | ||
| 3 | |||
| 4 | #include <Availability.h> | ||
| 5 | |||
| 6 | // Certain parts of the project use all the project's headers but have to build | ||
| 7 | // against newer OSX SDKs than ebuild uses -- liblaunch_host being the example. | ||
| 8 | // So we need to define these. | ||
| 9 | #ifndef __MAC_10_16 | ||
| 10 | #define __MAC_10_16 101600 | ||
| 11 | #endif // __MAC_10_16 | ||
| 12 | |||
| 13 | #ifndef __MAC_10_15 | ||
| 14 | #define __MAC_10_15 101500 | ||
| 15 | #define __AVAILABILITY_INTERNAL__MAC_10_15 \ | ||
| 16 | __attribute__((availability(macosx, introduced=10.15))) | ||
| 17 | #endif // __MAC_10_15 | ||
| 18 | |||
| 19 | #ifndef __MAC_10_14 | ||
| 20 | #define __MAC_10_14 101400 | ||
| 21 | #define __AVAILABILITY_INTERNAL__MAC_10_14 \ | ||
| 22 | __attribute__((availability(macosx, introduced=10.14))) | ||
| 23 | #endif // __MAC_10_14 | ||
| 24 | |||
| 25 | #ifndef __MAC_10_13 | ||
| 26 | #define __MAC_10_13 101300 | ||
| 27 | #define __AVAILABILITY_INTERNAL__MAC_10_13 \ | ||
| 28 | 	__attribute__((availability(macosx, introduced=10.13))) | ||
| 29 | #endif // __MAC_10_13 | ||
| 30 | |||
| 31 | #ifndef __MAC_10_12 | ||
| 32 | #define __MAC_10_12 101200 | ||
| 33 | #define __AVAILABILITY_INTERNAL__MAC_10_12 \ | ||
| 34 | 	__attribute__((availability(macosx, introduced=10.12))) | ||
| 35 | #endif // __MAC_10_12 | ||
| 36 | |||
| 37 | #ifndef __MAC_10_11 | ||
| 38 | #define __MAC_10_11 101100 | ||
| 39 | #define __AVAILABILITY_INTERNAL__MAC_10_11 \ | ||
| 40 | 	__attribute__((availability(macosx, introduced=10.11))) | ||
| 41 | #endif // __MAC_10_11 | ||
| 42 | |||
| 43 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 44 | #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 45 | #endif // __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 46 | |||
| 47 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 48 | #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 49 | #endif // __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 50 | |||
| 51 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 52 | #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 53 | #endif // __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 54 | |||
| 55 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 56 | #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 57 | #endif // __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 58 | |||
| 59 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 60 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 61 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 62 | |||
| 63 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 64 | #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 65 | #endif // __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 66 | |||
| 67 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 68 | #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 69 | #endif // __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 70 | |||
| 71 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 72 | #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 73 | #endif // __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 74 | |||
| 75 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 76 | #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 77 | #endif // __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 78 | |||
| 79 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 80 | #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 81 | #endif // __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 82 | |||
| 83 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 84 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 85 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 86 | |||
| 87 | #if __has_include(<simulator_host.h>) | ||
| 88 | #include <simulator_host.h> | ||
| 89 | #else // __has_include(<simulator_host.h>) | ||
| 90 | #ifndef IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 91 | #define IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED 999999 | ||
| 92 | #endif // IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 93 | #endif // __has_include(<simulator_host.h>) | ||
| 94 | |||
| 95 | #ifndef __WATCHOS_UNAVAILABLE | ||
| 96 | #define __WATCHOS_UNAVAILABLE | ||
| 97 | #endif | ||
| 98 | |||
| 99 | #ifndef __TVOS_UNAVAILABLE | ||
| 100 | #define __TVOS_UNAVAILABLE | ||
| 101 | #endif | ||
| 102 | |||
| 103 | // simulator host-side bits build against SDKs not having __*_AVAILABLE() yet | ||
| 104 | #ifndef __OSX_AVAILABLE | ||
| 105 | #define __OSX_AVAILABLE(...) | ||
| 106 | #endif | ||
| 107 | |||
| 108 | #ifndef __IOS_AVAILABLE | ||
| 109 | #define __IOS_AVAILABLE(...) | ||
| 110 | #endif | ||
| 111 | |||
| 112 | #ifndef __TVOS_AVAILABLE | ||
| 113 | #define __TVOS_AVAILABLE(...) | ||
| 114 | #endif | ||
| 115 | |||
| 116 | #ifndef __WATCHOS_AVAILABLE | ||
| 117 | #define __WATCHOS_AVAILABLE(...) | ||
| 118 | #endif | ||
| 119 | |||
| 120 | #ifndef __API_AVAILABLE | ||
| 121 | #define __API_AVAILABLE(...) | ||
| 122 | #endif | ||
| 123 | |||
| 124 | #endif // __XPC_AVAILABILITY_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/xpc/base.h deleted-213| ... | @@ -1,213 +0,0 @@ | ||
| 1 | // Copyright (c) 2009-2011 Apple Inc. All rights reserved. | ||
| 2 | |||
| 3 | #ifndef __XPC_BASE_H__ | ||
| 4 | #define __XPC_BASE_H__ | ||
| 5 | |||
| 6 | #include <sys/cdefs.h> | ||
| 7 | |||
| 8 | __BEGIN_DECLS | ||
| 9 | |||
| 10 | #if !defined(__has_include) | ||
| 11 | #define __has_include(x) 0 | ||
| 12 | #endif // !defined(__has_include) | ||
| 13 | |||
| 14 | #if !defined(__has_attribute) | ||
| 15 | #define __has_attribute(x) 0 | ||
| 16 | #endif // !defined(__has_attribute) | ||
| 17 | |||
| 18 | #if !defined(__has_feature) | ||
| 19 | #define __has_feature(x) 0 | ||
| 20 | #endif // !defined(__has_feature) | ||
| 21 | |||
| 22 | #if !defined(__has_extension) | ||
| 23 | #define __has_extension(x) 0 | ||
| 24 | #endif // !defined(__has_extension) | ||
| 25 | |||
| 26 | #if __has_include(<xpc/availability.h>) | ||
| 27 | #include <xpc/availability.h> | ||
| 28 | #else // __has_include(<xpc/availability.h>) | ||
| 29 | #include <Availability.h> | ||
| 30 | #endif // __has_include(<xpc/availability.h>) | ||
| 31 | |||
| 32 | #include <os/availability.h> | ||
| 33 | |||
| 34 | #ifndef __XPC_INDIRECT__ | ||
| 35 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 36 | #endif // __XPC_INDIRECT__ | ||
| 37 | |||
| 38 | #pragma mark Attribute Shims | ||
| 39 | #ifdef __GNUC__ | ||
| 40 | #define XPC_CONSTRUCTOR __attribute__((constructor)) | ||
| 41 | #define XPC_NORETURN __attribute__((__noreturn__)) | ||
| 42 | #define XPC_NOTHROW __attribute__((__nothrow__)) | ||
| 43 | #define XPC_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 44 | #define XPC_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 45 | #define XPC_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 46 | #define XPC_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 47 | #define XPC_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 48 | #define XPC_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 49 | #define XPC_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 50 | #define XPC_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 51 | #define XPC_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 52 | #define XPC_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 53 | #define XPC_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 54 | #define XPC_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 55 | #define XPC_SENTINEL __attribute__((__sentinel__)) | ||
| 56 | #define XPC_PURE __attribute__((__pure__)) | ||
| 57 | #define XPC_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 58 | #define XPC_MALLOC __attribute__((__malloc__)) | ||
| 59 | #define XPC_UNUSED __attribute__((__unused__)) | ||
| 60 | #define XPC_USED __attribute__((__used__)) | ||
| 61 | #define XPC_PACKED __attribute__((__packed__)) | ||
| 62 | #define XPC_PRINTF(m, n) __attribute__((format(printf, m, n))) | ||
| 63 | #define XPC_INLINE static __inline__ __attribute__((__always_inline__)) | ||
| 64 | #define XPC_NOINLINE __attribute__((noinline)) | ||
| 65 | #define XPC_NOIMPL __attribute__((unavailable)) | ||
| 66 | |||
| 67 | #if __has_attribute(noescape) | ||
| 68 | #define XPC_NOESCAPE __attribute__((__noescape__)) | ||
| 69 | #else | ||
| 70 | #define XPC_NOESCAPE | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #if __has_extension(attribute_unavailable_with_message) | ||
| 74 | #define XPC_UNAVAILABLE(m) __attribute__((unavailable(m))) | ||
| 75 | #else // __has_extension(attribute_unavailable_with_message) | ||
| 76 | #define XPC_UNAVAILABLE(m) XPC_NOIMPL | ||
| 77 | #endif // __has_extension(attribute_unavailable_with_message) | ||
| 78 | |||
| 79 | #define XPC_EXPORT extern __attribute__((visibility("default"))) | ||
| 80 | #define XPC_NOEXPORT __attribute__((visibility("hidden"))) | ||
| 81 | #define XPC_WEAKIMPORT extern __attribute__((weak_import)) | ||
| 82 | #define XPC_DEBUGGER_EXCL XPC_NOEXPORT XPC_USED | ||
| 83 | #define XPC_TRANSPARENT_UNION __attribute__((transparent_union)) | ||
| 84 | #if __clang__ | ||
| 85 | #define XPC_DEPRECATED(m) __attribute__((deprecated(m))) | ||
| 86 | #else // __clang__ | ||
| 87 | #define XPC_DEPRECATED(m) __attribute__((deprecated)) | ||
| 88 | #endif // __clang | ||
| 89 | |||
| 90 | #if defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 91 | #define XPC_TESTSTATIC | ||
| 92 | #define XPC_TESTEXTERN extern | ||
| 93 | #else // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 94 | #define XPC_TESTSTATIC static | ||
| 95 | #endif // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 96 | |||
| 97 | #if __has_feature(objc_arc) | ||
| 98 | #define XPC_GIVES_REFERENCE __strong | ||
| 99 | #define XPC_UNRETAINED __unsafe_unretained | ||
| 100 | #define XPC_BRIDGE(xo) ((__bridge void *)(xo)) | ||
| 101 | #define XPC_BRIDGEREF_BEGIN(xo) ((__bridge_retained void *)(xo)) | ||
| 102 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) ((__bridge void *)(xo)) | ||
| 103 | #define XPC_BRIDGEREF_MIDDLE(xo) ((__bridge id)(xo)) | ||
| 104 | #define XPC_BRIDGEREF_END(xo) ((__bridge_transfer id)(xo)) | ||
| 105 | #else // __has_feature(objc_arc) | ||
| 106 | #define XPC_GIVES_REFERENCE | ||
| 107 | #define XPC_UNRETAINED | ||
| 108 | #define XPC_BRIDGE(xo) (xo) | ||
| 109 | #define XPC_BRIDGEREF_BEGIN(xo) (xo) | ||
| 110 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) (xo) | ||
| 111 | #define XPC_BRIDGEREF_MIDDLE(xo) (xo) | ||
| 112 | #define XPC_BRIDGEREF_END(xo) (xo) | ||
| 113 | #endif // __has_feature(objc_arc) | ||
| 114 | |||
| 115 | #define _xpc_unreachable() __builtin_unreachable() | ||
| 116 | #else // __GNUC__ | ||
| 117 | /*! @parseOnly */ | ||
| 118 | #define XPC_CONSTRUCTOR | ||
| 119 | /*! @parseOnly */ | ||
| 120 | #define XPC_NORETURN | ||
| 121 | /*! @parseOnly */ | ||
| 122 | #define XPC_NOTHROW | ||
| 123 | /*! @parseOnly */ | ||
| 124 | #define XPC_NONNULL1 | ||
| 125 | /*! @parseOnly */ | ||
| 126 | #define XPC_NONNULL2 | ||
| 127 | /*! @parseOnly */ | ||
| 128 | #define XPC_NONNULL3 | ||
| 129 | /*! @parseOnly */ | ||
| 130 | #define XPC_NONNULL4 | ||
| 131 | /*! @parseOnly */ | ||
| 132 | #define XPC_NONNULL5 | ||
| 133 | /*! @parseOnly */ | ||
| 134 | #define XPC_NONNULL6 | ||
| 135 | /*! @parseOnly */ | ||
| 136 | #define XPC_NONNULL7 | ||
| 137 | /*! @parseOnly */ | ||
| 138 | #define XPC_NONNULL8 | ||
| 139 | /*! @parseOnly */ | ||
| 140 | #define XPC_NONNULL9 | ||
| 141 | /*! @parseOnly */ | ||
| 142 | #define XPC_NONNULL10 | ||
| 143 | /*! @parseOnly */ | ||
| 144 | #define XPC_NONNULL11 | ||
| 145 | /*! @parseOnly */ | ||
| 146 | #define XPC_NONNULL(n) | ||
| 147 | /*! @parseOnly */ | ||
| 148 | #define XPC_NONNULL_ALL | ||
| 149 | /*! @parseOnly */ | ||
| 150 | #define XPC_SENTINEL | ||
| 151 | /*! @parseOnly */ | ||
| 152 | #define XPC_PURE | ||
| 153 | /*! @parseOnly */ | ||
| 154 | #define XPC_WARN_RESULT | ||
| 155 | /*! @parseOnly */ | ||
| 156 | #define XPC_MALLOC | ||
| 157 | /*! @parseOnly */ | ||
| 158 | #define XPC_UNUSED | ||
| 159 | /*! @parseOnly */ | ||
| 160 | #define XPC_PACKED | ||
| 161 | /*! @parseOnly */ | ||
| 162 | #define XPC_PRINTF(m, n) | ||
| 163 | /*! @parseOnly */ | ||
| 164 | #define XPC_INLINE static inline | ||
| 165 | /*! @parseOnly */ | ||
| 166 | #define XPC_NOINLINE | ||
| 167 | /*! @parseOnly */ | ||
| 168 | #define XPC_NOIMPL | ||
| 169 | /*! @parseOnly */ | ||
| 170 | #define XPC_EXPORT extern | ||
| 171 | /*! @parseOnly */ | ||
| 172 | #define XPC_WEAKIMPORT | ||
| 173 | /*! @parseOnly */ | ||
| 174 | #define XPC_DEPRECATED | ||
| 175 | /*! @parseOnly */ | ||
| 176 | #define XPC_UNAVAILABLE(m) | ||
| 177 | /*! @parseOnly */ | ||
| 178 | #define XPC_NOESCAPE | ||
| 179 | #endif // __GNUC__ | ||
| 180 | |||
| 181 | #if __has_feature(assume_nonnull) | ||
| 182 | #define XPC_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 183 | #define XPC_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 184 | #else | ||
| 185 | #define XPC_ASSUME_NONNULL_BEGIN | ||
| 186 | #define XPC_ASSUME_NONNULL_END | ||
| 187 | #endif | ||
| 188 | |||
| 189 | #if __has_feature(nullability_on_arrays) | ||
| 190 | #define XPC_NONNULL_ARRAY _Nonnull | ||
| 191 | #else | ||
| 192 | #define XPC_NONNULL_ARRAY | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #ifdef OS_CLOSED_OPTIONS | ||
| 196 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 197 | 		OS_CLOSED_OPTIONS(_name, _type, __VA_ARGS__) | ||
| 198 | #else // OS_CLOSED_ENUM | ||
| 199 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 200 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 201 | #endif // OS_CLOSED_ENUM | ||
| 202 | |||
| 203 | #ifdef OS_CLOSED_ENUM | ||
| 204 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 205 | 		OS_CLOSED_ENUM(_name, _type, __VA_ARGS__) | ||
| 206 | #else // OS_CLOSED_ENUM | ||
| 207 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 208 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 209 | #endif // OS_CLOSED_ENUM | ||
| 210 | |||
| 211 | __END_DECLS | ||
| 212 | |||
| 213 | #endif // __XPC_BASE_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.11-any/xpc/connection.h deleted-748| ... | @@ -1,748 +0,0 @@ | ||
| 1 | #ifndef __XPC_CONNECTION_H__ | ||
| 2 | #define __XPC_CONNECTION_H__ | ||
| 3 | |||
| 4 | #ifndef __XPC_INDIRECT__ | ||
| 5 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 6 | // For HeaderDoc. | ||
| 7 | #include <xpc/base.h> | ||
| 8 | #endif // __XPC_INDIRECT__ | ||
| 9 | |||
| 10 | #ifndef __BLOCKS__ | ||
| 11 | #error "XPC connections require Blocks support." | ||
| 12 | #endif // __BLOCKS__ | ||
| 13 | |||
| 14 | XPC_ASSUME_NONNULL_BEGIN | ||
| 15 | __BEGIN_DECLS | ||
| 16 | |||
| 17 | /*! | ||
| 18 | * @constant XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 19 | * Will be delivered to the connection's event handler if the remote service | ||
| 20 | * exited. The connection is still live even in this case, and resending a | ||
| 21 | * message will cause the service to be launched on-demand. This error serves | ||
| 22 | * as a client's indication that it should resynchronize any state that it had | ||
| 23 | * given the service. | ||
| 24 | * | ||
| 25 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 26 | * error occurs. In the case where a message waiting to be sent has a reply | ||
| 27 | * handler, that handler will be invoked with this error. In the context of the | ||
| 28 | * reply handler, this error indicates that a reply to the message will never | ||
| 29 | * arrive. | ||
| 30 | * | ||
| 31 | * Messages that do not have reply handlers associated with them will be | ||
| 32 | * silently disposed of. This error will only be given to peer connections. | ||
| 33 | */ | ||
| 34 | #define XPC_ERROR_CONNECTION_INTERRUPTED \ | ||
| 35 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_interrupted) | ||
| 36 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 37 | XPC_EXPORT | ||
| 38 | const struct _xpc_dictionary_s _xpc_error_connection_interrupted; | ||
| 39 | |||
| 40 | /*! | ||
| 41 | * @constant XPC_ERROR_CONNECTION_INVALID | ||
| 42 | * Will be delivered to the connection's event handler if the named service | ||
| 43 | * provided to xpc_connection_create() could not be found in the XPC service | ||
| 44 | * namespace. The connection is useless and should be disposed of. | ||
| 45 | * | ||
| 46 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 47 | * error occurs, similarly to the behavior when XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 48 | * occurs. The only difference is that the XPC_ERROR_CONNECTION_INVALID will be | ||
| 49 | * given to outstanding reply handlers and the connection's event handler. | ||
| 50 | * | ||
| 51 | * This error may be given to any type of connection. | ||
| 52 | */ | ||
| 53 | #define XPC_ERROR_CONNECTION_INVALID \ | ||
| 54 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_invalid) | ||
| 55 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 56 | XPC_EXPORT | ||
| 57 | const struct _xpc_dictionary_s _xpc_error_connection_invalid; | ||
| 58 | |||
| 59 | /*! | ||
| 60 | * @constant XPC_ERROR_TERMINATION_IMMINENT | ||
| 61 | * On macOS, this error will be delivered to a peer connection's event handler | ||
| 62 | * when the XPC runtime has determined that the program should exit and that | ||
| 63 | * all outstanding transactions must be wound down, and no new transactions can | ||
| 64 | * be opened. | ||
| 65 | * | ||
| 66 | * After this error has been delivered to the event handler, no more messages | ||
| 67 | * will be received by the connection. The runtime will still attempt to deliver | ||
| 68 | * outgoing messages, but this error should be treated as an indication that | ||
| 69 | * the program will exit very soon, and any outstanding business over the | ||
| 70 | * connection should be wrapped up as quickly as possible and the connection | ||
| 71 | * canceled shortly thereafter. | ||
| 72 | * | ||
| 73 | * This error will only be delivered to peer connections received through a | ||
| 74 | * listener or the xpc_main() event handler. | ||
| 75 | */ | ||
| 76 | #define XPC_ERROR_TERMINATION_IMMINENT \ | ||
| 77 | 	XPC_GLOBAL_OBJECT(_xpc_error_termination_imminent) | ||
| 78 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 79 | XPC_EXPORT | ||
| 80 | const struct _xpc_dictionary_s _xpc_error_termination_imminent; | ||
| 81 | |||
| 82 | /*! | ||
| 83 | * @constant XPC_CONNECTION_MACH_SERVICE_LISTENER | ||
| 84 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 85 | * caller is the listener for the named service. This flag may only be passed | ||
| 86 | * for services which are advertised in the process' launchd.plist(5). You may | ||
| 87 | * not use this flag to dynamically add services to the Mach bootstrap | ||
| 88 | * namespace. | ||
| 89 | */ | ||
| 90 | #define XPC_CONNECTION_MACH_SERVICE_LISTENER (1 << 0) | ||
| 91 | |||
| 92 | /*! | ||
| 93 | * @constant XPC_CONNECTION_MACH_SERVICE_PRIVILEGED | ||
| 94 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 95 | * job advertising the service name in its launchd.plist(5) should be in the | ||
| 96 | * privileged Mach bootstrap. This is typically accomplished by placing your | ||
| 97 | * launchd.plist(5) in /Library/LaunchDaemons. If specified alongside the | ||
| 98 | * XPC_CONNECTION_MACH_SERVICE_LISTENER flag, this flag is a no-op. | ||
| 99 | */ | ||
| 100 | #define XPC_CONNECTION_MACH_SERVICE_PRIVILEGED (1 << 1) | ||
| 101 | |||
| 102 | /*! | ||
| 103 | * @typedef xpc_finalizer_f | ||
| 104 | * A function that is invoked when a connection is being torn down and its | ||
| 105 | * context needs to be freed. The sole argument is the value that was given to | ||
| 106 | * {@link xpc_connection_set_context} or NULL if no context has been set. It is | ||
| 107 | * not safe to reference the connection from within this function. | ||
| 108 | * | ||
| 109 | * @param value | ||
| 110 | * The context object that is to be disposed of. | ||
| 111 | */ | ||
| 112 | typedef void (*xpc_finalizer_t)(void * _Nullable value); | ||
| 113 | |||
| 114 | /*! | ||
| 115 | * @function xpc_connection_create | ||
| 116 | * Creates a new connection object. | ||
| 117 | * | ||
| 118 | * @param name | ||
| 119 | * If non-NULL, the name of the service with which to connect. The returned | ||
| 120 | * connection will be a peer. | ||
| 121 | * | ||
| 122 | * If NULL, an anonymous listener connection will be created. You can embed the | ||
| 123 | * ability to create new peer connections in an endpoint, which can be inserted | ||
| 124 | * into a message and sent to another process . | ||
| 125 | * | ||
| 126 | * @param targetq | ||
| 127 | * The GCD queue to which the event handler block will be submitted. This | ||
| 128 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 129 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 130 | * The target queue may be changed later with a call to | ||
| 131 | * xpc_connection_set_target_queue(). | ||
| 132 | * | ||
| 133 | * @result | ||
| 134 | * A new connection object. The caller is responsible for disposing of the | ||
| 135 | * returned object with {@link xpc_release} when it is no longer needed. | ||
| 136 | * | ||
| 137 | * @discussion | ||
| 138 | * This method will succeed even if the named service does not exist. This is | ||
| 139 | * because the XPC namespace is not queried for the service name until the | ||
| 140 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 141 | * | ||
| 142 | * XPC connections, like dispatch sources, are returned in an inactive state, so | ||
| 143 | * you must call {@link xpc_connection_activate()} in order to begin receiving | ||
| 144 | * events from the connection. Also like dispatch sources, connections must be | ||
| 145 | * activated and not suspended in order to be safely released. It is | ||
| 146 | * a programming error to release an inactive or suspended connection. | ||
| 147 | */ | ||
| 148 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 149 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT | ||
| 150 | xpc_connection_t | ||
| 151 | xpc_connection_create(const char * _Nullable name, | ||
| 152 | 	dispatch_queue_t _Nullable targetq); | ||
| 153 | |||
| 154 | /*! | ||
| 155 | * @function xpc_connection_create_mach_service | ||
| 156 | * Creates a new connection object representing a Mach service. | ||
| 157 | * | ||
| 158 | * @param name | ||
| 159 | * The name of the remote service with which to connect. The service name must | ||
| 160 | * exist in a Mach bootstrap that is accessible to the process and be advertised | ||
| 161 | * in a launchd.plist. | ||
| 162 | * | ||
| 163 | * @param targetq | ||
| 164 | * The GCD queue to which the event handler block will be submitted. This | ||
| 165 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 166 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 167 | * The target queue may be changed later with a call to | ||
| 168 | * xpc_connection_set_target_queue(). | ||
| 169 | * | ||
| 170 | * @param flags | ||
| 171 | * Additional attributes with which to create the connection. | ||
| 172 | * | ||
| 173 | * @result | ||
| 174 | * A new connection object. | ||
| 175 | * | ||
| 176 | * @discussion | ||
| 177 | * If the XPC_CONNECTION_MACH_SERVICE_LISTENER flag is given to this method, | ||
| 178 | * then the connection returned will be a listener connection. Otherwise, a peer | ||
| 179 | * connection will be returned. See the documentation for | ||
| 180 | * {@link xpc_connection_set_event_handler()} for the semantics of listener | ||
| 181 | * connections versus peer connections. | ||
| 182 | * | ||
| 183 | * This method will succeed even if the named service does not exist. This is | ||
| 184 | * because the Mach namespace is not queried for the service name until the | ||
| 185 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 186 | */ | ||
| 187 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 188 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL1 | ||
| 189 | xpc_connection_t | ||
| 190 | xpc_connection_create_mach_service(const char *name, | ||
| 191 | 	dispatch_queue_t _Nullable targetq, uint64_t flags); | ||
| 192 | |||
| 193 | /*! | ||
| 194 | * @function xpc_connection_create_from_endpoint | ||
| 195 | * Creates a new connection from the given endpoint. | ||
| 196 | * | ||
| 197 | * @param endpoint | ||
| 198 | * The endpoint from which to create the new connection. | ||
| 199 | * | ||
| 200 | * @result | ||
| 201 | * A new peer connection to the listener represented by the given endpoint. | ||
| 202 | * | ||
| 203 | * The same responsibilities of setting an event handler and activating the | ||
| 204 | * connection after calling xpc_connection_create() apply to the connection | ||
| 205 | * returned by this API. Since the connection yielded by this API is not | ||
| 206 | * associated with a name (and therefore is not rediscoverable), this connection | ||
| 207 | * will receive XPC_ERROR_CONNECTION_INVALID if the listening side crashes, | ||
| 208 | * exits or cancels the listener connection. | ||
| 209 | */ | ||
| 210 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 211 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL_ALL | ||
| 212 | xpc_connection_t | ||
| 213 | xpc_connection_create_from_endpoint(xpc_endpoint_t endpoint); | ||
| 214 | |||
| 215 | /*! | ||
| 216 | * @function xpc_connection_set_target_queue | ||
| 217 | * Sets the target queue of the given connection. | ||
| 218 | * | ||
| 219 | * @param connection | ||
| 220 | * The connection object which is to be manipulated. | ||
| 221 | * | ||
| 222 | * @param targetq | ||
| 223 | * The GCD queue to which the event handler block will be submitted. This | ||
| 224 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 225 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 226 | * | ||
| 227 | * @discussion | ||
| 228 | * Setting the target queue is asynchronous and non-preemptive and therefore | ||
| 229 | * this method will not interrupt the execution of an already-running event | ||
| 230 | * handler block. Setting the target queue may be likened to issuing a barrier | ||
| 231 | * to the connection which does the actual work of changing the target queue. | ||
| 232 | * | ||
| 233 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 234 | * queues. If the target queue is a concurrent queue, then XPC still guarantees | ||
| 235 | * that there will never be more than one invocation of the connection's event | ||
| 236 | * handler block executing concurrently. If you wish to process events | ||
| 237 | * concurrently, you can dispatch_async(3) to a concurrent queue from within | ||
| 238 | * the event handler. | ||
| 239 | * | ||
| 240 | * IMPORTANT: When called from within the event handler block, | ||
| 241 | * dispatch_get_current_queue(3) is NOT guaranteed to return a pointer to the | ||
| 242 | * queue set with this method. | ||
| 243 | * | ||
| 244 | * Despite this seeming inconsistency, the XPC runtime guarantees that, when the | ||
| 245 | * target queue is a serial queue, the event handler block will execute | ||
| 246 | * synchonously with respect to other blocks submitted to that same queue. When | ||
| 247 | * the target queue is a concurrent queue, the event handler block may run | ||
| 248 | * concurrently with other blocks submitted to that queue, but it will never run | ||
| 249 | * concurrently with other invocations of itself for the same connection, as | ||
| 250 | * discussed previously. | ||
| 251 | */ | ||
| 252 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 253 | XPC_EXPORT XPC_NONNULL1 | ||
| 254 | void | ||
| 255 | xpc_connection_set_target_queue(xpc_connection_t connection, | ||
| 256 | 	dispatch_queue_t _Nullable targetq); | ||
| 257 | |||
| 258 | /*! | ||
| 259 | * @function xpc_connection_set_event_handler | ||
| 260 | * Sets the event handler block for the connection. | ||
| 261 | * | ||
| 262 | * @param connection | ||
| 263 | * The connection object which is to be manipulated. | ||
| 264 | * | ||
| 265 | * @param handler | ||
| 266 | * The event handler block. | ||
| 267 | * | ||
| 268 | * @discussion | ||
| 269 | * Setting the event handler is asynchronous and non-preemptive, and therefore | ||
| 270 | * this method will not interrupt the execution of an already-running event | ||
| 271 | * handler block. If the event handler is executing at the time of this call, it | ||
| 272 | * will finish, and then the connection's event handler will be changed before | ||
| 273 | * the next invocation of the event handler. The XPC runtime guarantees this | ||
| 274 | * non-preemptiveness even for concurrent target queues. | ||
| 275 | * | ||
| 276 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 277 | * xpc_connection_set_event_handler() from within the event handler block. | ||
| 278 | * | ||
| 279 | * The event handler's execution should be treated as a barrier to all | ||
| 280 | * connection activity. When it is executing, the connection will not attempt to | ||
| 281 | * send or receive messages, including reply messages. Thus, it is not safe to | ||
| 282 | * call xpc_connection_send_message_with_reply_sync() on the connection from | ||
| 283 | * within the event handler. | ||
| 284 | * | ||
| 285 | * You do not hold a reference on the object received as the event handler's | ||
| 286 | * only argument. Regardless of the type of object received, it is safe to call | ||
| 287 | * xpc_retain() on the object to obtain a reference to it. | ||
| 288 | * | ||
| 289 | * A connection may receive different events depending upon whether it is a | ||
| 290 | * listener or not. Any connection may receive an error in its event handler. | ||
| 291 | * But while normal connections may receive messages in addition to errors, | ||
| 292 | * listener connections will receive connections and and not messages. | ||
| 293 | * | ||
| 294 | * Connections received by listeners are equivalent to those returned by | ||
| 295 | * xpc_connection_create() with a non-NULL name argument and a NULL targetq | ||
| 296 | * argument with the exception that you do not hold a reference on them. | ||
| 297 | * You must set an event handler and activate the connection. If you do not wish | ||
| 298 | * to accept the connection, you may simply call xpc_connection_cancel() on it | ||
| 299 | * and return. The runtime will dispose of it for you. | ||
| 300 | * | ||
| 301 | * If there is an error in the connection, this handler will be invoked with the | ||
| 302 | * error dictionary as its argument. This dictionary will be one of the well- | ||
| 303 | * known XPC_ERROR_* dictionaries. | ||
| 304 | * | ||
| 305 | * Regardless of the type of event, ownership of the event object is NOT | ||
| 306 | * implicitly transferred. Thus, the object will be released and deallocated at | ||
| 307 | * some point in the future after the event handler returns. If you wish the | ||
| 308 | * event's lifetime to persist, you must retain it with xpc_retain(). | ||
| 309 | * | ||
| 310 | * Connections received through the event handler will be released and | ||
| 311 | * deallocated after the connection has gone invalid and delivered that event to | ||
| 312 | * its event handler. | ||
| 313 | */ | ||
| 314 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 315 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 316 | void | ||
| 317 | xpc_connection_set_event_handler(xpc_connection_t connection, | ||
| 318 | 	xpc_handler_t handler); | ||
| 319 | |||
| 320 | /*! | ||
| 321 | * @function xpc_connection_activate | ||
| 322 | * Activates the connection. Connections start in an inactive state, so you must | ||
| 323 | * call xpc_connection_activate() on a connection before it will send or receive | ||
| 324 | * any messages. | ||
| 325 | * | ||
| 326 | * @param connection | ||
| 327 | * The connection object which is to be manipulated. | ||
| 328 | * | ||
| 329 | * @discussion | ||
| 330 | * Calling xpc_connection_activate() on an active connection has no effect. | ||
| 331 | * Releasing the last reference on an inactive connection that was created with | ||
| 332 | * an xpc_connection_create*() call is undefined. | ||
| 333 | * | ||
| 334 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 335 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 336 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 337 | * is preferred. | ||
| 338 | */ | ||
| 339 | __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 340 | __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 341 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 342 | void | ||
| 343 | xpc_connection_activate(xpc_connection_t connection); | ||
| 344 | |||
| 345 | /*! | ||
| 346 | * @function xpc_connection_suspend | ||
| 347 | * Suspends the connection so that the event handler block will not fire and | ||
| 348 | * that the connection will not attempt to send any messages it has in its | ||
| 349 | * queue. All calls to xpc_connection_suspend() must be balanced with calls to | ||
| 350 | * xpc_connection_resume() before releasing the last reference to the | ||
| 351 | * connection. | ||
| 352 | * | ||
| 353 | * @param connection | ||
| 354 | * The connection object which is to be manipulated. | ||
| 355 | * | ||
| 356 | * @discussion | ||
| 357 | * Suspension is asynchronous and non-preemptive, and therefore this method will | ||
| 358 | * not interrupt the execution of an already-running event handler block. If | ||
| 359 | * the event handler is executing at the time of this call, it will finish, and | ||
| 360 | * then the connection will be suspended before the next scheduled invocation | ||
| 361 | * of the event handler. The XPC runtime guarantees this non-preemptiveness even | ||
| 362 | * for concurrent target queues. | ||
| 363 | * | ||
| 364 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 365 | * xpc_connection_suspend() from within the event handler block. | ||
| 366 | */ | ||
| 367 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 368 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 369 | void | ||
| 370 | xpc_connection_suspend(xpc_connection_t connection); | ||
| 371 | |||
| 372 | /*! | ||
| 373 | * @function xpc_connection_resume | ||
| 374 | * Resumes the connection. | ||
| 375 | * | ||
| 376 | * @param connection | ||
| 377 | * The connection object which is to be manipulated. | ||
| 378 | * | ||
| 379 | * @discussion | ||
| 380 | * In order for a connection to become live, every call to | ||
| 381 | * xpc_connection_suspend() must be balanced with a call to | ||
| 382 | * xpc_connection_resume(). | ||
| 383 | * | ||
| 384 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 385 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 386 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 387 | * is preferred. | ||
| 388 | * | ||
| 389 | * Calling xpc_connection_resume() more times than xpc_connection_suspend() | ||
| 390 | * has been called is otherwise considered an error. | ||
| 391 | */ | ||
| 392 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 393 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 394 | void | ||
| 395 | xpc_connection_resume(xpc_connection_t connection); | ||
| 396 | |||
| 397 | /*! | ||
| 398 | * @function xpc_connection_send_message | ||
| 399 | * Sends a message over the connection to the destination service. | ||
| 400 | * | ||
| 401 | * @param connection | ||
| 402 | * The connection over which the message shall be sent. | ||
| 403 | * | ||
| 404 | * @param message | ||
| 405 | * The message to send. This must be a dictionary object. This dictionary is | ||
| 406 | * logically copied by the connection, so it is safe to modify the dictionary | ||
| 407 | * after this call. | ||
| 408 | * | ||
| 409 | * @discussion | ||
| 410 | * Messages are delivered in FIFO order. This API is safe to call from multiple | ||
| 411 | * GCD queues. There is no indication that a message was delivered successfully. | ||
| 412 | * This is because even once the message has been successfully enqueued on the | ||
| 413 | * remote end, there are no guarantees about when the runtime will dequeue the | ||
| 414 | * message and invoke the other connection's event handler block. | ||
| 415 | * | ||
| 416 | * If this API is used to send a message that is in reply to another message, | ||
| 417 | * there is no guarantee of ordering between the invocations of the connection's | ||
| 418 | * event handler and the reply handler for that message, even if they are | ||
| 419 | * targeted to the same queue. | ||
| 420 | * | ||
| 421 | * After extensive study, we have found that clients who are interested in | ||
| 422 | * the state of the message on the server end are typically holding open | ||
| 423 | * transactions related to that message. And the only reliable way to track the | ||
| 424 | * lifetime of that transaction is at the protocol layer. So the server should | ||
| 425 | * send a reply message, which upon receiving, will cause the client to close | ||
| 426 | * its transaction. | ||
| 427 | */ | ||
| 428 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 429 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 430 | void | ||
| 431 | xpc_connection_send_message(xpc_connection_t connection, xpc_object_t message); | ||
| 432 | |||
| 433 | /*! | ||
| 434 | * @function xpc_connection_send_barrier | ||
| 435 | * Issues a barrier against the connection's message-send activity. | ||
| 436 | * | ||
| 437 | * @param connection | ||
| 438 | * The connection against which the barrier is to be issued. | ||
| 439 | * | ||
| 440 | * @param barrier | ||
| 441 | * The barrier block to issue. This barrier prevents concurrent message-send | ||
| 442 | * activity on the connection. No messages will be sent while the barrier block | ||
| 443 | * is executing. | ||
| 444 | * | ||
| 445 | * @discussion | ||
| 446 | * XPC guarantees that, even if the connection's target queue is a concurrent | ||
| 447 | * queue, there are no other messages being sent concurrently while the barrier | ||
| 448 | * block is executing. XPC does not guarantee that the receipt of messages | ||
| 449 | * (either through the connection's event handler or through reply handlers) | ||
| 450 | * will be suspended while the barrier is executing. | ||
| 451 | * | ||
| 452 | * A barrier is issued relative to the message-send queue. Thus, if you call | ||
| 453 | * xpc_connection_send_message() five times and then call | ||
| 454 | * xpc_connection_send_barrier(), the barrier will be invoked after the fifth | ||
| 455 | * message has been sent and its memory disposed of. You may safely cancel a | ||
| 456 | * connection from within a barrier block. | ||
| 457 | * | ||
| 458 | * If a barrier is issued after sending a message which expects a reply, the | ||
| 459 | * behavior is the same as described above. The receipt of a reply message will | ||
| 460 | * not influence when the barrier runs. | ||
| 461 | * | ||
| 462 | * A barrier block can be useful for throttling resource consumption on the | ||
| 463 | * connected side of a connection. For example, if your connection sends many | ||
| 464 | * large messages, you can use a barrier to limit the number of messages that | ||
| 465 | * are inflight at any given time. This can be particularly useful for messages | ||
| 466 | * that contain kernel resources (like file descriptors) which have a system- | ||
| 467 | * wide limit. | ||
| 468 | * | ||
| 469 | * If a barrier is issued on a canceled connection, it will be invoked | ||
| 470 | * immediately. If a connection has been canceled and still has outstanding | ||
| 471 | * barriers, those barriers will be invoked as part of the connection's | ||
| 472 | * unwinding process. | ||
| 473 | * | ||
| 474 | * It is important to note that a barrier block's execution order is not | ||
| 475 | * guaranteed with respect to other blocks that have been scheduled on the | ||
| 476 | * target queue of the connection. Or said differently, | ||
| 477 | * xpc_connection_send_barrier(3) is not equivalent to dispatch_async(3). | ||
| 478 | */ | ||
| 479 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 480 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 481 | void | ||
| 482 | xpc_connection_send_barrier(xpc_connection_t connection, | ||
| 483 | 	dispatch_block_t barrier); | ||
| 484 | |||
| 485 | /*! | ||
| 486 | * @function xpc_connection_send_message_with_reply | ||
| 487 | * Sends a message over the connection to the destination service and associates | ||
| 488 | * a handler to be invoked when the remote service sends a reply message. | ||
| 489 | * | ||
| 490 | * @param connection | ||
| 491 | * The connection over which the message shall be sent. | ||
| 492 | * | ||
| 493 | * @param message | ||
| 494 | * The message to send. This must be a dictionary object. | ||
| 495 | * | ||
| 496 | * @param replyq | ||
| 497 | * The GCD queue to which the reply handler will be submitted. This may be a | ||
| 498 | * concurrent queue. | ||
| 499 | * | ||
| 500 | * @param handler | ||
| 501 | * The handler block to invoke when a reply to the message is received from | ||
| 502 | * the connection. If the remote service exits prematurely before the reply was | ||
| 503 | * received, the XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. | ||
| 504 | * If the connection went invalid before the message could be sent, the | ||
| 505 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 506 | * | ||
| 507 | * @discussion | ||
| 508 | * If the given GCD queue is a concurrent queue, XPC cannot guarantee that there | ||
| 509 | * will not be multiple reply handlers being invoked concurrently. XPC does not | ||
| 510 | * guarantee any ordering for the invocation of reply handers. So if multiple | ||
| 511 | * messages are waiting for replies and the connection goes invalid, there is no | ||
| 512 | * guarantee that the reply handlers will be invoked in FIFO order. Similarly, | ||
| 513 | * XPC does not guarantee that reply handlers will not run concurrently with | ||
| 514 | * the connection's event handler in the case that the reply queue and the | ||
| 515 | * connection's target queue are the same concurrent queue. | ||
| 516 | */ | ||
| 517 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 518 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL4 | ||
| 519 | void | ||
| 520 | xpc_connection_send_message_with_reply(xpc_connection_t connection, | ||
| 521 | 	xpc_object_t message, dispatch_queue_t _Nullable replyq, | ||
| 522 | 	xpc_handler_t handler); | ||
| 523 | |||
| 524 | /*! | ||
| 525 | * @function xpc_connection_send_message_with_reply_sync | ||
| 526 | * Sends a message over the connection and blocks the caller until a reply is | ||
| 527 | * received. | ||
| 528 | * | ||
| 529 | * @param connection | ||
| 530 | * The connection over which the message shall be sent. | ||
| 531 | * | ||
| 532 | * @param message | ||
| 533 | * The message to send. This must be a dictionary object. | ||
| 534 | * | ||
| 535 | * @result | ||
| 536 | * The message that the remote service sent in reply to the original message. | ||
| 537 | * If the remote service exits prematurely before the reply was received, the | ||
| 538 | * XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. If the connection | ||
| 539 | * went invalid before the message could be sent, the | ||
| 540 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 541 | * | ||
| 542 | * You are responsible for releasing the returned object. | ||
| 543 | * | ||
| 544 | * @discussion | ||
| 545 | * This API supports priority inversion avoidance, and should be used instead of | ||
| 546 | * combining xpc_connection_send_message_with_reply() with a semaphore. | ||
| 547 | * | ||
| 548 | * Invoking this API from a queue that is a part of the target queue hierarchy | ||
| 549 | * results in deadlocks under certain conditions. | ||
| 550 | * | ||
| 551 | * Be judicious about your use of this API. It can block indefinitely, so if you | ||
| 552 | * are using it to implement an API that can be called from the main thread, you | ||
| 553 | * may wish to consider allowing the API to take a queue and callback block so | ||
| 554 | * that results may be delivered asynchronously if possible. | ||
| 555 | */ | ||
| 556 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 557 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT XPC_RETURNS_RETAINED | ||
| 558 | xpc_object_t | ||
| 559 | xpc_connection_send_message_with_reply_sync(xpc_connection_t connection, | ||
| 560 | 	xpc_object_t message); | ||
| 561 | |||
| 562 | /*! | ||
| 563 | * @function xpc_connection_cancel | ||
| 564 | * Cancels the connection and ensures that its event handler will not fire | ||
| 565 | * again. After this call, any messages that have not yet been sent will be | ||
| 566 | * discarded, and the connection will be unwound. If there are messages that are | ||
| 567 | * awaiting replies, they will have their reply handlers invoked with the | ||
| 568 | * XPC_ERROR_CONNECTION_INVALID error. | ||
| 569 | * | ||
| 570 | * @param connection | ||
| 571 | * The connection object which is to be manipulated. | ||
| 572 | * | ||
| 573 | * @discussion | ||
| 574 | * Cancellation is asynchronous and non-preemptive and therefore this method | ||
| 575 | * will not interrupt the execution of an already-running event handler block. | ||
| 576 | * If the event handler is executing at the time of this call, it will finish, | ||
| 577 | * and then the connection will be canceled, causing a final invocation of the | ||
| 578 | * event handler to be scheduled with the XPC_ERROR_CONNECTION_INVALID error. | ||
| 579 | * After that invocation, there will be no further invocations of the event | ||
| 580 | * handler. | ||
| 581 | * | ||
| 582 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 583 | * queues. | ||
| 584 | */ | ||
| 585 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 586 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 587 | void | ||
| 588 | xpc_connection_cancel(xpc_connection_t connection); | ||
| 589 | |||
| 590 | /*! | ||
| 591 | * @function xpc_connection_get_name | ||
| 592 | * Returns the name of the service with which the connections was created. | ||
| 593 | * | ||
| 594 | * @param connection | ||
| 595 | * The connection object which is to be examined. | ||
| 596 | * | ||
| 597 | * @result | ||
| 598 | * The name of the remote service. If you obtained the connection through an | ||
| 599 | * invocation of another connection's event handler, NULL is returned. | ||
| 600 | */ | ||
| 601 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 602 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 603 | const char * _Nullable | ||
| 604 | xpc_connection_get_name(xpc_connection_t connection); | ||
| 605 | |||
| 606 | /*! | ||
| 607 | * @function xpc_connection_get_euid | ||
| 608 | * Returns the EUID of the remote peer. | ||
| 609 | * | ||
| 610 | * @param connection | ||
| 611 | * The connection object which is to be examined. | ||
| 612 | * | ||
| 613 | * @result | ||
| 614 | * The EUID of the remote peer at the time the connection was made. | ||
| 615 | */ | ||
| 616 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 617 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 618 | uid_t | ||
| 619 | xpc_connection_get_euid(xpc_connection_t connection); | ||
| 620 | |||
| 621 | /*! | ||
| 622 | * @function xpc_connection_get_egid | ||
| 623 | * Returns the EGID of the remote peer. | ||
| 624 | * | ||
| 625 | * @param connection | ||
| 626 | * The connection object which is to be examined. | ||
| 627 | * | ||
| 628 | * @result | ||
| 629 | * The EGID of the remote peer at the time the connection was made. | ||
| 630 | */ | ||
| 631 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 632 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 633 | gid_t | ||
| 634 | xpc_connection_get_egid(xpc_connection_t connection); | ||
| 635 | |||
| 636 | /*! | ||
| 637 | * @function xpc_connection_get_pid | ||
| 638 | * Returns the PID of the remote peer. | ||
| 639 | * | ||
| 640 | * @param connection | ||
| 641 | * The connection object which is to be examined. | ||
| 642 | * | ||
| 643 | * @result | ||
| 644 | * The PID of the remote peer. | ||
| 645 | * | ||
| 646 | * @discussion | ||
| 647 | * A given PID is not guaranteed to be unique across an entire boot cycle. | ||
| 648 | * Great care should be taken when dealing with this information, as it can go | ||
| 649 | * stale after the connection is established. OS X recycles PIDs, and therefore | ||
| 650 | * another process could spawn and claim the PID before a message is actually | ||
| 651 | * received from the connection. | ||
| 652 | * | ||
| 653 | * XPC will deliver an error to your event handler if the remote process goes | ||
| 654 | * away, but there are no guarantees as to the timing of this notification's | ||
| 655 | * delivery either at the kernel layer or at the XPC layer. | ||
| 656 | */ | ||
| 657 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 658 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 659 | pid_t | ||
| 660 | xpc_connection_get_pid(xpc_connection_t connection); | ||
| 661 | |||
| 662 | /*! | ||
| 663 | * @function xpc_connection_get_asid | ||
| 664 | * Returns the audit session identifier of the remote peer. | ||
| 665 | * | ||
| 666 | * @param connection | ||
| 667 | * The connection object which is to be examined. | ||
| 668 | * | ||
| 669 | * @result | ||
| 670 | * The audit session ID of the remote peer at the time the connection was made. | ||
| 671 | */ | ||
| 672 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 673 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 674 | au_asid_t | ||
| 675 | xpc_connection_get_asid(xpc_connection_t connection); | ||
| 676 | |||
| 677 | /*! | ||
| 678 | * @function xpc_connection_set_context | ||
| 679 | * Sets context on an connection. | ||
| 680 | * | ||
| 681 | * @param connection | ||
| 682 | * The connection which is to be manipulated. | ||
| 683 | * | ||
| 684 | * @param context | ||
| 685 | * The context to associate with the connection. | ||
| 686 | * | ||
| 687 | * @discussion | ||
| 688 | * If you must manage the memory of the context object, you must set a finalizer | ||
| 689 | * to dispose of it. If this method is called on a connection which already has | ||
| 690 | * context associated with it, the finalizer will NOT be invoked. The finalizer | ||
| 691 | * is only invoked when the connection is being deallocated. | ||
| 692 | * | ||
| 693 | * It is recommended that, instead of changing the actual context pointer | ||
| 694 | * associated with the object, you instead change the state of the context | ||
| 695 | * object itself. | ||
| 696 | */ | ||
| 697 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 698 | XPC_EXPORT XPC_NONNULL1 | ||
| 699 | void | ||
| 700 | xpc_connection_set_context(xpc_connection_t connection, | ||
| 701 | 	void * _Nullable context); | ||
| 702 | |||
| 703 | /*! | ||
| 704 | * @function xpc_connection_get_context | ||
| 705 | * Returns the context associated with the connection. | ||
| 706 | * | ||
| 707 | * @param connection | ||
| 708 | * The connection which is to be examined. | ||
| 709 | * | ||
| 710 | * @result | ||
| 711 | * The context associated with the connection. NULL if there has been no context | ||
| 712 | * associated with the object. | ||
| 713 | */ | ||
| 714 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 715 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 716 | void * _Nullable | ||
| 717 | xpc_connection_get_context(xpc_connection_t connection); | ||
| 718 | |||
| 719 | /*! | ||
| 720 | * @function xpc_connection_set_finalizer_f | ||
| 721 | * Sets the finalizer for the given connection. | ||
| 722 | * | ||
| 723 | * @param connection | ||
| 724 | * The connection on which to set the finalizer. | ||
| 725 | * | ||
| 726 | * @param finalizer | ||
| 727 | * The function that will be invoked when the connection's retain count has | ||
| 728 | * dropped to zero and is being torn down. | ||
| 729 | * | ||
| 730 | * @discussion | ||
| 731 | * This method disposes of the context value associated with a connection, as | ||
| 732 | * set by {@link xpc_connection_set_context}. | ||
| 733 | * | ||
| 734 | * For many uses of context objects, this API allows for a convenient shorthand | ||
| 735 | * for freeing them. For example, for a context object allocated with malloc(3): | ||
| 736 | * | ||
| 737 | * xpc_connection_set_finalizer_f(object, free); | ||
| 738 | */ | ||
| 739 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 740 | XPC_EXPORT XPC_NONNULL1 | ||
| 741 | void | ||
| 742 | xpc_connection_set_finalizer_f(xpc_connection_t connection, | ||
| 743 | 	xpc_finalizer_t _Nullable finalizer); | ||
| 744 | |||
| 745 | __END_DECLS | ||
| 746 | XPC_ASSUME_NONNULL_END | ||
| 747 | |||
| 748 | #endif // __XPC_CONNECTION_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/AssertMacros.h deleted-1446| ... | @@ -1,1446 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2002-2017 by Apple Inc.. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | |||
| 25 | /* | ||
| 26 | 	File: AssertMacros.h | ||
| 27 | |||
| 28 | 	Contains: This file defines structured error handling and assertion macros for | ||
| 29 | 				programming in C. Originally used in QuickDraw GX and later enhanced. | ||
| 30 | 				These macros are used throughout Apple's software. | ||
| 31 | 	 | ||
| 32 | 				New code may not want to begin adopting these macros and instead use | ||
| 33 | 				existing language functionality. | ||
| 34 | 	 | ||
| 35 | 				See "Living In an Exceptional World" by Sean Parent | ||
| 36 | 				(develop, The Apple Technical Journal, Issue 11, August/September 1992) | ||
| 37 | 				<http://developer.apple.com/dev/techsupport/develop/issue11toc.shtml> or | ||
| 38 | 				<http://www.mactech.com/articles/develop/issue_11/Parent_final.html> | ||
| 39 | 				for the methodology behind these error handling and assertion macros. | ||
| 40 | 	 | ||
| 41 | 	Bugs?: For bug reports, consult the following page on | ||
| 42 | 				the World Wide Web: | ||
| 43 | |||
| 44 | 	 http://developer.apple.com/bugreporter/ | ||
| 45 | */ | ||
| 46 | #ifndef __ASSERTMACROS__ | ||
| 47 | #define __ASSERTMACROS__ | ||
| 48 | |||
| 49 | #ifdef DEBUG_ASSERT_CONFIG_INCLUDE | ||
| 50 | #include DEBUG_ASSERT_CONFIG_INCLUDE | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* | ||
| 54 | * Macro overview: | ||
| 55 | * | ||
| 56 | * check(assertion) | ||
| 57 | * In production builds, pre-processed away | ||
| 58 | * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 59 | * | ||
| 60 | * verify(assertion) | ||
| 61 | * In production builds, evaluates assertion and does nothing | ||
| 62 | * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 63 | * | ||
| 64 | * require(assertion, exceptionLabel) | ||
| 65 | * In production builds, if the assertion expression evaluates to false, goto exceptionLabel | ||
| 66 | * In debug builds, if the assertion expression evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 67 | * and jumps to exceptionLabel | ||
| 68 | * | ||
| 69 | * In addition the following suffixes are available: | ||
| 70 | * | ||
| 71 | * _noerr Adds "!= 0" to assertion. Useful for asserting and OSStatus or OSErr is noErr (zero) | ||
| 72 | * _action Adds statement to be executued if assertion fails | ||
| 73 | * _quiet Suppress call to DEBUG_ASSERT_MESSAGE | ||
| 74 | * _string Allows you to add explanitory message to DEBUG_ASSERT_MESSAGE | ||
| 75 | * | ||
| 76 | * For instance, require_noerr_string(resultCode, label, msg) will do nothing if | ||
| 77 | * resultCode is zero, otherwise it will call DEBUG_ASSERT_MESSAGE with msg | ||
| 78 | * and jump to label. | ||
| 79 | * | ||
| 80 | * Configuration: | ||
| 81 | * | ||
| 82 | * By default all macros generate "production code" (i.e non-debug). If | ||
| 83 | * DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero | ||
| 84 | * while this header is included, the macros will generated debug code. | ||
| 85 | * | ||
| 86 | * If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will | ||
| 87 | * be prefixed with it. | ||
| 88 | * | ||
| 89 | * By default, all messages write to stderr. If you would like to write a custom | ||
| 90 | * error message formater, defined DEBUG_ASSERT_MESSAGE to your function name. | ||
| 91 | * | ||
| 92 | * Each individual macro will only be defined if it is not already defined, so | ||
| 93 | * you can redefine their behavior singly by providing your own definition before | ||
| 94 | * this file is included. | ||
| 95 | * | ||
| 96 | * If you define __ASSERTMACROS__ before this file is included, then nothing in | ||
| 97 | * this file will take effect. | ||
| 98 | * | ||
| 99 | * Prior to Mac OS X 10.6 the macro names used in this file conflicted with some | ||
| 100 | * user code, including libraries in boost and the proposed C++ standards efforts, | ||
| 101 | * and there was no way for a client of this header to resolve this conflict. Because | ||
| 102 | * of this, most of the macros have been changed so that they are prefixed with | ||
| 103 | * __ and contain at least one capital letter, which should alleviate the current | ||
| 104 | * and future conflicts. However, to allow current sources to continue to compile, | ||
| 105 | * compatibility macros are defined at the end with the old names. A tops script | ||
| 106 | * at the end of this file will convert all of the old macro names used in a directory | ||
| 107 | * to the new names. Clients are recommended to migrate over to these new macros as | ||
| 108 | * they update their sources because a future release of Mac OS X will remove the | ||
| 109 | * old macro definitions ( without the double-underscore prefix ). Clients who | ||
| 110 | * want to compile without the old macro definitions can define the macro | ||
| 111 | * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before this file is | ||
| 112 | * included. | ||
| 113 | */ | ||
| 114 | |||
| 115 | |||
| 116 | /* | ||
| 117 | * Before including this file, #define DEBUG_ASSERT_COMPONENT_NAME_STRING to | ||
| 118 | * a C-string containing the name of your client. This string will be passed to | ||
| 119 | * the DEBUG_ASSERT_MESSAGE macro for inclusion in any assertion messages. | ||
| 120 | * | ||
| 121 | * If you do not define DEBUG_ASSERT_COMPONENT_NAME_STRING, the default | ||
| 122 | * DEBUG_ASSERT_COMPONENT_NAME_STRING value, an empty string, will be used by | ||
| 123 | * the assertion macros. | ||
| 124 | */ | ||
| 125 | #ifndef DEBUG_ASSERT_COMPONENT_NAME_STRING | ||
| 126 | #define DEBUG_ASSERT_COMPONENT_NAME_STRING "" | ||
| 127 | #endif | ||
| 128 | |||
| 129 | |||
| 130 | /* | ||
| 131 | * To activate the additional assertion code and messages for non-production builds, | ||
| 132 | * #define DEBUG_ASSERT_PRODUCTION_CODE to zero before including this file. | ||
| 133 | * | ||
| 134 | * If you do not define DEBUG_ASSERT_PRODUCTION_CODE, the default value 1 will be used | ||
| 135 | * (production code = no assertion code and no messages). | ||
| 136 | */ | ||
| 137 | #ifndef DEBUG_ASSERT_PRODUCTION_CODE | ||
| 138 | #define DEBUG_ASSERT_PRODUCTION_CODE !DEBUG | ||
| 139 | #endif | ||
| 140 | |||
| 141 | |||
| 142 | /* | ||
| 143 | * DEBUG_ASSERT_MESSAGE(component, assertion, label, error, file, line, errorCode) | ||
| 144 | * | ||
| 145 | * Summary: | ||
| 146 | * All assertion messages are routed through this macro. If you wish to use your | ||
| 147 | * own routine to display assertion messages, you can override DEBUG_ASSERT_MESSAGE | ||
| 148 | * by #defining DEBUG_ASSERT_MESSAGE before including this file. | ||
| 149 | * | ||
| 150 | * Parameters: | ||
| 151 | * | ||
| 152 | * componentNameString: | ||
| 153 | * A pointer to a string constant containing the name of the | ||
| 154 | * component this code is part of. This must be a string constant | ||
| 155 | * (and not a string variable or NULL) because the preprocessor | ||
| 156 | * concatenates it with other string constants. | ||
| 157 | * | ||
| 158 | * assertionString: | ||
| 159 | * A pointer to a string constant containing the assertion. | ||
| 160 | * This must be a string constant (and not a string variable or | ||
| 161 | * NULL) because the Preprocessor concatenates it with other | ||
| 162 | * string constants. | ||
| 163 | * | ||
| 164 | * exceptionLabelString: | ||
| 165 | * A pointer to a string containing the exceptionLabel, or NULL. | ||
| 166 | * | ||
| 167 | * errorString: | ||
| 168 | * A pointer to the error string, or NULL. DEBUG_ASSERT_MESSAGE macros | ||
| 169 | * must not attempt to concatenate this string with constant | ||
| 170 | * character strings. | ||
| 171 | * | ||
| 172 | * fileName: | ||
| 173 | * A pointer to the fileName or pathname (generated by the | ||
| 174 | * preprocessor __FILE__ identifier), or NULL. | ||
| 175 | * | ||
| 176 | * lineNumber: | ||
| 177 | * The line number in the file (generated by the preprocessor | ||
| 178 | * __LINE__ identifier), or 0 (zero). | ||
| 179 | * | ||
| 180 | * errorCode: | ||
| 181 | * A value associated with the assertion, or 0. | ||
| 182 | * | ||
| 183 | * Here is an example of a DEBUG_ASSERT_MESSAGE macro and a routine which displays | ||
| 184 | * assertion messsages: | ||
| 185 | * | ||
| 186 | * #define DEBUG_ASSERT_COMPONENT_NAME_STRING "MyCoolProgram" | ||
| 187 | * | ||
| 188 | * #define DEBUG_ASSERT_MESSAGE(componentNameString, assertionString, \ | ||
| 189 | * exceptionLabelString, errorString, fileName, lineNumber, errorCode) \ | ||
| 190 | * MyProgramDebugAssert(componentNameString, assertionString, \ | ||
| 191 | * exceptionLabelString, errorString, fileName, lineNumber, errorCode) | ||
| 192 | * | ||
| 193 | * static void | ||
| 194 | * MyProgramDebugAssert(const char *componentNameString, const char *assertionString, | ||
| 195 | * const char *exceptionLabelString, const char *errorString, | ||
| 196 | * const char *fileName, long lineNumber, int errorCode) | ||
| 197 | * { | ||
| 198 | * if ( (assertionString != NULL) && (*assertionString != '\0') ) | ||
| 199 | * fprintf(stderr, "Assertion failed: %s: %s\n", componentNameString, assertionString); | ||
| 200 | * else | ||
| 201 | * fprintf(stderr, "Check failed: %s:\n", componentNameString); | ||
| 202 | * if ( exceptionLabelString != NULL ) | ||
| 203 | * fprintf(stderr, " %s\n", exceptionLabelString); | ||
| 204 | * if ( errorString != NULL ) | ||
| 205 | * fprintf(stderr, " %s\n", errorString); | ||
| 206 | * if ( fileName != NULL ) | ||
| 207 | * fprintf(stderr, " file: %s\n", fileName); | ||
| 208 | * if ( lineNumber != 0 ) | ||
| 209 | * fprintf(stderr, " line: %ld\n", lineNumber); | ||
| 210 | * if ( errorCode != 0 ) | ||
| 211 | * fprintf(stderr, " error: %d\n", errorCode); | ||
| 212 | * } | ||
| 213 | * | ||
| 214 | * If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used. | ||
| 215 | */ | ||
| 216 | #ifndef DEBUG_ASSERT_MESSAGE | ||
| 217 | #include <TargetConditionals.h> | ||
| 218 | #ifdef KERNEL | ||
| 219 | #include <libkern/libkern.h> | ||
| 220 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 221 | printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 222 | #elif TARGET_OS_DRIVERKIT | ||
| 223 | #include <os/log.h> | ||
| 224 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 225 | os_log(OS_LOG_DEFAULT, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 226 | #else | ||
| 227 | #include <stdio.h> | ||
| 228 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 229 | fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 230 | #endif | ||
| 231 | #endif | ||
| 232 | |||
| 233 | |||
| 234 | |||
| 235 | |||
| 236 | |||
| 237 | /* | ||
| 238 | * __Debug_String(message) | ||
| 239 | * | ||
| 240 | * Summary: | ||
| 241 | * Production builds: does nothing and produces no code. | ||
| 242 | * | ||
| 243 | * Non-production builds: call DEBUG_ASSERT_MESSAGE. | ||
| 244 | * | ||
| 245 | * Parameters: | ||
| 246 | * | ||
| 247 | * message: | ||
| 248 | * The C string to display. | ||
| 249 | * | ||
| 250 | */ | ||
| 251 | #ifndef __Debug_String | ||
| 252 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 253 | 	 #define __Debug_String(message) | ||
| 254 | 	#else | ||
| 255 | 	 #define __Debug_String(message) \ | ||
| 256 | 		 do \ | ||
| 257 | 		 { \ | ||
| 258 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 259 | 				 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 260 | 				 "", \ | ||
| 261 | 				 0, \ | ||
| 262 | 				 message, \ | ||
| 263 | 				 __FILE__, \ | ||
| 264 | 				 __LINE__, \ | ||
| 265 | 				 0); \ | ||
| 266 | 		 } while ( 0 ) | ||
| 267 | 	#endif | ||
| 268 | #endif | ||
| 269 | |||
| 270 | /* | ||
| 271 | * __Check(assertion) | ||
| 272 | * | ||
| 273 | * Summary: | ||
| 274 | * Production builds: does nothing and produces no code. | ||
| 275 | * | ||
| 276 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 277 | * call DEBUG_ASSERT_MESSAGE. | ||
| 278 | * | ||
| 279 | * Parameters: | ||
| 280 | * | ||
| 281 | * assertion: | ||
| 282 | * The assertion expression. | ||
| 283 | */ | ||
| 284 | #ifndef __Check | ||
| 285 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 286 | 	 #define __Check(assertion) | ||
| 287 | 	#else | ||
| 288 | 	 #define __Check(assertion) \ | ||
| 289 | 		 do \ | ||
| 290 | 		 { \ | ||
| 291 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 292 | 			 { \ | ||
| 293 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 294 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 295 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 296 | 			 } \ | ||
| 297 | 		 } while ( 0 ) | ||
| 298 | 	#endif | ||
| 299 | #endif | ||
| 300 | |||
| 301 | #ifndef __nCheck | ||
| 302 | 	#define __nCheck(assertion) __Check(!(assertion)) | ||
| 303 | #endif | ||
| 304 | |||
| 305 | /* | ||
| 306 | * __Check_String(assertion, message) | ||
| 307 | * | ||
| 308 | * Summary: | ||
| 309 | * Production builds: does nothing and produces no code. | ||
| 310 | * | ||
| 311 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 312 | * call DEBUG_ASSERT_MESSAGE. | ||
| 313 | * | ||
| 314 | * Parameters: | ||
| 315 | * | ||
| 316 | * assertion: | ||
| 317 | * The assertion expression. | ||
| 318 | * | ||
| 319 | * message: | ||
| 320 | * The C string to display. | ||
| 321 | */ | ||
| 322 | #ifndef __Check_String | ||
| 323 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 324 | 	 #define __Check_String(assertion, message) | ||
| 325 | 	#else | ||
| 326 | 	 #define __Check_String(assertion, message) \ | ||
| 327 | 		 do \ | ||
| 328 | 		 { \ | ||
| 329 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 330 | 			 { \ | ||
| 331 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 332 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 333 | 					 #assertion, 0, message, __FILE__, __LINE__, 0 ); \ | ||
| 334 | 			 } \ | ||
| 335 | 		 } while ( 0 ) | ||
| 336 | 	#endif | ||
| 337 | #endif | ||
| 338 | |||
| 339 | #ifndef __nCheck_String | ||
| 340 | 	#define __nCheck_String(assertion, message) __Check_String(!(assertion), message) | ||
| 341 | #endif | ||
| 342 | |||
| 343 | /* | ||
| 344 | * __Check_noErr(errorCode) | ||
| 345 | * | ||
| 346 | * Summary: | ||
| 347 | * Production builds: does nothing and produces no code. | ||
| 348 | * | ||
| 349 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 350 | * call DEBUG_ASSERT_MESSAGE. | ||
| 351 | * | ||
| 352 | * Parameters: | ||
| 353 | * | ||
| 354 | * errorCode: | ||
| 355 | * The errorCode expression to compare with 0. | ||
| 356 | */ | ||
| 357 | #ifndef __Check_noErr | ||
| 358 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 359 | 	 #define __Check_noErr(errorCode) | ||
| 360 | 	#else | ||
| 361 | 	 #define __Check_noErr(errorCode) \ | ||
| 362 | 		 do \ | ||
| 363 | 		 { \ | ||
| 364 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 365 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 366 | 			 { \ | ||
| 367 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 368 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 369 | 					 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 370 | 			 } \ | ||
| 371 | 		 } while ( 0 ) | ||
| 372 | 	#endif | ||
| 373 | #endif | ||
| 374 | |||
| 375 | /* | ||
| 376 | * __Check_noErr_String(errorCode, message) | ||
| 377 | * | ||
| 378 | * Summary: | ||
| 379 | * Production builds: check_noerr_string() does nothing and produces | ||
| 380 | * no code. | ||
| 381 | * | ||
| 382 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 383 | * call DEBUG_ASSERT_MESSAGE. | ||
| 384 | * | ||
| 385 | * Parameters: | ||
| 386 | * | ||
| 387 | * errorCode: | ||
| 388 | * The errorCode expression to compare to 0. | ||
| 389 | * | ||
| 390 | * message: | ||
| 391 | * The C string to display. | ||
| 392 | */ | ||
| 393 | #ifndef __Check_noErr_String | ||
| 394 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 395 | 	 #define __Check_noErr_String(errorCode, message) | ||
| 396 | 	#else | ||
| 397 | 	 #define __Check_noErr_String(errorCode, message) \ | ||
| 398 | 		 do \ | ||
| 399 | 		 { \ | ||
| 400 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 401 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 402 | 			 { \ | ||
| 403 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 404 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 405 | 					 #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 406 | 			 } \ | ||
| 407 | 		 } while ( 0 ) | ||
| 408 | 	#endif | ||
| 409 | #endif | ||
| 410 | |||
| 411 | /* | ||
| 412 | * __Verify(assertion) | ||
| 413 | * | ||
| 414 | * Summary: | ||
| 415 | * Production builds: evaluate the assertion expression, but ignore | ||
| 416 | * the result. | ||
| 417 | * | ||
| 418 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 419 | * call DEBUG_ASSERT_MESSAGE. | ||
| 420 | * | ||
| 421 | * Parameters: | ||
| 422 | * | ||
| 423 | * assertion: | ||
| 424 | * The assertion expression. | ||
| 425 | */ | ||
| 426 | #ifndef __Verify | ||
| 427 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 428 | 	 #define __Verify(assertion) \ | ||
| 429 | 		 do \ | ||
| 430 | 		 { \ | ||
| 431 | 			 if ( !(assertion) ) \ | ||
| 432 | 			 { \ | ||
| 433 | 			 } \ | ||
| 434 | 		 } while ( 0 ) | ||
| 435 | 	#else | ||
| 436 | 	 #define __Verify(assertion) \ | ||
| 437 | 		 do \ | ||
| 438 | 		 { \ | ||
| 439 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 440 | 			 { \ | ||
| 441 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 442 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 443 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 444 | 			 } \ | ||
| 445 | 		 } while ( 0 ) | ||
| 446 | 	#endif | ||
| 447 | #endif | ||
| 448 | |||
| 449 | #ifndef __nVerify | ||
| 450 | 	#define __nVerify(assertion)	__Verify(!(assertion)) | ||
| 451 | #endif | ||
| 452 | |||
| 453 | /* | ||
| 454 | * __Verify_String(assertion, message) | ||
| 455 | * | ||
| 456 | * Summary: | ||
| 457 | * Production builds: evaluate the assertion expression, but ignore | ||
| 458 | * the result. | ||
| 459 | * | ||
| 460 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 461 | * call DEBUG_ASSERT_MESSAGE. | ||
| 462 | * | ||
| 463 | * Parameters: | ||
| 464 | * | ||
| 465 | * assertion: | ||
| 466 | * The assertion expression. | ||
| 467 | * | ||
| 468 | * message: | ||
| 469 | * The C string to display. | ||
| 470 | */ | ||
| 471 | #ifndef __Verify_String | ||
| 472 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 473 | 	 #define __Verify_String(assertion, message) \ | ||
| 474 | 		 do \ | ||
| 475 | 		 { \ | ||
| 476 | 			 if ( !(assertion) ) \ | ||
| 477 | 			 { \ | ||
| 478 | 			 } \ | ||
| 479 | 		 } while ( 0 ) | ||
| 480 | 	#else | ||
| 481 | 	 #define __Verify_String(assertion, message) \ | ||
| 482 | 		 do \ | ||
| 483 | 		 { \ | ||
| 484 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 485 | 			 { \ | ||
| 486 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 487 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 488 | 					 #assertion, 0, message, __FILE__, __LINE__, 0 ); \ | ||
| 489 | 			 } \ | ||
| 490 | 		 } while ( 0 ) | ||
| 491 | 	#endif | ||
| 492 | #endif | ||
| 493 | |||
| 494 | #ifndef __nVerify_String | ||
| 495 | 	#define __nVerify_String(assertion, message) __Verify_String(!(assertion), message) | ||
| 496 | #endif | ||
| 497 | |||
| 498 | /* | ||
| 499 | * __Verify_noErr(errorCode) | ||
| 500 | * | ||
| 501 | * Summary: | ||
| 502 | * Production builds: evaluate the errorCode expression, but ignore | ||
| 503 | * the result. | ||
| 504 | * | ||
| 505 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 506 | * call DEBUG_ASSERT_MESSAGE. | ||
| 507 | * | ||
| 508 | * Parameters: | ||
| 509 | * | ||
| 510 | * errorCode: | ||
| 511 | * The expression to compare to 0. | ||
| 512 | */ | ||
| 513 | #ifndef __Verify_noErr | ||
| 514 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 515 | 	 #define __Verify_noErr(errorCode) \ | ||
| 516 | 		 do \ | ||
| 517 | 		 { \ | ||
| 518 | 			 if ( 0 != (errorCode) ) \ | ||
| 519 | 			 { \ | ||
| 520 | 			 } \ | ||
| 521 | 		 } while ( 0 ) | ||
| 522 | 	#else | ||
| 523 | 	 #define __Verify_noErr(errorCode) \ | ||
| 524 | 		 do \ | ||
| 525 | 		 { \ | ||
| 526 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 527 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 528 | 			 { \ | ||
| 529 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 530 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 531 | 					 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 532 | 			 } \ | ||
| 533 | 		 } while ( 0 ) | ||
| 534 | 	#endif | ||
| 535 | #endif | ||
| 536 | |||
| 537 | /* | ||
| 538 | * __Verify_noErr_String(errorCode, message) | ||
| 539 | * | ||
| 540 | * Summary: | ||
| 541 | * Production builds: evaluate the errorCode expression, but ignore | ||
| 542 | * the result. | ||
| 543 | * | ||
| 544 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 545 | * call DEBUG_ASSERT_MESSAGE. | ||
| 546 | * | ||
| 547 | * Parameters: | ||
| 548 | * | ||
| 549 | * errorCode: | ||
| 550 | * The expression to compare to 0. | ||
| 551 | * | ||
| 552 | * message: | ||
| 553 | * The C string to display. | ||
| 554 | */ | ||
| 555 | #ifndef __Verify_noErr_String | ||
| 556 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 557 | 	 #define __Verify_noErr_String(errorCode, message) \ | ||
| 558 | 		 do \ | ||
| 559 | 		 { \ | ||
| 560 | 			 if ( 0 != (errorCode) ) \ | ||
| 561 | 			 { \ | ||
| 562 | 			 } \ | ||
| 563 | 		 } while ( 0 ) | ||
| 564 | 	#else | ||
| 565 | 	 #define __Verify_noErr_String(errorCode, message) \ | ||
| 566 | 		 do \ | ||
| 567 | 		 { \ | ||
| 568 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 569 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 570 | 			 { \ | ||
| 571 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 572 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 573 | 					 #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 574 | 			 } \ | ||
| 575 | 		 } while ( 0 ) | ||
| 576 | 	#endif | ||
| 577 | #endif | ||
| 578 | |||
| 579 | /* | ||
| 580 | * __Verify_noErr_Action(errorCode, action) | ||
| 581 | * | ||
| 582 | * Summary: | ||
| 583 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 584 | * execute the action statement or compound statement (block). | ||
| 585 | * | ||
| 586 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 587 | * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound | ||
| 588 | * statement (block). | ||
| 589 | * | ||
| 590 | * Parameters: | ||
| 591 | * | ||
| 592 | * errorCode: | ||
| 593 | * The expression to compare to 0. | ||
| 594 | * | ||
| 595 | * action: | ||
| 596 | * The statement or compound statement (block). | ||
| 597 | */ | ||
| 598 | #ifndef __Verify_noErr_Action | ||
| 599 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 600 | 	 #define __Verify_noErr_Action(errorCode, action) \ | ||
| 601 | 		 if ( 0 != (errorCode) ) { \ | ||
| 602 | 			 action; \ | ||
| 603 | 		 } \ | ||
| 604 | 		 else do {} while (0) | ||
| 605 | 	#else | ||
| 606 | 	 #define __Verify_noErr_Action(errorCode, action) \ | ||
| 607 | do { \ | ||
| 608 | 		 long evalOnceErrorCode = (errorCode); \ | ||
| 609 | 		 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) { \ | ||
| 610 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 611 | 				 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 612 | 				 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 613 | 			 action; \ | ||
| 614 | 		 } \ | ||
| 615 | 	 } while (0) | ||
| 616 | 	#endif | ||
| 617 | #endif | ||
| 618 | |||
| 619 | /* | ||
| 620 | * __Verify_Action(assertion, action) | ||
| 621 | * | ||
| 622 | * Summary: | ||
| 623 | * Production builds: if the assertion expression evaluates to false, | ||
| 624 | * then execute the action statement or compound statement (block). | ||
| 625 | * | ||
| 626 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 627 | * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound | ||
| 628 | * statement (block). | ||
| 629 | * | ||
| 630 | * Parameters: | ||
| 631 | * | ||
| 632 | * assertion: | ||
| 633 | * The assertion expression. | ||
| 634 | * | ||
| 635 | * action: | ||
| 636 | * The statement or compound statement (block). | ||
| 637 | */ | ||
| 638 | #ifndef __Verify_Action | ||
| 639 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 640 | 	 #define __Verify_Action(assertion, action) \ | ||
| 641 | 		 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 642 | 			action; \ | ||
| 643 | 		 } \ | ||
| 644 | 		 else do {} while (0) | ||
| 645 | 	#else | ||
| 646 | 	 #define __Verify_Action(assertion, action) \ | ||
| 647 | 		 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 648 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 649 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 650 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 651 | 			 action; \ | ||
| 652 | 		 } \ | ||
| 653 | 		 else do {} while (0) | ||
| 654 | 	#endif | ||
| 655 | #endif | ||
| 656 | |||
| 657 | /* | ||
| 658 | * __Require(assertion, exceptionLabel) | ||
| 659 | * | ||
| 660 | * Summary: | ||
| 661 | * Production builds: if the assertion expression evaluates to false, | ||
| 662 | * goto exceptionLabel. | ||
| 663 | * | ||
| 664 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 665 | * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. | ||
| 666 | * | ||
| 667 | * Parameters: | ||
| 668 | * | ||
| 669 | * assertion: | ||
| 670 | * The assertion expression. | ||
| 671 | * | ||
| 672 | * exceptionLabel: | ||
| 673 | * The label. | ||
| 674 | */ | ||
| 675 | #ifndef __Require | ||
| 676 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 677 | 	 #define __Require(assertion, exceptionLabel) \ | ||
| 678 | 		 do \ | ||
| 679 | 		 { \ | ||
| 680 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 681 | 			 { \ | ||
| 682 | 				 goto exceptionLabel; \ | ||
| 683 | 			 } \ | ||
| 684 | 		 } while ( 0 ) | ||
| 685 | 	#else | ||
| 686 | 	 #define __Require(assertion, exceptionLabel) \ | ||
| 687 | 		 do \ | ||
| 688 | 		 { \ | ||
| 689 | 			 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 690 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 691 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 692 | 					 #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ | ||
| 693 | 				 goto exceptionLabel; \ | ||
| 694 | 			 } \ | ||
| 695 | 		 } while ( 0 ) | ||
| 696 | 	#endif | ||
| 697 | #endif | ||
| 698 | |||
| 699 | #ifndef __nRequire | ||
| 700 | 	#define __nRequire(assertion, exceptionLabel) __Require(!(assertion), exceptionLabel) | ||
| 701 | #endif | ||
| 702 | |||
| 703 | /* | ||
| 704 | * __Require_Action(assertion, exceptionLabel, action) | ||
| 705 | * | ||
| 706 | * Summary: | ||
| 707 | * Production builds: if the assertion expression evaluates to false, | ||
| 708 | * execute the action statement or compound statement (block) and then | ||
| 709 | * goto exceptionLabel. | ||
| 710 | * | ||
| 711 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 712 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 713 | * statement (block), and then goto exceptionLabel. | ||
| 714 | * | ||
| 715 | * Parameters: | ||
| 716 | * | ||
| 717 | * assertion: | ||
| 718 | * The assertion expression. | ||
| 719 | * | ||
| 720 | * exceptionLabel: | ||
| 721 | * The label. | ||
| 722 | * | ||
| 723 | * action: | ||
| 724 | * The statement or compound statement (block). | ||
| 725 | */ | ||
| 726 | #ifndef __Require_Action | ||
| 727 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 728 | 	 #define __Require_Action(assertion, exceptionLabel, action) \ | ||
| 729 | 		 do \ | ||
| 730 | 		 { \ | ||
| 731 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 732 | 			 { \ | ||
| 733 | 				 { \ | ||
| 734 | 					 action; \ | ||
| 735 | 				 } \ | ||
| 736 | 				 goto exceptionLabel; \ | ||
| 737 | 			 } \ | ||
| 738 | 		 } while ( 0 ) | ||
| 739 | 	#else | ||
| 740 | 	 #define __Require_Action(assertion, exceptionLabel, action) \ | ||
| 741 | 		 do \ | ||
| 742 | 		 { \ | ||
| 743 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 744 | 			 { \ | ||
| 745 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 746 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 747 | 					 #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ | ||
| 748 | 				 { \ | ||
| 749 | 					 action; \ | ||
| 750 | 				 } \ | ||
| 751 | 				 goto exceptionLabel; \ | ||
| 752 | 			 } \ | ||
| 753 | 		 } while ( 0 ) | ||
| 754 | 	#endif | ||
| 755 | #endif | ||
| 756 | |||
| 757 | #ifndef __nRequire_Action | ||
| 758 | 	#define __nRequire_Action(assertion, exceptionLabel, action) \ | ||
| 759 | 	__Require_Action(!(assertion), exceptionLabel, action) | ||
| 760 | #endif | ||
| 761 | |||
| 762 | /* | ||
| 763 | * __Require_Quiet(assertion, exceptionLabel) | ||
| 764 | * | ||
| 765 | * Summary: | ||
| 766 | * If the assertion expression evaluates to false, goto exceptionLabel. | ||
| 767 | * | ||
| 768 | * Parameters: | ||
| 769 | * | ||
| 770 | * assertion: | ||
| 771 | * The assertion expression. | ||
| 772 | * | ||
| 773 | * exceptionLabel: | ||
| 774 | * The label. | ||
| 775 | */ | ||
| 776 | #ifndef __Require_Quiet | ||
| 777 | 	#define __Require_Quiet(assertion, exceptionLabel) \ | ||
| 778 | 	 do \ | ||
| 779 | 	 { \ | ||
| 780 | 		 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 781 | 		 { \ | ||
| 782 | 			 goto exceptionLabel; \ | ||
| 783 | 		 } \ | ||
| 784 | 	 } while ( 0 ) | ||
| 785 | #endif | ||
| 786 | |||
| 787 | #ifndef __nRequire_Quiet | ||
| 788 | 	#define __nRequire_Quiet(assertion, exceptionLabel) __Require_Quiet(!(assertion), exceptionLabel) | ||
| 789 | #endif | ||
| 790 | |||
| 791 | /* | ||
| 792 | * __Require_Action_Quiet(assertion, exceptionLabel, action) | ||
| 793 | * | ||
| 794 | * Summary: | ||
| 795 | * If the assertion expression evaluates to false, execute the action | ||
| 796 | * statement or compound statement (block), and goto exceptionLabel. | ||
| 797 | * | ||
| 798 | * Parameters: | ||
| 799 | * | ||
| 800 | * assertion: | ||
| 801 | * The assertion expression. | ||
| 802 | * | ||
| 803 | * exceptionLabel: | ||
| 804 | * The label. | ||
| 805 | * | ||
| 806 | * action: | ||
| 807 | * The statement or compound statement (block). | ||
| 808 | */ | ||
| 809 | #ifndef __Require_Action_Quiet | ||
| 810 | 	#define __Require_Action_Quiet(assertion, exceptionLabel, action) \ | ||
| 811 | 	 do \ | ||
| 812 | 	 { \ | ||
| 813 | 		 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 814 | 		 { \ | ||
| 815 | 			 { \ | ||
| 816 | 				 action; \ | ||
| 817 | 			 } \ | ||
| 818 | 			 goto exceptionLabel; \ | ||
| 819 | 		 } \ | ||
| 820 | 	 } while ( 0 ) | ||
| 821 | #endif | ||
| 822 | |||
| 823 | #ifndef __nRequire_Action_Quiet | ||
| 824 | 	#define __nRequire_Action_Quiet(assertion, exceptionLabel, action) \ | ||
| 825 | 		__Require_Action_Quiet(!(assertion), exceptionLabel, action) | ||
| 826 | #endif | ||
| 827 | |||
| 828 | /* | ||
| 829 | * __Require_String(assertion, exceptionLabel, message) | ||
| 830 | * | ||
| 831 | * Summary: | ||
| 832 | * Production builds: if the assertion expression evaluates to false, | ||
| 833 | * goto exceptionLabel. | ||
| 834 | * | ||
| 835 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 836 | * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. | ||
| 837 | * | ||
| 838 | * Parameters: | ||
| 839 | * | ||
| 840 | * assertion: | ||
| 841 | * The assertion expression. | ||
| 842 | * | ||
| 843 | * exceptionLabel: | ||
| 844 | * The label. | ||
| 845 | * | ||
| 846 | * message: | ||
| 847 | * The C string to display. | ||
| 848 | */ | ||
| 849 | #ifndef __Require_String | ||
| 850 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 851 | 	 #define __Require_String(assertion, exceptionLabel, message) \ | ||
| 852 | 		 do \ | ||
| 853 | 		 { \ | ||
| 854 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 855 | 			 { \ | ||
| 856 | 				 goto exceptionLabel; \ | ||
| 857 | 			 } \ | ||
| 858 | 		 } while ( 0 ) | ||
| 859 | 	#else | ||
| 860 | 	 #define __Require_String(assertion, exceptionLabel, message) \ | ||
| 861 | 		 do \ | ||
| 862 | 		 { \ | ||
| 863 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 864 | 			 { \ | ||
| 865 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 866 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 867 | 					 #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ | ||
| 868 | 				 goto exceptionLabel; \ | ||
| 869 | 			 } \ | ||
| 870 | 		 } while ( 0 ) | ||
| 871 | 	#endif | ||
| 872 | #endif | ||
| 873 | |||
| 874 | #ifndef __nRequire_String | ||
| 875 | 	#define __nRequire_String(assertion, exceptionLabel, string) \ | ||
| 876 | 		__Require_String(!(assertion), exceptionLabel, string) | ||
| 877 | #endif | ||
| 878 | |||
| 879 | /* | ||
| 880 | * __Require_Action_String(assertion, exceptionLabel, action, message) | ||
| 881 | * | ||
| 882 | * Summary: | ||
| 883 | * Production builds: if the assertion expression evaluates to false, | ||
| 884 | * execute the action statement or compound statement (block), and then | ||
| 885 | * goto exceptionLabel. | ||
| 886 | * | ||
| 887 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 888 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 889 | * statement (block), and then goto exceptionLabel. | ||
| 890 | * | ||
| 891 | * Parameters: | ||
| 892 | * | ||
| 893 | * assertion: | ||
| 894 | * The assertion expression. | ||
| 895 | * | ||
| 896 | * exceptionLabel: | ||
| 897 | * The label. | ||
| 898 | * | ||
| 899 | * action: | ||
| 900 | * The statement or compound statement (block). | ||
| 901 | * | ||
| 902 | * message: | ||
| 903 | * The C string to display. | ||
| 904 | */ | ||
| 905 | #ifndef __Require_Action_String | ||
| 906 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 907 | 	 #define __Require_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 908 | 		 do \ | ||
| 909 | 		 { \ | ||
| 910 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 911 | 			 { \ | ||
| 912 | 				 { \ | ||
| 913 | 					 action; \ | ||
| 914 | 				 } \ | ||
| 915 | 				 goto exceptionLabel; \ | ||
| 916 | 			 } \ | ||
| 917 | 		 } while ( 0 ) | ||
| 918 | 	#else | ||
| 919 | 	 #define __Require_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 920 | 		 do \ | ||
| 921 | 		 { \ | ||
| 922 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 923 | 			 { \ | ||
| 924 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 925 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 926 | 					 #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ | ||
| 927 | 				 { \ | ||
| 928 | 					 action; \ | ||
| 929 | 				 } \ | ||
| 930 | 				 goto exceptionLabel; \ | ||
| 931 | 			 } \ | ||
| 932 | 		 } while ( 0 ) | ||
| 933 | 	#endif | ||
| 934 | #endif | ||
| 935 | |||
| 936 | #ifndef __nRequire_Action_String | ||
| 937 | 	#define __nRequire_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 938 | 		__Require_Action_String(!(assertion), exceptionLabel, action, message) | ||
| 939 | #endif | ||
| 940 | |||
| 941 | /* | ||
| 942 | * __Require_noErr(errorCode, exceptionLabel) | ||
| 943 | * | ||
| 944 | * Summary: | ||
| 945 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 946 | * goto exceptionLabel. | ||
| 947 | * | ||
| 948 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 949 | * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. | ||
| 950 | * | ||
| 951 | * Parameters: | ||
| 952 | * | ||
| 953 | * errorCode: | ||
| 954 | * The expression to compare to 0. | ||
| 955 | * | ||
| 956 | * exceptionLabel: | ||
| 957 | * The label. | ||
| 958 | */ | ||
| 959 | #ifndef __Require_noErr | ||
| 960 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 961 | 	 #define __Require_noErr(errorCode, exceptionLabel) \ | ||
| 962 | 		 do \ | ||
| 963 | 		 { \ | ||
| 964 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 965 | 			 { \ | ||
| 966 | 				 goto exceptionLabel; \ | ||
| 967 | 			 } \ | ||
| 968 | 		 } while ( 0 ) | ||
| 969 | 	#else | ||
| 970 | 	 #define __Require_noErr(errorCode, exceptionLabel) \ | ||
| 971 | 		 do \ | ||
| 972 | 		 { \ | ||
| 973 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 974 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 975 | 			 { \ | ||
| 976 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 977 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 978 | 					 #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 979 | 				 goto exceptionLabel; \ | ||
| 980 | 			 } \ | ||
| 981 | 		 } while ( 0 ) | ||
| 982 | 	#endif | ||
| 983 | #endif | ||
| 984 | |||
| 985 | /* | ||
| 986 | * __Require_noErr_Action(errorCode, exceptionLabel, action) | ||
| 987 | * | ||
| 988 | * Summary: | ||
| 989 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 990 | * execute the action statement or compound statement (block) and | ||
| 991 | * goto exceptionLabel. | ||
| 992 | * | ||
| 993 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 994 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or | ||
| 995 | * compound statement (block), and then goto exceptionLabel. | ||
| 996 | * | ||
| 997 | * Parameters: | ||
| 998 | * | ||
| 999 | * errorCode: | ||
| 1000 | * The expression to compare to 0. | ||
| 1001 | * | ||
| 1002 | * exceptionLabel: | ||
| 1003 | * The label. | ||
| 1004 | * | ||
| 1005 | * action: | ||
| 1006 | * The statement or compound statement (block). | ||
| 1007 | */ | ||
| 1008 | #ifndef __Require_noErr_Action | ||
| 1009 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1010 | 	 #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ | ||
| 1011 | 		 do \ | ||
| 1012 | 		 { \ | ||
| 1013 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1014 | 			 { \ | ||
| 1015 | 				 { \ | ||
| 1016 | 					 action; \ | ||
| 1017 | 				 } \ | ||
| 1018 | 				 goto exceptionLabel; \ | ||
| 1019 | 			 } \ | ||
| 1020 | 		 } while ( 0 ) | ||
| 1021 | 	#else | ||
| 1022 | 	 #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ | ||
| 1023 | 		 do \ | ||
| 1024 | 		 { \ | ||
| 1025 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1026 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1027 | 			 { \ | ||
| 1028 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1029 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1030 | 					 #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1031 | 				 { \ | ||
| 1032 | 					 action; \ | ||
| 1033 | 				 } \ | ||
| 1034 | 				 goto exceptionLabel; \ | ||
| 1035 | 			 } \ | ||
| 1036 | 		 } while ( 0 ) | ||
| 1037 | 	#endif | ||
| 1038 | #endif | ||
| 1039 | |||
| 1040 | /* | ||
| 1041 | * __Require_noErr_Quiet(errorCode, exceptionLabel) | ||
| 1042 | * | ||
| 1043 | * Summary: | ||
| 1044 | * If the errorCode expression does not equal 0 (noErr), | ||
| 1045 | * goto exceptionLabel. | ||
| 1046 | * | ||
| 1047 | * Parameters: | ||
| 1048 | * | ||
| 1049 | * errorCode: | ||
| 1050 | * The expression to compare to 0. | ||
| 1051 | * | ||
| 1052 | * exceptionLabel: | ||
| 1053 | * The label. | ||
| 1054 | */ | ||
| 1055 | #ifndef __Require_noErr_Quiet | ||
| 1056 | 	#define __Require_noErr_Quiet(errorCode, exceptionLabel) \ | ||
| 1057 | 	 do \ | ||
| 1058 | 	 { \ | ||
| 1059 | 		 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1060 | 		 { \ | ||
| 1061 | 			 goto exceptionLabel; \ | ||
| 1062 | 		 } \ | ||
| 1063 | 	 } while ( 0 ) | ||
| 1064 | #endif | ||
| 1065 | |||
| 1066 | /* | ||
| 1067 | * __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) | ||
| 1068 | * | ||
| 1069 | * Summary: | ||
| 1070 | * If the errorCode expression does not equal 0 (noErr), | ||
| 1071 | * execute the action statement or compound statement (block) and | ||
| 1072 | * goto exceptionLabel. | ||
| 1073 | * | ||
| 1074 | * Parameters: | ||
| 1075 | * | ||
| 1076 | * errorCode: | ||
| 1077 | * The expression to compare to 0. | ||
| 1078 | * | ||
| 1079 | * exceptionLabel: | ||
| 1080 | * The label. | ||
| 1081 | * | ||
| 1082 | * action: | ||
| 1083 | * The statement or compound statement (block). | ||
| 1084 | */ | ||
| 1085 | #ifndef __Require_noErr_Action_Quiet | ||
| 1086 | 	#define __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) \ | ||
| 1087 | 	 do \ | ||
| 1088 | 	 { \ | ||
| 1089 | 		 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1090 | 		 { \ | ||
| 1091 | 			 { \ | ||
| 1092 | 				 action; \ | ||
| 1093 | 			 } \ | ||
| 1094 | 			 goto exceptionLabel; \ | ||
| 1095 | 		 } \ | ||
| 1096 | 	 } while ( 0 ) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | /* | ||
| 1100 | * __Require_noErr_String(errorCode, exceptionLabel, message) | ||
| 1101 | * | ||
| 1102 | * Summary: | ||
| 1103 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1104 | * goto exceptionLabel. | ||
| 1105 | * | ||
| 1106 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1107 | * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. | ||
| 1108 | * | ||
| 1109 | * Parameters: | ||
| 1110 | * | ||
| 1111 | * errorCode: | ||
| 1112 | * The expression to compare to 0. | ||
| 1113 | * | ||
| 1114 | * exceptionLabel: | ||
| 1115 | * The label. | ||
| 1116 | * | ||
| 1117 | * message: | ||
| 1118 | * The C string to display. | ||
| 1119 | */ | ||
| 1120 | #ifndef __Require_noErr_String | ||
| 1121 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1122 | 	 #define __Require_noErr_String(errorCode, exceptionLabel, message) \ | ||
| 1123 | 		 do \ | ||
| 1124 | 		 { \ | ||
| 1125 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1126 | 			 { \ | ||
| 1127 | 				 goto exceptionLabel; \ | ||
| 1128 | 			 } \ | ||
| 1129 | 		 } while ( 0 ) | ||
| 1130 | 	#else | ||
| 1131 | 	 #define __Require_noErr_String(errorCode, exceptionLabel, message) \ | ||
| 1132 | 		 do \ | ||
| 1133 | 		 { \ | ||
| 1134 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1135 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1136 | 			 { \ | ||
| 1137 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1138 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1139 | 					 #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1140 | 				 goto exceptionLabel; \ | ||
| 1141 | 			 } \ | ||
| 1142 | 		 } while ( 0 ) | ||
| 1143 | 	#endif | ||
| 1144 | #endif | ||
| 1145 | |||
| 1146 | /* | ||
| 1147 | * __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) | ||
| 1148 | * | ||
| 1149 | * Summary: | ||
| 1150 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1151 | * execute the action statement or compound statement (block) and | ||
| 1152 | * goto exceptionLabel. | ||
| 1153 | * | ||
| 1154 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1155 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 1156 | * statement (block), and then goto exceptionLabel. | ||
| 1157 | * | ||
| 1158 | * Parameters: | ||
| 1159 | * | ||
| 1160 | * errorCode: | ||
| 1161 | * The expression to compare to 0. | ||
| 1162 | * | ||
| 1163 | * exceptionLabel: | ||
| 1164 | * The label. | ||
| 1165 | * | ||
| 1166 | * action: | ||
| 1167 | * The statement or compound statement (block). | ||
| 1168 | * | ||
| 1169 | * message: | ||
| 1170 | * The C string to display. | ||
| 1171 | */ | ||
| 1172 | #ifndef __Require_noErr_Action_String | ||
| 1173 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1174 | 	 #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ | ||
| 1175 | 		 do \ | ||
| 1176 | 		 { \ | ||
| 1177 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1178 | 			 { \ | ||
| 1179 | 				 { \ | ||
| 1180 | 					 action; \ | ||
| 1181 | 				 } \ | ||
| 1182 | 				 goto exceptionLabel; \ | ||
| 1183 | 			 } \ | ||
| 1184 | 		 } while ( 0 ) | ||
| 1185 | 	#else | ||
| 1186 | 	 #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ | ||
| 1187 | 		 do \ | ||
| 1188 | 		 { \ | ||
| 1189 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1190 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1191 | 			 { \ | ||
| 1192 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1193 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1194 | 					 #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1195 | 				 { \ | ||
| 1196 | 					 action; \ | ||
| 1197 | 				 } \ | ||
| 1198 | 				 goto exceptionLabel; \ | ||
| 1199 | 			 } \ | ||
| 1200 | 		 } while ( 0 ) | ||
| 1201 | 	#endif | ||
| 1202 | #endif | ||
| 1203 | |||
| 1204 | /* | ||
| 1205 | * __Check_Compile_Time(expr) | ||
| 1206 | * | ||
| 1207 | * Summary: | ||
| 1208 | * any build: if the expression is not true, generated a compile time error. | ||
| 1209 | * | ||
| 1210 | * Parameters: | ||
| 1211 | * | ||
| 1212 | * expr: | ||
| 1213 | * The compile time expression that should evaluate to non-zero. | ||
| 1214 | * | ||
| 1215 | * Discussion: | ||
| 1216 | * This declares an array with a size that is determined by a compile-time expression. | ||
| 1217 | * If false, it declares a negatively sized array, which generates a compile-time error. | ||
| 1218 | * | ||
| 1219 | * Examples: | ||
| 1220 | * __Check_Compile_Time( sizeof( int ) == 4 ); | ||
| 1221 | * __Check_Compile_Time( offsetof( MyStruct, myField ) == 4 ); | ||
| 1222 | * __Check_Compile_Time( ( kMyBufferSize % 512 ) == 0 ); | ||
| 1223 | * | ||
| 1224 | * Note: This only works with compile-time expressions. | ||
| 1225 | * Note: This only works in places where extern declarations are allowed (e.g. global scope). | ||
| 1226 | */ | ||
| 1227 | #ifndef __Check_Compile_Time | ||
| 1228 | #ifdef __GNUC__ | ||
| 1229 | #if (__cplusplus >= 201103L) | ||
| 1230 | #define __Check_Compile_Time( expr ) static_assert( expr , "__Check_Compile_Time") | ||
| 1231 | #elif (__STDC_VERSION__ >= 201112L) | ||
| 1232 | #define __Check_Compile_Time( expr ) _Static_assert( expr , "__Check_Compile_Time") | ||
| 1233 | #else | ||
| 1234 | #define __Check_Compile_Time( expr ) \ | ||
| 1235 | extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] __attribute__( ( unused ) ) | ||
| 1236 | #endif | ||
| 1237 | #else | ||
| 1238 | #define __Check_Compile_Time( expr ) \ | ||
| 1239 | extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] | ||
| 1240 | #endif | ||
| 1241 | #endif | ||
| 1242 | |||
| 1243 | /* | ||
| 1244 | *	For time immemorial, Mac OS X has defined version of most of these macros without the __ prefix, which | ||
| 1245 | *	could collide with similarly named functions or macros in user code, including new functionality in | ||
| 1246 | *	Boost and the C++ standard library. | ||
| 1247 | * | ||
| 1248 | * macOS High Sierra and iOS 11 will now require that clients move to the new macros as defined above. | ||
| 1249 | * | ||
| 1250 | * If you would like to enable the macros for use within your own project, you can define the | ||
| 1251 | * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES macro via an Xcode Build Configuration. | ||
| 1252 | * See "Add a build configuration (xcconfig) file" in Xcode Help. | ||
| 1253 | * | ||
| 1254 | * To aid users of these macros in converting their sources, the following tops script will convert usages | ||
| 1255 | * of the old macros into the new equivalents. To do so, in Terminal go into the directory containing the | ||
| 1256 | * sources to be converted and run this command. | ||
| 1257 | * | ||
| 1258 | find -E . -regex '.*\.(c|cc|cp|cpp|m|mm|h)' -print0 | xargs -0 tops -verbose \ | ||
| 1259 | replace "check(<b args>)" with "__Check(<args>)" \ | ||
| 1260 | replace "check_noerr(<b args>)" with "__Check_noErr(<args>)" \ | ||
| 1261 | replace "check_noerr_string(<b args>)" with "__Check_noErr_String(<args>)" \ | ||
| 1262 | replace "check_string(<b args>)" with "__Check_String(<args>)" \ | ||
| 1263 | replace "require(<b args>)" with "__Require(<args>)" \ | ||
| 1264 | replace "require_action(<b args>)" with "__Require_Action(<args>)" \ | ||
| 1265 | replace "require_action_string(<b args>)" with "__Require_Action_String(<args>)" \ | ||
| 1266 | replace "require_noerr(<b args>)" with "__Require_noErr(<args>)" \ | ||
| 1267 | replace "require_noerr_action(<b args>)" with "__Require_noErr_Action(<args>)" \ | ||
| 1268 | replace "require_noerr_action_string(<b args>)" with "__Require_noErr_Action_String(<args>)" \ | ||
| 1269 | replace "require_noerr_string(<b args>)" with "__Require_noErr_String(<args>)" \ | ||
| 1270 | replace "require_string(<b args>)" with "__Require_String(<args>)" \ | ||
| 1271 | replace "verify(<b args>)" with "__Verify(<args>)" \ | ||
| 1272 | replace "verify_action(<b args>)" with "__Verify_Action(<args>)" \ | ||
| 1273 | replace "verify_noerr(<b args>)" with "__Verify_noErr(<args>)" \ | ||
| 1274 | replace "verify_noerr_action(<b args>)" with "__Verify_noErr_Action(<args>)" \ | ||
| 1275 | replace "verify_noerr_string(<b args>)" with "__Verify_noErr_String(<args>)" \ | ||
| 1276 | replace "verify_string(<b args>)" with "__Verify_String(<args>)" \ | ||
| 1277 | replace "ncheck(<b args>)" with "__nCheck(<args>)" \ | ||
| 1278 | replace "ncheck_string(<b args>)" with "__nCheck_String(<args>)" \ | ||
| 1279 | replace "nrequire(<b args>)" with "__nRequire(<args>)" \ | ||
| 1280 | replace "nrequire_action(<b args>)" with "__nRequire_Action(<args>)" \ | ||
| 1281 | replace "nrequire_action_quiet(<b args>)" with "__nRequire_Action_Quiet(<args>)" \ | ||
| 1282 | replace "nrequire_action_string(<b args>)" with "__nRequire_Action_String(<args>)" \ | ||
| 1283 | replace "nrequire_quiet(<b args>)" with "__nRequire_Quiet(<args>)" \ | ||
| 1284 | replace "nrequire_string(<b args>)" with "__nRequire_String(<args>)" \ | ||
| 1285 | replace "nverify(<b args>)" with "__nVerify(<args>)" \ | ||
| 1286 | replace "nverify_string(<b args>)" with "__nVerify_String(<args>)" \ | ||
| 1287 | replace "require_action_quiet(<b args>)" with "__Require_Action_Quiet(<args>)" \ | ||
| 1288 | replace "require_noerr_action_quiet(<b args>)" with "__Require_noErr_Action_Quiet(<args>)" \ | ||
| 1289 | replace "require_noerr_quiet(<b args>)" with "__Require_noErr_Quiet(<args>)" \ | ||
| 1290 | replace "require_quiet(<b args>)" with "__Require_Quiet(<args>)" \ | ||
| 1291 | replace "check_compile_time(<b args>)" with "__Check_Compile_Time(<args>)" \ | ||
| 1292 | replace "debug_string(<b args>)" with "__Debug_String(<args>)" | ||
| 1293 | * | ||
| 1294 | */ | ||
| 1295 | |||
| 1296 | #ifndef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES | ||
| 1297 | #if __has_include(<AssertMacrosInternal.h>) | ||
| 1298 | #include <AssertMacrosInternal.h> | ||
| 1299 | #else | ||
| 1300 | /* In macOS High Sierra and iOS 11, if we haven't set this yet, it now defaults to off. */ | ||
| 1301 | #define	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES	0 | ||
| 1302 | #endif | ||
| 1303 | #endif | ||
| 1304 | |||
| 1305 | #if	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES | ||
| 1306 | |||
| 1307 | 	#ifndef check | ||
| 1308 | 	#define check(assertion) __Check(assertion) | ||
| 1309 | 	#endif | ||
| 1310 | |||
| 1311 | 	#ifndef check_noerr | ||
| 1312 | 	#define check_noerr(errorCode) __Check_noErr(errorCode) | ||
| 1313 | 	#endif | ||
| 1314 | |||
| 1315 | 	#ifndef check_noerr_string | ||
| 1316 | 		#define check_noerr_string(errorCode, message) __Check_noErr_String(errorCode, message) | ||
| 1317 | 	#endif | ||
| 1318 | |||
| 1319 | 	#ifndef check_string | ||
| 1320 | 		#define check_string(assertion, message) __Check_String(assertion, message) | ||
| 1321 | 	#endif | ||
| 1322 | |||
| 1323 | 	#ifndef require | ||
| 1324 | 		#define require(assertion, exceptionLabel) __Require(assertion, exceptionLabel) | ||
| 1325 | 	#endif | ||
| 1326 | |||
| 1327 | 	#ifndef require_action | ||
| 1328 | 		#define require_action(assertion, exceptionLabel, action) __Require_Action(assertion, exceptionLabel, action) | ||
| 1329 | 	#endif | ||
| 1330 | |||
| 1331 | 	#ifndef require_action_string | ||
| 1332 | 		#define require_action_string(assertion, exceptionLabel, action, message) __Require_Action_String(assertion, exceptionLabel, action, message) | ||
| 1333 | 	#endif | ||
| 1334 | |||
| 1335 | 	#ifndef require_noerr | ||
| 1336 | 		#define require_noerr(errorCode, exceptionLabel) __Require_noErr(errorCode, exceptionLabel) | ||
| 1337 | 	#endif | ||
| 1338 | |||
| 1339 | 	#ifndef require_noerr_action | ||
| 1340 | 		#define require_noerr_action(errorCode, exceptionLabel, action) __Require_noErr_Action(errorCode, exceptionLabel, action) | ||
| 1341 | 	#endif | ||
| 1342 | |||
| 1343 | 	#ifndef require_noerr_action_string | ||
| 1344 | 		#define require_noerr_action_string(errorCode, exceptionLabel, action, message) __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) | ||
| 1345 | 	#endif | ||
| 1346 | |||
| 1347 | 	#ifndef require_noerr_string | ||
| 1348 | 		#define require_noerr_string(errorCode, exceptionLabel, message) __Require_noErr_String(errorCode, exceptionLabel, message) | ||
| 1349 | 	#endif | ||
| 1350 | |||
| 1351 | 	#ifndef require_string | ||
| 1352 | 		#define require_string(assertion, exceptionLabel, message) __Require_String(assertion, exceptionLabel, message) | ||
| 1353 | 	#endif | ||
| 1354 | |||
| 1355 | 	#ifndef verify | ||
| 1356 | 		#define verify(assertion) __Verify(assertion) | ||
| 1357 | 	#endif | ||
| 1358 | |||
| 1359 | 	#ifndef verify_action | ||
| 1360 | 		#define verify_action(assertion, action) __Verify_Action(assertion, action) | ||
| 1361 | 	#endif | ||
| 1362 | |||
| 1363 | 	#ifndef verify_noerr | ||
| 1364 | 		#define verify_noerr(errorCode) __Verify_noErr(errorCode) | ||
| 1365 | 	#endif | ||
| 1366 | |||
| 1367 | 	#ifndef verify_noerr_action | ||
| 1368 | 		#define verify_noerr_action(errorCode, action) __Verify_noErr_Action(errorCode, action) | ||
| 1369 | 	#endif | ||
| 1370 | |||
| 1371 | 	#ifndef verify_noerr_string | ||
| 1372 | 		#define verify_noerr_string(errorCode, message) __Verify_noErr_String(errorCode, message) | ||
| 1373 | 	#endif | ||
| 1374 | |||
| 1375 | 	#ifndef verify_string | ||
| 1376 | 		#define verify_string(assertion, message) __Verify_String(assertion, message) | ||
| 1377 | 	#endif | ||
| 1378 | |||
| 1379 | 	#ifndef ncheck | ||
| 1380 | 		#define ncheck(assertion) __nCheck(assertion) | ||
| 1381 | 	#endif | ||
| 1382 | |||
| 1383 | 	#ifndef ncheck_string | ||
| 1384 | 		#define ncheck_string(assertion, message) __nCheck_String(assertion, message) | ||
| 1385 | 	#endif | ||
| 1386 | |||
| 1387 | 	#ifndef nrequire | ||
| 1388 | 		#define nrequire(assertion, exceptionLabel) __nRequire(assertion, exceptionLabel) | ||
| 1389 | 	#endif | ||
| 1390 | |||
| 1391 | 	#ifndef nrequire_action | ||
| 1392 | 		#define nrequire_action(assertion, exceptionLabel, action) __nRequire_Action(assertion, exceptionLabel, action) | ||
| 1393 | 	#endif | ||
| 1394 | |||
| 1395 | 	#ifndef nrequire_action_quiet | ||
| 1396 | 		#define nrequire_action_quiet(assertion, exceptionLabel, action) __nRequire_Action_Quiet(assertion, exceptionLabel, action) | ||
| 1397 | 	#endif | ||
| 1398 | |||
| 1399 | 	#ifndef nrequire_action_string | ||
| 1400 | 		#define nrequire_action_string(assertion, exceptionLabel, action, message) __nRequire_Action_String(assertion, exceptionLabel, action, message) | ||
| 1401 | 	#endif | ||
| 1402 | |||
| 1403 | 	#ifndef nrequire_quiet | ||
| 1404 | 		#define nrequire_quiet(assertion, exceptionLabel) __nRequire_Quiet(assertion, exceptionLabel) | ||
| 1405 | 	#endif | ||
| 1406 | |||
| 1407 | 	#ifndef nrequire_string | ||
| 1408 | 		#define nrequire_string(assertion, exceptionLabel, string) __nRequire_String(assertion, exceptionLabel, string) | ||
| 1409 | 	#endif | ||
| 1410 | |||
| 1411 | 	#ifndef nverify | ||
| 1412 | 		#define nverify(assertion) __nVerify(assertion) | ||
| 1413 | 	#endif | ||
| 1414 | |||
| 1415 | 	#ifndef nverify_string | ||
| 1416 | 		#define nverify_string(assertion, message) __nVerify_String(assertion, message) | ||
| 1417 | 	#endif | ||
| 1418 | |||
| 1419 | 	#ifndef require_action_quiet | ||
| 1420 | 		#define require_action_quiet(assertion, exceptionLabel, action) __Require_Action_Quiet(assertion, exceptionLabel, action) | ||
| 1421 | 	#endif | ||
| 1422 | |||
| 1423 | 	#ifndef require_noerr_action_quiet | ||
| 1424 | 		#define require_noerr_action_quiet(errorCode, exceptionLabel, action) __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) | ||
| 1425 | 	#endif | ||
| 1426 | |||
| 1427 | 	#ifndef require_noerr_quiet | ||
| 1428 | 		#define require_noerr_quiet(errorCode, exceptionLabel) __Require_noErr_Quiet(errorCode, exceptionLabel) | ||
| 1429 | 	#endif | ||
| 1430 | |||
| 1431 | 	#ifndef require_quiet | ||
| 1432 | 		#define require_quiet(assertion, exceptionLabel) __Require_Quiet(assertion, exceptionLabel) | ||
| 1433 | 	#endif | ||
| 1434 | |||
| 1435 | 	#ifndef check_compile_time | ||
| 1436 | 		#define check_compile_time( expr ) __Check_Compile_Time( expr ) | ||
| 1437 | 	#endif | ||
| 1438 | |||
| 1439 | 	#ifndef debug_string | ||
| 1440 | 		#define debug_string(message) __Debug_String(message) | ||
| 1441 | 	#endif | ||
| 1442 | 	 | ||
| 1443 | #endif	/* ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES */ | ||
| 1444 | |||
| 1445 | |||
| 1446 | #endif /* __ASSERTMACROS__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/AvailabilityInternal.h+5-5| ... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
| 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ | 55 | #ifdef __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ | 56 | /* compiler sets __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ when -mtvos-version-min is used */ |
| 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ | 57 | #define __TV_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ |
| 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_0 | 58 | #define __TV_OS_VERSION_MAX_ALLOWED __TVOS_15_4 |
| 59 | /* for compatibility with existing code. New code should use platform specific checks */ | 59 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 | 60 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 61 | #endif | 61 | #endif |
| ... | @@ -65,7 +65,7 @@ | ... | @@ -65,7 +65,7 @@ |
| 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ | 65 | #ifdef __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ | 66 | /* compiler sets __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ when -mwatchos-version-min is used */ |
| 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ | 67 | #define __WATCH_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ |
| 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_0 | 68 | #define __WATCH_OS_VERSION_MAX_ALLOWED __WATCHOS_8_5 |
| 69 | /* for compatibility with existing code. New code should use platform specific checks */ | 69 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 | 70 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 90000 |
| 71 | #endif | 71 | #endif |
| ... | @@ -75,7 +75,7 @@ | ... | @@ -75,7 +75,7 @@ |
| 75 | #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ | 75 | #ifdef __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 76 | 76 | ||
| 77 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ | 77 | #define __BRIDGE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ |
| 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 60000 | 78 | #define __BRIDGE_OS_VERSION_MAX_ALLOWED 60400 |
| 79 | /* for compatibility with existing code. New code should use platform specific checks */ | 79 | /* for compatibility with existing code. New code should use platform specific checks */ |
| 80 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000 | 80 | #define __IPHONE_OS_VERSION_MIN_REQUIRED 110000 |
| 81 | #endif | 81 | #endif |
| ... | @@ -90,14 +90,14 @@ | ... | @@ -90,14 +90,14 @@ |
| 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED | 90 | #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED |
| 91 | /* make sure a default max version is set */ | 91 | /* make sure a default max version is set */ |
| 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED | 92 | #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED |
| 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_0 | 93 | #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_12_3 |
| 94 | #endif | 94 | #endif |
| 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ | 95 | #endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */ |
| 96 | 96 | ||
| 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED | 97 | #ifdef __IPHONE_OS_VERSION_MIN_REQUIRED |
| 98 | /* make sure a default max version is set */ | 98 | /* make sure a default max version is set */ |
| 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED | 99 | #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED |
| 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_15_0 | 100 | #define __IPHONE_OS_VERSION_MAX_ALLOWED __IPHONE_15_4 |
| 101 | #endif | 101 | #endif |
| 102 | /* make sure a valid min is set */ | 102 | /* make sure a valid min is set */ |
| 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 | 103 | #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0 |
lib/libc/include/any-macos.12-any/AvailabilityMacros.h deleted-4016| ... | @@ -1,4016 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2001-2010 by Apple Inc.. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | /* | ||
| 25 | File: AvailabilityMacros.h | ||
| 26 | |||
| 27 | More Info: See the SDK Compatibility Guide | ||
| 28 | |||
| 29 | Contains: Autoconfiguration of AVAILABLE_ macros for Mac OS X | ||
| 30 | |||
| 31 | This header enables a developer to specify build time | ||
| 32 | constraints on what Mac OS X versions the resulting | ||
| 33 | application will be run. There are two bounds a developer | ||
| 34 | can specify: | ||
| 35 | |||
| 36 | MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 37 | MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 38 | |||
| 39 | The lower bound controls which calls to OS functions will | ||
| 40 | be weak-importing (allowed to be unresolved at launch time). | ||
| 41 | The upper bound controls which OS functionality, if used, | ||
| 42 | will result in a compiler error because that functionality is | ||
| 43 | not available on any OS in the specifed range. | ||
| 44 | |||
| 45 | For example, suppose an application is compiled with: | ||
| 46 | |||
| 47 | MAC_OS_X_VERSION_MIN_REQUIRED = MAC_OS_X_VERSION_10_2 | ||
| 48 | MAC_OS_X_VERSION_MAX_ALLOWED = MAC_OS_X_VERSION_10_3 | ||
| 49 | |||
| 50 | and an OS header contains: | ||
| 51 | |||
| 52 | extern void funcA(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 53 | extern void funcB(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2; | ||
| 54 | extern void funcC(void) AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3; | ||
| 55 | extern void funcD(void) AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 56 | extern void funcE(void) AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 57 | extern void funcF(void) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 58 | extern void funcG(void) AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 59 | |||
| 60 | typedef long TypeA DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER; | ||
| 61 | typedef long TypeB DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER; | ||
| 62 | typedef long TypeC DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER; | ||
| 63 | typedef long TypeD DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER; | ||
| 64 | typedef long TypeE DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER; | ||
| 65 | |||
| 66 | Any application code which uses these declarations will get the following: | ||
| 67 | |||
| 68 | compile link run | ||
| 69 | ------- ------ ------- | ||
| 70 | funcA: normal normal normal | ||
| 71 | funcB: warning normal normal | ||
| 72 | funcC: normal normal normal | ||
| 73 | funcD: normal normal normal | ||
| 74 | funcE: normal normal normal | ||
| 75 | funcF: normal weak on 10.3 normal, on 10.2 (&funcF == NULL) | ||
| 76 | funcG: error error n/a | ||
| 77 | typeA: warning | ||
| 78 | typeB: warning | ||
| 79 | typeC: warning | ||
| 80 | typeD: normal | ||
| 81 | typeE: normal | ||
| 82 | |||
| 83 | |||
| 84 | */ | ||
| 85 | #ifndef __AVAILABILITYMACROS__ | ||
| 86 | #define __AVAILABILITYMACROS__ | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Set up standard Mac OS X versions | ||
| 90 | */ | ||
| 91 | #define MAC_OS_X_VERSION_10_0 1000 | ||
| 92 | #define MAC_OS_X_VERSION_10_1 1010 | ||
| 93 | #define MAC_OS_X_VERSION_10_2 1020 | ||
| 94 | #define MAC_OS_X_VERSION_10_3 1030 | ||
| 95 | #define MAC_OS_X_VERSION_10_4 1040 | ||
| 96 | #define MAC_OS_X_VERSION_10_5 1050 | ||
| 97 | #define MAC_OS_X_VERSION_10_6 1060 | ||
| 98 | #define MAC_OS_X_VERSION_10_7 1070 | ||
| 99 | #define MAC_OS_X_VERSION_10_8 1080 | ||
| 100 | #define MAC_OS_X_VERSION_10_9 1090 | ||
| 101 | #define MAC_OS_X_VERSION_10_10 101000 | ||
| 102 | #define MAC_OS_X_VERSION_10_10_2 101002 | ||
| 103 | #define MAC_OS_X_VERSION_10_10_3 101003 | ||
| 104 | #define MAC_OS_X_VERSION_10_11 101100 | ||
| 105 | #define MAC_OS_X_VERSION_10_11_2 101102 | ||
| 106 | #define MAC_OS_X_VERSION_10_11_3 101103 | ||
| 107 | #define MAC_OS_X_VERSION_10_11_4 101104 | ||
| 108 | #define MAC_OS_X_VERSION_10_12 101200 | ||
| 109 | #define MAC_OS_X_VERSION_10_12_1 101201 | ||
| 110 | #define MAC_OS_X_VERSION_10_12_2 101202 | ||
| 111 | #define MAC_OS_X_VERSION_10_12_4 101204 | ||
| 112 | #define MAC_OS_X_VERSION_10_13 101300 | ||
| 113 | #define MAC_OS_X_VERSION_10_13_1 101301 | ||
| 114 | #define MAC_OS_X_VERSION_10_13_2 101302 | ||
| 115 | #define MAC_OS_X_VERSION_10_13_4 101304 | ||
| 116 | #define MAC_OS_X_VERSION_10_14 101400 | ||
| 117 | #define MAC_OS_X_VERSION_10_14_1 101401 | ||
| 118 | #define MAC_OS_X_VERSION_10_14_4 101404 | ||
| 119 | #define MAC_OS_X_VERSION_10_15 101500 | ||
| 120 | #define MAC_OS_VERSION_11_0 110000 | ||
| 121 | #define MAC_OS_VERSION_11_1 110100 | ||
| 122 | #define MAC_OS_VERSION_11_3 110300 | ||
| 123 | #define MAC_OS_VERSION_12_0 120000 | ||
| 124 | |||
| 125 | /* | ||
| 126 | * If min OS not specified, assume 10.4 for intel | ||
| 127 | * Note: compiler driver may set _ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED_ based on MACOSX_DEPLOYMENT_TARGET environment variable | ||
| 128 | */ | ||
| 129 | #ifndef MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 130 | #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 131 | #if (__i386__ || __x86_64__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < MAC_OS_X_VERSION_10_4) | ||
| 132 | #warning Building for Intel with Mac OS X Deployment Target < 10.4 is invalid. | ||
| 133 | #endif | ||
| 134 | #define MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ | ||
| 135 | #else | ||
| 136 | #if __i386__ || __x86_64__ | ||
| 137 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 | ||
| 138 | #elif __arm__ || __arm64__ | ||
| 139 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_5 | ||
| 140 | #else | ||
| 141 | #define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_1 | ||
| 142 | #endif | ||
| 143 | #endif | ||
| 144 | #endif | ||
| 145 | |||
| 146 | /* | ||
| 147 | * if max OS not specified, assume larger of (10.15, min) | ||
| 148 | */ | ||
| 149 | #ifndef MAC_OS_X_VERSION_MAX_ALLOWED | ||
| 150 | #if MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_VERSION_12_0 | ||
| 151 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 152 | #else | ||
| 153 | #define MAC_OS_X_VERSION_MAX_ALLOWED MAC_OS_VERSION_12_0 | ||
| 154 | #endif | ||
| 155 | #endif | ||
| 156 | |||
| 157 | /* | ||
| 158 | * Error on bad values | ||
| 159 | */ | ||
| 160 | #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 161 | #error MAC_OS_X_VERSION_MAX_ALLOWED must be >= MAC_OS_X_VERSION_MIN_REQUIRED | ||
| 162 | #endif | ||
| 163 | #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_0 | ||
| 164 | #error MAC_OS_X_VERSION_MIN_REQUIRED must be >= MAC_OS_X_VERSION_10_0 | ||
| 165 | #endif | ||
| 166 | |||
| 167 | /* | ||
| 168 | * only certain compilers support __attribute__((weak_import)) | ||
| 169 | */ | ||
| 170 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) | ||
| 171 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 172 | #elif defined(__MWERKS__) && (__MWERKS__ >= 0x3205) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1020) && !defined(__INTEL__) | ||
| 173 | #define WEAK_IMPORT_ATTRIBUTE __attribute__((weak_import)) | ||
| 174 | #else | ||
| 175 | #define WEAK_IMPORT_ATTRIBUTE | ||
| 176 | #endif | ||
| 177 | |||
| 178 | /* | ||
| 179 | * only certain compilers support __attribute__((deprecated)) | ||
| 180 | */ | ||
| 181 | #if defined(__has_feature) && defined(__has_attribute) | ||
| 182 | #if __has_attribute(deprecated) | ||
| 183 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 184 | #if __has_feature(attribute_deprecated_with_message) | ||
| 185 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 186 | #else | ||
| 187 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 188 | #endif | ||
| 189 | #else | ||
| 190 | #define DEPRECATED_ATTRIBUTE | ||
| 191 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 192 | #endif | ||
| 193 | #elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 194 | #define DEPRECATED_ATTRIBUTE __attribute__((deprecated)) | ||
| 195 | #if (__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) | ||
| 196 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) | ||
| 197 | #else | ||
| 198 | #define DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated)) | ||
| 199 | #endif | ||
| 200 | #else | ||
| 201 | #define DEPRECATED_ATTRIBUTE | ||
| 202 | #define DEPRECATED_MSG_ATTRIBUTE(s) | ||
| 203 | #endif | ||
| 204 | |||
| 205 | /* | ||
| 206 | * only certain compilers support __attribute__((unavailable)) | ||
| 207 | */ | ||
| 208 | #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
| 209 | #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable)) | ||
| 210 | #else | ||
| 211 | #define UNAVAILABLE_ATTRIBUTE | ||
| 212 | #endif | ||
| 213 | |||
| 214 | |||
| 215 | /* | ||
| 216 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 217 | * | ||
| 218 | * Used on functions introduced in Mac OS X 10.0 | ||
| 219 | */ | ||
| 220 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 221 | |||
| 222 | /* | ||
| 223 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED | ||
| 224 | * | ||
| 225 | * Used on functions introduced in Mac OS X 10.0, | ||
| 226 | * and deprecated in Mac OS X 10.0 | ||
| 227 | */ | ||
| 228 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 229 | |||
| 230 | /* | ||
| 231 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 232 | * | ||
| 233 | * Used on types deprecated in Mac OS X 10.0 | ||
| 234 | */ | ||
| 235 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_0_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 236 | |||
| 237 | #ifndef __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 238 | 	#ifdef __has_attribute | ||
| 239 | 		#if __has_attribute(availability) | ||
| 240 | 			#include <Availability.h> | ||
| 241 | 			#define __AVAILABILITY_MACROS_USES_AVAILABILITY 1 | ||
| 242 | 		#endif | ||
| 243 | 	#endif | ||
| 244 | #endif | ||
| 245 | |||
| 246 | #if TARGET_OS_OSX | ||
| 247 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 248 | #elif TARGET_OS_MACCATALYST | ||
| 249 | #define __IPHONE_COMPAT_VERSION __IPHONE_NA | ||
| 250 | #else | ||
| 251 | #define __IPHONE_COMPAT_VERSION __IPHONE_4_0 | ||
| 252 | #endif | ||
| 253 | |||
| 254 | /* | ||
| 255 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 256 | * | ||
| 257 | * Used on declarations introduced in Mac OS X 10.1 | ||
| 258 | */ | ||
| 259 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 260 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_1, __IPHONE_COMPAT_VERSION) | ||
| 261 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_1 | ||
| 262 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 263 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_1 | ||
| 264 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 265 | #else | ||
| 266 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 267 | #endif | ||
| 268 | |||
| 269 | /* | ||
| 270 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED | ||
| 271 | * | ||
| 272 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 273 | * and deprecated in Mac OS X 10.1 | ||
| 274 | */ | ||
| 275 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 276 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 277 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 278 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 279 | #else | ||
| 280 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 281 | #endif | ||
| 282 | |||
| 283 | /* | ||
| 284 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 | ||
| 285 | * | ||
| 286 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 287 | * but later deprecated in Mac OS X 10.1 | ||
| 288 | */ | ||
| 289 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 290 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 291 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 292 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 DEPRECATED_ATTRIBUTE | ||
| 293 | #else | ||
| 294 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 295 | #endif | ||
| 296 | |||
| 297 | /* | ||
| 298 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 299 | * | ||
| 300 | * Used on declarations introduced in Mac OS X 10.2 | ||
| 301 | */ | ||
| 302 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 303 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_2, __IPHONE_COMPAT_VERSION) | ||
| 304 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_2 | ||
| 305 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 306 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2 | ||
| 307 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 308 | #else | ||
| 309 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 310 | #endif | ||
| 311 | |||
| 312 | /* | ||
| 313 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED | ||
| 314 | * | ||
| 315 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 316 | * and deprecated in Mac OS X 10.2 | ||
| 317 | */ | ||
| 318 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 319 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 320 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 321 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 322 | #else | ||
| 323 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 324 | #endif | ||
| 325 | |||
| 326 | /* | ||
| 327 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 328 | * | ||
| 329 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 330 | * but later deprecated in Mac OS X 10.2 | ||
| 331 | */ | ||
| 332 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 333 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 334 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 335 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 336 | #else | ||
| 337 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 338 | #endif | ||
| 339 | |||
| 340 | /* | ||
| 341 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 | ||
| 342 | * | ||
| 343 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 344 | * but later deprecated in Mac OS X 10.2 | ||
| 345 | */ | ||
| 346 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 347 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 348 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 349 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 DEPRECATED_ATTRIBUTE | ||
| 350 | #else | ||
| 351 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 352 | #endif | ||
| 353 | |||
| 354 | /* | ||
| 355 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 356 | * | ||
| 357 | * Used on declarations introduced in Mac OS X 10.3 | ||
| 358 | */ | ||
| 359 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 360 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_3, __IPHONE_COMPAT_VERSION) | ||
| 361 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3 | ||
| 362 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 363 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3 | ||
| 364 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 365 | #else | ||
| 366 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 367 | #endif | ||
| 368 | |||
| 369 | /* | ||
| 370 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED | ||
| 371 | * | ||
| 372 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 373 | * and deprecated in Mac OS X 10.3 | ||
| 374 | */ | ||
| 375 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 376 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 377 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 378 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 379 | #else | ||
| 380 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 381 | #endif | ||
| 382 | |||
| 383 | /* | ||
| 384 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 385 | * | ||
| 386 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 387 | * but later deprecated in Mac OS X 10.3 | ||
| 388 | */ | ||
| 389 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 390 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 391 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 392 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 393 | #else | ||
| 394 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 395 | #endif | ||
| 396 | |||
| 397 | /* | ||
| 398 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 399 | * | ||
| 400 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 401 | * but later deprecated in Mac OS X 10.3 | ||
| 402 | */ | ||
| 403 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 404 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 405 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 406 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 407 | #else | ||
| 408 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 409 | #endif | ||
| 410 | |||
| 411 | /* | ||
| 412 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 | ||
| 413 | * | ||
| 414 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 415 | * but later deprecated in Mac OS X 10.3 | ||
| 416 | */ | ||
| 417 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 418 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 419 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 420 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 DEPRECATED_ATTRIBUTE | ||
| 421 | #else | ||
| 422 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 423 | #endif | ||
| 424 | |||
| 425 | /* | ||
| 426 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 427 | * | ||
| 428 | * Used on declarations introduced in Mac OS X 10.4 | ||
| 429 | */ | ||
| 430 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 431 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_4, __IPHONE_COMPAT_VERSION) | ||
| 432 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4 | ||
| 433 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 434 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_4 | ||
| 435 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 436 | #else | ||
| 437 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 438 | #endif | ||
| 439 | |||
| 440 | /* | ||
| 441 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED | ||
| 442 | * | ||
| 443 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 444 | * and deprecated in Mac OS X 10.4 | ||
| 445 | */ | ||
| 446 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 447 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 448 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 449 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 450 | #else | ||
| 451 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 452 | #endif | ||
| 453 | |||
| 454 | /* | ||
| 455 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 456 | * | ||
| 457 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 458 | * but later deprecated in Mac OS X 10.4 | ||
| 459 | */ | ||
| 460 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 461 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 462 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 463 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 464 | #else | ||
| 465 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 466 | #endif | ||
| 467 | |||
| 468 | /* | ||
| 469 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 470 | * | ||
| 471 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 472 | * but later deprecated in Mac OS X 10.4 | ||
| 473 | */ | ||
| 474 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 475 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 476 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 477 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 478 | #else | ||
| 479 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 480 | #endif | ||
| 481 | |||
| 482 | /* | ||
| 483 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 484 | * | ||
| 485 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 486 | * but later deprecated in Mac OS X 10.4 | ||
| 487 | */ | ||
| 488 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 489 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 490 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 491 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 492 | #else | ||
| 493 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 494 | #endif | ||
| 495 | |||
| 496 | /* | ||
| 497 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 | ||
| 498 | * | ||
| 499 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 500 | * but later deprecated in Mac OS X 10.4 | ||
| 501 | */ | ||
| 502 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 503 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 504 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 505 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 DEPRECATED_ATTRIBUTE | ||
| 506 | #else | ||
| 507 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 508 | #endif | ||
| 509 | |||
| 510 | /* | ||
| 511 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 512 | * | ||
| 513 | * Used on declarations introduced in Mac OS X 10.5 | ||
| 514 | */ | ||
| 515 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 516 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_COMPAT_VERSION) | ||
| 517 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 | ||
| 518 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 519 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 | ||
| 520 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 521 | #else | ||
| 522 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 523 | #endif | ||
| 524 | |||
| 525 | /* | ||
| 526 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED | ||
| 527 | * | ||
| 528 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 529 | * and deprecated in Mac OS X 10.5 | ||
| 530 | */ | ||
| 531 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 532 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 533 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 534 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 535 | #else | ||
| 536 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 537 | #endif | ||
| 538 | |||
| 539 | /* | ||
| 540 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 541 | * | ||
| 542 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 543 | * but later deprecated in Mac OS X 10.5 | ||
| 544 | */ | ||
| 545 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 546 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 547 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 548 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 549 | #else | ||
| 550 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 551 | #endif | ||
| 552 | |||
| 553 | /* | ||
| 554 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 555 | * | ||
| 556 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 557 | * but later deprecated in Mac OS X 10.5 | ||
| 558 | */ | ||
| 559 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 560 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 561 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 562 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 563 | #else | ||
| 564 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 565 | #endif | ||
| 566 | |||
| 567 | /* | ||
| 568 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 569 | * | ||
| 570 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 571 | * but later deprecated in Mac OS X 10.5 | ||
| 572 | */ | ||
| 573 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 574 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 575 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 576 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 577 | #else | ||
| 578 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 579 | #endif | ||
| 580 | |||
| 581 | /* | ||
| 582 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 583 | * | ||
| 584 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 585 | * but later deprecated in Mac OS X 10.5 | ||
| 586 | */ | ||
| 587 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 588 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 589 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 590 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 591 | #else | ||
| 592 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 593 | #endif | ||
| 594 | |||
| 595 | /* | ||
| 596 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 | ||
| 597 | * | ||
| 598 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 599 | * but later deprecated in Mac OS X 10.5 | ||
| 600 | */ | ||
| 601 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 602 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 603 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 604 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 DEPRECATED_ATTRIBUTE | ||
| 605 | #else | ||
| 606 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 607 | #endif | ||
| 608 | |||
| 609 | /* | ||
| 610 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 611 | * | ||
| 612 | * Used on declarations introduced in Mac OS X 10.6 | ||
| 613 | */ | ||
| 614 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 615 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_COMPAT_VERSION) | ||
| 616 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 | ||
| 617 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 618 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6 | ||
| 619 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 620 | #else | ||
| 621 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 622 | #endif | ||
| 623 | |||
| 624 | /* | ||
| 625 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED | ||
| 626 | * | ||
| 627 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 628 | * and deprecated in Mac OS X 10.6 | ||
| 629 | */ | ||
| 630 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 631 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 632 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 633 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 634 | #else | ||
| 635 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 636 | #endif | ||
| 637 | |||
| 638 | /* | ||
| 639 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 640 | * | ||
| 641 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 642 | * but later deprecated in Mac OS X 10.6 | ||
| 643 | */ | ||
| 644 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 645 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 646 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 647 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 648 | #else | ||
| 649 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 650 | #endif | ||
| 651 | |||
| 652 | /* | ||
| 653 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 654 | * | ||
| 655 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 656 | * but later deprecated in Mac OS X 10.6 | ||
| 657 | */ | ||
| 658 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 659 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 660 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 661 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 662 | #else | ||
| 663 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 664 | #endif | ||
| 665 | |||
| 666 | /* | ||
| 667 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 668 | * | ||
| 669 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 670 | * but later deprecated in Mac OS X 10.6 | ||
| 671 | */ | ||
| 672 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 673 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 674 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 675 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 676 | #else | ||
| 677 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 678 | #endif | ||
| 679 | |||
| 680 | /* | ||
| 681 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 682 | * | ||
| 683 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 684 | * but later deprecated in Mac OS X 10.6 | ||
| 685 | */ | ||
| 686 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 687 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 688 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 689 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 690 | #else | ||
| 691 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 692 | #endif | ||
| 693 | |||
| 694 | /* | ||
| 695 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 696 | * | ||
| 697 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 698 | * but later deprecated in Mac OS X 10.6 | ||
| 699 | */ | ||
| 700 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 701 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 702 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 703 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 704 | #else | ||
| 705 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 706 | #endif | ||
| 707 | |||
| 708 | /* | ||
| 709 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 | ||
| 710 | * | ||
| 711 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 712 | * but later deprecated in Mac OS X 10.6 | ||
| 713 | */ | ||
| 714 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 715 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 716 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 717 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 DEPRECATED_ATTRIBUTE | ||
| 718 | #else | ||
| 719 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 720 | #endif | ||
| 721 | |||
| 722 | /* | ||
| 723 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 724 | * | ||
| 725 | * Used on declarations introduced in Mac OS X 10.7 | ||
| 726 | */ | ||
| 727 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 728 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_COMPAT_VERSION) | ||
| 729 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 | ||
| 730 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 731 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 | ||
| 732 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 733 | #else | ||
| 734 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 735 | #endif | ||
| 736 | |||
| 737 | /* | ||
| 738 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED | ||
| 739 | * | ||
| 740 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 741 | * and deprecated in Mac OS X 10.7 | ||
| 742 | */ | ||
| 743 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 744 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 745 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 746 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 747 | #else | ||
| 748 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 749 | #endif | ||
| 750 | |||
| 751 | /* | ||
| 752 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 753 | * | ||
| 754 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 755 | * but later deprecated in Mac OS X 10.7 | ||
| 756 | */ | ||
| 757 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 758 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 759 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 760 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 761 | #else | ||
| 762 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 763 | #endif | ||
| 764 | |||
| 765 | /* | ||
| 766 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 767 | * | ||
| 768 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 769 | * but later deprecated in Mac OS X 10.7 | ||
| 770 | */ | ||
| 771 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 772 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 773 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 774 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 775 | #else | ||
| 776 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 777 | #endif | ||
| 778 | |||
| 779 | /* | ||
| 780 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 781 | * | ||
| 782 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 783 | * but later deprecated in Mac OS X 10.7 | ||
| 784 | */ | ||
| 785 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 786 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 787 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 788 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 789 | #else | ||
| 790 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 791 | #endif | ||
| 792 | |||
| 793 | /* | ||
| 794 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 795 | * | ||
| 796 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 797 | * but later deprecated in Mac OS X 10.7 | ||
| 798 | */ | ||
| 799 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 800 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 801 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 802 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 803 | #else | ||
| 804 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 805 | #endif | ||
| 806 | |||
| 807 | /* | ||
| 808 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 809 | * | ||
| 810 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 811 | * but later deprecated in Mac OS X 10.7 | ||
| 812 | */ | ||
| 813 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 814 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 815 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 816 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 817 | #else | ||
| 818 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 819 | #endif | ||
| 820 | |||
| 821 | /* | ||
| 822 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 823 | * | ||
| 824 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 825 | * but later deprecated in Mac OS X 10.7 | ||
| 826 | */ | ||
| 827 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 828 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 829 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 830 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 831 | #else | ||
| 832 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 833 | #endif | ||
| 834 | |||
| 835 | /* | ||
| 836 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 | ||
| 837 | * | ||
| 838 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 839 | * but later deprecated in Mac OS X 10.7 | ||
| 840 | */ | ||
| 841 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 842 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 843 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 844 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 DEPRECATED_ATTRIBUTE | ||
| 845 | #else | ||
| 846 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 847 | #endif | ||
| 848 | |||
| 849 | /* | ||
| 850 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 | ||
| 851 | * | ||
| 852 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 853 | * but later deprecated in Mac OS X 10.13 | ||
| 854 | */ | ||
| 855 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 856 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 857 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 858 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 DEPRECATED_ATTRIBUTE | ||
| 859 | #else | ||
| 860 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_13 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 861 | #endif | ||
| 862 | |||
| 863 | /* | ||
| 864 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 865 | * | ||
| 866 | * Used on declarations introduced in Mac OS X 10.8 | ||
| 867 | */ | ||
| 868 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 869 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_COMPAT_VERSION) | ||
| 870 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_8 | ||
| 871 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 872 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_8 | ||
| 873 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 874 | #else | ||
| 875 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 876 | #endif | ||
| 877 | |||
| 878 | /* | ||
| 879 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED | ||
| 880 | * | ||
| 881 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 882 | * and deprecated in Mac OS X 10.8 | ||
| 883 | */ | ||
| 884 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 885 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 886 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 887 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 888 | #else | ||
| 889 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 890 | #endif | ||
| 891 | |||
| 892 | /* | ||
| 893 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 894 | * | ||
| 895 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 896 | * but later deprecated in Mac OS X 10.8 | ||
| 897 | */ | ||
| 898 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 899 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 900 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 901 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 902 | #else | ||
| 903 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 904 | #endif | ||
| 905 | |||
| 906 | /* | ||
| 907 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 908 | * | ||
| 909 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 910 | * but later deprecated in Mac OS X 10.8 | ||
| 911 | */ | ||
| 912 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 913 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 914 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 915 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 916 | #else | ||
| 917 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 918 | #endif | ||
| 919 | |||
| 920 | /* | ||
| 921 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 922 | * | ||
| 923 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 924 | * but later deprecated in Mac OS X 10.8 | ||
| 925 | */ | ||
| 926 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 927 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 928 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 929 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 930 | #else | ||
| 931 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 932 | #endif | ||
| 933 | |||
| 934 | /* | ||
| 935 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 936 | * | ||
| 937 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 938 | * but later deprecated in Mac OS X 10.8 | ||
| 939 | */ | ||
| 940 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 941 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 942 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 943 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 944 | #else | ||
| 945 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 946 | #endif | ||
| 947 | |||
| 948 | /* | ||
| 949 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 950 | * | ||
| 951 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 952 | * but later deprecated in Mac OS X 10.8 | ||
| 953 | */ | ||
| 954 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 955 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 956 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 957 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 958 | #else | ||
| 959 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 960 | #endif | ||
| 961 | |||
| 962 | /* | ||
| 963 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 964 | * | ||
| 965 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 966 | * but later deprecated in Mac OS X 10.8 | ||
| 967 | */ | ||
| 968 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 969 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 970 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 971 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 972 | #else | ||
| 973 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 974 | #endif | ||
| 975 | |||
| 976 | /* | ||
| 977 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 978 | * | ||
| 979 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 980 | * but later deprecated in Mac OS X 10.8 | ||
| 981 | */ | ||
| 982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 983 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 985 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 986 | #else | ||
| 987 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 988 | #endif | ||
| 989 | |||
| 990 | /* | ||
| 991 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 | ||
| 992 | * | ||
| 993 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 994 | * but later deprecated in Mac OS X 10.8 | ||
| 995 | */ | ||
| 996 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 997 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 998 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 999 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 DEPRECATED_ATTRIBUTE | ||
| 1000 | #else | ||
| 1001 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1002 | #endif | ||
| 1003 | |||
| 1004 | /* | ||
| 1005 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1006 | * | ||
| 1007 | * Used on declarations introduced in Mac OS X 10.9 | ||
| 1008 | */ | ||
| 1009 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1010 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_COMPAT_VERSION) | ||
| 1011 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_9 | ||
| 1012 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1013 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 | ||
| 1014 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1015 | #else | ||
| 1016 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1017 | #endif | ||
| 1018 | |||
| 1019 | /* | ||
| 1020 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED | ||
| 1021 | * | ||
| 1022 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1023 | * and deprecated in Mac OS X 10.9 | ||
| 1024 | */ | ||
| 1025 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1026 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1027 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1028 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1029 | #else | ||
| 1030 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1031 | #endif | ||
| 1032 | |||
| 1033 | /* | ||
| 1034 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1035 | * | ||
| 1036 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1037 | * but later deprecated in Mac OS X 10.9 | ||
| 1038 | */ | ||
| 1039 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1040 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1041 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1042 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1043 | #else | ||
| 1044 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1045 | #endif | ||
| 1046 | |||
| 1047 | /* | ||
| 1048 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1049 | * | ||
| 1050 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1051 | * but later deprecated in Mac OS X 10.9 | ||
| 1052 | */ | ||
| 1053 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1054 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1055 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1056 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1057 | #else | ||
| 1058 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1059 | #endif | ||
| 1060 | |||
| 1061 | /* | ||
| 1062 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1063 | * | ||
| 1064 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1065 | * but later deprecated in Mac OS X 10.9 | ||
| 1066 | */ | ||
| 1067 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1068 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1069 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1070 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1071 | #else | ||
| 1072 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1073 | #endif | ||
| 1074 | |||
| 1075 | /* | ||
| 1076 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1077 | * | ||
| 1078 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1079 | * but later deprecated in Mac OS X 10.9 | ||
| 1080 | */ | ||
| 1081 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1082 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1083 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1084 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1085 | #else | ||
| 1086 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1087 | #endif | ||
| 1088 | |||
| 1089 | /* | ||
| 1090 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1091 | * | ||
| 1092 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1093 | * but later deprecated in Mac OS X 10.9 | ||
| 1094 | */ | ||
| 1095 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1096 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1097 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1098 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1099 | #else | ||
| 1100 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1101 | #endif | ||
| 1102 | |||
| 1103 | /* | ||
| 1104 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1105 | * | ||
| 1106 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1107 | * but later deprecated in Mac OS X 10.9 | ||
| 1108 | */ | ||
| 1109 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1110 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1111 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1112 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1113 | #else | ||
| 1114 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1115 | #endif | ||
| 1116 | |||
| 1117 | /* | ||
| 1118 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1119 | * | ||
| 1120 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1121 | * but later deprecated in Mac OS X 10.9 | ||
| 1122 | */ | ||
| 1123 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1124 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1125 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1126 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1127 | #else | ||
| 1128 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1129 | #endif | ||
| 1130 | |||
| 1131 | /* | ||
| 1132 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1133 | * | ||
| 1134 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1135 | * but later deprecated in Mac OS X 10.9 | ||
| 1136 | */ | ||
| 1137 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1138 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1139 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1140 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1141 | #else | ||
| 1142 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1143 | #endif | ||
| 1144 | |||
| 1145 | /* | ||
| 1146 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 | ||
| 1147 | * | ||
| 1148 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1149 | * but later deprecated in Mac OS X 10.9 | ||
| 1150 | */ | ||
| 1151 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1152 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1153 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 1154 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 DEPRECATED_ATTRIBUTE | ||
| 1155 | #else | ||
| 1156 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_9 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1157 | #endif | ||
| 1158 | |||
| 1159 | /* | ||
| 1160 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1161 | * | ||
| 1162 | * Used on declarations introduced in Mac OS X 10.10 | ||
| 1163 | */ | ||
| 1164 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1165 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_COMPAT_VERSION) | ||
| 1166 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10 | ||
| 1167 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1168 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10 | ||
| 1169 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1170 | #else | ||
| 1171 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1172 | #endif | ||
| 1173 | |||
| 1174 | /* | ||
| 1175 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED | ||
| 1176 | * | ||
| 1177 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1178 | * and deprecated in Mac OS X 10.10 | ||
| 1179 | */ | ||
| 1180 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1181 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1182 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1183 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1184 | #else | ||
| 1185 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1186 | #endif | ||
| 1187 | |||
| 1188 | /* | ||
| 1189 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1190 | * | ||
| 1191 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1192 | * but later deprecated in Mac OS X 10.10 | ||
| 1193 | */ | ||
| 1194 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1195 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1196 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1197 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1198 | #else | ||
| 1199 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1200 | #endif | ||
| 1201 | |||
| 1202 | /* | ||
| 1203 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1204 | * | ||
| 1205 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1206 | * but later deprecated in Mac OS X 10.10 | ||
| 1207 | */ | ||
| 1208 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1209 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1210 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1211 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1212 | #else | ||
| 1213 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1214 | #endif | ||
| 1215 | |||
| 1216 | /* | ||
| 1217 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1218 | * | ||
| 1219 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1220 | * but later deprecated in Mac OS X 10.10 | ||
| 1221 | */ | ||
| 1222 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1223 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1224 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1225 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1226 | #else | ||
| 1227 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1228 | #endif | ||
| 1229 | |||
| 1230 | /* | ||
| 1231 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1232 | * | ||
| 1233 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1234 | * but later deprecated in Mac OS X 10.10 | ||
| 1235 | */ | ||
| 1236 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1237 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1238 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1239 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1240 | #else | ||
| 1241 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1242 | #endif | ||
| 1243 | |||
| 1244 | /* | ||
| 1245 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1246 | * | ||
| 1247 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1248 | * but later deprecated in Mac OS X 10.10 | ||
| 1249 | */ | ||
| 1250 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1251 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1252 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1253 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1254 | #else | ||
| 1255 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1256 | #endif | ||
| 1257 | |||
| 1258 | /* | ||
| 1259 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1260 | * | ||
| 1261 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1262 | * but later deprecated in Mac OS X 10.10 | ||
| 1263 | */ | ||
| 1264 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1265 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1266 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1267 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1268 | #else | ||
| 1269 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1270 | #endif | ||
| 1271 | |||
| 1272 | /* | ||
| 1273 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1274 | * | ||
| 1275 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1276 | * but later deprecated in Mac OS X 10.10 | ||
| 1277 | */ | ||
| 1278 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1279 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1280 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1281 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1282 | #else | ||
| 1283 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1284 | #endif | ||
| 1285 | |||
| 1286 | /* | ||
| 1287 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1288 | * | ||
| 1289 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1290 | * but later deprecated in Mac OS X 10.10 | ||
| 1291 | */ | ||
| 1292 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1293 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1294 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1295 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1296 | #else | ||
| 1297 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | /* | ||
| 1301 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1302 | * | ||
| 1303 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1304 | * but later deprecated in Mac OS X 10.10 | ||
| 1305 | */ | ||
| 1306 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1307 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1308 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1309 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1310 | #else | ||
| 1311 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1312 | #endif | ||
| 1313 | |||
| 1314 | /* | ||
| 1315 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 | ||
| 1316 | * | ||
| 1317 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1318 | * but later deprecated in Mac OS X 10.10 | ||
| 1319 | */ | ||
| 1320 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1321 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1322 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 1323 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 DEPRECATED_ATTRIBUTE | ||
| 1324 | #else | ||
| 1325 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1326 | #endif | ||
| 1327 | |||
| 1328 | /* | ||
| 1329 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1330 | * | ||
| 1331 | * Used on declarations introduced in Mac OS X 10.10.2 | ||
| 1332 | */ | ||
| 1333 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1334 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_2, __IPHONE_COMPAT_VERSION) | ||
| 1335 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_2 | ||
| 1336 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1337 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_2 | ||
| 1338 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1339 | #else | ||
| 1340 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1341 | #endif | ||
| 1342 | |||
| 1343 | /* | ||
| 1344 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED | ||
| 1345 | * | ||
| 1346 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1347 | * and deprecated in Mac OS X 10.10.2 | ||
| 1348 | */ | ||
| 1349 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1350 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1351 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1352 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1353 | #else | ||
| 1354 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1355 | #endif | ||
| 1356 | |||
| 1357 | /* | ||
| 1358 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1359 | * | ||
| 1360 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1361 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1362 | */ | ||
| 1363 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1364 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1365 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1366 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1367 | #else | ||
| 1368 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1369 | #endif | ||
| 1370 | |||
| 1371 | /* | ||
| 1372 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1373 | * | ||
| 1374 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1375 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1376 | */ | ||
| 1377 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1378 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1379 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1380 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1381 | #else | ||
| 1382 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1383 | #endif | ||
| 1384 | |||
| 1385 | /* | ||
| 1386 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1387 | * | ||
| 1388 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1389 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1390 | */ | ||
| 1391 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1392 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1393 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1394 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1395 | #else | ||
| 1396 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1397 | #endif | ||
| 1398 | |||
| 1399 | /* | ||
| 1400 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1401 | * | ||
| 1402 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1403 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1404 | */ | ||
| 1405 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1406 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1407 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1408 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1409 | #else | ||
| 1410 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1411 | #endif | ||
| 1412 | |||
| 1413 | /* | ||
| 1414 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1415 | * | ||
| 1416 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1417 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1418 | */ | ||
| 1419 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1420 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1421 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1422 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1423 | #else | ||
| 1424 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1425 | #endif | ||
| 1426 | |||
| 1427 | /* | ||
| 1428 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1429 | * | ||
| 1430 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1431 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1432 | */ | ||
| 1433 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1434 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1435 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1436 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1437 | #else | ||
| 1438 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1439 | #endif | ||
| 1440 | |||
| 1441 | /* | ||
| 1442 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1443 | * | ||
| 1444 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1445 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1446 | */ | ||
| 1447 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1448 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1449 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1450 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1451 | #else | ||
| 1452 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1453 | #endif | ||
| 1454 | |||
| 1455 | /* | ||
| 1456 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1457 | * | ||
| 1458 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1459 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1460 | */ | ||
| 1461 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1462 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1463 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1464 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1465 | #else | ||
| 1466 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1467 | #endif | ||
| 1468 | |||
| 1469 | /* | ||
| 1470 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1471 | * | ||
| 1472 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1473 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1474 | */ | ||
| 1475 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1476 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1477 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1478 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1479 | #else | ||
| 1480 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1481 | #endif | ||
| 1482 | |||
| 1483 | /* | ||
| 1484 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1485 | * | ||
| 1486 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1487 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1488 | */ | ||
| 1489 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1490 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1491 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1492 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1493 | #else | ||
| 1494 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1495 | #endif | ||
| 1496 | |||
| 1497 | /* | ||
| 1498 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 | ||
| 1499 | * | ||
| 1500 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1501 | * but later deprecated in Mac OS X 10.10.2 | ||
| 1502 | */ | ||
| 1503 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1504 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1505 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_2 | ||
| 1506 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 DEPRECATED_ATTRIBUTE | ||
| 1507 | #else | ||
| 1508 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1509 | #endif | ||
| 1510 | |||
| 1511 | /* | ||
| 1512 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1513 | * | ||
| 1514 | * Used on declarations introduced in Mac OS X 10.10.3 | ||
| 1515 | */ | ||
| 1516 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1517 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_10_3, __IPHONE_COMPAT_VERSION) | ||
| 1518 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_10_3 | ||
| 1519 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1520 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_10_3 | ||
| 1521 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1522 | #else | ||
| 1523 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1524 | #endif | ||
| 1525 | |||
| 1526 | /* | ||
| 1527 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED | ||
| 1528 | * | ||
| 1529 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1530 | * and deprecated in Mac OS X 10.10.3 | ||
| 1531 | */ | ||
| 1532 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1533 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1534 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1535 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1536 | #else | ||
| 1537 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1538 | #endif | ||
| 1539 | |||
| 1540 | /* | ||
| 1541 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1542 | * | ||
| 1543 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1544 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1545 | */ | ||
| 1546 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1547 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1548 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1549 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1550 | #else | ||
| 1551 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1552 | #endif | ||
| 1553 | |||
| 1554 | /* | ||
| 1555 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1556 | * | ||
| 1557 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1558 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1559 | */ | ||
| 1560 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1561 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1562 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1563 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1564 | #else | ||
| 1565 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1566 | #endif | ||
| 1567 | |||
| 1568 | /* | ||
| 1569 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1570 | * | ||
| 1571 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1572 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1573 | */ | ||
| 1574 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1575 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1576 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1577 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1578 | #else | ||
| 1579 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1580 | #endif | ||
| 1581 | |||
| 1582 | /* | ||
| 1583 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1584 | * | ||
| 1585 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1586 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1587 | */ | ||
| 1588 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1589 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1590 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1591 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1592 | #else | ||
| 1593 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1594 | #endif | ||
| 1595 | |||
| 1596 | /* | ||
| 1597 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1598 | * | ||
| 1599 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1600 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1601 | */ | ||
| 1602 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1603 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1604 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1605 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1606 | #else | ||
| 1607 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1608 | #endif | ||
| 1609 | |||
| 1610 | /* | ||
| 1611 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1612 | * | ||
| 1613 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1614 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1615 | */ | ||
| 1616 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1617 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1618 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1619 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1620 | #else | ||
| 1621 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1622 | #endif | ||
| 1623 | |||
| 1624 | /* | ||
| 1625 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1626 | * | ||
| 1627 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1628 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1629 | */ | ||
| 1630 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1631 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1632 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1633 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1634 | #else | ||
| 1635 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1636 | #endif | ||
| 1637 | |||
| 1638 | /* | ||
| 1639 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1640 | * | ||
| 1641 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1642 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1643 | */ | ||
| 1644 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1645 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1646 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1647 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1648 | #else | ||
| 1649 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1650 | #endif | ||
| 1651 | |||
| 1652 | /* | ||
| 1653 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1654 | * | ||
| 1655 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1656 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1657 | */ | ||
| 1658 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1659 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1660 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1661 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1662 | #else | ||
| 1663 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1664 | #endif | ||
| 1665 | |||
| 1666 | /* | ||
| 1667 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1668 | * | ||
| 1669 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1670 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1671 | */ | ||
| 1672 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1673 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1674 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1675 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1676 | #else | ||
| 1677 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1678 | #endif | ||
| 1679 | |||
| 1680 | /* | ||
| 1681 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1682 | * | ||
| 1683 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1684 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1685 | */ | ||
| 1686 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1687 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1688 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1689 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1690 | #else | ||
| 1691 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1692 | #endif | ||
| 1693 | |||
| 1694 | /* | ||
| 1695 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 | ||
| 1696 | * | ||
| 1697 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1698 | * but later deprecated in Mac OS X 10.10.3 | ||
| 1699 | */ | ||
| 1700 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1701 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1702 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10_3 | ||
| 1703 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 DEPRECATED_ATTRIBUTE | ||
| 1704 | #else | ||
| 1705 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_10_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1706 | #endif | ||
| 1707 | |||
| 1708 | /* | ||
| 1709 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1710 | * | ||
| 1711 | * Used on declarations introduced in Mac OS X 10.11 | ||
| 1712 | */ | ||
| 1713 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1714 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11, __IPHONE_COMPAT_VERSION) | ||
| 1715 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11 | ||
| 1716 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1717 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11 | ||
| 1718 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1719 | #else | ||
| 1720 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1721 | #endif | ||
| 1722 | |||
| 1723 | /* | ||
| 1724 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED | ||
| 1725 | * | ||
| 1726 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 1727 | * and deprecated in Mac OS X 10.11 | ||
| 1728 | */ | ||
| 1729 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1730 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1731 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1732 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1733 | #else | ||
| 1734 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 1735 | #endif | ||
| 1736 | |||
| 1737 | /* | ||
| 1738 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1739 | * | ||
| 1740 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1741 | * but later deprecated in Mac OS X 10.11 | ||
| 1742 | */ | ||
| 1743 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1744 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1745 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1746 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1747 | #else | ||
| 1748 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1749 | #endif | ||
| 1750 | |||
| 1751 | /* | ||
| 1752 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1753 | * | ||
| 1754 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1755 | * but later deprecated in Mac OS X 10.11 | ||
| 1756 | */ | ||
| 1757 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1758 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1759 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1760 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1761 | #else | ||
| 1762 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1763 | #endif | ||
| 1764 | |||
| 1765 | /* | ||
| 1766 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1767 | * | ||
| 1768 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1769 | * but later deprecated in Mac OS X 10.11 | ||
| 1770 | */ | ||
| 1771 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1772 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1773 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1774 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1775 | #else | ||
| 1776 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1777 | #endif | ||
| 1778 | |||
| 1779 | /* | ||
| 1780 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1781 | * | ||
| 1782 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1783 | * but later deprecated in Mac OS X 10.11 | ||
| 1784 | */ | ||
| 1785 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1786 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1787 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1788 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1789 | #else | ||
| 1790 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 1791 | #endif | ||
| 1792 | |||
| 1793 | /* | ||
| 1794 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1795 | * | ||
| 1796 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 1797 | * but later deprecated in Mac OS X 10.11 | ||
| 1798 | */ | ||
| 1799 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1800 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1801 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1802 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1803 | #else | ||
| 1804 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 1805 | #endif | ||
| 1806 | |||
| 1807 | /* | ||
| 1808 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1809 | * | ||
| 1810 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 1811 | * but later deprecated in Mac OS X 10.11 | ||
| 1812 | */ | ||
| 1813 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1814 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1815 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1816 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1817 | #else | ||
| 1818 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 1819 | #endif | ||
| 1820 | |||
| 1821 | /* | ||
| 1822 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1823 | * | ||
| 1824 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 1825 | * but later deprecated in Mac OS X 10.11 | ||
| 1826 | */ | ||
| 1827 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1828 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1829 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1830 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1831 | #else | ||
| 1832 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 1833 | #endif | ||
| 1834 | |||
| 1835 | /* | ||
| 1836 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1837 | * | ||
| 1838 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 1839 | * but later deprecated in Mac OS X 10.11 | ||
| 1840 | */ | ||
| 1841 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1842 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1843 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1844 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1845 | #else | ||
| 1846 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 1847 | #endif | ||
| 1848 | |||
| 1849 | /* | ||
| 1850 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1851 | * | ||
| 1852 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 1853 | * but later deprecated in Mac OS X 10.11 | ||
| 1854 | */ | ||
| 1855 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1856 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1857 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1858 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1859 | #else | ||
| 1860 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 1861 | #endif | ||
| 1862 | |||
| 1863 | /* | ||
| 1864 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1865 | * | ||
| 1866 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 1867 | * but later deprecated in Mac OS X 10.11 | ||
| 1868 | */ | ||
| 1869 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1870 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1871 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1872 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1873 | #else | ||
| 1874 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 1875 | #endif | ||
| 1876 | |||
| 1877 | /* | ||
| 1878 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1879 | * | ||
| 1880 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 1881 | * but later deprecated in Mac OS X 10.11 | ||
| 1882 | */ | ||
| 1883 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1884 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1885 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1886 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1887 | #else | ||
| 1888 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 1889 | #endif | ||
| 1890 | |||
| 1891 | /* | ||
| 1892 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1893 | * | ||
| 1894 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 1895 | * but later deprecated in Mac OS X 10.11 | ||
| 1896 | */ | ||
| 1897 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1898 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1899 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1900 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1901 | #else | ||
| 1902 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 1903 | #endif | ||
| 1904 | |||
| 1905 | /* | ||
| 1906 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 | ||
| 1907 | * | ||
| 1908 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 1909 | * but later deprecated in Mac OS X 10.11 | ||
| 1910 | */ | ||
| 1911 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1912 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1913 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 1914 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 DEPRECATED_ATTRIBUTE | ||
| 1915 | #else | ||
| 1916 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 1917 | #endif | ||
| 1918 | |||
| 1919 | /* | ||
| 1920 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1921 | * | ||
| 1922 | * Used on declarations introduced in Mac OS X 10.11.2 | ||
| 1923 | */ | ||
| 1924 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1925 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_2, __IPHONE_COMPAT_VERSION) | ||
| 1926 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_2 | ||
| 1927 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 1928 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_2 | ||
| 1929 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 1930 | #else | ||
| 1931 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1932 | #endif | ||
| 1933 | |||
| 1934 | /* | ||
| 1935 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED | ||
| 1936 | * | ||
| 1937 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 1938 | * and deprecated in Mac OS X 10.11.2 | ||
| 1939 | */ | ||
| 1940 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1941 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1942 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1943 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 1944 | #else | ||
| 1945 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 1946 | #endif | ||
| 1947 | |||
| 1948 | /* | ||
| 1949 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1950 | * | ||
| 1951 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 1952 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1953 | */ | ||
| 1954 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1955 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1956 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1957 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1958 | #else | ||
| 1959 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 1960 | #endif | ||
| 1961 | |||
| 1962 | /* | ||
| 1963 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1964 | * | ||
| 1965 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 1966 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1967 | */ | ||
| 1968 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1969 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1970 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1971 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1972 | #else | ||
| 1973 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 1974 | #endif | ||
| 1975 | |||
| 1976 | /* | ||
| 1977 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1978 | * | ||
| 1979 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 1980 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1981 | */ | ||
| 1982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1983 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1985 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 1986 | #else | ||
| 1987 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 1988 | #endif | ||
| 1989 | |||
| 1990 | /* | ||
| 1991 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 1992 | * | ||
| 1993 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 1994 | * but later deprecated in Mac OS X 10.11.2 | ||
| 1995 | */ | ||
| 1996 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 1997 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 1998 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 1999 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2000 | #else | ||
| 2001 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2002 | #endif | ||
| 2003 | |||
| 2004 | /* | ||
| 2005 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2006 | * | ||
| 2007 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2008 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2009 | */ | ||
| 2010 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2011 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2012 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2013 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2014 | #else | ||
| 2015 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2016 | #endif | ||
| 2017 | |||
| 2018 | /* | ||
| 2019 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2020 | * | ||
| 2021 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2022 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2023 | */ | ||
| 2024 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2025 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2026 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2027 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2028 | #else | ||
| 2029 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2030 | #endif | ||
| 2031 | |||
| 2032 | /* | ||
| 2033 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2034 | * | ||
| 2035 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2036 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2037 | */ | ||
| 2038 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2039 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2040 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2041 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2042 | #else | ||
| 2043 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2044 | #endif | ||
| 2045 | |||
| 2046 | /* | ||
| 2047 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2048 | * | ||
| 2049 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2050 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2051 | */ | ||
| 2052 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2053 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2054 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2055 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2056 | #else | ||
| 2057 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2058 | #endif | ||
| 2059 | |||
| 2060 | /* | ||
| 2061 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2062 | * | ||
| 2063 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2064 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2065 | */ | ||
| 2066 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2067 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2068 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2069 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2070 | #else | ||
| 2071 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2072 | #endif | ||
| 2073 | |||
| 2074 | /* | ||
| 2075 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2076 | * | ||
| 2077 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2078 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2079 | */ | ||
| 2080 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2081 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2082 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2083 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2084 | #else | ||
| 2085 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2086 | #endif | ||
| 2087 | |||
| 2088 | /* | ||
| 2089 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2090 | * | ||
| 2091 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2092 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2093 | */ | ||
| 2094 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2095 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2096 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2097 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2098 | #else | ||
| 2099 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2100 | #endif | ||
| 2101 | |||
| 2102 | /* | ||
| 2103 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2104 | * | ||
| 2105 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2106 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2107 | */ | ||
| 2108 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2109 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2110 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2111 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2112 | #else | ||
| 2113 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2114 | #endif | ||
| 2115 | |||
| 2116 | /* | ||
| 2117 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2118 | * | ||
| 2119 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2120 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2121 | */ | ||
| 2122 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2123 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2124 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2125 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2126 | #else | ||
| 2127 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2128 | #endif | ||
| 2129 | |||
| 2130 | /* | ||
| 2131 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 | ||
| 2132 | * | ||
| 2133 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2134 | * but later deprecated in Mac OS X 10.11.2 | ||
| 2135 | */ | ||
| 2136 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2137 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2138 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_2 | ||
| 2139 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 DEPRECATED_ATTRIBUTE | ||
| 2140 | #else | ||
| 2141 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2142 | #endif | ||
| 2143 | |||
| 2144 | /* | ||
| 2145 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2146 | * | ||
| 2147 | * Used on declarations introduced in Mac OS X 10.11.3 | ||
| 2148 | */ | ||
| 2149 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2150 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_3, __IPHONE_COMPAT_VERSION) | ||
| 2151 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_3 | ||
| 2152 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2153 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_3 | ||
| 2154 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2155 | #else | ||
| 2156 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2157 | #endif | ||
| 2158 | |||
| 2159 | /* | ||
| 2160 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED | ||
| 2161 | * | ||
| 2162 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2163 | * and deprecated in Mac OS X 10.11.3 | ||
| 2164 | */ | ||
| 2165 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2166 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2167 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2168 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2169 | #else | ||
| 2170 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2171 | #endif | ||
| 2172 | |||
| 2173 | /* | ||
| 2174 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2175 | * | ||
| 2176 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2177 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2178 | */ | ||
| 2179 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2180 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2181 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2182 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2183 | #else | ||
| 2184 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2185 | #endif | ||
| 2186 | |||
| 2187 | /* | ||
| 2188 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2189 | * | ||
| 2190 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2191 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2192 | */ | ||
| 2193 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2194 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2195 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2196 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2197 | #else | ||
| 2198 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2199 | #endif | ||
| 2200 | |||
| 2201 | /* | ||
| 2202 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2203 | * | ||
| 2204 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2205 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2206 | */ | ||
| 2207 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2208 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2209 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2210 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2211 | #else | ||
| 2212 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2213 | #endif | ||
| 2214 | |||
| 2215 | /* | ||
| 2216 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2217 | * | ||
| 2218 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2219 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2220 | */ | ||
| 2221 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2222 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2223 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2224 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2225 | #else | ||
| 2226 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2227 | #endif | ||
| 2228 | |||
| 2229 | /* | ||
| 2230 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2231 | * | ||
| 2232 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2233 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2234 | */ | ||
| 2235 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2236 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2237 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2238 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2239 | #else | ||
| 2240 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2241 | #endif | ||
| 2242 | |||
| 2243 | /* | ||
| 2244 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2245 | * | ||
| 2246 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2247 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2248 | */ | ||
| 2249 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2250 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2251 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2252 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2253 | #else | ||
| 2254 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2255 | #endif | ||
| 2256 | |||
| 2257 | /* | ||
| 2258 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2259 | * | ||
| 2260 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2261 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2262 | */ | ||
| 2263 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2264 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2265 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2266 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2267 | #else | ||
| 2268 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2269 | #endif | ||
| 2270 | |||
| 2271 | /* | ||
| 2272 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2273 | * | ||
| 2274 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2275 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2276 | */ | ||
| 2277 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2278 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2279 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2280 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2281 | #else | ||
| 2282 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2283 | #endif | ||
| 2284 | |||
| 2285 | /* | ||
| 2286 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2287 | * | ||
| 2288 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2289 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2290 | */ | ||
| 2291 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2292 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2293 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2294 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2295 | #else | ||
| 2296 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2297 | #endif | ||
| 2298 | |||
| 2299 | /* | ||
| 2300 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2301 | * | ||
| 2302 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2303 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2304 | */ | ||
| 2305 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2306 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2307 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2308 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2309 | #else | ||
| 2310 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2311 | #endif | ||
| 2312 | |||
| 2313 | /* | ||
| 2314 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2315 | * | ||
| 2316 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2317 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2318 | */ | ||
| 2319 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2320 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2321 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2322 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2323 | #else | ||
| 2324 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2325 | #endif | ||
| 2326 | |||
| 2327 | /* | ||
| 2328 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2329 | * | ||
| 2330 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2331 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2332 | */ | ||
| 2333 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2334 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2335 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2336 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2337 | #else | ||
| 2338 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2339 | #endif | ||
| 2340 | |||
| 2341 | /* | ||
| 2342 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2343 | * | ||
| 2344 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2345 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2346 | */ | ||
| 2347 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2348 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2349 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2350 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2351 | #else | ||
| 2352 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2353 | #endif | ||
| 2354 | |||
| 2355 | /* | ||
| 2356 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2357 | * | ||
| 2358 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2359 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2360 | */ | ||
| 2361 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2362 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2363 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2364 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2365 | #else | ||
| 2366 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2367 | #endif | ||
| 2368 | |||
| 2369 | /* | ||
| 2370 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 | ||
| 2371 | * | ||
| 2372 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2373 | * but later deprecated in Mac OS X 10.11.3 | ||
| 2374 | */ | ||
| 2375 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2376 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2377 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_3 | ||
| 2378 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 DEPRECATED_ATTRIBUTE | ||
| 2379 | #else | ||
| 2380 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_3 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2381 | #endif | ||
| 2382 | |||
| 2383 | /* | ||
| 2384 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2385 | * | ||
| 2386 | * Used on declarations introduced in Mac OS X 10.11.4 | ||
| 2387 | */ | ||
| 2388 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2389 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_11_4, __IPHONE_COMPAT_VERSION) | ||
| 2390 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_11_4 | ||
| 2391 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2392 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_11_4 | ||
| 2393 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2394 | #else | ||
| 2395 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2396 | #endif | ||
| 2397 | |||
| 2398 | /* | ||
| 2399 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED | ||
| 2400 | * | ||
| 2401 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2402 | * and deprecated in Mac OS X 10.11.4 | ||
| 2403 | */ | ||
| 2404 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2405 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2406 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2407 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2408 | #else | ||
| 2409 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2410 | #endif | ||
| 2411 | |||
| 2412 | /* | ||
| 2413 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2414 | * | ||
| 2415 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2416 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2417 | */ | ||
| 2418 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2419 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2420 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2421 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2422 | #else | ||
| 2423 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2424 | #endif | ||
| 2425 | |||
| 2426 | /* | ||
| 2427 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2428 | * | ||
| 2429 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2430 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2431 | */ | ||
| 2432 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2433 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2434 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2435 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2436 | #else | ||
| 2437 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2438 | #endif | ||
| 2439 | |||
| 2440 | /* | ||
| 2441 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2442 | * | ||
| 2443 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2444 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2445 | */ | ||
| 2446 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2447 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2448 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2449 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2450 | #else | ||
| 2451 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2452 | #endif | ||
| 2453 | |||
| 2454 | /* | ||
| 2455 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2456 | * | ||
| 2457 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2458 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2459 | */ | ||
| 2460 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2461 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2462 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2463 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2464 | #else | ||
| 2465 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2466 | #endif | ||
| 2467 | |||
| 2468 | /* | ||
| 2469 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2470 | * | ||
| 2471 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2472 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2473 | */ | ||
| 2474 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2475 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2476 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2477 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2478 | #else | ||
| 2479 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2480 | #endif | ||
| 2481 | |||
| 2482 | /* | ||
| 2483 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2484 | * | ||
| 2485 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2486 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2487 | */ | ||
| 2488 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2489 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2490 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2491 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2492 | #else | ||
| 2493 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2494 | #endif | ||
| 2495 | |||
| 2496 | /* | ||
| 2497 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2498 | * | ||
| 2499 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2500 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2501 | */ | ||
| 2502 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2503 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2504 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2505 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2506 | #else | ||
| 2507 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2508 | #endif | ||
| 2509 | |||
| 2510 | /* | ||
| 2511 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2512 | * | ||
| 2513 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2514 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2515 | */ | ||
| 2516 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2517 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2518 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2519 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2520 | #else | ||
| 2521 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2522 | #endif | ||
| 2523 | |||
| 2524 | /* | ||
| 2525 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2526 | * | ||
| 2527 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2528 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2529 | */ | ||
| 2530 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2531 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2532 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2533 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2534 | #else | ||
| 2535 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2536 | #endif | ||
| 2537 | |||
| 2538 | /* | ||
| 2539 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2540 | * | ||
| 2541 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2542 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2543 | */ | ||
| 2544 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2545 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2546 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2547 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2548 | #else | ||
| 2549 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2550 | #endif | ||
| 2551 | |||
| 2552 | /* | ||
| 2553 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2554 | * | ||
| 2555 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2556 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2557 | */ | ||
| 2558 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2559 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2560 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2561 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2562 | #else | ||
| 2563 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2564 | #endif | ||
| 2565 | |||
| 2566 | /* | ||
| 2567 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2568 | * | ||
| 2569 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2570 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2571 | */ | ||
| 2572 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2573 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2574 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2575 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2576 | #else | ||
| 2577 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2578 | #endif | ||
| 2579 | |||
| 2580 | /* | ||
| 2581 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2582 | * | ||
| 2583 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2584 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2585 | */ | ||
| 2586 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2587 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2588 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2589 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2590 | #else | ||
| 2591 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2592 | #endif | ||
| 2593 | |||
| 2594 | /* | ||
| 2595 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2596 | * | ||
| 2597 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2598 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2599 | */ | ||
| 2600 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2601 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2602 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2603 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2604 | #else | ||
| 2605 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2606 | #endif | ||
| 2607 | |||
| 2608 | /* | ||
| 2609 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2610 | * | ||
| 2611 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2612 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2613 | */ | ||
| 2614 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2615 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2616 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2617 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2618 | #else | ||
| 2619 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2620 | #endif | ||
| 2621 | |||
| 2622 | /* | ||
| 2623 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 | ||
| 2624 | * | ||
| 2625 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2626 | * but later deprecated in Mac OS X 10.11.4 | ||
| 2627 | */ | ||
| 2628 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2629 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_11_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2630 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11_4 | ||
| 2631 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 DEPRECATED_ATTRIBUTE | ||
| 2632 | #else | ||
| 2633 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_11_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2634 | #endif | ||
| 2635 | |||
| 2636 | /* | ||
| 2637 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2638 | * | ||
| 2639 | * Used on declarations introduced in Mac OS X 10.12 | ||
| 2640 | */ | ||
| 2641 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2642 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_COMPAT_VERSION) | ||
| 2643 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 | ||
| 2644 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2645 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12 | ||
| 2646 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2647 | #else | ||
| 2648 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2649 | #endif | ||
| 2650 | |||
| 2651 | /* | ||
| 2652 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED | ||
| 2653 | * | ||
| 2654 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 2655 | * and deprecated in Mac OS X 10.12 | ||
| 2656 | */ | ||
| 2657 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2658 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2659 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2660 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2661 | #else | ||
| 2662 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 2663 | #endif | ||
| 2664 | |||
| 2665 | /* | ||
| 2666 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2667 | * | ||
| 2668 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2669 | * but later deprecated in Mac OS X 10.12 | ||
| 2670 | */ | ||
| 2671 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2672 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2673 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2674 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2675 | #else | ||
| 2676 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2677 | #endif | ||
| 2678 | |||
| 2679 | /* | ||
| 2680 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2681 | * | ||
| 2682 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2683 | * but later deprecated in Mac OS X 10.12 | ||
| 2684 | */ | ||
| 2685 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2686 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2687 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2688 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2689 | #else | ||
| 2690 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2691 | #endif | ||
| 2692 | |||
| 2693 | /* | ||
| 2694 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2695 | * | ||
| 2696 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2697 | * but later deprecated in Mac OS X 10.12 | ||
| 2698 | */ | ||
| 2699 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2700 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2701 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2702 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2703 | #else | ||
| 2704 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2705 | #endif | ||
| 2706 | |||
| 2707 | /* | ||
| 2708 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2709 | * | ||
| 2710 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2711 | * but later deprecated in Mac OS X 10.12 | ||
| 2712 | */ | ||
| 2713 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2714 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2715 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2716 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2717 | #else | ||
| 2718 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2719 | #endif | ||
| 2720 | |||
| 2721 | /* | ||
| 2722 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2723 | * | ||
| 2724 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2725 | * but later deprecated in Mac OS X 10.12 | ||
| 2726 | */ | ||
| 2727 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2728 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2729 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2730 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2731 | #else | ||
| 2732 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 2733 | #endif | ||
| 2734 | |||
| 2735 | /* | ||
| 2736 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2737 | * | ||
| 2738 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 2739 | * but later deprecated in Mac OS X 10.12 | ||
| 2740 | */ | ||
| 2741 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2742 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2743 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2744 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2745 | #else | ||
| 2746 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 2747 | #endif | ||
| 2748 | |||
| 2749 | /* | ||
| 2750 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2751 | * | ||
| 2752 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 2753 | * but later deprecated in Mac OS X 10.12 | ||
| 2754 | */ | ||
| 2755 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2756 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2757 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2758 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2759 | #else | ||
| 2760 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 2761 | #endif | ||
| 2762 | |||
| 2763 | /* | ||
| 2764 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2765 | * | ||
| 2766 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 2767 | * but later deprecated in Mac OS X 10.12 | ||
| 2768 | */ | ||
| 2769 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2770 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2771 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2772 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2773 | #else | ||
| 2774 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 2775 | #endif | ||
| 2776 | |||
| 2777 | /* | ||
| 2778 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2779 | * | ||
| 2780 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 2781 | * but later deprecated in Mac OS X 10.12 | ||
| 2782 | */ | ||
| 2783 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2784 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2785 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2786 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2787 | #else | ||
| 2788 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 2789 | #endif | ||
| 2790 | |||
| 2791 | /* | ||
| 2792 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2793 | * | ||
| 2794 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 2795 | * but later deprecated in Mac OS X 10.12 | ||
| 2796 | */ | ||
| 2797 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2798 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2799 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2800 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2801 | #else | ||
| 2802 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 2803 | #endif | ||
| 2804 | |||
| 2805 | /* | ||
| 2806 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2807 | * | ||
| 2808 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 2809 | * but later deprecated in Mac OS X 10.12 | ||
| 2810 | */ | ||
| 2811 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2812 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2813 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2814 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2815 | #else | ||
| 2816 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 2817 | #endif | ||
| 2818 | |||
| 2819 | /* | ||
| 2820 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2821 | * | ||
| 2822 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 2823 | * but later deprecated in Mac OS X 10.12 | ||
| 2824 | */ | ||
| 2825 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2826 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2827 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2828 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2829 | #else | ||
| 2830 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 2831 | #endif | ||
| 2832 | |||
| 2833 | /* | ||
| 2834 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2835 | * | ||
| 2836 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 2837 | * but later deprecated in Mac OS X 10.12 | ||
| 2838 | */ | ||
| 2839 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2840 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2841 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2842 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2843 | #else | ||
| 2844 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 2845 | #endif | ||
| 2846 | |||
| 2847 | /* | ||
| 2848 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2849 | * | ||
| 2850 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 2851 | * but later deprecated in Mac OS X 10.12 | ||
| 2852 | */ | ||
| 2853 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2854 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2855 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2856 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2857 | #else | ||
| 2858 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 2859 | #endif | ||
| 2860 | |||
| 2861 | /* | ||
| 2862 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2863 | * | ||
| 2864 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 2865 | * but later deprecated in Mac OS X 10.12 | ||
| 2866 | */ | ||
| 2867 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2868 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2869 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2870 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2871 | #else | ||
| 2872 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 2873 | #endif | ||
| 2874 | |||
| 2875 | /* | ||
| 2876 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2877 | * | ||
| 2878 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 2879 | * but later deprecated in Mac OS X 10.12 | ||
| 2880 | */ | ||
| 2881 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2882 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2883 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2884 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2885 | #else | ||
| 2886 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 2887 | #endif | ||
| 2888 | |||
| 2889 | /* | ||
| 2890 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 | ||
| 2891 | * | ||
| 2892 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 2893 | * but later deprecated in Mac OS X 10.12 | ||
| 2894 | */ | ||
| 2895 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2896 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2897 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 2898 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 DEPRECATED_ATTRIBUTE | ||
| 2899 | #else | ||
| 2900 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 2901 | #endif | ||
| 2902 | |||
| 2903 | /* | ||
| 2904 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2905 | * | ||
| 2906 | * Used on declarations introduced in Mac OS X 10.12.1 | ||
| 2907 | */ | ||
| 2908 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2909 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_1, __IPHONE_COMPAT_VERSION) | ||
| 2910 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_1 | ||
| 2911 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 2912 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_1 | ||
| 2913 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 2914 | #else | ||
| 2915 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2916 | #endif | ||
| 2917 | |||
| 2918 | /* | ||
| 2919 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED | ||
| 2920 | * | ||
| 2921 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 2922 | * and deprecated in Mac OS X 10.12.1 | ||
| 2923 | */ | ||
| 2924 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2925 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2926 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2927 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 2928 | #else | ||
| 2929 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 2930 | #endif | ||
| 2931 | |||
| 2932 | /* | ||
| 2933 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2934 | * | ||
| 2935 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 2936 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2937 | */ | ||
| 2938 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2939 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2940 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2941 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2942 | #else | ||
| 2943 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 2944 | #endif | ||
| 2945 | |||
| 2946 | /* | ||
| 2947 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2948 | * | ||
| 2949 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 2950 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2951 | */ | ||
| 2952 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2953 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2954 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2955 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2956 | #else | ||
| 2957 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 2958 | #endif | ||
| 2959 | |||
| 2960 | /* | ||
| 2961 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2962 | * | ||
| 2963 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 2964 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2965 | */ | ||
| 2966 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2967 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2968 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2969 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2970 | #else | ||
| 2971 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 2972 | #endif | ||
| 2973 | |||
| 2974 | /* | ||
| 2975 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2976 | * | ||
| 2977 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 2978 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2979 | */ | ||
| 2980 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2981 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2982 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2983 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2984 | #else | ||
| 2985 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 2986 | #endif | ||
| 2987 | |||
| 2988 | /* | ||
| 2989 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 2990 | * | ||
| 2991 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 2992 | * but later deprecated in Mac OS X 10.12.1 | ||
| 2993 | */ | ||
| 2994 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 2995 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 2996 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 2997 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 2998 | #else | ||
| 2999 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3000 | #endif | ||
| 3001 | |||
| 3002 | /* | ||
| 3003 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3004 | * | ||
| 3005 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3006 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3007 | */ | ||
| 3008 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3009 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3010 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3011 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3012 | #else | ||
| 3013 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3014 | #endif | ||
| 3015 | |||
| 3016 | /* | ||
| 3017 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3018 | * | ||
| 3019 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3020 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3021 | */ | ||
| 3022 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3023 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3024 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3025 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3026 | #else | ||
| 3027 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3028 | #endif | ||
| 3029 | |||
| 3030 | /* | ||
| 3031 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3032 | * | ||
| 3033 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3034 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3035 | */ | ||
| 3036 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3037 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3038 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3039 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3040 | #else | ||
| 3041 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3042 | #endif | ||
| 3043 | |||
| 3044 | /* | ||
| 3045 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3046 | * | ||
| 3047 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3048 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3049 | */ | ||
| 3050 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3051 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3052 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3053 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3054 | #else | ||
| 3055 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3056 | #endif | ||
| 3057 | |||
| 3058 | /* | ||
| 3059 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3060 | * | ||
| 3061 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3062 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3063 | */ | ||
| 3064 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3065 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3066 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3067 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3068 | #else | ||
| 3069 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3070 | #endif | ||
| 3071 | |||
| 3072 | /* | ||
| 3073 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3074 | * | ||
| 3075 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3076 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3077 | */ | ||
| 3078 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3079 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3080 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3081 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3082 | #else | ||
| 3083 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3084 | #endif | ||
| 3085 | |||
| 3086 | /* | ||
| 3087 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3088 | * | ||
| 3089 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3090 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3091 | */ | ||
| 3092 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3093 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3094 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3095 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3096 | #else | ||
| 3097 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3098 | #endif | ||
| 3099 | |||
| 3100 | /* | ||
| 3101 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3102 | * | ||
| 3103 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3104 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3105 | */ | ||
| 3106 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3107 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3108 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3109 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3110 | #else | ||
| 3111 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3112 | #endif | ||
| 3113 | |||
| 3114 | /* | ||
| 3115 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3116 | * | ||
| 3117 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3118 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3119 | */ | ||
| 3120 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3121 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3122 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3123 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3124 | #else | ||
| 3125 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3126 | #endif | ||
| 3127 | |||
| 3128 | /* | ||
| 3129 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3130 | * | ||
| 3131 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3132 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3133 | */ | ||
| 3134 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3135 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3136 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3137 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3138 | #else | ||
| 3139 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3140 | #endif | ||
| 3141 | |||
| 3142 | /* | ||
| 3143 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3144 | * | ||
| 3145 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3146 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3147 | */ | ||
| 3148 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3149 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3150 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3151 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3152 | #else | ||
| 3153 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3154 | #endif | ||
| 3155 | |||
| 3156 | /* | ||
| 3157 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3158 | * | ||
| 3159 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3160 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3161 | */ | ||
| 3162 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3163 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3164 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3165 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3166 | #else | ||
| 3167 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3168 | #endif | ||
| 3169 | |||
| 3170 | /* | ||
| 3171 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 | ||
| 3172 | * | ||
| 3173 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3174 | * but later deprecated in Mac OS X 10.12.1 | ||
| 3175 | */ | ||
| 3176 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3177 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3178 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_1 | ||
| 3179 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 DEPRECATED_ATTRIBUTE | ||
| 3180 | #else | ||
| 3181 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_1 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3182 | #endif | ||
| 3183 | |||
| 3184 | /* | ||
| 3185 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3186 | * | ||
| 3187 | * Used on declarations introduced in Mac OS X 10.12.2 | ||
| 3188 | */ | ||
| 3189 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3190 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_2, __IPHONE_COMPAT_VERSION) | ||
| 3191 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_2 | ||
| 3192 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3193 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_2 | ||
| 3194 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3195 | #else | ||
| 3196 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3197 | #endif | ||
| 3198 | |||
| 3199 | /* | ||
| 3200 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED | ||
| 3201 | * | ||
| 3202 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3203 | * and deprecated in Mac OS X 10.12.2 | ||
| 3204 | */ | ||
| 3205 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3206 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3207 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3208 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3209 | #else | ||
| 3210 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3211 | #endif | ||
| 3212 | |||
| 3213 | /* | ||
| 3214 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3215 | * | ||
| 3216 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3217 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3218 | */ | ||
| 3219 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3220 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3221 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3222 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3223 | #else | ||
| 3224 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3225 | #endif | ||
| 3226 | |||
| 3227 | /* | ||
| 3228 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3229 | * | ||
| 3230 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3231 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3232 | */ | ||
| 3233 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3234 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3235 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3236 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3237 | #else | ||
| 3238 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3239 | #endif | ||
| 3240 | |||
| 3241 | /* | ||
| 3242 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3243 | * | ||
| 3244 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3245 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3246 | */ | ||
| 3247 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3248 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3249 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3250 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3251 | #else | ||
| 3252 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3253 | #endif | ||
| 3254 | |||
| 3255 | /* | ||
| 3256 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3257 | * | ||
| 3258 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3259 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3260 | */ | ||
| 3261 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3262 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3263 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3264 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3265 | #else | ||
| 3266 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3267 | #endif | ||
| 3268 | |||
| 3269 | /* | ||
| 3270 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3271 | * | ||
| 3272 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3273 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3274 | */ | ||
| 3275 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3276 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3277 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3278 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3279 | #else | ||
| 3280 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3281 | #endif | ||
| 3282 | |||
| 3283 | /* | ||
| 3284 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3285 | * | ||
| 3286 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3287 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3288 | */ | ||
| 3289 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3290 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3291 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3292 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3293 | #else | ||
| 3294 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3295 | #endif | ||
| 3296 | |||
| 3297 | /* | ||
| 3298 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3299 | * | ||
| 3300 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3301 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3302 | */ | ||
| 3303 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3304 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3305 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3306 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3307 | #else | ||
| 3308 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3309 | #endif | ||
| 3310 | |||
| 3311 | /* | ||
| 3312 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3313 | * | ||
| 3314 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3315 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3316 | */ | ||
| 3317 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3318 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3319 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3320 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3321 | #else | ||
| 3322 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3323 | #endif | ||
| 3324 | |||
| 3325 | /* | ||
| 3326 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3327 | * | ||
| 3328 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3329 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3330 | */ | ||
| 3331 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3332 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3333 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3334 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3335 | #else | ||
| 3336 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3337 | #endif | ||
| 3338 | |||
| 3339 | /* | ||
| 3340 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3341 | * | ||
| 3342 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3343 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3344 | */ | ||
| 3345 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3346 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3347 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3348 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3349 | #else | ||
| 3350 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3351 | #endif | ||
| 3352 | |||
| 3353 | /* | ||
| 3354 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3355 | * | ||
| 3356 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3357 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3358 | */ | ||
| 3359 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3360 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3361 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3362 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3363 | #else | ||
| 3364 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3365 | #endif | ||
| 3366 | |||
| 3367 | /* | ||
| 3368 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3369 | * | ||
| 3370 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3371 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3372 | */ | ||
| 3373 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3374 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3375 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3376 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3377 | #else | ||
| 3378 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3379 | #endif | ||
| 3380 | |||
| 3381 | /* | ||
| 3382 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3383 | * | ||
| 3384 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3385 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3386 | */ | ||
| 3387 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3388 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3389 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3390 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3391 | #else | ||
| 3392 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3393 | #endif | ||
| 3394 | |||
| 3395 | /* | ||
| 3396 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3397 | * | ||
| 3398 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3399 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3400 | */ | ||
| 3401 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3402 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3403 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3404 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3405 | #else | ||
| 3406 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3407 | #endif | ||
| 3408 | |||
| 3409 | /* | ||
| 3410 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3411 | * | ||
| 3412 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3413 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3414 | */ | ||
| 3415 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3416 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3417 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3418 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3419 | #else | ||
| 3420 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3421 | #endif | ||
| 3422 | |||
| 3423 | /* | ||
| 3424 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3425 | * | ||
| 3426 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3427 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3428 | */ | ||
| 3429 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3430 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3431 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3432 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3433 | #else | ||
| 3434 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3435 | #endif | ||
| 3436 | |||
| 3437 | /* | ||
| 3438 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3439 | * | ||
| 3440 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3441 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3442 | */ | ||
| 3443 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3444 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3445 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3446 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3447 | #else | ||
| 3448 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3449 | #endif | ||
| 3450 | |||
| 3451 | /* | ||
| 3452 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3453 | * | ||
| 3454 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3455 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3456 | */ | ||
| 3457 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3458 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3459 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3460 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3461 | #else | ||
| 3462 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3463 | #endif | ||
| 3464 | |||
| 3465 | /* | ||
| 3466 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 | ||
| 3467 | * | ||
| 3468 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3469 | * but later deprecated in Mac OS X 10.12.2 | ||
| 3470 | */ | ||
| 3471 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3472 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3473 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_2 | ||
| 3474 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 DEPRECATED_ATTRIBUTE | ||
| 3475 | #else | ||
| 3476 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_2 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3477 | #endif | ||
| 3478 | |||
| 3479 | /* | ||
| 3480 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3481 | * | ||
| 3482 | * Used on declarations introduced in Mac OS X 10.12.4 | ||
| 3483 | */ | ||
| 3484 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3485 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_12_4, __IPHONE_COMPAT_VERSION) | ||
| 3486 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12_4 | ||
| 3487 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3488 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_12_4 | ||
| 3489 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3490 | #else | ||
| 3491 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3492 | #endif | ||
| 3493 | |||
| 3494 | /* | ||
| 3495 | * AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED | ||
| 3496 | * | ||
| 3497 | * Used on declarations introduced in Mac OS X 10.12.4, | ||
| 3498 | * and deprecated in Mac OS X 10.12.4 | ||
| 3499 | */ | ||
| 3500 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3501 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3502 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3503 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED DEPRECATED_ATTRIBUTE | ||
| 3504 | #else | ||
| 3505 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER_BUT_DEPRECATED AVAILABLE_MAC_OS_X_VERSION_10_12_4_AND_LATER | ||
| 3506 | #endif | ||
| 3507 | |||
| 3508 | /* | ||
| 3509 | * AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3510 | * | ||
| 3511 | * Used on declarations introduced in Mac OS X 10.0, | ||
| 3512 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3513 | */ | ||
| 3514 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3515 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3516 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3517 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3518 | #else | ||
| 3519 | #define AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER | ||
| 3520 | #endif | ||
| 3521 | |||
| 3522 | /* | ||
| 3523 | * AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3524 | * | ||
| 3525 | * Used on declarations introduced in Mac OS X 10.1, | ||
| 3526 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3527 | */ | ||
| 3528 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3529 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3530 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3531 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3532 | #else | ||
| 3533 | #define AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3534 | #endif | ||
| 3535 | |||
| 3536 | /* | ||
| 3537 | * AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3538 | * | ||
| 3539 | * Used on declarations introduced in Mac OS X 10.2, | ||
| 3540 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3541 | */ | ||
| 3542 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3543 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3544 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3545 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3546 | #else | ||
| 3547 | #define AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3548 | #endif | ||
| 3549 | |||
| 3550 | /* | ||
| 3551 | * AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3552 | * | ||
| 3553 | * Used on declarations introduced in Mac OS X 10.3, | ||
| 3554 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3555 | */ | ||
| 3556 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3557 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3558 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3559 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3560 | #else | ||
| 3561 | #define AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3562 | #endif | ||
| 3563 | |||
| 3564 | /* | ||
| 3565 | * AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3566 | * | ||
| 3567 | * Used on declarations introduced in Mac OS X 10.4, | ||
| 3568 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3569 | */ | ||
| 3570 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3571 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3572 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3573 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3574 | #else | ||
| 3575 | #define AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3576 | #endif | ||
| 3577 | |||
| 3578 | /* | ||
| 3579 | * AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3580 | * | ||
| 3581 | * Used on declarations introduced in Mac OS X 10.5, | ||
| 3582 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3583 | */ | ||
| 3584 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3585 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3586 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3587 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3588 | #else | ||
| 3589 | #define AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3590 | #endif | ||
| 3591 | |||
| 3592 | /* | ||
| 3593 | * AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3594 | * | ||
| 3595 | * Used on declarations introduced in Mac OS X 10.6, | ||
| 3596 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3597 | */ | ||
| 3598 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3599 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_6, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3600 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3601 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3602 | #else | ||
| 3603 | #define AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3604 | #endif | ||
| 3605 | |||
| 3606 | /* | ||
| 3607 | * AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3608 | * | ||
| 3609 | * Used on declarations introduced in Mac OS X 10.7, | ||
| 3610 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3611 | */ | ||
| 3612 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3613 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_7, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3614 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3615 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3616 | #else | ||
| 3617 | #define AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3618 | #endif | ||
| 3619 | |||
| 3620 | /* | ||
| 3621 | * AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3622 | * | ||
| 3623 | * Used on declarations introduced in Mac OS X 10.8, | ||
| 3624 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3625 | */ | ||
| 3626 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3627 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_8, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3628 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3629 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3630 | #else | ||
| 3631 | #define AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3632 | #endif | ||
| 3633 | |||
| 3634 | /* | ||
| 3635 | * AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3636 | * | ||
| 3637 | * Used on declarations introduced in Mac OS X 10.9, | ||
| 3638 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3639 | */ | ||
| 3640 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3641 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_9, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3642 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3643 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3644 | #else | ||
| 3645 | #define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3646 | #endif | ||
| 3647 | |||
| 3648 | /* | ||
| 3649 | * AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3650 | * | ||
| 3651 | * Used on declarations introduced in Mac OS X 10.10, | ||
| 3652 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3653 | */ | ||
| 3654 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3655 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3656 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3657 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3658 | #else | ||
| 3659 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3660 | #endif | ||
| 3661 | |||
| 3662 | /* | ||
| 3663 | * AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3664 | * | ||
| 3665 | * Used on declarations introduced in Mac OS X 10.10.2, | ||
| 3666 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3667 | */ | ||
| 3668 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3669 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3670 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3671 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3672 | #else | ||
| 3673 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_2_AND_LATER | ||
| 3674 | #endif | ||
| 3675 | |||
| 3676 | /* | ||
| 3677 | * AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3678 | * | ||
| 3679 | * Used on declarations introduced in Mac OS X 10.10.3, | ||
| 3680 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3681 | */ | ||
| 3682 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3683 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_10_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3684 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3685 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3686 | #else | ||
| 3687 | #define AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_10_3_AND_LATER | ||
| 3688 | #endif | ||
| 3689 | |||
| 3690 | /* | ||
| 3691 | * AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3692 | * | ||
| 3693 | * Used on declarations introduced in Mac OS X 10.11, | ||
| 3694 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3695 | */ | ||
| 3696 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3697 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3698 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3699 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3700 | #else | ||
| 3701 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3702 | #endif | ||
| 3703 | |||
| 3704 | /* | ||
| 3705 | * AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3706 | * | ||
| 3707 | * Used on declarations introduced in Mac OS X 10.11.2, | ||
| 3708 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3709 | */ | ||
| 3710 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3711 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3712 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3713 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3714 | #else | ||
| 3715 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_2_AND_LATER | ||
| 3716 | #endif | ||
| 3717 | |||
| 3718 | /* | ||
| 3719 | * AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3720 | * | ||
| 3721 | * Used on declarations introduced in Mac OS X 10.11.3, | ||
| 3722 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3723 | */ | ||
| 3724 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3725 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_3, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3726 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3727 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3728 | #else | ||
| 3729 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_3_AND_LATER | ||
| 3730 | #endif | ||
| 3731 | |||
| 3732 | /* | ||
| 3733 | * AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3734 | * | ||
| 3735 | * Used on declarations introduced in Mac OS X 10.11.4, | ||
| 3736 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3737 | */ | ||
| 3738 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3739 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_11_4, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3740 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3741 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3742 | #else | ||
| 3743 | #define AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_11_4_AND_LATER | ||
| 3744 | #endif | ||
| 3745 | |||
| 3746 | /* | ||
| 3747 | * AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3748 | * | ||
| 3749 | * Used on declarations introduced in Mac OS X 10.12, | ||
| 3750 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3751 | */ | ||
| 3752 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3753 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3754 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3755 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3756 | #else | ||
| 3757 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3758 | #endif | ||
| 3759 | |||
| 3760 | /* | ||
| 3761 | * AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3762 | * | ||
| 3763 | * Used on declarations introduced in Mac OS X 10.12.1, | ||
| 3764 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3765 | */ | ||
| 3766 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3767 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_1, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3768 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3769 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3770 | #else | ||
| 3771 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_1_AND_LATER | ||
| 3772 | #endif | ||
| 3773 | |||
| 3774 | /* | ||
| 3775 | * AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 | ||
| 3776 | * | ||
| 3777 | * Used on declarations introduced in Mac OS X 10.12.2, | ||
| 3778 | * but later deprecated in Mac OS X 10.12.4 | ||
| 3779 | */ | ||
| 3780 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3781 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_12_2, __MAC_10_12_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3782 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12_4 | ||
| 3783 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 DEPRECATED_ATTRIBUTE | ||
| 3784 | #else | ||
| 3785 | #define AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_12_4 AVAILABLE_MAC_OS_X_VERSION_10_12_2_AND_LATER | ||
| 3786 | #endif | ||
| 3787 | |||
| 3788 | /* | ||
| 3789 | * AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3790 | * | ||
| 3791 | * Used on declarations introduced in Mac OS X 10.13 | ||
| 3792 | */ | ||
| 3793 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3794 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_13, __IPHONE_COMPAT_VERSION) | ||
| 3795 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_13 | ||
| 3796 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3797 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_13 | ||
| 3798 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3799 | #else | ||
| 3800 | #define AVAILABLE_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3801 | #endif | ||
| 3802 | |||
| 3803 | /* | ||
| 3804 | * AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3805 | * | ||
| 3806 | * Used on declarations introduced in Mac OS X 10.14 | ||
| 3807 | */ | ||
| 3808 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3809 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_14, __IPHONE_COMPAT_VERSION) | ||
| 3810 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_14 | ||
| 3811 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3812 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_14 | ||
| 3813 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3814 | #else | ||
| 3815 | #define AVAILABLE_MAC_OS_X_VERSION_10_14_AND_LATER | ||
| 3816 | #endif | ||
| 3817 | |||
| 3818 | /* | ||
| 3819 | * AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3820 | * | ||
| 3821 | * Used on declarations introduced in Mac OS X 10.15 | ||
| 3822 | */ | ||
| 3823 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3824 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER __OSX_AVAILABLE_STARTING(__MAC_10_15, __IPHONE_COMPAT_VERSION) | ||
| 3825 | #elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_15 | ||
| 3826 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER UNAVAILABLE_ATTRIBUTE | ||
| 3827 | #elif MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_15 | ||
| 3828 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER WEAK_IMPORT_ATTRIBUTE | ||
| 3829 | #else | ||
| 3830 | #define AVAILABLE_MAC_OS_X_VERSION_10_15_AND_LATER | ||
| 3831 | #endif | ||
| 3832 | |||
| 3833 | /* | ||
| 3834 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3835 | * | ||
| 3836 | * Used on types deprecated in Mac OS X 10.1 | ||
| 3837 | */ | ||
| 3838 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3839 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_1, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3840 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_1 | ||
| 3841 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3842 | #else | ||
| 3843 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_1_AND_LATER | ||
| 3844 | #endif | ||
| 3845 | |||
| 3846 | /* | ||
| 3847 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3848 | * | ||
| 3849 | * Used on types deprecated in Mac OS X 10.2 | ||
| 3850 | */ | ||
| 3851 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3852 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_2, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3853 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2 | ||
| 3854 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3855 | #else | ||
| 3856 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_2_AND_LATER | ||
| 3857 | #endif | ||
| 3858 | |||
| 3859 | /* | ||
| 3860 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3861 | * | ||
| 3862 | * Used on types deprecated in Mac OS X 10.3 | ||
| 3863 | */ | ||
| 3864 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3865 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3866 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 | ||
| 3867 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3868 | #else | ||
| 3869 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_3_AND_LATER | ||
| 3870 | #endif | ||
| 3871 | |||
| 3872 | /* | ||
| 3873 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3874 | * | ||
| 3875 | * Used on types deprecated in Mac OS X 10.4 | ||
| 3876 | */ | ||
| 3877 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3878 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3879 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4 | ||
| 3880 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3881 | #else | ||
| 3882 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_4_AND_LATER | ||
| 3883 | #endif | ||
| 3884 | |||
| 3885 | |||
| 3886 | /* | ||
| 3887 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3888 | * | ||
| 3889 | * Used on types deprecated in Mac OS X 10.5 | ||
| 3890 | */ | ||
| 3891 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3892 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3893 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 | ||
| 3894 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3895 | #else | ||
| 3896 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_5_AND_LATER | ||
| 3897 | #endif | ||
| 3898 | |||
| 3899 | /* | ||
| 3900 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3901 | * | ||
| 3902 | * Used on types deprecated in Mac OS X 10.6 | ||
| 3903 | */ | ||
| 3904 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3905 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_6, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3906 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 | ||
| 3907 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3908 | #else | ||
| 3909 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_6_AND_LATER | ||
| 3910 | #endif | ||
| 3911 | |||
| 3912 | /* | ||
| 3913 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3914 | * | ||
| 3915 | * Used on types deprecated in Mac OS X 10.7 | ||
| 3916 | */ | ||
| 3917 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3918 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_7, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3919 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 | ||
| 3920 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3921 | #else | ||
| 3922 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER | ||
| 3923 | #endif | ||
| 3924 | |||
| 3925 | /* | ||
| 3926 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3927 | * | ||
| 3928 | * Used on types deprecated in Mac OS X 10.8 | ||
| 3929 | */ | ||
| 3930 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3931 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3932 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_8 | ||
| 3933 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3934 | #else | ||
| 3935 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_8_AND_LATER | ||
| 3936 | #endif | ||
| 3937 | |||
| 3938 | /* | ||
| 3939 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3940 | * | ||
| 3941 | * Used on types deprecated in Mac OS X 10.9 | ||
| 3942 | */ | ||
| 3943 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3944 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3945 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_9 | ||
| 3946 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3947 | #else | ||
| 3948 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER | ||
| 3949 | #endif | ||
| 3950 | |||
| 3951 | /* | ||
| 3952 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3953 | * | ||
| 3954 | * Used on types deprecated in Mac OS X 10.10 | ||
| 3955 | */ | ||
| 3956 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3957 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_10, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3958 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_10 | ||
| 3959 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3960 | #else | ||
| 3961 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_10_AND_LATER | ||
| 3962 | #endif | ||
| 3963 | |||
| 3964 | /* | ||
| 3965 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3966 | * | ||
| 3967 | * Used on types deprecated in Mac OS X 10.11 | ||
| 3968 | */ | ||
| 3969 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3970 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_11, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3971 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_11 | ||
| 3972 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3973 | #else | ||
| 3974 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_11_AND_LATER | ||
| 3975 | #endif | ||
| 3976 | |||
| 3977 | /* | ||
| 3978 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3979 | * | ||
| 3980 | * Used on types deprecated in Mac OS X 10.12 | ||
| 3981 | */ | ||
| 3982 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3983 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_12, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3984 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3985 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3986 | #else | ||
| 3987 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_12_AND_LATER | ||
| 3988 | #endif | ||
| 3989 | |||
| 3990 | /* | ||
| 3991 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 3992 | * | ||
| 3993 | * Used on types deprecated in Mac OS X 10.13 | ||
| 3994 | */ | ||
| 3995 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 3996 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_13, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 3997 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12 | ||
| 3998 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 3999 | #else | ||
| 4000 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_13_AND_LATER | ||
| 4001 | #endif | ||
| 4002 | |||
| 4003 | /* | ||
| 4004 | * DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4005 | * | ||
| 4006 | * Used on types deprecated in Mac OS X 10.14.4 | ||
| 4007 | */ | ||
| 4008 | #if __AVAILABILITY_MACROS_USES_AVAILABILITY | ||
| 4009 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_14_4, __IPHONE_COMPAT_VERSION, __IPHONE_COMPAT_VERSION) | ||
| 4010 | #elif MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14_4 | ||
| 4011 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER DEPRECATED_ATTRIBUTE | ||
| 4012 | #else | ||
| 4013 | #define DEPRECATED_IN_MAC_OS_X_VERSION_10_14_4_AND_LATER | ||
| 4014 | #endif | ||
| 4015 | |||
| 4016 | #endif /* __AVAILABILITYMACROS__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/AvailabilityVersions.h+16| ... | @@ -62,7 +62,11 @@ | ... | @@ -62,7 +62,11 @@ |
| 62 | #define __MAC_11_3 110300 | 62 | #define __MAC_11_3 110300 |
| 63 | #define __MAC_11_4 110400 | 63 | #define __MAC_11_4 110400 |
| 64 | #define __MAC_11_5 110500 | 64 | #define __MAC_11_5 110500 |
| 65 | #define __MAC_11_6 110600 | ||
| 65 | #define __MAC_12_0 120000 | 66 | #define __MAC_12_0 120000 |
| 67 | #define __MAC_12_1 120100 | ||
| 68 | #define __MAC_12_2 120200 | ||
| 69 | #define __MAC_12_3 120300 | ||
| 66 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ | 70 | /* __MAC_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 67 | 71 | ||
| 68 | #define __IPHONE_2_0 20000 | 72 | #define __IPHONE_2_0 20000 |
| ... | @@ -121,6 +125,10 @@ | ... | @@ -121,6 +125,10 @@ |
| 121 | #define __IPHONE_14_7 140700 | 125 | #define __IPHONE_14_7 140700 |
| 122 | #define __IPHONE_14_8 140800 | 126 | #define __IPHONE_14_8 140800 |
| 123 | #define __IPHONE_15_0 150000 | 127 | #define __IPHONE_15_0 150000 |
| 128 | #define __IPHONE_15_1 150100 | ||
| 129 | #define __IPHONE_15_2 150200 | ||
| 130 | #define __IPHONE_15_3 150300 | ||
| 131 | #define __IPHONE_15_4 150400 | ||
| 124 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ | 132 | /* __IPHONE_NA is not defined to a value but is used as a token by macros to indicate that the API is unavailable */ |
| 125 | 133 | ||
| 126 | #define __TVOS_9_0 90000 | 134 | #define __TVOS_9_0 90000 |
| ... | @@ -152,6 +160,10 @@ | ... | @@ -152,6 +160,10 @@ |
| 152 | #define __TVOS_14_6 140600 | 160 | #define __TVOS_14_6 140600 |
| 153 | #define __TVOS_14_7 140700 | 161 | #define __TVOS_14_7 140700 |
| 154 | #define __TVOS_15_0 150000 | 162 | #define __TVOS_15_0 150000 |
| 163 | #define __TVOS_15_1 150100 | ||
| 164 | #define __TVOS_15_2 150200 | ||
| 165 | #define __TVOS_15_3 150300 | ||
| 166 | #define __TVOS_15_4 150400 | ||
| 155 | 167 | ||
| 156 | #define __WATCHOS_1_0 10000 | 168 | #define __WATCHOS_1_0 10000 |
| 157 | #define __WATCHOS_2_0 20000 | 169 | #define __WATCHOS_2_0 20000 |
| ... | @@ -180,6 +192,10 @@ | ... | @@ -180,6 +192,10 @@ |
| 180 | #define __WATCHOS_7_5 70500 | 192 | #define __WATCHOS_7_5 70500 |
| 181 | #define __WATCHOS_7_6 70600 | 193 | #define __WATCHOS_7_6 70600 |
| 182 | #define __WATCHOS_8_0 80000 | 194 | #define __WATCHOS_8_0 80000 |
| 195 | #define __WATCHOS_8_1 80100 | ||
| 196 | #define __WATCHOS_8_3 80300 | ||
| 197 | #define __WATCHOS_8_4 80400 | ||
| 198 | #define __WATCHOS_8_5 80500 | ||
| 183 | 199 | ||
| 184 | /* | 200 | /* |
| 185 | * Set up standard Mac OS X versions | 201 | * Set up standard Mac OS X versions |
lib/libc/include/any-macos.12-any/TargetConditionals.h+32-23| ... | @@ -73,25 +73,26 @@ | ... | @@ -73,25 +73,26 @@ |
| 73 | * TARGET_OS_WATCH - Generated code will run under Apple Watch OS | 73 | * TARGET_OS_WATCH - Generated code will run under Apple Watch OS |
| 74 | * TARGET_OS_BRIDGE - Generated code will run under Bridge devices | 74 | * TARGET_OS_BRIDGE - Generated code will run under Bridge devices |
| 75 | * TARGET_OS_MACCATALYST - Generated code will run under macOS | 75 | * TARGET_OS_MACCATALYST - Generated code will run under macOS |
| 76 | * TARGET_OS_DRIVERKIT - Generated code will run under macOS, iOS, Apple TV OS, or Apple Watch OS | ||
| 76 | * TARGET_OS_SIMULATOR - Generated code will run under a simulator | 77 | * TARGET_OS_SIMULATOR - Generated code will run under a simulator |
| 77 | * | 78 | * |
| 78 | * TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead | 79 | * TARGET_OS_EMBEDDED - DEPRECATED: Use TARGET_OS_IPHONE and/or TARGET_OS_SIMULATOR instead |
| 79 | * TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR | 80 | * TARGET_IPHONE_SIMULATOR - DEPRECATED: Same as TARGET_OS_SIMULATOR |
| 80 | * TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH | 81 | * TARGET_OS_NANO - DEPRECATED: Same as TARGET_OS_WATCH |
| 81 | * | 82 | * |
| 82 | * +---------------------------------------------------------------------+ | 83 | * +---------------------------------------------------------------------------+ |
| 83 | * | TARGET_OS_MAC | | 84 | * | TARGET_OS_MAC | |
| 84 | * | +---+ +-----------------------------------------------+ +---------+ | | 85 | * | +-----+ +-------------------------------------------------+ +-----------+ | |
| 85 | * | | | | TARGET_OS_IPHONE | | | | | 86 | * | | | | TARGET_OS_IPHONE | | | | |
| 86 | * | | | | +---------------+ +----+ +-------+ +--------+ | | | | | 87 | * | | | | +-----------------+ +----+ +-------+ +--------+ | | | | |
| 87 | * | | | | | IOS | | | | | | | | | | | | 88 | * | | | | | IOS | | | | | | | | | | | |
| 88 | * | |OSX| | |+-------------+| | TV | | WATCH | | BRIDGE | | |DRIVERKIT| | | 89 | * | | OSX | | | +-------------+ | | TV | | WATCH | | BRIDGE | | | DRIVERKIT | | |
| 89 | * | | | | || MACCATALYST || | | | | | | | | | | | 90 | * | | | | | | MACCATALYST | | | | | | | | | | | | |
| 90 | * | | | | |+-------------+| | | | | | | | | | | | 91 | * | | | | | +-------------+ | | | | | | | | | | | |
| 91 | * | | | | +---------------+ +----+ +-------+ +--------+ | | | | | 92 | * | | | | +-----------------+ +----+ +-------+ +--------+ | | | | |
| 92 | * | +---+ +-----------------------------------------------+ +---------+ | | 93 | * | +-----+ +-------------------------------------------------+ +-----------+ | |
| 93 | * +---------------------------------------------------------------------+ | 94 | * +---------------------------------------------------------------------------+ |
| 94 | * | 95 | |
| 95 | * TARGET_RT_* | 96 | * TARGET_RT_* |
| 96 | * These conditionals specify in which runtime the generated code will | 97 | * These conditionals specify in which runtime the generated code will |
| 97 | * run. This is needed when the OS and CPU support more than one runtime | 98 | * run. This is needed when the OS and CPU support more than one runtime |
| ... | @@ -112,13 +113,13 @@ | ... | @@ -112,13 +113,13 @@ |
| 112 | * __is_target_os | 113 | * __is_target_os |
| 113 | * __is_target_environment | 114 | * __is_target_environment |
| 114 | * | 115 | * |
| 115 | * “-target=x86_64-apple-ios12-macabi” | 116 | * "-target=x86_64-apple-ios12-macabi" |
| 116 | * TARGET_OS_MAC=1 | 117 | * TARGET_OS_MAC=1 |
| 117 | * TARGET_OS_IPHONE=1 | 118 | * TARGET_OS_IPHONE=1 |
| 118 | * TARGET_OS_IOS=1 | 119 | * TARGET_OS_IOS=1 |
| 119 | * TARGET_OS_MACCATALYST=1 | 120 | * TARGET_OS_MACCATALYST=1 |
| 120 | * | 121 | * |
| 121 | * “-target=x86_64-apple-ios12-simulator” | 122 | * "-target=x86_64-apple-ios12-simulator" |
| 122 | * TARGET_OS_MAC=1 | 123 | * TARGET_OS_MAC=1 |
| 123 | * TARGET_OS_IPHONE=1 | 124 | * TARGET_OS_IPHONE=1 |
| 124 | * TARGET_OS_IOS=1 | 125 | * TARGET_OS_IOS=1 |
| ... | @@ -135,9 +136,9 @@ | ... | @@ -135,9 +136,9 @@ |
| 135 | #if __has_builtin(__is_target_os) | 136 | #if __has_builtin(__is_target_os) |
| 136 | #if __has_builtin(__is_target_environment) | 137 | #if __has_builtin(__is_target_environment) |
| 137 | 138 | ||
| 138 | /* “-target=x86_64-apple-ios12-macabi” */ | 139 | /* "-target=x86_64-apple-ios12-macabi" */ |
| 139 | /* “-target=arm64-apple-ios12-macabi” */ | 140 | /* "-target=arm64-apple-ios12-macabi" */ |
| 140 | /* “-target=arm64e-apple-ios12-macabi” */ | 141 | /* "-target=arm64e-apple-ios12-macabi" */ |
| 141 | #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi) | 142 | #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(macabi) |
| 142 | #define TARGET_OS_OSX 0 | 143 | #define TARGET_OS_OSX 0 |
| 143 | #define TARGET_OS_IPHONE 1 | 144 | #define TARGET_OS_IPHONE 1 |
| ... | @@ -150,6 +151,7 @@ | ... | @@ -150,6 +151,7 @@ |
| 150 | #define TARGET_OS_RTKIT 0 | 151 | #define TARGET_OS_RTKIT 0 |
| 151 | #define TARGET_OS_MACCATALYST 1 | 152 | #define TARGET_OS_MACCATALYST 1 |
| 152 | #define TARGET_OS_MACCATALYST 1 | 153 | #define TARGET_OS_MACCATALYST 1 |
| 154 | |||
| 153 | #ifndef TARGET_OS_UIKITFORMAC | 155 | #ifndef TARGET_OS_UIKITFORMAC |
| 154 | #define TARGET_OS_UIKITFORMAC 1 | 156 | #define TARGET_OS_UIKITFORMAC 1 |
| 155 | #endif | 157 | #endif |
| ... | @@ -157,8 +159,10 @@ | ... | @@ -157,8 +159,10 @@ |
| 157 | #define DYNAMIC_TARGETS_ENABLED 1 | 159 | #define DYNAMIC_TARGETS_ENABLED 1 |
| 158 | #endif | 160 | #endif |
| 159 | 161 | ||
| 160 | /* “-target=x86_64-apple-ios12-simulator” */ | 162 | /* "-target=x86_64-apple-ios12-simulator" */ |
| 161 | #if __is_target_arch(x86_64) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(simulator) | 163 | /* "-target=arm64-apple-ios12-simulator" */ |
| 164 | /* "-target=arm64e-apple-ios12-simulator" */ | ||
| 165 | #if (__is_target_arch(x86_64) || __is_target_arch(arm64) || __is_target_arch(arm64e)) && __is_target_vendor(apple) && __is_target_os(ios) && __is_target_environment(simulator) | ||
| 162 | #define TARGET_OS_OSX 0 | 166 | #define TARGET_OS_OSX 0 |
| 163 | #define TARGET_OS_IPHONE 1 | 167 | #define TARGET_OS_IPHONE 1 |
| 164 | #define TARGET_OS_IOS 1 | 168 | #define TARGET_OS_IOS 1 |
| ... | @@ -170,6 +174,7 @@ | ... | @@ -170,6 +174,7 @@ |
| 170 | #define TARGET_OS_RTKIT 0 | 174 | #define TARGET_OS_RTKIT 0 |
| 171 | #define TARGET_OS_MACCATALYST 0 | 175 | #define TARGET_OS_MACCATALYST 0 |
| 172 | #define TARGET_OS_MACCATALYST 0 | 176 | #define TARGET_OS_MACCATALYST 0 |
| 177 | |||
| 173 | #ifndef TARGET_OS_UIKITFORMAC | 178 | #ifndef TARGET_OS_UIKITFORMAC |
| 174 | #define TARGET_OS_UIKITFORMAC 0 | 179 | #define TARGET_OS_UIKITFORMAC 0 |
| 175 | #endif | 180 | #endif |
| ... | @@ -177,9 +182,11 @@ | ... | @@ -177,9 +182,11 @@ |
| 177 | #define DYNAMIC_TARGETS_ENABLED 1 | 182 | #define DYNAMIC_TARGETS_ENABLED 1 |
| 178 | #endif | 183 | #endif |
| 179 | 184 | ||
| 180 | /* -target=x86_64-apple-driverkit19.0 */ | 185 | |
| 181 | /* -target=arm64-apple-driverkit19.0 */ | 186 | |
| 182 | /* -target=arm64e-apple-driverkit19.0 */ | 187 | /* "-target=x86_64-apple-driverkit19.0" */ |
| 188 | /* "-target=arm64-apple-driverkit19.0" */ | ||
| 189 | /* "-target=arm64e-apple-driverkit19.0" */ | ||
| 183 | #if __is_target_vendor(apple) && __is_target_os(driverkit) | 190 | #if __is_target_vendor(apple) && __is_target_os(driverkit) |
| 184 | #define TARGET_OS_OSX 0 | 191 | #define TARGET_OS_OSX 0 |
| 185 | #define TARGET_OS_IPHONE 0 | 192 | #define TARGET_OS_IPHONE 0 |
| ... | @@ -192,6 +199,7 @@ | ... | @@ -192,6 +199,7 @@ |
| 192 | #define TARGET_OS_RTKIT 0 | 199 | #define TARGET_OS_RTKIT 0 |
| 193 | #define TARGET_OS_MACCATALYST 0 | 200 | #define TARGET_OS_MACCATALYST 0 |
| 194 | #define TARGET_OS_MACCATALYST 0 | 201 | #define TARGET_OS_MACCATALYST 0 |
| 202 | |||
| 195 | #ifndef TARGET_OS_UIKITFORMAC | 203 | #ifndef TARGET_OS_UIKITFORMAC |
| 196 | #define TARGET_OS_UIKITFORMAC 0 | 204 | #define TARGET_OS_UIKITFORMAC 0 |
| 197 | #endif | 205 | #endif |
| ... | @@ -229,6 +237,7 @@ | ... | @@ -229,6 +237,7 @@ |
| 229 | #define TARGET_OS_TV 0 | 237 | #define TARGET_OS_TV 0 |
| 230 | #define TARGET_OS_MACCATALYST 0 | 238 | #define TARGET_OS_MACCATALYST 0 |
| 231 | #define TARGET_OS_MACCATALYST 0 | 239 | #define TARGET_OS_MACCATALYST 0 |
| 240 | |||
| 232 | #ifndef TARGET_OS_UIKITFORMAC | 241 | #ifndef TARGET_OS_UIKITFORMAC |
| 233 | #define TARGET_OS_UIKITFORMAC 0 | 242 | #define TARGET_OS_UIKITFORMAC 0 |
| 234 | #endif | 243 | #endif |
lib/libc/include/any-macos.12-any/assert.h deleted-117| ... | @@ -1,117 +0,0 @@ | ||
| 1 | /*- | ||
| 2 | * Copyright (c) 1992, 1993 | ||
| 3 | *	The Regents of the University of California. All rights reserved. | ||
| 4 | * (c) UNIX System Laboratories, Inc. | ||
| 5 | * All or some portions of this file are derived from material licensed | ||
| 6 | * to the University of California by American Telephone and Telegraph | ||
| 7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 8 | * the permission of UNIX System Laboratories, Inc. | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or without | ||
| 11 | * modification, are permitted provided that the following conditions | ||
| 12 | * are met: | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in the | ||
| 17 | * documentation and/or other materials provided with the distribution. | ||
| 18 | * 3. All advertising materials mentioning features or use of this software | ||
| 19 | * must display the following acknowledgement: | ||
| 20 | *	This product includes software developed by the University of | ||
| 21 | *	California, Berkeley and its contributors. | ||
| 22 | * 4. Neither the name of the University nor the names of its contributors | ||
| 23 | * may be used to endorse or promote products derived from this software | ||
| 24 | * without specific prior written permission. | ||
| 25 | * | ||
| 26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 36 | * SUCH DAMAGE. | ||
| 37 | * | ||
| 38 | *	@(#)assert.h	8.2 (Berkeley) 1/21/94 | ||
| 39 | * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $ | ||
| 40 | */ | ||
| 41 | |||
| 42 | #include <sys/cdefs.h> | ||
| 43 | #ifdef __cplusplus | ||
| 44 | #include <stdlib.h> | ||
| 45 | #endif /* __cplusplus */ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Unlike other ANSI header files, <assert.h> may usefully be included | ||
| 49 | * multiple times, with and without NDEBUG defined. | ||
| 50 | */ | ||
| 51 | |||
| 52 | #undef assert | ||
| 53 | #undef __assert | ||
| 54 | |||
| 55 | #ifdef NDEBUG | ||
| 56 | #define	assert(e)	((void)0) | ||
| 57 | #else | ||
| 58 | |||
| 59 | #ifdef __FILE_NAME__ | ||
| 60 | #define __ASSERT_FILE_NAME __FILE_NAME__ | ||
| 61 | #else /* __FILE_NAME__ */ | ||
| 62 | #define __ASSERT_FILE_NAME __FILE__ | ||
| 63 | #endif /* __FILE_NAME__ */ | ||
| 64 | |||
| 65 | #ifndef __GNUC__ | ||
| 66 | |||
| 67 | __BEGIN_DECLS | ||
| 68 | #ifndef __cplusplus | ||
| 69 | void abort(void) __dead2 __cold; | ||
| 70 | #endif /* !__cplusplus */ | ||
| 71 | int printf(const char * __restrict, ...); | ||
| 72 | __END_DECLS | ||
| 73 | |||
| 74 | #define assert(e) \ | ||
| 75 | ((void) ((e) ? ((void)0) : __assert (#e, __ASSERT_FILE_NAME, __LINE__))) | ||
| 76 | #define __assert(e, file, line) \ | ||
| 77 | ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort()) | ||
| 78 | |||
| 79 | #else /* __GNUC__ */ | ||
| 80 | |||
| 81 | __BEGIN_DECLS | ||
| 82 | void __assert_rtn(const char *, const char *, int, const char *) __dead2 __cold __disable_tail_calls; | ||
| 83 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070) | ||
| 84 | void __eprintf(const char *, const char *, unsigned, const char *) __dead2 __cold; | ||
| 85 | #endif | ||
| 86 | __END_DECLS | ||
| 87 | |||
| 88 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070) | ||
| 89 | #define __assert(e, file, line) \ | ||
| 90 | __eprintf ("%s:%d: failed assertion `%s'\n", file, line, e) | ||
| 91 | #else | ||
| 92 | /* 8462256: modified __assert_rtn() replaces deprecated __eprintf() */ | ||
| 93 | #define __assert(e, file, line) \ | ||
| 94 | __assert_rtn ((const char *)-1L, file, line, e) | ||
| 95 | #endif | ||
| 96 | |||
| 97 | #if __DARWIN_UNIX03 | ||
| 98 | #define	assert(e) \ | ||
| 99 | (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0) | ||
| 100 | #else /* !__DARWIN_UNIX03 */ | ||
| 101 | #define assert(e) \ | ||
| 102 | (__builtin_expect(!(e), 0) ? __assert (#e, __ASSERT_FILE_NAME, __LINE__) : (void)0) | ||
| 103 | #endif /* __DARWIN_UNIX03 */ | ||
| 104 | |||
| 105 | #endif /* __GNUC__ */ | ||
| 106 | #endif /* NDEBUG */ | ||
| 107 | |||
| 108 | #ifndef _ASSERT_H_ | ||
| 109 | #define _ASSERT_H_ | ||
| 110 | |||
| 111 | #ifndef __cplusplus | ||
| 112 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L | ||
| 113 | #define static_assert _Static_assert | ||
| 114 | #endif /* __STDC_VERSION__ */ | ||
| 115 | #endif /* !__cplusplus */ | ||
| 116 | |||
| 117 | #endif /* _ASSERT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/copyfile.h created+136| ... | @@ -0,0 +1,136 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2004-2021 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 | #ifndef _COPYFILE_H_ /* version 0.1 */ | ||
| 24 | #define _COPYFILE_H_ | ||
| 25 | |||
| 26 | /* | ||
| 27 | * This API facilitates the copying of files and their associated | ||
| 28 | * metadata. There are several open source projects that need | ||
| 29 | * modifications to support preserving extended attributes and ACLs | ||
| 30 | * and this API collapses several hundred lines of modifications into | ||
| 31 | * one or two calls. | ||
| 32 | */ | ||
| 33 | |||
| 34 | /* private */ | ||
| 35 | #include <sys/cdefs.h> | ||
| 36 | #include <stdint.h> | ||
| 37 | |||
| 38 | __BEGIN_DECLS | ||
| 39 | struct _copyfile_state; | ||
| 40 | typedef struct _copyfile_state * copyfile_state_t; | ||
| 41 | typedef uint32_t copyfile_flags_t; | ||
| 42 | |||
| 43 | /* public */ | ||
| 44 | |||
| 45 | /* receives: | ||
| 46 | * from	path to source file system object | ||
| 47 | * to		path to destination file system object | ||
| 48 | * state	opaque blob for future extensibility | ||
| 49 | *		Must be NULL in current implementation | ||
| 50 | * flags	(described below) | ||
| 51 | * returns: | ||
| 52 | * int	negative for error | ||
| 53 | */ | ||
| 54 | |||
| 55 | int copyfile(const char *from, const char *to, copyfile_state_t state, copyfile_flags_t flags); | ||
| 56 | int fcopyfile(int from_fd, int to_fd, copyfile_state_t, copyfile_flags_t flags); | ||
| 57 | |||
| 58 | int copyfile_state_free(copyfile_state_t); | ||
| 59 | copyfile_state_t copyfile_state_alloc(void); | ||
| 60 | |||
| 61 | |||
| 62 | int copyfile_state_get(copyfile_state_t s, uint32_t flag, void * dst); | ||
| 63 | int copyfile_state_set(copyfile_state_t s, uint32_t flag, const void * src); | ||
| 64 | |||
| 65 | typedef int (*copyfile_callback_t)(int, int, copyfile_state_t, const char *, const char *, void *); | ||
| 66 | |||
| 67 | #define COPYFILE_STATE_SRC_FD		1 | ||
| 68 | #define COPYFILE_STATE_SRC_FILENAME	2 | ||
| 69 | #define COPYFILE_STATE_DST_FD		3 | ||
| 70 | #define COPYFILE_STATE_DST_FILENAME	4 | ||
| 71 | #define COPYFILE_STATE_QUARANTINE	5 | ||
| 72 | #define	COPYFILE_STATE_STATUS_CB	6 | ||
| 73 | #define	COPYFILE_STATE_STATUS_CTX	7 | ||
| 74 | #define	COPYFILE_STATE_COPIED		8 | ||
| 75 | #define	COPYFILE_STATE_XATTRNAME	9 | ||
| 76 | #define	COPYFILE_STATE_WAS_CLONED	10 | ||
| 77 | #define	COPYFILE_STATE_SRC_BSIZE	11 | ||
| 78 | #define	COPYFILE_STATE_DST_BSIZE	12 | ||
| 79 | #define	COPYFILE_STATE_BSIZE		13 | ||
| 80 | |||
| 81 | |||
| 82 | #define	COPYFILE_DISABLE_VAR	"COPYFILE_DISABLE" | ||
| 83 | |||
| 84 | /* flags for copyfile */ | ||
| 85 | |||
| 86 | #define COPYFILE_ACL	 (1<<0) | ||
| 87 | #define COPYFILE_STAT	 (1<<1) | ||
| 88 | #define COPYFILE_XATTR	 (1<<2) | ||
| 89 | #define COPYFILE_DATA	 (1<<3) | ||
| 90 | |||
| 91 | #define COPYFILE_SECURITY (COPYFILE_STAT | COPYFILE_ACL) | ||
| 92 | #define COPYFILE_METADATA (COPYFILE_SECURITY | COPYFILE_XATTR) | ||
| 93 | #define COPYFILE_ALL	 (COPYFILE_METADATA | COPYFILE_DATA) | ||
| 94 | |||
| 95 | #define	COPYFILE_RECURSIVE	(1<<15)	/* Descend into hierarchies */ | ||
| 96 | #define COPYFILE_CHECK		(1<<16) /* return flags for xattr or acls if set */ | ||
| 97 | #define COPYFILE_EXCL		(1<<17) /* fail if destination exists */ | ||
| 98 | #define COPYFILE_NOFOLLOW_SRC	(1<<18) /* don't follow if source is a symlink */ | ||
| 99 | #define COPYFILE_NOFOLLOW_DST	(1<<19) /* don't follow if dst is a symlink */ | ||
| 100 | #define COPYFILE_MOVE		(1<<20) /* unlink src after copy */ | ||
| 101 | #define COPYFILE_UNLINK		(1<<21) /* unlink dst before copy */ | ||
| 102 | #define COPYFILE_NOFOLLOW	(COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST) | ||
| 103 | |||
| 104 | #define COPYFILE_PACK		(1<<22) | ||
| 105 | #define COPYFILE_UNPACK		(1<<23) | ||
| 106 | |||
| 107 | #define COPYFILE_CLONE		(1<<24) | ||
| 108 | #define COPYFILE_CLONE_FORCE	(1<<25) | ||
| 109 | |||
| 110 | #define COPYFILE_RUN_IN_PLACE	(1<<26) | ||
| 111 | |||
| 112 | #define COPYFILE_DATA_SPARSE	(1<<27) | ||
| 113 | |||
| 114 | #define COPYFILE_PRESERVE_DST_TRACKED	(1<<28) | ||
| 115 | |||
| 116 | #define COPYFILE_VERBOSE	(1<<30) | ||
| 117 | |||
| 118 | #define	COPYFILE_RECURSE_ERROR	0 | ||
| 119 | #define	COPYFILE_RECURSE_FILE	1 | ||
| 120 | #define	COPYFILE_RECURSE_DIR	2 | ||
| 121 | #define	COPYFILE_RECURSE_DIR_CLEANUP	3 | ||
| 122 | #define	COPYFILE_COPY_DATA	4 | ||
| 123 | #define	COPYFILE_COPY_XATTR	5 | ||
| 124 | |||
| 125 | #define	COPYFILE_START		1 | ||
| 126 | #define	COPYFILE_FINISH		2 | ||
| 127 | #define	COPYFILE_ERR		3 | ||
| 128 | #define	COPYFILE_PROGRESS	4 | ||
| 129 | |||
| 130 | #define	COPYFILE_CONTINUE	0 | ||
| 131 | #define	COPYFILE_SKIP	1 | ||
| 132 | #define	COPYFILE_QUIT	2 | ||
| 133 | |||
| 134 | __END_DECLS | ||
| 135 | |||
| 136 | #endif /* _COPYFILE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/device/device_types.h deleted-117| ... | @@ -1,117 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	Author: David B. Golub, Carnegie Mellon University | ||
| 60 | *	Date: 3/89 | ||
| 61 | */ | ||
| 62 | |||
| 63 | #ifndef DEVICE_TYPES_H | ||
| 64 | #define DEVICE_TYPES_H | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Types for device interface. | ||
| 68 | */ | ||
| 69 | #include <mach/std_types.h> | ||
| 70 | #include <mach/mach_types.h> | ||
| 71 | #include <mach/message.h> | ||
| 72 | #include <mach/port.h> | ||
| 73 | #include <stdint.h> | ||
| 74 | |||
| 75 | |||
| 76 | |||
| 77 | /* | ||
| 78 | * IO buffer - out-of-line array of characters. | ||
| 79 | */ | ||
| 80 | typedef char * io_buf_ptr_t; | ||
| 81 | |||
| 82 | /* | ||
| 83 | * Some types for IOKit. | ||
| 84 | */ | ||
| 85 | |||
| 86 | |||
| 87 | /* must match device_types.defs */ | ||
| 88 | typedef char io_name_t[128]; | ||
| 89 | typedef char io_string_t[512]; | ||
| 90 | typedef char io_string_inband_t[4096]; | ||
| 91 | typedef char io_struct_inband_t[4096]; | ||
| 92 | |||
| 93 | #if __LP64__ | ||
| 94 | typedef uint64_t io_user_scalar_t; | ||
| 95 | typedef uint64_t io_user_reference_t; | ||
| 96 | typedef io_user_scalar_t io_scalar_inband_t[16]; | ||
| 97 | typedef io_user_reference_t io_async_ref_t[8]; | ||
| 98 | typedef io_user_scalar_t io_scalar_inband64_t[16]; | ||
| 99 | typedef io_user_reference_t io_async_ref64_t[8]; | ||
| 100 | #else | ||
| 101 | typedef int io_user_scalar_t; | ||
| 102 | typedef natural_t io_user_reference_t; | ||
| 103 | typedef io_user_scalar_t io_scalar_inband_t[16]; | ||
| 104 | typedef io_user_reference_t io_async_ref_t[8]; | ||
| 105 | typedef uint64_t io_scalar_inband64_t[16]; | ||
| 106 | typedef uint64_t io_async_ref64_t[8]; | ||
| 107 | #endif // __LP64__ | ||
| 108 | |||
| 109 | |||
| 110 | #ifndef __IOKIT_PORTS_DEFINED__ | ||
| 111 | #define __IOKIT_PORTS_DEFINED__ | ||
| 112 | typedef mach_port_t io_object_t; | ||
| 113 | #endif /* __IOKIT_PORTS_DEFINED__ */ | ||
| 114 | |||
| 115 | |||
| 116 | |||
| 117 | #endif /* DEVICE_TYPES_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/dispatch/queue.h+3| ... | @@ -473,6 +473,9 @@ dispatch_async_and_wait_f(dispatch_queue_t queue, | ... | @@ -473,6 +473,9 @@ dispatch_async_and_wait_f(dispatch_queue_t queue, |
| 473 | * @param block | 473 | * @param block |
| 474 | * The block to be invoked the specified number of iterations. | 474 | * The block to be invoked the specified number of iterations. |
| 475 | * The result of passing NULL in this parameter is undefined. | 475 | * The result of passing NULL in this parameter is undefined. |
| 476 | * This function performs a Block_copy() and Block_release() of the input block | ||
| 477 | * on behalf of the callers. To elide the additional block allocation, | ||
| 478 | * dispatch_apply_f may be used instead. | ||
| 476 | */ | 479 | */ |
| 477 | #ifdef __BLOCKS__ | 480 | #ifdef __BLOCKS__ |
| 478 | API_AVAILABLE(macos(10.6), ios(4.0)) | 481 | API_AVAILABLE(macos(10.6), ios(4.0)) |
lib/libc/include/any-macos.12-any/execinfo.h deleted-98| ... | @@ -1,98 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2007 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 | #ifndef _EXECINFO_H_ | ||
| 24 | #define _EXECINFO_H_ 1 | ||
| 25 | |||
| 26 | #include <sys/cdefs.h> | ||
| 27 | #include <Availability.h> | ||
| 28 | #include <os/base.h> | ||
| 29 | #include <os/availability.h> | ||
| 30 | #include <stddef.h> | ||
| 31 | #include <stdint.h> | ||
| 32 | #include <uuid/uuid.h> | ||
| 33 | |||
| 34 | __BEGIN_DECLS | ||
| 35 | |||
| 36 | int backtrace(void**,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 37 | |||
| 38 | API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | ||
| 39 | OS_EXPORT | ||
| 40 | int backtrace_from_fp(void *startfp, void **array, int size); | ||
| 41 | |||
| 42 | char** backtrace_symbols(void* const*,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 43 | void backtrace_symbols_fd(void* const*,int,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 44 | |||
| 45 | struct image_offset { | ||
| 46 | 	/* | ||
| 47 | 	 * The UUID of the image. | ||
| 48 | 	 */ | ||
| 49 | 	uuid_t uuid; | ||
| 50 | |||
| 51 | 	/* | ||
| 52 | 	 * The offset is relative to the __TEXT section of the image. | ||
| 53 | 	 */ | ||
| 54 | 	uint32_t offset; | ||
| 55 | }; | ||
| 56 | |||
| 57 | API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | ||
| 58 | OS_EXPORT | ||
| 59 | void backtrace_image_offsets(void* const* array, | ||
| 60 | 		struct image_offset *image_offsets, int size); | ||
| 61 | |||
| 62 | /*! | ||
| 63 | * @function backtrace_async | ||
| 64 | * Extracts the function return addresses of the current call stack. While | ||
| 65 | * backtrace() will only follow the OS call stack, backtrace_async() will | ||
| 66 | * prefer the unwind the Swift concurrency continuation stack if invoked | ||
| 67 | * from within an async context. In a non-async context this function is | ||
| 68 | * strictly equivalent to backtrace(). | ||
| 69 | * | ||
| 70 | * @param array | ||
| 71 | * The array of pointers to fill with the return addresses. | ||
| 72 | * | ||
| 73 | * @param length | ||
| 74 | * The maximum number of pointers to write. | ||
| 75 | * | ||
| 76 | * @param task_id | ||
| 77 | * Can be NULL. If non-NULL, the uint32_t pointed to by `task_id` is set to | ||
| 78 | * a non-zero value that for the current process uniquely identifies the async | ||
| 79 | * task currently running. If called from a non-async context, the value is | ||
| 80 | * set to 0 and `array` contains the same values backtrace() would return. | ||
| 81 | * | ||
| 82 | * Note that the continuation addresses provided by backtrace_async() | ||
| 83 | * have an offset of 1 added to them. Most symbolication engines will | ||
| 84 | * substract 1 from the call stack return addresses in order to symbolicate | ||
| 85 | * the call site rather than the return location. With a Swift async | ||
| 86 | * continuation, substracting 1 from its address would result in an address | ||
| 87 | * in a different function. This offset allows the returned addresses to be | ||
| 88 | * handled correctly by most existing symbolication engines. | ||
| 89 | * | ||
| 90 | * @result | ||
| 91 | * The number of pointers actually written. | ||
| 92 | */ | ||
| 93 | API_AVAILABLE(macosx(12.0), ios(15.0), tvos(15.0), watchos(8.0)) | ||
| 94 | size_t backtrace_async(void** array, size_t length, uint32_t *task_id); | ||
| 95 | |||
| 96 | __END_DECLS | ||
| 97 | |||
| 98 | #endif /* !_EXECINFO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/gethostuuid.h deleted-42| ... | @@ -1,42 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef __GETHOSTUUID_H | ||
| 30 | #define __GETHOSTUUID_H | ||
| 31 | |||
| 32 | #include <sys/_types/_timespec.h> | ||
| 33 | #include <sys/_types/_uuid_t.h> | ||
| 34 | #include <Availability.h> | ||
| 35 | |||
| 36 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0) | ||
| 37 | 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"); | ||
| 38 | #else | ||
| 39 | int gethostuuid(uuid_t, const struct timespec *) __API_AVAILABLE(macos(10.5)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif /* __GETHOSTUUID_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach-o/loader.h+10| ... | @@ -1274,12 +1274,22 @@ struct build_tool_version { | ... | @@ -1274,12 +1274,22 @@ struct build_tool_version { |
| 1274 | #define PLATFORM_WATCHOSSIMULATOR 9 | 1274 | #define PLATFORM_WATCHOSSIMULATOR 9 |
| 1275 | #define PLATFORM_DRIVERKIT 10 | 1275 | #define PLATFORM_DRIVERKIT 10 |
| 1276 | 1276 | ||
| 1277 | #ifndef __OPEN_SOURCE__ | ||
| 1277 | 1278 | ||
| 1279 | #endif /* __OPEN_SOURCE__ */ | ||
| 1280 | |||
| 1281 | #define PLATFORM_FIRMWARE 13 | ||
| 1282 | #define PLATFORM_SEPOS 14 | ||
| 1283 | |||
| 1284 | #ifndef __OPEN_SOURCE__ | ||
| 1285 | |||
| 1286 | #endif /* __OPEN_SOURCE__ */ | ||
| 1278 | 1287 | ||
| 1279 | /* Known values for the tool field above. */ | 1288 | /* Known values for the tool field above. */ |
| 1280 | #define TOOL_CLANG 1 | 1289 | #define TOOL_CLANG 1 |
| 1281 | #define TOOL_SWIFT 2 | 1290 | #define TOOL_SWIFT 2 |
| 1282 | #define TOOL_LD	3 | 1291 | #define TOOL_LD	3 |
| 1292 | #define TOOL_LLD 4 | ||
| 1283 | 1293 | ||
| 1284 | /* | 1294 | /* |
| 1285 | * The dyld_info_command contains the file offsets and sizes of | 1295 | * The dyld_info_command contains the file offsets and sizes of |
lib/libc/include/any-macos.12-any/mach/clock.h deleted-246| ... | @@ -1,246 +0,0 @@ | ||
| 1 | #ifndef	_clock_user_ | ||
| 2 | #define	_clock_user_ | ||
| 3 | |||
| 4 | /* Module clock */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	clock_MSG_COUNT | ||
| 52 | #define	clock_MSG_COUNT	3 | ||
| 53 | #endif	/* clock_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach/mach_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine clock_get_time */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t clock_get_time | ||
| 77 | ( | ||
| 78 | 	clock_serv_t clock_serv, | ||
| 79 | 	mach_timespec_t *cur_time | ||
| 80 | ); | ||
| 81 | |||
| 82 | /* Routine clock_get_attributes */ | ||
| 83 | #ifdef	mig_external | ||
| 84 | mig_external | ||
| 85 | #else | ||
| 86 | extern | ||
| 87 | #endif	/* mig_external */ | ||
| 88 | kern_return_t clock_get_attributes | ||
| 89 | ( | ||
| 90 | 	clock_serv_t clock_serv, | ||
| 91 | 	clock_flavor_t flavor, | ||
| 92 | 	clock_attr_t clock_attr, | ||
| 93 | 	mach_msg_type_number_t *clock_attrCnt | ||
| 94 | ); | ||
| 95 | |||
| 96 | /* Routine clock_alarm */ | ||
| 97 | #ifdef	mig_external | ||
| 98 | mig_external | ||
| 99 | #else | ||
| 100 | extern | ||
| 101 | #endif	/* mig_external */ | ||
| 102 | kern_return_t clock_alarm | ||
| 103 | ( | ||
| 104 | 	clock_serv_t clock_serv, | ||
| 105 | 	alarm_type_t alarm_type, | ||
| 106 | 	mach_timespec_t alarm_time, | ||
| 107 | 	clock_reply_t alarm_port | ||
| 108 | ); | ||
| 109 | |||
| 110 | __END_DECLS | ||
| 111 | |||
| 112 | /********************** Caution **************************/ | ||
| 113 | /* The following data types should be used to calculate */ | ||
| 114 | /* maximum message sizes only. The actual message may be */ | ||
| 115 | /* smaller, and the position of the arguments within the */ | ||
| 116 | /* message layout may vary from what is presented here. */ | ||
| 117 | /* For example, if any of the arguments are variable- */ | ||
| 118 | /* sized, and less than the maximum is sent, the data */ | ||
| 119 | /* will be packed tight in the actual message to reduce */ | ||
| 120 | /* the presence of holes. */ | ||
| 121 | /********************** Caution **************************/ | ||
| 122 | |||
| 123 | /* typedefs for all requests */ | ||
| 124 | |||
| 125 | #ifndef __Request__clock_subsystem__defined | ||
| 126 | #define __Request__clock_subsystem__defined | ||
| 127 | |||
| 128 | #ifdef __MigPackStructs | ||
| 129 | #pragma pack(push, 4) | ||
| 130 | #endif | ||
| 131 | 	typedef struct { | ||
| 132 | 		mach_msg_header_t Head; | ||
| 133 | 	} __Request__clock_get_time_t __attribute__((unused)); | ||
| 134 | #ifdef __MigPackStructs | ||
| 135 | #pragma pack(pop) | ||
| 136 | #endif | ||
| 137 | |||
| 138 | #ifdef __MigPackStructs | ||
| 139 | #pragma pack(push, 4) | ||
| 140 | #endif | ||
| 141 | 	typedef struct { | ||
| 142 | 		mach_msg_header_t Head; | ||
| 143 | 		NDR_record_t NDR; | ||
| 144 | 		clock_flavor_t flavor; | ||
| 145 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 146 | 	} __Request__clock_get_attributes_t __attribute__((unused)); | ||
| 147 | #ifdef __MigPackStructs | ||
| 148 | #pragma pack(pop) | ||
| 149 | #endif | ||
| 150 | |||
| 151 | #ifdef __MigPackStructs | ||
| 152 | #pragma pack(push, 4) | ||
| 153 | #endif | ||
| 154 | 	typedef struct { | ||
| 155 | 		mach_msg_header_t Head; | ||
| 156 | 		/* start of the kernel processed data */ | ||
| 157 | 		mach_msg_body_t msgh_body; | ||
| 158 | 		mach_msg_port_descriptor_t alarm_port; | ||
| 159 | 		/* end of the kernel processed data */ | ||
| 160 | 		NDR_record_t NDR; | ||
| 161 | 		alarm_type_t alarm_type; | ||
| 162 | 		mach_timespec_t alarm_time; | ||
| 163 | 	} __Request__clock_alarm_t __attribute__((unused)); | ||
| 164 | #ifdef __MigPackStructs | ||
| 165 | #pragma pack(pop) | ||
| 166 | #endif | ||
| 167 | #endif /* !__Request__clock_subsystem__defined */ | ||
| 168 | |||
| 169 | /* union of all requests */ | ||
| 170 | |||
| 171 | #ifndef __RequestUnion__clock_subsystem__defined | ||
| 172 | #define __RequestUnion__clock_subsystem__defined | ||
| 173 | union __RequestUnion__clock_subsystem { | ||
| 174 | 	__Request__clock_get_time_t Request_clock_get_time; | ||
| 175 | 	__Request__clock_get_attributes_t Request_clock_get_attributes; | ||
| 176 | 	__Request__clock_alarm_t Request_clock_alarm; | ||
| 177 | }; | ||
| 178 | #endif /* !__RequestUnion__clock_subsystem__defined */ | ||
| 179 | /* typedefs for all replies */ | ||
| 180 | |||
| 181 | #ifndef __Reply__clock_subsystem__defined | ||
| 182 | #define __Reply__clock_subsystem__defined | ||
| 183 | |||
| 184 | #ifdef __MigPackStructs | ||
| 185 | #pragma pack(push, 4) | ||
| 186 | #endif | ||
| 187 | 	typedef struct { | ||
| 188 | 		mach_msg_header_t Head; | ||
| 189 | 		NDR_record_t NDR; | ||
| 190 | 		kern_return_t RetCode; | ||
| 191 | 		mach_timespec_t cur_time; | ||
| 192 | 	} __Reply__clock_get_time_t __attribute__((unused)); | ||
| 193 | #ifdef __MigPackStructs | ||
| 194 | #pragma pack(pop) | ||
| 195 | #endif | ||
| 196 | |||
| 197 | #ifdef __MigPackStructs | ||
| 198 | #pragma pack(push, 4) | ||
| 199 | #endif | ||
| 200 | 	typedef struct { | ||
| 201 | 		mach_msg_header_t Head; | ||
| 202 | 		NDR_record_t NDR; | ||
| 203 | 		kern_return_t RetCode; | ||
| 204 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 205 | 		int clock_attr[1]; | ||
| 206 | 	} __Reply__clock_get_attributes_t __attribute__((unused)); | ||
| 207 | #ifdef __MigPackStructs | ||
| 208 | #pragma pack(pop) | ||
| 209 | #endif | ||
| 210 | |||
| 211 | #ifdef __MigPackStructs | ||
| 212 | #pragma pack(push, 4) | ||
| 213 | #endif | ||
| 214 | 	typedef struct { | ||
| 215 | 		mach_msg_header_t Head; | ||
| 216 | 		NDR_record_t NDR; | ||
| 217 | 		kern_return_t RetCode; | ||
| 218 | 	} __Reply__clock_alarm_t __attribute__((unused)); | ||
| 219 | #ifdef __MigPackStructs | ||
| 220 | #pragma pack(pop) | ||
| 221 | #endif | ||
| 222 | #endif /* !__Reply__clock_subsystem__defined */ | ||
| 223 | |||
| 224 | /* union of all replies */ | ||
| 225 | |||
| 226 | #ifndef __ReplyUnion__clock_subsystem__defined | ||
| 227 | #define __ReplyUnion__clock_subsystem__defined | ||
| 228 | union __ReplyUnion__clock_subsystem { | ||
| 229 | 	__Reply__clock_get_time_t Reply_clock_get_time; | ||
| 230 | 	__Reply__clock_get_attributes_t Reply_clock_get_attributes; | ||
| 231 | 	__Reply__clock_alarm_t Reply_clock_alarm; | ||
| 232 | }; | ||
| 233 | #endif /* !__RequestUnion__clock_subsystem__defined */ | ||
| 234 | |||
| 235 | #ifndef subsystem_to_name_map_clock | ||
| 236 | #define subsystem_to_name_map_clock \ | ||
| 237 | { "clock_get_time", 1000 },\ | ||
| 238 | { "clock_get_attributes", 1001 },\ | ||
| 239 | { "clock_alarm", 1002 } | ||
| 240 | #endif | ||
| 241 | |||
| 242 | #ifdef __AfterMigUserHeader | ||
| 243 | __AfterMigUserHeader | ||
| 244 | #endif /* __AfterMigUserHeader */ | ||
| 245 | |||
| 246 | #endif	 /* _clock_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/clock_priv.h deleted-200| ... | @@ -1,200 +0,0 @@ | ||
| 1 | #ifndef	_clock_priv_user_ | ||
| 2 | #define	_clock_priv_user_ | ||
| 3 | |||
| 4 | /* Module clock_priv */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	clock_priv_MSG_COUNT | ||
| 52 | #define	clock_priv_MSG_COUNT	2 | ||
| 53 | #endif	/* clock_priv_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach/mach_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine clock_set_time */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t clock_set_time | ||
| 77 | ( | ||
| 78 | 	clock_ctrl_t clock_ctrl, | ||
| 79 | 	mach_timespec_t new_time | ||
| 80 | ); | ||
| 81 | |||
| 82 | /* Routine clock_set_attributes */ | ||
| 83 | #ifdef	mig_external | ||
| 84 | mig_external | ||
| 85 | #else | ||
| 86 | extern | ||
| 87 | #endif	/* mig_external */ | ||
| 88 | kern_return_t clock_set_attributes | ||
| 89 | ( | ||
| 90 | 	clock_ctrl_t clock_ctrl, | ||
| 91 | 	clock_flavor_t flavor, | ||
| 92 | 	clock_attr_t clock_attr, | ||
| 93 | 	mach_msg_type_number_t clock_attrCnt | ||
| 94 | ); | ||
| 95 | |||
| 96 | __END_DECLS | ||
| 97 | |||
| 98 | /********************** Caution **************************/ | ||
| 99 | /* The following data types should be used to calculate */ | ||
| 100 | /* maximum message sizes only. The actual message may be */ | ||
| 101 | /* smaller, and the position of the arguments within the */ | ||
| 102 | /* message layout may vary from what is presented here. */ | ||
| 103 | /* For example, if any of the arguments are variable- */ | ||
| 104 | /* sized, and less than the maximum is sent, the data */ | ||
| 105 | /* will be packed tight in the actual message to reduce */ | ||
| 106 | /* the presence of holes. */ | ||
| 107 | /********************** Caution **************************/ | ||
| 108 | |||
| 109 | /* typedefs for all requests */ | ||
| 110 | |||
| 111 | #ifndef __Request__clock_priv_subsystem__defined | ||
| 112 | #define __Request__clock_priv_subsystem__defined | ||
| 113 | |||
| 114 | #ifdef __MigPackStructs | ||
| 115 | #pragma pack(push, 4) | ||
| 116 | #endif | ||
| 117 | 	typedef struct { | ||
| 118 | 		mach_msg_header_t Head; | ||
| 119 | 		NDR_record_t NDR; | ||
| 120 | 		mach_timespec_t new_time; | ||
| 121 | 	} __Request__clock_set_time_t __attribute__((unused)); | ||
| 122 | #ifdef __MigPackStructs | ||
| 123 | #pragma pack(pop) | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #ifdef __MigPackStructs | ||
| 127 | #pragma pack(push, 4) | ||
| 128 | #endif | ||
| 129 | 	typedef struct { | ||
| 130 | 		mach_msg_header_t Head; | ||
| 131 | 		NDR_record_t NDR; | ||
| 132 | 		clock_flavor_t flavor; | ||
| 133 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 134 | 		int clock_attr[1]; | ||
| 135 | 	} __Request__clock_set_attributes_t __attribute__((unused)); | ||
| 136 | #ifdef __MigPackStructs | ||
| 137 | #pragma pack(pop) | ||
| 138 | #endif | ||
| 139 | #endif /* !__Request__clock_priv_subsystem__defined */ | ||
| 140 | |||
| 141 | /* union of all requests */ | ||
| 142 | |||
| 143 | #ifndef __RequestUnion__clock_priv_subsystem__defined | ||
| 144 | #define __RequestUnion__clock_priv_subsystem__defined | ||
| 145 | union __RequestUnion__clock_priv_subsystem { | ||
| 146 | 	__Request__clock_set_time_t Request_clock_set_time; | ||
| 147 | 	__Request__clock_set_attributes_t Request_clock_set_attributes; | ||
| 148 | }; | ||
| 149 | #endif /* !__RequestUnion__clock_priv_subsystem__defined */ | ||
| 150 | /* typedefs for all replies */ | ||
| 151 | |||
| 152 | #ifndef __Reply__clock_priv_subsystem__defined | ||
| 153 | #define __Reply__clock_priv_subsystem__defined | ||
| 154 | |||
| 155 | #ifdef __MigPackStructs | ||
| 156 | #pragma pack(push, 4) | ||
| 157 | #endif | ||
| 158 | 	typedef struct { | ||
| 159 | 		mach_msg_header_t Head; | ||
| 160 | 		NDR_record_t NDR; | ||
| 161 | 		kern_return_t RetCode; | ||
| 162 | 	} __Reply__clock_set_time_t __attribute__((unused)); | ||
| 163 | #ifdef __MigPackStructs | ||
| 164 | #pragma pack(pop) | ||
| 165 | #endif | ||
| 166 | |||
| 167 | #ifdef __MigPackStructs | ||
| 168 | #pragma pack(push, 4) | ||
| 169 | #endif | ||
| 170 | 	typedef struct { | ||
| 171 | 		mach_msg_header_t Head; | ||
| 172 | 		NDR_record_t NDR; | ||
| 173 | 		kern_return_t RetCode; | ||
| 174 | 	} __Reply__clock_set_attributes_t __attribute__((unused)); | ||
| 175 | #ifdef __MigPackStructs | ||
| 176 | #pragma pack(pop) | ||
| 177 | #endif | ||
| 178 | #endif /* !__Reply__clock_priv_subsystem__defined */ | ||
| 179 | |||
| 180 | /* union of all replies */ | ||
| 181 | |||
| 182 | #ifndef __ReplyUnion__clock_priv_subsystem__defined | ||
| 183 | #define __ReplyUnion__clock_priv_subsystem__defined | ||
| 184 | union __ReplyUnion__clock_priv_subsystem { | ||
| 185 | 	__Reply__clock_set_time_t Reply_clock_set_time; | ||
| 186 | 	__Reply__clock_set_attributes_t Reply_clock_set_attributes; | ||
| 187 | }; | ||
| 188 | #endif /* !__RequestUnion__clock_priv_subsystem__defined */ | ||
| 189 | |||
| 190 | #ifndef subsystem_to_name_map_clock_priv | ||
| 191 | #define subsystem_to_name_map_clock_priv \ | ||
| 192 | { "clock_set_time", 1200 },\ | ||
| 193 | { "clock_set_attributes", 1201 } | ||
| 194 | #endif | ||
| 195 | |||
| 196 | #ifdef __AfterMigUserHeader | ||
| 197 | __AfterMigUserHeader | ||
| 198 | #endif /* __AfterMigUserHeader */ | ||
| 199 | |||
| 200 | #endif	 /* _clock_priv_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/exception_types.h deleted-211| ... | @@ -1,211 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef _MACH_EXCEPTION_TYPES_H_ | ||
| 60 | #define _MACH_EXCEPTION_TYPES_H_ | ||
| 61 | |||
| 62 | #include <mach/machine/exception.h> | ||
| 63 | |||
| 64 | /* | ||
| 65 | *	Machine-independent exception definitions. | ||
| 66 | */ | ||
| 67 | |||
| 68 | #define EXC_BAD_ACCESS 1 /* Could not access memory */ | ||
| 69 | /* Code contains kern_return_t describing error. */ | ||
| 70 | /* Subcode contains bad memory address. */ | ||
| 71 | |||
| 72 | #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ | ||
| 73 | /* Illegal or undefined instruction or operand */ | ||
| 74 | |||
| 75 | #define EXC_ARITHMETIC 3 /* Arithmetic exception */ | ||
| 76 | /* Exact nature of exception is in code field */ | ||
| 77 | |||
| 78 | #define EXC_EMULATION 4 /* Emulation instruction */ | ||
| 79 | /* Emulation support instruction encountered */ | ||
| 80 | /* Details in code and subcode fields	*/ | ||
| 81 | |||
| 82 | #define EXC_SOFTWARE 5 /* Software generated exception */ | ||
| 83 | /* Exact exception is in code field. */ | ||
| 84 | /* Codes 0 - 0xFFFF reserved to hardware */ | ||
| 85 | /* Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) */ | ||
| 86 | |||
| 87 | #define EXC_BREAKPOINT 6 /* Trace, breakpoint, etc. */ | ||
| 88 | /* Details in code field. */ | ||
| 89 | |||
| 90 | #define EXC_SYSCALL 7 /* System calls. */ | ||
| 91 | |||
| 92 | #define EXC_MACH_SYSCALL 8 /* Mach system calls. */ | ||
| 93 | |||
| 94 | #define EXC_RPC_ALERT 9 /* RPC alert */ | ||
| 95 | |||
| 96 | #define EXC_CRASH 10 /* Abnormal process exit */ | ||
| 97 | |||
| 98 | #define EXC_RESOURCE 11 /* Hit resource consumption limit */ | ||
| 99 | /* Exact resource is in code field. */ | ||
| 100 | |||
| 101 | #define EXC_GUARD 12 /* Violated guarded resource protections */ | ||
| 102 | |||
| 103 | #define EXC_CORPSE_NOTIFY 13 /* Abnormal process exited to corpse state */ | ||
| 104 | |||
| 105 | #define EXC_CORPSE_VARIANT_BIT 0x100 /* bit set for EXC_*_CORPSE variants of EXC_* */ | ||
| 106 | |||
| 107 | |||
| 108 | /* | ||
| 109 | *	Machine-independent exception behaviors | ||
| 110 | */ | ||
| 111 | |||
| 112 | # define EXCEPTION_DEFAULT 1 | ||
| 113 | /*	Send a catch_exception_raise message including the identity. | ||
| 114 | */ | ||
| 115 | |||
| 116 | # define EXCEPTION_STATE 2 | ||
| 117 | /*	Send a catch_exception_raise_state message including the | ||
| 118 | *	thread state. | ||
| 119 | */ | ||
| 120 | |||
| 121 | # define EXCEPTION_STATE_IDENTITY 3 | ||
| 122 | /*	Send a catch_exception_raise_state_identity message including | ||
| 123 | *	the thread identity and state. | ||
| 124 | */ | ||
| 125 | |||
| 126 | # define EXCEPTION_IDENTITY_PROTECTED 4 | ||
| 127 | /*	Send a catch_exception_raise message including protected task | ||
| 128 | * and thread identity. | ||
| 129 | */ | ||
| 130 | |||
| 131 | #define MACH_EXCEPTION_ERRORS 0x40000000 | ||
| 132 | /*	include additional exception specific errors, not used yet. */ | ||
| 133 | |||
| 134 | #define MACH_EXCEPTION_CODES 0x80000000 | ||
| 135 | /*	Send 64-bit code and subcode in the exception header */ | ||
| 136 | |||
| 137 | #define MACH_EXCEPTION_MASK (MACH_EXCEPTION_CODES | MACH_EXCEPTION_ERRORS) | ||
| 138 | /* | ||
| 139 | * Masks for exception definitions, above | ||
| 140 | * bit zero is unused, therefore 1 word = 31 exception types | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define EXC_MASK_BAD_ACCESS (1 << EXC_BAD_ACCESS) | ||
| 144 | #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) | ||
| 145 | #define EXC_MASK_ARITHMETIC (1 << EXC_ARITHMETIC) | ||
| 146 | #define EXC_MASK_EMULATION (1 << EXC_EMULATION) | ||
| 147 | #define EXC_MASK_SOFTWARE (1 << EXC_SOFTWARE) | ||
| 148 | #define EXC_MASK_BREAKPOINT (1 << EXC_BREAKPOINT) | ||
| 149 | #define EXC_MASK_SYSCALL (1 << EXC_SYSCALL) | ||
| 150 | #define EXC_MASK_MACH_SYSCALL (1 << EXC_MACH_SYSCALL) | ||
| 151 | #define EXC_MASK_RPC_ALERT (1 << EXC_RPC_ALERT) | ||
| 152 | #define EXC_MASK_CRASH (1 << EXC_CRASH) | ||
| 153 | #define EXC_MASK_RESOURCE (1 << EXC_RESOURCE) | ||
| 154 | #define EXC_MASK_GUARD (1 << EXC_GUARD) | ||
| 155 | #define EXC_MASK_CORPSE_NOTIFY (1 << EXC_CORPSE_NOTIFY) | ||
| 156 | |||
| 157 | #define EXC_MASK_ALL (EXC_MASK_BAD_ACCESS | \ | ||
| 158 | 	 EXC_MASK_BAD_INSTRUCTION | \ | ||
| 159 | 	 EXC_MASK_ARITHMETIC | \ | ||
| 160 | 	 EXC_MASK_EMULATION | \ | ||
| 161 | 	 EXC_MASK_SOFTWARE | \ | ||
| 162 | 	 EXC_MASK_BREAKPOINT | \ | ||
| 163 | 	 EXC_MASK_SYSCALL | \ | ||
| 164 | 	 EXC_MASK_MACH_SYSCALL | \ | ||
| 165 | 	 EXC_MASK_RPC_ALERT | \ | ||
| 166 | 	 EXC_MASK_RESOURCE | \ | ||
| 167 | 	 EXC_MASK_GUARD | \ | ||
| 168 | 	 EXC_MASK_MACHINE) | ||
| 169 | |||
| 170 | |||
| 171 | #define FIRST_EXCEPTION 1 /* ZERO is illegal */ | ||
| 172 | |||
| 173 | /* | ||
| 174 | * Machine independent codes for EXC_SOFTWARE | ||
| 175 | * Codes 0x10000 - 0x1FFFF reserved for OS emulation (Unix) | ||
| 176 | * 0x10000 - 0x10002 in use for unix signals | ||
| 177 | * 0x20000 - 0x2FFFF reserved for MACF | ||
| 178 | */ | ||
| 179 | #define EXC_SOFT_SIGNAL 0x10003 /* Unix signal exceptions */ | ||
| 180 | |||
| 181 | #define EXC_MACF_MIN 0x20000 /* MACF exceptions */ | ||
| 182 | #define EXC_MACF_MAX 0x2FFFF | ||
| 183 | |||
| 184 | #ifndef ASSEMBLER | ||
| 185 | |||
| 186 | #include <mach/port.h> | ||
| 187 | #include <mach/thread_status.h> | ||
| 188 | #include <mach/machine/vm_types.h> | ||
| 189 | #include <mach_debug/ipc_info.h> | ||
| 190 | /* | ||
| 191 | * Exported types | ||
| 192 | */ | ||
| 193 | |||
| 194 | typedef int exception_type_t; | ||
| 195 | typedef integer_t exception_data_type_t; | ||
| 196 | typedef int64_t mach_exception_data_type_t; | ||
| 197 | typedef int exception_behavior_t; | ||
| 198 | typedef exception_data_type_t *exception_data_t; | ||
| 199 | typedef mach_exception_data_type_t *mach_exception_data_t; | ||
| 200 | typedef unsigned int exception_mask_t; | ||
| 201 | typedef exception_mask_t *exception_mask_array_t; | ||
| 202 | typedef exception_behavior_t *exception_behavior_array_t; | ||
| 203 | typedef thread_state_flavor_t *exception_flavor_array_t; | ||
| 204 | typedef mach_port_t *exception_port_array_t; | ||
| 205 | typedef ipc_info_port_t *exception_port_info_array_t; | ||
| 206 | typedef mach_exception_data_type_t mach_exception_code_t; | ||
| 207 | typedef mach_exception_data_type_t mach_exception_subcode_t; | ||
| 208 | |||
| 209 | #endif /* ASSEMBLER */ | ||
| 210 | |||
| 211 | #endif /* _MACH_EXCEPTION_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/host_priv.h deleted-1164| ... | @@ -1,1164 +0,0 @@ | ||
| 1 | #ifndef	_host_priv_user_ | ||
| 2 | #define	_host_priv_user_ | ||
| 3 | |||
| 4 | /* Module host_priv */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	host_priv_MSG_COUNT | ||
| 52 | #define	host_priv_MSG_COUNT	26 | ||
| 53 | #endif	/* host_priv_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach/mach_types.h> | ||
| 61 | #include <mach_debug/mach_debug_types.h> | ||
| 62 | |||
| 63 | #ifdef __BeforeMigUserHeader | ||
| 64 | __BeforeMigUserHeader | ||
| 65 | #endif /* __BeforeMigUserHeader */ | ||
| 66 | |||
| 67 | #include <sys/cdefs.h> | ||
| 68 | __BEGIN_DECLS | ||
| 69 | |||
| 70 | |||
| 71 | /* Routine host_get_boot_info */ | ||
| 72 | #ifdef	mig_external | ||
| 73 | mig_external | ||
| 74 | #else | ||
| 75 | extern | ||
| 76 | #endif	/* mig_external */ | ||
| 77 | kern_return_t host_get_boot_info | ||
| 78 | ( | ||
| 79 | 	host_priv_t host_priv, | ||
| 80 | 	kernel_boot_info_t boot_info | ||
| 81 | ); | ||
| 82 | |||
| 83 | /* Routine host_reboot */ | ||
| 84 | #ifdef	mig_external | ||
| 85 | mig_external | ||
| 86 | #else | ||
| 87 | extern | ||
| 88 | #endif	/* mig_external */ | ||
| 89 | kern_return_t host_reboot | ||
| 90 | ( | ||
| 91 | 	host_priv_t host_priv, | ||
| 92 | 	int options | ||
| 93 | ); | ||
| 94 | |||
| 95 | /* Routine host_priv_statistics */ | ||
| 96 | #ifdef	mig_external | ||
| 97 | mig_external | ||
| 98 | #else | ||
| 99 | extern | ||
| 100 | #endif	/* mig_external */ | ||
| 101 | kern_return_t host_priv_statistics | ||
| 102 | ( | ||
| 103 | 	host_priv_t host_priv, | ||
| 104 | 	host_flavor_t flavor, | ||
| 105 | 	host_info_t host_info_out, | ||
| 106 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 107 | ); | ||
| 108 | |||
| 109 | /* Routine host_default_memory_manager */ | ||
| 110 | #ifdef	mig_external | ||
| 111 | mig_external | ||
| 112 | #else | ||
| 113 | extern | ||
| 114 | #endif	/* mig_external */ | ||
| 115 | kern_return_t host_default_memory_manager | ||
| 116 | ( | ||
| 117 | 	host_priv_t host_priv, | ||
| 118 | 	memory_object_default_t *default_manager, | ||
| 119 | 	memory_object_cluster_size_t cluster_size | ||
| 120 | ); | ||
| 121 | |||
| 122 | /* Routine vm_wire */ | ||
| 123 | #ifdef	mig_external | ||
| 124 | mig_external | ||
| 125 | #else | ||
| 126 | extern | ||
| 127 | #endif	/* mig_external */ | ||
| 128 | kern_return_t vm_wire | ||
| 129 | ( | ||
| 130 | 	host_priv_t host_priv, | ||
| 131 | 	vm_map_t task, | ||
| 132 | 	vm_address_t address, | ||
| 133 | 	vm_size_t size, | ||
| 134 | 	vm_prot_t desired_access | ||
| 135 | ); | ||
| 136 | |||
| 137 | /* Routine thread_wire */ | ||
| 138 | #ifdef	mig_external | ||
| 139 | mig_external | ||
| 140 | #else | ||
| 141 | extern | ||
| 142 | #endif	/* mig_external */ | ||
| 143 | kern_return_t thread_wire | ||
| 144 | ( | ||
| 145 | 	host_priv_t host_priv, | ||
| 146 | 	thread_act_t thread, | ||
| 147 | 	boolean_t wired | ||
| 148 | ); | ||
| 149 | |||
| 150 | /* Routine vm_allocate_cpm */ | ||
| 151 | #ifdef	mig_external | ||
| 152 | mig_external | ||
| 153 | #else | ||
| 154 | extern | ||
| 155 | #endif	/* mig_external */ | ||
| 156 | kern_return_t vm_allocate_cpm | ||
| 157 | ( | ||
| 158 | 	host_priv_t host_priv, | ||
| 159 | 	vm_map_t task, | ||
| 160 | 	vm_address_t *address, | ||
| 161 | 	vm_size_t size, | ||
| 162 | 	int flags | ||
| 163 | ); | ||
| 164 | |||
| 165 | /* Routine host_processors */ | ||
| 166 | #ifdef	mig_external | ||
| 167 | mig_external | ||
| 168 | #else | ||
| 169 | extern | ||
| 170 | #endif	/* mig_external */ | ||
| 171 | kern_return_t host_processors | ||
| 172 | ( | ||
| 173 | 	host_priv_t host_priv, | ||
| 174 | 	processor_array_t *out_processor_list, | ||
| 175 | 	mach_msg_type_number_t *out_processor_listCnt | ||
| 176 | ); | ||
| 177 | |||
| 178 | /* Routine host_get_clock_control */ | ||
| 179 | #ifdef	mig_external | ||
| 180 | mig_external | ||
| 181 | #else | ||
| 182 | extern | ||
| 183 | #endif	/* mig_external */ | ||
| 184 | kern_return_t host_get_clock_control | ||
| 185 | ( | ||
| 186 | 	host_priv_t host_priv, | ||
| 187 | 	clock_id_t clock_id, | ||
| 188 | 	clock_ctrl_t *clock_ctrl | ||
| 189 | ); | ||
| 190 | |||
| 191 | /* Routine kmod_create */ | ||
| 192 | #ifdef	mig_external | ||
| 193 | mig_external | ||
| 194 | #else | ||
| 195 | extern | ||
| 196 | #endif	/* mig_external */ | ||
| 197 | kern_return_t kmod_create | ||
| 198 | ( | ||
| 199 | 	host_priv_t host_priv, | ||
| 200 | 	vm_address_t info, | ||
| 201 | 	kmod_t *module | ||
| 202 | ); | ||
| 203 | |||
| 204 | /* Routine kmod_destroy */ | ||
| 205 | #ifdef	mig_external | ||
| 206 | mig_external | ||
| 207 | #else | ||
| 208 | extern | ||
| 209 | #endif	/* mig_external */ | ||
| 210 | kern_return_t kmod_destroy | ||
| 211 | ( | ||
| 212 | 	host_priv_t host_priv, | ||
| 213 | 	kmod_t module | ||
| 214 | ); | ||
| 215 | |||
| 216 | /* Routine kmod_control */ | ||
| 217 | #ifdef	mig_external | ||
| 218 | mig_external | ||
| 219 | #else | ||
| 220 | extern | ||
| 221 | #endif	/* mig_external */ | ||
| 222 | kern_return_t kmod_control | ||
| 223 | ( | ||
| 224 | 	host_priv_t host_priv, | ||
| 225 | 	kmod_t module, | ||
| 226 | 	kmod_control_flavor_t flavor, | ||
| 227 | 	kmod_args_t *data, | ||
| 228 | 	mach_msg_type_number_t *dataCnt | ||
| 229 | ); | ||
| 230 | |||
| 231 | /* Routine host_get_special_port */ | ||
| 232 | #ifdef	mig_external | ||
| 233 | mig_external | ||
| 234 | #else | ||
| 235 | extern | ||
| 236 | #endif	/* mig_external */ | ||
| 237 | kern_return_t host_get_special_port | ||
| 238 | ( | ||
| 239 | 	host_priv_t host_priv, | ||
| 240 | 	int node, | ||
| 241 | 	int which, | ||
| 242 | 	mach_port_t *port | ||
| 243 | ); | ||
| 244 | |||
| 245 | /* Routine host_set_special_port */ | ||
| 246 | #ifdef	mig_external | ||
| 247 | mig_external | ||
| 248 | #else | ||
| 249 | extern | ||
| 250 | #endif	/* mig_external */ | ||
| 251 | kern_return_t host_set_special_port | ||
| 252 | ( | ||
| 253 | 	host_priv_t host_priv, | ||
| 254 | 	int which, | ||
| 255 | 	mach_port_t port | ||
| 256 | ); | ||
| 257 | |||
| 258 | /* Routine host_set_exception_ports */ | ||
| 259 | #ifdef	mig_external | ||
| 260 | mig_external | ||
| 261 | #else | ||
| 262 | extern | ||
| 263 | #endif	/* mig_external */ | ||
| 264 | kern_return_t host_set_exception_ports | ||
| 265 | ( | ||
| 266 | 	host_priv_t host_priv, | ||
| 267 | 	exception_mask_t exception_mask, | ||
| 268 | 	mach_port_t new_port, | ||
| 269 | 	exception_behavior_t behavior, | ||
| 270 | 	thread_state_flavor_t new_flavor | ||
| 271 | ); | ||
| 272 | |||
| 273 | /* Routine host_get_exception_ports */ | ||
| 274 | #ifdef	mig_external | ||
| 275 | mig_external | ||
| 276 | #else | ||
| 277 | extern | ||
| 278 | #endif	/* mig_external */ | ||
| 279 | kern_return_t host_get_exception_ports | ||
| 280 | ( | ||
| 281 | 	host_priv_t host_priv, | ||
| 282 | 	exception_mask_t exception_mask, | ||
| 283 | 	exception_mask_array_t masks, | ||
| 284 | 	mach_msg_type_number_t *masksCnt, | ||
| 285 | 	exception_handler_array_t old_handlers, | ||
| 286 | 	exception_behavior_array_t old_behaviors, | ||
| 287 | 	exception_flavor_array_t old_flavors | ||
| 288 | ); | ||
| 289 | |||
| 290 | /* Routine host_swap_exception_ports */ | ||
| 291 | #ifdef	mig_external | ||
| 292 | mig_external | ||
| 293 | #else | ||
| 294 | extern | ||
| 295 | #endif	/* mig_external */ | ||
| 296 | kern_return_t host_swap_exception_ports | ||
| 297 | ( | ||
| 298 | 	host_priv_t host_priv, | ||
| 299 | 	exception_mask_t exception_mask, | ||
| 300 | 	mach_port_t new_port, | ||
| 301 | 	exception_behavior_t behavior, | ||
| 302 | 	thread_state_flavor_t new_flavor, | ||
| 303 | 	exception_mask_array_t masks, | ||
| 304 | 	mach_msg_type_number_t *masksCnt, | ||
| 305 | 	exception_handler_array_t old_handlerss, | ||
| 306 | 	exception_behavior_array_t old_behaviors, | ||
| 307 | 	exception_flavor_array_t old_flavors | ||
| 308 | ); | ||
| 309 | |||
| 310 | /* Routine mach_vm_wire */ | ||
| 311 | #ifdef	mig_external | ||
| 312 | mig_external | ||
| 313 | #else | ||
| 314 | extern | ||
| 315 | #endif	/* mig_external */ | ||
| 316 | kern_return_t mach_vm_wire | ||
| 317 | ( | ||
| 318 | 	host_priv_t host_priv, | ||
| 319 | 	vm_map_t task, | ||
| 320 | 	mach_vm_address_t address, | ||
| 321 | 	mach_vm_size_t size, | ||
| 322 | 	vm_prot_t desired_access | ||
| 323 | ); | ||
| 324 | |||
| 325 | /* Routine host_processor_sets */ | ||
| 326 | #ifdef	mig_external | ||
| 327 | mig_external | ||
| 328 | #else | ||
| 329 | extern | ||
| 330 | #endif	/* mig_external */ | ||
| 331 | kern_return_t host_processor_sets | ||
| 332 | ( | ||
| 333 | 	host_priv_t host_priv, | ||
| 334 | 	processor_set_name_array_t *processor_sets, | ||
| 335 | 	mach_msg_type_number_t *processor_setsCnt | ||
| 336 | ); | ||
| 337 | |||
| 338 | /* Routine host_processor_set_priv */ | ||
| 339 | #ifdef	mig_external | ||
| 340 | mig_external | ||
| 341 | #else | ||
| 342 | extern | ||
| 343 | #endif	/* mig_external */ | ||
| 344 | kern_return_t host_processor_set_priv | ||
| 345 | ( | ||
| 346 | 	host_priv_t host_priv, | ||
| 347 | 	processor_set_name_t set_name, | ||
| 348 | 	processor_set_t *set | ||
| 349 | ); | ||
| 350 | |||
| 351 | /* Routine host_set_UNDServer */ | ||
| 352 | #ifdef	mig_external | ||
| 353 | mig_external | ||
| 354 | #else | ||
| 355 | extern | ||
| 356 | #endif	/* mig_external */ | ||
| 357 | kern_return_t host_set_UNDServer | ||
| 358 | ( | ||
| 359 | 	host_priv_t host, | ||
| 360 | 	UNDServerRef server | ||
| 361 | ); | ||
| 362 | |||
| 363 | /* Routine host_get_UNDServer */ | ||
| 364 | #ifdef	mig_external | ||
| 365 | mig_external | ||
| 366 | #else | ||
| 367 | extern | ||
| 368 | #endif	/* mig_external */ | ||
| 369 | kern_return_t host_get_UNDServer | ||
| 370 | ( | ||
| 371 | 	host_priv_t host, | ||
| 372 | 	UNDServerRef *server | ||
| 373 | ); | ||
| 374 | |||
| 375 | /* Routine kext_request */ | ||
| 376 | #ifdef	mig_external | ||
| 377 | mig_external | ||
| 378 | #else | ||
| 379 | extern | ||
| 380 | #endif	/* mig_external */ | ||
| 381 | kern_return_t kext_request | ||
| 382 | ( | ||
| 383 | 	host_priv_t host_priv, | ||
| 384 | 	uint32_t user_log_flags, | ||
| 385 | 	vm_offset_t request_data, | ||
| 386 | 	mach_msg_type_number_t request_dataCnt, | ||
| 387 | 	vm_offset_t *response_data, | ||
| 388 | 	mach_msg_type_number_t *response_dataCnt, | ||
| 389 | 	vm_offset_t *log_data, | ||
| 390 | 	mach_msg_type_number_t *log_dataCnt, | ||
| 391 | 	kern_return_t *op_result | ||
| 392 | ); | ||
| 393 | |||
| 394 | __END_DECLS | ||
| 395 | |||
| 396 | /********************** Caution **************************/ | ||
| 397 | /* The following data types should be used to calculate */ | ||
| 398 | /* maximum message sizes only. The actual message may be */ | ||
| 399 | /* smaller, and the position of the arguments within the */ | ||
| 400 | /* message layout may vary from what is presented here. */ | ||
| 401 | /* For example, if any of the arguments are variable- */ | ||
| 402 | /* sized, and less than the maximum is sent, the data */ | ||
| 403 | /* will be packed tight in the actual message to reduce */ | ||
| 404 | /* the presence of holes. */ | ||
| 405 | /********************** Caution **************************/ | ||
| 406 | |||
| 407 | /* typedefs for all requests */ | ||
| 408 | |||
| 409 | #ifndef __Request__host_priv_subsystem__defined | ||
| 410 | #define __Request__host_priv_subsystem__defined | ||
| 411 | |||
| 412 | #ifdef __MigPackStructs | ||
| 413 | #pragma pack(push, 4) | ||
| 414 | #endif | ||
| 415 | 	typedef struct { | ||
| 416 | 		mach_msg_header_t Head; | ||
| 417 | 	} __Request__host_get_boot_info_t __attribute__((unused)); | ||
| 418 | #ifdef __MigPackStructs | ||
| 419 | #pragma pack(pop) | ||
| 420 | #endif | ||
| 421 | |||
| 422 | #ifdef __MigPackStructs | ||
| 423 | #pragma pack(push, 4) | ||
| 424 | #endif | ||
| 425 | 	typedef struct { | ||
| 426 | 		mach_msg_header_t Head; | ||
| 427 | 		NDR_record_t NDR; | ||
| 428 | 		int options; | ||
| 429 | 	} __Request__host_reboot_t __attribute__((unused)); | ||
| 430 | #ifdef __MigPackStructs | ||
| 431 | #pragma pack(pop) | ||
| 432 | #endif | ||
| 433 | |||
| 434 | #ifdef __MigPackStructs | ||
| 435 | #pragma pack(push, 4) | ||
| 436 | #endif | ||
| 437 | 	typedef struct { | ||
| 438 | 		mach_msg_header_t Head; | ||
| 439 | 		NDR_record_t NDR; | ||
| 440 | 		host_flavor_t flavor; | ||
| 441 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 442 | 	} __Request__host_priv_statistics_t __attribute__((unused)); | ||
| 443 | #ifdef __MigPackStructs | ||
| 444 | #pragma pack(pop) | ||
| 445 | #endif | ||
| 446 | |||
| 447 | #ifdef __MigPackStructs | ||
| 448 | #pragma pack(push, 4) | ||
| 449 | #endif | ||
| 450 | 	typedef struct { | ||
| 451 | 		mach_msg_header_t Head; | ||
| 452 | 		/* start of the kernel processed data */ | ||
| 453 | 		mach_msg_body_t msgh_body; | ||
| 454 | 		mach_msg_port_descriptor_t default_manager; | ||
| 455 | 		/* end of the kernel processed data */ | ||
| 456 | 		NDR_record_t NDR; | ||
| 457 | 		memory_object_cluster_size_t cluster_size; | ||
| 458 | 	} __Request__host_default_memory_manager_t __attribute__((unused)); | ||
| 459 | #ifdef __MigPackStructs | ||
| 460 | #pragma pack(pop) | ||
| 461 | #endif | ||
| 462 | |||
| 463 | #ifdef __MigPackStructs | ||
| 464 | #pragma pack(push, 4) | ||
| 465 | #endif | ||
| 466 | 	typedef struct { | ||
| 467 | 		mach_msg_header_t Head; | ||
| 468 | 		/* start of the kernel processed data */ | ||
| 469 | 		mach_msg_body_t msgh_body; | ||
| 470 | 		mach_msg_port_descriptor_t task; | ||
| 471 | 		/* end of the kernel processed data */ | ||
| 472 | 		NDR_record_t NDR; | ||
| 473 | 		vm_address_t address; | ||
| 474 | 		vm_size_t size; | ||
| 475 | 		vm_prot_t desired_access; | ||
| 476 | 	} __Request__vm_wire_t __attribute__((unused)); | ||
| 477 | #ifdef __MigPackStructs | ||
| 478 | #pragma pack(pop) | ||
| 479 | #endif | ||
| 480 | |||
| 481 | #ifdef __MigPackStructs | ||
| 482 | #pragma pack(push, 4) | ||
| 483 | #endif | ||
| 484 | 	typedef struct { | ||
| 485 | 		mach_msg_header_t Head; | ||
| 486 | 		/* start of the kernel processed data */ | ||
| 487 | 		mach_msg_body_t msgh_body; | ||
| 488 | 		mach_msg_port_descriptor_t thread; | ||
| 489 | 		/* end of the kernel processed data */ | ||
| 490 | 		NDR_record_t NDR; | ||
| 491 | 		boolean_t wired; | ||
| 492 | 	} __Request__thread_wire_t __attribute__((unused)); | ||
| 493 | #ifdef __MigPackStructs | ||
| 494 | #pragma pack(pop) | ||
| 495 | #endif | ||
| 496 | |||
| 497 | #ifdef __MigPackStructs | ||
| 498 | #pragma pack(push, 4) | ||
| 499 | #endif | ||
| 500 | 	typedef struct { | ||
| 501 | 		mach_msg_header_t Head; | ||
| 502 | 		/* start of the kernel processed data */ | ||
| 503 | 		mach_msg_body_t msgh_body; | ||
| 504 | 		mach_msg_port_descriptor_t task; | ||
| 505 | 		/* end of the kernel processed data */ | ||
| 506 | 		NDR_record_t NDR; | ||
| 507 | 		vm_address_t address; | ||
| 508 | 		vm_size_t size; | ||
| 509 | 		int flags; | ||
| 510 | 	} __Request__vm_allocate_cpm_t __attribute__((unused)); | ||
| 511 | #ifdef __MigPackStructs | ||
| 512 | #pragma pack(pop) | ||
| 513 | #endif | ||
| 514 | |||
| 515 | #ifdef __MigPackStructs | ||
| 516 | #pragma pack(push, 4) | ||
| 517 | #endif | ||
| 518 | 	typedef struct { | ||
| 519 | 		mach_msg_header_t Head; | ||
| 520 | 	} __Request__host_processors_t __attribute__((unused)); | ||
| 521 | #ifdef __MigPackStructs | ||
| 522 | #pragma pack(pop) | ||
| 523 | #endif | ||
| 524 | |||
| 525 | #ifdef __MigPackStructs | ||
| 526 | #pragma pack(push, 4) | ||
| 527 | #endif | ||
| 528 | 	typedef struct { | ||
| 529 | 		mach_msg_header_t Head; | ||
| 530 | 		NDR_record_t NDR; | ||
| 531 | 		clock_id_t clock_id; | ||
| 532 | 	} __Request__host_get_clock_control_t __attribute__((unused)); | ||
| 533 | #ifdef __MigPackStructs | ||
| 534 | #pragma pack(pop) | ||
| 535 | #endif | ||
| 536 | |||
| 537 | #ifdef __MigPackStructs | ||
| 538 | #pragma pack(push, 4) | ||
| 539 | #endif | ||
| 540 | 	typedef struct { | ||
| 541 | 		mach_msg_header_t Head; | ||
| 542 | 		NDR_record_t NDR; | ||
| 543 | 		vm_address_t info; | ||
| 544 | 	} __Request__kmod_create_t __attribute__((unused)); | ||
| 545 | #ifdef __MigPackStructs | ||
| 546 | #pragma pack(pop) | ||
| 547 | #endif | ||
| 548 | |||
| 549 | #ifdef __MigPackStructs | ||
| 550 | #pragma pack(push, 4) | ||
| 551 | #endif | ||
| 552 | 	typedef struct { | ||
| 553 | 		mach_msg_header_t Head; | ||
| 554 | 		NDR_record_t NDR; | ||
| 555 | 		kmod_t module; | ||
| 556 | 	} __Request__kmod_destroy_t __attribute__((unused)); | ||
| 557 | #ifdef __MigPackStructs | ||
| 558 | #pragma pack(pop) | ||
| 559 | #endif | ||
| 560 | |||
| 561 | #ifdef __MigPackStructs | ||
| 562 | #pragma pack(push, 4) | ||
| 563 | #endif | ||
| 564 | 	typedef struct { | ||
| 565 | 		mach_msg_header_t Head; | ||
| 566 | 		/* start of the kernel processed data */ | ||
| 567 | 		mach_msg_body_t msgh_body; | ||
| 568 | 		mach_msg_ool_descriptor_t data; | ||
| 569 | 		/* end of the kernel processed data */ | ||
| 570 | 		NDR_record_t NDR; | ||
| 571 | 		kmod_t module; | ||
| 572 | 		kmod_control_flavor_t flavor; | ||
| 573 | 		mach_msg_type_number_t dataCnt; | ||
| 574 | 	} __Request__kmod_control_t __attribute__((unused)); | ||
| 575 | #ifdef __MigPackStructs | ||
| 576 | #pragma pack(pop) | ||
| 577 | #endif | ||
| 578 | |||
| 579 | #ifdef __MigPackStructs | ||
| 580 | #pragma pack(push, 4) | ||
| 581 | #endif | ||
| 582 | 	typedef struct { | ||
| 583 | 		mach_msg_header_t Head; | ||
| 584 | 		NDR_record_t NDR; | ||
| 585 | 		int node; | ||
| 586 | 		int which; | ||
| 587 | 	} __Request__host_get_special_port_t __attribute__((unused)); | ||
| 588 | #ifdef __MigPackStructs | ||
| 589 | #pragma pack(pop) | ||
| 590 | #endif | ||
| 591 | |||
| 592 | #ifdef __MigPackStructs | ||
| 593 | #pragma pack(push, 4) | ||
| 594 | #endif | ||
| 595 | 	typedef struct { | ||
| 596 | 		mach_msg_header_t Head; | ||
| 597 | 		/* start of the kernel processed data */ | ||
| 598 | 		mach_msg_body_t msgh_body; | ||
| 599 | 		mach_msg_port_descriptor_t port; | ||
| 600 | 		/* end of the kernel processed data */ | ||
| 601 | 		NDR_record_t NDR; | ||
| 602 | 		int which; | ||
| 603 | 	} __Request__host_set_special_port_t __attribute__((unused)); | ||
| 604 | #ifdef __MigPackStructs | ||
| 605 | #pragma pack(pop) | ||
| 606 | #endif | ||
| 607 | |||
| 608 | #ifdef __MigPackStructs | ||
| 609 | #pragma pack(push, 4) | ||
| 610 | #endif | ||
| 611 | 	typedef struct { | ||
| 612 | 		mach_msg_header_t Head; | ||
| 613 | 		/* start of the kernel processed data */ | ||
| 614 | 		mach_msg_body_t msgh_body; | ||
| 615 | 		mach_msg_port_descriptor_t new_port; | ||
| 616 | 		/* end of the kernel processed data */ | ||
| 617 | 		NDR_record_t NDR; | ||
| 618 | 		exception_mask_t exception_mask; | ||
| 619 | 		exception_behavior_t behavior; | ||
| 620 | 		thread_state_flavor_t new_flavor; | ||
| 621 | 	} __Request__host_set_exception_ports_t __attribute__((unused)); | ||
| 622 | #ifdef __MigPackStructs | ||
| 623 | #pragma pack(pop) | ||
| 624 | #endif | ||
| 625 | |||
| 626 | #ifdef __MigPackStructs | ||
| 627 | #pragma pack(push, 4) | ||
| 628 | #endif | ||
| 629 | 	typedef struct { | ||
| 630 | 		mach_msg_header_t Head; | ||
| 631 | 		NDR_record_t NDR; | ||
| 632 | 		exception_mask_t exception_mask; | ||
| 633 | 	} __Request__host_get_exception_ports_t __attribute__((unused)); | ||
| 634 | #ifdef __MigPackStructs | ||
| 635 | #pragma pack(pop) | ||
| 636 | #endif | ||
| 637 | |||
| 638 | #ifdef __MigPackStructs | ||
| 639 | #pragma pack(push, 4) | ||
| 640 | #endif | ||
| 641 | 	typedef struct { | ||
| 642 | 		mach_msg_header_t Head; | ||
| 643 | 		/* start of the kernel processed data */ | ||
| 644 | 		mach_msg_body_t msgh_body; | ||
| 645 | 		mach_msg_port_descriptor_t new_port; | ||
| 646 | 		/* end of the kernel processed data */ | ||
| 647 | 		NDR_record_t NDR; | ||
| 648 | 		exception_mask_t exception_mask; | ||
| 649 | 		exception_behavior_t behavior; | ||
| 650 | 		thread_state_flavor_t new_flavor; | ||
| 651 | 	} __Request__host_swap_exception_ports_t __attribute__((unused)); | ||
| 652 | #ifdef __MigPackStructs | ||
| 653 | #pragma pack(pop) | ||
| 654 | #endif | ||
| 655 | |||
| 656 | #ifdef __MigPackStructs | ||
| 657 | #pragma pack(push, 4) | ||
| 658 | #endif | ||
| 659 | 	typedef struct { | ||
| 660 | 		mach_msg_header_t Head; | ||
| 661 | 		/* start of the kernel processed data */ | ||
| 662 | 		mach_msg_body_t msgh_body; | ||
| 663 | 		mach_msg_port_descriptor_t task; | ||
| 664 | 		/* end of the kernel processed data */ | ||
| 665 | 		NDR_record_t NDR; | ||
| 666 | 		mach_vm_address_t address; | ||
| 667 | 		mach_vm_size_t size; | ||
| 668 | 		vm_prot_t desired_access; | ||
| 669 | 	} __Request__mach_vm_wire_t __attribute__((unused)); | ||
| 670 | #ifdef __MigPackStructs | ||
| 671 | #pragma pack(pop) | ||
| 672 | #endif | ||
| 673 | |||
| 674 | #ifdef __MigPackStructs | ||
| 675 | #pragma pack(push, 4) | ||
| 676 | #endif | ||
| 677 | 	typedef struct { | ||
| 678 | 		mach_msg_header_t Head; | ||
| 679 | 	} __Request__host_processor_sets_t __attribute__((unused)); | ||
| 680 | #ifdef __MigPackStructs | ||
| 681 | #pragma pack(pop) | ||
| 682 | #endif | ||
| 683 | |||
| 684 | #ifdef __MigPackStructs | ||
| 685 | #pragma pack(push, 4) | ||
| 686 | #endif | ||
| 687 | 	typedef struct { | ||
| 688 | 		mach_msg_header_t Head; | ||
| 689 | 		/* start of the kernel processed data */ | ||
| 690 | 		mach_msg_body_t msgh_body; | ||
| 691 | 		mach_msg_port_descriptor_t set_name; | ||
| 692 | 		/* end of the kernel processed data */ | ||
| 693 | 	} __Request__host_processor_set_priv_t __attribute__((unused)); | ||
| 694 | #ifdef __MigPackStructs | ||
| 695 | #pragma pack(pop) | ||
| 696 | #endif | ||
| 697 | |||
| 698 | #ifdef __MigPackStructs | ||
| 699 | #pragma pack(push, 4) | ||
| 700 | #endif | ||
| 701 | 	typedef struct { | ||
| 702 | 		mach_msg_header_t Head; | ||
| 703 | 		/* start of the kernel processed data */ | ||
| 704 | 		mach_msg_body_t msgh_body; | ||
| 705 | 		mach_msg_port_descriptor_t server; | ||
| 706 | 		/* end of the kernel processed data */ | ||
| 707 | 	} __Request__host_set_UNDServer_t __attribute__((unused)); | ||
| 708 | #ifdef __MigPackStructs | ||
| 709 | #pragma pack(pop) | ||
| 710 | #endif | ||
| 711 | |||
| 712 | #ifdef __MigPackStructs | ||
| 713 | #pragma pack(push, 4) | ||
| 714 | #endif | ||
| 715 | 	typedef struct { | ||
| 716 | 		mach_msg_header_t Head; | ||
| 717 | 	} __Request__host_get_UNDServer_t __attribute__((unused)); | ||
| 718 | #ifdef __MigPackStructs | ||
| 719 | #pragma pack(pop) | ||
| 720 | #endif | ||
| 721 | |||
| 722 | #ifdef __MigPackStructs | ||
| 723 | #pragma pack(push, 4) | ||
| 724 | #endif | ||
| 725 | 	typedef struct { | ||
| 726 | 		mach_msg_header_t Head; | ||
| 727 | 		/* start of the kernel processed data */ | ||
| 728 | 		mach_msg_body_t msgh_body; | ||
| 729 | 		mach_msg_ool_descriptor_t request_data; | ||
| 730 | 		/* end of the kernel processed data */ | ||
| 731 | 		NDR_record_t NDR; | ||
| 732 | 		uint32_t user_log_flags; | ||
| 733 | 		mach_msg_type_number_t request_dataCnt; | ||
| 734 | 	} __Request__kext_request_t __attribute__((unused)); | ||
| 735 | #ifdef __MigPackStructs | ||
| 736 | #pragma pack(pop) | ||
| 737 | #endif | ||
| 738 | #endif /* !__Request__host_priv_subsystem__defined */ | ||
| 739 | |||
| 740 | /* union of all requests */ | ||
| 741 | |||
| 742 | #ifndef __RequestUnion__host_priv_subsystem__defined | ||
| 743 | #define __RequestUnion__host_priv_subsystem__defined | ||
| 744 | union __RequestUnion__host_priv_subsystem { | ||
| 745 | 	__Request__host_get_boot_info_t Request_host_get_boot_info; | ||
| 746 | 	__Request__host_reboot_t Request_host_reboot; | ||
| 747 | 	__Request__host_priv_statistics_t Request_host_priv_statistics; | ||
| 748 | 	__Request__host_default_memory_manager_t Request_host_default_memory_manager; | ||
| 749 | 	__Request__vm_wire_t Request_vm_wire; | ||
| 750 | 	__Request__thread_wire_t Request_thread_wire; | ||
| 751 | 	__Request__vm_allocate_cpm_t Request_vm_allocate_cpm; | ||
| 752 | 	__Request__host_processors_t Request_host_processors; | ||
| 753 | 	__Request__host_get_clock_control_t Request_host_get_clock_control; | ||
| 754 | 	__Request__kmod_create_t Request_kmod_create; | ||
| 755 | 	__Request__kmod_destroy_t Request_kmod_destroy; | ||
| 756 | 	__Request__kmod_control_t Request_kmod_control; | ||
| 757 | 	__Request__host_get_special_port_t Request_host_get_special_port; | ||
| 758 | 	__Request__host_set_special_port_t Request_host_set_special_port; | ||
| 759 | 	__Request__host_set_exception_ports_t Request_host_set_exception_ports; | ||
| 760 | 	__Request__host_get_exception_ports_t Request_host_get_exception_ports; | ||
| 761 | 	__Request__host_swap_exception_ports_t Request_host_swap_exception_ports; | ||
| 762 | 	__Request__mach_vm_wire_t Request_mach_vm_wire; | ||
| 763 | 	__Request__host_processor_sets_t Request_host_processor_sets; | ||
| 764 | 	__Request__host_processor_set_priv_t Request_host_processor_set_priv; | ||
| 765 | 	__Request__host_set_UNDServer_t Request_host_set_UNDServer; | ||
| 766 | 	__Request__host_get_UNDServer_t Request_host_get_UNDServer; | ||
| 767 | 	__Request__kext_request_t Request_kext_request; | ||
| 768 | }; | ||
| 769 | #endif /* !__RequestUnion__host_priv_subsystem__defined */ | ||
| 770 | /* typedefs for all replies */ | ||
| 771 | |||
| 772 | #ifndef __Reply__host_priv_subsystem__defined | ||
| 773 | #define __Reply__host_priv_subsystem__defined | ||
| 774 | |||
| 775 | #ifdef __MigPackStructs | ||
| 776 | #pragma pack(push, 4) | ||
| 777 | #endif | ||
| 778 | 	typedef struct { | ||
| 779 | 		mach_msg_header_t Head; | ||
| 780 | 		NDR_record_t NDR; | ||
| 781 | 		kern_return_t RetCode; | ||
| 782 | 		mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ | ||
| 783 | 		mach_msg_type_number_t boot_infoCnt; | ||
| 784 | 		char boot_info[4096]; | ||
| 785 | 	} __Reply__host_get_boot_info_t __attribute__((unused)); | ||
| 786 | #ifdef __MigPackStructs | ||
| 787 | #pragma pack(pop) | ||
| 788 | #endif | ||
| 789 | |||
| 790 | #ifdef __MigPackStructs | ||
| 791 | #pragma pack(push, 4) | ||
| 792 | #endif | ||
| 793 | 	typedef struct { | ||
| 794 | 		mach_msg_header_t Head; | ||
| 795 | 		NDR_record_t NDR; | ||
| 796 | 		kern_return_t RetCode; | ||
| 797 | 	} __Reply__host_reboot_t __attribute__((unused)); | ||
| 798 | #ifdef __MigPackStructs | ||
| 799 | #pragma pack(pop) | ||
| 800 | #endif | ||
| 801 | |||
| 802 | #ifdef __MigPackStructs | ||
| 803 | #pragma pack(push, 4) | ||
| 804 | #endif | ||
| 805 | 	typedef struct { | ||
| 806 | 		mach_msg_header_t Head; | ||
| 807 | 		NDR_record_t NDR; | ||
| 808 | 		kern_return_t RetCode; | ||
| 809 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 810 | 		integer_t host_info_out[68]; | ||
| 811 | 	} __Reply__host_priv_statistics_t __attribute__((unused)); | ||
| 812 | #ifdef __MigPackStructs | ||
| 813 | #pragma pack(pop) | ||
| 814 | #endif | ||
| 815 | |||
| 816 | #ifdef __MigPackStructs | ||
| 817 | #pragma pack(push, 4) | ||
| 818 | #endif | ||
| 819 | 	typedef struct { | ||
| 820 | 		mach_msg_header_t Head; | ||
| 821 | 		/* start of the kernel processed data */ | ||
| 822 | 		mach_msg_body_t msgh_body; | ||
| 823 | 		mach_msg_port_descriptor_t default_manager; | ||
| 824 | 		/* end of the kernel processed data */ | ||
| 825 | 	} __Reply__host_default_memory_manager_t __attribute__((unused)); | ||
| 826 | #ifdef __MigPackStructs | ||
| 827 | #pragma pack(pop) | ||
| 828 | #endif | ||
| 829 | |||
| 830 | #ifdef __MigPackStructs | ||
| 831 | #pragma pack(push, 4) | ||
| 832 | #endif | ||
| 833 | 	typedef struct { | ||
| 834 | 		mach_msg_header_t Head; | ||
| 835 | 		NDR_record_t NDR; | ||
| 836 | 		kern_return_t RetCode; | ||
| 837 | 	} __Reply__vm_wire_t __attribute__((unused)); | ||
| 838 | #ifdef __MigPackStructs | ||
| 839 | #pragma pack(pop) | ||
| 840 | #endif | ||
| 841 | |||
| 842 | #ifdef __MigPackStructs | ||
| 843 | #pragma pack(push, 4) | ||
| 844 | #endif | ||
| 845 | 	typedef struct { | ||
| 846 | 		mach_msg_header_t Head; | ||
| 847 | 		NDR_record_t NDR; | ||
| 848 | 		kern_return_t RetCode; | ||
| 849 | 	} __Reply__thread_wire_t __attribute__((unused)); | ||
| 850 | #ifdef __MigPackStructs | ||
| 851 | #pragma pack(pop) | ||
| 852 | #endif | ||
| 853 | |||
| 854 | #ifdef __MigPackStructs | ||
| 855 | #pragma pack(push, 4) | ||
| 856 | #endif | ||
| 857 | 	typedef struct { | ||
| 858 | 		mach_msg_header_t Head; | ||
| 859 | 		NDR_record_t NDR; | ||
| 860 | 		kern_return_t RetCode; | ||
| 861 | 		vm_address_t address; | ||
| 862 | 	} __Reply__vm_allocate_cpm_t __attribute__((unused)); | ||
| 863 | #ifdef __MigPackStructs | ||
| 864 | #pragma pack(pop) | ||
| 865 | #endif | ||
| 866 | |||
| 867 | #ifdef __MigPackStructs | ||
| 868 | #pragma pack(push, 4) | ||
| 869 | #endif | ||
| 870 | 	typedef struct { | ||
| 871 | 		mach_msg_header_t Head; | ||
| 872 | 		/* start of the kernel processed data */ | ||
| 873 | 		mach_msg_body_t msgh_body; | ||
| 874 | 		mach_msg_ool_ports_descriptor_t out_processor_list; | ||
| 875 | 		/* end of the kernel processed data */ | ||
| 876 | 		NDR_record_t NDR; | ||
| 877 | 		mach_msg_type_number_t out_processor_listCnt; | ||
| 878 | 	} __Reply__host_processors_t __attribute__((unused)); | ||
| 879 | #ifdef __MigPackStructs | ||
| 880 | #pragma pack(pop) | ||
| 881 | #endif | ||
| 882 | |||
| 883 | #ifdef __MigPackStructs | ||
| 884 | #pragma pack(push, 4) | ||
| 885 | #endif | ||
| 886 | 	typedef struct { | ||
| 887 | 		mach_msg_header_t Head; | ||
| 888 | 		/* start of the kernel processed data */ | ||
| 889 | 		mach_msg_body_t msgh_body; | ||
| 890 | 		mach_msg_port_descriptor_t clock_ctrl; | ||
| 891 | 		/* end of the kernel processed data */ | ||
| 892 | 	} __Reply__host_get_clock_control_t __attribute__((unused)); | ||
| 893 | #ifdef __MigPackStructs | ||
| 894 | #pragma pack(pop) | ||
| 895 | #endif | ||
| 896 | |||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(push, 4) | ||
| 899 | #endif | ||
| 900 | 	typedef struct { | ||
| 901 | 		mach_msg_header_t Head; | ||
| 902 | 		NDR_record_t NDR; | ||
| 903 | 		kern_return_t RetCode; | ||
| 904 | 		kmod_t module; | ||
| 905 | 	} __Reply__kmod_create_t __attribute__((unused)); | ||
| 906 | #ifdef __MigPackStructs | ||
| 907 | #pragma pack(pop) | ||
| 908 | #endif | ||
| 909 | |||
| 910 | #ifdef __MigPackStructs | ||
| 911 | #pragma pack(push, 4) | ||
| 912 | #endif | ||
| 913 | 	typedef struct { | ||
| 914 | 		mach_msg_header_t Head; | ||
| 915 | 		NDR_record_t NDR; | ||
| 916 | 		kern_return_t RetCode; | ||
| 917 | 	} __Reply__kmod_destroy_t __attribute__((unused)); | ||
| 918 | #ifdef __MigPackStructs | ||
| 919 | #pragma pack(pop) | ||
| 920 | #endif | ||
| 921 | |||
| 922 | #ifdef __MigPackStructs | ||
| 923 | #pragma pack(push, 4) | ||
| 924 | #endif | ||
| 925 | 	typedef struct { | ||
| 926 | 		mach_msg_header_t Head; | ||
| 927 | 		/* start of the kernel processed data */ | ||
| 928 | 		mach_msg_body_t msgh_body; | ||
| 929 | 		mach_msg_ool_descriptor_t data; | ||
| 930 | 		/* end of the kernel processed data */ | ||
| 931 | 		NDR_record_t NDR; | ||
| 932 | 		mach_msg_type_number_t dataCnt; | ||
| 933 | 	} __Reply__kmod_control_t __attribute__((unused)); | ||
| 934 | #ifdef __MigPackStructs | ||
| 935 | #pragma pack(pop) | ||
| 936 | #endif | ||
| 937 | |||
| 938 | #ifdef __MigPackStructs | ||
| 939 | #pragma pack(push, 4) | ||
| 940 | #endif | ||
| 941 | 	typedef struct { | ||
| 942 | 		mach_msg_header_t Head; | ||
| 943 | 		/* start of the kernel processed data */ | ||
| 944 | 		mach_msg_body_t msgh_body; | ||
| 945 | 		mach_msg_port_descriptor_t port; | ||
| 946 | 		/* end of the kernel processed data */ | ||
| 947 | 	} __Reply__host_get_special_port_t __attribute__((unused)); | ||
| 948 | #ifdef __MigPackStructs | ||
| 949 | #pragma pack(pop) | ||
| 950 | #endif | ||
| 951 | |||
| 952 | #ifdef __MigPackStructs | ||
| 953 | #pragma pack(push, 4) | ||
| 954 | #endif | ||
| 955 | 	typedef struct { | ||
| 956 | 		mach_msg_header_t Head; | ||
| 957 | 		NDR_record_t NDR; | ||
| 958 | 		kern_return_t RetCode; | ||
| 959 | 	} __Reply__host_set_special_port_t __attribute__((unused)); | ||
| 960 | #ifdef __MigPackStructs | ||
| 961 | #pragma pack(pop) | ||
| 962 | #endif | ||
| 963 | |||
| 964 | #ifdef __MigPackStructs | ||
| 965 | #pragma pack(push, 4) | ||
| 966 | #endif | ||
| 967 | 	typedef struct { | ||
| 968 | 		mach_msg_header_t Head; | ||
| 969 | 		NDR_record_t NDR; | ||
| 970 | 		kern_return_t RetCode; | ||
| 971 | 	} __Reply__host_set_exception_ports_t __attribute__((unused)); | ||
| 972 | #ifdef __MigPackStructs | ||
| 973 | #pragma pack(pop) | ||
| 974 | #endif | ||
| 975 | |||
| 976 | #ifdef __MigPackStructs | ||
| 977 | #pragma pack(push, 4) | ||
| 978 | #endif | ||
| 979 | 	typedef struct { | ||
| 980 | 		mach_msg_header_t Head; | ||
| 981 | 		/* start of the kernel processed data */ | ||
| 982 | 		mach_msg_body_t msgh_body; | ||
| 983 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 984 | 		/* end of the kernel processed data */ | ||
| 985 | 		NDR_record_t NDR; | ||
| 986 | 		mach_msg_type_number_t masksCnt; | ||
| 987 | 		exception_mask_t masks[32]; | ||
| 988 | 		exception_behavior_t old_behaviors[32]; | ||
| 989 | 		thread_state_flavor_t old_flavors[32]; | ||
| 990 | 	} __Reply__host_get_exception_ports_t __attribute__((unused)); | ||
| 991 | #ifdef __MigPackStructs | ||
| 992 | #pragma pack(pop) | ||
| 993 | #endif | ||
| 994 | |||
| 995 | #ifdef __MigPackStructs | ||
| 996 | #pragma pack(push, 4) | ||
| 997 | #endif | ||
| 998 | 	typedef struct { | ||
| 999 | 		mach_msg_header_t Head; | ||
| 1000 | 		/* start of the kernel processed data */ | ||
| 1001 | 		mach_msg_body_t msgh_body; | ||
| 1002 | 		mach_msg_port_descriptor_t old_handlerss[32]; | ||
| 1003 | 		/* end of the kernel processed data */ | ||
| 1004 | 		NDR_record_t NDR; | ||
| 1005 | 		mach_msg_type_number_t masksCnt; | ||
| 1006 | 		exception_mask_t masks[32]; | ||
| 1007 | 		exception_behavior_t old_behaviors[32]; | ||
| 1008 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1009 | 	} __Reply__host_swap_exception_ports_t __attribute__((unused)); | ||
| 1010 | #ifdef __MigPackStructs | ||
| 1011 | #pragma pack(pop) | ||
| 1012 | #endif | ||
| 1013 | |||
| 1014 | #ifdef __MigPackStructs | ||
| 1015 | #pragma pack(push, 4) | ||
| 1016 | #endif | ||
| 1017 | 	typedef struct { | ||
| 1018 | 		mach_msg_header_t Head; | ||
| 1019 | 		NDR_record_t NDR; | ||
| 1020 | 		kern_return_t RetCode; | ||
| 1021 | 	} __Reply__mach_vm_wire_t __attribute__((unused)); | ||
| 1022 | #ifdef __MigPackStructs | ||
| 1023 | #pragma pack(pop) | ||
| 1024 | #endif | ||
| 1025 | |||
| 1026 | #ifdef __MigPackStructs | ||
| 1027 | #pragma pack(push, 4) | ||
| 1028 | #endif | ||
| 1029 | 	typedef struct { | ||
| 1030 | 		mach_msg_header_t Head; | ||
| 1031 | 		/* start of the kernel processed data */ | ||
| 1032 | 		mach_msg_body_t msgh_body; | ||
| 1033 | 		mach_msg_ool_ports_descriptor_t processor_sets; | ||
| 1034 | 		/* end of the kernel processed data */ | ||
| 1035 | 		NDR_record_t NDR; | ||
| 1036 | 		mach_msg_type_number_t processor_setsCnt; | ||
| 1037 | 	} __Reply__host_processor_sets_t __attribute__((unused)); | ||
| 1038 | #ifdef __MigPackStructs | ||
| 1039 | #pragma pack(pop) | ||
| 1040 | #endif | ||
| 1041 | |||
| 1042 | #ifdef __MigPackStructs | ||
| 1043 | #pragma pack(push, 4) | ||
| 1044 | #endif | ||
| 1045 | 	typedef struct { | ||
| 1046 | 		mach_msg_header_t Head; | ||
| 1047 | 		/* start of the kernel processed data */ | ||
| 1048 | 		mach_msg_body_t msgh_body; | ||
| 1049 | 		mach_msg_port_descriptor_t set; | ||
| 1050 | 		/* end of the kernel processed data */ | ||
| 1051 | 	} __Reply__host_processor_set_priv_t __attribute__((unused)); | ||
| 1052 | #ifdef __MigPackStructs | ||
| 1053 | #pragma pack(pop) | ||
| 1054 | #endif | ||
| 1055 | |||
| 1056 | #ifdef __MigPackStructs | ||
| 1057 | #pragma pack(push, 4) | ||
| 1058 | #endif | ||
| 1059 | 	typedef struct { | ||
| 1060 | 		mach_msg_header_t Head; | ||
| 1061 | 		NDR_record_t NDR; | ||
| 1062 | 		kern_return_t RetCode; | ||
| 1063 | 	} __Reply__host_set_UNDServer_t __attribute__((unused)); | ||
| 1064 | #ifdef __MigPackStructs | ||
| 1065 | #pragma pack(pop) | ||
| 1066 | #endif | ||
| 1067 | |||
| 1068 | #ifdef __MigPackStructs | ||
| 1069 | #pragma pack(push, 4) | ||
| 1070 | #endif | ||
| 1071 | 	typedef struct { | ||
| 1072 | 		mach_msg_header_t Head; | ||
| 1073 | 		/* start of the kernel processed data */ | ||
| 1074 | 		mach_msg_body_t msgh_body; | ||
| 1075 | 		mach_msg_port_descriptor_t server; | ||
| 1076 | 		/* end of the kernel processed data */ | ||
| 1077 | 	} __Reply__host_get_UNDServer_t __attribute__((unused)); | ||
| 1078 | #ifdef __MigPackStructs | ||
| 1079 | #pragma pack(pop) | ||
| 1080 | #endif | ||
| 1081 | |||
| 1082 | #ifdef __MigPackStructs | ||
| 1083 | #pragma pack(push, 4) | ||
| 1084 | #endif | ||
| 1085 | 	typedef struct { | ||
| 1086 | 		mach_msg_header_t Head; | ||
| 1087 | 		/* start of the kernel processed data */ | ||
| 1088 | 		mach_msg_body_t msgh_body; | ||
| 1089 | 		mach_msg_ool_descriptor_t response_data; | ||
| 1090 | 		mach_msg_ool_descriptor_t log_data; | ||
| 1091 | 		/* end of the kernel processed data */ | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		mach_msg_type_number_t response_dataCnt; | ||
| 1094 | 		mach_msg_type_number_t log_dataCnt; | ||
| 1095 | 		kern_return_t op_result; | ||
| 1096 | 	} __Reply__kext_request_t __attribute__((unused)); | ||
| 1097 | #ifdef __MigPackStructs | ||
| 1098 | #pragma pack(pop) | ||
| 1099 | #endif | ||
| 1100 | #endif /* !__Reply__host_priv_subsystem__defined */ | ||
| 1101 | |||
| 1102 | /* union of all replies */ | ||
| 1103 | |||
| 1104 | #ifndef __ReplyUnion__host_priv_subsystem__defined | ||
| 1105 | #define __ReplyUnion__host_priv_subsystem__defined | ||
| 1106 | union __ReplyUnion__host_priv_subsystem { | ||
| 1107 | 	__Reply__host_get_boot_info_t Reply_host_get_boot_info; | ||
| 1108 | 	__Reply__host_reboot_t Reply_host_reboot; | ||
| 1109 | 	__Reply__host_priv_statistics_t Reply_host_priv_statistics; | ||
| 1110 | 	__Reply__host_default_memory_manager_t Reply_host_default_memory_manager; | ||
| 1111 | 	__Reply__vm_wire_t Reply_vm_wire; | ||
| 1112 | 	__Reply__thread_wire_t Reply_thread_wire; | ||
| 1113 | 	__Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; | ||
| 1114 | 	__Reply__host_processors_t Reply_host_processors; | ||
| 1115 | 	__Reply__host_get_clock_control_t Reply_host_get_clock_control; | ||
| 1116 | 	__Reply__kmod_create_t Reply_kmod_create; | ||
| 1117 | 	__Reply__kmod_destroy_t Reply_kmod_destroy; | ||
| 1118 | 	__Reply__kmod_control_t Reply_kmod_control; | ||
| 1119 | 	__Reply__host_get_special_port_t Reply_host_get_special_port; | ||
| 1120 | 	__Reply__host_set_special_port_t Reply_host_set_special_port; | ||
| 1121 | 	__Reply__host_set_exception_ports_t Reply_host_set_exception_ports; | ||
| 1122 | 	__Reply__host_get_exception_ports_t Reply_host_get_exception_ports; | ||
| 1123 | 	__Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; | ||
| 1124 | 	__Reply__mach_vm_wire_t Reply_mach_vm_wire; | ||
| 1125 | 	__Reply__host_processor_sets_t Reply_host_processor_sets; | ||
| 1126 | 	__Reply__host_processor_set_priv_t Reply_host_processor_set_priv; | ||
| 1127 | 	__Reply__host_set_UNDServer_t Reply_host_set_UNDServer; | ||
| 1128 | 	__Reply__host_get_UNDServer_t Reply_host_get_UNDServer; | ||
| 1129 | 	__Reply__kext_request_t Reply_kext_request; | ||
| 1130 | }; | ||
| 1131 | #endif /* !__RequestUnion__host_priv_subsystem__defined */ | ||
| 1132 | |||
| 1133 | #ifndef subsystem_to_name_map_host_priv | ||
| 1134 | #define subsystem_to_name_map_host_priv \ | ||
| 1135 | { "host_get_boot_info", 400 },\ | ||
| 1136 | { "host_reboot", 401 },\ | ||
| 1137 | { "host_priv_statistics", 402 },\ | ||
| 1138 | { "host_default_memory_manager", 403 },\ | ||
| 1139 | { "vm_wire", 404 },\ | ||
| 1140 | { "thread_wire", 405 },\ | ||
| 1141 | { "vm_allocate_cpm", 406 },\ | ||
| 1142 | { "host_processors", 407 },\ | ||
| 1143 | { "host_get_clock_control", 408 },\ | ||
| 1144 | { "kmod_create", 409 },\ | ||
| 1145 | { "kmod_destroy", 410 },\ | ||
| 1146 | { "kmod_control", 411 },\ | ||
| 1147 | { "host_get_special_port", 412 },\ | ||
| 1148 | { "host_set_special_port", 413 },\ | ||
| 1149 | { "host_set_exception_ports", 414 },\ | ||
| 1150 | { "host_get_exception_ports", 415 },\ | ||
| 1151 | { "host_swap_exception_ports", 416 },\ | ||
| 1152 | { "mach_vm_wire", 418 },\ | ||
| 1153 | { "host_processor_sets", 419 },\ | ||
| 1154 | { "host_processor_set_priv", 420 },\ | ||
| 1155 | { "host_set_UNDServer", 423 },\ | ||
| 1156 | { "host_get_UNDServer", 424 },\ | ||
| 1157 | { "kext_request", 425 } | ||
| 1158 | #endif | ||
| 1159 | |||
| 1160 | #ifdef __AfterMigUserHeader | ||
| 1161 | __AfterMigUserHeader | ||
| 1162 | #endif /* __AfterMigUserHeader */ | ||
| 1163 | |||
| 1164 | #endif	 /* _host_priv_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/host_security.h deleted-222| ... | @@ -1,222 +0,0 @@ | ||
| 1 | #ifndef	_host_security_user_ | ||
| 2 | #define	_host_security_user_ | ||
| 3 | |||
| 4 | /* Module host_security */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	host_security_MSG_COUNT | ||
| 52 | #define	host_security_MSG_COUNT	2 | ||
| 53 | #endif	/* host_security_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine host_security_create_task_token */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t host_security_create_task_token | ||
| 76 | ( | ||
| 77 | 	host_security_t host_security, | ||
| 78 | 	task_t parent_task, | ||
| 79 | 	security_token_t sec_token, | ||
| 80 | 	audit_token_t audit_token, | ||
| 81 | 	host_t host, | ||
| 82 | 	ledger_array_t ledgers, | ||
| 83 | 	mach_msg_type_number_t ledgersCnt, | ||
| 84 | 	boolean_t inherit_memory, | ||
| 85 | 	task_t *child_task | ||
| 86 | ); | ||
| 87 | |||
| 88 | /* Routine host_security_set_task_token */ | ||
| 89 | #ifdef	mig_external | ||
| 90 | mig_external | ||
| 91 | #else | ||
| 92 | extern | ||
| 93 | #endif	/* mig_external */ | ||
| 94 | kern_return_t host_security_set_task_token | ||
| 95 | ( | ||
| 96 | 	host_security_t host_security, | ||
| 97 | 	task_t target_task, | ||
| 98 | 	security_token_t sec_token, | ||
| 99 | 	audit_token_t audit_token, | ||
| 100 | 	host_t host | ||
| 101 | ); | ||
| 102 | |||
| 103 | __END_DECLS | ||
| 104 | |||
| 105 | /********************** Caution **************************/ | ||
| 106 | /* The following data types should be used to calculate */ | ||
| 107 | /* maximum message sizes only. The actual message may be */ | ||
| 108 | /* smaller, and the position of the arguments within the */ | ||
| 109 | /* message layout may vary from what is presented here. */ | ||
| 110 | /* For example, if any of the arguments are variable- */ | ||
| 111 | /* sized, and less than the maximum is sent, the data */ | ||
| 112 | /* will be packed tight in the actual message to reduce */ | ||
| 113 | /* the presence of holes. */ | ||
| 114 | /********************** Caution **************************/ | ||
| 115 | |||
| 116 | /* typedefs for all requests */ | ||
| 117 | |||
| 118 | #ifndef __Request__host_security_subsystem__defined | ||
| 119 | #define __Request__host_security_subsystem__defined | ||
| 120 | |||
| 121 | #ifdef __MigPackStructs | ||
| 122 | #pragma pack(push, 4) | ||
| 123 | #endif | ||
| 124 | 	typedef struct { | ||
| 125 | 		mach_msg_header_t Head; | ||
| 126 | 		/* start of the kernel processed data */ | ||
| 127 | 		mach_msg_body_t msgh_body; | ||
| 128 | 		mach_msg_port_descriptor_t parent_task; | ||
| 129 | 		mach_msg_port_descriptor_t host; | ||
| 130 | 		mach_msg_ool_ports_descriptor_t ledgers; | ||
| 131 | 		/* end of the kernel processed data */ | ||
| 132 | 		NDR_record_t NDR; | ||
| 133 | 		security_token_t sec_token; | ||
| 134 | 		audit_token_t audit_token; | ||
| 135 | 		mach_msg_type_number_t ledgersCnt; | ||
| 136 | 		boolean_t inherit_memory; | ||
| 137 | 	} __Request__host_security_create_task_token_t __attribute__((unused)); | ||
| 138 | #ifdef __MigPackStructs | ||
| 139 | #pragma pack(pop) | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #ifdef __MigPackStructs | ||
| 143 | #pragma pack(push, 4) | ||
| 144 | #endif | ||
| 145 | 	typedef struct { | ||
| 146 | 		mach_msg_header_t Head; | ||
| 147 | 		/* start of the kernel processed data */ | ||
| 148 | 		mach_msg_body_t msgh_body; | ||
| 149 | 		mach_msg_port_descriptor_t target_task; | ||
| 150 | 		mach_msg_port_descriptor_t host; | ||
| 151 | 		/* end of the kernel processed data */ | ||
| 152 | 		NDR_record_t NDR; | ||
| 153 | 		security_token_t sec_token; | ||
| 154 | 		audit_token_t audit_token; | ||
| 155 | 	} __Request__host_security_set_task_token_t __attribute__((unused)); | ||
| 156 | #ifdef __MigPackStructs | ||
| 157 | #pragma pack(pop) | ||
| 158 | #endif | ||
| 159 | #endif /* !__Request__host_security_subsystem__defined */ | ||
| 160 | |||
| 161 | /* union of all requests */ | ||
| 162 | |||
| 163 | #ifndef __RequestUnion__host_security_subsystem__defined | ||
| 164 | #define __RequestUnion__host_security_subsystem__defined | ||
| 165 | union __RequestUnion__host_security_subsystem { | ||
| 166 | 	__Request__host_security_create_task_token_t Request_host_security_create_task_token; | ||
| 167 | 	__Request__host_security_set_task_token_t Request_host_security_set_task_token; | ||
| 168 | }; | ||
| 169 | #endif /* !__RequestUnion__host_security_subsystem__defined */ | ||
| 170 | /* typedefs for all replies */ | ||
| 171 | |||
| 172 | #ifndef __Reply__host_security_subsystem__defined | ||
| 173 | #define __Reply__host_security_subsystem__defined | ||
| 174 | |||
| 175 | #ifdef __MigPackStructs | ||
| 176 | #pragma pack(push, 4) | ||
| 177 | #endif | ||
| 178 | 	typedef struct { | ||
| 179 | 		mach_msg_header_t Head; | ||
| 180 | 		/* start of the kernel processed data */ | ||
| 181 | 		mach_msg_body_t msgh_body; | ||
| 182 | 		mach_msg_port_descriptor_t child_task; | ||
| 183 | 		/* end of the kernel processed data */ | ||
| 184 | 	} __Reply__host_security_create_task_token_t __attribute__((unused)); | ||
| 185 | #ifdef __MigPackStructs | ||
| 186 | #pragma pack(pop) | ||
| 187 | #endif | ||
| 188 | |||
| 189 | #ifdef __MigPackStructs | ||
| 190 | #pragma pack(push, 4) | ||
| 191 | #endif | ||
| 192 | 	typedef struct { | ||
| 193 | 		mach_msg_header_t Head; | ||
| 194 | 		NDR_record_t NDR; | ||
| 195 | 		kern_return_t RetCode; | ||
| 196 | 	} __Reply__host_security_set_task_token_t __attribute__((unused)); | ||
| 197 | #ifdef __MigPackStructs | ||
| 198 | #pragma pack(pop) | ||
| 199 | #endif | ||
| 200 | #endif /* !__Reply__host_security_subsystem__defined */ | ||
| 201 | |||
| 202 | /* union of all replies */ | ||
| 203 | |||
| 204 | #ifndef __ReplyUnion__host_security_subsystem__defined | ||
| 205 | #define __ReplyUnion__host_security_subsystem__defined | ||
| 206 | union __ReplyUnion__host_security_subsystem { | ||
| 207 | 	__Reply__host_security_create_task_token_t Reply_host_security_create_task_token; | ||
| 208 | 	__Reply__host_security_set_task_token_t Reply_host_security_set_task_token; | ||
| 209 | }; | ||
| 210 | #endif /* !__RequestUnion__host_security_subsystem__defined */ | ||
| 211 | |||
| 212 | #ifndef subsystem_to_name_map_host_security | ||
| 213 | #define subsystem_to_name_map_host_security \ | ||
| 214 | { "host_security_create_task_token", 600 },\ | ||
| 215 | { "host_security_set_task_token", 601 } | ||
| 216 | #endif | ||
| 217 | |||
| 218 | #ifdef __AfterMigUserHeader | ||
| 219 | __AfterMigUserHeader | ||
| 220 | #endif /* __AfterMigUserHeader */ | ||
| 221 | |||
| 222 | #endif	 /* _host_security_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/kern_return.h deleted-346| ... | @@ -1,346 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	h/kern_return.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr. | ||
| 61 | *	Date:	1985 | ||
| 62 | * | ||
| 63 | *	Kernel return codes. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_KERN_RETURN_H_ | ||
| 68 | #define _MACH_KERN_RETURN_H_ | ||
| 69 | |||
| 70 | #include <mach/machine/kern_return.h> | ||
| 71 | |||
| 72 | #define KERN_SUCCESS 0 | ||
| 73 | |||
| 74 | #define KERN_INVALID_ADDRESS 1 | ||
| 75 | /* Specified address is not currently valid. | ||
| 76 | */ | ||
| 77 | |||
| 78 | #define KERN_PROTECTION_FAILURE 2 | ||
| 79 | /* Specified memory is valid, but does not permit the | ||
| 80 | * required forms of access. | ||
| 81 | */ | ||
| 82 | |||
| 83 | #define KERN_NO_SPACE 3 | ||
| 84 | /* The address range specified is already in use, or | ||
| 85 | * no address range of the size specified could be | ||
| 86 | * found. | ||
| 87 | */ | ||
| 88 | |||
| 89 | #define KERN_INVALID_ARGUMENT 4 | ||
| 90 | /* The function requested was not applicable to this | ||
| 91 | * type of argument, or an argument is invalid | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define KERN_FAILURE 5 | ||
| 95 | /* The function could not be performed. A catch-all. | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define KERN_RESOURCE_SHORTAGE 6 | ||
| 99 | /* A system resource could not be allocated to fulfill | ||
| 100 | * this request. This failure may not be permanent. | ||
| 101 | */ | ||
| 102 | |||
| 103 | #define KERN_NOT_RECEIVER 7 | ||
| 104 | /* The task in question does not hold receive rights | ||
| 105 | * for the port argument. | ||
| 106 | */ | ||
| 107 | |||
| 108 | #define KERN_NO_ACCESS 8 | ||
| 109 | /* Bogus access restriction. | ||
| 110 | */ | ||
| 111 | |||
| 112 | #define KERN_MEMORY_FAILURE 9 | ||
| 113 | /* During a page fault, the target address refers to a | ||
| 114 | * memory object that has been destroyed. This | ||
| 115 | * failure is permanent. | ||
| 116 | */ | ||
| 117 | |||
| 118 | #define KERN_MEMORY_ERROR 10 | ||
| 119 | /* During a page fault, the memory object indicated | ||
| 120 | * that the data could not be returned. This failure | ||
| 121 | * may be temporary; future attempts to access this | ||
| 122 | * same data may succeed, as defined by the memory | ||
| 123 | * object. | ||
| 124 | */ | ||
| 125 | |||
| 126 | #define KERN_ALREADY_IN_SET 11 | ||
| 127 | /* The receive right is already a member of the portset. | ||
| 128 | */ | ||
| 129 | |||
| 130 | #define KERN_NOT_IN_SET 12 | ||
| 131 | /* The receive right is not a member of a port set. | ||
| 132 | */ | ||
| 133 | |||
| 134 | #define KERN_NAME_EXISTS 13 | ||
| 135 | /* The name already denotes a right in the task. | ||
| 136 | */ | ||
| 137 | |||
| 138 | #define KERN_ABORTED 14 | ||
| 139 | /* The operation was aborted. Ipc code will | ||
| 140 | * catch this and reflect it as a message error. | ||
| 141 | */ | ||
| 142 | |||
| 143 | #define KERN_INVALID_NAME 15 | ||
| 144 | /* The name doesn't denote a right in the task. | ||
| 145 | */ | ||
| 146 | |||
| 147 | #define KERN_INVALID_TASK 16 | ||
| 148 | /* Target task isn't an active task. | ||
| 149 | */ | ||
| 150 | |||
| 151 | #define KERN_INVALID_RIGHT 17 | ||
| 152 | /* The name denotes a right, but not an appropriate right. | ||
| 153 | */ | ||
| 154 | |||
| 155 | #define KERN_INVALID_VALUE 18 | ||
| 156 | /* A blatant range error. | ||
| 157 | */ | ||
| 158 | |||
| 159 | #define KERN_UREFS_OVERFLOW 19 | ||
| 160 | /* Operation would overflow limit on user-references. | ||
| 161 | */ | ||
| 162 | |||
| 163 | #define KERN_INVALID_CAPABILITY 20 | ||
| 164 | /* The supplied (port) capability is improper. | ||
| 165 | */ | ||
| 166 | |||
| 167 | #define KERN_RIGHT_EXISTS 21 | ||
| 168 | /* The task already has send or receive rights | ||
| 169 | * for the port under another name. | ||
| 170 | */ | ||
| 171 | |||
| 172 | #define KERN_INVALID_HOST 22 | ||
| 173 | /* Target host isn't actually a host. | ||
| 174 | */ | ||
| 175 | |||
| 176 | #define KERN_MEMORY_PRESENT 23 | ||
| 177 | /* An attempt was made to supply "precious" data | ||
| 178 | * for memory that is already present in a | ||
| 179 | * memory object. | ||
| 180 | */ | ||
| 181 | |||
| 182 | #define KERN_MEMORY_DATA_MOVED 24 | ||
| 183 | /* A page was requested of a memory manager via | ||
| 184 | * memory_object_data_request for an object using | ||
| 185 | * a MEMORY_OBJECT_COPY_CALL strategy, with the | ||
| 186 | * VM_PROT_WANTS_COPY flag being used to specify | ||
| 187 | * that the page desired is for a copy of the | ||
| 188 | * object, and the memory manager has detected | ||
| 189 | * the page was pushed into a copy of the object | ||
| 190 | * while the kernel was walking the shadow chain | ||
| 191 | * from the copy to the object. This error code | ||
| 192 | * is delivered via memory_object_data_error | ||
| 193 | * and is handled by the kernel (it forces the | ||
| 194 | * kernel to restart the fault). It will not be | ||
| 195 | * seen by users. | ||
| 196 | */ | ||
| 197 | |||
| 198 | #define KERN_MEMORY_RESTART_COPY 25 | ||
| 199 | /* A strategic copy was attempted of an object | ||
| 200 | * upon which a quicker copy is now possible. | ||
| 201 | * The caller should retry the copy using | ||
| 202 | * vm_object_copy_quickly. This error code | ||
| 203 | * is seen only by the kernel. | ||
| 204 | */ | ||
| 205 | |||
| 206 | #define KERN_INVALID_PROCESSOR_SET 26 | ||
| 207 | /* An argument applied to assert processor set privilege | ||
| 208 | * was not a processor set control port. | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define KERN_POLICY_LIMIT 27 | ||
| 212 | /* The specified scheduling attributes exceed the thread's | ||
| 213 | * limits. | ||
| 214 | */ | ||
| 215 | |||
| 216 | #define KERN_INVALID_POLICY 28 | ||
| 217 | /* The specified scheduling policy is not currently | ||
| 218 | * enabled for the processor set. | ||
| 219 | */ | ||
| 220 | |||
| 221 | #define KERN_INVALID_OBJECT 29 | ||
| 222 | /* The external memory manager failed to initialize the | ||
| 223 | * memory object. | ||
| 224 | */ | ||
| 225 | |||
| 226 | #define KERN_ALREADY_WAITING 30 | ||
| 227 | /* A thread is attempting to wait for an event for which | ||
| 228 | * there is already a waiting thread. | ||
| 229 | */ | ||
| 230 | |||
| 231 | #define KERN_DEFAULT_SET 31 | ||
| 232 | /* An attempt was made to destroy the default processor | ||
| 233 | * set. | ||
| 234 | */ | ||
| 235 | |||
| 236 | #define KERN_EXCEPTION_PROTECTED 32 | ||
| 237 | /* An attempt was made to fetch an exception port that is | ||
| 238 | * protected, or to abort a thread while processing a | ||
| 239 | * protected exception. | ||
| 240 | */ | ||
| 241 | |||
| 242 | #define KERN_INVALID_LEDGER 33 | ||
| 243 | /* A ledger was required but not supplied. | ||
| 244 | */ | ||
| 245 | |||
| 246 | #define KERN_INVALID_MEMORY_CONTROL 34 | ||
| 247 | /* The port was not a memory cache control port. | ||
| 248 | */ | ||
| 249 | |||
| 250 | #define KERN_INVALID_SECURITY 35 | ||
| 251 | /* An argument supplied to assert security privilege | ||
| 252 | * was not a host security port. | ||
| 253 | */ | ||
| 254 | |||
| 255 | #define KERN_NOT_DEPRESSED 36 | ||
| 256 | /* thread_depress_abort was called on a thread which | ||
| 257 | * was not currently depressed. | ||
| 258 | */ | ||
| 259 | |||
| 260 | #define KERN_TERMINATED 37 | ||
| 261 | /* Object has been terminated and is no longer available | ||
| 262 | */ | ||
| 263 | |||
| 264 | #define KERN_LOCK_SET_DESTROYED 38 | ||
| 265 | /* Lock set has been destroyed and is no longer available. | ||
| 266 | */ | ||
| 267 | |||
| 268 | #define KERN_LOCK_UNSTABLE 39 | ||
| 269 | /* The thread holding the lock terminated before releasing | ||
| 270 | * the lock | ||
| 271 | */ | ||
| 272 | |||
| 273 | #define KERN_LOCK_OWNED 40 | ||
| 274 | /* The lock is already owned by another thread | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define KERN_LOCK_OWNED_SELF 41 | ||
| 278 | /* The lock is already owned by the calling thread | ||
| 279 | */ | ||
| 280 | |||
| 281 | #define KERN_SEMAPHORE_DESTROYED 42 | ||
| 282 | /* Semaphore has been destroyed and is no longer available. | ||
| 283 | */ | ||
| 284 | |||
| 285 | #define KERN_RPC_SERVER_TERMINATED 43 | ||
| 286 | /* Return from RPC indicating the target server was | ||
| 287 | * terminated before it successfully replied | ||
| 288 | */ | ||
| 289 | |||
| 290 | #define KERN_RPC_TERMINATE_ORPHAN 44 | ||
| 291 | /* Terminate an orphaned activation. | ||
| 292 | */ | ||
| 293 | |||
| 294 | #define KERN_RPC_CONTINUE_ORPHAN 45 | ||
| 295 | /* Allow an orphaned activation to continue executing. | ||
| 296 | */ | ||
| 297 | |||
| 298 | #define KERN_NOT_SUPPORTED 46 | ||
| 299 | /* Empty thread activation (No thread linked to it) | ||
| 300 | */ | ||
| 301 | |||
| 302 | #define KERN_NODE_DOWN 47 | ||
| 303 | /* Remote node down or inaccessible. | ||
| 304 | */ | ||
| 305 | |||
| 306 | #define KERN_NOT_WAITING 48 | ||
| 307 | /* A signalled thread was not actually waiting. */ | ||
| 308 | |||
| 309 | #define KERN_OPERATION_TIMED_OUT 49 | ||
| 310 | /* Some thread-oriented operation (semaphore_wait) timed out | ||
| 311 | */ | ||
| 312 | |||
| 313 | #define KERN_CODESIGN_ERROR 50 | ||
| 314 | /* During a page fault, indicates that the page was rejected | ||
| 315 | * as a result of a signature check. | ||
| 316 | */ | ||
| 317 | |||
| 318 | #define KERN_POLICY_STATIC 51 | ||
| 319 | /* The requested property cannot be changed at this time. | ||
| 320 | */ | ||
| 321 | |||
| 322 | #define KERN_INSUFFICIENT_BUFFER_SIZE 52 | ||
| 323 | /* The provided buffer is of insufficient size for the requested data. | ||
| 324 | */ | ||
| 325 | |||
| 326 | #define KERN_DENIED 53 | ||
| 327 | /* Denied by security policy | ||
| 328 | */ | ||
| 329 | |||
| 330 | #define KERN_MISSING_KC 54 | ||
| 331 | /* The KC on which the function is operating is missing | ||
| 332 | */ | ||
| 333 | |||
| 334 | #define KERN_INVALID_KC 55 | ||
| 335 | /* The KC on which the function is operating is invalid | ||
| 336 | */ | ||
| 337 | |||
| 338 | #define KERN_NOT_FOUND 56 | ||
| 339 | /* A search or query operation did not return a result | ||
| 340 | */ | ||
| 341 | |||
| 342 | #define KERN_RETURN_MAX 0x100 | ||
| 343 | /* Maximum return value allowable | ||
| 344 | */ | ||
| 345 | |||
| 346 | #endif /* _MACH_KERN_RETURN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/lock_set.h deleted-351| ... | @@ -1,351 +0,0 @@ | ||
| 1 | #ifndef	_lock_set_user_ | ||
| 2 | #define	_lock_set_user_ | ||
| 3 | |||
| 4 | /* Module lock_set */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	lock_set_MSG_COUNT | ||
| 52 | #define	lock_set_MSG_COUNT	6 | ||
| 53 | #endif	/* lock_set_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine lock_acquire */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t lock_acquire | ||
| 76 | ( | ||
| 77 | 	lock_set_t lock_set, | ||
| 78 | 	int lock_id | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine lock_release */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | kern_return_t lock_release | ||
| 88 | ( | ||
| 89 | 	lock_set_t lock_set, | ||
| 90 | 	int lock_id | ||
| 91 | ); | ||
| 92 | |||
| 93 | /* Routine lock_try */ | ||
| 94 | #ifdef	mig_external | ||
| 95 | mig_external | ||
| 96 | #else | ||
| 97 | extern | ||
| 98 | #endif	/* mig_external */ | ||
| 99 | kern_return_t lock_try | ||
| 100 | ( | ||
| 101 | 	lock_set_t lock_set, | ||
| 102 | 	int lock_id | ||
| 103 | ); | ||
| 104 | |||
| 105 | /* Routine lock_make_stable */ | ||
| 106 | #ifdef	mig_external | ||
| 107 | mig_external | ||
| 108 | #else | ||
| 109 | extern | ||
| 110 | #endif	/* mig_external */ | ||
| 111 | kern_return_t lock_make_stable | ||
| 112 | ( | ||
| 113 | 	lock_set_t lock_set, | ||
| 114 | 	int lock_id | ||
| 115 | ); | ||
| 116 | |||
| 117 | /* Routine lock_handoff */ | ||
| 118 | #ifdef	mig_external | ||
| 119 | mig_external | ||
| 120 | #else | ||
| 121 | extern | ||
| 122 | #endif	/* mig_external */ | ||
| 123 | kern_return_t lock_handoff | ||
| 124 | ( | ||
| 125 | 	lock_set_t lock_set, | ||
| 126 | 	int lock_id | ||
| 127 | ); | ||
| 128 | |||
| 129 | /* Routine lock_handoff_accept */ | ||
| 130 | #ifdef	mig_external | ||
| 131 | mig_external | ||
| 132 | #else | ||
| 133 | extern | ||
| 134 | #endif	/* mig_external */ | ||
| 135 | kern_return_t lock_handoff_accept | ||
| 136 | ( | ||
| 137 | 	lock_set_t lock_set, | ||
| 138 | 	int lock_id | ||
| 139 | ); | ||
| 140 | |||
| 141 | __END_DECLS | ||
| 142 | |||
| 143 | /********************** Caution **************************/ | ||
| 144 | /* The following data types should be used to calculate */ | ||
| 145 | /* maximum message sizes only. The actual message may be */ | ||
| 146 | /* smaller, and the position of the arguments within the */ | ||
| 147 | /* message layout may vary from what is presented here. */ | ||
| 148 | /* For example, if any of the arguments are variable- */ | ||
| 149 | /* sized, and less than the maximum is sent, the data */ | ||
| 150 | /* will be packed tight in the actual message to reduce */ | ||
| 151 | /* the presence of holes. */ | ||
| 152 | /********************** Caution **************************/ | ||
| 153 | |||
| 154 | /* typedefs for all requests */ | ||
| 155 | |||
| 156 | #ifndef __Request__lock_set_subsystem__defined | ||
| 157 | #define __Request__lock_set_subsystem__defined | ||
| 158 | |||
| 159 | #ifdef __MigPackStructs | ||
| 160 | #pragma pack(push, 4) | ||
| 161 | #endif | ||
| 162 | 	typedef struct { | ||
| 163 | 		mach_msg_header_t Head; | ||
| 164 | 		NDR_record_t NDR; | ||
| 165 | 		int lock_id; | ||
| 166 | 	} __Request__lock_acquire_t __attribute__((unused)); | ||
| 167 | #ifdef __MigPackStructs | ||
| 168 | #pragma pack(pop) | ||
| 169 | #endif | ||
| 170 | |||
| 171 | #ifdef __MigPackStructs | ||
| 172 | #pragma pack(push, 4) | ||
| 173 | #endif | ||
| 174 | 	typedef struct { | ||
| 175 | 		mach_msg_header_t Head; | ||
| 176 | 		NDR_record_t NDR; | ||
| 177 | 		int lock_id; | ||
| 178 | 	} __Request__lock_release_t __attribute__((unused)); | ||
| 179 | #ifdef __MigPackStructs | ||
| 180 | #pragma pack(pop) | ||
| 181 | #endif | ||
| 182 | |||
| 183 | #ifdef __MigPackStructs | ||
| 184 | #pragma pack(push, 4) | ||
| 185 | #endif | ||
| 186 | 	typedef struct { | ||
| 187 | 		mach_msg_header_t Head; | ||
| 188 | 		NDR_record_t NDR; | ||
| 189 | 		int lock_id; | ||
| 190 | 	} __Request__lock_try_t __attribute__((unused)); | ||
| 191 | #ifdef __MigPackStructs | ||
| 192 | #pragma pack(pop) | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #ifdef __MigPackStructs | ||
| 196 | #pragma pack(push, 4) | ||
| 197 | #endif | ||
| 198 | 	typedef struct { | ||
| 199 | 		mach_msg_header_t Head; | ||
| 200 | 		NDR_record_t NDR; | ||
| 201 | 		int lock_id; | ||
| 202 | 	} __Request__lock_make_stable_t __attribute__((unused)); | ||
| 203 | #ifdef __MigPackStructs | ||
| 204 | #pragma pack(pop) | ||
| 205 | #endif | ||
| 206 | |||
| 207 | #ifdef __MigPackStructs | ||
| 208 | #pragma pack(push, 4) | ||
| 209 | #endif | ||
| 210 | 	typedef struct { | ||
| 211 | 		mach_msg_header_t Head; | ||
| 212 | 		NDR_record_t NDR; | ||
| 213 | 		int lock_id; | ||
| 214 | 	} __Request__lock_handoff_t __attribute__((unused)); | ||
| 215 | #ifdef __MigPackStructs | ||
| 216 | #pragma pack(pop) | ||
| 217 | #endif | ||
| 218 | |||
| 219 | #ifdef __MigPackStructs | ||
| 220 | #pragma pack(push, 4) | ||
| 221 | #endif | ||
| 222 | 	typedef struct { | ||
| 223 | 		mach_msg_header_t Head; | ||
| 224 | 		NDR_record_t NDR; | ||
| 225 | 		int lock_id; | ||
| 226 | 	} __Request__lock_handoff_accept_t __attribute__((unused)); | ||
| 227 | #ifdef __MigPackStructs | ||
| 228 | #pragma pack(pop) | ||
| 229 | #endif | ||
| 230 | #endif /* !__Request__lock_set_subsystem__defined */ | ||
| 231 | |||
| 232 | /* union of all requests */ | ||
| 233 | |||
| 234 | #ifndef __RequestUnion__lock_set_subsystem__defined | ||
| 235 | #define __RequestUnion__lock_set_subsystem__defined | ||
| 236 | union __RequestUnion__lock_set_subsystem { | ||
| 237 | 	__Request__lock_acquire_t Request_lock_acquire; | ||
| 238 | 	__Request__lock_release_t Request_lock_release; | ||
| 239 | 	__Request__lock_try_t Request_lock_try; | ||
| 240 | 	__Request__lock_make_stable_t Request_lock_make_stable; | ||
| 241 | 	__Request__lock_handoff_t Request_lock_handoff; | ||
| 242 | 	__Request__lock_handoff_accept_t Request_lock_handoff_accept; | ||
| 243 | }; | ||
| 244 | #endif /* !__RequestUnion__lock_set_subsystem__defined */ | ||
| 245 | /* typedefs for all replies */ | ||
| 246 | |||
| 247 | #ifndef __Reply__lock_set_subsystem__defined | ||
| 248 | #define __Reply__lock_set_subsystem__defined | ||
| 249 | |||
| 250 | #ifdef __MigPackStructs | ||
| 251 | #pragma pack(push, 4) | ||
| 252 | #endif | ||
| 253 | 	typedef struct { | ||
| 254 | 		mach_msg_header_t Head; | ||
| 255 | 		NDR_record_t NDR; | ||
| 256 | 		kern_return_t RetCode; | ||
| 257 | 	} __Reply__lock_acquire_t __attribute__((unused)); | ||
| 258 | #ifdef __MigPackStructs | ||
| 259 | #pragma pack(pop) | ||
| 260 | #endif | ||
| 261 | |||
| 262 | #ifdef __MigPackStructs | ||
| 263 | #pragma pack(push, 4) | ||
| 264 | #endif | ||
| 265 | 	typedef struct { | ||
| 266 | 		mach_msg_header_t Head; | ||
| 267 | 		NDR_record_t NDR; | ||
| 268 | 		kern_return_t RetCode; | ||
| 269 | 	} __Reply__lock_release_t __attribute__((unused)); | ||
| 270 | #ifdef __MigPackStructs | ||
| 271 | #pragma pack(pop) | ||
| 272 | #endif | ||
| 273 | |||
| 274 | #ifdef __MigPackStructs | ||
| 275 | #pragma pack(push, 4) | ||
| 276 | #endif | ||
| 277 | 	typedef struct { | ||
| 278 | 		mach_msg_header_t Head; | ||
| 279 | 		NDR_record_t NDR; | ||
| 280 | 		kern_return_t RetCode; | ||
| 281 | 	} __Reply__lock_try_t __attribute__((unused)); | ||
| 282 | #ifdef __MigPackStructs | ||
| 283 | #pragma pack(pop) | ||
| 284 | #endif | ||
| 285 | |||
| 286 | #ifdef __MigPackStructs | ||
| 287 | #pragma pack(push, 4) | ||
| 288 | #endif | ||
| 289 | 	typedef struct { | ||
| 290 | 		mach_msg_header_t Head; | ||
| 291 | 		NDR_record_t NDR; | ||
| 292 | 		kern_return_t RetCode; | ||
| 293 | 	} __Reply__lock_make_stable_t __attribute__((unused)); | ||
| 294 | #ifdef __MigPackStructs | ||
| 295 | #pragma pack(pop) | ||
| 296 | #endif | ||
| 297 | |||
| 298 | #ifdef __MigPackStructs | ||
| 299 | #pragma pack(push, 4) | ||
| 300 | #endif | ||
| 301 | 	typedef struct { | ||
| 302 | 		mach_msg_header_t Head; | ||
| 303 | 		NDR_record_t NDR; | ||
| 304 | 		kern_return_t RetCode; | ||
| 305 | 	} __Reply__lock_handoff_t __attribute__((unused)); | ||
| 306 | #ifdef __MigPackStructs | ||
| 307 | #pragma pack(pop) | ||
| 308 | #endif | ||
| 309 | |||
| 310 | #ifdef __MigPackStructs | ||
| 311 | #pragma pack(push, 4) | ||
| 312 | #endif | ||
| 313 | 	typedef struct { | ||
| 314 | 		mach_msg_header_t Head; | ||
| 315 | 		NDR_record_t NDR; | ||
| 316 | 		kern_return_t RetCode; | ||
| 317 | 	} __Reply__lock_handoff_accept_t __attribute__((unused)); | ||
| 318 | #ifdef __MigPackStructs | ||
| 319 | #pragma pack(pop) | ||
| 320 | #endif | ||
| 321 | #endif /* !__Reply__lock_set_subsystem__defined */ | ||
| 322 | |||
| 323 | /* union of all replies */ | ||
| 324 | |||
| 325 | #ifndef __ReplyUnion__lock_set_subsystem__defined | ||
| 326 | #define __ReplyUnion__lock_set_subsystem__defined | ||
| 327 | union __ReplyUnion__lock_set_subsystem { | ||
| 328 | 	__Reply__lock_acquire_t Reply_lock_acquire; | ||
| 329 | 	__Reply__lock_release_t Reply_lock_release; | ||
| 330 | 	__Reply__lock_try_t Reply_lock_try; | ||
| 331 | 	__Reply__lock_make_stable_t Reply_lock_make_stable; | ||
| 332 | 	__Reply__lock_handoff_t Reply_lock_handoff; | ||
| 333 | 	__Reply__lock_handoff_accept_t Reply_lock_handoff_accept; | ||
| 334 | }; | ||
| 335 | #endif /* !__RequestUnion__lock_set_subsystem__defined */ | ||
| 336 | |||
| 337 | #ifndef subsystem_to_name_map_lock_set | ||
| 338 | #define subsystem_to_name_map_lock_set \ | ||
| 339 | { "lock_acquire", 617000 },\ | ||
| 340 | { "lock_release", 617001 },\ | ||
| 341 | { "lock_try", 617002 },\ | ||
| 342 | { "lock_make_stable", 617003 },\ | ||
| 343 | { "lock_handoff", 617004 },\ | ||
| 344 | { "lock_handoff_accept", 617005 } | ||
| 345 | #endif | ||
| 346 | |||
| 347 | #ifdef __AfterMigUserHeader | ||
| 348 | __AfterMigUserHeader | ||
| 349 | #endif /* __AfterMigUserHeader */ | ||
| 350 | |||
| 351 | #endif	 /* _lock_set_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mach.h deleted-241| ... | @@ -1,241 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2014 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Mach Operating System | ||
| 30 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | ||
| 31 | * All Rights Reserved. | ||
| 32 | * | ||
| 33 | * Permission to use, copy, modify and distribute this software and its | ||
| 34 | * documentation is hereby granted, provided that both the copyright | ||
| 35 | * notice and this permission notice appear in all copies of the | ||
| 36 | * software, derivative works or modified versions, and any portions | ||
| 37 | * thereof, and that both notices appear in supporting documentation. | ||
| 38 | * | ||
| 39 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 40 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 41 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | * Carnegie Mellon requests users of this software to return to | ||
| 44 | * | ||
| 45 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 46 | * School of Computer Science | ||
| 47 | * Carnegie Mellon University | ||
| 48 | * Pittsburgh PA 15213-3890 | ||
| 49 | * | ||
| 50 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 51 | * the rights to redistribute these changes. | ||
| 52 | */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Includes all the types that a normal user | ||
| 56 | * of Mach programs should need | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef _MACH_H_ | ||
| 60 | #define _MACH_H_ | ||
| 61 | |||
| 62 | #define __MACH30__ | ||
| 63 | #define MACH_IPC_FLAVOR UNTYPED | ||
| 64 | |||
| 65 | #include <mach/std_types.h> | ||
| 66 | #include <mach/mach_types.h> | ||
| 67 | #include <mach/mach_interface.h> | ||
| 68 | #include <mach/mach_port.h> | ||
| 69 | #include <mach/mach_init.h> | ||
| 70 | #include <mach/mach_host.h> | ||
| 71 | #include <mach/thread_switch.h> | ||
| 72 | |||
| 73 | #include <mach/rpc.h> /* for compatibility only */ | ||
| 74 | #include <mach/mig.h> | ||
| 75 | |||
| 76 | #include <mach/mig_errors.h> | ||
| 77 | #include <mach/mach_error.h> | ||
| 78 | |||
| 79 | #include <sys/cdefs.h> | ||
| 80 | |||
| 81 | __BEGIN_DECLS | ||
| 82 | /* | ||
| 83 | * Standard prototypes | ||
| 84 | */ | ||
| 85 | extern void panic_init(mach_port_t); | ||
| 86 | extern void panic(const char *, ...); | ||
| 87 | |||
| 88 | extern void slot_name(cpu_type_t, | ||
| 89 | cpu_subtype_t, | ||
| 90 | char **, | ||
| 91 | char **); | ||
| 92 | |||
| 93 | extern void mig_reply_setup(mach_msg_header_t *, | ||
| 94 | mach_msg_header_t *); | ||
| 95 | |||
| 96 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 97 | extern void mach_msg_destroy(mach_msg_header_t *); | ||
| 98 | |||
| 99 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 100 | extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); | ||
| 101 | |||
| 102 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 103 | extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); | ||
| 104 | |||
| 105 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 106 | extern mach_msg_return_t mach_msg_server_once(boolean_t (*) | ||
| 107 | (mach_msg_header_t *, | ||
| 108 | mach_msg_header_t *), | ||
| 109 | mach_msg_size_t, | ||
| 110 | mach_port_t, | ||
| 111 | mach_msg_options_t); | ||
| 112 | |||
| 113 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 114 | extern mach_msg_return_t mach_msg_server(boolean_t (*) | ||
| 115 | (mach_msg_header_t *, | ||
| 116 | mach_msg_header_t *), | ||
| 117 | mach_msg_size_t, | ||
| 118 | mach_port_t, | ||
| 119 | mach_msg_options_t); | ||
| 120 | |||
| 121 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 122 | extern mach_msg_return_t mach_msg_server_importance(boolean_t (*) | ||
| 123 | (mach_msg_header_t *, | ||
| 124 | mach_msg_header_t *), | ||
| 125 | mach_msg_size_t, | ||
| 126 | mach_port_t, | ||
| 127 | mach_msg_options_t); | ||
| 128 | |||
| 129 | /* | ||
| 130 | * Prototypes for compatibility | ||
| 131 | */ | ||
| 132 | extern kern_return_t clock_get_res(mach_port_t, | ||
| 133 | clock_res_t *); | ||
| 134 | extern kern_return_t clock_set_res(mach_port_t, | ||
| 135 | clock_res_t); | ||
| 136 | |||
| 137 | extern kern_return_t clock_sleep(mach_port_t, | ||
| 138 | int, | ||
| 139 | mach_timespec_t, | ||
| 140 | mach_timespec_t *); | ||
| 141 | |||
| 142 | /*! | ||
| 143 | * @group voucher_mach_msg Prototypes | ||
| 144 | */ | ||
| 145 | |||
| 146 | #define VOUCHER_MACH_MSG_API_VERSION 20140205 | ||
| 147 | |||
| 148 | /*! | ||
| 149 | * @typedef voucher_mach_msg_state_t | ||
| 150 | * | ||
| 151 | * @abstract | ||
| 152 | * Opaque object encapsulating state changed by voucher_mach_msg_adopt(). | ||
| 153 | */ | ||
| 154 | typedef struct voucher_mach_msg_state_s *voucher_mach_msg_state_t; | ||
| 155 | |||
| 156 | /*! | ||
| 157 | * @const VOUCHER_MACH_MSG_STATE_UNCHANGED | ||
| 158 | * | ||
| 159 | * @discussion | ||
| 160 | * Constant indicating no state change occurred. | ||
| 161 | */ | ||
| 162 | #define VOUCHER_MACH_MSG_STATE_UNCHANGED ((voucher_mach_msg_state_t)~0ul) | ||
| 163 | |||
| 164 | /*! | ||
| 165 | * @function voucher_mach_msg_set | ||
| 166 | * | ||
| 167 | * @abstract | ||
| 168 | * Change specified message header to contain current mach voucher with a | ||
| 169 | * COPY_SEND disposition. | ||
| 170 | * Does not change message if it already has non-zero MACH_MSGH_BITS_VOUCHER. | ||
| 171 | * | ||
| 172 | * @discussion | ||
| 173 | * Borrows reference to current thread voucher so message should be sent | ||
| 174 | * immediately (without intervening calls that might change that voucher). | ||
| 175 | * | ||
| 176 | * @param msg | ||
| 177 | * The message to modify. | ||
| 178 | * | ||
| 179 | * @result | ||
| 180 | * True if header was changed. | ||
| 181 | */ | ||
| 182 | extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg); | ||
| 183 | |||
| 184 | /*! | ||
| 185 | * @function voucher_mach_msg_clear | ||
| 186 | * | ||
| 187 | * @abstract | ||
| 188 | * Removes changes made to specified message header by voucher_mach_msg_set() | ||
| 189 | * and any mach_msg() send operations (successful or not). | ||
| 190 | * If the message is not needed further, mach_msg_destroy() should be called | ||
| 191 | * instead. | ||
| 192 | * | ||
| 193 | * @discussion | ||
| 194 | * Not intended to be called if voucher_mach_msg_set() returned false. | ||
| 195 | * Releases reference to message mach voucher if an extra reference was | ||
| 196 | * acquired due to an unsuccessful send operation (pseudo-receive). | ||
| 197 | * | ||
| 198 | * @param msg | ||
| 199 | * The message to modify. | ||
| 200 | */ | ||
| 201 | extern void voucher_mach_msg_clear(mach_msg_header_t *msg); | ||
| 202 | |||
| 203 | /*! | ||
| 204 | * @function voucher_mach_msg_adopt | ||
| 205 | * | ||
| 206 | * @abstract | ||
| 207 | * Adopt the voucher contained in the specified message on the current thread | ||
| 208 | * and return the previous thread voucher state. | ||
| 209 | * | ||
| 210 | * @discussion | ||
| 211 | * Ownership of the mach voucher in the message is transferred to the current | ||
| 212 | * thread and the message header voucher fields are cleared. | ||
| 213 | * | ||
| 214 | * @param msg | ||
| 215 | * The message to query and modify. | ||
| 216 | * | ||
| 217 | * @result | ||
| 218 | * The previous thread voucher state or VOUCHER_MACH_MSG_STATE_UNCHANGED if no | ||
| 219 | * state change occurred. | ||
| 220 | */ | ||
| 221 | extern voucher_mach_msg_state_t voucher_mach_msg_adopt(mach_msg_header_t *msg); | ||
| 222 | |||
| 223 | /*! | ||
| 224 | * @function voucher_mach_msg_revert | ||
| 225 | * | ||
| 226 | * @abstract | ||
| 227 | * Restore thread voucher state previously modified by voucher_mach_msg_adopt(). | ||
| 228 | * | ||
| 229 | * @discussion | ||
| 230 | * Current thread voucher reference is released. | ||
| 231 | * No change to thread voucher state if passed VOUCHER_MACH_MSG_STATE_UNCHANGED. | ||
| 232 | * | ||
| 233 | * @param state | ||
| 234 | * The thread voucher state to restore. | ||
| 235 | */ | ||
| 236 | |||
| 237 | extern void voucher_mach_msg_revert(voucher_mach_msg_state_t state); | ||
| 238 | |||
| 239 | __END_DECLS | ||
| 240 | |||
| 241 | #endif /* _MACH_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mach_host.h deleted-1289| ... | @@ -1,1289 +0,0 @@ | ||
| 1 | #ifndef	_mach_host_user_ | ||
| 2 | #define	_mach_host_user_ | ||
| 3 | |||
| 4 | /* Module mach_host */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	mach_host_MSG_COUNT | ||
| 52 | #define	mach_host_MSG_COUNT	35 | ||
| 53 | #endif	/* mach_host_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach/mach_types.h> | ||
| 61 | #include <mach_debug/mach_debug_types.h> | ||
| 62 | #include <mach/mach_init.h> | ||
| 63 | |||
| 64 | #ifdef __BeforeMigUserHeader | ||
| 65 | __BeforeMigUserHeader | ||
| 66 | #endif /* __BeforeMigUserHeader */ | ||
| 67 | |||
| 68 | #include <sys/cdefs.h> | ||
| 69 | __BEGIN_DECLS | ||
| 70 | |||
| 71 | |||
| 72 | /* Routine host_info */ | ||
| 73 | #ifdef	mig_external | ||
| 74 | mig_external | ||
| 75 | #else | ||
| 76 | extern | ||
| 77 | #endif	/* mig_external */ | ||
| 78 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 79 | kern_return_t host_info | ||
| 80 | ( | ||
| 81 | 	host_t host, | ||
| 82 | 	host_flavor_t flavor, | ||
| 83 | 	host_info_t host_info_out, | ||
| 84 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 85 | ); | ||
| 86 | |||
| 87 | /* Routine host_kernel_version */ | ||
| 88 | #ifdef	mig_external | ||
| 89 | mig_external | ||
| 90 | #else | ||
| 91 | extern | ||
| 92 | #endif	/* mig_external */ | ||
| 93 | kern_return_t host_kernel_version | ||
| 94 | ( | ||
| 95 | 	host_t host, | ||
| 96 | 	kernel_version_t kernel_version | ||
| 97 | ); | ||
| 98 | |||
| 99 | /* Routine _host_page_size */ | ||
| 100 | #ifdef	mig_external | ||
| 101 | mig_external | ||
| 102 | #else | ||
| 103 | extern | ||
| 104 | #endif	/* mig_external */ | ||
| 105 | kern_return_t _host_page_size | ||
| 106 | ( | ||
| 107 | 	host_t host, | ||
| 108 | 	vm_size_t *out_page_size | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine mach_memory_object_memory_entry */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | kern_return_t mach_memory_object_memory_entry | ||
| 118 | ( | ||
| 119 | 	host_t host, | ||
| 120 | 	boolean_t internal, | ||
| 121 | 	vm_size_t size, | ||
| 122 | 	vm_prot_t permission, | ||
| 123 | 	memory_object_t pager, | ||
| 124 | 	mach_port_t *entry_handle | ||
| 125 | ); | ||
| 126 | |||
| 127 | /* Routine host_processor_info */ | ||
| 128 | #ifdef	mig_external | ||
| 129 | mig_external | ||
| 130 | #else | ||
| 131 | extern | ||
| 132 | #endif	/* mig_external */ | ||
| 133 | kern_return_t host_processor_info | ||
| 134 | ( | ||
| 135 | 	host_t host, | ||
| 136 | 	processor_flavor_t flavor, | ||
| 137 | 	natural_t *out_processor_count, | ||
| 138 | 	processor_info_array_t *out_processor_info, | ||
| 139 | 	mach_msg_type_number_t *out_processor_infoCnt | ||
| 140 | ); | ||
| 141 | |||
| 142 | /* Routine host_get_io_master */ | ||
| 143 | #ifdef	mig_external | ||
| 144 | mig_external | ||
| 145 | #else | ||
| 146 | extern | ||
| 147 | #endif	/* mig_external */ | ||
| 148 | kern_return_t host_get_io_master | ||
| 149 | ( | ||
| 150 | 	host_t host, | ||
| 151 | 	io_master_t *io_master | ||
| 152 | ); | ||
| 153 | |||
| 154 | /* Routine host_get_clock_service */ | ||
| 155 | #ifdef	mig_external | ||
| 156 | mig_external | ||
| 157 | #else | ||
| 158 | extern | ||
| 159 | #endif	/* mig_external */ | ||
| 160 | kern_return_t host_get_clock_service | ||
| 161 | ( | ||
| 162 | 	host_t host, | ||
| 163 | 	clock_id_t clock_id, | ||
| 164 | 	clock_serv_t *clock_serv | ||
| 165 | ); | ||
| 166 | |||
| 167 | /* Routine kmod_get_info */ | ||
| 168 | #ifdef	mig_external | ||
| 169 | mig_external | ||
| 170 | #else | ||
| 171 | extern | ||
| 172 | #endif	/* mig_external */ | ||
| 173 | kern_return_t kmod_get_info | ||
| 174 | ( | ||
| 175 | 	host_t host, | ||
| 176 | 	kmod_args_t *modules, | ||
| 177 | 	mach_msg_type_number_t *modulesCnt | ||
| 178 | ); | ||
| 179 | |||
| 180 | /* Routine host_virtual_physical_table_info */ | ||
| 181 | #ifdef	mig_external | ||
| 182 | mig_external | ||
| 183 | #else | ||
| 184 | extern | ||
| 185 | #endif	/* mig_external */ | ||
| 186 | kern_return_t host_virtual_physical_table_info | ||
| 187 | ( | ||
| 188 | 	host_t host, | ||
| 189 | 	hash_info_bucket_array_t *info, | ||
| 190 | 	mach_msg_type_number_t *infoCnt | ||
| 191 | ); | ||
| 192 | |||
| 193 | /* Routine processor_set_default */ | ||
| 194 | #ifdef	mig_external | ||
| 195 | mig_external | ||
| 196 | #else | ||
| 197 | extern | ||
| 198 | #endif	/* mig_external */ | ||
| 199 | kern_return_t processor_set_default | ||
| 200 | ( | ||
| 201 | 	host_t host, | ||
| 202 | 	processor_set_name_t *default_set | ||
| 203 | ); | ||
| 204 | |||
| 205 | /* Routine processor_set_create */ | ||
| 206 | #ifdef	mig_external | ||
| 207 | mig_external | ||
| 208 | #else | ||
| 209 | extern | ||
| 210 | #endif	/* mig_external */ | ||
| 211 | kern_return_t processor_set_create | ||
| 212 | ( | ||
| 213 | 	host_t host, | ||
| 214 | 	processor_set_t *new_set, | ||
| 215 | 	processor_set_name_t *new_name | ||
| 216 | ); | ||
| 217 | |||
| 218 | /* Routine mach_memory_object_memory_entry_64 */ | ||
| 219 | #ifdef	mig_external | ||
| 220 | mig_external | ||
| 221 | #else | ||
| 222 | extern | ||
| 223 | #endif	/* mig_external */ | ||
| 224 | kern_return_t mach_memory_object_memory_entry_64 | ||
| 225 | ( | ||
| 226 | 	host_t host, | ||
| 227 | 	boolean_t internal, | ||
| 228 | 	memory_object_size_t size, | ||
| 229 | 	vm_prot_t permission, | ||
| 230 | 	memory_object_t pager, | ||
| 231 | 	mach_port_t *entry_handle | ||
| 232 | ); | ||
| 233 | |||
| 234 | /* Routine host_statistics */ | ||
| 235 | #ifdef	mig_external | ||
| 236 | mig_external | ||
| 237 | #else | ||
| 238 | extern | ||
| 239 | #endif	/* mig_external */ | ||
| 240 | kern_return_t host_statistics | ||
| 241 | ( | ||
| 242 | 	host_t host_priv, | ||
| 243 | 	host_flavor_t flavor, | ||
| 244 | 	host_info_t host_info_out, | ||
| 245 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 246 | ); | ||
| 247 | |||
| 248 | /* Routine host_request_notification */ | ||
| 249 | #ifdef	mig_external | ||
| 250 | mig_external | ||
| 251 | #else | ||
| 252 | extern | ||
| 253 | #endif	/* mig_external */ | ||
| 254 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 255 | kern_return_t host_request_notification | ||
| 256 | ( | ||
| 257 | 	host_t host, | ||
| 258 | 	host_flavor_t notify_type, | ||
| 259 | 	mach_port_t notify_port | ||
| 260 | ); | ||
| 261 | |||
| 262 | /* Routine host_lockgroup_info */ | ||
| 263 | #ifdef	mig_external | ||
| 264 | mig_external | ||
| 265 | #else | ||
| 266 | extern | ||
| 267 | #endif	/* mig_external */ | ||
| 268 | kern_return_t host_lockgroup_info | ||
| 269 | ( | ||
| 270 | 	host_t host, | ||
| 271 | 	lockgroup_info_array_t *lockgroup_info, | ||
| 272 | 	mach_msg_type_number_t *lockgroup_infoCnt | ||
| 273 | ); | ||
| 274 | |||
| 275 | /* Routine host_statistics64 */ | ||
| 276 | #ifdef	mig_external | ||
| 277 | mig_external | ||
| 278 | #else | ||
| 279 | extern | ||
| 280 | #endif	/* mig_external */ | ||
| 281 | kern_return_t host_statistics64 | ||
| 282 | ( | ||
| 283 | 	host_t host_priv, | ||
| 284 | 	host_flavor_t flavor, | ||
| 285 | 	host_info64_t host_info64_out, | ||
| 286 | 	mach_msg_type_number_t *host_info64_outCnt | ||
| 287 | ); | ||
| 288 | |||
| 289 | /* Routine mach_zone_info */ | ||
| 290 | #ifdef	mig_external | ||
| 291 | mig_external | ||
| 292 | #else | ||
| 293 | extern | ||
| 294 | #endif	/* mig_external */ | ||
| 295 | kern_return_t mach_zone_info | ||
| 296 | ( | ||
| 297 | 	host_priv_t host, | ||
| 298 | 	mach_zone_name_array_t *names, | ||
| 299 | 	mach_msg_type_number_t *namesCnt, | ||
| 300 | 	mach_zone_info_array_t *info, | ||
| 301 | 	mach_msg_type_number_t *infoCnt | ||
| 302 | ); | ||
| 303 | |||
| 304 | /* Routine host_create_mach_voucher */ | ||
| 305 | #ifdef	mig_external | ||
| 306 | mig_external | ||
| 307 | #else | ||
| 308 | extern | ||
| 309 | #endif	/* mig_external */ | ||
| 310 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 311 | kern_return_t host_create_mach_voucher | ||
| 312 | ( | ||
| 313 | 	host_t host, | ||
| 314 | 	mach_voucher_attr_raw_recipe_array_t recipes, | ||
| 315 | 	mach_msg_type_number_t recipesCnt, | ||
| 316 | 	ipc_voucher_t *voucher | ||
| 317 | ); | ||
| 318 | |||
| 319 | /* Routine host_register_mach_voucher_attr_manager */ | ||
| 320 | #ifdef	mig_external | ||
| 321 | mig_external | ||
| 322 | #else | ||
| 323 | extern | ||
| 324 | #endif	/* mig_external */ | ||
| 325 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 326 | kern_return_t host_register_mach_voucher_attr_manager | ||
| 327 | ( | ||
| 328 | 	host_t host, | ||
| 329 | 	mach_voucher_attr_manager_t attr_manager, | ||
| 330 | 	mach_voucher_attr_value_handle_t default_value, | ||
| 331 | 	mach_voucher_attr_key_t *new_key, | ||
| 332 | 	ipc_voucher_attr_control_t *new_attr_control | ||
| 333 | ); | ||
| 334 | |||
| 335 | /* Routine host_register_well_known_mach_voucher_attr_manager */ | ||
| 336 | #ifdef	mig_external | ||
| 337 | mig_external | ||
| 338 | #else | ||
| 339 | extern | ||
| 340 | #endif	/* mig_external */ | ||
| 341 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 342 | kern_return_t host_register_well_known_mach_voucher_attr_manager | ||
| 343 | ( | ||
| 344 | 	host_t host, | ||
| 345 | 	mach_voucher_attr_manager_t attr_manager, | ||
| 346 | 	mach_voucher_attr_value_handle_t default_value, | ||
| 347 | 	mach_voucher_attr_key_t key, | ||
| 348 | 	ipc_voucher_attr_control_t *new_attr_control | ||
| 349 | ); | ||
| 350 | |||
| 351 | /* Routine host_set_atm_diagnostic_flag */ | ||
| 352 | #ifdef	mig_external | ||
| 353 | mig_external | ||
| 354 | #else | ||
| 355 | extern | ||
| 356 | #endif	/* mig_external */ | ||
| 357 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 358 | kern_return_t host_set_atm_diagnostic_flag | ||
| 359 | ( | ||
| 360 | 	host_t host, | ||
| 361 | 	uint32_t diagnostic_flag | ||
| 362 | ); | ||
| 363 | |||
| 364 | /* Routine host_get_atm_diagnostic_flag */ | ||
| 365 | #ifdef	mig_external | ||
| 366 | mig_external | ||
| 367 | #else | ||
| 368 | extern | ||
| 369 | #endif	/* mig_external */ | ||
| 370 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 371 | kern_return_t host_get_atm_diagnostic_flag | ||
| 372 | ( | ||
| 373 | 	host_t host, | ||
| 374 | 	uint32_t *diagnostic_flag | ||
| 375 | ); | ||
| 376 | |||
| 377 | /* Routine mach_memory_info */ | ||
| 378 | #ifdef	mig_external | ||
| 379 | mig_external | ||
| 380 | #else | ||
| 381 | extern | ||
| 382 | #endif	/* mig_external */ | ||
| 383 | kern_return_t mach_memory_info | ||
| 384 | ( | ||
| 385 | 	host_priv_t host, | ||
| 386 | 	mach_zone_name_array_t *names, | ||
| 387 | 	mach_msg_type_number_t *namesCnt, | ||
| 388 | 	mach_zone_info_array_t *info, | ||
| 389 | 	mach_msg_type_number_t *infoCnt, | ||
| 390 | 	mach_memory_info_array_t *memory_info, | ||
| 391 | 	mach_msg_type_number_t *memory_infoCnt | ||
| 392 | ); | ||
| 393 | |||
| 394 | /* Routine host_set_multiuser_config_flags */ | ||
| 395 | #ifdef	mig_external | ||
| 396 | mig_external | ||
| 397 | #else | ||
| 398 | extern | ||
| 399 | #endif	/* mig_external */ | ||
| 400 | kern_return_t host_set_multiuser_config_flags | ||
| 401 | ( | ||
| 402 | 	host_priv_t host_priv, | ||
| 403 | 	uint32_t multiuser_flags | ||
| 404 | ); | ||
| 405 | |||
| 406 | /* Routine host_get_multiuser_config_flags */ | ||
| 407 | #ifdef	mig_external | ||
| 408 | mig_external | ||
| 409 | #else | ||
| 410 | extern | ||
| 411 | #endif	/* mig_external */ | ||
| 412 | kern_return_t host_get_multiuser_config_flags | ||
| 413 | ( | ||
| 414 | 	host_t host, | ||
| 415 | 	uint32_t *multiuser_flags | ||
| 416 | ); | ||
| 417 | |||
| 418 | /* Routine host_check_multiuser_mode */ | ||
| 419 | #ifdef	mig_external | ||
| 420 | mig_external | ||
| 421 | #else | ||
| 422 | extern | ||
| 423 | #endif	/* mig_external */ | ||
| 424 | kern_return_t host_check_multiuser_mode | ||
| 425 | ( | ||
| 426 | 	host_t host, | ||
| 427 | 	uint32_t *multiuser_mode | ||
| 428 | ); | ||
| 429 | |||
| 430 | /* Routine mach_zone_info_for_zone */ | ||
| 431 | #ifdef	mig_external | ||
| 432 | mig_external | ||
| 433 | #else | ||
| 434 | extern | ||
| 435 | #endif	/* mig_external */ | ||
| 436 | kern_return_t mach_zone_info_for_zone | ||
| 437 | ( | ||
| 438 | 	host_priv_t host, | ||
| 439 | 	mach_zone_name_t name, | ||
| 440 | 	mach_zone_info_t *info | ||
| 441 | ); | ||
| 442 | |||
| 443 | __END_DECLS | ||
| 444 | |||
| 445 | /********************** Caution **************************/ | ||
| 446 | /* The following data types should be used to calculate */ | ||
| 447 | /* maximum message sizes only. The actual message may be */ | ||
| 448 | /* smaller, and the position of the arguments within the */ | ||
| 449 | /* message layout may vary from what is presented here. */ | ||
| 450 | /* For example, if any of the arguments are variable- */ | ||
| 451 | /* sized, and less than the maximum is sent, the data */ | ||
| 452 | /* will be packed tight in the actual message to reduce */ | ||
| 453 | /* the presence of holes. */ | ||
| 454 | /********************** Caution **************************/ | ||
| 455 | |||
| 456 | /* typedefs for all requests */ | ||
| 457 | |||
| 458 | #ifndef __Request__mach_host_subsystem__defined | ||
| 459 | #define __Request__mach_host_subsystem__defined | ||
| 460 | |||
| 461 | #ifdef __MigPackStructs | ||
| 462 | #pragma pack(push, 4) | ||
| 463 | #endif | ||
| 464 | 	typedef struct { | ||
| 465 | 		mach_msg_header_t Head; | ||
| 466 | 		NDR_record_t NDR; | ||
| 467 | 		host_flavor_t flavor; | ||
| 468 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 469 | 	} __Request__host_info_t __attribute__((unused)); | ||
| 470 | #ifdef __MigPackStructs | ||
| 471 | #pragma pack(pop) | ||
| 472 | #endif | ||
| 473 | |||
| 474 | #ifdef __MigPackStructs | ||
| 475 | #pragma pack(push, 4) | ||
| 476 | #endif | ||
| 477 | 	typedef struct { | ||
| 478 | 		mach_msg_header_t Head; | ||
| 479 | 	} __Request__host_kernel_version_t __attribute__((unused)); | ||
| 480 | #ifdef __MigPackStructs | ||
| 481 | #pragma pack(pop) | ||
| 482 | #endif | ||
| 483 | |||
| 484 | #ifdef __MigPackStructs | ||
| 485 | #pragma pack(push, 4) | ||
| 486 | #endif | ||
| 487 | 	typedef struct { | ||
| 488 | 		mach_msg_header_t Head; | ||
| 489 | 	} __Request___host_page_size_t __attribute__((unused)); | ||
| 490 | #ifdef __MigPackStructs | ||
| 491 | #pragma pack(pop) | ||
| 492 | #endif | ||
| 493 | |||
| 494 | #ifdef __MigPackStructs | ||
| 495 | #pragma pack(push, 4) | ||
| 496 | #endif | ||
| 497 | 	typedef struct { | ||
| 498 | 		mach_msg_header_t Head; | ||
| 499 | 		/* start of the kernel processed data */ | ||
| 500 | 		mach_msg_body_t msgh_body; | ||
| 501 | 		mach_msg_port_descriptor_t pager; | ||
| 502 | 		/* end of the kernel processed data */ | ||
| 503 | 		NDR_record_t NDR; | ||
| 504 | 		boolean_t internal; | ||
| 505 | 		vm_size_t size; | ||
| 506 | 		vm_prot_t permission; | ||
| 507 | 	} __Request__mach_memory_object_memory_entry_t __attribute__((unused)); | ||
| 508 | #ifdef __MigPackStructs | ||
| 509 | #pragma pack(pop) | ||
| 510 | #endif | ||
| 511 | |||
| 512 | #ifdef __MigPackStructs | ||
| 513 | #pragma pack(push, 4) | ||
| 514 | #endif | ||
| 515 | 	typedef struct { | ||
| 516 | 		mach_msg_header_t Head; | ||
| 517 | 		NDR_record_t NDR; | ||
| 518 | 		processor_flavor_t flavor; | ||
| 519 | 	} __Request__host_processor_info_t __attribute__((unused)); | ||
| 520 | #ifdef __MigPackStructs | ||
| 521 | #pragma pack(pop) | ||
| 522 | #endif | ||
| 523 | |||
| 524 | #ifdef __MigPackStructs | ||
| 525 | #pragma pack(push, 4) | ||
| 526 | #endif | ||
| 527 | 	typedef struct { | ||
| 528 | 		mach_msg_header_t Head; | ||
| 529 | 	} __Request__host_get_io_master_t __attribute__((unused)); | ||
| 530 | #ifdef __MigPackStructs | ||
| 531 | #pragma pack(pop) | ||
| 532 | #endif | ||
| 533 | |||
| 534 | #ifdef __MigPackStructs | ||
| 535 | #pragma pack(push, 4) | ||
| 536 | #endif | ||
| 537 | 	typedef struct { | ||
| 538 | 		mach_msg_header_t Head; | ||
| 539 | 		NDR_record_t NDR; | ||
| 540 | 		clock_id_t clock_id; | ||
| 541 | 	} __Request__host_get_clock_service_t __attribute__((unused)); | ||
| 542 | #ifdef __MigPackStructs | ||
| 543 | #pragma pack(pop) | ||
| 544 | #endif | ||
| 545 | |||
| 546 | #ifdef __MigPackStructs | ||
| 547 | #pragma pack(push, 4) | ||
| 548 | #endif | ||
| 549 | 	typedef struct { | ||
| 550 | 		mach_msg_header_t Head; | ||
| 551 | 	} __Request__kmod_get_info_t __attribute__((unused)); | ||
| 552 | #ifdef __MigPackStructs | ||
| 553 | #pragma pack(pop) | ||
| 554 | #endif | ||
| 555 | |||
| 556 | #ifdef __MigPackStructs | ||
| 557 | #pragma pack(push, 4) | ||
| 558 | #endif | ||
| 559 | 	typedef struct { | ||
| 560 | 		mach_msg_header_t Head; | ||
| 561 | 	} __Request__host_virtual_physical_table_info_t __attribute__((unused)); | ||
| 562 | #ifdef __MigPackStructs | ||
| 563 | #pragma pack(pop) | ||
| 564 | #endif | ||
| 565 | |||
| 566 | #ifdef __MigPackStructs | ||
| 567 | #pragma pack(push, 4) | ||
| 568 | #endif | ||
| 569 | 	typedef struct { | ||
| 570 | 		mach_msg_header_t Head; | ||
| 571 | 	} __Request__processor_set_default_t __attribute__((unused)); | ||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(pop) | ||
| 574 | #endif | ||
| 575 | |||
| 576 | #ifdef __MigPackStructs | ||
| 577 | #pragma pack(push, 4) | ||
| 578 | #endif | ||
| 579 | 	typedef struct { | ||
| 580 | 		mach_msg_header_t Head; | ||
| 581 | 	} __Request__processor_set_create_t __attribute__((unused)); | ||
| 582 | #ifdef __MigPackStructs | ||
| 583 | #pragma pack(pop) | ||
| 584 | #endif | ||
| 585 | |||
| 586 | #ifdef __MigPackStructs | ||
| 587 | #pragma pack(push, 4) | ||
| 588 | #endif | ||
| 589 | 	typedef struct { | ||
| 590 | 		mach_msg_header_t Head; | ||
| 591 | 		/* start of the kernel processed data */ | ||
| 592 | 		mach_msg_body_t msgh_body; | ||
| 593 | 		mach_msg_port_descriptor_t pager; | ||
| 594 | 		/* end of the kernel processed data */ | ||
| 595 | 		NDR_record_t NDR; | ||
| 596 | 		boolean_t internal; | ||
| 597 | 		memory_object_size_t size; | ||
| 598 | 		vm_prot_t permission; | ||
| 599 | 	} __Request__mach_memory_object_memory_entry_64_t __attribute__((unused)); | ||
| 600 | #ifdef __MigPackStructs | ||
| 601 | #pragma pack(pop) | ||
| 602 | #endif | ||
| 603 | |||
| 604 | #ifdef __MigPackStructs | ||
| 605 | #pragma pack(push, 4) | ||
| 606 | #endif | ||
| 607 | 	typedef struct { | ||
| 608 | 		mach_msg_header_t Head; | ||
| 609 | 		NDR_record_t NDR; | ||
| 610 | 		host_flavor_t flavor; | ||
| 611 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 612 | 	} __Request__host_statistics_t __attribute__((unused)); | ||
| 613 | #ifdef __MigPackStructs | ||
| 614 | #pragma pack(pop) | ||
| 615 | #endif | ||
| 616 | |||
| 617 | #ifdef __MigPackStructs | ||
| 618 | #pragma pack(push, 4) | ||
| 619 | #endif | ||
| 620 | 	typedef struct { | ||
| 621 | 		mach_msg_header_t Head; | ||
| 622 | 		/* start of the kernel processed data */ | ||
| 623 | 		mach_msg_body_t msgh_body; | ||
| 624 | 		mach_msg_port_descriptor_t notify_port; | ||
| 625 | 		/* end of the kernel processed data */ | ||
| 626 | 		NDR_record_t NDR; | ||
| 627 | 		host_flavor_t notify_type; | ||
| 628 | 	} __Request__host_request_notification_t __attribute__((unused)); | ||
| 629 | #ifdef __MigPackStructs | ||
| 630 | #pragma pack(pop) | ||
| 631 | #endif | ||
| 632 | |||
| 633 | #ifdef __MigPackStructs | ||
| 634 | #pragma pack(push, 4) | ||
| 635 | #endif | ||
| 636 | 	typedef struct { | ||
| 637 | 		mach_msg_header_t Head; | ||
| 638 | 	} __Request__host_lockgroup_info_t __attribute__((unused)); | ||
| 639 | #ifdef __MigPackStructs | ||
| 640 | #pragma pack(pop) | ||
| 641 | #endif | ||
| 642 | |||
| 643 | #ifdef __MigPackStructs | ||
| 644 | #pragma pack(push, 4) | ||
| 645 | #endif | ||
| 646 | 	typedef struct { | ||
| 647 | 		mach_msg_header_t Head; | ||
| 648 | 		NDR_record_t NDR; | ||
| 649 | 		host_flavor_t flavor; | ||
| 650 | 		mach_msg_type_number_t host_info64_outCnt; | ||
| 651 | 	} __Request__host_statistics64_t __attribute__((unused)); | ||
| 652 | #ifdef __MigPackStructs | ||
| 653 | #pragma pack(pop) | ||
| 654 | #endif | ||
| 655 | |||
| 656 | #ifdef __MigPackStructs | ||
| 657 | #pragma pack(push, 4) | ||
| 658 | #endif | ||
| 659 | 	typedef struct { | ||
| 660 | 		mach_msg_header_t Head; | ||
| 661 | 	} __Request__mach_zone_info_t __attribute__((unused)); | ||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(pop) | ||
| 664 | #endif | ||
| 665 | |||
| 666 | #ifdef __MigPackStructs | ||
| 667 | #pragma pack(push, 4) | ||
| 668 | #endif | ||
| 669 | 	typedef struct { | ||
| 670 | 		mach_msg_header_t Head; | ||
| 671 | 		NDR_record_t NDR; | ||
| 672 | 		mach_msg_type_number_t recipesCnt; | ||
| 673 | 		uint8_t recipes[5120]; | ||
| 674 | 	} __Request__host_create_mach_voucher_t __attribute__((unused)); | ||
| 675 | #ifdef __MigPackStructs | ||
| 676 | #pragma pack(pop) | ||
| 677 | #endif | ||
| 678 | |||
| 679 | #ifdef __MigPackStructs | ||
| 680 | #pragma pack(push, 4) | ||
| 681 | #endif | ||
| 682 | 	typedef struct { | ||
| 683 | 		mach_msg_header_t Head; | ||
| 684 | 		/* start of the kernel processed data */ | ||
| 685 | 		mach_msg_body_t msgh_body; | ||
| 686 | 		mach_msg_port_descriptor_t attr_manager; | ||
| 687 | 		/* end of the kernel processed data */ | ||
| 688 | 		NDR_record_t NDR; | ||
| 689 | 		mach_voucher_attr_value_handle_t default_value; | ||
| 690 | 	} __Request__host_register_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 691 | #ifdef __MigPackStructs | ||
| 692 | #pragma pack(pop) | ||
| 693 | #endif | ||
| 694 | |||
| 695 | #ifdef __MigPackStructs | ||
| 696 | #pragma pack(push, 4) | ||
| 697 | #endif | ||
| 698 | 	typedef struct { | ||
| 699 | 		mach_msg_header_t Head; | ||
| 700 | 		/* start of the kernel processed data */ | ||
| 701 | 		mach_msg_body_t msgh_body; | ||
| 702 | 		mach_msg_port_descriptor_t attr_manager; | ||
| 703 | 		/* end of the kernel processed data */ | ||
| 704 | 		NDR_record_t NDR; | ||
| 705 | 		mach_voucher_attr_value_handle_t default_value; | ||
| 706 | 		mach_voucher_attr_key_t key; | ||
| 707 | 	} __Request__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 708 | #ifdef __MigPackStructs | ||
| 709 | #pragma pack(pop) | ||
| 710 | #endif | ||
| 711 | |||
| 712 | #ifdef __MigPackStructs | ||
| 713 | #pragma pack(push, 4) | ||
| 714 | #endif | ||
| 715 | 	typedef struct { | ||
| 716 | 		mach_msg_header_t Head; | ||
| 717 | 		NDR_record_t NDR; | ||
| 718 | 		uint32_t diagnostic_flag; | ||
| 719 | 	} __Request__host_set_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 720 | #ifdef __MigPackStructs | ||
| 721 | #pragma pack(pop) | ||
| 722 | #endif | ||
| 723 | |||
| 724 | #ifdef __MigPackStructs | ||
| 725 | #pragma pack(push, 4) | ||
| 726 | #endif | ||
| 727 | 	typedef struct { | ||
| 728 | 		mach_msg_header_t Head; | ||
| 729 | 	} __Request__host_get_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 730 | #ifdef __MigPackStructs | ||
| 731 | #pragma pack(pop) | ||
| 732 | #endif | ||
| 733 | |||
| 734 | #ifdef __MigPackStructs | ||
| 735 | #pragma pack(push, 4) | ||
| 736 | #endif | ||
| 737 | 	typedef struct { | ||
| 738 | 		mach_msg_header_t Head; | ||
| 739 | 	} __Request__mach_memory_info_t __attribute__((unused)); | ||
| 740 | #ifdef __MigPackStructs | ||
| 741 | #pragma pack(pop) | ||
| 742 | #endif | ||
| 743 | |||
| 744 | #ifdef __MigPackStructs | ||
| 745 | #pragma pack(push, 4) | ||
| 746 | #endif | ||
| 747 | 	typedef struct { | ||
| 748 | 		mach_msg_header_t Head; | ||
| 749 | 		NDR_record_t NDR; | ||
| 750 | 		uint32_t multiuser_flags; | ||
| 751 | 	} __Request__host_set_multiuser_config_flags_t __attribute__((unused)); | ||
| 752 | #ifdef __MigPackStructs | ||
| 753 | #pragma pack(pop) | ||
| 754 | #endif | ||
| 755 | |||
| 756 | #ifdef __MigPackStructs | ||
| 757 | #pragma pack(push, 4) | ||
| 758 | #endif | ||
| 759 | 	typedef struct { | ||
| 760 | 		mach_msg_header_t Head; | ||
| 761 | 	} __Request__host_get_multiuser_config_flags_t __attribute__((unused)); | ||
| 762 | #ifdef __MigPackStructs | ||
| 763 | #pragma pack(pop) | ||
| 764 | #endif | ||
| 765 | |||
| 766 | #ifdef __MigPackStructs | ||
| 767 | #pragma pack(push, 4) | ||
| 768 | #endif | ||
| 769 | 	typedef struct { | ||
| 770 | 		mach_msg_header_t Head; | ||
| 771 | 	} __Request__host_check_multiuser_mode_t __attribute__((unused)); | ||
| 772 | #ifdef __MigPackStructs | ||
| 773 | #pragma pack(pop) | ||
| 774 | #endif | ||
| 775 | |||
| 776 | #ifdef __MigPackStructs | ||
| 777 | #pragma pack(push, 4) | ||
| 778 | #endif | ||
| 779 | 	typedef struct { | ||
| 780 | 		mach_msg_header_t Head; | ||
| 781 | 		NDR_record_t NDR; | ||
| 782 | 		mach_zone_name_t name; | ||
| 783 | 	} __Request__mach_zone_info_for_zone_t __attribute__((unused)); | ||
| 784 | #ifdef __MigPackStructs | ||
| 785 | #pragma pack(pop) | ||
| 786 | #endif | ||
| 787 | #endif /* !__Request__mach_host_subsystem__defined */ | ||
| 788 | |||
| 789 | /* union of all requests */ | ||
| 790 | |||
| 791 | #ifndef __RequestUnion__mach_host_subsystem__defined | ||
| 792 | #define __RequestUnion__mach_host_subsystem__defined | ||
| 793 | union __RequestUnion__mach_host_subsystem { | ||
| 794 | 	__Request__host_info_t Request_host_info; | ||
| 795 | 	__Request__host_kernel_version_t Request_host_kernel_version; | ||
| 796 | 	__Request___host_page_size_t Request__host_page_size; | ||
| 797 | 	__Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; | ||
| 798 | 	__Request__host_processor_info_t Request_host_processor_info; | ||
| 799 | 	__Request__host_get_io_master_t Request_host_get_io_master; | ||
| 800 | 	__Request__host_get_clock_service_t Request_host_get_clock_service; | ||
| 801 | 	__Request__kmod_get_info_t Request_kmod_get_info; | ||
| 802 | 	__Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; | ||
| 803 | 	__Request__processor_set_default_t Request_processor_set_default; | ||
| 804 | 	__Request__processor_set_create_t Request_processor_set_create; | ||
| 805 | 	__Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; | ||
| 806 | 	__Request__host_statistics_t Request_host_statistics; | ||
| 807 | 	__Request__host_request_notification_t Request_host_request_notification; | ||
| 808 | 	__Request__host_lockgroup_info_t Request_host_lockgroup_info; | ||
| 809 | 	__Request__host_statistics64_t Request_host_statistics64; | ||
| 810 | 	__Request__mach_zone_info_t Request_mach_zone_info; | ||
| 811 | 	__Request__host_create_mach_voucher_t Request_host_create_mach_voucher; | ||
| 812 | 	__Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; | ||
| 813 | 	__Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; | ||
| 814 | 	__Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag; | ||
| 815 | 	__Request__host_get_atm_diagnostic_flag_t Request_host_get_atm_diagnostic_flag; | ||
| 816 | 	__Request__mach_memory_info_t Request_mach_memory_info; | ||
| 817 | 	__Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags; | ||
| 818 | 	__Request__host_get_multiuser_config_flags_t Request_host_get_multiuser_config_flags; | ||
| 819 | 	__Request__host_check_multiuser_mode_t Request_host_check_multiuser_mode; | ||
| 820 | 	__Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone; | ||
| 821 | }; | ||
| 822 | #endif /* !__RequestUnion__mach_host_subsystem__defined */ | ||
| 823 | /* typedefs for all replies */ | ||
| 824 | |||
| 825 | #ifndef __Reply__mach_host_subsystem__defined | ||
| 826 | #define __Reply__mach_host_subsystem__defined | ||
| 827 | |||
| 828 | #ifdef __MigPackStructs | ||
| 829 | #pragma pack(push, 4) | ||
| 830 | #endif | ||
| 831 | 	typedef struct { | ||
| 832 | 		mach_msg_header_t Head; | ||
| 833 | 		NDR_record_t NDR; | ||
| 834 | 		kern_return_t RetCode; | ||
| 835 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 836 | 		integer_t host_info_out[68]; | ||
| 837 | 	} __Reply__host_info_t __attribute__((unused)); | ||
| 838 | #ifdef __MigPackStructs | ||
| 839 | #pragma pack(pop) | ||
| 840 | #endif | ||
| 841 | |||
| 842 | #ifdef __MigPackStructs | ||
| 843 | #pragma pack(push, 4) | ||
| 844 | #endif | ||
| 845 | 	typedef struct { | ||
| 846 | 		mach_msg_header_t Head; | ||
| 847 | 		NDR_record_t NDR; | ||
| 848 | 		kern_return_t RetCode; | ||
| 849 | 		mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ | ||
| 850 | 		mach_msg_type_number_t kernel_versionCnt; | ||
| 851 | 		char kernel_version[512]; | ||
| 852 | 	} __Reply__host_kernel_version_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		NDR_record_t NDR; | ||
| 863 | 		kern_return_t RetCode; | ||
| 864 | 		vm_size_t out_page_size; | ||
| 865 | 	} __Reply___host_page_size_t __attribute__((unused)); | ||
| 866 | #ifdef __MigPackStructs | ||
| 867 | #pragma pack(pop) | ||
| 868 | #endif | ||
| 869 | |||
| 870 | #ifdef __MigPackStructs | ||
| 871 | #pragma pack(push, 4) | ||
| 872 | #endif | ||
| 873 | 	typedef struct { | ||
| 874 | 		mach_msg_header_t Head; | ||
| 875 | 		/* start of the kernel processed data */ | ||
| 876 | 		mach_msg_body_t msgh_body; | ||
| 877 | 		mach_msg_port_descriptor_t entry_handle; | ||
| 878 | 		/* end of the kernel processed data */ | ||
| 879 | 	} __Reply__mach_memory_object_memory_entry_t __attribute__((unused)); | ||
| 880 | #ifdef __MigPackStructs | ||
| 881 | #pragma pack(pop) | ||
| 882 | #endif | ||
| 883 | |||
| 884 | #ifdef __MigPackStructs | ||
| 885 | #pragma pack(push, 4) | ||
| 886 | #endif | ||
| 887 | 	typedef struct { | ||
| 888 | 		mach_msg_header_t Head; | ||
| 889 | 		/* start of the kernel processed data */ | ||
| 890 | 		mach_msg_body_t msgh_body; | ||
| 891 | 		mach_msg_ool_descriptor_t out_processor_info; | ||
| 892 | 		/* end of the kernel processed data */ | ||
| 893 | 		NDR_record_t NDR; | ||
| 894 | 		natural_t out_processor_count; | ||
| 895 | 		mach_msg_type_number_t out_processor_infoCnt; | ||
| 896 | 	} __Reply__host_processor_info_t __attribute__((unused)); | ||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(pop) | ||
| 899 | #endif | ||
| 900 | |||
| 901 | #ifdef __MigPackStructs | ||
| 902 | #pragma pack(push, 4) | ||
| 903 | #endif | ||
| 904 | 	typedef struct { | ||
| 905 | 		mach_msg_header_t Head; | ||
| 906 | 		/* start of the kernel processed data */ | ||
| 907 | 		mach_msg_body_t msgh_body; | ||
| 908 | 		mach_msg_port_descriptor_t io_master; | ||
| 909 | 		/* end of the kernel processed data */ | ||
| 910 | 	} __Reply__host_get_io_master_t __attribute__((unused)); | ||
| 911 | #ifdef __MigPackStructs | ||
| 912 | #pragma pack(pop) | ||
| 913 | #endif | ||
| 914 | |||
| 915 | #ifdef __MigPackStructs | ||
| 916 | #pragma pack(push, 4) | ||
| 917 | #endif | ||
| 918 | 	typedef struct { | ||
| 919 | 		mach_msg_header_t Head; | ||
| 920 | 		/* start of the kernel processed data */ | ||
| 921 | 		mach_msg_body_t msgh_body; | ||
| 922 | 		mach_msg_port_descriptor_t clock_serv; | ||
| 923 | 		/* end of the kernel processed data */ | ||
| 924 | 	} __Reply__host_get_clock_service_t __attribute__((unused)); | ||
| 925 | #ifdef __MigPackStructs | ||
| 926 | #pragma pack(pop) | ||
| 927 | #endif | ||
| 928 | |||
| 929 | #ifdef __MigPackStructs | ||
| 930 | #pragma pack(push, 4) | ||
| 931 | #endif | ||
| 932 | 	typedef struct { | ||
| 933 | 		mach_msg_header_t Head; | ||
| 934 | 		/* start of the kernel processed data */ | ||
| 935 | 		mach_msg_body_t msgh_body; | ||
| 936 | 		mach_msg_ool_descriptor_t modules; | ||
| 937 | 		/* end of the kernel processed data */ | ||
| 938 | 		NDR_record_t NDR; | ||
| 939 | 		mach_msg_type_number_t modulesCnt; | ||
| 940 | 	} __Reply__kmod_get_info_t __attribute__((unused)); | ||
| 941 | #ifdef __MigPackStructs | ||
| 942 | #pragma pack(pop) | ||
| 943 | #endif | ||
| 944 | |||
| 945 | #ifdef __MigPackStructs | ||
| 946 | #pragma pack(push, 4) | ||
| 947 | #endif | ||
| 948 | 	typedef struct { | ||
| 949 | 		mach_msg_header_t Head; | ||
| 950 | 		/* start of the kernel processed data */ | ||
| 951 | 		mach_msg_body_t msgh_body; | ||
| 952 | 		mach_msg_ool_descriptor_t info; | ||
| 953 | 		/* end of the kernel processed data */ | ||
| 954 | 		NDR_record_t NDR; | ||
| 955 | 		mach_msg_type_number_t infoCnt; | ||
| 956 | 	} __Reply__host_virtual_physical_table_info_t __attribute__((unused)); | ||
| 957 | #ifdef __MigPackStructs | ||
| 958 | #pragma pack(pop) | ||
| 959 | #endif | ||
| 960 | |||
| 961 | #ifdef __MigPackStructs | ||
| 962 | #pragma pack(push, 4) | ||
| 963 | #endif | ||
| 964 | 	typedef struct { | ||
| 965 | 		mach_msg_header_t Head; | ||
| 966 | 		/* start of the kernel processed data */ | ||
| 967 | 		mach_msg_body_t msgh_body; | ||
| 968 | 		mach_msg_port_descriptor_t default_set; | ||
| 969 | 		/* end of the kernel processed data */ | ||
| 970 | 	} __Reply__processor_set_default_t __attribute__((unused)); | ||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(pop) | ||
| 973 | #endif | ||
| 974 | |||
| 975 | #ifdef __MigPackStructs | ||
| 976 | #pragma pack(push, 4) | ||
| 977 | #endif | ||
| 978 | 	typedef struct { | ||
| 979 | 		mach_msg_header_t Head; | ||
| 980 | 		/* start of the kernel processed data */ | ||
| 981 | 		mach_msg_body_t msgh_body; | ||
| 982 | 		mach_msg_port_descriptor_t new_set; | ||
| 983 | 		mach_msg_port_descriptor_t new_name; | ||
| 984 | 		/* end of the kernel processed data */ | ||
| 985 | 	} __Reply__processor_set_create_t __attribute__((unused)); | ||
| 986 | #ifdef __MigPackStructs | ||
| 987 | #pragma pack(pop) | ||
| 988 | #endif | ||
| 989 | |||
| 990 | #ifdef __MigPackStructs | ||
| 991 | #pragma pack(push, 4) | ||
| 992 | #endif | ||
| 993 | 	typedef struct { | ||
| 994 | 		mach_msg_header_t Head; | ||
| 995 | 		/* start of the kernel processed data */ | ||
| 996 | 		mach_msg_body_t msgh_body; | ||
| 997 | 		mach_msg_port_descriptor_t entry_handle; | ||
| 998 | 		/* end of the kernel processed data */ | ||
| 999 | 	} __Reply__mach_memory_object_memory_entry_64_t __attribute__((unused)); | ||
| 1000 | #ifdef __MigPackStructs | ||
| 1001 | #pragma pack(pop) | ||
| 1002 | #endif | ||
| 1003 | |||
| 1004 | #ifdef __MigPackStructs | ||
| 1005 | #pragma pack(push, 4) | ||
| 1006 | #endif | ||
| 1007 | 	typedef struct { | ||
| 1008 | 		mach_msg_header_t Head; | ||
| 1009 | 		NDR_record_t NDR; | ||
| 1010 | 		kern_return_t RetCode; | ||
| 1011 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 1012 | 		integer_t host_info_out[68]; | ||
| 1013 | 	} __Reply__host_statistics_t __attribute__((unused)); | ||
| 1014 | #ifdef __MigPackStructs | ||
| 1015 | #pragma pack(pop) | ||
| 1016 | #endif | ||
| 1017 | |||
| 1018 | #ifdef __MigPackStructs | ||
| 1019 | #pragma pack(push, 4) | ||
| 1020 | #endif | ||
| 1021 | 	typedef struct { | ||
| 1022 | 		mach_msg_header_t Head; | ||
| 1023 | 		NDR_record_t NDR; | ||
| 1024 | 		kern_return_t RetCode; | ||
| 1025 | 	} __Reply__host_request_notification_t __attribute__((unused)); | ||
| 1026 | #ifdef __MigPackStructs | ||
| 1027 | #pragma pack(pop) | ||
| 1028 | #endif | ||
| 1029 | |||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(push, 4) | ||
| 1032 | #endif | ||
| 1033 | 	typedef struct { | ||
| 1034 | 		mach_msg_header_t Head; | ||
| 1035 | 		/* start of the kernel processed data */ | ||
| 1036 | 		mach_msg_body_t msgh_body; | ||
| 1037 | 		mach_msg_ool_descriptor_t lockgroup_info; | ||
| 1038 | 		/* end of the kernel processed data */ | ||
| 1039 | 		NDR_record_t NDR; | ||
| 1040 | 		mach_msg_type_number_t lockgroup_infoCnt; | ||
| 1041 | 	} __Reply__host_lockgroup_info_t __attribute__((unused)); | ||
| 1042 | #ifdef __MigPackStructs | ||
| 1043 | #pragma pack(pop) | ||
| 1044 | #endif | ||
| 1045 | |||
| 1046 | #ifdef __MigPackStructs | ||
| 1047 | #pragma pack(push, 4) | ||
| 1048 | #endif | ||
| 1049 | 	typedef struct { | ||
| 1050 | 		mach_msg_header_t Head; | ||
| 1051 | 		NDR_record_t NDR; | ||
| 1052 | 		kern_return_t RetCode; | ||
| 1053 | 		mach_msg_type_number_t host_info64_outCnt; | ||
| 1054 | 		integer_t host_info64_out[256]; | ||
| 1055 | 	} __Reply__host_statistics64_t __attribute__((unused)); | ||
| 1056 | #ifdef __MigPackStructs | ||
| 1057 | #pragma pack(pop) | ||
| 1058 | #endif | ||
| 1059 | |||
| 1060 | #ifdef __MigPackStructs | ||
| 1061 | #pragma pack(push, 4) | ||
| 1062 | #endif | ||
| 1063 | 	typedef struct { | ||
| 1064 | 		mach_msg_header_t Head; | ||
| 1065 | 		/* start of the kernel processed data */ | ||
| 1066 | 		mach_msg_body_t msgh_body; | ||
| 1067 | 		mach_msg_ool_descriptor_t names; | ||
| 1068 | 		mach_msg_ool_descriptor_t info; | ||
| 1069 | 		/* end of the kernel processed data */ | ||
| 1070 | 		NDR_record_t NDR; | ||
| 1071 | 		mach_msg_type_number_t namesCnt; | ||
| 1072 | 		mach_msg_type_number_t infoCnt; | ||
| 1073 | 	} __Reply__mach_zone_info_t __attribute__((unused)); | ||
| 1074 | #ifdef __MigPackStructs | ||
| 1075 | #pragma pack(pop) | ||
| 1076 | #endif | ||
| 1077 | |||
| 1078 | #ifdef __MigPackStructs | ||
| 1079 | #pragma pack(push, 4) | ||
| 1080 | #endif | ||
| 1081 | 	typedef struct { | ||
| 1082 | 		mach_msg_header_t Head; | ||
| 1083 | 		/* start of the kernel processed data */ | ||
| 1084 | 		mach_msg_body_t msgh_body; | ||
| 1085 | 		mach_msg_port_descriptor_t voucher; | ||
| 1086 | 		/* end of the kernel processed data */ | ||
| 1087 | 	} __Reply__host_create_mach_voucher_t __attribute__((unused)); | ||
| 1088 | #ifdef __MigPackStructs | ||
| 1089 | #pragma pack(pop) | ||
| 1090 | #endif | ||
| 1091 | |||
| 1092 | #ifdef __MigPackStructs | ||
| 1093 | #pragma pack(push, 4) | ||
| 1094 | #endif | ||
| 1095 | 	typedef struct { | ||
| 1096 | 		mach_msg_header_t Head; | ||
| 1097 | 		/* start of the kernel processed data */ | ||
| 1098 | 		mach_msg_body_t msgh_body; | ||
| 1099 | 		mach_msg_port_descriptor_t new_attr_control; | ||
| 1100 | 		/* end of the kernel processed data */ | ||
| 1101 | 		NDR_record_t NDR; | ||
| 1102 | 		mach_voucher_attr_key_t new_key; | ||
| 1103 | 	} __Reply__host_register_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 1104 | #ifdef __MigPackStructs | ||
| 1105 | #pragma pack(pop) | ||
| 1106 | #endif | ||
| 1107 | |||
| 1108 | #ifdef __MigPackStructs | ||
| 1109 | #pragma pack(push, 4) | ||
| 1110 | #endif | ||
| 1111 | 	typedef struct { | ||
| 1112 | 		mach_msg_header_t Head; | ||
| 1113 | 		/* start of the kernel processed data */ | ||
| 1114 | 		mach_msg_body_t msgh_body; | ||
| 1115 | 		mach_msg_port_descriptor_t new_attr_control; | ||
| 1116 | 		/* end of the kernel processed data */ | ||
| 1117 | 	} __Reply__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 1118 | #ifdef __MigPackStructs | ||
| 1119 | #pragma pack(pop) | ||
| 1120 | #endif | ||
| 1121 | |||
| 1122 | #ifdef __MigPackStructs | ||
| 1123 | #pragma pack(push, 4) | ||
| 1124 | #endif | ||
| 1125 | 	typedef struct { | ||
| 1126 | 		mach_msg_header_t Head; | ||
| 1127 | 		NDR_record_t NDR; | ||
| 1128 | 		kern_return_t RetCode; | ||
| 1129 | 	} __Reply__host_set_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 1130 | #ifdef __MigPackStructs | ||
| 1131 | #pragma pack(pop) | ||
| 1132 | #endif | ||
| 1133 | |||
| 1134 | #ifdef __MigPackStructs | ||
| 1135 | #pragma pack(push, 4) | ||
| 1136 | #endif | ||
| 1137 | 	typedef struct { | ||
| 1138 | 		mach_msg_header_t Head; | ||
| 1139 | 		NDR_record_t NDR; | ||
| 1140 | 		kern_return_t RetCode; | ||
| 1141 | 		uint32_t diagnostic_flag; | ||
| 1142 | 	} __Reply__host_get_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 1143 | #ifdef __MigPackStructs | ||
| 1144 | #pragma pack(pop) | ||
| 1145 | #endif | ||
| 1146 | |||
| 1147 | #ifdef __MigPackStructs | ||
| 1148 | #pragma pack(push, 4) | ||
| 1149 | #endif | ||
| 1150 | 	typedef struct { | ||
| 1151 | 		mach_msg_header_t Head; | ||
| 1152 | 		/* start of the kernel processed data */ | ||
| 1153 | 		mach_msg_body_t msgh_body; | ||
| 1154 | 		mach_msg_ool_descriptor_t names; | ||
| 1155 | 		mach_msg_ool_descriptor_t info; | ||
| 1156 | 		mach_msg_ool_descriptor_t memory_info; | ||
| 1157 | 		/* end of the kernel processed data */ | ||
| 1158 | 		NDR_record_t NDR; | ||
| 1159 | 		mach_msg_type_number_t namesCnt; | ||
| 1160 | 		mach_msg_type_number_t infoCnt; | ||
| 1161 | 		mach_msg_type_number_t memory_infoCnt; | ||
| 1162 | 	} __Reply__mach_memory_info_t __attribute__((unused)); | ||
| 1163 | #ifdef __MigPackStructs | ||
| 1164 | #pragma pack(pop) | ||
| 1165 | #endif | ||
| 1166 | |||
| 1167 | #ifdef __MigPackStructs | ||
| 1168 | #pragma pack(push, 4) | ||
| 1169 | #endif | ||
| 1170 | 	typedef struct { | ||
| 1171 | 		mach_msg_header_t Head; | ||
| 1172 | 		NDR_record_t NDR; | ||
| 1173 | 		kern_return_t RetCode; | ||
| 1174 | 	} __Reply__host_set_multiuser_config_flags_t __attribute__((unused)); | ||
| 1175 | #ifdef __MigPackStructs | ||
| 1176 | #pragma pack(pop) | ||
| 1177 | #endif | ||
| 1178 | |||
| 1179 | #ifdef __MigPackStructs | ||
| 1180 | #pragma pack(push, 4) | ||
| 1181 | #endif | ||
| 1182 | 	typedef struct { | ||
| 1183 | 		mach_msg_header_t Head; | ||
| 1184 | 		NDR_record_t NDR; | ||
| 1185 | 		kern_return_t RetCode; | ||
| 1186 | 		uint32_t multiuser_flags; | ||
| 1187 | 	} __Reply__host_get_multiuser_config_flags_t __attribute__((unused)); | ||
| 1188 | #ifdef __MigPackStructs | ||
| 1189 | #pragma pack(pop) | ||
| 1190 | #endif | ||
| 1191 | |||
| 1192 | #ifdef __MigPackStructs | ||
| 1193 | #pragma pack(push, 4) | ||
| 1194 | #endif | ||
| 1195 | 	typedef struct { | ||
| 1196 | 		mach_msg_header_t Head; | ||
| 1197 | 		NDR_record_t NDR; | ||
| 1198 | 		kern_return_t RetCode; | ||
| 1199 | 		uint32_t multiuser_mode; | ||
| 1200 | 	} __Reply__host_check_multiuser_mode_t __attribute__((unused)); | ||
| 1201 | #ifdef __MigPackStructs | ||
| 1202 | #pragma pack(pop) | ||
| 1203 | #endif | ||
| 1204 | |||
| 1205 | #ifdef __MigPackStructs | ||
| 1206 | #pragma pack(push, 4) | ||
| 1207 | #endif | ||
| 1208 | 	typedef struct { | ||
| 1209 | 		mach_msg_header_t Head; | ||
| 1210 | 		NDR_record_t NDR; | ||
| 1211 | 		kern_return_t RetCode; | ||
| 1212 | 		mach_zone_info_t info; | ||
| 1213 | 	} __Reply__mach_zone_info_for_zone_t __attribute__((unused)); | ||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(pop) | ||
| 1216 | #endif | ||
| 1217 | #endif /* !__Reply__mach_host_subsystem__defined */ | ||
| 1218 | |||
| 1219 | /* union of all replies */ | ||
| 1220 | |||
| 1221 | #ifndef __ReplyUnion__mach_host_subsystem__defined | ||
| 1222 | #define __ReplyUnion__mach_host_subsystem__defined | ||
| 1223 | union __ReplyUnion__mach_host_subsystem { | ||
| 1224 | 	__Reply__host_info_t Reply_host_info; | ||
| 1225 | 	__Reply__host_kernel_version_t Reply_host_kernel_version; | ||
| 1226 | 	__Reply___host_page_size_t Reply__host_page_size; | ||
| 1227 | 	__Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; | ||
| 1228 | 	__Reply__host_processor_info_t Reply_host_processor_info; | ||
| 1229 | 	__Reply__host_get_io_master_t Reply_host_get_io_master; | ||
| 1230 | 	__Reply__host_get_clock_service_t Reply_host_get_clock_service; | ||
| 1231 | 	__Reply__kmod_get_info_t Reply_kmod_get_info; | ||
| 1232 | 	__Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; | ||
| 1233 | 	__Reply__processor_set_default_t Reply_processor_set_default; | ||
| 1234 | 	__Reply__processor_set_create_t Reply_processor_set_create; | ||
| 1235 | 	__Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; | ||
| 1236 | 	__Reply__host_statistics_t Reply_host_statistics; | ||
| 1237 | 	__Reply__host_request_notification_t Reply_host_request_notification; | ||
| 1238 | 	__Reply__host_lockgroup_info_t Reply_host_lockgroup_info; | ||
| 1239 | 	__Reply__host_statistics64_t Reply_host_statistics64; | ||
| 1240 | 	__Reply__mach_zone_info_t Reply_mach_zone_info; | ||
| 1241 | 	__Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; | ||
| 1242 | 	__Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; | ||
| 1243 | 	__Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; | ||
| 1244 | 	__Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag; | ||
| 1245 | 	__Reply__host_get_atm_diagnostic_flag_t Reply_host_get_atm_diagnostic_flag; | ||
| 1246 | 	__Reply__mach_memory_info_t Reply_mach_memory_info; | ||
| 1247 | 	__Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags; | ||
| 1248 | 	__Reply__host_get_multiuser_config_flags_t Reply_host_get_multiuser_config_flags; | ||
| 1249 | 	__Reply__host_check_multiuser_mode_t Reply_host_check_multiuser_mode; | ||
| 1250 | 	__Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone; | ||
| 1251 | }; | ||
| 1252 | #endif /* !__RequestUnion__mach_host_subsystem__defined */ | ||
| 1253 | |||
| 1254 | #ifndef subsystem_to_name_map_mach_host | ||
| 1255 | #define subsystem_to_name_map_mach_host \ | ||
| 1256 | { "host_info", 200 },\ | ||
| 1257 | { "host_kernel_version", 201 },\ | ||
| 1258 | { "_host_page_size", 202 },\ | ||
| 1259 | { "mach_memory_object_memory_entry", 203 },\ | ||
| 1260 | { "host_processor_info", 204 },\ | ||
| 1261 | { "host_get_io_master", 205 },\ | ||
| 1262 | { "host_get_clock_service", 206 },\ | ||
| 1263 | { "kmod_get_info", 207 },\ | ||
| 1264 | { "host_virtual_physical_table_info", 209 },\ | ||
| 1265 | { "processor_set_default", 213 },\ | ||
| 1266 | { "processor_set_create", 214 },\ | ||
| 1267 | { "mach_memory_object_memory_entry_64", 215 },\ | ||
| 1268 | { "host_statistics", 216 },\ | ||
| 1269 | { "host_request_notification", 217 },\ | ||
| 1270 | { "host_lockgroup_info", 218 },\ | ||
| 1271 | { "host_statistics64", 219 },\ | ||
| 1272 | { "mach_zone_info", 220 },\ | ||
| 1273 | { "host_create_mach_voucher", 222 },\ | ||
| 1274 | { "host_register_mach_voucher_attr_manager", 223 },\ | ||
| 1275 | { "host_register_well_known_mach_voucher_attr_manager", 224 },\ | ||
| 1276 | { "host_set_atm_diagnostic_flag", 225 },\ | ||
| 1277 | { "host_get_atm_diagnostic_flag", 226 },\ | ||
| 1278 | { "mach_memory_info", 227 },\ | ||
| 1279 | { "host_set_multiuser_config_flags", 228 },\ | ||
| 1280 | { "host_get_multiuser_config_flags", 229 },\ | ||
| 1281 | { "host_check_multiuser_mode", 230 },\ | ||
| 1282 | { "mach_zone_info_for_zone", 231 } | ||
| 1283 | #endif | ||
| 1284 | |||
| 1285 | #ifdef __AfterMigUserHeader | ||
| 1286 | __AfterMigUserHeader | ||
| 1287 | #endif /* __AfterMigUserHeader */ | ||
| 1288 | |||
| 1289 | #endif	 /* _mach_host_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mach_init.h created+114| ... | @@ -0,0 +1,114 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Mach Operating System | ||
| 30 | * Copyright (c) 1991,1990,1989,1988,1987,1986 Carnegie Mellon University | ||
| 31 | * All Rights Reserved. | ||
| 32 | * | ||
| 33 | * Permission to use, copy, modify and distribute this software and its | ||
| 34 | * documentation is hereby granted, provided that both the copyright | ||
| 35 | * notice and this permission notice appear in all copies of the | ||
| 36 | * software, derivative works or modified versions, and any portions | ||
| 37 | * thereof, and that both notices appear in supporting documentation. | ||
| 38 | * | ||
| 39 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 40 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 41 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | * Carnegie Mellon requests users of this software to return to | ||
| 44 | * | ||
| 45 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 46 | * School of Computer Science | ||
| 47 | * Carnegie Mellon University | ||
| 48 | * Pittsburgh PA 15213-3890 | ||
| 49 | * | ||
| 50 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 51 | * the rights to redistribute these changes. | ||
| 52 | */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | *	Items provided by the Mach environment initialization. | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _MACH_INIT_ | ||
| 59 | #define _MACH_INIT_ 1 | ||
| 60 | |||
| 61 | #include <mach/mach_types.h> | ||
| 62 | #include <mach/vm_page_size.h> | ||
| 63 | #include <stdarg.h> | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | |||
| 67 | #include <Availability.h> | ||
| 68 | |||
| 69 | /* | ||
| 70 | *	Kernel-related ports; how a task/thread controls itself | ||
| 71 | */ | ||
| 72 | |||
| 73 | __BEGIN_DECLS | ||
| 74 | extern mach_port_t mach_host_self(void); | ||
| 75 | extern mach_port_t mach_thread_self(void); | ||
| 76 | __API_AVAILABLE(macos(11.3), ios(14.5), tvos(14.5), watchos(7.3)) | ||
| 77 | extern boolean_t mach_task_is_self(task_name_t task); | ||
| 78 | extern kern_return_t host_page_size(host_t, vm_size_t *); | ||
| 79 | |||
| 80 | extern mach_port_t mach_task_self_; | ||
| 81 | #define mach_task_self() mach_task_self_ | ||
| 82 | #define current_task() mach_task_self() | ||
| 83 | |||
| 84 | __END_DECLS | ||
| 85 | #include <mach/mach_traps.h> | ||
| 86 | __BEGIN_DECLS | ||
| 87 | |||
| 88 | /* | ||
| 89 | *	Other important ports in the Mach user environment | ||
| 90 | */ | ||
| 91 | |||
| 92 | extern mach_port_t bootstrap_port; | ||
| 93 | |||
| 94 | /* | ||
| 95 | *	Where these ports occur in the "mach_ports_register" | ||
| 96 | *	collection... only servers or the runtime library need know. | ||
| 97 | */ | ||
| 98 | |||
| 99 | #define NAME_SERVER_SLOT 0 | ||
| 100 | #define ENVIRONMENT_SLOT 1 | ||
| 101 | #define SERVICE_SLOT 2 | ||
| 102 | |||
| 103 | #define MACH_PORTS_SLOTS_USED 3 | ||
| 104 | |||
| 105 | /* | ||
| 106 | *	fprintf_stderr uses vprintf_stderr_func to produce | ||
| 107 | *	error messages, this can be overridden by a user | ||
| 108 | *	application to point to a user-specified output function | ||
| 109 | */ | ||
| 110 | extern int (*vprintf_stderr_func)(const char *format, va_list ap) __printflike(1, 0); | ||
| 111 | |||
| 112 | __END_DECLS | ||
| 113 | |||
| 114 | #endif /* _MACH_INIT_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mach_port.h deleted-1939| ... | @@ -1,1939 +0,0 @@ | ||
| 1 | #ifndef	_mach_port_user_ | ||
| 2 | #define	_mach_port_user_ | ||
| 3 | |||
| 4 | /* Module mach_port */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	mach_port_MSG_COUNT | ||
| 52 | #define	mach_port_MSG_COUNT	43 | ||
| 53 | #endif	/* mach_port_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine mach_port_names */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t mach_port_names | ||
| 77 | ( | ||
| 78 | 	ipc_space_t task, | ||
| 79 | 	mach_port_name_array_t *names, | ||
| 80 | 	mach_msg_type_number_t *namesCnt, | ||
| 81 | 	mach_port_type_array_t *types, | ||
| 82 | 	mach_msg_type_number_t *typesCnt | ||
| 83 | ); | ||
| 84 | |||
| 85 | /* Routine mach_port_type */ | ||
| 86 | #ifdef	mig_external | ||
| 87 | mig_external | ||
| 88 | #else | ||
| 89 | extern | ||
| 90 | #endif	/* mig_external */ | ||
| 91 | kern_return_t mach_port_type | ||
| 92 | ( | ||
| 93 | 	ipc_space_t task, | ||
| 94 | 	mach_port_name_t name, | ||
| 95 | 	mach_port_type_t *ptype | ||
| 96 | ); | ||
| 97 | |||
| 98 | /* Routine mach_port_rename */ | ||
| 99 | #ifdef	mig_external | ||
| 100 | mig_external | ||
| 101 | #else | ||
| 102 | extern | ||
| 103 | #endif	/* mig_external */ | ||
| 104 | kern_return_t mach_port_rename | ||
| 105 | ( | ||
| 106 | 	ipc_space_t task, | ||
| 107 | 	mach_port_name_t old_name, | ||
| 108 | 	mach_port_name_t new_name | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine mach_port_allocate_name */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 118 | kern_return_t mach_port_allocate_name | ||
| 119 | ( | ||
| 120 | 	ipc_space_t task, | ||
| 121 | 	mach_port_right_t right, | ||
| 122 | 	mach_port_name_t name | ||
| 123 | ); | ||
| 124 | |||
| 125 | /* Routine mach_port_allocate */ | ||
| 126 | #ifdef	mig_external | ||
| 127 | mig_external | ||
| 128 | #else | ||
| 129 | extern | ||
| 130 | #endif	/* mig_external */ | ||
| 131 | kern_return_t mach_port_allocate | ||
| 132 | ( | ||
| 133 | 	ipc_space_t task, | ||
| 134 | 	mach_port_right_t right, | ||
| 135 | 	mach_port_name_t *name | ||
| 136 | ); | ||
| 137 | |||
| 138 | /* Routine mach_port_destroy */ | ||
| 139 | #ifdef	mig_external | ||
| 140 | mig_external | ||
| 141 | #else | ||
| 142 | extern | ||
| 143 | #endif	/* mig_external */ | ||
| 144 | __API_DEPRECATED("Inherently unsafe API: instead manage rights with " | ||
| 145 | "mach_port_destruct(), mach_port_deallocate() or mach_port_mod_refs()", | ||
| 146 | macos(10.0, 12.0), ios(2.0, 15.0), tvos(9.0, 15.0), watchos(2.0, 8.0)) | ||
| 147 | kern_return_t mach_port_destroy | ||
| 148 | ( | ||
| 149 | 	ipc_space_t task, | ||
| 150 | 	mach_port_name_t name | ||
| 151 | ); | ||
| 152 | |||
| 153 | /* Routine mach_port_deallocate */ | ||
| 154 | #ifdef	mig_external | ||
| 155 | mig_external | ||
| 156 | #else | ||
| 157 | extern | ||
| 158 | #endif	/* mig_external */ | ||
| 159 | kern_return_t mach_port_deallocate | ||
| 160 | ( | ||
| 161 | 	ipc_space_t task, | ||
| 162 | 	mach_port_name_t name | ||
| 163 | ); | ||
| 164 | |||
| 165 | /* Routine mach_port_get_refs */ | ||
| 166 | #ifdef	mig_external | ||
| 167 | mig_external | ||
| 168 | #else | ||
| 169 | extern | ||
| 170 | #endif	/* mig_external */ | ||
| 171 | kern_return_t mach_port_get_refs | ||
| 172 | ( | ||
| 173 | 	ipc_space_t task, | ||
| 174 | 	mach_port_name_t name, | ||
| 175 | 	mach_port_right_t right, | ||
| 176 | 	mach_port_urefs_t *refs | ||
| 177 | ); | ||
| 178 | |||
| 179 | /* Routine mach_port_mod_refs */ | ||
| 180 | #ifdef	mig_external | ||
| 181 | mig_external | ||
| 182 | #else | ||
| 183 | extern | ||
| 184 | #endif	/* mig_external */ | ||
| 185 | kern_return_t mach_port_mod_refs | ||
| 186 | ( | ||
| 187 | 	ipc_space_t task, | ||
| 188 | 	mach_port_name_t name, | ||
| 189 | 	mach_port_right_t right, | ||
| 190 | 	mach_port_delta_t delta | ||
| 191 | ); | ||
| 192 | |||
| 193 | /* Routine mach_port_peek */ | ||
| 194 | #ifdef	mig_external | ||
| 195 | mig_external | ||
| 196 | #else | ||
| 197 | extern | ||
| 198 | #endif	/* mig_external */ | ||
| 199 | kern_return_t mach_port_peek | ||
| 200 | ( | ||
| 201 | 	ipc_space_t task, | ||
| 202 | 	mach_port_name_t name, | ||
| 203 | 	mach_msg_trailer_type_t trailer_type, | ||
| 204 | 	mach_port_seqno_t *request_seqnop, | ||
| 205 | 	mach_msg_size_t *msg_sizep, | ||
| 206 | 	mach_msg_id_t *msg_idp, | ||
| 207 | 	mach_msg_trailer_info_t trailer_infop, | ||
| 208 | 	mach_msg_type_number_t *trailer_infopCnt | ||
| 209 | ); | ||
| 210 | |||
| 211 | /* Routine mach_port_set_mscount */ | ||
| 212 | #ifdef	mig_external | ||
| 213 | mig_external | ||
| 214 | #else | ||
| 215 | extern | ||
| 216 | #endif	/* mig_external */ | ||
| 217 | kern_return_t mach_port_set_mscount | ||
| 218 | ( | ||
| 219 | 	ipc_space_t task, | ||
| 220 | 	mach_port_name_t name, | ||
| 221 | 	mach_port_mscount_t mscount | ||
| 222 | ); | ||
| 223 | |||
| 224 | /* Routine mach_port_get_set_status */ | ||
| 225 | #ifdef	mig_external | ||
| 226 | mig_external | ||
| 227 | #else | ||
| 228 | extern | ||
| 229 | #endif	/* mig_external */ | ||
| 230 | kern_return_t mach_port_get_set_status | ||
| 231 | ( | ||
| 232 | 	ipc_space_read_t task, | ||
| 233 | 	mach_port_name_t name, | ||
| 234 | 	mach_port_name_array_t *members, | ||
| 235 | 	mach_msg_type_number_t *membersCnt | ||
| 236 | ); | ||
| 237 | |||
| 238 | /* Routine mach_port_move_member */ | ||
| 239 | #ifdef	mig_external | ||
| 240 | mig_external | ||
| 241 | #else | ||
| 242 | extern | ||
| 243 | #endif	/* mig_external */ | ||
| 244 | kern_return_t mach_port_move_member | ||
| 245 | ( | ||
| 246 | 	ipc_space_t task, | ||
| 247 | 	mach_port_name_t member, | ||
| 248 | 	mach_port_name_t after | ||
| 249 | ); | ||
| 250 | |||
| 251 | /* Routine mach_port_request_notification */ | ||
| 252 | #ifdef	mig_external | ||
| 253 | mig_external | ||
| 254 | #else | ||
| 255 | extern | ||
| 256 | #endif	/* mig_external */ | ||
| 257 | kern_return_t mach_port_request_notification | ||
| 258 | ( | ||
| 259 | 	ipc_space_t task, | ||
| 260 | 	mach_port_name_t name, | ||
| 261 | 	mach_msg_id_t msgid, | ||
| 262 | 	mach_port_mscount_t sync, | ||
| 263 | 	mach_port_t notify, | ||
| 264 | 	mach_msg_type_name_t notifyPoly, | ||
| 265 | 	mach_port_t *previous | ||
| 266 | ); | ||
| 267 | |||
| 268 | /* Routine mach_port_insert_right */ | ||
| 269 | #ifdef	mig_external | ||
| 270 | mig_external | ||
| 271 | #else | ||
| 272 | extern | ||
| 273 | #endif	/* mig_external */ | ||
| 274 | kern_return_t mach_port_insert_right | ||
| 275 | ( | ||
| 276 | 	ipc_space_t task, | ||
| 277 | 	mach_port_name_t name, | ||
| 278 | 	mach_port_t poly, | ||
| 279 | 	mach_msg_type_name_t polyPoly | ||
| 280 | ); | ||
| 281 | |||
| 282 | /* Routine mach_port_extract_right */ | ||
| 283 | #ifdef	mig_external | ||
| 284 | mig_external | ||
| 285 | #else | ||
| 286 | extern | ||
| 287 | #endif	/* mig_external */ | ||
| 288 | kern_return_t mach_port_extract_right | ||
| 289 | ( | ||
| 290 | 	ipc_space_t task, | ||
| 291 | 	mach_port_name_t name, | ||
| 292 | 	mach_msg_type_name_t msgt_name, | ||
| 293 | 	mach_port_t *poly, | ||
| 294 | 	mach_msg_type_name_t *polyPoly | ||
| 295 | ); | ||
| 296 | |||
| 297 | /* Routine mach_port_set_seqno */ | ||
| 298 | #ifdef	mig_external | ||
| 299 | mig_external | ||
| 300 | #else | ||
| 301 | extern | ||
| 302 | #endif	/* mig_external */ | ||
| 303 | kern_return_t mach_port_set_seqno | ||
| 304 | ( | ||
| 305 | 	ipc_space_t task, | ||
| 306 | 	mach_port_name_t name, | ||
| 307 | 	mach_port_seqno_t seqno | ||
| 308 | ); | ||
| 309 | |||
| 310 | /* Routine mach_port_get_attributes */ | ||
| 311 | #ifdef	mig_external | ||
| 312 | mig_external | ||
| 313 | #else | ||
| 314 | extern | ||
| 315 | #endif	/* mig_external */ | ||
| 316 | kern_return_t mach_port_get_attributes | ||
| 317 | ( | ||
| 318 | 	ipc_space_read_t task, | ||
| 319 | 	mach_port_name_t name, | ||
| 320 | 	mach_port_flavor_t flavor, | ||
| 321 | 	mach_port_info_t port_info_out, | ||
| 322 | 	mach_msg_type_number_t *port_info_outCnt | ||
| 323 | ); | ||
| 324 | |||
| 325 | /* Routine mach_port_set_attributes */ | ||
| 326 | #ifdef	mig_external | ||
| 327 | mig_external | ||
| 328 | #else | ||
| 329 | extern | ||
| 330 | #endif	/* mig_external */ | ||
| 331 | kern_return_t mach_port_set_attributes | ||
| 332 | ( | ||
| 333 | 	ipc_space_t task, | ||
| 334 | 	mach_port_name_t name, | ||
| 335 | 	mach_port_flavor_t flavor, | ||
| 336 | 	mach_port_info_t port_info, | ||
| 337 | 	mach_msg_type_number_t port_infoCnt | ||
| 338 | ); | ||
| 339 | |||
| 340 | /* Routine mach_port_allocate_qos */ | ||
| 341 | #ifdef	mig_external | ||
| 342 | mig_external | ||
| 343 | #else | ||
| 344 | extern | ||
| 345 | #endif	/* mig_external */ | ||
| 346 | kern_return_t mach_port_allocate_qos | ||
| 347 | ( | ||
| 348 | 	ipc_space_t task, | ||
| 349 | 	mach_port_right_t right, | ||
| 350 | 	mach_port_qos_t *qos, | ||
| 351 | 	mach_port_name_t *name | ||
| 352 | ); | ||
| 353 | |||
| 354 | /* Routine mach_port_allocate_full */ | ||
| 355 | #ifdef	mig_external | ||
| 356 | mig_external | ||
| 357 | #else | ||
| 358 | extern | ||
| 359 | #endif	/* mig_external */ | ||
| 360 | kern_return_t mach_port_allocate_full | ||
| 361 | ( | ||
| 362 | 	ipc_space_t task, | ||
| 363 | 	mach_port_right_t right, | ||
| 364 | 	mach_port_t proto, | ||
| 365 | 	mach_port_qos_t *qos, | ||
| 366 | 	mach_port_name_t *name | ||
| 367 | ); | ||
| 368 | |||
| 369 | /* Routine task_set_port_space */ | ||
| 370 | #ifdef	mig_external | ||
| 371 | mig_external | ||
| 372 | #else | ||
| 373 | extern | ||
| 374 | #endif	/* mig_external */ | ||
| 375 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 376 | kern_return_t task_set_port_space | ||
| 377 | ( | ||
| 378 | 	ipc_space_t task, | ||
| 379 | 	int table_entries | ||
| 380 | ); | ||
| 381 | |||
| 382 | /* Routine mach_port_get_srights */ | ||
| 383 | #ifdef	mig_external | ||
| 384 | mig_external | ||
| 385 | #else | ||
| 386 | extern | ||
| 387 | #endif	/* mig_external */ | ||
| 388 | kern_return_t mach_port_get_srights | ||
| 389 | ( | ||
| 390 | 	ipc_space_t task, | ||
| 391 | 	mach_port_name_t name, | ||
| 392 | 	mach_port_rights_t *srights | ||
| 393 | ); | ||
| 394 | |||
| 395 | /* Routine mach_port_space_info */ | ||
| 396 | #ifdef	mig_external | ||
| 397 | mig_external | ||
| 398 | #else | ||
| 399 | extern | ||
| 400 | #endif	/* mig_external */ | ||
| 401 | kern_return_t mach_port_space_info | ||
| 402 | ( | ||
| 403 | 	ipc_space_read_t space, | ||
| 404 | 	ipc_info_space_t *space_info, | ||
| 405 | 	ipc_info_name_array_t *table_info, | ||
| 406 | 	mach_msg_type_number_t *table_infoCnt, | ||
| 407 | 	ipc_info_tree_name_array_t *tree_info, | ||
| 408 | 	mach_msg_type_number_t *tree_infoCnt | ||
| 409 | ); | ||
| 410 | |||
| 411 | /* Routine mach_port_dnrequest_info */ | ||
| 412 | #ifdef	mig_external | ||
| 413 | mig_external | ||
| 414 | #else | ||
| 415 | extern | ||
| 416 | #endif	/* mig_external */ | ||
| 417 | kern_return_t mach_port_dnrequest_info | ||
| 418 | ( | ||
| 419 | 	ipc_space_t task, | ||
| 420 | 	mach_port_name_t name, | ||
| 421 | 	unsigned *dnr_total, | ||
| 422 | 	unsigned *dnr_used | ||
| 423 | ); | ||
| 424 | |||
| 425 | /* Routine mach_port_kernel_object */ | ||
| 426 | #ifdef	mig_external | ||
| 427 | mig_external | ||
| 428 | #else | ||
| 429 | extern | ||
| 430 | #endif	/* mig_external */ | ||
| 431 | kern_return_t mach_port_kernel_object | ||
| 432 | ( | ||
| 433 | 	ipc_space_read_t task, | ||
| 434 | 	mach_port_name_t name, | ||
| 435 | 	unsigned *object_type, | ||
| 436 | 	unsigned *object_addr | ||
| 437 | ); | ||
| 438 | |||
| 439 | /* Routine mach_port_insert_member */ | ||
| 440 | #ifdef	mig_external | ||
| 441 | mig_external | ||
| 442 | #else | ||
| 443 | extern | ||
| 444 | #endif	/* mig_external */ | ||
| 445 | kern_return_t mach_port_insert_member | ||
| 446 | ( | ||
| 447 | 	ipc_space_t task, | ||
| 448 | 	mach_port_name_t name, | ||
| 449 | 	mach_port_name_t pset | ||
| 450 | ); | ||
| 451 | |||
| 452 | /* Routine mach_port_extract_member */ | ||
| 453 | #ifdef	mig_external | ||
| 454 | mig_external | ||
| 455 | #else | ||
| 456 | extern | ||
| 457 | #endif	/* mig_external */ | ||
| 458 | kern_return_t mach_port_extract_member | ||
| 459 | ( | ||
| 460 | 	ipc_space_t task, | ||
| 461 | 	mach_port_name_t name, | ||
| 462 | 	mach_port_name_t pset | ||
| 463 | ); | ||
| 464 | |||
| 465 | /* Routine mach_port_get_context */ | ||
| 466 | #ifdef	mig_external | ||
| 467 | mig_external | ||
| 468 | #else | ||
| 469 | extern | ||
| 470 | #endif	/* mig_external */ | ||
| 471 | kern_return_t mach_port_get_context | ||
| 472 | ( | ||
| 473 | 	ipc_space_read_t task, | ||
| 474 | 	mach_port_name_t name, | ||
| 475 | 	mach_port_context_t *context | ||
| 476 | ); | ||
| 477 | |||
| 478 | /* Routine mach_port_set_context */ | ||
| 479 | #ifdef	mig_external | ||
| 480 | mig_external | ||
| 481 | #else | ||
| 482 | extern | ||
| 483 | #endif	/* mig_external */ | ||
| 484 | kern_return_t mach_port_set_context | ||
| 485 | ( | ||
| 486 | 	ipc_space_t task, | ||
| 487 | 	mach_port_name_t name, | ||
| 488 | 	mach_port_context_t context | ||
| 489 | ); | ||
| 490 | |||
| 491 | /* Routine mach_port_kobject */ | ||
| 492 | #ifdef	mig_external | ||
| 493 | mig_external | ||
| 494 | #else | ||
| 495 | extern | ||
| 496 | #endif	/* mig_external */ | ||
| 497 | kern_return_t mach_port_kobject | ||
| 498 | ( | ||
| 499 | 	ipc_space_read_t task, | ||
| 500 | 	mach_port_name_t name, | ||
| 501 | 	natural_t *object_type, | ||
| 502 | 	mach_vm_address_t *object_addr | ||
| 503 | ); | ||
| 504 | |||
| 505 | /* Routine mach_port_construct */ | ||
| 506 | #ifdef	mig_external | ||
| 507 | mig_external | ||
| 508 | #else | ||
| 509 | extern | ||
| 510 | #endif	/* mig_external */ | ||
| 511 | kern_return_t mach_port_construct | ||
| 512 | ( | ||
| 513 | 	ipc_space_t task, | ||
| 514 | 	mach_port_options_ptr_t options, | ||
| 515 | 	mach_port_context_t context, | ||
| 516 | 	mach_port_name_t *name | ||
| 517 | ); | ||
| 518 | |||
| 519 | /* Routine mach_port_destruct */ | ||
| 520 | #ifdef	mig_external | ||
| 521 | mig_external | ||
| 522 | #else | ||
| 523 | extern | ||
| 524 | #endif	/* mig_external */ | ||
| 525 | kern_return_t mach_port_destruct | ||
| 526 | ( | ||
| 527 | 	ipc_space_t task, | ||
| 528 | 	mach_port_name_t name, | ||
| 529 | 	mach_port_delta_t srdelta, | ||
| 530 | 	mach_port_context_t guard | ||
| 531 | ); | ||
| 532 | |||
| 533 | /* Routine mach_port_guard */ | ||
| 534 | #ifdef	mig_external | ||
| 535 | mig_external | ||
| 536 | #else | ||
| 537 | extern | ||
| 538 | #endif	/* mig_external */ | ||
| 539 | kern_return_t mach_port_guard | ||
| 540 | ( | ||
| 541 | 	ipc_space_t task, | ||
| 542 | 	mach_port_name_t name, | ||
| 543 | 	mach_port_context_t guard, | ||
| 544 | 	boolean_t strict | ||
| 545 | ); | ||
| 546 | |||
| 547 | /* Routine mach_port_unguard */ | ||
| 548 | #ifdef	mig_external | ||
| 549 | mig_external | ||
| 550 | #else | ||
| 551 | extern | ||
| 552 | #endif	/* mig_external */ | ||
| 553 | kern_return_t mach_port_unguard | ||
| 554 | ( | ||
| 555 | 	ipc_space_t task, | ||
| 556 | 	mach_port_name_t name, | ||
| 557 | 	mach_port_context_t guard | ||
| 558 | ); | ||
| 559 | |||
| 560 | /* Routine mach_port_space_basic_info */ | ||
| 561 | #ifdef	mig_external | ||
| 562 | mig_external | ||
| 563 | #else | ||
| 564 | extern | ||
| 565 | #endif	/* mig_external */ | ||
| 566 | kern_return_t mach_port_space_basic_info | ||
| 567 | ( | ||
| 568 | 	ipc_space_inspect_t task, | ||
| 569 | 	ipc_info_space_basic_t *basic_info | ||
| 570 | ); | ||
| 571 | |||
| 572 | /* Routine mach_port_guard_with_flags */ | ||
| 573 | #ifdef	mig_external | ||
| 574 | mig_external | ||
| 575 | #else | ||
| 576 | extern | ||
| 577 | #endif	/* mig_external */ | ||
| 578 | kern_return_t mach_port_guard_with_flags | ||
| 579 | ( | ||
| 580 | 	ipc_space_t task, | ||
| 581 | 	mach_port_name_t name, | ||
| 582 | 	mach_port_context_t guard, | ||
| 583 | 	uint64_t flags | ||
| 584 | ); | ||
| 585 | |||
| 586 | /* Routine mach_port_swap_guard */ | ||
| 587 | #ifdef	mig_external | ||
| 588 | mig_external | ||
| 589 | #else | ||
| 590 | extern | ||
| 591 | #endif	/* mig_external */ | ||
| 592 | kern_return_t mach_port_swap_guard | ||
| 593 | ( | ||
| 594 | 	ipc_space_t task, | ||
| 595 | 	mach_port_name_t name, | ||
| 596 | 	mach_port_context_t old_guard, | ||
| 597 | 	mach_port_context_t new_guard | ||
| 598 | ); | ||
| 599 | |||
| 600 | /* Routine mach_port_kobject_description */ | ||
| 601 | #ifdef	mig_external | ||
| 602 | mig_external | ||
| 603 | #else | ||
| 604 | extern | ||
| 605 | #endif	/* mig_external */ | ||
| 606 | kern_return_t mach_port_kobject_description | ||
| 607 | ( | ||
| 608 | 	ipc_space_read_t task, | ||
| 609 | 	mach_port_name_t name, | ||
| 610 | 	natural_t *object_type, | ||
| 611 | 	mach_vm_address_t *object_addr, | ||
| 612 | 	kobject_description_t description | ||
| 613 | ); | ||
| 614 | |||
| 615 | /* Routine mach_port_is_connection_for_service */ | ||
| 616 | #ifdef	mig_external | ||
| 617 | mig_external | ||
| 618 | #else | ||
| 619 | extern | ||
| 620 | #endif	/* mig_external */ | ||
| 621 | kern_return_t mach_port_is_connection_for_service | ||
| 622 | ( | ||
| 623 | 	ipc_space_t task, | ||
| 624 | 	mach_port_name_t connection_port, | ||
| 625 | 	mach_port_name_t service_port, | ||
| 626 | 	uint64_t *filter_policy_id | ||
| 627 | ); | ||
| 628 | |||
| 629 | /* Routine mach_port_get_service_port_info */ | ||
| 630 | #ifdef	mig_external | ||
| 631 | mig_external | ||
| 632 | #else | ||
| 633 | extern | ||
| 634 | #endif	/* mig_external */ | ||
| 635 | kern_return_t mach_port_get_service_port_info | ||
| 636 | ( | ||
| 637 | 	ipc_space_read_t task, | ||
| 638 | 	mach_port_name_t name, | ||
| 639 | 	mach_service_port_info_data_t *sp_info_out | ||
| 640 | ); | ||
| 641 | |||
| 642 | /* Routine mach_port_assert_attributes */ | ||
| 643 | #ifdef	mig_external | ||
| 644 | mig_external | ||
| 645 | #else | ||
| 646 | extern | ||
| 647 | #endif	/* mig_external */ | ||
| 648 | kern_return_t mach_port_assert_attributes | ||
| 649 | ( | ||
| 650 | 	ipc_space_t task, | ||
| 651 | 	mach_port_name_t name, | ||
| 652 | 	mach_port_flavor_t flavor, | ||
| 653 | 	mach_port_info_t info, | ||
| 654 | 	mach_msg_type_number_t infoCnt | ||
| 655 | ); | ||
| 656 | |||
| 657 | __END_DECLS | ||
| 658 | |||
| 659 | /********************** Caution **************************/ | ||
| 660 | /* The following data types should be used to calculate */ | ||
| 661 | /* maximum message sizes only. The actual message may be */ | ||
| 662 | /* smaller, and the position of the arguments within the */ | ||
| 663 | /* message layout may vary from what is presented here. */ | ||
| 664 | /* For example, if any of the arguments are variable- */ | ||
| 665 | /* sized, and less than the maximum is sent, the data */ | ||
| 666 | /* will be packed tight in the actual message to reduce */ | ||
| 667 | /* the presence of holes. */ | ||
| 668 | /********************** Caution **************************/ | ||
| 669 | |||
| 670 | /* typedefs for all requests */ | ||
| 671 | |||
| 672 | #ifndef __Request__mach_port_subsystem__defined | ||
| 673 | #define __Request__mach_port_subsystem__defined | ||
| 674 | |||
| 675 | #ifdef __MigPackStructs | ||
| 676 | #pragma pack(push, 4) | ||
| 677 | #endif | ||
| 678 | 	typedef struct { | ||
| 679 | 		mach_msg_header_t Head; | ||
| 680 | 	} __Request__mach_port_names_t __attribute__((unused)); | ||
| 681 | #ifdef __MigPackStructs | ||
| 682 | #pragma pack(pop) | ||
| 683 | #endif | ||
| 684 | |||
| 685 | #ifdef __MigPackStructs | ||
| 686 | #pragma pack(push, 4) | ||
| 687 | #endif | ||
| 688 | 	typedef struct { | ||
| 689 | 		mach_msg_header_t Head; | ||
| 690 | 		NDR_record_t NDR; | ||
| 691 | 		mach_port_name_t name; | ||
| 692 | 	} __Request__mach_port_type_t __attribute__((unused)); | ||
| 693 | #ifdef __MigPackStructs | ||
| 694 | #pragma pack(pop) | ||
| 695 | #endif | ||
| 696 | |||
| 697 | #ifdef __MigPackStructs | ||
| 698 | #pragma pack(push, 4) | ||
| 699 | #endif | ||
| 700 | 	typedef struct { | ||
| 701 | 		mach_msg_header_t Head; | ||
| 702 | 		NDR_record_t NDR; | ||
| 703 | 		mach_port_name_t old_name; | ||
| 704 | 		mach_port_name_t new_name; | ||
| 705 | 	} __Request__mach_port_rename_t __attribute__((unused)); | ||
| 706 | #ifdef __MigPackStructs | ||
| 707 | #pragma pack(pop) | ||
| 708 | #endif | ||
| 709 | |||
| 710 | #ifdef __MigPackStructs | ||
| 711 | #pragma pack(push, 4) | ||
| 712 | #endif | ||
| 713 | 	typedef struct { | ||
| 714 | 		mach_msg_header_t Head; | ||
| 715 | 		NDR_record_t NDR; | ||
| 716 | 		mach_port_right_t right; | ||
| 717 | 		mach_port_name_t name; | ||
| 718 | 	} __Request__mach_port_allocate_name_t __attribute__((unused)); | ||
| 719 | #ifdef __MigPackStructs | ||
| 720 | #pragma pack(pop) | ||
| 721 | #endif | ||
| 722 | |||
| 723 | #ifdef __MigPackStructs | ||
| 724 | #pragma pack(push, 4) | ||
| 725 | #endif | ||
| 726 | 	typedef struct { | ||
| 727 | 		mach_msg_header_t Head; | ||
| 728 | 		NDR_record_t NDR; | ||
| 729 | 		mach_port_right_t right; | ||
| 730 | 	} __Request__mach_port_allocate_t __attribute__((unused)); | ||
| 731 | #ifdef __MigPackStructs | ||
| 732 | #pragma pack(pop) | ||
| 733 | #endif | ||
| 734 | |||
| 735 | #ifdef __MigPackStructs | ||
| 736 | #pragma pack(push, 4) | ||
| 737 | #endif | ||
| 738 | 	typedef struct { | ||
| 739 | 		mach_msg_header_t Head; | ||
| 740 | 		NDR_record_t NDR; | ||
| 741 | 		mach_port_name_t name; | ||
| 742 | 	} __Request__mach_port_destroy_t __attribute__((unused)); | ||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(pop) | ||
| 745 | #endif | ||
| 746 | |||
| 747 | #ifdef __MigPackStructs | ||
| 748 | #pragma pack(push, 4) | ||
| 749 | #endif | ||
| 750 | 	typedef struct { | ||
| 751 | 		mach_msg_header_t Head; | ||
| 752 | 		NDR_record_t NDR; | ||
| 753 | 		mach_port_name_t name; | ||
| 754 | 	} __Request__mach_port_deallocate_t __attribute__((unused)); | ||
| 755 | #ifdef __MigPackStructs | ||
| 756 | #pragma pack(pop) | ||
| 757 | #endif | ||
| 758 | |||
| 759 | #ifdef __MigPackStructs | ||
| 760 | #pragma pack(push, 4) | ||
| 761 | #endif | ||
| 762 | 	typedef struct { | ||
| 763 | 		mach_msg_header_t Head; | ||
| 764 | 		NDR_record_t NDR; | ||
| 765 | 		mach_port_name_t name; | ||
| 766 | 		mach_port_right_t right; | ||
| 767 | 	} __Request__mach_port_get_refs_t __attribute__((unused)); | ||
| 768 | #ifdef __MigPackStructs | ||
| 769 | #pragma pack(pop) | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #ifdef __MigPackStructs | ||
| 773 | #pragma pack(push, 4) | ||
| 774 | #endif | ||
| 775 | 	typedef struct { | ||
| 776 | 		mach_msg_header_t Head; | ||
| 777 | 		NDR_record_t NDR; | ||
| 778 | 		mach_port_name_t name; | ||
| 779 | 		mach_port_right_t right; | ||
| 780 | 		mach_port_delta_t delta; | ||
| 781 | 	} __Request__mach_port_mod_refs_t __attribute__((unused)); | ||
| 782 | #ifdef __MigPackStructs | ||
| 783 | #pragma pack(pop) | ||
| 784 | #endif | ||
| 785 | |||
| 786 | #ifdef __MigPackStructs | ||
| 787 | #pragma pack(push, 4) | ||
| 788 | #endif | ||
| 789 | 	typedef struct { | ||
| 790 | 		mach_msg_header_t Head; | ||
| 791 | 		NDR_record_t NDR; | ||
| 792 | 		mach_port_name_t name; | ||
| 793 | 		mach_msg_trailer_type_t trailer_type; | ||
| 794 | 		mach_port_seqno_t request_seqnop; | ||
| 795 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 796 | 	} __Request__mach_port_peek_t __attribute__((unused)); | ||
| 797 | #ifdef __MigPackStructs | ||
| 798 | #pragma pack(pop) | ||
| 799 | #endif | ||
| 800 | |||
| 801 | #ifdef __MigPackStructs | ||
| 802 | #pragma pack(push, 4) | ||
| 803 | #endif | ||
| 804 | 	typedef struct { | ||
| 805 | 		mach_msg_header_t Head; | ||
| 806 | 		NDR_record_t NDR; | ||
| 807 | 		mach_port_name_t name; | ||
| 808 | 		mach_port_mscount_t mscount; | ||
| 809 | 	} __Request__mach_port_set_mscount_t __attribute__((unused)); | ||
| 810 | #ifdef __MigPackStructs | ||
| 811 | #pragma pack(pop) | ||
| 812 | #endif | ||
| 813 | |||
| 814 | #ifdef __MigPackStructs | ||
| 815 | #pragma pack(push, 4) | ||
| 816 | #endif | ||
| 817 | 	typedef struct { | ||
| 818 | 		mach_msg_header_t Head; | ||
| 819 | 		NDR_record_t NDR; | ||
| 820 | 		mach_port_name_t name; | ||
| 821 | 	} __Request__mach_port_get_set_status_t __attribute__((unused)); | ||
| 822 | #ifdef __MigPackStructs | ||
| 823 | #pragma pack(pop) | ||
| 824 | #endif | ||
| 825 | |||
| 826 | #ifdef __MigPackStructs | ||
| 827 | #pragma pack(push, 4) | ||
| 828 | #endif | ||
| 829 | 	typedef struct { | ||
| 830 | 		mach_msg_header_t Head; | ||
| 831 | 		NDR_record_t NDR; | ||
| 832 | 		mach_port_name_t member; | ||
| 833 | 		mach_port_name_t after; | ||
| 834 | 	} __Request__mach_port_move_member_t __attribute__((unused)); | ||
| 835 | #ifdef __MigPackStructs | ||
| 836 | #pragma pack(pop) | ||
| 837 | #endif | ||
| 838 | |||
| 839 | #ifdef __MigPackStructs | ||
| 840 | #pragma pack(push, 4) | ||
| 841 | #endif | ||
| 842 | 	typedef struct { | ||
| 843 | 		mach_msg_header_t Head; | ||
| 844 | 		/* start of the kernel processed data */ | ||
| 845 | 		mach_msg_body_t msgh_body; | ||
| 846 | 		mach_msg_port_descriptor_t notify; | ||
| 847 | 		/* end of the kernel processed data */ | ||
| 848 | 		NDR_record_t NDR; | ||
| 849 | 		mach_port_name_t name; | ||
| 850 | 		mach_msg_id_t msgid; | ||
| 851 | 		mach_port_mscount_t sync; | ||
| 852 | 	} __Request__mach_port_request_notification_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		/* start of the kernel processed data */ | ||
| 863 | 		mach_msg_body_t msgh_body; | ||
| 864 | 		mach_msg_port_descriptor_t poly; | ||
| 865 | 		/* end of the kernel processed data */ | ||
| 866 | 		NDR_record_t NDR; | ||
| 867 | 		mach_port_name_t name; | ||
| 868 | 	} __Request__mach_port_insert_right_t __attribute__((unused)); | ||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(pop) | ||
| 871 | #endif | ||
| 872 | |||
| 873 | #ifdef __MigPackStructs | ||
| 874 | #pragma pack(push, 4) | ||
| 875 | #endif | ||
| 876 | 	typedef struct { | ||
| 877 | 		mach_msg_header_t Head; | ||
| 878 | 		NDR_record_t NDR; | ||
| 879 | 		mach_port_name_t name; | ||
| 880 | 		mach_msg_type_name_t msgt_name; | ||
| 881 | 	} __Request__mach_port_extract_right_t __attribute__((unused)); | ||
| 882 | #ifdef __MigPackStructs | ||
| 883 | #pragma pack(pop) | ||
| 884 | #endif | ||
| 885 | |||
| 886 | #ifdef __MigPackStructs | ||
| 887 | #pragma pack(push, 4) | ||
| 888 | #endif | ||
| 889 | 	typedef struct { | ||
| 890 | 		mach_msg_header_t Head; | ||
| 891 | 		NDR_record_t NDR; | ||
| 892 | 		mach_port_name_t name; | ||
| 893 | 		mach_port_seqno_t seqno; | ||
| 894 | 	} __Request__mach_port_set_seqno_t __attribute__((unused)); | ||
| 895 | #ifdef __MigPackStructs | ||
| 896 | #pragma pack(pop) | ||
| 897 | #endif | ||
| 898 | |||
| 899 | #ifdef __MigPackStructs | ||
| 900 | #pragma pack(push, 4) | ||
| 901 | #endif | ||
| 902 | 	typedef struct { | ||
| 903 | 		mach_msg_header_t Head; | ||
| 904 | 		NDR_record_t NDR; | ||
| 905 | 		mach_port_name_t name; | ||
| 906 | 		mach_port_flavor_t flavor; | ||
| 907 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 908 | 	} __Request__mach_port_get_attributes_t __attribute__((unused)); | ||
| 909 | #ifdef __MigPackStructs | ||
| 910 | #pragma pack(pop) | ||
| 911 | #endif | ||
| 912 | |||
| 913 | #ifdef __MigPackStructs | ||
| 914 | #pragma pack(push, 4) | ||
| 915 | #endif | ||
| 916 | 	typedef struct { | ||
| 917 | 		mach_msg_header_t Head; | ||
| 918 | 		NDR_record_t NDR; | ||
| 919 | 		mach_port_name_t name; | ||
| 920 | 		mach_port_flavor_t flavor; | ||
| 921 | 		mach_msg_type_number_t port_infoCnt; | ||
| 922 | 		integer_t port_info[17]; | ||
| 923 | 	} __Request__mach_port_set_attributes_t __attribute__((unused)); | ||
| 924 | #ifdef __MigPackStructs | ||
| 925 | #pragma pack(pop) | ||
| 926 | #endif | ||
| 927 | |||
| 928 | #ifdef __MigPackStructs | ||
| 929 | #pragma pack(push, 4) | ||
| 930 | #endif | ||
| 931 | 	typedef struct { | ||
| 932 | 		mach_msg_header_t Head; | ||
| 933 | 		NDR_record_t NDR; | ||
| 934 | 		mach_port_right_t right; | ||
| 935 | 		mach_port_qos_t qos; | ||
| 936 | 	} __Request__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 937 | #ifdef __MigPackStructs | ||
| 938 | #pragma pack(pop) | ||
| 939 | #endif | ||
| 940 | |||
| 941 | #ifdef __MigPackStructs | ||
| 942 | #pragma pack(push, 4) | ||
| 943 | #endif | ||
| 944 | 	typedef struct { | ||
| 945 | 		mach_msg_header_t Head; | ||
| 946 | 		/* start of the kernel processed data */ | ||
| 947 | 		mach_msg_body_t msgh_body; | ||
| 948 | 		mach_msg_port_descriptor_t proto; | ||
| 949 | 		/* end of the kernel processed data */ | ||
| 950 | 		NDR_record_t NDR; | ||
| 951 | 		mach_port_right_t right; | ||
| 952 | 		mach_port_qos_t qos; | ||
| 953 | 		mach_port_name_t name; | ||
| 954 | 	} __Request__mach_port_allocate_full_t __attribute__((unused)); | ||
| 955 | #ifdef __MigPackStructs | ||
| 956 | #pragma pack(pop) | ||
| 957 | #endif | ||
| 958 | |||
| 959 | #ifdef __MigPackStructs | ||
| 960 | #pragma pack(push, 4) | ||
| 961 | #endif | ||
| 962 | 	typedef struct { | ||
| 963 | 		mach_msg_header_t Head; | ||
| 964 | 		NDR_record_t NDR; | ||
| 965 | 		int table_entries; | ||
| 966 | 	} __Request__task_set_port_space_t __attribute__((unused)); | ||
| 967 | #ifdef __MigPackStructs | ||
| 968 | #pragma pack(pop) | ||
| 969 | #endif | ||
| 970 | |||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(push, 4) | ||
| 973 | #endif | ||
| 974 | 	typedef struct { | ||
| 975 | 		mach_msg_header_t Head; | ||
| 976 | 		NDR_record_t NDR; | ||
| 977 | 		mach_port_name_t name; | ||
| 978 | 	} __Request__mach_port_get_srights_t __attribute__((unused)); | ||
| 979 | #ifdef __MigPackStructs | ||
| 980 | #pragma pack(pop) | ||
| 981 | #endif | ||
| 982 | |||
| 983 | #ifdef __MigPackStructs | ||
| 984 | #pragma pack(push, 4) | ||
| 985 | #endif | ||
| 986 | 	typedef struct { | ||
| 987 | 		mach_msg_header_t Head; | ||
| 988 | 	} __Request__mach_port_space_info_t __attribute__((unused)); | ||
| 989 | #ifdef __MigPackStructs | ||
| 990 | #pragma pack(pop) | ||
| 991 | #endif | ||
| 992 | |||
| 993 | #ifdef __MigPackStructs | ||
| 994 | #pragma pack(push, 4) | ||
| 995 | #endif | ||
| 996 | 	typedef struct { | ||
| 997 | 		mach_msg_header_t Head; | ||
| 998 | 		NDR_record_t NDR; | ||
| 999 | 		mach_port_name_t name; | ||
| 1000 | 	} __Request__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 1001 | #ifdef __MigPackStructs | ||
| 1002 | #pragma pack(pop) | ||
| 1003 | #endif | ||
| 1004 | |||
| 1005 | #ifdef __MigPackStructs | ||
| 1006 | #pragma pack(push, 4) | ||
| 1007 | #endif | ||
| 1008 | 	typedef struct { | ||
| 1009 | 		mach_msg_header_t Head; | ||
| 1010 | 		NDR_record_t NDR; | ||
| 1011 | 		mach_port_name_t name; | ||
| 1012 | 	} __Request__mach_port_kernel_object_t __attribute__((unused)); | ||
| 1013 | #ifdef __MigPackStructs | ||
| 1014 | #pragma pack(pop) | ||
| 1015 | #endif | ||
| 1016 | |||
| 1017 | #ifdef __MigPackStructs | ||
| 1018 | #pragma pack(push, 4) | ||
| 1019 | #endif | ||
| 1020 | 	typedef struct { | ||
| 1021 | 		mach_msg_header_t Head; | ||
| 1022 | 		NDR_record_t NDR; | ||
| 1023 | 		mach_port_name_t name; | ||
| 1024 | 		mach_port_name_t pset; | ||
| 1025 | 	} __Request__mach_port_insert_member_t __attribute__((unused)); | ||
| 1026 | #ifdef __MigPackStructs | ||
| 1027 | #pragma pack(pop) | ||
| 1028 | #endif | ||
| 1029 | |||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(push, 4) | ||
| 1032 | #endif | ||
| 1033 | 	typedef struct { | ||
| 1034 | 		mach_msg_header_t Head; | ||
| 1035 | 		NDR_record_t NDR; | ||
| 1036 | 		mach_port_name_t name; | ||
| 1037 | 		mach_port_name_t pset; | ||
| 1038 | 	} __Request__mach_port_extract_member_t __attribute__((unused)); | ||
| 1039 | #ifdef __MigPackStructs | ||
| 1040 | #pragma pack(pop) | ||
| 1041 | #endif | ||
| 1042 | |||
| 1043 | #ifdef __MigPackStructs | ||
| 1044 | #pragma pack(push, 4) | ||
| 1045 | #endif | ||
| 1046 | 	typedef struct { | ||
| 1047 | 		mach_msg_header_t Head; | ||
| 1048 | 		NDR_record_t NDR; | ||
| 1049 | 		mach_port_name_t name; | ||
| 1050 | 	} __Request__mach_port_get_context_t __attribute__((unused)); | ||
| 1051 | #ifdef __MigPackStructs | ||
| 1052 | #pragma pack(pop) | ||
| 1053 | #endif | ||
| 1054 | |||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(push, 4) | ||
| 1057 | #endif | ||
| 1058 | 	typedef struct { | ||
| 1059 | 		mach_msg_header_t Head; | ||
| 1060 | 		NDR_record_t NDR; | ||
| 1061 | 		mach_port_name_t name; | ||
| 1062 | 		mach_port_context_t context; | ||
| 1063 | 	} __Request__mach_port_set_context_t __attribute__((unused)); | ||
| 1064 | #ifdef __MigPackStructs | ||
| 1065 | #pragma pack(pop) | ||
| 1066 | #endif | ||
| 1067 | |||
| 1068 | #ifdef __MigPackStructs | ||
| 1069 | #pragma pack(push, 4) | ||
| 1070 | #endif | ||
| 1071 | 	typedef struct { | ||
| 1072 | 		mach_msg_header_t Head; | ||
| 1073 | 		NDR_record_t NDR; | ||
| 1074 | 		mach_port_name_t name; | ||
| 1075 | 	} __Request__mach_port_kobject_t __attribute__((unused)); | ||
| 1076 | #ifdef __MigPackStructs | ||
| 1077 | #pragma pack(pop) | ||
| 1078 | #endif | ||
| 1079 | |||
| 1080 | #ifdef __MigPackStructs | ||
| 1081 | #pragma pack(push, 4) | ||
| 1082 | #endif | ||
| 1083 | 	typedef struct { | ||
| 1084 | 		mach_msg_header_t Head; | ||
| 1085 | 		/* start of the kernel processed data */ | ||
| 1086 | 		mach_msg_body_t msgh_body; | ||
| 1087 | 		mach_msg_ool_descriptor_t options; | ||
| 1088 | 		/* end of the kernel processed data */ | ||
| 1089 | 		NDR_record_t NDR; | ||
| 1090 | 		mach_port_context_t context; | ||
| 1091 | 	} __Request__mach_port_construct_t __attribute__((unused)); | ||
| 1092 | #ifdef __MigPackStructs | ||
| 1093 | #pragma pack(pop) | ||
| 1094 | #endif | ||
| 1095 | |||
| 1096 | #ifdef __MigPackStructs | ||
| 1097 | #pragma pack(push, 4) | ||
| 1098 | #endif | ||
| 1099 | 	typedef struct { | ||
| 1100 | 		mach_msg_header_t Head; | ||
| 1101 | 		NDR_record_t NDR; | ||
| 1102 | 		mach_port_name_t name; | ||
| 1103 | 		mach_port_delta_t srdelta; | ||
| 1104 | 		mach_port_context_t guard; | ||
| 1105 | 	} __Request__mach_port_destruct_t __attribute__((unused)); | ||
| 1106 | #ifdef __MigPackStructs | ||
| 1107 | #pragma pack(pop) | ||
| 1108 | #endif | ||
| 1109 | |||
| 1110 | #ifdef __MigPackStructs | ||
| 1111 | #pragma pack(push, 4) | ||
| 1112 | #endif | ||
| 1113 | 	typedef struct { | ||
| 1114 | 		mach_msg_header_t Head; | ||
| 1115 | 		NDR_record_t NDR; | ||
| 1116 | 		mach_port_name_t name; | ||
| 1117 | 		mach_port_context_t guard; | ||
| 1118 | 		boolean_t strict; | ||
| 1119 | 	} __Request__mach_port_guard_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		mach_port_name_t name; | ||
| 1131 | 		mach_port_context_t guard; | ||
| 1132 | 	} __Request__mach_port_unguard_t __attribute__((unused)); | ||
| 1133 | #ifdef __MigPackStructs | ||
| 1134 | #pragma pack(pop) | ||
| 1135 | #endif | ||
| 1136 | |||
| 1137 | #ifdef __MigPackStructs | ||
| 1138 | #pragma pack(push, 4) | ||
| 1139 | #endif | ||
| 1140 | 	typedef struct { | ||
| 1141 | 		mach_msg_header_t Head; | ||
| 1142 | 	} __Request__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1143 | #ifdef __MigPackStructs | ||
| 1144 | #pragma pack(pop) | ||
| 1145 | #endif | ||
| 1146 | |||
| 1147 | #ifdef __MigPackStructs | ||
| 1148 | #pragma pack(push, 4) | ||
| 1149 | #endif | ||
| 1150 | 	typedef struct { | ||
| 1151 | 		mach_msg_header_t Head; | ||
| 1152 | 		NDR_record_t NDR; | ||
| 1153 | 		mach_port_name_t name; | ||
| 1154 | 		mach_port_context_t guard; | ||
| 1155 | 		uint64_t flags; | ||
| 1156 | 	} __Request__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1157 | #ifdef __MigPackStructs | ||
| 1158 | #pragma pack(pop) | ||
| 1159 | #endif | ||
| 1160 | |||
| 1161 | #ifdef __MigPackStructs | ||
| 1162 | #pragma pack(push, 4) | ||
| 1163 | #endif | ||
| 1164 | 	typedef struct { | ||
| 1165 | 		mach_msg_header_t Head; | ||
| 1166 | 		NDR_record_t NDR; | ||
| 1167 | 		mach_port_name_t name; | ||
| 1168 | 		mach_port_context_t old_guard; | ||
| 1169 | 		mach_port_context_t new_guard; | ||
| 1170 | 	} __Request__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1171 | #ifdef __MigPackStructs | ||
| 1172 | #pragma pack(pop) | ||
| 1173 | #endif | ||
| 1174 | |||
| 1175 | #ifdef __MigPackStructs | ||
| 1176 | #pragma pack(push, 4) | ||
| 1177 | #endif | ||
| 1178 | 	typedef struct { | ||
| 1179 | 		mach_msg_header_t Head; | ||
| 1180 | 		NDR_record_t NDR; | ||
| 1181 | 		mach_port_name_t name; | ||
| 1182 | 	} __Request__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1183 | #ifdef __MigPackStructs | ||
| 1184 | #pragma pack(pop) | ||
| 1185 | #endif | ||
| 1186 | |||
| 1187 | #ifdef __MigPackStructs | ||
| 1188 | #pragma pack(push, 4) | ||
| 1189 | #endif | ||
| 1190 | 	typedef struct { | ||
| 1191 | 		mach_msg_header_t Head; | ||
| 1192 | 		NDR_record_t NDR; | ||
| 1193 | 		mach_port_name_t connection_port; | ||
| 1194 | 		mach_port_name_t service_port; | ||
| 1195 | 	} __Request__mach_port_is_connection_for_service_t __attribute__((unused)); | ||
| 1196 | #ifdef __MigPackStructs | ||
| 1197 | #pragma pack(pop) | ||
| 1198 | #endif | ||
| 1199 | |||
| 1200 | #ifdef __MigPackStructs | ||
| 1201 | #pragma pack(push, 4) | ||
| 1202 | #endif | ||
| 1203 | 	typedef struct { | ||
| 1204 | 		mach_msg_header_t Head; | ||
| 1205 | 		NDR_record_t NDR; | ||
| 1206 | 		mach_port_name_t name; | ||
| 1207 | 	} __Request__mach_port_get_service_port_info_t __attribute__((unused)); | ||
| 1208 | #ifdef __MigPackStructs | ||
| 1209 | #pragma pack(pop) | ||
| 1210 | #endif | ||
| 1211 | |||
| 1212 | #ifdef __MigPackStructs | ||
| 1213 | #pragma pack(push, 4) | ||
| 1214 | #endif | ||
| 1215 | 	typedef struct { | ||
| 1216 | 		mach_msg_header_t Head; | ||
| 1217 | 		NDR_record_t NDR; | ||
| 1218 | 		mach_port_name_t name; | ||
| 1219 | 		mach_port_flavor_t flavor; | ||
| 1220 | 		mach_msg_type_number_t infoCnt; | ||
| 1221 | 		integer_t info[17]; | ||
| 1222 | 	} __Request__mach_port_assert_attributes_t __attribute__((unused)); | ||
| 1223 | #ifdef __MigPackStructs | ||
| 1224 | #pragma pack(pop) | ||
| 1225 | #endif | ||
| 1226 | #endif /* !__Request__mach_port_subsystem__defined */ | ||
| 1227 | |||
| 1228 | /* union of all requests */ | ||
| 1229 | |||
| 1230 | #ifndef __RequestUnion__mach_port_subsystem__defined | ||
| 1231 | #define __RequestUnion__mach_port_subsystem__defined | ||
| 1232 | union __RequestUnion__mach_port_subsystem { | ||
| 1233 | 	__Request__mach_port_names_t Request_mach_port_names; | ||
| 1234 | 	__Request__mach_port_type_t Request_mach_port_type; | ||
| 1235 | 	__Request__mach_port_rename_t Request_mach_port_rename; | ||
| 1236 | 	__Request__mach_port_allocate_name_t Request_mach_port_allocate_name; | ||
| 1237 | 	__Request__mach_port_allocate_t Request_mach_port_allocate; | ||
| 1238 | 	__Request__mach_port_destroy_t Request_mach_port_destroy; | ||
| 1239 | 	__Request__mach_port_deallocate_t Request_mach_port_deallocate; | ||
| 1240 | 	__Request__mach_port_get_refs_t Request_mach_port_get_refs; | ||
| 1241 | 	__Request__mach_port_mod_refs_t Request_mach_port_mod_refs; | ||
| 1242 | 	__Request__mach_port_peek_t Request_mach_port_peek; | ||
| 1243 | 	__Request__mach_port_set_mscount_t Request_mach_port_set_mscount; | ||
| 1244 | 	__Request__mach_port_get_set_status_t Request_mach_port_get_set_status; | ||
| 1245 | 	__Request__mach_port_move_member_t Request_mach_port_move_member; | ||
| 1246 | 	__Request__mach_port_request_notification_t Request_mach_port_request_notification; | ||
| 1247 | 	__Request__mach_port_insert_right_t Request_mach_port_insert_right; | ||
| 1248 | 	__Request__mach_port_extract_right_t Request_mach_port_extract_right; | ||
| 1249 | 	__Request__mach_port_set_seqno_t Request_mach_port_set_seqno; | ||
| 1250 | 	__Request__mach_port_get_attributes_t Request_mach_port_get_attributes; | ||
| 1251 | 	__Request__mach_port_set_attributes_t Request_mach_port_set_attributes; | ||
| 1252 | 	__Request__mach_port_allocate_qos_t Request_mach_port_allocate_qos; | ||
| 1253 | 	__Request__mach_port_allocate_full_t Request_mach_port_allocate_full; | ||
| 1254 | 	__Request__task_set_port_space_t Request_task_set_port_space; | ||
| 1255 | 	__Request__mach_port_get_srights_t Request_mach_port_get_srights; | ||
| 1256 | 	__Request__mach_port_space_info_t Request_mach_port_space_info; | ||
| 1257 | 	__Request__mach_port_dnrequest_info_t Request_mach_port_dnrequest_info; | ||
| 1258 | 	__Request__mach_port_kernel_object_t Request_mach_port_kernel_object; | ||
| 1259 | 	__Request__mach_port_insert_member_t Request_mach_port_insert_member; | ||
| 1260 | 	__Request__mach_port_extract_member_t Request_mach_port_extract_member; | ||
| 1261 | 	__Request__mach_port_get_context_t Request_mach_port_get_context; | ||
| 1262 | 	__Request__mach_port_set_context_t Request_mach_port_set_context; | ||
| 1263 | 	__Request__mach_port_kobject_t Request_mach_port_kobject; | ||
| 1264 | 	__Request__mach_port_construct_t Request_mach_port_construct; | ||
| 1265 | 	__Request__mach_port_destruct_t Request_mach_port_destruct; | ||
| 1266 | 	__Request__mach_port_guard_t Request_mach_port_guard; | ||
| 1267 | 	__Request__mach_port_unguard_t Request_mach_port_unguard; | ||
| 1268 | 	__Request__mach_port_space_basic_info_t Request_mach_port_space_basic_info; | ||
| 1269 | 	__Request__mach_port_guard_with_flags_t Request_mach_port_guard_with_flags; | ||
| 1270 | 	__Request__mach_port_swap_guard_t Request_mach_port_swap_guard; | ||
| 1271 | 	__Request__mach_port_kobject_description_t Request_mach_port_kobject_description; | ||
| 1272 | 	__Request__mach_port_is_connection_for_service_t Request_mach_port_is_connection_for_service; | ||
| 1273 | 	__Request__mach_port_get_service_port_info_t Request_mach_port_get_service_port_info; | ||
| 1274 | 	__Request__mach_port_assert_attributes_t Request_mach_port_assert_attributes; | ||
| 1275 | }; | ||
| 1276 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1277 | /* typedefs for all replies */ | ||
| 1278 | |||
| 1279 | #ifndef __Reply__mach_port_subsystem__defined | ||
| 1280 | #define __Reply__mach_port_subsystem__defined | ||
| 1281 | |||
| 1282 | #ifdef __MigPackStructs | ||
| 1283 | #pragma pack(push, 4) | ||
| 1284 | #endif | ||
| 1285 | 	typedef struct { | ||
| 1286 | 		mach_msg_header_t Head; | ||
| 1287 | 		/* start of the kernel processed data */ | ||
| 1288 | 		mach_msg_body_t msgh_body; | ||
| 1289 | 		mach_msg_ool_descriptor_t names; | ||
| 1290 | 		mach_msg_ool_descriptor_t types; | ||
| 1291 | 		/* end of the kernel processed data */ | ||
| 1292 | 		NDR_record_t NDR; | ||
| 1293 | 		mach_msg_type_number_t namesCnt; | ||
| 1294 | 		mach_msg_type_number_t typesCnt; | ||
| 1295 | 	} __Reply__mach_port_names_t __attribute__((unused)); | ||
| 1296 | #ifdef __MigPackStructs | ||
| 1297 | #pragma pack(pop) | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | #ifdef __MigPackStructs | ||
| 1301 | #pragma pack(push, 4) | ||
| 1302 | #endif | ||
| 1303 | 	typedef struct { | ||
| 1304 | 		mach_msg_header_t Head; | ||
| 1305 | 		NDR_record_t NDR; | ||
| 1306 | 		kern_return_t RetCode; | ||
| 1307 | 		mach_port_type_t ptype; | ||
| 1308 | 	} __Reply__mach_port_type_t __attribute__((unused)); | ||
| 1309 | #ifdef __MigPackStructs | ||
| 1310 | #pragma pack(pop) | ||
| 1311 | #endif | ||
| 1312 | |||
| 1313 | #ifdef __MigPackStructs | ||
| 1314 | #pragma pack(push, 4) | ||
| 1315 | #endif | ||
| 1316 | 	typedef struct { | ||
| 1317 | 		mach_msg_header_t Head; | ||
| 1318 | 		NDR_record_t NDR; | ||
| 1319 | 		kern_return_t RetCode; | ||
| 1320 | 	} __Reply__mach_port_rename_t __attribute__((unused)); | ||
| 1321 | #ifdef __MigPackStructs | ||
| 1322 | #pragma pack(pop) | ||
| 1323 | #endif | ||
| 1324 | |||
| 1325 | #ifdef __MigPackStructs | ||
| 1326 | #pragma pack(push, 4) | ||
| 1327 | #endif | ||
| 1328 | 	typedef struct { | ||
| 1329 | 		mach_msg_header_t Head; | ||
| 1330 | 		NDR_record_t NDR; | ||
| 1331 | 		kern_return_t RetCode; | ||
| 1332 | 	} __Reply__mach_port_allocate_name_t __attribute__((unused)); | ||
| 1333 | #ifdef __MigPackStructs | ||
| 1334 | #pragma pack(pop) | ||
| 1335 | #endif | ||
| 1336 | |||
| 1337 | #ifdef __MigPackStructs | ||
| 1338 | #pragma pack(push, 4) | ||
| 1339 | #endif | ||
| 1340 | 	typedef struct { | ||
| 1341 | 		mach_msg_header_t Head; | ||
| 1342 | 		NDR_record_t NDR; | ||
| 1343 | 		kern_return_t RetCode; | ||
| 1344 | 		mach_port_name_t name; | ||
| 1345 | 	} __Reply__mach_port_allocate_t __attribute__((unused)); | ||
| 1346 | #ifdef __MigPackStructs | ||
| 1347 | #pragma pack(pop) | ||
| 1348 | #endif | ||
| 1349 | |||
| 1350 | #ifdef __MigPackStructs | ||
| 1351 | #pragma pack(push, 4) | ||
| 1352 | #endif | ||
| 1353 | 	typedef struct { | ||
| 1354 | 		mach_msg_header_t Head; | ||
| 1355 | 		NDR_record_t NDR; | ||
| 1356 | 		kern_return_t RetCode; | ||
| 1357 | 	} __Reply__mach_port_destroy_t __attribute__((unused)); | ||
| 1358 | #ifdef __MigPackStructs | ||
| 1359 | #pragma pack(pop) | ||
| 1360 | #endif | ||
| 1361 | |||
| 1362 | #ifdef __MigPackStructs | ||
| 1363 | #pragma pack(push, 4) | ||
| 1364 | #endif | ||
| 1365 | 	typedef struct { | ||
| 1366 | 		mach_msg_header_t Head; | ||
| 1367 | 		NDR_record_t NDR; | ||
| 1368 | 		kern_return_t RetCode; | ||
| 1369 | 	} __Reply__mach_port_deallocate_t __attribute__((unused)); | ||
| 1370 | #ifdef __MigPackStructs | ||
| 1371 | #pragma pack(pop) | ||
| 1372 | #endif | ||
| 1373 | |||
| 1374 | #ifdef __MigPackStructs | ||
| 1375 | #pragma pack(push, 4) | ||
| 1376 | #endif | ||
| 1377 | 	typedef struct { | ||
| 1378 | 		mach_msg_header_t Head; | ||
| 1379 | 		NDR_record_t NDR; | ||
| 1380 | 		kern_return_t RetCode; | ||
| 1381 | 		mach_port_urefs_t refs; | ||
| 1382 | 	} __Reply__mach_port_get_refs_t __attribute__((unused)); | ||
| 1383 | #ifdef __MigPackStructs | ||
| 1384 | #pragma pack(pop) | ||
| 1385 | #endif | ||
| 1386 | |||
| 1387 | #ifdef __MigPackStructs | ||
| 1388 | #pragma pack(push, 4) | ||
| 1389 | #endif | ||
| 1390 | 	typedef struct { | ||
| 1391 | 		mach_msg_header_t Head; | ||
| 1392 | 		NDR_record_t NDR; | ||
| 1393 | 		kern_return_t RetCode; | ||
| 1394 | 	} __Reply__mach_port_mod_refs_t __attribute__((unused)); | ||
| 1395 | #ifdef __MigPackStructs | ||
| 1396 | #pragma pack(pop) | ||
| 1397 | #endif | ||
| 1398 | |||
| 1399 | #ifdef __MigPackStructs | ||
| 1400 | #pragma pack(push, 4) | ||
| 1401 | #endif | ||
| 1402 | 	typedef struct { | ||
| 1403 | 		mach_msg_header_t Head; | ||
| 1404 | 		NDR_record_t NDR; | ||
| 1405 | 		kern_return_t RetCode; | ||
| 1406 | 		mach_port_seqno_t request_seqnop; | ||
| 1407 | 		mach_msg_size_t msg_sizep; | ||
| 1408 | 		mach_msg_id_t msg_idp; | ||
| 1409 | 		mach_msg_type_number_t trailer_infopCnt; | ||
| 1410 | 		char trailer_infop[68]; | ||
| 1411 | 	} __Reply__mach_port_peek_t __attribute__((unused)); | ||
| 1412 | #ifdef __MigPackStructs | ||
| 1413 | #pragma pack(pop) | ||
| 1414 | #endif | ||
| 1415 | |||
| 1416 | #ifdef __MigPackStructs | ||
| 1417 | #pragma pack(push, 4) | ||
| 1418 | #endif | ||
| 1419 | 	typedef struct { | ||
| 1420 | 		mach_msg_header_t Head; | ||
| 1421 | 		NDR_record_t NDR; | ||
| 1422 | 		kern_return_t RetCode; | ||
| 1423 | 	} __Reply__mach_port_set_mscount_t __attribute__((unused)); | ||
| 1424 | #ifdef __MigPackStructs | ||
| 1425 | #pragma pack(pop) | ||
| 1426 | #endif | ||
| 1427 | |||
| 1428 | #ifdef __MigPackStructs | ||
| 1429 | #pragma pack(push, 4) | ||
| 1430 | #endif | ||
| 1431 | 	typedef struct { | ||
| 1432 | 		mach_msg_header_t Head; | ||
| 1433 | 		/* start of the kernel processed data */ | ||
| 1434 | 		mach_msg_body_t msgh_body; | ||
| 1435 | 		mach_msg_ool_descriptor_t members; | ||
| 1436 | 		/* end of the kernel processed data */ | ||
| 1437 | 		NDR_record_t NDR; | ||
| 1438 | 		mach_msg_type_number_t membersCnt; | ||
| 1439 | 	} __Reply__mach_port_get_set_status_t __attribute__((unused)); | ||
| 1440 | #ifdef __MigPackStructs | ||
| 1441 | #pragma pack(pop) | ||
| 1442 | #endif | ||
| 1443 | |||
| 1444 | #ifdef __MigPackStructs | ||
| 1445 | #pragma pack(push, 4) | ||
| 1446 | #endif | ||
| 1447 | 	typedef struct { | ||
| 1448 | 		mach_msg_header_t Head; | ||
| 1449 | 		NDR_record_t NDR; | ||
| 1450 | 		kern_return_t RetCode; | ||
| 1451 | 	} __Reply__mach_port_move_member_t __attribute__((unused)); | ||
| 1452 | #ifdef __MigPackStructs | ||
| 1453 | #pragma pack(pop) | ||
| 1454 | #endif | ||
| 1455 | |||
| 1456 | #ifdef __MigPackStructs | ||
| 1457 | #pragma pack(push, 4) | ||
| 1458 | #endif | ||
| 1459 | 	typedef struct { | ||
| 1460 | 		mach_msg_header_t Head; | ||
| 1461 | 		/* start of the kernel processed data */ | ||
| 1462 | 		mach_msg_body_t msgh_body; | ||
| 1463 | 		mach_msg_port_descriptor_t previous; | ||
| 1464 | 		/* end of the kernel processed data */ | ||
| 1465 | 	} __Reply__mach_port_request_notification_t __attribute__((unused)); | ||
| 1466 | #ifdef __MigPackStructs | ||
| 1467 | #pragma pack(pop) | ||
| 1468 | #endif | ||
| 1469 | |||
| 1470 | #ifdef __MigPackStructs | ||
| 1471 | #pragma pack(push, 4) | ||
| 1472 | #endif | ||
| 1473 | 	typedef struct { | ||
| 1474 | 		mach_msg_header_t Head; | ||
| 1475 | 		NDR_record_t NDR; | ||
| 1476 | 		kern_return_t RetCode; | ||
| 1477 | 	} __Reply__mach_port_insert_right_t __attribute__((unused)); | ||
| 1478 | #ifdef __MigPackStructs | ||
| 1479 | #pragma pack(pop) | ||
| 1480 | #endif | ||
| 1481 | |||
| 1482 | #ifdef __MigPackStructs | ||
| 1483 | #pragma pack(push, 4) | ||
| 1484 | #endif | ||
| 1485 | 	typedef struct { | ||
| 1486 | 		mach_msg_header_t Head; | ||
| 1487 | 		/* start of the kernel processed data */ | ||
| 1488 | 		mach_msg_body_t msgh_body; | ||
| 1489 | 		mach_msg_port_descriptor_t poly; | ||
| 1490 | 		/* end of the kernel processed data */ | ||
| 1491 | 	} __Reply__mach_port_extract_right_t __attribute__((unused)); | ||
| 1492 | #ifdef __MigPackStructs | ||
| 1493 | #pragma pack(pop) | ||
| 1494 | #endif | ||
| 1495 | |||
| 1496 | #ifdef __MigPackStructs | ||
| 1497 | #pragma pack(push, 4) | ||
| 1498 | #endif | ||
| 1499 | 	typedef struct { | ||
| 1500 | 		mach_msg_header_t Head; | ||
| 1501 | 		NDR_record_t NDR; | ||
| 1502 | 		kern_return_t RetCode; | ||
| 1503 | 	} __Reply__mach_port_set_seqno_t __attribute__((unused)); | ||
| 1504 | #ifdef __MigPackStructs | ||
| 1505 | #pragma pack(pop) | ||
| 1506 | #endif | ||
| 1507 | |||
| 1508 | #ifdef __MigPackStructs | ||
| 1509 | #pragma pack(push, 4) | ||
| 1510 | #endif | ||
| 1511 | 	typedef struct { | ||
| 1512 | 		mach_msg_header_t Head; | ||
| 1513 | 		NDR_record_t NDR; | ||
| 1514 | 		kern_return_t RetCode; | ||
| 1515 | 		mach_msg_type_number_t port_info_outCnt; | ||
| 1516 | 		integer_t port_info_out[17]; | ||
| 1517 | 	} __Reply__mach_port_get_attributes_t __attribute__((unused)); | ||
| 1518 | #ifdef __MigPackStructs | ||
| 1519 | #pragma pack(pop) | ||
| 1520 | #endif | ||
| 1521 | |||
| 1522 | #ifdef __MigPackStructs | ||
| 1523 | #pragma pack(push, 4) | ||
| 1524 | #endif | ||
| 1525 | 	typedef struct { | ||
| 1526 | 		mach_msg_header_t Head; | ||
| 1527 | 		NDR_record_t NDR; | ||
| 1528 | 		kern_return_t RetCode; | ||
| 1529 | 	} __Reply__mach_port_set_attributes_t __attribute__((unused)); | ||
| 1530 | #ifdef __MigPackStructs | ||
| 1531 | #pragma pack(pop) | ||
| 1532 | #endif | ||
| 1533 | |||
| 1534 | #ifdef __MigPackStructs | ||
| 1535 | #pragma pack(push, 4) | ||
| 1536 | #endif | ||
| 1537 | 	typedef struct { | ||
| 1538 | 		mach_msg_header_t Head; | ||
| 1539 | 		NDR_record_t NDR; | ||
| 1540 | 		kern_return_t RetCode; | ||
| 1541 | 		mach_port_qos_t qos; | ||
| 1542 | 		mach_port_name_t name; | ||
| 1543 | 	} __Reply__mach_port_allocate_qos_t __attribute__((unused)); | ||
| 1544 | #ifdef __MigPackStructs | ||
| 1545 | #pragma pack(pop) | ||
| 1546 | #endif | ||
| 1547 | |||
| 1548 | #ifdef __MigPackStructs | ||
| 1549 | #pragma pack(push, 4) | ||
| 1550 | #endif | ||
| 1551 | 	typedef struct { | ||
| 1552 | 		mach_msg_header_t Head; | ||
| 1553 | 		NDR_record_t NDR; | ||
| 1554 | 		kern_return_t RetCode; | ||
| 1555 | 		mach_port_qos_t qos; | ||
| 1556 | 		mach_port_name_t name; | ||
| 1557 | 	} __Reply__mach_port_allocate_full_t __attribute__((unused)); | ||
| 1558 | #ifdef __MigPackStructs | ||
| 1559 | #pragma pack(pop) | ||
| 1560 | #endif | ||
| 1561 | |||
| 1562 | #ifdef __MigPackStructs | ||
| 1563 | #pragma pack(push, 4) | ||
| 1564 | #endif | ||
| 1565 | 	typedef struct { | ||
| 1566 | 		mach_msg_header_t Head; | ||
| 1567 | 		NDR_record_t NDR; | ||
| 1568 | 		kern_return_t RetCode; | ||
| 1569 | 	} __Reply__task_set_port_space_t __attribute__((unused)); | ||
| 1570 | #ifdef __MigPackStructs | ||
| 1571 | #pragma pack(pop) | ||
| 1572 | #endif | ||
| 1573 | |||
| 1574 | #ifdef __MigPackStructs | ||
| 1575 | #pragma pack(push, 4) | ||
| 1576 | #endif | ||
| 1577 | 	typedef struct { | ||
| 1578 | 		mach_msg_header_t Head; | ||
| 1579 | 		NDR_record_t NDR; | ||
| 1580 | 		kern_return_t RetCode; | ||
| 1581 | 		mach_port_rights_t srights; | ||
| 1582 | 	} __Reply__mach_port_get_srights_t __attribute__((unused)); | ||
| 1583 | #ifdef __MigPackStructs | ||
| 1584 | #pragma pack(pop) | ||
| 1585 | #endif | ||
| 1586 | |||
| 1587 | #ifdef __MigPackStructs | ||
| 1588 | #pragma pack(push, 4) | ||
| 1589 | #endif | ||
| 1590 | 	typedef struct { | ||
| 1591 | 		mach_msg_header_t Head; | ||
| 1592 | 		/* start of the kernel processed data */ | ||
| 1593 | 		mach_msg_body_t msgh_body; | ||
| 1594 | 		mach_msg_ool_descriptor_t table_info; | ||
| 1595 | 		mach_msg_ool_descriptor_t tree_info; | ||
| 1596 | 		/* end of the kernel processed data */ | ||
| 1597 | 		NDR_record_t NDR; | ||
| 1598 | 		ipc_info_space_t space_info; | ||
| 1599 | 		mach_msg_type_number_t table_infoCnt; | ||
| 1600 | 		mach_msg_type_number_t tree_infoCnt; | ||
| 1601 | 	} __Reply__mach_port_space_info_t __attribute__((unused)); | ||
| 1602 | #ifdef __MigPackStructs | ||
| 1603 | #pragma pack(pop) | ||
| 1604 | #endif | ||
| 1605 | |||
| 1606 | #ifdef __MigPackStructs | ||
| 1607 | #pragma pack(push, 4) | ||
| 1608 | #endif | ||
| 1609 | 	typedef struct { | ||
| 1610 | 		mach_msg_header_t Head; | ||
| 1611 | 		NDR_record_t NDR; | ||
| 1612 | 		kern_return_t RetCode; | ||
| 1613 | 		unsigned dnr_total; | ||
| 1614 | 		unsigned dnr_used; | ||
| 1615 | 	} __Reply__mach_port_dnrequest_info_t __attribute__((unused)); | ||
| 1616 | #ifdef __MigPackStructs | ||
| 1617 | #pragma pack(pop) | ||
| 1618 | #endif | ||
| 1619 | |||
| 1620 | #ifdef __MigPackStructs | ||
| 1621 | #pragma pack(push, 4) | ||
| 1622 | #endif | ||
| 1623 | 	typedef struct { | ||
| 1624 | 		mach_msg_header_t Head; | ||
| 1625 | 		NDR_record_t NDR; | ||
| 1626 | 		kern_return_t RetCode; | ||
| 1627 | 		unsigned object_type; | ||
| 1628 | 		unsigned object_addr; | ||
| 1629 | 	} __Reply__mach_port_kernel_object_t __attribute__((unused)); | ||
| 1630 | #ifdef __MigPackStructs | ||
| 1631 | #pragma pack(pop) | ||
| 1632 | #endif | ||
| 1633 | |||
| 1634 | #ifdef __MigPackStructs | ||
| 1635 | #pragma pack(push, 4) | ||
| 1636 | #endif | ||
| 1637 | 	typedef struct { | ||
| 1638 | 		mach_msg_header_t Head; | ||
| 1639 | 		NDR_record_t NDR; | ||
| 1640 | 		kern_return_t RetCode; | ||
| 1641 | 	} __Reply__mach_port_insert_member_t __attribute__((unused)); | ||
| 1642 | #ifdef __MigPackStructs | ||
| 1643 | #pragma pack(pop) | ||
| 1644 | #endif | ||
| 1645 | |||
| 1646 | #ifdef __MigPackStructs | ||
| 1647 | #pragma pack(push, 4) | ||
| 1648 | #endif | ||
| 1649 | 	typedef struct { | ||
| 1650 | 		mach_msg_header_t Head; | ||
| 1651 | 		NDR_record_t NDR; | ||
| 1652 | 		kern_return_t RetCode; | ||
| 1653 | 	} __Reply__mach_port_extract_member_t __attribute__((unused)); | ||
| 1654 | #ifdef __MigPackStructs | ||
| 1655 | #pragma pack(pop) | ||
| 1656 | #endif | ||
| 1657 | |||
| 1658 | #ifdef __MigPackStructs | ||
| 1659 | #pragma pack(push, 4) | ||
| 1660 | #endif | ||
| 1661 | 	typedef struct { | ||
| 1662 | 		mach_msg_header_t Head; | ||
| 1663 | 		NDR_record_t NDR; | ||
| 1664 | 		kern_return_t RetCode; | ||
| 1665 | 		mach_port_context_t context; | ||
| 1666 | 	} __Reply__mach_port_get_context_t __attribute__((unused)); | ||
| 1667 | #ifdef __MigPackStructs | ||
| 1668 | #pragma pack(pop) | ||
| 1669 | #endif | ||
| 1670 | |||
| 1671 | #ifdef __MigPackStructs | ||
| 1672 | #pragma pack(push, 4) | ||
| 1673 | #endif | ||
| 1674 | 	typedef struct { | ||
| 1675 | 		mach_msg_header_t Head; | ||
| 1676 | 		NDR_record_t NDR; | ||
| 1677 | 		kern_return_t RetCode; | ||
| 1678 | 	} __Reply__mach_port_set_context_t __attribute__((unused)); | ||
| 1679 | #ifdef __MigPackStructs | ||
| 1680 | #pragma pack(pop) | ||
| 1681 | #endif | ||
| 1682 | |||
| 1683 | #ifdef __MigPackStructs | ||
| 1684 | #pragma pack(push, 4) | ||
| 1685 | #endif | ||
| 1686 | 	typedef struct { | ||
| 1687 | 		mach_msg_header_t Head; | ||
| 1688 | 		NDR_record_t NDR; | ||
| 1689 | 		kern_return_t RetCode; | ||
| 1690 | 		natural_t object_type; | ||
| 1691 | 		mach_vm_address_t object_addr; | ||
| 1692 | 	} __Reply__mach_port_kobject_t __attribute__((unused)); | ||
| 1693 | #ifdef __MigPackStructs | ||
| 1694 | #pragma pack(pop) | ||
| 1695 | #endif | ||
| 1696 | |||
| 1697 | #ifdef __MigPackStructs | ||
| 1698 | #pragma pack(push, 4) | ||
| 1699 | #endif | ||
| 1700 | 	typedef struct { | ||
| 1701 | 		mach_msg_header_t Head; | ||
| 1702 | 		NDR_record_t NDR; | ||
| 1703 | 		kern_return_t RetCode; | ||
| 1704 | 		mach_port_name_t name; | ||
| 1705 | 	} __Reply__mach_port_construct_t __attribute__((unused)); | ||
| 1706 | #ifdef __MigPackStructs | ||
| 1707 | #pragma pack(pop) | ||
| 1708 | #endif | ||
| 1709 | |||
| 1710 | #ifdef __MigPackStructs | ||
| 1711 | #pragma pack(push, 4) | ||
| 1712 | #endif | ||
| 1713 | 	typedef struct { | ||
| 1714 | 		mach_msg_header_t Head; | ||
| 1715 | 		NDR_record_t NDR; | ||
| 1716 | 		kern_return_t RetCode; | ||
| 1717 | 	} __Reply__mach_port_destruct_t __attribute__((unused)); | ||
| 1718 | #ifdef __MigPackStructs | ||
| 1719 | #pragma pack(pop) | ||
| 1720 | #endif | ||
| 1721 | |||
| 1722 | #ifdef __MigPackStructs | ||
| 1723 | #pragma pack(push, 4) | ||
| 1724 | #endif | ||
| 1725 | 	typedef struct { | ||
| 1726 | 		mach_msg_header_t Head; | ||
| 1727 | 		NDR_record_t NDR; | ||
| 1728 | 		kern_return_t RetCode; | ||
| 1729 | 	} __Reply__mach_port_guard_t __attribute__((unused)); | ||
| 1730 | #ifdef __MigPackStructs | ||
| 1731 | #pragma pack(pop) | ||
| 1732 | #endif | ||
| 1733 | |||
| 1734 | #ifdef __MigPackStructs | ||
| 1735 | #pragma pack(push, 4) | ||
| 1736 | #endif | ||
| 1737 | 	typedef struct { | ||
| 1738 | 		mach_msg_header_t Head; | ||
| 1739 | 		NDR_record_t NDR; | ||
| 1740 | 		kern_return_t RetCode; | ||
| 1741 | 	} __Reply__mach_port_unguard_t __attribute__((unused)); | ||
| 1742 | #ifdef __MigPackStructs | ||
| 1743 | #pragma pack(pop) | ||
| 1744 | #endif | ||
| 1745 | |||
| 1746 | #ifdef __MigPackStructs | ||
| 1747 | #pragma pack(push, 4) | ||
| 1748 | #endif | ||
| 1749 | 	typedef struct { | ||
| 1750 | 		mach_msg_header_t Head; | ||
| 1751 | 		NDR_record_t NDR; | ||
| 1752 | 		kern_return_t RetCode; | ||
| 1753 | 		ipc_info_space_basic_t basic_info; | ||
| 1754 | 	} __Reply__mach_port_space_basic_info_t __attribute__((unused)); | ||
| 1755 | #ifdef __MigPackStructs | ||
| 1756 | #pragma pack(pop) | ||
| 1757 | #endif | ||
| 1758 | |||
| 1759 | #ifdef __MigPackStructs | ||
| 1760 | #pragma pack(push, 4) | ||
| 1761 | #endif | ||
| 1762 | 	typedef struct { | ||
| 1763 | 		mach_msg_header_t Head; | ||
| 1764 | 		NDR_record_t NDR; | ||
| 1765 | 		kern_return_t RetCode; | ||
| 1766 | 	} __Reply__mach_port_guard_with_flags_t __attribute__((unused)); | ||
| 1767 | #ifdef __MigPackStructs | ||
| 1768 | #pragma pack(pop) | ||
| 1769 | #endif | ||
| 1770 | |||
| 1771 | #ifdef __MigPackStructs | ||
| 1772 | #pragma pack(push, 4) | ||
| 1773 | #endif | ||
| 1774 | 	typedef struct { | ||
| 1775 | 		mach_msg_header_t Head; | ||
| 1776 | 		NDR_record_t NDR; | ||
| 1777 | 		kern_return_t RetCode; | ||
| 1778 | 	} __Reply__mach_port_swap_guard_t __attribute__((unused)); | ||
| 1779 | #ifdef __MigPackStructs | ||
| 1780 | #pragma pack(pop) | ||
| 1781 | #endif | ||
| 1782 | |||
| 1783 | #ifdef __MigPackStructs | ||
| 1784 | #pragma pack(push, 4) | ||
| 1785 | #endif | ||
| 1786 | 	typedef struct { | ||
| 1787 | 		mach_msg_header_t Head; | ||
| 1788 | 		NDR_record_t NDR; | ||
| 1789 | 		kern_return_t RetCode; | ||
| 1790 | 		natural_t object_type; | ||
| 1791 | 		mach_vm_address_t object_addr; | ||
| 1792 | 		mach_msg_type_number_t descriptionOffset; /* MiG doesn't use it */ | ||
| 1793 | 		mach_msg_type_number_t descriptionCnt; | ||
| 1794 | 		char description[512]; | ||
| 1795 | 	} __Reply__mach_port_kobject_description_t __attribute__((unused)); | ||
| 1796 | #ifdef __MigPackStructs | ||
| 1797 | #pragma pack(pop) | ||
| 1798 | #endif | ||
| 1799 | |||
| 1800 | #ifdef __MigPackStructs | ||
| 1801 | #pragma pack(push, 4) | ||
| 1802 | #endif | ||
| 1803 | 	typedef struct { | ||
| 1804 | 		mach_msg_header_t Head; | ||
| 1805 | 		NDR_record_t NDR; | ||
| 1806 | 		kern_return_t RetCode; | ||
| 1807 | 		uint64_t filter_policy_id; | ||
| 1808 | 	} __Reply__mach_port_is_connection_for_service_t __attribute__((unused)); | ||
| 1809 | #ifdef __MigPackStructs | ||
| 1810 | #pragma pack(pop) | ||
| 1811 | #endif | ||
| 1812 | |||
| 1813 | #ifdef __MigPackStructs | ||
| 1814 | #pragma pack(push, 4) | ||
| 1815 | #endif | ||
| 1816 | 	typedef struct { | ||
| 1817 | 		mach_msg_header_t Head; | ||
| 1818 | 		NDR_record_t NDR; | ||
| 1819 | 		kern_return_t RetCode; | ||
| 1820 | 		mach_service_port_info_data_t sp_info_out; | ||
| 1821 | 	} __Reply__mach_port_get_service_port_info_t __attribute__((unused)); | ||
| 1822 | #ifdef __MigPackStructs | ||
| 1823 | #pragma pack(pop) | ||
| 1824 | #endif | ||
| 1825 | |||
| 1826 | #ifdef __MigPackStructs | ||
| 1827 | #pragma pack(push, 4) | ||
| 1828 | #endif | ||
| 1829 | 	typedef struct { | ||
| 1830 | 		mach_msg_header_t Head; | ||
| 1831 | 		NDR_record_t NDR; | ||
| 1832 | 		kern_return_t RetCode; | ||
| 1833 | 	} __Reply__mach_port_assert_attributes_t __attribute__((unused)); | ||
| 1834 | #ifdef __MigPackStructs | ||
| 1835 | #pragma pack(pop) | ||
| 1836 | #endif | ||
| 1837 | #endif /* !__Reply__mach_port_subsystem__defined */ | ||
| 1838 | |||
| 1839 | /* union of all replies */ | ||
| 1840 | |||
| 1841 | #ifndef __ReplyUnion__mach_port_subsystem__defined | ||
| 1842 | #define __ReplyUnion__mach_port_subsystem__defined | ||
| 1843 | union __ReplyUnion__mach_port_subsystem { | ||
| 1844 | 	__Reply__mach_port_names_t Reply_mach_port_names; | ||
| 1845 | 	__Reply__mach_port_type_t Reply_mach_port_type; | ||
| 1846 | 	__Reply__mach_port_rename_t Reply_mach_port_rename; | ||
| 1847 | 	__Reply__mach_port_allocate_name_t Reply_mach_port_allocate_name; | ||
| 1848 | 	__Reply__mach_port_allocate_t Reply_mach_port_allocate; | ||
| 1849 | 	__Reply__mach_port_destroy_t Reply_mach_port_destroy; | ||
| 1850 | 	__Reply__mach_port_deallocate_t Reply_mach_port_deallocate; | ||
| 1851 | 	__Reply__mach_port_get_refs_t Reply_mach_port_get_refs; | ||
| 1852 | 	__Reply__mach_port_mod_refs_t Reply_mach_port_mod_refs; | ||
| 1853 | 	__Reply__mach_port_peek_t Reply_mach_port_peek; | ||
| 1854 | 	__Reply__mach_port_set_mscount_t Reply_mach_port_set_mscount; | ||
| 1855 | 	__Reply__mach_port_get_set_status_t Reply_mach_port_get_set_status; | ||
| 1856 | 	__Reply__mach_port_move_member_t Reply_mach_port_move_member; | ||
| 1857 | 	__Reply__mach_port_request_notification_t Reply_mach_port_request_notification; | ||
| 1858 | 	__Reply__mach_port_insert_right_t Reply_mach_port_insert_right; | ||
| 1859 | 	__Reply__mach_port_extract_right_t Reply_mach_port_extract_right; | ||
| 1860 | 	__Reply__mach_port_set_seqno_t Reply_mach_port_set_seqno; | ||
| 1861 | 	__Reply__mach_port_get_attributes_t Reply_mach_port_get_attributes; | ||
| 1862 | 	__Reply__mach_port_set_attributes_t Reply_mach_port_set_attributes; | ||
| 1863 | 	__Reply__mach_port_allocate_qos_t Reply_mach_port_allocate_qos; | ||
| 1864 | 	__Reply__mach_port_allocate_full_t Reply_mach_port_allocate_full; | ||
| 1865 | 	__Reply__task_set_port_space_t Reply_task_set_port_space; | ||
| 1866 | 	__Reply__mach_port_get_srights_t Reply_mach_port_get_srights; | ||
| 1867 | 	__Reply__mach_port_space_info_t Reply_mach_port_space_info; | ||
| 1868 | 	__Reply__mach_port_dnrequest_info_t Reply_mach_port_dnrequest_info; | ||
| 1869 | 	__Reply__mach_port_kernel_object_t Reply_mach_port_kernel_object; | ||
| 1870 | 	__Reply__mach_port_insert_member_t Reply_mach_port_insert_member; | ||
| 1871 | 	__Reply__mach_port_extract_member_t Reply_mach_port_extract_member; | ||
| 1872 | 	__Reply__mach_port_get_context_t Reply_mach_port_get_context; | ||
| 1873 | 	__Reply__mach_port_set_context_t Reply_mach_port_set_context; | ||
| 1874 | 	__Reply__mach_port_kobject_t Reply_mach_port_kobject; | ||
| 1875 | 	__Reply__mach_port_construct_t Reply_mach_port_construct; | ||
| 1876 | 	__Reply__mach_port_destruct_t Reply_mach_port_destruct; | ||
| 1877 | 	__Reply__mach_port_guard_t Reply_mach_port_guard; | ||
| 1878 | 	__Reply__mach_port_unguard_t Reply_mach_port_unguard; | ||
| 1879 | 	__Reply__mach_port_space_basic_info_t Reply_mach_port_space_basic_info; | ||
| 1880 | 	__Reply__mach_port_guard_with_flags_t Reply_mach_port_guard_with_flags; | ||
| 1881 | 	__Reply__mach_port_swap_guard_t Reply_mach_port_swap_guard; | ||
| 1882 | 	__Reply__mach_port_kobject_description_t Reply_mach_port_kobject_description; | ||
| 1883 | 	__Reply__mach_port_is_connection_for_service_t Reply_mach_port_is_connection_for_service; | ||
| 1884 | 	__Reply__mach_port_get_service_port_info_t Reply_mach_port_get_service_port_info; | ||
| 1885 | 	__Reply__mach_port_assert_attributes_t Reply_mach_port_assert_attributes; | ||
| 1886 | }; | ||
| 1887 | #endif /* !__RequestUnion__mach_port_subsystem__defined */ | ||
| 1888 | |||
| 1889 | #ifndef subsystem_to_name_map_mach_port | ||
| 1890 | #define subsystem_to_name_map_mach_port \ | ||
| 1891 | { "mach_port_names", 3200 },\ | ||
| 1892 | { "mach_port_type", 3201 },\ | ||
| 1893 | { "mach_port_rename", 3202 },\ | ||
| 1894 | { "mach_port_allocate_name", 3203 },\ | ||
| 1895 | { "mach_port_allocate", 3204 },\ | ||
| 1896 | { "mach_port_destroy", 3205 },\ | ||
| 1897 | { "mach_port_deallocate", 3206 },\ | ||
| 1898 | { "mach_port_get_refs", 3207 },\ | ||
| 1899 | { "mach_port_mod_refs", 3208 },\ | ||
| 1900 | { "mach_port_peek", 3209 },\ | ||
| 1901 | { "mach_port_set_mscount", 3210 },\ | ||
| 1902 | { "mach_port_get_set_status", 3211 },\ | ||
| 1903 | { "mach_port_move_member", 3212 },\ | ||
| 1904 | { "mach_port_request_notification", 3213 },\ | ||
| 1905 | { "mach_port_insert_right", 3214 },\ | ||
| 1906 | { "mach_port_extract_right", 3215 },\ | ||
| 1907 | { "mach_port_set_seqno", 3216 },\ | ||
| 1908 | { "mach_port_get_attributes", 3217 },\ | ||
| 1909 | { "mach_port_set_attributes", 3218 },\ | ||
| 1910 | { "mach_port_allocate_qos", 3219 },\ | ||
| 1911 | { "mach_port_allocate_full", 3220 },\ | ||
| 1912 | { "task_set_port_space", 3221 },\ | ||
| 1913 | { "mach_port_get_srights", 3222 },\ | ||
| 1914 | { "mach_port_space_info", 3223 },\ | ||
| 1915 | { "mach_port_dnrequest_info", 3224 },\ | ||
| 1916 | { "mach_port_kernel_object", 3225 },\ | ||
| 1917 | { "mach_port_insert_member", 3226 },\ | ||
| 1918 | { "mach_port_extract_member", 3227 },\ | ||
| 1919 | { "mach_port_get_context", 3228 },\ | ||
| 1920 | { "mach_port_set_context", 3229 },\ | ||
| 1921 | { "mach_port_kobject", 3230 },\ | ||
| 1922 | { "mach_port_construct", 3231 },\ | ||
| 1923 | { "mach_port_destruct", 3232 },\ | ||
| 1924 | { "mach_port_guard", 3233 },\ | ||
| 1925 | { "mach_port_unguard", 3234 },\ | ||
| 1926 | { "mach_port_space_basic_info", 3235 },\ | ||
| 1927 | { "mach_port_guard_with_flags", 3237 },\ | ||
| 1928 | { "mach_port_swap_guard", 3238 },\ | ||
| 1929 | { "mach_port_kobject_description", 3239 },\ | ||
| 1930 | { "mach_port_is_connection_for_service", 3240 },\ | ||
| 1931 | { "mach_port_get_service_port_info", 3241 },\ | ||
| 1932 | { "mach_port_assert_attributes", 3242 } | ||
| 1933 | #endif | ||
| 1934 | |||
| 1935 | #ifdef __AfterMigUserHeader | ||
| 1936 | __AfterMigUserHeader | ||
| 1937 | #endif /* __AfterMigUserHeader */ | ||
| 1938 | |||
| 1939 | #endif	 /* _mach_port_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mach_types.h-4| ... | @@ -145,7 +145,6 @@ typedef mach_port_t clock_ctrl_t; | ... | @@ -145,7 +145,6 @@ typedef mach_port_t clock_ctrl_t; |
| 145 | typedef mach_port_t arcade_register_t; | 145 | typedef mach_port_t arcade_register_t; |
| 146 | typedef mach_port_t ipc_eventlink_t; | 146 | typedef mach_port_t ipc_eventlink_t; |
| 147 | typedef mach_port_t eventlink_port_pair_t[2]; | 147 | typedef mach_port_t eventlink_port_pair_t[2]; |
| 148 | typedef mach_port_t suid_cred_t; | ||
| 149 | typedef mach_port_t task_id_token_t; | 148 | typedef mach_port_t task_id_token_t; |
| 150 | 149 | ||
| 151 | 150 | ||
| ... | @@ -219,8 +218,6 @@ typedef exception_handler_array_t exception_port_arrary_t; | ... | @@ -219,8 +218,6 @@ typedef exception_handler_array_t exception_port_arrary_t; |
| 219 | typedef char vfs_path_t[4096]; | 218 | typedef char vfs_path_t[4096]; |
| 220 | typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */ | 219 | typedef char nspace_path_t[1024]; /* 1024 == PATH_MAX */ |
| 221 | typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */ | 220 | typedef char nspace_name_t[1024]; /* 1024 == PATH_MAX */ |
| 222 | typedef char suid_cred_path_t[1024]; | ||
| 223 | typedef uint32_t suid_cred_uid_t; | ||
| 224 | 221 | ||
| 225 | #define TASK_NULL ((task_t) 0) | 222 | #define TASK_NULL ((task_t) 0) |
| 226 | #define TASK_NAME_NULL ((task_name_t) 0) | 223 | #define TASK_NAME_NULL ((task_name_t) 0) |
| ... | @@ -249,7 +246,6 @@ typedef uint32_t suid_cred_uid_t; | ... | @@ -249,7 +246,6 @@ typedef uint32_t suid_cred_uid_t; |
| 249 | #define ARCADE_REG_NULL ((arcade_register_t) 0) | 246 | #define ARCADE_REG_NULL ((arcade_register_t) 0) |
| 250 | #define MACH_EVENTLINK_NULL ((mach_eventlink_t) 0) | 247 | #define MACH_EVENTLINK_NULL ((mach_eventlink_t) 0) |
| 251 | #define IPC_EVENTLINK_NULL ((ipc_eventlink_t) 0) | 248 | #define IPC_EVENTLINK_NULL ((ipc_eventlink_t) 0) |
| 252 | #define SUID_CRED_NULL ((suid_cred_t) 0) | ||
| 253 | #define TASK_ID_TOKEN_NULL ((task_id_token_t) 0) | 249 | #define TASK_ID_TOKEN_NULL ((task_id_token_t) 0) |
| 254 | 250 | ||
| 255 | /* capability strictly _DECREASING_. | 251 | /* capability strictly _DECREASING_. |
lib/libc/include/any-macos.12-any/mach/mach_voucher_types.h deleted-246| ... | @@ -1,246 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_VOUCHER_TYPES_H_ | ||
| 30 | #define _MACH_VOUCHER_TYPES_H_ | ||
| 31 | |||
| 32 | #include <mach/std_types.h> | ||
| 33 | #include <mach/port.h> | ||
| 34 | #include <mach/message.h> | ||
| 35 | |||
| 36 | /* | ||
| 37 | * Mach Voucher - an immutable collection of attribute value handles. | ||
| 38 | * | ||
| 39 | * The mach voucher is such that it can be passed between processes | ||
| 40 | * as a Mach port send right (by convention in the mach_msg_header_t’s | ||
| 41 | * msgh_voucher field). | ||
| 42 | * | ||
| 43 | * You may construct a new mach voucher by passing a construction | ||
| 44 | * recipe to host_create_mach_voucher(). The construction recipe supports | ||
| 45 | * generic commands for copying, removing, and redeeming attribute value | ||
| 46 | * handles from previous vouchers, or running attribute-mananger-specific | ||
| 47 | * commands within the recipe. | ||
| 48 | * | ||
| 49 | * Once the set of attribute value handles is constructed and returned, | ||
| 50 | * that set will not change for the life of the voucher (just because the | ||
| 51 | * attribute value handle itself doesn't change, the value the handle refers | ||
| 52 | * to is free to change at will). | ||
| 53 | */ | ||
| 54 | typedef mach_port_t mach_voucher_t; | ||
| 55 | #define MACH_VOUCHER_NULL ((mach_voucher_t) 0) | ||
| 56 | |||
| 57 | typedef mach_port_name_t mach_voucher_name_t; | ||
| 58 | #define MACH_VOUCHER_NAME_NULL ((mach_voucher_name_t) 0) | ||
| 59 | |||
| 60 | typedef mach_voucher_name_t *mach_voucher_name_array_t; | ||
| 61 | #define MACH_VOUCHER_NAME_ARRAY_NULL ((mach_voucher_name_array_t) 0) | ||
| 62 | |||
| 63 | /* | ||
| 64 | * This type changes appearance between user-space and kernel. It is | ||
| 65 | * a port at user-space and a reference to an ipc_voucher structure in-kernel. | ||
| 66 | */ | ||
| 67 | typedef mach_voucher_t ipc_voucher_t; | ||
| 68 | #define IPC_VOUCHER_NULL ((ipc_voucher_t) 0) | ||
| 69 | |||
| 70 | /* | ||
| 71 | * mach_voucher_selector_t - A means of specifying which thread/task value to extract - | ||
| 72 | * the current voucher set at this level, or a voucher representing | ||
| 73 | * the full [layered] effective value for the task/thread. | ||
| 74 | */ | ||
| 75 | typedef uint32_t mach_voucher_selector_t; | ||
| 76 | #define MACH_VOUCHER_SELECTOR_CURRENT ((mach_voucher_selector_t)0) | ||
| 77 | #define MACH_VOUCHER_SELECTOR_EFFECTIVE ((mach_voucher_selector_t)1) | ||
| 78 | |||
| 79 | |||
| 80 | /* | ||
| 81 | * mach_voucher_attr_key_t - The key used to identify a particular managed resource or | ||
| 82 | * to select the specific resource manager’s data associated | ||
| 83 | * with a given voucher. | ||
| 84 | */ | ||
| 85 | typedef uint32_t mach_voucher_attr_key_t; | ||
| 86 | typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t; | ||
| 87 | |||
| 88 | #define MACH_VOUCHER_ATTR_KEY_ALL ((mach_voucher_attr_key_t)~0) | ||
| 89 | #define MACH_VOUCHER_ATTR_KEY_NONE ((mach_voucher_attr_key_t)0) | ||
| 90 | |||
| 91 | /* other well-known-keys will be added here */ | ||
| 92 | #define MACH_VOUCHER_ATTR_KEY_ATM ((mach_voucher_attr_key_t)1) | ||
| 93 | #define MACH_VOUCHER_ATTR_KEY_IMPORTANCE ((mach_voucher_attr_key_t)2) | ||
| 94 | #define MACH_VOUCHER_ATTR_KEY_BANK ((mach_voucher_attr_key_t)3) | ||
| 95 | #define MACH_VOUCHER_ATTR_KEY_PTHPRIORITY ((mach_voucher_attr_key_t)4) | ||
| 96 | |||
| 97 | #define MACH_VOUCHER_ATTR_KEY_USER_DATA ((mach_voucher_attr_key_t)7) | ||
| 98 | #define MACH_VOUCHER_ATTR_KEY_BITS MACH_VOUCHER_ATTR_KEY_USER_DATA /* deprecated */ | ||
| 99 | #define MACH_VOUCHER_ATTR_KEY_TEST ((mach_voucher_attr_key_t)8) | ||
| 100 | |||
| 101 | #define MACH_VOUCHER_ATTR_KEY_NUM_WELL_KNOWN MACH_VOUCHER_ATTR_KEY_TEST | ||
| 102 | |||
| 103 | /* | ||
| 104 | * mach_voucher_attr_content_t | ||
| 105 | * | ||
| 106 | * Data passed to a resource manager for modifying an attribute | ||
| 107 | * value or returned from the resource manager in response to a | ||
| 108 | * request to externalize the current value for that attribute. | ||
| 109 | */ | ||
| 110 | typedef uint8_t *mach_voucher_attr_content_t; | ||
| 111 | typedef uint32_t mach_voucher_attr_content_size_t; | ||
| 112 | |||
| 113 | /* | ||
| 114 | * mach_voucher_attr_command_t - The private verbs implemented by each voucher | ||
| 115 | * attribute manager via mach_voucher_attr_command(). | ||
| 116 | */ | ||
| 117 | typedef uint32_t mach_voucher_attr_command_t; | ||
| 118 | |||
| 119 | /* | ||
| 120 | * mach_voucher_attr_recipe_command_t | ||
| 121 | * | ||
| 122 | * The verbs used to create/morph a voucher attribute value. | ||
| 123 | * We define some system-wide commands here - related to creation, and transport of | ||
| 124 | * vouchers and attributes. Additional commands can be defined by, and supported by, | ||
| 125 | * individual attribute resource managers. | ||
| 126 | */ | ||
| 127 | typedef uint32_t mach_voucher_attr_recipe_command_t; | ||
| 128 | typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t; | ||
| 129 | |||
| 130 | #define MACH_VOUCHER_ATTR_NOOP ((mach_voucher_attr_recipe_command_t)0) | ||
| 131 | #define MACH_VOUCHER_ATTR_COPY ((mach_voucher_attr_recipe_command_t)1) | ||
| 132 | #define MACH_VOUCHER_ATTR_REMOVE ((mach_voucher_attr_recipe_command_t)2) | ||
| 133 | #define MACH_VOUCHER_ATTR_SET_VALUE_HANDLE ((mach_voucher_attr_recipe_command_t)3) | ||
| 134 | #define MACH_VOUCHER_ATTR_AUTO_REDEEM ((mach_voucher_attr_recipe_command_t)4) | ||
| 135 | #define MACH_VOUCHER_ATTR_SEND_PREPROCESS ((mach_voucher_attr_recipe_command_t)5) | ||
| 136 | |||
| 137 | /* redeem is on its way out? */ | ||
| 138 | #define MACH_VOUCHER_ATTR_REDEEM ((mach_voucher_attr_recipe_command_t)10) | ||
| 139 | |||
| 140 | /* recipe command(s) for importance attribute manager */ | ||
| 141 | #define MACH_VOUCHER_ATTR_IMPORTANCE_SELF ((mach_voucher_attr_recipe_command_t)200) | ||
| 142 | |||
| 143 | /* recipe command(s) for bit-store attribute manager */ | ||
| 144 | #define MACH_VOUCHER_ATTR_USER_DATA_STORE ((mach_voucher_attr_recipe_command_t)211) | ||
| 145 | #define MACH_VOUCHER_ATTR_BITS_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE /* deprecated */ | ||
| 146 | |||
| 147 | /* recipe command(s) for test attribute manager */ | ||
| 148 | #define MACH_VOUCHER_ATTR_TEST_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE | ||
| 149 | |||
| 150 | /* | ||
| 151 | * mach_voucher_attr_recipe_t | ||
| 152 | * | ||
| 153 | * An element in a recipe list to create a voucher. | ||
| 154 | */ | ||
| 155 | #pragma pack(push, 1) | ||
| 156 | |||
| 157 | typedef struct mach_voucher_attr_recipe_data { | ||
| 158 | 	mach_voucher_attr_key_t key; | ||
| 159 | 	mach_voucher_attr_recipe_command_t command; | ||
| 160 | 	mach_voucher_name_t previous_voucher; | ||
| 161 | 	mach_voucher_attr_content_size_t content_size; | ||
| 162 | 	uint8_t content[]; | ||
| 163 | } mach_voucher_attr_recipe_data_t; | ||
| 164 | typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t; | ||
| 165 | typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t; | ||
| 166 | |||
| 167 | /* Make the above palatable to MIG */ | ||
| 168 | typedef uint8_t *mach_voucher_attr_raw_recipe_t; | ||
| 169 | typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t; | ||
| 170 | typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t; | ||
| 171 | typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t; | ||
| 172 | |||
| 173 | #define MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE 5120 | ||
| 174 | #define MACH_VOUCHER_TRAP_STACK_LIMIT 256 | ||
| 175 | |||
| 176 | #pragma pack(pop) | ||
| 177 | |||
| 178 | /* | ||
| 179 | * VOUCHER ATTRIBUTE MANAGER Writer types | ||
| 180 | */ | ||
| 181 | |||
| 182 | /* | ||
| 183 | * mach_voucher_attr_manager_t | ||
| 184 | * | ||
| 185 | * A handle through which the mach voucher mechanism communicates with the voucher | ||
| 186 | * attribute manager for a given attribute key. | ||
| 187 | */ | ||
| 188 | typedef mach_port_t mach_voucher_attr_manager_t; | ||
| 189 | #define MACH_VOUCHER_ATTR_MANAGER_NULL ((mach_voucher_attr_manager_t) 0) | ||
| 190 | |||
| 191 | /* | ||
| 192 | * mach_voucher_attr_control_t | ||
| 193 | * | ||
| 194 | * A handle provided to the voucher attribute manager for a given attribute key | ||
| 195 | * through which it makes inquiries or control operations of the mach voucher mechanism. | ||
| 196 | */ | ||
| 197 | typedef mach_port_t mach_voucher_attr_control_t; | ||
| 198 | #define MACH_VOUCHER_ATTR_CONTROL_NULL ((mach_voucher_attr_control_t) 0) | ||
| 199 | |||
| 200 | /* | ||
| 201 | * These types are different in-kernel vs user-space. They are ports in user-space, | ||
| 202 | * pointers to opaque structs in most of the kernel, and pointers to known struct | ||
| 203 | * types in the Mach portion of the kernel. | ||
| 204 | */ | ||
| 205 | typedef mach_port_t ipc_voucher_attr_manager_t; | ||
| 206 | typedef mach_port_t ipc_voucher_attr_control_t; | ||
| 207 | #define IPC_VOUCHER_ATTR_MANAGER_NULL ((ipc_voucher_attr_manager_t) 0) | ||
| 208 | #define IPC_VOUCHER_ATTR_CONTROL_NULL ((ipc_voucher_attr_control_t) 0) | ||
| 209 | |||
| 210 | /* | ||
| 211 | * mach_voucher_attr_value_handle_t | ||
| 212 | * | ||
| 213 | * The private handle that the voucher attribute manager provides to | ||
| 214 | * the mach voucher mechanism to represent a given attr content/value. | ||
| 215 | */ | ||
| 216 | typedef uint64_t mach_voucher_attr_value_handle_t __kernel_ptr_semantics; | ||
| 217 | typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t; | ||
| 218 | |||
| 219 | typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t; | ||
| 220 | #define MACH_VOUCHER_ATTR_VALUE_MAX_NESTED ((mach_voucher_attr_value_handle_array_size_t)4) | ||
| 221 | |||
| 222 | typedef uint32_t mach_voucher_attr_value_reference_t; | ||
| 223 | typedef uint32_t mach_voucher_attr_value_flags_t; | ||
| 224 | #define MACH_VOUCHER_ATTR_VALUE_FLAGS_NONE ((mach_voucher_attr_value_flags_t)0) | ||
| 225 | #define MACH_VOUCHER_ATTR_VALUE_FLAGS_PERSIST ((mach_voucher_attr_value_flags_t)1) | ||
| 226 | |||
| 227 | /* USE - TBD */ | ||
| 228 | typedef uint32_t mach_voucher_attr_control_flags_t; | ||
| 229 | #define MACH_VOUCHER_ATTR_CONTROL_FLAGS_NONE ((mach_voucher_attr_control_flags_t)0) | ||
| 230 | |||
| 231 | /* | ||
| 232 | * Commands and types for the IPC Importance Attribute Manager | ||
| 233 | * | ||
| 234 | * These are the valid mach_voucher_attr_command() options with the | ||
| 235 | * MACH_VOUCHER_ATTR_KEY_IMPORTANCE key. | ||
| 236 | */ | ||
| 237 | #define MACH_VOUCHER_IMPORTANCE_ATTR_ADD_EXTERNAL 1 /* Add some number of external refs (not supported) */ | ||
| 238 | #define MACH_VOUCHER_IMPORTANCE_ATTR_DROP_EXTERNAL 2 /* Drop some number of external refs */ | ||
| 239 | typedef uint32_t mach_voucher_attr_importance_refs; | ||
| 240 | |||
| 241 | /* | ||
| 242 | * Activity id Generation defines | ||
| 243 | */ | ||
| 244 | #define MACH_ACTIVITY_ID_COUNT_MAX 16 | ||
| 245 | |||
| 246 | #endif /* _MACH_VOUCHER_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/machine.h deleted-410| ... | @@ -1,410 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2007-2016 Apple, Inc. All rights reserved. | ||
| 3 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 4 | * | ||
| 5 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 6 | * | ||
| 7 | * This file contains Original Code and/or Modifications of Original Code | ||
| 8 | * as defined in and that are subject to the Apple Public Source License | ||
| 9 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 10 | * compliance with the License. The rights granted to you under the License | ||
| 11 | * may not be used to create, or enable the creation or redistribution of, | ||
| 12 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 13 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 14 | * terms of an Apple operating system software license agreement. | ||
| 15 | * | ||
| 16 | * Please obtain a copy of the License at | ||
| 17 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 18 | * | ||
| 19 | * The Original Code and all software distributed under the License are | ||
| 20 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 21 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 22 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 23 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 24 | * Please see the License for the specific language governing rights and | ||
| 25 | * limitations under the License. | ||
| 26 | * | ||
| 27 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 28 | */ | ||
| 29 | /* | ||
| 30 | * Mach Operating System | ||
| 31 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 32 | * All Rights Reserved. | ||
| 33 | * | ||
| 34 | * Permission to use, copy, modify and distribute this software and its | ||
| 35 | * documentation is hereby granted, provided that both the copyright | ||
| 36 | * notice and this permission notice appear in all copies of the | ||
| 37 | * software, derivative works or modified versions, and any portions | ||
| 38 | * thereof, and that both notices appear in supporting documentation. | ||
| 39 | * | ||
| 40 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 41 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 42 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 43 | * | ||
| 44 | * Carnegie Mellon requests users of this software to return to | ||
| 45 | * | ||
| 46 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 47 | * School of Computer Science | ||
| 48 | * Carnegie Mellon University | ||
| 49 | * Pittsburgh PA 15213-3890 | ||
| 50 | * | ||
| 51 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 52 | * the rights to redistribute these changes. | ||
| 53 | */ | ||
| 54 | /*	File:	machine.h | ||
| 55 | *	Author:	Avadis Tevanian, Jr. | ||
| 56 | *	Date:	1986 | ||
| 57 | * | ||
| 58 | *	Machine independent machine abstraction. | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef _MACH_MACHINE_H_ | ||
| 62 | #define _MACH_MACHINE_H_ | ||
| 63 | |||
| 64 | #ifndef __ASSEMBLER__ | ||
| 65 | |||
| 66 | #include <stdint.h> | ||
| 67 | #include <mach/machine/vm_types.h> | ||
| 68 | #include <mach/boolean.h> | ||
| 69 | |||
| 70 | typedef integer_t cpu_type_t; | ||
| 71 | typedef integer_t cpu_subtype_t; | ||
| 72 | typedef integer_t cpu_threadtype_t; | ||
| 73 | |||
| 74 | #define CPU_STATE_MAX 4 | ||
| 75 | |||
| 76 | #define CPU_STATE_USER 0 | ||
| 77 | #define CPU_STATE_SYSTEM 1 | ||
| 78 | #define CPU_STATE_IDLE 2 | ||
| 79 | #define CPU_STATE_NICE 3 | ||
| 80 | |||
| 81 | |||
| 82 | |||
| 83 | /* | ||
| 84 | * Capability bits used in the definition of cpu_type. | ||
| 85 | */ | ||
| 86 | #define CPU_ARCH_MASK 0xff000000 /* mask for architecture bits */ | ||
| 87 | #define CPU_ARCH_ABI64 0x01000000 /* 64 bit ABI */ | ||
| 88 | #define CPU_ARCH_ABI64_32 0x02000000 /* ABI for 64-bit hardware with 32-bit types; LP32 */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | *	Machine types known by all. | ||
| 92 | */ | ||
| 93 | |||
| 94 | #define CPU_TYPE_ANY ((cpu_type_t) -1) | ||
| 95 | |||
| 96 | #define CPU_TYPE_VAX ((cpu_type_t) 1) | ||
| 97 | /* skip				((cpu_type_t) 2)	*/ | ||
| 98 | /* skip				((cpu_type_t) 3)	*/ | ||
| 99 | /* skip				((cpu_type_t) 4)	*/ | ||
| 100 | /* skip				((cpu_type_t) 5)	*/ | ||
| 101 | #define CPU_TYPE_MC680x0 ((cpu_type_t) 6) | ||
| 102 | #define CPU_TYPE_X86 ((cpu_type_t) 7) | ||
| 103 | #define CPU_TYPE_I386 CPU_TYPE_X86 /* compatibility */ | ||
| 104 | #define CPU_TYPE_X86_64 (CPU_TYPE_X86 | CPU_ARCH_ABI64) | ||
| 105 | |||
| 106 | /* skip CPU_TYPE_MIPS		((cpu_type_t) 8)	*/ | ||
| 107 | /* skip ((cpu_type_t) 9)	*/ | ||
| 108 | #define CPU_TYPE_MC98000 ((cpu_type_t) 10) | ||
| 109 | #define CPU_TYPE_HPPA ((cpu_type_t) 11) | ||
| 110 | #define CPU_TYPE_ARM ((cpu_type_t) 12) | ||
| 111 | #define CPU_TYPE_ARM64 (CPU_TYPE_ARM | CPU_ARCH_ABI64) | ||
| 112 | #define CPU_TYPE_ARM64_32 (CPU_TYPE_ARM | CPU_ARCH_ABI64_32) | ||
| 113 | #define CPU_TYPE_MC88000 ((cpu_type_t) 13) | ||
| 114 | #define CPU_TYPE_SPARC ((cpu_type_t) 14) | ||
| 115 | #define CPU_TYPE_I860 ((cpu_type_t) 15) | ||
| 116 | /* skip	CPU_TYPE_ALPHA		((cpu_type_t) 16)	*/ | ||
| 117 | /* skip				((cpu_type_t) 17)	*/ | ||
| 118 | #define CPU_TYPE_POWERPC ((cpu_type_t) 18) | ||
| 119 | #define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) | ||
| 120 | /* skip				((cpu_type_t) 19)	*/ | ||
| 121 | /* skip				((cpu_type_t) 20 */ | ||
| 122 | /* skip				((cpu_type_t) 21 */ | ||
| 123 | /* skip				((cpu_type_t) 22 */ | ||
| 124 | |||
| 125 | /* | ||
| 126 | *	Machine subtypes (these are defined here, instead of in a machine | ||
| 127 | *	dependent directory, so that any program can get all definitions | ||
| 128 | *	regardless of where is it compiled). | ||
| 129 | */ | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Capability bits used in the definition of cpu_subtype. | ||
| 133 | */ | ||
| 134 | #define CPU_SUBTYPE_MASK 0xff000000 /* mask for feature flags */ | ||
| 135 | #define CPU_SUBTYPE_LIB64 0x80000000 /* 64 bit libraries */ | ||
| 136 | #define CPU_SUBTYPE_PTRAUTH_ABI 0x80000000 /* pointer authentication with versioned ABI */ | ||
| 137 | |||
| 138 | /* | ||
| 139 | * When selecting a slice, ANY will pick the slice with the best | ||
| 140 | * grading for the selected cpu_type_t, unlike the "ALL" subtypes, | ||
| 141 | * which are the slices that can run on any hardware for that cpu type. | ||
| 142 | */ | ||
| 143 | #define CPU_SUBTYPE_ANY ((cpu_subtype_t) -1) | ||
| 144 | |||
| 145 | /* | ||
| 146 | *	Object files that are hand-crafted to run on any | ||
| 147 | *	implementation of an architecture are tagged with | ||
| 148 | *	CPU_SUBTYPE_MULTIPLE. This functions essentially the same as | ||
| 149 | *	the "ALL" subtype of an architecture except that it allows us | ||
| 150 | *	to easily find object files that may need to be modified | ||
| 151 | *	whenever a new implementation of an architecture comes out. | ||
| 152 | * | ||
| 153 | *	It is the responsibility of the implementor to make sure the | ||
| 154 | *	software handles unsupported implementations elegantly. | ||
| 155 | */ | ||
| 156 | #define CPU_SUBTYPE_MULTIPLE ((cpu_subtype_t) -1) | ||
| 157 | #define CPU_SUBTYPE_LITTLE_ENDIAN ((cpu_subtype_t) 0) | ||
| 158 | #define CPU_SUBTYPE_BIG_ENDIAN ((cpu_subtype_t) 1) | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Machine threadtypes. | ||
| 162 | * This is none - not defined - for most machine types/subtypes. | ||
| 163 | */ | ||
| 164 | #define CPU_THREADTYPE_NONE ((cpu_threadtype_t) 0) | ||
| 165 | |||
| 166 | /* | ||
| 167 | *	VAX subtypes (these do *not* necessary conform to the actual cpu | ||
| 168 | *	ID assigned by DEC available via the SID register). | ||
| 169 | */ | ||
| 170 | |||
| 171 | #define CPU_SUBTYPE_VAX_ALL ((cpu_subtype_t) 0) | ||
| 172 | #define CPU_SUBTYPE_VAX780 ((cpu_subtype_t) 1) | ||
| 173 | #define CPU_SUBTYPE_VAX785 ((cpu_subtype_t) 2) | ||
| 174 | #define CPU_SUBTYPE_VAX750 ((cpu_subtype_t) 3) | ||
| 175 | #define CPU_SUBTYPE_VAX730 ((cpu_subtype_t) 4) | ||
| 176 | #define CPU_SUBTYPE_UVAXI ((cpu_subtype_t) 5) | ||
| 177 | #define CPU_SUBTYPE_UVAXII ((cpu_subtype_t) 6) | ||
| 178 | #define CPU_SUBTYPE_VAX8200 ((cpu_subtype_t) 7) | ||
| 179 | #define CPU_SUBTYPE_VAX8500 ((cpu_subtype_t) 8) | ||
| 180 | #define CPU_SUBTYPE_VAX8600 ((cpu_subtype_t) 9) | ||
| 181 | #define CPU_SUBTYPE_VAX8650 ((cpu_subtype_t) 10) | ||
| 182 | #define CPU_SUBTYPE_VAX8800 ((cpu_subtype_t) 11) | ||
| 183 | #define CPU_SUBTYPE_UVAXIII ((cpu_subtype_t) 12) | ||
| 184 | |||
| 185 | /* | ||
| 186 | * 680x0 subtypes | ||
| 187 | * | ||
| 188 | * The subtype definitions here are unusual for historical reasons. | ||
| 189 | * NeXT used to consider 68030 code as generic 68000 code. For | ||
| 190 | * backwards compatability: | ||
| 191 | * | ||
| 192 | *	CPU_SUBTYPE_MC68030 symbol has been preserved for source code | ||
| 193 | *	compatability. | ||
| 194 | * | ||
| 195 | *	CPU_SUBTYPE_MC680x0_ALL has been defined to be the same | ||
| 196 | *	subtype as CPU_SUBTYPE_MC68030 for binary comatability. | ||
| 197 | * | ||
| 198 | *	CPU_SUBTYPE_MC68030_ONLY has been added to allow new object | ||
| 199 | *	files to be tagged as containing 68030-specific instructions. | ||
| 200 | */ | ||
| 201 | |||
| 202 | #define CPU_SUBTYPE_MC680x0_ALL ((cpu_subtype_t) 1) | ||
| 203 | #define CPU_SUBTYPE_MC68030 ((cpu_subtype_t) 1) /* compat */ | ||
| 204 | #define CPU_SUBTYPE_MC68040 ((cpu_subtype_t) 2) | ||
| 205 | #define CPU_SUBTYPE_MC68030_ONLY ((cpu_subtype_t) 3) | ||
| 206 | |||
| 207 | /* | ||
| 208 | *	I386 subtypes | ||
| 209 | */ | ||
| 210 | |||
| 211 | #define CPU_SUBTYPE_INTEL(f, m) ((cpu_subtype_t) (f) + ((m) << 4)) | ||
| 212 | |||
| 213 | #define CPU_SUBTYPE_I386_ALL CPU_SUBTYPE_INTEL(3, 0) | ||
| 214 | #define CPU_SUBTYPE_386 CPU_SUBTYPE_INTEL(3, 0) | ||
| 215 | #define CPU_SUBTYPE_486 CPU_SUBTYPE_INTEL(4, 0) | ||
| 216 | #define CPU_SUBTYPE_486SX CPU_SUBTYPE_INTEL(4, 8) // 8 << 4 = 128 | ||
| 217 | #define CPU_SUBTYPE_586 CPU_SUBTYPE_INTEL(5, 0) | ||
| 218 | #define CPU_SUBTYPE_PENT CPU_SUBTYPE_INTEL(5, 0) | ||
| 219 | #define CPU_SUBTYPE_PENTPRO CPU_SUBTYPE_INTEL(6, 1) | ||
| 220 | #define CPU_SUBTYPE_PENTII_M3 CPU_SUBTYPE_INTEL(6, 3) | ||
| 221 | #define CPU_SUBTYPE_PENTII_M5 CPU_SUBTYPE_INTEL(6, 5) | ||
| 222 | #define CPU_SUBTYPE_CELERON CPU_SUBTYPE_INTEL(7, 6) | ||
| 223 | #define CPU_SUBTYPE_CELERON_MOBILE CPU_SUBTYPE_INTEL(7, 7) | ||
| 224 | #define CPU_SUBTYPE_PENTIUM_3 CPU_SUBTYPE_INTEL(8, 0) | ||
| 225 | #define CPU_SUBTYPE_PENTIUM_3_M CPU_SUBTYPE_INTEL(8, 1) | ||
| 226 | #define CPU_SUBTYPE_PENTIUM_3_XEON CPU_SUBTYPE_INTEL(8, 2) | ||
| 227 | #define CPU_SUBTYPE_PENTIUM_M CPU_SUBTYPE_INTEL(9, 0) | ||
| 228 | #define CPU_SUBTYPE_PENTIUM_4 CPU_SUBTYPE_INTEL(10, 0) | ||
| 229 | #define CPU_SUBTYPE_PENTIUM_4_M CPU_SUBTYPE_INTEL(10, 1) | ||
| 230 | #define CPU_SUBTYPE_ITANIUM CPU_SUBTYPE_INTEL(11, 0) | ||
| 231 | #define CPU_SUBTYPE_ITANIUM_2 CPU_SUBTYPE_INTEL(11, 1) | ||
| 232 | #define CPU_SUBTYPE_XEON CPU_SUBTYPE_INTEL(12, 0) | ||
| 233 | #define CPU_SUBTYPE_XEON_MP CPU_SUBTYPE_INTEL(12, 1) | ||
| 234 | |||
| 235 | #define CPU_SUBTYPE_INTEL_FAMILY(x) ((x) & 15) | ||
| 236 | #define CPU_SUBTYPE_INTEL_FAMILY_MAX 15 | ||
| 237 | |||
| 238 | #define CPU_SUBTYPE_INTEL_MODEL(x) ((x) >> 4) | ||
| 239 | #define CPU_SUBTYPE_INTEL_MODEL_ALL 0 | ||
| 240 | |||
| 241 | /* | ||
| 242 | *	X86 subtypes. | ||
| 243 | */ | ||
| 244 | |||
| 245 | #define CPU_SUBTYPE_X86_ALL ((cpu_subtype_t)3) | ||
| 246 | #define CPU_SUBTYPE_X86_64_ALL ((cpu_subtype_t)3) | ||
| 247 | #define CPU_SUBTYPE_X86_ARCH1 ((cpu_subtype_t)4) | ||
| 248 | #define CPU_SUBTYPE_X86_64_H ((cpu_subtype_t)8) /* Haswell feature subset */ | ||
| 249 | |||
| 250 | |||
| 251 | #define CPU_THREADTYPE_INTEL_HTT ((cpu_threadtype_t) 1) | ||
| 252 | |||
| 253 | /* | ||
| 254 | *	Mips subtypes. | ||
| 255 | */ | ||
| 256 | |||
| 257 | #define CPU_SUBTYPE_MIPS_ALL ((cpu_subtype_t) 0) | ||
| 258 | #define CPU_SUBTYPE_MIPS_R2300 ((cpu_subtype_t) 1) | ||
| 259 | #define CPU_SUBTYPE_MIPS_R2600 ((cpu_subtype_t) 2) | ||
| 260 | #define CPU_SUBTYPE_MIPS_R2800 ((cpu_subtype_t) 3) | ||
| 261 | #define CPU_SUBTYPE_MIPS_R2000a ((cpu_subtype_t) 4) /* pmax */ | ||
| 262 | #define CPU_SUBTYPE_MIPS_R2000 ((cpu_subtype_t) 5) | ||
| 263 | #define CPU_SUBTYPE_MIPS_R3000a ((cpu_subtype_t) 6) /* 3max */ | ||
| 264 | #define CPU_SUBTYPE_MIPS_R3000 ((cpu_subtype_t) 7) | ||
| 265 | |||
| 266 | /* | ||
| 267 | *	MC98000 (PowerPC) subtypes | ||
| 268 | */ | ||
| 269 | #define CPU_SUBTYPE_MC98000_ALL ((cpu_subtype_t) 0) | ||
| 270 | #define CPU_SUBTYPE_MC98601 ((cpu_subtype_t) 1) | ||
| 271 | |||
| 272 | /* | ||
| 273 | *	HPPA subtypes for Hewlett-Packard HP-PA family of | ||
| 274 | *	risc processors. Port by NeXT to 700 series. | ||
| 275 | */ | ||
| 276 | |||
| 277 | #define CPU_SUBTYPE_HPPA_ALL ((cpu_subtype_t) 0) | ||
| 278 | #define CPU_SUBTYPE_HPPA_7100 ((cpu_subtype_t) 0) /* compat */ | ||
| 279 | #define CPU_SUBTYPE_HPPA_7100LC ((cpu_subtype_t) 1) | ||
| 280 | |||
| 281 | /* | ||
| 282 | *	MC88000 subtypes. | ||
| 283 | */ | ||
| 284 | #define CPU_SUBTYPE_MC88000_ALL ((cpu_subtype_t) 0) | ||
| 285 | #define CPU_SUBTYPE_MC88100 ((cpu_subtype_t) 1) | ||
| 286 | #define CPU_SUBTYPE_MC88110 ((cpu_subtype_t) 2) | ||
| 287 | |||
| 288 | /* | ||
| 289 | *	SPARC subtypes | ||
| 290 | */ | ||
| 291 | #define CPU_SUBTYPE_SPARC_ALL ((cpu_subtype_t) 0) | ||
| 292 | |||
| 293 | /* | ||
| 294 | *	I860 subtypes | ||
| 295 | */ | ||
| 296 | #define CPU_SUBTYPE_I860_ALL ((cpu_subtype_t) 0) | ||
| 297 | #define CPU_SUBTYPE_I860_860 ((cpu_subtype_t) 1) | ||
| 298 | |||
| 299 | /* | ||
| 300 | *	PowerPC subtypes | ||
| 301 | */ | ||
| 302 | #define CPU_SUBTYPE_POWERPC_ALL ((cpu_subtype_t) 0) | ||
| 303 | #define CPU_SUBTYPE_POWERPC_601 ((cpu_subtype_t) 1) | ||
| 304 | #define CPU_SUBTYPE_POWERPC_602 ((cpu_subtype_t) 2) | ||
| 305 | #define CPU_SUBTYPE_POWERPC_603 ((cpu_subtype_t) 3) | ||
| 306 | #define CPU_SUBTYPE_POWERPC_603e ((cpu_subtype_t) 4) | ||
| 307 | #define CPU_SUBTYPE_POWERPC_603ev ((cpu_subtype_t) 5) | ||
| 308 | #define CPU_SUBTYPE_POWERPC_604 ((cpu_subtype_t) 6) | ||
| 309 | #define CPU_SUBTYPE_POWERPC_604e ((cpu_subtype_t) 7) | ||
| 310 | #define CPU_SUBTYPE_POWERPC_620 ((cpu_subtype_t) 8) | ||
| 311 | #define CPU_SUBTYPE_POWERPC_750 ((cpu_subtype_t) 9) | ||
| 312 | #define CPU_SUBTYPE_POWERPC_7400 ((cpu_subtype_t) 10) | ||
| 313 | #define CPU_SUBTYPE_POWERPC_7450 ((cpu_subtype_t) 11) | ||
| 314 | #define CPU_SUBTYPE_POWERPC_970 ((cpu_subtype_t) 100) | ||
| 315 | |||
| 316 | /* | ||
| 317 | *	ARM subtypes | ||
| 318 | */ | ||
| 319 | #define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0) | ||
| 320 | #define CPU_SUBTYPE_ARM_V4T ((cpu_subtype_t) 5) | ||
| 321 | #define CPU_SUBTYPE_ARM_V6 ((cpu_subtype_t) 6) | ||
| 322 | #define CPU_SUBTYPE_ARM_V5TEJ ((cpu_subtype_t) 7) | ||
| 323 | #define CPU_SUBTYPE_ARM_XSCALE ((cpu_subtype_t) 8) | ||
| 324 | #define CPU_SUBTYPE_ARM_V7 ((cpu_subtype_t) 9) /* ARMv7-A and ARMv7-R */ | ||
| 325 | #define CPU_SUBTYPE_ARM_V7F ((cpu_subtype_t) 10) /* Cortex A9 */ | ||
| 326 | #define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */ | ||
| 327 | #define CPU_SUBTYPE_ARM_V7K ((cpu_subtype_t) 12) | ||
| 328 | #define CPU_SUBTYPE_ARM_V8 ((cpu_subtype_t) 13) | ||
| 329 | #define CPU_SUBTYPE_ARM_V6M ((cpu_subtype_t) 14) /* Not meant to be run under xnu */ | ||
| 330 | #define CPU_SUBTYPE_ARM_V7M ((cpu_subtype_t) 15) /* Not meant to be run under xnu */ | ||
| 331 | #define CPU_SUBTYPE_ARM_V7EM ((cpu_subtype_t) 16) /* Not meant to be run under xnu */ | ||
| 332 | #define CPU_SUBTYPE_ARM_V8M ((cpu_subtype_t) 17) /* Not meant to be run under xnu */ | ||
| 333 | |||
| 334 | /* | ||
| 335 | * ARM64 subtypes | ||
| 336 | */ | ||
| 337 | #define CPU_SUBTYPE_ARM64_ALL ((cpu_subtype_t) 0) | ||
| 338 | #define CPU_SUBTYPE_ARM64_V8 ((cpu_subtype_t) 1) | ||
| 339 | #define CPU_SUBTYPE_ARM64E ((cpu_subtype_t) 2) | ||
| 340 | |||
| 341 | /* CPU subtype feature flags for ptrauth on arm64e platforms */ | ||
| 342 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_MASK 0x0f000000 | ||
| 343 | #define CPU_SUBTYPE_ARM64_PTR_AUTH_VERSION(x) (((x) & CPU_SUBTYPE_ARM64_PTR_AUTH_MASK) >> 24) | ||
| 344 | |||
| 345 | /* | ||
| 346 | * ARM64_32 subtypes | ||
| 347 | */ | ||
| 348 | #define CPU_SUBTYPE_ARM64_32_ALL ((cpu_subtype_t) 0) | ||
| 349 | #define CPU_SUBTYPE_ARM64_32_V8 ((cpu_subtype_t) 1) | ||
| 350 | |||
| 351 | #endif /* !__ASSEMBLER__ */ | ||
| 352 | |||
| 353 | /* | ||
| 354 | *	CPU families (sysctl hw.cpufamily) | ||
| 355 | * | ||
| 356 | * These are meant to identify the CPU's marketing name - an | ||
| 357 | * application can map these to (possibly) localized strings. | ||
| 358 | * NB: the encodings of the CPU families are intentionally arbitrary. | ||
| 359 | * There is no ordering, and you should never try to deduce whether | ||
| 360 | * or not some feature is available based on the family. | ||
| 361 | * Use feature flags (eg, hw.optional.altivec) to test for optional | ||
| 362 | * functionality. | ||
| 363 | */ | ||
| 364 | #define CPUFAMILY_UNKNOWN 0 | ||
| 365 | #define CPUFAMILY_POWERPC_G3 0xcee41549 | ||
| 366 | #define CPUFAMILY_POWERPC_G4 0x77c184ae | ||
| 367 | #define CPUFAMILY_POWERPC_G5 0xed76d8aa | ||
| 368 | #define CPUFAMILY_INTEL_6_13 0xaa33392b | ||
| 369 | #define CPUFAMILY_INTEL_PENRYN 0x78ea4fbc | ||
| 370 | #define CPUFAMILY_INTEL_NEHALEM 0x6b5a4cd2 | ||
| 371 | #define CPUFAMILY_INTEL_WESTMERE 0x573b5eec | ||
| 372 | #define CPUFAMILY_INTEL_SANDYBRIDGE 0x5490b78c | ||
| 373 | #define CPUFAMILY_INTEL_IVYBRIDGE 0x1f65e835 | ||
| 374 | #define CPUFAMILY_INTEL_HASWELL 0x10b282dc | ||
| 375 | #define CPUFAMILY_INTEL_BROADWELL 0x582ed09c | ||
| 376 | #define CPUFAMILY_INTEL_SKYLAKE 0x37fc219f | ||
| 377 | #define CPUFAMILY_INTEL_KABYLAKE 0x0f817246 | ||
| 378 | #define CPUFAMILY_INTEL_ICELAKE 0x38435547 | ||
| 379 | #define CPUFAMILY_INTEL_COMETLAKE 0x1cf8a03e | ||
| 380 | #define CPUFAMILY_ARM_9 0xe73283ae | ||
| 381 | #define CPUFAMILY_ARM_11 0x8ff620d8 | ||
| 382 | #define CPUFAMILY_ARM_XSCALE 0x53b005f5 | ||
| 383 | #define CPUFAMILY_ARM_12 0xbd1b0ae9 | ||
| 384 | #define CPUFAMILY_ARM_13 0x0cc90e64 | ||
| 385 | #define CPUFAMILY_ARM_14 0x96077ef1 | ||
| 386 | #define CPUFAMILY_ARM_15 0xa8511bca | ||
| 387 | #define CPUFAMILY_ARM_SWIFT 0x1e2d6381 | ||
| 388 | #define CPUFAMILY_ARM_CYCLONE 0x37a09642 | ||
| 389 | #define CPUFAMILY_ARM_TYPHOON 0x2c91a47e | ||
| 390 | #define CPUFAMILY_ARM_TWISTER 0x92fb37c8 | ||
| 391 | #define CPUFAMILY_ARM_HURRICANE 0x67ceee93 | ||
| 392 | #define CPUFAMILY_ARM_MONSOON_MISTRAL 0xe81e7ef6 | ||
| 393 | #define CPUFAMILY_ARM_VORTEX_TEMPEST 0x07d34b9f | ||
| 394 | #define CPUFAMILY_ARM_LIGHTNING_THUNDER 0x462504d2 | ||
| 395 | #define CPUFAMILY_ARM_FIRESTORM_ICESTORM 0x1b588bb3 | ||
| 396 | #define CPUFAMILY_ARM_BLIZZARD_AVALANCHE 0xda33d83d | ||
| 397 | |||
| 398 | #define CPUSUBFAMILY_UNKNOWN 0 | ||
| 399 | #define CPUSUBFAMILY_ARM_HP 1 | ||
| 400 | #define CPUSUBFAMILY_ARM_HG 2 | ||
| 401 | #define CPUSUBFAMILY_ARM_M 3 | ||
| 402 | #define CPUSUBFAMILY_ARM_HS 4 | ||
| 403 | #define CPUSUBFAMILY_ARM_HC_HD 5 | ||
| 404 | |||
| 405 | /* The following synonyms are deprecated: */ | ||
| 406 | #define CPUFAMILY_INTEL_6_23 CPUFAMILY_INTEL_PENRYN | ||
| 407 | #define CPUFAMILY_INTEL_6_26 CPUFAMILY_INTEL_NEHALEM | ||
| 408 | |||
| 409 | |||
| 410 | #endif /* _MACH_MACHINE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/machine/thread_state.h deleted-44| ... | @@ -1,44 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_MACHINE_THREAD_STATE_H_ | ||
| 30 | #define _MACH_MACHINE_THREAD_STATE_H_ | ||
| 31 | |||
| 32 | #if defined (__i386__) || defined(__x86_64__) | ||
| 33 | #include "mach/i386/thread_state.h" | ||
| 34 | #elif defined (__arm__) || defined (__arm64__) | ||
| 35 | #include "mach/arm/thread_state.h" | ||
| 36 | #else | ||
| 37 | #error architecture not supported | ||
| 38 | #endif | ||
| 39 | |||
| 40 | /* Size of maximum exported thread state in 32-bit words */ | ||
| 41 | #define THREAD_STATE_MAX 1296 | ||
| 42 | |||
| 43 | |||
| 44 | #endif /* _MACH_MACHINE_THREAD_STATE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/message.h deleted-911| ... | @@ -1,911 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | * Copyright (c) 2005 SPARTA, Inc. | ||
| 62 | */ | ||
| 63 | /* | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | *	File:	mach/message.h | ||
| 67 | * | ||
| 68 | *	Mach IPC message and primitive function definitions. | ||
| 69 | */ | ||
| 70 | |||
| 71 | #ifndef _MACH_MESSAGE_H_ | ||
| 72 | #define _MACH_MESSAGE_H_ | ||
| 73 | |||
| 74 | #include <stdint.h> | ||
| 75 | #include <mach/port.h> | ||
| 76 | #include <mach/boolean.h> | ||
| 77 | #include <mach/kern_return.h> | ||
| 78 | #include <mach/machine/vm_types.h> | ||
| 79 | |||
| 80 | #include <sys/cdefs.h> | ||
| 81 | #include <sys/appleapiopts.h> | ||
| 82 | #include <Availability.h> | ||
| 83 | |||
| 84 | /* | ||
| 85 | * The timeout mechanism uses mach_msg_timeout_t values, | ||
| 86 | * passed by value. The timeout units are milliseconds. | ||
| 87 | * It is controlled with the MACH_SEND_TIMEOUT | ||
| 88 | * and MACH_RCV_TIMEOUT options. | ||
| 89 | */ | ||
| 90 | |||
| 91 | typedef natural_t mach_msg_timeout_t; | ||
| 92 | |||
| 93 | /* | ||
| 94 | * The value to be used when there is no timeout. | ||
| 95 | * (No MACH_SEND_TIMEOUT/MACH_RCV_TIMEOUT option.) | ||
| 96 | */ | ||
| 97 | |||
| 98 | #define MACH_MSG_TIMEOUT_NONE ((mach_msg_timeout_t) 0) | ||
| 99 | |||
| 100 | /* | ||
| 101 | * The kernel uses MACH_MSGH_BITS_COMPLEX as a hint. If it isn't on, it | ||
| 102 | * assumes the body of the message doesn't contain port rights or OOL | ||
| 103 | * data. The field is set in received messages. A user task must | ||
| 104 | * use caution in interpreting the body of a message if the bit isn't | ||
| 105 | * on, because the mach_msg_type's in the body might "lie" about the | ||
| 106 | * contents. If the bit isn't on, but the mach_msg_types | ||
| 107 | * in the body specify rights or OOL data, the behavior is undefined. | ||
| 108 | * (Ie, an error may or may not be produced.) | ||
| 109 | * | ||
| 110 | * The value of MACH_MSGH_BITS_REMOTE determines the interpretation | ||
| 111 | * of the msgh_remote_port field. It is handled like a msgt_name, | ||
| 112 | * but must result in a send or send-once type right. | ||
| 113 | * | ||
| 114 | * The value of MACH_MSGH_BITS_LOCAL determines the interpretation | ||
| 115 | * of the msgh_local_port field. It is handled like a msgt_name, | ||
| 116 | * and also must result in a send or send-once type right. | ||
| 117 | * | ||
| 118 | * The value of MACH_MSGH_BITS_VOUCHER determines the interpretation | ||
| 119 | * of the msgh_voucher_port field. It is handled like a msgt_name, | ||
| 120 | * but must result in a send right (and the msgh_voucher_port field | ||
| 121 | * must be the name of a send right to a Mach voucher kernel object. | ||
| 122 | * | ||
| 123 | * MACH_MSGH_BITS() combines two MACH_MSG_TYPE_* values, for the remote | ||
| 124 | * and local fields, into a single value suitable for msgh_bits. | ||
| 125 | * | ||
| 126 | * MACH_MSGH_BITS_CIRCULAR should be zero; is is used internally. | ||
| 127 | * | ||
| 128 | * The unused bits should be zero and are reserved for the kernel | ||
| 129 | * or for future interface expansion. | ||
| 130 | */ | ||
| 131 | |||
| 132 | #define MACH_MSGH_BITS_ZERO 0x00000000 | ||
| 133 | |||
| 134 | #define MACH_MSGH_BITS_REMOTE_MASK 0x0000001f | ||
| 135 | #define MACH_MSGH_BITS_LOCAL_MASK 0x00001f00 | ||
| 136 | #define MACH_MSGH_BITS_VOUCHER_MASK 0x001f0000 | ||
| 137 | |||
| 138 | #define MACH_MSGH_BITS_PORTS_MASK \ | ||
| 139 | 	 (MACH_MSGH_BITS_REMOTE_MASK | \ | ||
| 140 | 	 MACH_MSGH_BITS_LOCAL_MASK | \ | ||
| 141 | 	 MACH_MSGH_BITS_VOUCHER_MASK) | ||
| 142 | |||
| 143 | #define MACH_MSGH_BITS_COMPLEX 0x80000000U /* message is complex */ | ||
| 144 | |||
| 145 | #define MACH_MSGH_BITS_USER 0x801f1f1fU /* allowed bits user->kernel */ | ||
| 146 | |||
| 147 | #define MACH_MSGH_BITS_RAISEIMP 0x20000000U /* importance raised due to msg */ | ||
| 148 | #define MACH_MSGH_BITS_DENAP MACH_MSGH_BITS_RAISEIMP | ||
| 149 | |||
| 150 | #define MACH_MSGH_BITS_IMPHOLDASRT 0x10000000U /* assertion help, userland private */ | ||
| 151 | #define MACH_MSGH_BITS_DENAPHOLDASRT MACH_MSGH_BITS_IMPHOLDASRT | ||
| 152 | |||
| 153 | #define MACH_MSGH_BITS_CIRCULAR 0x10000000U /* message circular, kernel private */ | ||
| 154 | |||
| 155 | #define MACH_MSGH_BITS_USED 0xb01f1f1fU | ||
| 156 | |||
| 157 | /* setter macros for the bits */ | ||
| 158 | #define MACH_MSGH_BITS(remote, local) /* legacy */ \ | ||
| 159 | 	 ((remote) | ((local) << 8)) | ||
| 160 | #define MACH_MSGH_BITS_SET_PORTS(remote, local, voucher) \ | ||
| 161 | 	(((remote) & MACH_MSGH_BITS_REMOTE_MASK) | \ | ||
| 162 | 	 (((local) << 8) & MACH_MSGH_BITS_LOCAL_MASK) | \ | ||
| 163 | 	 (((voucher) << 16) & MACH_MSGH_BITS_VOUCHER_MASK)) | ||
| 164 | #define MACH_MSGH_BITS_SET(remote, local, voucher, other) \ | ||
| 165 | 	(MACH_MSGH_BITS_SET_PORTS((remote), (local), (voucher)) \ | ||
| 166 | 	 | ((other) &~ MACH_MSGH_BITS_PORTS_MASK)) | ||
| 167 | |||
| 168 | /* getter macros for pulling values out of the bits field */ | ||
| 169 | #define MACH_MSGH_BITS_REMOTE(bits) \ | ||
| 170 | 	 ((bits) & MACH_MSGH_BITS_REMOTE_MASK) | ||
| 171 | #define MACH_MSGH_BITS_LOCAL(bits) \ | ||
| 172 | 	 (((bits) & MACH_MSGH_BITS_LOCAL_MASK) >> 8) | ||
| 173 | #define MACH_MSGH_BITS_VOUCHER(bits) \ | ||
| 174 | 	 (((bits) & MACH_MSGH_BITS_VOUCHER_MASK) >> 16) | ||
| 175 | #define MACH_MSGH_BITS_PORTS(bits) \ | ||
| 176 | 	((bits) & MACH_MSGH_BITS_PORTS_MASK) | ||
| 177 | #define MACH_MSGH_BITS_OTHER(bits) \ | ||
| 178 | 	 ((bits) &~ MACH_MSGH_BITS_PORTS_MASK) | ||
| 179 | |||
| 180 | /* checking macros */ | ||
| 181 | #define MACH_MSGH_BITS_HAS_REMOTE(bits) \ | ||
| 182 | 	(MACH_MSGH_BITS_REMOTE(bits) != MACH_MSGH_BITS_ZERO) | ||
| 183 | #define MACH_MSGH_BITS_HAS_LOCAL(bits) \ | ||
| 184 | 	(MACH_MSGH_BITS_LOCAL(bits) != MACH_MSGH_BITS_ZERO) | ||
| 185 | #define MACH_MSGH_BITS_HAS_VOUCHER(bits) \ | ||
| 186 | 	(MACH_MSGH_BITS_VOUCHER(bits) != MACH_MSGH_BITS_ZERO) | ||
| 187 | #define MACH_MSGH_BITS_IS_COMPLEX(bits) \ | ||
| 188 | 	(((bits) & MACH_MSGH_BITS_COMPLEX) != MACH_MSGH_BITS_ZERO) | ||
| 189 | |||
| 190 | /* importance checking macros */ | ||
| 191 | #define MACH_MSGH_BITS_RAISED_IMPORTANCE(bits) \ | ||
| 192 | 	(((bits) & MACH_MSGH_BITS_RAISEIMP) != MACH_MSGH_BITS_ZERO) | ||
| 193 | #define MACH_MSGH_BITS_HOLDS_IMPORTANCE_ASSERTION(bits) \ | ||
| 194 | 	(((bits) & MACH_MSGH_BITS_IMPHOLDASRT) != MACH_MSGH_BITS_ZERO) | ||
| 195 | |||
| 196 | /* | ||
| 197 | * Every message starts with a message header. | ||
| 198 | * Following the message header, if the message is complex, are a count | ||
| 199 | * of type descriptors and the type descriptors themselves | ||
| 200 | * (mach_msg_descriptor_t). The size of the message must be specified in | ||
| 201 | * bytes, and includes the message header, descriptor count, descriptors, | ||
| 202 | * and inline data. | ||
| 203 | * | ||
| 204 | * The msgh_remote_port field specifies the destination of the message. | ||
| 205 | * It must specify a valid send or send-once right for a port. | ||
| 206 | * | ||
| 207 | * The msgh_local_port field specifies a "reply port". Normally, | ||
| 208 | * This field carries a send-once right that the receiver will use | ||
| 209 | * to reply to the message. It may carry the values MACH_PORT_NULL, | ||
| 210 | * MACH_PORT_DEAD, a send-once right, or a send right. | ||
| 211 | * | ||
| 212 | * The msgh_voucher_port field specifies a Mach voucher port. Only | ||
| 213 | * send rights to kernel-implemented Mach Voucher kernel objects in | ||
| 214 | * addition to MACH_PORT_NULL or MACH_PORT_DEAD may be passed. | ||
| 215 | * | ||
| 216 | * The msgh_id field is uninterpreted by the message primitives. | ||
| 217 | * It normally carries information specifying the format | ||
| 218 | * or meaning of the message. | ||
| 219 | */ | ||
| 220 | |||
| 221 | typedef unsigned int mach_msg_bits_t; | ||
| 222 | typedef natural_t mach_msg_size_t; | ||
| 223 | typedef integer_t mach_msg_id_t; | ||
| 224 | |||
| 225 | #define MACH_MSG_SIZE_NULL (mach_msg_size_t *) 0 | ||
| 226 | |||
| 227 | typedef unsigned int mach_msg_priority_t; | ||
| 228 | |||
| 229 | #define MACH_MSG_PRIORITY_UNSPECIFIED (mach_msg_priority_t) 0 | ||
| 230 | |||
| 231 | |||
| 232 | typedef unsigned int mach_msg_type_name_t; | ||
| 233 | |||
| 234 | #define MACH_MSG_TYPE_MOVE_RECEIVE 16 /* Must hold receive right */ | ||
| 235 | #define MACH_MSG_TYPE_MOVE_SEND 17 /* Must hold send right(s) */ | ||
| 236 | #define MACH_MSG_TYPE_MOVE_SEND_ONCE 18 /* Must hold sendonce right */ | ||
| 237 | #define MACH_MSG_TYPE_COPY_SEND 19 /* Must hold send right(s) */ | ||
| 238 | #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ | ||
| 239 | #define MACH_MSG_TYPE_MAKE_SEND_ONCE 21 /* Must hold receive right */ | ||
| 240 | #define MACH_MSG_TYPE_COPY_RECEIVE 22 /* NOT VALID */ | ||
| 241 | #define MACH_MSG_TYPE_DISPOSE_RECEIVE 24 /* must hold receive right */ | ||
| 242 | #define MACH_MSG_TYPE_DISPOSE_SEND 25 /* must hold send right(s) */ | ||
| 243 | #define MACH_MSG_TYPE_DISPOSE_SEND_ONCE 26 /* must hold sendonce right */ | ||
| 244 | |||
| 245 | typedef unsigned int mach_msg_copy_options_t; | ||
| 246 | |||
| 247 | #define MACH_MSG_PHYSICAL_COPY 0 | ||
| 248 | #define MACH_MSG_VIRTUAL_COPY 1 | ||
| 249 | #define MACH_MSG_ALLOCATE 2 | ||
| 250 | #define MACH_MSG_OVERWRITE 3 /* deprecated */ | ||
| 251 | #ifdef MACH_KERNEL | ||
| 252 | #define MACH_MSG_KALLOC_COPY_T 4 | ||
| 253 | #endif /* MACH_KERNEL */ | ||
| 254 | |||
| 255 | #define MACH_MSG_GUARD_FLAGS_NONE 0x0000 | ||
| 256 | #define MACH_MSG_GUARD_FLAGS_IMMOVABLE_RECEIVE 0x0001 /* Move the receive right and mark it as immovable */ | ||
| 257 | #define MACH_MSG_GUARD_FLAGS_UNGUARDED_ON_SEND 0x0002 /* Verify that the port is unguarded */ | ||
| 258 | #define MACH_MSG_GUARD_FLAGS_MASK 0x0003 /* Valid flag bits */ | ||
| 259 | typedef unsigned int mach_msg_guard_flags_t; | ||
| 260 | |||
| 261 | /* | ||
| 262 | * In a complex mach message, the mach_msg_header_t is followed by | ||
| 263 | * a descriptor count, then an array of that number of descriptors | ||
| 264 | * (mach_msg_*_descriptor_t). The type field of mach_msg_type_descriptor_t | ||
| 265 | * (which any descriptor can be cast to) indicates the flavor of the | ||
| 266 | * descriptor. | ||
| 267 | * | ||
| 268 | * Note that in LP64, the various types of descriptors are no longer all | ||
| 269 | * the same size as mach_msg_descriptor_t, so the array cannot be indexed | ||
| 270 | * as expected. | ||
| 271 | */ | ||
| 272 | |||
| 273 | typedef unsigned int mach_msg_descriptor_type_t; | ||
| 274 | |||
| 275 | #define MACH_MSG_PORT_DESCRIPTOR 0 | ||
| 276 | #define MACH_MSG_OOL_DESCRIPTOR 1 | ||
| 277 | #define MACH_MSG_OOL_PORTS_DESCRIPTOR 2 | ||
| 278 | #define MACH_MSG_OOL_VOLATILE_DESCRIPTOR 3 | ||
| 279 | #define MACH_MSG_GUARDED_PORT_DESCRIPTOR 4 | ||
| 280 | |||
| 281 | #pragma pack(push, 4) | ||
| 282 | |||
| 283 | typedef struct{ | ||
| 284 | 	natural_t pad1; | ||
| 285 | 	mach_msg_size_t pad2; | ||
| 286 | 	unsigned int pad3 : 24; | ||
| 287 | 	mach_msg_descriptor_type_t type : 8; | ||
| 288 | } mach_msg_type_descriptor_t; | ||
| 289 | |||
| 290 | typedef struct{ | ||
| 291 | 	mach_port_t name; | ||
| 292 | // Pad to 8 bytes everywhere except the K64 kernel where mach_port_t is 8 bytes | ||
| 293 | 	mach_msg_size_t pad1; | ||
| 294 | 	unsigned int pad2 : 16; | ||
| 295 | 	mach_msg_type_name_t disposition : 8; | ||
| 296 | 	mach_msg_descriptor_type_t type : 8; | ||
| 297 | } mach_msg_port_descriptor_t; | ||
| 298 | |||
| 299 | |||
| 300 | typedef struct{ | ||
| 301 | 	uint32_t address; | ||
| 302 | 	mach_msg_size_t size; | ||
| 303 | 	boolean_t deallocate: 8; | ||
| 304 | 	mach_msg_copy_options_t copy: 8; | ||
| 305 | 	unsigned int pad1: 8; | ||
| 306 | 	mach_msg_descriptor_type_t type: 8; | ||
| 307 | } mach_msg_ool_descriptor32_t; | ||
| 308 | |||
| 309 | typedef struct{ | ||
| 310 | 	uint64_t address; | ||
| 311 | 	boolean_t deallocate: 8; | ||
| 312 | 	mach_msg_copy_options_t copy: 8; | ||
| 313 | 	unsigned int pad1: 8; | ||
| 314 | 	mach_msg_descriptor_type_t type: 8; | ||
| 315 | 	mach_msg_size_t size; | ||
| 316 | } mach_msg_ool_descriptor64_t; | ||
| 317 | |||
| 318 | typedef struct{ | ||
| 319 | 	void* address; | ||
| 320 | #if !defined(__LP64__) | ||
| 321 | 	mach_msg_size_t size; | ||
| 322 | #endif | ||
| 323 | 	boolean_t deallocate: 8; | ||
| 324 | 	mach_msg_copy_options_t copy: 8; | ||
| 325 | 	unsigned int pad1: 8; | ||
| 326 | 	mach_msg_descriptor_type_t type: 8; | ||
| 327 | #if defined(__LP64__) | ||
| 328 | 	mach_msg_size_t size; | ||
| 329 | #endif | ||
| 330 | } mach_msg_ool_descriptor_t; | ||
| 331 | |||
| 332 | typedef struct{ | ||
| 333 | 	uint32_t address; | ||
| 334 | 	mach_msg_size_t count; | ||
| 335 | 	boolean_t deallocate: 8; | ||
| 336 | 	mach_msg_copy_options_t copy: 8; | ||
| 337 | 	mach_msg_type_name_t disposition : 8; | ||
| 338 | 	mach_msg_descriptor_type_t type : 8; | ||
| 339 | } mach_msg_ool_ports_descriptor32_t; | ||
| 340 | |||
| 341 | typedef struct{ | ||
| 342 | 	uint64_t address; | ||
| 343 | 	boolean_t deallocate: 8; | ||
| 344 | 	mach_msg_copy_options_t copy: 8; | ||
| 345 | 	mach_msg_type_name_t disposition : 8; | ||
| 346 | 	mach_msg_descriptor_type_t type : 8; | ||
| 347 | 	mach_msg_size_t count; | ||
| 348 | } mach_msg_ool_ports_descriptor64_t; | ||
| 349 | |||
| 350 | typedef struct{ | ||
| 351 | 	void* address; | ||
| 352 | #if !defined(__LP64__) | ||
| 353 | 	mach_msg_size_t count; | ||
| 354 | #endif | ||
| 355 | 	boolean_t deallocate: 8; | ||
| 356 | 	mach_msg_copy_options_t copy: 8; | ||
| 357 | 	mach_msg_type_name_t disposition : 8; | ||
| 358 | 	mach_msg_descriptor_type_t type : 8; | ||
| 359 | #if defined(__LP64__) | ||
| 360 | 	mach_msg_size_t count; | ||
| 361 | #endif | ||
| 362 | } mach_msg_ool_ports_descriptor_t; | ||
| 363 | |||
| 364 | typedef struct{ | ||
| 365 | 	uint32_t context; | ||
| 366 | 	mach_port_name_t name; | ||
| 367 | 	mach_msg_guard_flags_t flags : 16; | ||
| 368 | 	mach_msg_type_name_t disposition : 8; | ||
| 369 | 	mach_msg_descriptor_type_t type : 8; | ||
| 370 | } mach_msg_guarded_port_descriptor32_t; | ||
| 371 | |||
| 372 | typedef struct{ | ||
| 373 | 	uint64_t context; | ||
| 374 | 	mach_msg_guard_flags_t flags : 16; | ||
| 375 | 	mach_msg_type_name_t disposition : 8; | ||
| 376 | 	mach_msg_descriptor_type_t type : 8; | ||
| 377 | 	mach_port_name_t name; | ||
| 378 | } mach_msg_guarded_port_descriptor64_t; | ||
| 379 | |||
| 380 | typedef struct{ | ||
| 381 | 	mach_port_context_t context; | ||
| 382 | #if !defined(__LP64__) | ||
| 383 | 	mach_port_name_t name; | ||
| 384 | #endif | ||
| 385 | 	mach_msg_guard_flags_t flags : 16; | ||
| 386 | 	mach_msg_type_name_t disposition : 8; | ||
| 387 | 	mach_msg_descriptor_type_t type : 8; | ||
| 388 | #if defined(__LP64__) | ||
| 389 | 	mach_port_name_t name; | ||
| 390 | #endif /* defined(__LP64__) */ | ||
| 391 | } mach_msg_guarded_port_descriptor_t; | ||
| 392 | |||
| 393 | /* | ||
| 394 | * LP64support - This union definition is not really | ||
| 395 | * appropriate in LP64 mode because not all descriptors | ||
| 396 | * are of the same size in that environment. | ||
| 397 | */ | ||
| 398 | typedef union{ | ||
| 399 | 	mach_msg_port_descriptor_t port; | ||
| 400 | 	mach_msg_ool_descriptor_t out_of_line; | ||
| 401 | 	mach_msg_ool_ports_descriptor_t ool_ports; | ||
| 402 | 	mach_msg_type_descriptor_t type; | ||
| 403 | 	mach_msg_guarded_port_descriptor_t guarded_port; | ||
| 404 | } mach_msg_descriptor_t; | ||
| 405 | |||
| 406 | typedef struct{ | ||
| 407 | 	mach_msg_size_t msgh_descriptor_count; | ||
| 408 | } mach_msg_body_t; | ||
| 409 | |||
| 410 | #define MACH_MSG_BODY_NULL ((mach_msg_body_t *) 0) | ||
| 411 | #define MACH_MSG_DESCRIPTOR_NULL ((mach_msg_descriptor_t *) 0) | ||
| 412 | |||
| 413 | typedef struct{ | ||
| 414 | 	mach_msg_bits_t msgh_bits; | ||
| 415 | 	mach_msg_size_t msgh_size; | ||
| 416 | 	mach_port_t msgh_remote_port; | ||
| 417 | 	mach_port_t msgh_local_port; | ||
| 418 | 	mach_port_name_t msgh_voucher_port; | ||
| 419 | 	mach_msg_id_t msgh_id; | ||
| 420 | } mach_msg_header_t; | ||
| 421 | |||
| 422 | #define msgh_reserved msgh_voucher_port | ||
| 423 | #define MACH_MSG_NULL ((mach_msg_header_t *) 0) | ||
| 424 | |||
| 425 | typedef struct{ | ||
| 426 | 	mach_msg_header_t header; | ||
| 427 | 	mach_msg_body_t body; | ||
| 428 | } mach_msg_base_t; | ||
| 429 | |||
| 430 | |||
| 431 | typedef unsigned int mach_msg_trailer_type_t; | ||
| 432 | |||
| 433 | #define MACH_MSG_TRAILER_FORMAT_0 0 | ||
| 434 | |||
| 435 | typedef unsigned int mach_msg_trailer_size_t; | ||
| 436 | typedef char *mach_msg_trailer_info_t; | ||
| 437 | |||
| 438 | typedef struct{ | ||
| 439 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 440 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 441 | } mach_msg_trailer_t; | ||
| 442 | |||
| 443 | /* | ||
| 444 | * The msgh_seqno field carries a sequence number | ||
| 445 | * associated with the received-from port. A port's | ||
| 446 | * sequence number is incremented every time a message | ||
| 447 | * is received from it and included in the received | ||
| 448 | * trailer to help put messages back in sequence if | ||
| 449 | * multiple threads receive and/or process received | ||
| 450 | * messages. | ||
| 451 | */ | ||
| 452 | typedef struct{ | ||
| 453 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 454 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 455 | 	mach_port_seqno_t msgh_seqno; | ||
| 456 | } mach_msg_seqno_trailer_t; | ||
| 457 | |||
| 458 | typedef struct{ | ||
| 459 | 	unsigned int val[2]; | ||
| 460 | } security_token_t; | ||
| 461 | |||
| 462 | typedef struct{ | ||
| 463 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 464 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 465 | 	mach_port_seqno_t msgh_seqno; | ||
| 466 | 	security_token_t msgh_sender; | ||
| 467 | } mach_msg_security_trailer_t; | ||
| 468 | |||
| 469 | /* | ||
| 470 | * The audit token is an opaque token which identifies | ||
| 471 | * Mach tasks and senders of Mach messages as subjects | ||
| 472 | * to the BSM audit system. Only the appropriate BSM | ||
| 473 | * library routines should be used to interpret the | ||
| 474 | * contents of the audit token as the representation | ||
| 475 | * of the subject identity within the token may change | ||
| 476 | * over time. | ||
| 477 | */ | ||
| 478 | typedef struct{ | ||
| 479 | 	unsigned int val[8]; | ||
| 480 | } audit_token_t; | ||
| 481 | |||
| 482 | typedef struct{ | ||
| 483 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 484 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 485 | 	mach_port_seqno_t msgh_seqno; | ||
| 486 | 	security_token_t msgh_sender; | ||
| 487 | 	audit_token_t msgh_audit; | ||
| 488 | } mach_msg_audit_trailer_t; | ||
| 489 | |||
| 490 | typedef struct{ | ||
| 491 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 492 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 493 | 	mach_port_seqno_t msgh_seqno; | ||
| 494 | 	security_token_t msgh_sender; | ||
| 495 | 	audit_token_t msgh_audit; | ||
| 496 | 	mach_port_context_t msgh_context; | ||
| 497 | } mach_msg_context_trailer_t; | ||
| 498 | |||
| 499 | |||
| 500 | |||
| 501 | typedef struct{ | ||
| 502 | 	mach_port_name_t sender; | ||
| 503 | } msg_labels_t; | ||
| 504 | |||
| 505 | typedef int mach_msg_filter_id; | ||
| 506 | #define MACH_MSG_FILTER_POLICY_ALLOW (mach_msg_filter_id)0 | ||
| 507 | |||
| 508 | /* | ||
| 509 | * Trailer type to pass MAC policy label info as a mach message trailer. | ||
| 510 | * | ||
| 511 | */ | ||
| 512 | |||
| 513 | typedef struct{ | ||
| 514 | 	mach_msg_trailer_type_t msgh_trailer_type; | ||
| 515 | 	mach_msg_trailer_size_t msgh_trailer_size; | ||
| 516 | 	mach_port_seqno_t msgh_seqno; | ||
| 517 | 	security_token_t msgh_sender; | ||
| 518 | 	audit_token_t msgh_audit; | ||
| 519 | 	mach_port_context_t msgh_context; | ||
| 520 | 	mach_msg_filter_id msgh_ad; | ||
| 521 | 	msg_labels_t msgh_labels; | ||
| 522 | } mach_msg_mac_trailer_t; | ||
| 523 | |||
| 524 | |||
| 525 | #define MACH_MSG_TRAILER_MINIMUM_SIZE sizeof(mach_msg_trailer_t) | ||
| 526 | |||
| 527 | /* | ||
| 528 | * These values can change from release to release - but clearly | ||
| 529 | * code cannot request additional trailer elements one was not | ||
| 530 | * compiled to understand. Therefore, it is safe to use this | ||
| 531 | * constant when the same module specified the receive options. | ||
| 532 | * Otherwise, you run the risk that the options requested by | ||
| 533 | * another module may exceed the local modules notion of | ||
| 534 | * MAX_TRAILER_SIZE. | ||
| 535 | */ | ||
| 536 | |||
| 537 | typedef mach_msg_mac_trailer_t mach_msg_max_trailer_t; | ||
| 538 | #define MAX_TRAILER_SIZE ((mach_msg_size_t)sizeof(mach_msg_max_trailer_t)) | ||
| 539 | |||
| 540 | /* | ||
| 541 | * Legacy requirements keep us from ever updating these defines (even | ||
| 542 | * when the format_0 trailers gain new option data fields in the future). | ||
| 543 | * Therefore, they shouldn't be used going forward. Instead, the sizes | ||
| 544 | * should be compared against the specific element size requested using | ||
| 545 | * REQUESTED_TRAILER_SIZE. | ||
| 546 | */ | ||
| 547 | typedef mach_msg_security_trailer_t mach_msg_format_0_trailer_t; | ||
| 548 | |||
| 549 | /*typedef mach_msg_mac_trailer_t mach_msg_format_0_trailer_t; | ||
| 550 | */ | ||
| 551 | |||
| 552 | #define MACH_MSG_TRAILER_FORMAT_0_SIZE sizeof(mach_msg_format_0_trailer_t) | ||
| 553 | |||
| 554 | #define KERNEL_SECURITY_TOKEN_VALUE { {0, 1} } | ||
| 555 | extern const security_token_t KERNEL_SECURITY_TOKEN; | ||
| 556 | |||
| 557 | #define KERNEL_AUDIT_TOKEN_VALUE { {0, 0, 0, 0, 0, 0, 0, 0} } | ||
| 558 | extern const audit_token_t KERNEL_AUDIT_TOKEN; | ||
| 559 | |||
| 560 | typedef integer_t mach_msg_options_t; | ||
| 561 | |||
| 562 | typedef struct{ | ||
| 563 | 	mach_msg_header_t header; | ||
| 564 | } mach_msg_empty_send_t; | ||
| 565 | |||
| 566 | typedef struct{ | ||
| 567 | 	mach_msg_header_t header; | ||
| 568 | 	mach_msg_trailer_t trailer; | ||
| 569 | } mach_msg_empty_rcv_t; | ||
| 570 | |||
| 571 | typedef union{ | ||
| 572 | 	mach_msg_empty_send_t send; | ||
| 573 | 	mach_msg_empty_rcv_t rcv; | ||
| 574 | } mach_msg_empty_t; | ||
| 575 | |||
| 576 | #pragma pack(pop) | ||
| 577 | |||
| 578 | /* utility to round the message size - will become machine dependent */ | ||
| 579 | #define round_msg(x) (((mach_msg_size_t)(x) + sizeof (natural_t) - 1) & \ | ||
| 580 | 	 ~(sizeof (natural_t) - 1)) | ||
| 581 | |||
| 582 | |||
| 583 | /* | ||
| 584 | * There is no fixed upper bound to the size of Mach messages. | ||
| 585 | */ | ||
| 586 | #define MACH_MSG_SIZE_MAX ((mach_msg_size_t) ~0) | ||
| 587 | |||
| 588 | #if defined(__APPLE_API_PRIVATE) | ||
| 589 | /* | ||
| 590 | * But architectural limits of a given implementation, or | ||
| 591 | * temporal conditions may cause unpredictable send failures | ||
| 592 | * for messages larger than MACH_MSG_SIZE_RELIABLE. | ||
| 593 | * | ||
| 594 | * In either case, waiting for memory is [currently] outside | ||
| 595 | * the scope of send timeout values provided to IPC. | ||
| 596 | */ | ||
| 597 | #define MACH_MSG_SIZE_RELIABLE ((mach_msg_size_t) 256 * 1024) | ||
| 598 | #endif | ||
| 599 | /* | ||
| 600 | * Compatibility definitions, for code written | ||
| 601 | * when there was a msgh_kind instead of msgh_seqno. | ||
| 602 | */ | ||
| 603 | #define MACH_MSGH_KIND_NORMAL 0x00000000 | ||
| 604 | #define MACH_MSGH_KIND_NOTIFICATION 0x00000001 | ||
| 605 | #define msgh_kind msgh_seqno | ||
| 606 | #define mach_msg_kind_t mach_port_seqno_t | ||
| 607 | |||
| 608 | typedef natural_t mach_msg_type_size_t; | ||
| 609 | typedef natural_t mach_msg_type_number_t; | ||
| 610 | |||
| 611 | /* | ||
| 612 | * Values received/carried in messages. Tells the receiver what | ||
| 613 | * sort of port right he now has. | ||
| 614 | * | ||
| 615 | * MACH_MSG_TYPE_PORT_NAME is used to transfer a port name | ||
| 616 | * which should remain uninterpreted by the kernel. (Port rights | ||
| 617 | * are not transferred, just the port name.) | ||
| 618 | */ | ||
| 619 | |||
| 620 | #define MACH_MSG_TYPE_PORT_NONE 0 | ||
| 621 | |||
| 622 | #define MACH_MSG_TYPE_PORT_NAME 15 | ||
| 623 | #define MACH_MSG_TYPE_PORT_RECEIVE MACH_MSG_TYPE_MOVE_RECEIVE | ||
| 624 | #define MACH_MSG_TYPE_PORT_SEND MACH_MSG_TYPE_MOVE_SEND | ||
| 625 | #define MACH_MSG_TYPE_PORT_SEND_ONCE MACH_MSG_TYPE_MOVE_SEND_ONCE | ||
| 626 | |||
| 627 | #define MACH_MSG_TYPE_LAST 22 /* Last assigned */ | ||
| 628 | |||
| 629 | /* | ||
| 630 | * A dummy value. Mostly used to indicate that the actual value | ||
| 631 | * will be filled in later, dynamically. | ||
| 632 | */ | ||
| 633 | |||
| 634 | #define MACH_MSG_TYPE_POLYMORPHIC ((mach_msg_type_name_t) -1) | ||
| 635 | |||
| 636 | /* | ||
| 637 | *	Is a given item a port type? | ||
| 638 | */ | ||
| 639 | |||
| 640 | #define MACH_MSG_TYPE_PORT_ANY(x) \ | ||
| 641 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 642 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 643 | |||
| 644 | #define MACH_MSG_TYPE_PORT_ANY_SEND(x) \ | ||
| 645 | 	(((x) >= MACH_MSG_TYPE_MOVE_SEND) && \ | ||
| 646 | 	 ((x) <= MACH_MSG_TYPE_MAKE_SEND_ONCE)) | ||
| 647 | |||
| 648 | #define MACH_MSG_TYPE_PORT_ANY_RIGHT(x) \ | ||
| 649 | 	(((x) >= MACH_MSG_TYPE_MOVE_RECEIVE) && \ | ||
| 650 | 	 ((x) <= MACH_MSG_TYPE_MOVE_SEND_ONCE)) | ||
| 651 | |||
| 652 | typedef integer_t mach_msg_option_t; | ||
| 653 | |||
| 654 | #define MACH_MSG_OPTION_NONE 0x00000000 | ||
| 655 | |||
| 656 | #define MACH_SEND_MSG 0x00000001 | ||
| 657 | #define MACH_RCV_MSG 0x00000002 | ||
| 658 | |||
| 659 | #define MACH_RCV_LARGE 0x00000004 /* report large message sizes */ | ||
| 660 | #define MACH_RCV_LARGE_IDENTITY 0x00000008 /* identify source of large messages */ | ||
| 661 | |||
| 662 | #define MACH_SEND_TIMEOUT 0x00000010 /* timeout value applies to send */ | ||
| 663 | #define MACH_SEND_OVERRIDE 0x00000020 /* priority override for send */ | ||
| 664 | #define MACH_SEND_INTERRUPT 0x00000040 /* don't restart interrupted sends */ | ||
| 665 | #define MACH_SEND_NOTIFY 0x00000080 /* arm send-possible notify */ | ||
| 666 | #define MACH_SEND_ALWAYS 0x00010000 /* ignore qlimits - kernel only */ | ||
| 667 | #define MACH_SEND_FILTER_NONFATAL 0x00010000 /* rejection by message filter should return failure - user only */ | ||
| 668 | #define MACH_SEND_TRAILER 0x00020000 /* sender-provided trailer */ | ||
| 669 | #define MACH_SEND_NOIMPORTANCE 0x00040000 /* msg won't carry importance */ | ||
| 670 | #define MACH_SEND_NODENAP MACH_SEND_NOIMPORTANCE | ||
| 671 | #define MACH_SEND_IMPORTANCE 0x00080000 /* msg carries importance - kernel only */ | ||
| 672 | #define MACH_SEND_SYNC_OVERRIDE 0x00100000 /* msg should do sync IPC override (on legacy kernels) */ | ||
| 673 | #define MACH_SEND_PROPAGATE_QOS 0x00200000 /* IPC should propagate the caller's QoS */ | ||
| 674 | #define MACH_SEND_SYNC_USE_THRPRI MACH_SEND_PROPAGATE_QOS /* obsolete name */ | ||
| 675 | #define MACH_SEND_KERNEL 0x00400000 /* full send from kernel space - kernel only */ | ||
| 676 | #define MACH_SEND_SYNC_BOOTSTRAP_CHECKIN 0x00800000 /* special reply port should boost thread doing sync bootstrap checkin */ | ||
| 677 | |||
| 678 | #define MACH_RCV_TIMEOUT 0x00000100 /* timeout value applies to receive */ | ||
| 679 | #define MACH_RCV_NOTIFY 0x00000000 /* legacy name (value was: 0x00000200) */ | ||
| 680 | #define MACH_RCV_INTERRUPT 0x00000400 /* don't restart interrupted receive */ | ||
| 681 | #define MACH_RCV_VOUCHER 0x00000800 /* willing to receive voucher port */ | ||
| 682 | #define MACH_RCV_OVERWRITE 0x00000000 /* scatter receive (deprecated) */ | ||
| 683 | #define MACH_RCV_GUARDED_DESC 0x00001000 /* Can receive new guarded descriptor */ | ||
| 684 | #define MACH_RCV_SYNC_WAIT 0x00004000 /* sync waiter waiting for rcv */ | ||
| 685 | #define MACH_RCV_SYNC_PEEK 0x00008000 /* sync waiter waiting to peek */ | ||
| 686 | |||
| 687 | #define MACH_MSG_STRICT_REPLY 0x00000200 /* Enforce specific properties about the reply port, and | ||
| 688 | 	 * the context in which a thread replies to a message. | ||
| 689 | 	 * This flag must be passed on both the SEND and RCV */ | ||
| 690 | |||
| 691 | |||
| 692 | /* | ||
| 693 | * NOTE: a 0x00------ RCV mask implies to ask for | ||
| 694 | * a MACH_MSG_TRAILER_FORMAT_0 with 0 Elements, | ||
| 695 | * which is equivalent to a mach_msg_trailer_t. | ||
| 696 | * | ||
| 697 | * XXXMAC: unlike the rest of the MACH_RCV_* flags, MACH_RCV_TRAILER_LABELS | ||
| 698 | * needs its own private bit since we only calculate its fields when absolutely | ||
| 699 | * required. | ||
| 700 | */ | ||
| 701 | #define MACH_RCV_TRAILER_NULL 0 | ||
| 702 | #define MACH_RCV_TRAILER_SEQNO 1 | ||
| 703 | #define MACH_RCV_TRAILER_SENDER 2 | ||
| 704 | #define MACH_RCV_TRAILER_AUDIT 3 | ||
| 705 | #define MACH_RCV_TRAILER_CTX 4 | ||
| 706 | #define MACH_RCV_TRAILER_AV 7 | ||
| 707 | #define MACH_RCV_TRAILER_LABELS 8 | ||
| 708 | |||
| 709 | #define MACH_RCV_TRAILER_TYPE(x) (((x) & 0xf) << 28) | ||
| 710 | #define MACH_RCV_TRAILER_ELEMENTS(x) (((x) & 0xf) << 24) | ||
| 711 | #define MACH_RCV_TRAILER_MASK ((0xf << 24)) | ||
| 712 | |||
| 713 | #define GET_RCV_ELEMENTS(y) (((y) >> 24) & 0xf) | ||
| 714 | |||
| 715 | |||
| 716 | /* | ||
| 717 | * XXXMAC: note that in the case of MACH_RCV_TRAILER_LABELS, | ||
| 718 | * we just fall through to mach_msg_max_trailer_t. | ||
| 719 | * This is correct behavior since mach_msg_max_trailer_t is defined as | ||
| 720 | * mac_msg_mac_trailer_t which is used for the LABELS trailer. | ||
| 721 | * It also makes things work properly if MACH_RCV_TRAILER_LABELS is ORed | ||
| 722 | * with one of the other options. | ||
| 723 | */ | ||
| 724 | |||
| 725 | #define REQUESTED_TRAILER_SIZE_NATIVE(y) \ | ||
| 726 | 	((mach_msg_trailer_size_t) \ | ||
| 727 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_NULL) ? \ | ||
| 728 | 	 sizeof(mach_msg_trailer_t) : \ | ||
| 729 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SEQNO) ? \ | ||
| 730 | 	 sizeof(mach_msg_seqno_trailer_t) : \ | ||
| 731 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_SENDER) ? \ | ||
| 732 | 	 sizeof(mach_msg_security_trailer_t) : \ | ||
| 733 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AUDIT) ? \ | ||
| 734 | 	 sizeof(mach_msg_audit_trailer_t) : \ | ||
| 735 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_CTX) ? \ | ||
| 736 | 	 sizeof(mach_msg_context_trailer_t) : \ | ||
| 737 | 	 ((GET_RCV_ELEMENTS(y) == MACH_RCV_TRAILER_AV) ? \ | ||
| 738 | 	 sizeof(mach_msg_mac_trailer_t) : \ | ||
| 739 | 	 sizeof(mach_msg_max_trailer_t)))))))) | ||
| 740 | |||
| 741 | |||
| 742 | #define REQUESTED_TRAILER_SIZE(y) REQUESTED_TRAILER_SIZE_NATIVE(y) | ||
| 743 | |||
| 744 | /* | ||
| 745 | * Much code assumes that mach_msg_return_t == kern_return_t. | ||
| 746 | * This definition is useful for descriptive purposes. | ||
| 747 | * | ||
| 748 | * See <mach/error.h> for the format of error codes. | ||
| 749 | * IPC errors are system 4. Send errors are subsystem 0; | ||
| 750 | * receive errors are subsystem 1. The code field is always non-zero. | ||
| 751 | * The high bits of the code field communicate extra information | ||
| 752 | * for some error codes. MACH_MSG_MASK masks off these special bits. | ||
| 753 | */ | ||
| 754 | |||
| 755 | typedef kern_return_t mach_msg_return_t; | ||
| 756 | |||
| 757 | #define MACH_MSG_SUCCESS 0x00000000 | ||
| 758 | |||
| 759 | |||
| 760 | #define MACH_MSG_MASK 0x00003e00 | ||
| 761 | /* All special error code bits defined below. */ | ||
| 762 | #define MACH_MSG_IPC_SPACE 0x00002000 | ||
| 763 | /* No room in IPC name space for another capability name. */ | ||
| 764 | #define MACH_MSG_VM_SPACE 0x00001000 | ||
| 765 | /* No room in VM address space for out-of-line memory. */ | ||
| 766 | #define MACH_MSG_IPC_KERNEL 0x00000800 | ||
| 767 | /* Kernel resource shortage handling an IPC capability. */ | ||
| 768 | #define MACH_MSG_VM_KERNEL 0x00000400 | ||
| 769 | /* Kernel resource shortage handling out-of-line memory. */ | ||
| 770 | |||
| 771 | #define MACH_SEND_IN_PROGRESS 0x10000001 | ||
| 772 | /* Thread is waiting to send. (Internal use only.) */ | ||
| 773 | #define MACH_SEND_INVALID_DATA 0x10000002 | ||
| 774 | /* Bogus in-line data. */ | ||
| 775 | #define MACH_SEND_INVALID_DEST 0x10000003 | ||
| 776 | /* Bogus destination port. */ | ||
| 777 | #define MACH_SEND_TIMED_OUT 0x10000004 | ||
| 778 | /* Message not sent before timeout expired. */ | ||
| 779 | #define MACH_SEND_INVALID_VOUCHER 0x10000005 | ||
| 780 | /* Bogus voucher port. */ | ||
| 781 | #define MACH_SEND_INTERRUPTED 0x10000007 | ||
| 782 | /* Software interrupt. */ | ||
| 783 | #define MACH_SEND_MSG_TOO_SMALL 0x10000008 | ||
| 784 | /* Data doesn't contain a complete message. */ | ||
| 785 | #define MACH_SEND_INVALID_REPLY 0x10000009 | ||
| 786 | /* Bogus reply port. */ | ||
| 787 | #define MACH_SEND_INVALID_RIGHT 0x1000000a | ||
| 788 | /* Bogus port rights in the message body. */ | ||
| 789 | #define MACH_SEND_INVALID_NOTIFY 0x1000000b | ||
| 790 | /* Bogus notify port argument. */ | ||
| 791 | #define MACH_SEND_INVALID_MEMORY 0x1000000c | ||
| 792 | /* Invalid out-of-line memory pointer. */ | ||
| 793 | #define MACH_SEND_NO_BUFFER 0x1000000d | ||
| 794 | /* No message buffer is available. */ | ||
| 795 | #define MACH_SEND_TOO_LARGE 0x1000000e | ||
| 796 | /* Send is too large for port */ | ||
| 797 | #define MACH_SEND_INVALID_TYPE 0x1000000f | ||
| 798 | /* Invalid msg-type specification. */ | ||
| 799 | #define MACH_SEND_INVALID_HEADER 0x10000010 | ||
| 800 | /* A field in the header had a bad value. */ | ||
| 801 | #define MACH_SEND_INVALID_TRAILER 0x10000011 | ||
| 802 | /* The trailer to be sent does not match kernel format. */ | ||
| 803 | #define MACH_SEND_INVALID_CONTEXT 0x10000012 | ||
| 804 | /* The sending thread context did not match the context on the dest port */ | ||
| 805 | #define MACH_SEND_INVALID_RT_OOL_SIZE 0x10000015 | ||
| 806 | /* compatibility: no longer a returned error */ | ||
| 807 | #define MACH_SEND_NO_GRANT_DEST 0x10000016 | ||
| 808 | /* The destination port doesn't accept ports in body */ | ||
| 809 | #define MACH_SEND_MSG_FILTERED 0x10000017 | ||
| 810 | /* Message send was rejected by message filter */ | ||
| 811 | |||
| 812 | #define MACH_RCV_IN_PROGRESS 0x10004001 | ||
| 813 | /* Thread is waiting for receive. (Internal use only.) */ | ||
| 814 | #define MACH_RCV_INVALID_NAME 0x10004002 | ||
| 815 | /* Bogus name for receive port/port-set. */ | ||
| 816 | #define MACH_RCV_TIMED_OUT 0x10004003 | ||
| 817 | /* Didn't get a message within the timeout value. */ | ||
| 818 | #define MACH_RCV_TOO_LARGE 0x10004004 | ||
| 819 | /* Message buffer is not large enough for inline data. */ | ||
| 820 | #define MACH_RCV_INTERRUPTED 0x10004005 | ||
| 821 | /* Software interrupt. */ | ||
| 822 | #define MACH_RCV_PORT_CHANGED 0x10004006 | ||
| 823 | /* compatibility: no longer a returned error */ | ||
| 824 | #define MACH_RCV_INVALID_NOTIFY 0x10004007 | ||
| 825 | /* Bogus notify port argument. */ | ||
| 826 | #define MACH_RCV_INVALID_DATA 0x10004008 | ||
| 827 | /* Bogus message buffer for inline data. */ | ||
| 828 | #define MACH_RCV_PORT_DIED 0x10004009 | ||
| 829 | /* Port/set was sent away/died during receive. */ | ||
| 830 | #define MACH_RCV_IN_SET 0x1000400a | ||
| 831 | /* compatibility: no longer a returned error */ | ||
| 832 | #define MACH_RCV_HEADER_ERROR 0x1000400b | ||
| 833 | /* Error receiving message header. See special bits. */ | ||
| 834 | #define MACH_RCV_BODY_ERROR 0x1000400c | ||
| 835 | /* Error receiving message body. See special bits. */ | ||
| 836 | #define MACH_RCV_INVALID_TYPE 0x1000400d | ||
| 837 | /* Invalid msg-type specification in scatter list. */ | ||
| 838 | #define MACH_RCV_SCATTER_SMALL 0x1000400e | ||
| 839 | /* Out-of-line overwrite region is not large enough */ | ||
| 840 | #define MACH_RCV_INVALID_TRAILER 0x1000400f | ||
| 841 | /* trailer type or number of trailer elements not supported */ | ||
| 842 | #define MACH_RCV_IN_PROGRESS_TIMED 0x10004011 | ||
| 843 | /* Waiting for receive with timeout. (Internal use only.) */ | ||
| 844 | #define MACH_RCV_INVALID_REPLY 0x10004012 | ||
| 845 | /* invalid reply port used in a STRICT_REPLY message */ | ||
| 846 | |||
| 847 | |||
| 848 | |||
| 849 | __BEGIN_DECLS | ||
| 850 | |||
| 851 | /* | ||
| 852 | *	Routine:	mach_msg_overwrite | ||
| 853 | *	Purpose: | ||
| 854 | *		Send and/or receive a message. If the message operation | ||
| 855 | *		is interrupted, and the user did not request an indication | ||
| 856 | *		of that fact, then restart the appropriate parts of the | ||
| 857 | *		operation silently (trap version does not restart). | ||
| 858 | * | ||
| 859 | *		Distinct send and receive buffers may be specified. If | ||
| 860 | *		no separate receive buffer is specified, the msg parameter | ||
| 861 | *		will be used for both send and receive operations. | ||
| 862 | * | ||
| 863 | *		In addition to a distinct receive buffer, that buffer may | ||
| 864 | *		already contain scatter control information to direct the | ||
| 865 | *		receiving of the message. | ||
| 866 | */ | ||
| 867 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 868 | extern mach_msg_return_t mach_msg_overwrite( | ||
| 869 | 	mach_msg_header_t *msg, | ||
| 870 | 	mach_msg_option_t option, | ||
| 871 | 	mach_msg_size_t send_size, | ||
| 872 | 	mach_msg_size_t rcv_size, | ||
| 873 | 	mach_port_name_t rcv_name, | ||
| 874 | 	mach_msg_timeout_t timeout, | ||
| 875 | 	mach_port_name_t notify, | ||
| 876 | 	mach_msg_header_t *rcv_msg, | ||
| 877 | 	mach_msg_size_t rcv_limit); | ||
| 878 | |||
| 879 | |||
| 880 | /* | ||
| 881 | *	Routine:	mach_msg | ||
| 882 | *	Purpose: | ||
| 883 | *		Send and/or receive a message. If the message operation | ||
| 884 | *		is interrupted, and the user did not request an indication | ||
| 885 | *		of that fact, then restart the appropriate parts of the | ||
| 886 | *		operation silently (trap version does not restart). | ||
| 887 | */ | ||
| 888 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 889 | extern mach_msg_return_t mach_msg( | ||
| 890 | 	mach_msg_header_t *msg, | ||
| 891 | 	mach_msg_option_t option, | ||
| 892 | 	mach_msg_size_t send_size, | ||
| 893 | 	mach_msg_size_t rcv_size, | ||
| 894 | 	mach_port_name_t rcv_name, | ||
| 895 | 	mach_msg_timeout_t timeout, | ||
| 896 | 	mach_port_name_t notify); | ||
| 897 | |||
| 898 | /* | ||
| 899 | *	Routine:	mach_voucher_deallocate | ||
| 900 | *	Purpose: | ||
| 901 | *		Deallocate a mach voucher created or received in a message. Drops | ||
| 902 | *		one (send right) reference to the voucher. | ||
| 903 | */ | ||
| 904 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 905 | extern kern_return_t mach_voucher_deallocate( | ||
| 906 | 	mach_port_name_t voucher); | ||
| 907 | |||
| 908 | |||
| 909 | __END_DECLS | ||
| 910 | |||
| 911 | #endif /* _MACH_MESSAGE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/mig.h deleted-179| ... | @@ -1,179 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Mach MIG Subsystem Interfaces | ||
| 34 | */ | ||
| 35 | |||
| 36 | #ifndef _MACH_MIG_H_ | ||
| 37 | #define _MACH_MIG_H_ | ||
| 38 | |||
| 39 | #include <stdint.h> | ||
| 40 | #include <mach/port.h> | ||
| 41 | #include <mach/message.h> | ||
| 42 | #include <mach/vm_types.h> | ||
| 43 | |||
| 44 | #include <sys/cdefs.h> | ||
| 45 | |||
| 46 | #if defined(MACH_KERNEL) | ||
| 47 | |||
| 48 | #if !defined(__MigTypeCheck) | ||
| 49 | /* Turn MIG type checking on by default for kernel */ | ||
| 50 | #define __MigTypeCheck 1 | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #define __MigKernelSpecificCode 1 | ||
| 54 | #define _MIG_KERNEL_SPECIFIC_CODE_ 1 | ||
| 55 | |||
| 56 | #elif !defined(__MigTypeCheck) | ||
| 57 | |||
| 58 | #if defined(TypeCheck) | ||
| 59 | /* use legacy setting (temporary) */ | ||
| 60 | #define __MigTypeCheck TypeCheck | ||
| 61 | #else | ||
| 62 | /* default MIG type checking on */ | ||
| 63 | #define __MigTypeCheck 1 | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #endif /* !defined(MACH_KERNEL) && !defined(__MigTypeCheck) */ | ||
| 67 | |||
| 68 | /* | ||
| 69 | * Pack MIG message structs. | ||
| 70 | * This is an indicator of the need to view shared structs in a | ||
| 71 | * binary-compatible format - and MIG message structs are no different. | ||
| 72 | */ | ||
| 73 | #define __MigPackStructs 1 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Definition for MIG-generated server stub routines. These routines | ||
| 77 | * unpack the request message, call the server procedure, and pack the | ||
| 78 | * reply message. | ||
| 79 | */ | ||
| 80 | typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, | ||
| 81 | mach_msg_header_t *OutHeadP); | ||
| 82 | |||
| 83 | typedef mig_stub_routine_t mig_routine_t; | ||
| 84 | |||
| 85 | /* | ||
| 86 | * Definition for MIG-generated server routine. This routine takes a | ||
| 87 | * message, and returns the appropriate stub function for handling that | ||
| 88 | * message. | ||
| 89 | */ | ||
| 90 | typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Generic definition for implementation routines. These routines do | ||
| 94 | * the real work associated with this request. This generic type is | ||
| 95 | * used for keeping the pointers in the subsystem array. | ||
| 96 | */ | ||
| 97 | typedef kern_return_t (*mig_impl_routine_t)(void); | ||
| 98 | |||
| 99 | typedef mach_msg_type_descriptor_t routine_arg_descriptor; | ||
| 100 | typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; | ||
| 101 | typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; | ||
| 102 | |||
| 103 | #define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0) | ||
| 104 | |||
| 105 | struct routine_descriptor { | ||
| 106 | 	mig_impl_routine_t impl_routine; /* Server work func pointer */ | ||
| 107 | 	mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ | ||
| 108 | 	unsigned int argc; /* Number of argument words */ | ||
| 109 | 	unsigned int descr_count; /* Number complex descriptors */ | ||
| 110 | 	routine_arg_descriptor_t | ||
| 111 | 	 arg_descr; /* pointer to descriptor array*/ | ||
| 112 | 	unsigned int max_reply_msg; /* Max size for reply msg */ | ||
| 113 | }; | ||
| 114 | typedef struct routine_descriptor *routine_descriptor_t; | ||
| 115 | |||
| 116 | typedef struct routine_descriptor mig_routine_descriptor; | ||
| 117 | typedef mig_routine_descriptor *mig_routine_descriptor_t; | ||
| 118 | |||
| 119 | #define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0) | ||
| 120 | |||
| 121 | typedef struct mig_subsystem { | ||
| 122 | 	mig_server_routine_t server; /* pointer to demux routine	*/ | ||
| 123 | 	mach_msg_id_t start; /* Min routine number	 */ | ||
| 124 | 	mach_msg_id_t end; /* Max routine number + 1 */ | ||
| 125 | 	mach_msg_size_t maxsize; /* Max reply message size */ | ||
| 126 | 	vm_address_t reserved; /* reserved for MIG use	 */ | ||
| 127 | 	mig_routine_descriptor | ||
| 128 | 	 routine[1]; /* Routine descriptor array */ | ||
| 129 | } *mig_subsystem_t; | ||
| 130 | |||
| 131 | #define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0) | ||
| 132 | |||
| 133 | typedef struct mig_symtab { | ||
| 134 | 	char *ms_routine_name; | ||
| 135 | 	int ms_routine_number; | ||
| 136 | 	void (*ms_routine)(void); /* Since the functions in the | ||
| 137 | 	 * symbol table have unknown | ||
| 138 | 	 * signatures, this is the best | ||
| 139 | 	 * we can do... | ||
| 140 | 	 */ | ||
| 141 | } mig_symtab_t; | ||
| 142 | |||
| 143 | /* | ||
| 144 | * A compiler attribute for annotating all MIG server routines and other | ||
| 145 | * functions that should behave similarly. Allows the compiler to perform | ||
| 146 | * additional static bug-finding over them. | ||
| 147 | */ | ||
| 148 | #if __has_attribute(mig_server_routine) | ||
| 149 | #define MIG_SERVER_ROUTINE __attribute__((mig_server_routine)) | ||
| 150 | #else | ||
| 151 | #define MIG_SERVER_ROUTINE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | __BEGIN_DECLS | ||
| 155 | |||
| 156 | /* Client side reply port allocate */ | ||
| 157 | extern mach_port_t mig_get_reply_port(void); | ||
| 158 | |||
| 159 | /* Client side reply port deallocate */ | ||
| 160 | extern void mig_dealloc_reply_port(mach_port_t reply_port); | ||
| 161 | |||
| 162 | /* Client side reply port "deallocation" */ | ||
| 163 | extern void mig_put_reply_port(mach_port_t reply_port); | ||
| 164 | |||
| 165 | /* Bounded string copy */ | ||
| 166 | extern int mig_strncpy(char *dest, const char *src, int len); | ||
| 167 | extern int mig_strncpy_zerofill(char *dest, const char *src, int len); | ||
| 168 | |||
| 169 | |||
| 170 | /* Allocate memory for out-of-line mig structures */ | ||
| 171 | extern void mig_allocate(vm_address_t *, vm_size_t); | ||
| 172 | |||
| 173 | /* Deallocate memory used for out-of-line mig structures */ | ||
| 174 | extern void mig_deallocate(vm_address_t, vm_size_t); | ||
| 175 | |||
| 176 | |||
| 177 | __END_DECLS | ||
| 178 | |||
| 179 | #endif /* _MACH_MIG_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/port.h deleted-477| ... | @@ -1,477 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2006 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | * NOTICE: This file was modified by McAfee Research in 2004 to introduce | ||
| 58 | * support for mandatory and extensible security protections. This notice | ||
| 59 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 60 | * Version 2.0. | ||
| 61 | */ | ||
| 62 | /* | ||
| 63 | */ | ||
| 64 | /* | ||
| 65 | *	File:	mach/port.h | ||
| 66 | * | ||
| 67 | *	Definition of a Mach port | ||
| 68 | * | ||
| 69 | *	Mach ports are the endpoints to Mach-implemented communications | ||
| 70 | *	channels (usually uni-directional message queues, but other types | ||
| 71 | *	also exist). | ||
| 72 | * | ||
| 73 | *	Unique collections of these endpoints are maintained for each | ||
| 74 | *	Mach task. Each Mach port in the task's collection is given a | ||
| 75 | *	[task-local] name to identify it - and the the various "rights" | ||
| 76 | *	held by the task for that specific endpoint. | ||
| 77 | * | ||
| 78 | *	This header defines the types used to identify these Mach ports | ||
| 79 | *	and the various rights associated with them. For more info see: | ||
| 80 | * | ||
| 81 | *	<mach/mach_port.h> - manipulation of port rights in a given space | ||
| 82 | *	<mach/message.h> - message queue [and port right passing] mechanism | ||
| 83 | * | ||
| 84 | */ | ||
| 85 | |||
| 86 | #ifndef _MACH_PORT_H_ | ||
| 87 | #define _MACH_PORT_H_ | ||
| 88 | |||
| 89 | #include <sys/cdefs.h> | ||
| 90 | #include <stdint.h> | ||
| 91 | #include <mach/boolean.h> | ||
| 92 | #include <mach/machine/vm_types.h> | ||
| 93 | |||
| 94 | /* | ||
| 95 | *	mach_port_name_t - the local identity for a Mach port | ||
| 96 | * | ||
| 97 | *	The name is Mach port namespace specific. It is used to | ||
| 98 | *	identify the rights held for that port by the task whose | ||
| 99 | *	namespace is implied [or specifically provided]. | ||
| 100 | * | ||
| 101 | *	Use of this type usually implies just a name - no rights. | ||
| 102 | *	See mach_port_t for a type that implies a "named right." | ||
| 103 | * | ||
| 104 | */ | ||
| 105 | |||
| 106 | typedef natural_t mach_port_name_t; | ||
| 107 | typedef mach_port_name_t *mach_port_name_array_t; | ||
| 108 | |||
| 109 | |||
| 110 | /* | ||
| 111 | *	mach_port_t - a named port right | ||
| 112 | * | ||
| 113 | *	In user-space, "rights" are represented by the name of the | ||
| 114 | *	right in the Mach port namespace. Even so, this type is | ||
| 115 | *	presented as a unique one to more clearly denote the presence | ||
| 116 | *	of a right coming along with the name. | ||
| 117 | * | ||
| 118 | *	Often, various rights for a port held in a single name space | ||
| 119 | *	will coalesce and are, therefore, be identified by a single name | ||
| 120 | *	[this is the case for send and receive rights]. But not | ||
| 121 | *	always [send-once rights currently get a unique name for | ||
| 122 | *	each right]. | ||
| 123 | * | ||
| 124 | */ | ||
| 125 | |||
| 126 | #include <sys/_types.h> | ||
| 127 | #include <sys/_types/_mach_port_t.h> | ||
| 128 | |||
| 129 | |||
| 130 | typedef mach_port_t *mach_port_array_t; | ||
| 131 | |||
| 132 | /* | ||
| 133 | * MACH_PORT_NULL is a legal value that can be carried in messages. | ||
| 134 | * It indicates the absence of any port or port rights. (A port | ||
| 135 | * argument keeps the message from being "simple", even if the | ||
| 136 | * value is MACH_PORT_NULL.) The value MACH_PORT_DEAD is also a legal | ||
| 137 | * value that can be carried in messages. It indicates | ||
| 138 | * that a port right was present, but it died. | ||
| 139 | */ | ||
| 140 | |||
| 141 | #define MACH_PORT_NULL 0 /* intentional loose typing */ | ||
| 142 | #define MACH_PORT_DEAD ((mach_port_name_t) ~0) | ||
| 143 | #define MACH_PORT_VALID(name) \ | ||
| 144 | 	 (((name) != MACH_PORT_NULL) && \ | ||
| 145 | 	 ((name) != MACH_PORT_DEAD)) | ||
| 146 | |||
| 147 | |||
| 148 | /* | ||
| 149 | *	For kernel-selected [assigned] port names, the name is | ||
| 150 | *	comprised of two parts: a generation number and an index. | ||
| 151 | *	This approach keeps the exact same name from being generated | ||
| 152 | *	and reused too quickly [to catch right/reference counting bugs]. | ||
| 153 | *	The dividing line between the constituent parts is exposed so | ||
| 154 | *	that efficient "mach_port_name_t to data structure pointer" | ||
| 155 | *	conversion implementation can be made. But it is possible | ||
| 156 | *	for user-level code to assign their own names to Mach ports. | ||
| 157 | *	These are not required to participate in this algorithm. So | ||
| 158 | *	care should be taken before "assuming" this model. | ||
| 159 | * | ||
| 160 | */ | ||
| 161 | |||
| 162 | #ifndef NO_PORT_GEN | ||
| 163 | |||
| 164 | #define MACH_PORT_INDEX(name) ((name) >> 8) | ||
| 165 | #define MACH_PORT_GEN(name) (((name) & 0xff) << 24) | ||
| 166 | #define MACH_PORT_MAKE(index, gen) \ | ||
| 167 | 	 (((index) << 8) | (gen) >> 24) | ||
| 168 | |||
| 169 | #else /* NO_PORT_GEN */ | ||
| 170 | |||
| 171 | #define MACH_PORT_INDEX(name) (name) | ||
| 172 | #define MACH_PORT_GEN(name) (0) | ||
| 173 | #define MACH_PORT_MAKE(index, gen) (index) | ||
| 174 | |||
| 175 | #endif /* NO_PORT_GEN */ | ||
| 176 | |||
| 177 | |||
| 178 | /* | ||
| 179 | * These are the different rights a task may have for a port. | ||
| 180 | * The MACH_PORT_RIGHT_* definitions are used as arguments | ||
| 181 | * to mach_port_allocate, mach_port_get_refs, etc, to specify | ||
| 182 | * a particular right to act upon. The mach_port_names and | ||
| 183 | * mach_port_type calls return bitmasks using the MACH_PORT_TYPE_* | ||
| 184 | * definitions. This is because a single name may denote | ||
| 185 | * multiple rights. | ||
| 186 | */ | ||
| 187 | |||
| 188 | typedef natural_t mach_port_right_t; | ||
| 189 | |||
| 190 | #define MACH_PORT_RIGHT_SEND ((mach_port_right_t) 0) | ||
| 191 | #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) | ||
| 192 | #define MACH_PORT_RIGHT_SEND_ONCE ((mach_port_right_t) 2) | ||
| 193 | #define MACH_PORT_RIGHT_PORT_SET ((mach_port_right_t) 3) | ||
| 194 | #define MACH_PORT_RIGHT_DEAD_NAME ((mach_port_right_t) 4) | ||
| 195 | #define MACH_PORT_RIGHT_LABELH ((mach_port_right_t) 5) /* obsolete right */ | ||
| 196 | #define MACH_PORT_RIGHT_NUMBER ((mach_port_right_t) 6) /* right not implemented */ | ||
| 197 | |||
| 198 | |||
| 199 | typedef natural_t mach_port_type_t; | ||
| 200 | typedef mach_port_type_t *mach_port_type_array_t; | ||
| 201 | |||
| 202 | #define MACH_PORT_TYPE(right) \ | ||
| 203 | 	 ((mach_port_type_t)(((mach_port_type_t) 1) \ | ||
| 204 | 	 << ((right) + ((mach_port_right_t) 16)))) | ||
| 205 | #define MACH_PORT_TYPE_NONE ((mach_port_type_t) 0L) | ||
| 206 | #define MACH_PORT_TYPE_SEND MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND) | ||
| 207 | #define MACH_PORT_TYPE_RECEIVE MACH_PORT_TYPE(MACH_PORT_RIGHT_RECEIVE) | ||
| 208 | #define MACH_PORT_TYPE_SEND_ONCE MACH_PORT_TYPE(MACH_PORT_RIGHT_SEND_ONCE) | ||
| 209 | #define MACH_PORT_TYPE_PORT_SET MACH_PORT_TYPE(MACH_PORT_RIGHT_PORT_SET) | ||
| 210 | #define MACH_PORT_TYPE_DEAD_NAME MACH_PORT_TYPE(MACH_PORT_RIGHT_DEAD_NAME) | ||
| 211 | #define MACH_PORT_TYPE_LABELH MACH_PORT_TYPE(MACH_PORT_RIGHT_LABELH) /* obsolete */ | ||
| 212 | |||
| 213 | |||
| 214 | /* Convenient combinations. */ | ||
| 215 | |||
| 216 | #define MACH_PORT_TYPE_SEND_RECEIVE \ | ||
| 217 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_RECEIVE) | ||
| 218 | #define MACH_PORT_TYPE_SEND_RIGHTS \ | ||
| 219 | 	 (MACH_PORT_TYPE_SEND|MACH_PORT_TYPE_SEND_ONCE) | ||
| 220 | #define MACH_PORT_TYPE_PORT_RIGHTS \ | ||
| 221 | 	 (MACH_PORT_TYPE_SEND_RIGHTS|MACH_PORT_TYPE_RECEIVE) | ||
| 222 | #define MACH_PORT_TYPE_PORT_OR_DEAD \ | ||
| 223 | 	 (MACH_PORT_TYPE_PORT_RIGHTS|MACH_PORT_TYPE_DEAD_NAME) | ||
| 224 | #define MACH_PORT_TYPE_ALL_RIGHTS \ | ||
| 225 | 	 (MACH_PORT_TYPE_PORT_OR_DEAD|MACH_PORT_TYPE_PORT_SET) | ||
| 226 | |||
| 227 | /* Dummy type bits that mach_port_type/mach_port_names can return. */ | ||
| 228 | |||
| 229 | #define MACH_PORT_TYPE_DNREQUEST 0x80000000 | ||
| 230 | #define MACH_PORT_TYPE_SPREQUEST 0x40000000 | ||
| 231 | #define MACH_PORT_TYPE_SPREQUEST_DELAYED 0x20000000 | ||
| 232 | |||
| 233 | /* User-references for capabilities. */ | ||
| 234 | |||
| 235 | typedef natural_t mach_port_urefs_t; | ||
| 236 | typedef integer_t mach_port_delta_t; /* change in urefs */ | ||
| 237 | |||
| 238 | /* Attributes of ports. (See mach_port_get_receive_status.) */ | ||
| 239 | |||
| 240 | typedef natural_t mach_port_seqno_t; /* sequence number */ | ||
| 241 | typedef natural_t mach_port_mscount_t; /* make-send count */ | ||
| 242 | typedef natural_t mach_port_msgcount_t; /* number of msgs */ | ||
| 243 | typedef natural_t mach_port_rights_t; /* number of rights */ | ||
| 244 | |||
| 245 | /* | ||
| 246 | *	Are there outstanding send rights for a given port? | ||
| 247 | */ | ||
| 248 | #define MACH_PORT_SRIGHTS_NONE 0 /* no srights */ | ||
| 249 | #define MACH_PORT_SRIGHTS_PRESENT 1 /* srights */ | ||
| 250 | typedef unsigned int mach_port_srights_t; /* status of send rights */ | ||
| 251 | |||
| 252 | typedef struct mach_port_status { | ||
| 253 | 	mach_port_rights_t mps_pset; /* count of containing port sets */ | ||
| 254 | 	mach_port_seqno_t mps_seqno; /* sequence number */ | ||
| 255 | 	mach_port_mscount_t mps_mscount; /* make-send count */ | ||
| 256 | 	mach_port_msgcount_t mps_qlimit; /* queue limit */ | ||
| 257 | 	mach_port_msgcount_t mps_msgcount; /* number in the queue */ | ||
| 258 | 	mach_port_rights_t mps_sorights; /* how many send-once rights */ | ||
| 259 | 	boolean_t mps_srights; /* do send rights exist? */ | ||
| 260 | 	boolean_t mps_pdrequest; /* port-deleted requested? */ | ||
| 261 | 	boolean_t mps_nsrequest; /* no-senders requested? */ | ||
| 262 | 	natural_t mps_flags; /* port flags */ | ||
| 263 | } mach_port_status_t; | ||
| 264 | |||
| 265 | /* System-wide values for setting queue limits on a port */ | ||
| 266 | #define MACH_PORT_QLIMIT_ZERO (0) | ||
| 267 | #define MACH_PORT_QLIMIT_BASIC (5) | ||
| 268 | #define MACH_PORT_QLIMIT_SMALL (16) | ||
| 269 | #define MACH_PORT_QLIMIT_LARGE (1024) | ||
| 270 | #define MACH_PORT_QLIMIT_KERNEL (65534) | ||
| 271 | #define MACH_PORT_QLIMIT_MIN MACH_PORT_QLIMIT_ZERO | ||
| 272 | #define MACH_PORT_QLIMIT_DEFAULT MACH_PORT_QLIMIT_BASIC | ||
| 273 | #define MACH_PORT_QLIMIT_MAX MACH_PORT_QLIMIT_LARGE | ||
| 274 | |||
| 275 | typedef struct mach_port_limits { | ||
| 276 | 	mach_port_msgcount_t mpl_qlimit; /* number of msgs */ | ||
| 277 | } mach_port_limits_t; | ||
| 278 | |||
| 279 | /* Possible values for mps_flags (part of mach_port_status_t) */ | ||
| 280 | #define MACH_PORT_STATUS_FLAG_TEMPOWNER 0x01 | ||
| 281 | #define MACH_PORT_STATUS_FLAG_GUARDED 0x02 | ||
| 282 | #define MACH_PORT_STATUS_FLAG_STRICT_GUARD 0x04 | ||
| 283 | #define MACH_PORT_STATUS_FLAG_IMP_DONATION 0x08 | ||
| 284 | #define MACH_PORT_STATUS_FLAG_REVIVE 0x10 | ||
| 285 | #define MACH_PORT_STATUS_FLAG_TASKPTR 0x20 | ||
| 286 | #define MACH_PORT_STATUS_FLAG_GUARD_IMMOVABLE_RECEIVE 0x40 | ||
| 287 | #define MACH_PORT_STATUS_FLAG_NO_GRANT 0x80 | ||
| 288 | |||
| 289 | typedef struct mach_port_info_ext { | ||
| 290 | 	mach_port_status_t mpie_status; | ||
| 291 | 	mach_port_msgcount_t mpie_boost_cnt; | ||
| 292 | 	uint32_t reserved[6]; | ||
| 293 | } mach_port_info_ext_t; | ||
| 294 | |||
| 295 | typedef struct mach_port_guard_info { | ||
| 296 | 	uint64_t mpgi_guard; /* guard value */ | ||
| 297 | } mach_port_guard_info_t; | ||
| 298 | |||
| 299 | typedef integer_t *mach_port_info_t; /* varying array of natural_t */ | ||
| 300 | |||
| 301 | /* Flavors for mach_port_get/set/assert_attributes() */ | ||
| 302 | typedef int mach_port_flavor_t; | ||
| 303 | #define MACH_PORT_LIMITS_INFO 1 /* uses mach_port_limits_t */ | ||
| 304 | #define MACH_PORT_RECEIVE_STATUS 2 /* uses mach_port_status_t */ | ||
| 305 | #define MACH_PORT_DNREQUESTS_SIZE 3 /* info is int */ | ||
| 306 | #define MACH_PORT_TEMPOWNER 4 /* indicates receive right will be reassigned to another task */ | ||
| 307 | #define MACH_PORT_IMPORTANCE_RECEIVER 5 /* indicates recieve right accepts priority donation */ | ||
| 308 | #define MACH_PORT_DENAP_RECEIVER 6 /* indicates receive right accepts de-nap donation */ | ||
| 309 | #define MACH_PORT_INFO_EXT 7 /* uses mach_port_info_ext_t */ | ||
| 310 | #define MACH_PORT_GUARD_INFO 8 /* asserts if the strict guard value is correct */ | ||
| 311 | |||
| 312 | #define MACH_PORT_LIMITS_INFO_COUNT ((natural_t) \ | ||
| 313 | 	(sizeof(mach_port_limits_t)/sizeof(natural_t))) | ||
| 314 | #define MACH_PORT_RECEIVE_STATUS_COUNT ((natural_t) \ | ||
| 315 | 	(sizeof(mach_port_status_t)/sizeof(natural_t))) | ||
| 316 | #define MACH_PORT_DNREQUESTS_SIZE_COUNT 1 | ||
| 317 | #define MACH_PORT_INFO_EXT_COUNT ((natural_t) \ | ||
| 318 | 	(sizeof(mach_port_info_ext_t)/sizeof(natural_t))) | ||
| 319 | #define MACH_PORT_GUARD_INFO_COUNT ((natural_t) \ | ||
| 320 | 	(sizeof(mach_port_guard_info_t)/sizeof(natural_t))) | ||
| 321 | |||
| 322 | /* | ||
| 323 | * Structure used to pass information about port allocation requests. | ||
| 324 | * Must be padded to 64-bits total length. | ||
| 325 | */ | ||
| 326 | typedef struct mach_port_qos { | ||
| 327 | 	unsigned int name:1; /* name given */ | ||
| 328 | 	unsigned int prealloc:1; /* prealloced message */ | ||
| 329 | 	boolean_t pad1:30; | ||
| 330 | 	natural_t len; | ||
| 331 | } mach_port_qos_t; | ||
| 332 | |||
| 333 | /* | ||
| 334 | * Structure used to pass information about the service port | ||
| 335 | */ | ||
| 336 | #define MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN 255 /* Maximum length of the port string name buffer */ | ||
| 337 | |||
| 338 | typedef struct mach_service_port_info { | ||
| 339 | 	char mspi_string_name[MACH_SERVICE_PORT_INFO_STRING_NAME_MAX_BUF_LEN]; /* Service port's string name */ | ||
| 340 | 	uint8_t mspi_domain_type; /* Service port domain */ | ||
| 341 | } mach_service_port_info_data_t; | ||
| 342 | |||
| 343 | #define MACH_SERVICE_PORT_INFO_COUNT ((char) \ | ||
| 344 | 	(sizeof(mach_service_port_info_data_t)/sizeof(char))) | ||
| 345 | |||
| 346 | typedef struct mach_service_port_info * mach_service_port_info_t; | ||
| 347 | |||
| 348 | /* | ||
| 349 | * Flags for mach_port_options (used for | ||
| 350 | * invocation of mach_port_construct). | ||
| 351 | * Indicates attributes to be set for the newly | ||
| 352 | * allocated port. | ||
| 353 | */ | ||
| 354 | #define MPO_CONTEXT_AS_GUARD 0x01 /* Add guard to the port */ | ||
| 355 | #define MPO_QLIMIT 0x02 /* Set qlimit for the port msg queue */ | ||
| 356 | #define MPO_TEMPOWNER 0x04 /* Set the tempowner bit of the port */ | ||
| 357 | #define MPO_IMPORTANCE_RECEIVER 0x08 /* Mark the port as importance receiver */ | ||
| 358 | #define MPO_INSERT_SEND_RIGHT 0x10 /* Insert a send right for the port */ | ||
| 359 | #define MPO_STRICT 0x20 /* Apply strict guarding for port */ | ||
| 360 | #define MPO_DENAP_RECEIVER 0x40 /* Mark the port as App de-nap receiver */ | ||
| 361 | #define MPO_IMMOVABLE_RECEIVE 0x80 /* Mark the port as immovable; protected by the guard context */ | ||
| 362 | #define MPO_FILTER_MSG 0x100 /* Allow message filtering */ | ||
| 363 | #define MPO_TG_BLOCK_TRACKING 0x200 /* Track blocking relationship for thread group during sync IPC */ | ||
| 364 | #define MPO_SERVICE_PORT 0x400 /* Create a service port with the given name; should be used only by launchd */ | ||
| 365 | #define MPO_CONNECTION_PORT 0x800 /* Derive new peer connection port from a given service port */ | ||
| 366 | |||
| 367 | /* | ||
| 368 | * Structure to define optional attributes for a newly | ||
| 369 | * constructed port. | ||
| 370 | */ | ||
| 371 | typedef struct mach_port_options { | ||
| 372 | 	uint32_t flags; /* Flags defining attributes for port */ | ||
| 373 | 	mach_port_limits_t mpl; /* Message queue limit for port */ | ||
| 374 | 	union { | ||
| 375 | 		uint64_t reserved[2]; /* Reserved */ | ||
| 376 | 		mach_port_name_t work_interval_port; /* Work interval port */ | ||
| 377 | 		mach_service_port_info_t service_port_info; /* Service port (MPO_SERVICE_PORT) */ | ||
| 378 | 		mach_port_name_t service_port_name; /* Service port (MPO_CONNECTION_PORT) */ | ||
| 379 | 	}; | ||
| 380 | }mach_port_options_t; | ||
| 381 | |||
| 382 | typedef mach_port_options_t *mach_port_options_ptr_t; | ||
| 383 | |||
| 384 | /* Mach Port Guarding definitions */ | ||
| 385 | |||
| 386 | /* | ||
| 387 | * EXC_GUARD represents a guard violation for both | ||
| 388 | * mach ports and file descriptors. GUARD_TYPE_ is used | ||
| 389 | * to differentiate among them. | ||
| 390 | */ | ||
| 391 | #define GUARD_TYPE_MACH_PORT 0x1 | ||
| 392 | |||
| 393 | /* Reasons for exception for a guarded mach port */ | ||
| 394 | enum mach_port_guard_exception_codes { | ||
| 395 | 	kGUARD_EXC_DESTROY = 1u << 0, | ||
| 396 | 	kGUARD_EXC_MOD_REFS = 1u << 1, | ||
| 397 | 	kGUARD_EXC_SET_CONTEXT = 1u << 2, | ||
| 398 | 	kGUARD_EXC_UNGUARDED = 1u << 3, | ||
| 399 | 	kGUARD_EXC_INCORRECT_GUARD = 1u << 4, | ||
| 400 | 	kGUARD_EXC_IMMOVABLE = 1u << 5, | ||
| 401 | 	kGUARD_EXC_STRICT_REPLY = 1u << 6, | ||
| 402 | 	kGUARD_EXC_MSG_FILTERED = 1u << 7, | ||
| 403 | 	/* start of [optionally] non-fatal guards */ | ||
| 404 | 	kGUARD_EXC_INVALID_RIGHT = 1u << 8, | ||
| 405 | 	kGUARD_EXC_INVALID_NAME = 1u << 9, | ||
| 406 | 	kGUARD_EXC_INVALID_VALUE = 1u << 10, | ||
| 407 | 	kGUARD_EXC_INVALID_ARGUMENT = 1u << 11, | ||
| 408 | 	kGUARD_EXC_RIGHT_EXISTS = 1u << 12, | ||
| 409 | 	kGUARD_EXC_KERN_NO_SPACE = 1u << 13, | ||
| 410 | 	kGUARD_EXC_KERN_FAILURE = 1u << 14, | ||
| 411 | 	kGUARD_EXC_KERN_RESOURCE = 1u << 15, | ||
| 412 | 	kGUARD_EXC_SEND_INVALID_REPLY = 1u << 16, | ||
| 413 | 	kGUARD_EXC_SEND_INVALID_VOUCHER = 1u << 17, | ||
| 414 | 	kGUARD_EXC_SEND_INVALID_RIGHT = 1u << 18, | ||
| 415 | 	kGUARD_EXC_RCV_INVALID_NAME = 1u << 19, | ||
| 416 | 	/* start of always non-fatal guards */ | ||
| 417 | 	kGUARD_EXC_RCV_GUARDED_DESC = 1u << 20, /* for development only */ | ||
| 418 | 	kGUARD_EXC_MOD_REFS_NON_FATAL = 1u << 21, | ||
| 419 | 	kGUARD_EXC_IMMOVABLE_NON_FATAL = 1u << 22, | ||
| 420 | }; | ||
| 421 | |||
| 422 | #define MAX_FATAL_kGUARD_EXC_CODE (1u << 7) | ||
| 423 | |||
| 424 | /* | ||
| 425 | * Mach port guard flags. | ||
| 426 | */ | ||
| 427 | #define MPG_FLAGS_NONE (0x00ull) | ||
| 428 | |||
| 429 | #define MAX_OPTIONAL_kGUARD_EXC_CODE (1u << 19) | ||
| 430 | |||
| 431 | /* | ||
| 432 | * These flags are used as bits in the subcode of kGUARD_EXC_STRICT_REPLY exceptions. | ||
| 433 | */ | ||
| 434 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_DISP (0x01ull << 56) | ||
| 435 | #define MPG_FLAGS_STRICT_REPLY_INVALID_REPLY_PORT (0x02ull << 56) | ||
| 436 | #define MPG_FLAGS_STRICT_REPLY_INVALID_VOUCHER (0x04ull << 56) | ||
| 437 | #define MPG_FLAGS_STRICT_REPLY_NO_BANK_ATTR (0x08ull << 56) | ||
| 438 | #define MPG_FLAGS_STRICT_REPLY_MISMATCHED_PERSONA (0x10ull << 56) | ||
| 439 | #define MPG_FLAGS_STRICT_REPLY_MASK (0xffull << 56) | ||
| 440 | |||
| 441 | /* | ||
| 442 | * These flags are used as bits in the subcode of kGUARD_EXC_MOD_REFS exceptions. | ||
| 443 | */ | ||
| 444 | #define MPG_FLAGS_MOD_REFS_PINNED_DEALLOC (0x01ull << 56) | ||
| 445 | #define MPG_FLAGS_MOD_REFS_PINNED_DESTROY (0x02ull << 56) | ||
| 446 | #define MPG_FLAGS_MOD_REFS_PINNED_COPYIN (0x04ull << 56) | ||
| 447 | |||
| 448 | /* | ||
| 449 | * These flags are used as bits in the subcode of kGUARD_EXC_IMMOVABLE exceptions. | ||
| 450 | */ | ||
| 451 | #define MPG_FLAGS_IMMOVABLE_PINNED (0x01ull << 56) | ||
| 452 | |||
| 453 | /* | ||
| 454 | * Flags for mach_port_guard_with_flags. These flags extend | ||
| 455 | * the attributes associated with a guarded port. | ||
| 456 | */ | ||
| 457 | #define MPG_STRICT 0x01 /* Apply strict guarding for a port */ | ||
| 458 | #define MPG_IMMOVABLE_RECEIVE 0x02 /* Receive right cannot be moved out of the space */ | ||
| 459 | |||
| 460 | #if !__DARWIN_UNIX03 && !defined(_NO_PORT_T_FROM_MACH) | ||
| 461 | /* | ||
| 462 | * Mach 3.0 renamed everything to have mach_ in front of it. | ||
| 463 | * These types and macros are provided for backward compatibility | ||
| 464 | *	but are deprecated. | ||
| 465 | */ | ||
| 466 | typedef mach_port_t port_t; | ||
| 467 | typedef mach_port_name_t port_name_t; | ||
| 468 | typedef mach_port_name_t *port_name_array_t; | ||
| 469 | |||
| 470 | #define PORT_NULL ((port_t) 0) | ||
| 471 | #define PORT_DEAD ((port_t) ~0) | ||
| 472 | #define PORT_VALID(name) \ | ||
| 473 | 	 ((port_t)(name) != PORT_NULL && (port_t)(name) != PORT_DEAD) | ||
| 474 | |||
| 475 | #endif /* !__DARWIN_UNIX03 && !_NO_PORT_T_FROM_MACH */ | ||
| 476 | |||
| 477 | #endif /* _MACH_PORT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/processor.h deleted-361| ... | @@ -1,361 +0,0 @@ | ||
| 1 | #ifndef	_processor_user_ | ||
| 2 | #define	_processor_user_ | ||
| 3 | |||
| 4 | /* Module processor */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	processor_MSG_COUNT | ||
| 52 | #define	processor_MSG_COUNT	6 | ||
| 53 | #endif	/* processor_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine processor_start */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t processor_start | ||
| 76 | ( | ||
| 77 | 	processor_t processor | ||
| 78 | ); | ||
| 79 | |||
| 80 | /* Routine processor_exit */ | ||
| 81 | #ifdef	mig_external | ||
| 82 | mig_external | ||
| 83 | #else | ||
| 84 | extern | ||
| 85 | #endif	/* mig_external */ | ||
| 86 | kern_return_t processor_exit | ||
| 87 | ( | ||
| 88 | 	processor_t processor | ||
| 89 | ); | ||
| 90 | |||
| 91 | /* Routine processor_info */ | ||
| 92 | #ifdef	mig_external | ||
| 93 | mig_external | ||
| 94 | #else | ||
| 95 | extern | ||
| 96 | #endif	/* mig_external */ | ||
| 97 | kern_return_t processor_info | ||
| 98 | ( | ||
| 99 | 	processor_t processor, | ||
| 100 | 	processor_flavor_t flavor, | ||
| 101 | 	host_t *host, | ||
| 102 | 	processor_info_t processor_info_out, | ||
| 103 | 	mach_msg_type_number_t *processor_info_outCnt | ||
| 104 | ); | ||
| 105 | |||
| 106 | /* Routine processor_control */ | ||
| 107 | #ifdef	mig_external | ||
| 108 | mig_external | ||
| 109 | #else | ||
| 110 | extern | ||
| 111 | #endif	/* mig_external */ | ||
| 112 | kern_return_t processor_control | ||
| 113 | ( | ||
| 114 | 	processor_t processor, | ||
| 115 | 	processor_info_t processor_cmd, | ||
| 116 | 	mach_msg_type_number_t processor_cmdCnt | ||
| 117 | ); | ||
| 118 | |||
| 119 | /* Routine processor_assign */ | ||
| 120 | #ifdef	mig_external | ||
| 121 | mig_external | ||
| 122 | #else | ||
| 123 | extern | ||
| 124 | #endif	/* mig_external */ | ||
| 125 | kern_return_t processor_assign | ||
| 126 | ( | ||
| 127 | 	processor_t processor, | ||
| 128 | 	processor_set_t new_set, | ||
| 129 | 	boolean_t wait | ||
| 130 | ); | ||
| 131 | |||
| 132 | /* Routine processor_get_assignment */ | ||
| 133 | #ifdef	mig_external | ||
| 134 | mig_external | ||
| 135 | #else | ||
| 136 | extern | ||
| 137 | #endif	/* mig_external */ | ||
| 138 | kern_return_t processor_get_assignment | ||
| 139 | ( | ||
| 140 | 	processor_t processor, | ||
| 141 | 	processor_set_name_t *assigned_set | ||
| 142 | ); | ||
| 143 | |||
| 144 | __END_DECLS | ||
| 145 | |||
| 146 | /********************** Caution **************************/ | ||
| 147 | /* The following data types should be used to calculate */ | ||
| 148 | /* maximum message sizes only. The actual message may be */ | ||
| 149 | /* smaller, and the position of the arguments within the */ | ||
| 150 | /* message layout may vary from what is presented here. */ | ||
| 151 | /* For example, if any of the arguments are variable- */ | ||
| 152 | /* sized, and less than the maximum is sent, the data */ | ||
| 153 | /* will be packed tight in the actual message to reduce */ | ||
| 154 | /* the presence of holes. */ | ||
| 155 | /********************** Caution **************************/ | ||
| 156 | |||
| 157 | /* typedefs for all requests */ | ||
| 158 | |||
| 159 | #ifndef __Request__processor_subsystem__defined | ||
| 160 | #define __Request__processor_subsystem__defined | ||
| 161 | |||
| 162 | #ifdef __MigPackStructs | ||
| 163 | #pragma pack(push, 4) | ||
| 164 | #endif | ||
| 165 | 	typedef struct { | ||
| 166 | 		mach_msg_header_t Head; | ||
| 167 | 	} __Request__processor_start_t __attribute__((unused)); | ||
| 168 | #ifdef __MigPackStructs | ||
| 169 | #pragma pack(pop) | ||
| 170 | #endif | ||
| 171 | |||
| 172 | #ifdef __MigPackStructs | ||
| 173 | #pragma pack(push, 4) | ||
| 174 | #endif | ||
| 175 | 	typedef struct { | ||
| 176 | 		mach_msg_header_t Head; | ||
| 177 | 	} __Request__processor_exit_t __attribute__((unused)); | ||
| 178 | #ifdef __MigPackStructs | ||
| 179 | #pragma pack(pop) | ||
| 180 | #endif | ||
| 181 | |||
| 182 | #ifdef __MigPackStructs | ||
| 183 | #pragma pack(push, 4) | ||
| 184 | #endif | ||
| 185 | 	typedef struct { | ||
| 186 | 		mach_msg_header_t Head; | ||
| 187 | 		NDR_record_t NDR; | ||
| 188 | 		processor_flavor_t flavor; | ||
| 189 | 		mach_msg_type_number_t processor_info_outCnt; | ||
| 190 | 	} __Request__processor_info_t __attribute__((unused)); | ||
| 191 | #ifdef __MigPackStructs | ||
| 192 | #pragma pack(pop) | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #ifdef __MigPackStructs | ||
| 196 | #pragma pack(push, 4) | ||
| 197 | #endif | ||
| 198 | 	typedef struct { | ||
| 199 | 		mach_msg_header_t Head; | ||
| 200 | 		NDR_record_t NDR; | ||
| 201 | 		mach_msg_type_number_t processor_cmdCnt; | ||
| 202 | 		integer_t processor_cmd[20]; | ||
| 203 | 	} __Request__processor_control_t __attribute__((unused)); | ||
| 204 | #ifdef __MigPackStructs | ||
| 205 | #pragma pack(pop) | ||
| 206 | #endif | ||
| 207 | |||
| 208 | #ifdef __MigPackStructs | ||
| 209 | #pragma pack(push, 4) | ||
| 210 | #endif | ||
| 211 | 	typedef struct { | ||
| 212 | 		mach_msg_header_t Head; | ||
| 213 | 		/* start of the kernel processed data */ | ||
| 214 | 		mach_msg_body_t msgh_body; | ||
| 215 | 		mach_msg_port_descriptor_t new_set; | ||
| 216 | 		/* end of the kernel processed data */ | ||
| 217 | 		NDR_record_t NDR; | ||
| 218 | 		boolean_t wait; | ||
| 219 | 	} __Request__processor_assign_t __attribute__((unused)); | ||
| 220 | #ifdef __MigPackStructs | ||
| 221 | #pragma pack(pop) | ||
| 222 | #endif | ||
| 223 | |||
| 224 | #ifdef __MigPackStructs | ||
| 225 | #pragma pack(push, 4) | ||
| 226 | #endif | ||
| 227 | 	typedef struct { | ||
| 228 | 		mach_msg_header_t Head; | ||
| 229 | 	} __Request__processor_get_assignment_t __attribute__((unused)); | ||
| 230 | #ifdef __MigPackStructs | ||
| 231 | #pragma pack(pop) | ||
| 232 | #endif | ||
| 233 | #endif /* !__Request__processor_subsystem__defined */ | ||
| 234 | |||
| 235 | /* union of all requests */ | ||
| 236 | |||
| 237 | #ifndef __RequestUnion__processor_subsystem__defined | ||
| 238 | #define __RequestUnion__processor_subsystem__defined | ||
| 239 | union __RequestUnion__processor_subsystem { | ||
| 240 | 	__Request__processor_start_t Request_processor_start; | ||
| 241 | 	__Request__processor_exit_t Request_processor_exit; | ||
| 242 | 	__Request__processor_info_t Request_processor_info; | ||
| 243 | 	__Request__processor_control_t Request_processor_control; | ||
| 244 | 	__Request__processor_assign_t Request_processor_assign; | ||
| 245 | 	__Request__processor_get_assignment_t Request_processor_get_assignment; | ||
| 246 | }; | ||
| 247 | #endif /* !__RequestUnion__processor_subsystem__defined */ | ||
| 248 | /* typedefs for all replies */ | ||
| 249 | |||
| 250 | #ifndef __Reply__processor_subsystem__defined | ||
| 251 | #define __Reply__processor_subsystem__defined | ||
| 252 | |||
| 253 | #ifdef __MigPackStructs | ||
| 254 | #pragma pack(push, 4) | ||
| 255 | #endif | ||
| 256 | 	typedef struct { | ||
| 257 | 		mach_msg_header_t Head; | ||
| 258 | 		NDR_record_t NDR; | ||
| 259 | 		kern_return_t RetCode; | ||
| 260 | 	} __Reply__processor_start_t __attribute__((unused)); | ||
| 261 | #ifdef __MigPackStructs | ||
| 262 | #pragma pack(pop) | ||
| 263 | #endif | ||
| 264 | |||
| 265 | #ifdef __MigPackStructs | ||
| 266 | #pragma pack(push, 4) | ||
| 267 | #endif | ||
| 268 | 	typedef struct { | ||
| 269 | 		mach_msg_header_t Head; | ||
| 270 | 		NDR_record_t NDR; | ||
| 271 | 		kern_return_t RetCode; | ||
| 272 | 	} __Reply__processor_exit_t __attribute__((unused)); | ||
| 273 | #ifdef __MigPackStructs | ||
| 274 | #pragma pack(pop) | ||
| 275 | #endif | ||
| 276 | |||
| 277 | #ifdef __MigPackStructs | ||
| 278 | #pragma pack(push, 4) | ||
| 279 | #endif | ||
| 280 | 	typedef struct { | ||
| 281 | 		mach_msg_header_t Head; | ||
| 282 | 		/* start of the kernel processed data */ | ||
| 283 | 		mach_msg_body_t msgh_body; | ||
| 284 | 		mach_msg_port_descriptor_t host; | ||
| 285 | 		/* end of the kernel processed data */ | ||
| 286 | 		NDR_record_t NDR; | ||
| 287 | 		mach_msg_type_number_t processor_info_outCnt; | ||
| 288 | 		integer_t processor_info_out[20]; | ||
| 289 | 	} __Reply__processor_info_t __attribute__((unused)); | ||
| 290 | #ifdef __MigPackStructs | ||
| 291 | #pragma pack(pop) | ||
| 292 | #endif | ||
| 293 | |||
| 294 | #ifdef __MigPackStructs | ||
| 295 | #pragma pack(push, 4) | ||
| 296 | #endif | ||
| 297 | 	typedef struct { | ||
| 298 | 		mach_msg_header_t Head; | ||
| 299 | 		NDR_record_t NDR; | ||
| 300 | 		kern_return_t RetCode; | ||
| 301 | 	} __Reply__processor_control_t __attribute__((unused)); | ||
| 302 | #ifdef __MigPackStructs | ||
| 303 | #pragma pack(pop) | ||
| 304 | #endif | ||
| 305 | |||
| 306 | #ifdef __MigPackStructs | ||
| 307 | #pragma pack(push, 4) | ||
| 308 | #endif | ||
| 309 | 	typedef struct { | ||
| 310 | 		mach_msg_header_t Head; | ||
| 311 | 		NDR_record_t NDR; | ||
| 312 | 		kern_return_t RetCode; | ||
| 313 | 	} __Reply__processor_assign_t __attribute__((unused)); | ||
| 314 | #ifdef __MigPackStructs | ||
| 315 | #pragma pack(pop) | ||
| 316 | #endif | ||
| 317 | |||
| 318 | #ifdef __MigPackStructs | ||
| 319 | #pragma pack(push, 4) | ||
| 320 | #endif | ||
| 321 | 	typedef struct { | ||
| 322 | 		mach_msg_header_t Head; | ||
| 323 | 		/* start of the kernel processed data */ | ||
| 324 | 		mach_msg_body_t msgh_body; | ||
| 325 | 		mach_msg_port_descriptor_t assigned_set; | ||
| 326 | 		/* end of the kernel processed data */ | ||
| 327 | 	} __Reply__processor_get_assignment_t __attribute__((unused)); | ||
| 328 | #ifdef __MigPackStructs | ||
| 329 | #pragma pack(pop) | ||
| 330 | #endif | ||
| 331 | #endif /* !__Reply__processor_subsystem__defined */ | ||
| 332 | |||
| 333 | /* union of all replies */ | ||
| 334 | |||
| 335 | #ifndef __ReplyUnion__processor_subsystem__defined | ||
| 336 | #define __ReplyUnion__processor_subsystem__defined | ||
| 337 | union __ReplyUnion__processor_subsystem { | ||
| 338 | 	__Reply__processor_start_t Reply_processor_start; | ||
| 339 | 	__Reply__processor_exit_t Reply_processor_exit; | ||
| 340 | 	__Reply__processor_info_t Reply_processor_info; | ||
| 341 | 	__Reply__processor_control_t Reply_processor_control; | ||
| 342 | 	__Reply__processor_assign_t Reply_processor_assign; | ||
| 343 | 	__Reply__processor_get_assignment_t Reply_processor_get_assignment; | ||
| 344 | }; | ||
| 345 | #endif /* !__RequestUnion__processor_subsystem__defined */ | ||
| 346 | |||
| 347 | #ifndef subsystem_to_name_map_processor | ||
| 348 | #define subsystem_to_name_map_processor \ | ||
| 349 | { "processor_start", 3000 },\ | ||
| 350 | { "processor_exit", 3001 },\ | ||
| 351 | { "processor_info", 3002 },\ | ||
| 352 | { "processor_control", 3003 },\ | ||
| 353 | { "processor_assign", 3004 },\ | ||
| 354 | { "processor_get_assignment", 3005 } | ||
| 355 | #endif | ||
| 356 | |||
| 357 | #ifdef __AfterMigUserHeader | ||
| 358 | __AfterMigUserHeader | ||
| 359 | #endif /* __AfterMigUserHeader */ | ||
| 360 | |||
| 361 | #endif	 /* _processor_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/processor_set.h deleted-586| ... | @@ -1,586 +0,0 @@ | ||
| 1 | #ifndef	_processor_set_user_ | ||
| 2 | #define	_processor_set_user_ | ||
| 3 | |||
| 4 | /* Module processor_set */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	processor_set_MSG_COUNT | ||
| 52 | #define	processor_set_MSG_COUNT	11 | ||
| 53 | #endif	/* processor_set_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine processor_set_statistics */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t processor_set_statistics | ||
| 76 | ( | ||
| 77 | 	processor_set_name_t pset, | ||
| 78 | 	processor_set_flavor_t flavor, | ||
| 79 | 	processor_set_info_t info_out, | ||
| 80 | 	mach_msg_type_number_t *info_outCnt | ||
| 81 | ); | ||
| 82 | |||
| 83 | /* Routine processor_set_destroy */ | ||
| 84 | #ifdef	mig_external | ||
| 85 | mig_external | ||
| 86 | #else | ||
| 87 | extern | ||
| 88 | #endif	/* mig_external */ | ||
| 89 | kern_return_t processor_set_destroy | ||
| 90 | ( | ||
| 91 | 	processor_set_t set | ||
| 92 | ); | ||
| 93 | |||
| 94 | /* Routine processor_set_max_priority */ | ||
| 95 | #ifdef	mig_external | ||
| 96 | mig_external | ||
| 97 | #else | ||
| 98 | extern | ||
| 99 | #endif	/* mig_external */ | ||
| 100 | kern_return_t processor_set_max_priority | ||
| 101 | ( | ||
| 102 | 	processor_set_t processor_set, | ||
| 103 | 	int max_priority, | ||
| 104 | 	boolean_t change_threads | ||
| 105 | ); | ||
| 106 | |||
| 107 | /* Routine processor_set_policy_enable */ | ||
| 108 | #ifdef	mig_external | ||
| 109 | mig_external | ||
| 110 | #else | ||
| 111 | extern | ||
| 112 | #endif	/* mig_external */ | ||
| 113 | kern_return_t processor_set_policy_enable | ||
| 114 | ( | ||
| 115 | 	processor_set_t processor_set, | ||
| 116 | 	int policy | ||
| 117 | ); | ||
| 118 | |||
| 119 | /* Routine processor_set_policy_disable */ | ||
| 120 | #ifdef	mig_external | ||
| 121 | mig_external | ||
| 122 | #else | ||
| 123 | extern | ||
| 124 | #endif	/* mig_external */ | ||
| 125 | kern_return_t processor_set_policy_disable | ||
| 126 | ( | ||
| 127 | 	processor_set_t processor_set, | ||
| 128 | 	int policy, | ||
| 129 | 	boolean_t change_threads | ||
| 130 | ); | ||
| 131 | |||
| 132 | /* Routine processor_set_tasks */ | ||
| 133 | #ifdef	mig_external | ||
| 134 | mig_external | ||
| 135 | #else | ||
| 136 | extern | ||
| 137 | #endif	/* mig_external */ | ||
| 138 | kern_return_t processor_set_tasks | ||
| 139 | ( | ||
| 140 | 	processor_set_t processor_set, | ||
| 141 | 	task_array_t *task_list, | ||
| 142 | 	mach_msg_type_number_t *task_listCnt | ||
| 143 | ); | ||
| 144 | |||
| 145 | /* Routine processor_set_threads */ | ||
| 146 | #ifdef	mig_external | ||
| 147 | mig_external | ||
| 148 | #else | ||
| 149 | extern | ||
| 150 | #endif	/* mig_external */ | ||
| 151 | kern_return_t processor_set_threads | ||
| 152 | ( | ||
| 153 | 	processor_set_t processor_set, | ||
| 154 | 	thread_act_array_t *thread_list, | ||
| 155 | 	mach_msg_type_number_t *thread_listCnt | ||
| 156 | ); | ||
| 157 | |||
| 158 | /* Routine processor_set_policy_control */ | ||
| 159 | #ifdef	mig_external | ||
| 160 | mig_external | ||
| 161 | #else | ||
| 162 | extern | ||
| 163 | #endif	/* mig_external */ | ||
| 164 | kern_return_t processor_set_policy_control | ||
| 165 | ( | ||
| 166 | 	processor_set_t pset, | ||
| 167 | 	processor_set_flavor_t flavor, | ||
| 168 | 	processor_set_info_t policy_info, | ||
| 169 | 	mach_msg_type_number_t policy_infoCnt, | ||
| 170 | 	boolean_t change | ||
| 171 | ); | ||
| 172 | |||
| 173 | /* Routine processor_set_stack_usage */ | ||
| 174 | #ifdef	mig_external | ||
| 175 | mig_external | ||
| 176 | #else | ||
| 177 | extern | ||
| 178 | #endif	/* mig_external */ | ||
| 179 | kern_return_t processor_set_stack_usage | ||
| 180 | ( | ||
| 181 | 	processor_set_t pset, | ||
| 182 | 	unsigned *ltotal, | ||
| 183 | 	vm_size_t *space, | ||
| 184 | 	vm_size_t *resident, | ||
| 185 | 	vm_size_t *maxusage, | ||
| 186 | 	vm_offset_t *maxstack | ||
| 187 | ); | ||
| 188 | |||
| 189 | /* Routine processor_set_info */ | ||
| 190 | #ifdef	mig_external | ||
| 191 | mig_external | ||
| 192 | #else | ||
| 193 | extern | ||
| 194 | #endif	/* mig_external */ | ||
| 195 | kern_return_t processor_set_info | ||
| 196 | ( | ||
| 197 | 	processor_set_name_t set_name, | ||
| 198 | 	int flavor, | ||
| 199 | 	host_t *host, | ||
| 200 | 	processor_set_info_t info_out, | ||
| 201 | 	mach_msg_type_number_t *info_outCnt | ||
| 202 | ); | ||
| 203 | |||
| 204 | /* Routine processor_set_tasks_with_flavor */ | ||
| 205 | #ifdef	mig_external | ||
| 206 | mig_external | ||
| 207 | #else | ||
| 208 | extern | ||
| 209 | #endif	/* mig_external */ | ||
| 210 | kern_return_t processor_set_tasks_with_flavor | ||
| 211 | ( | ||
| 212 | 	processor_set_t processor_set, | ||
| 213 | 	mach_task_flavor_t flavor, | ||
| 214 | 	task_array_t *task_list, | ||
| 215 | 	mach_msg_type_number_t *task_listCnt | ||
| 216 | ); | ||
| 217 | |||
| 218 | __END_DECLS | ||
| 219 | |||
| 220 | /********************** Caution **************************/ | ||
| 221 | /* The following data types should be used to calculate */ | ||
| 222 | /* maximum message sizes only. The actual message may be */ | ||
| 223 | /* smaller, and the position of the arguments within the */ | ||
| 224 | /* message layout may vary from what is presented here. */ | ||
| 225 | /* For example, if any of the arguments are variable- */ | ||
| 226 | /* sized, and less than the maximum is sent, the data */ | ||
| 227 | /* will be packed tight in the actual message to reduce */ | ||
| 228 | /* the presence of holes. */ | ||
| 229 | /********************** Caution **************************/ | ||
| 230 | |||
| 231 | /* typedefs for all requests */ | ||
| 232 | |||
| 233 | #ifndef __Request__processor_set_subsystem__defined | ||
| 234 | #define __Request__processor_set_subsystem__defined | ||
| 235 | |||
| 236 | #ifdef __MigPackStructs | ||
| 237 | #pragma pack(push, 4) | ||
| 238 | #endif | ||
| 239 | 	typedef struct { | ||
| 240 | 		mach_msg_header_t Head; | ||
| 241 | 		NDR_record_t NDR; | ||
| 242 | 		processor_set_flavor_t flavor; | ||
| 243 | 		mach_msg_type_number_t info_outCnt; | ||
| 244 | 	} __Request__processor_set_statistics_t __attribute__((unused)); | ||
| 245 | #ifdef __MigPackStructs | ||
| 246 | #pragma pack(pop) | ||
| 247 | #endif | ||
| 248 | |||
| 249 | #ifdef __MigPackStructs | ||
| 250 | #pragma pack(push, 4) | ||
| 251 | #endif | ||
| 252 | 	typedef struct { | ||
| 253 | 		mach_msg_header_t Head; | ||
| 254 | 	} __Request__processor_set_destroy_t __attribute__((unused)); | ||
| 255 | #ifdef __MigPackStructs | ||
| 256 | #pragma pack(pop) | ||
| 257 | #endif | ||
| 258 | |||
| 259 | #ifdef __MigPackStructs | ||
| 260 | #pragma pack(push, 4) | ||
| 261 | #endif | ||
| 262 | 	typedef struct { | ||
| 263 | 		mach_msg_header_t Head; | ||
| 264 | 		NDR_record_t NDR; | ||
| 265 | 		int max_priority; | ||
| 266 | 		boolean_t change_threads; | ||
| 267 | 	} __Request__processor_set_max_priority_t __attribute__((unused)); | ||
| 268 | #ifdef __MigPackStructs | ||
| 269 | #pragma pack(pop) | ||
| 270 | #endif | ||
| 271 | |||
| 272 | #ifdef __MigPackStructs | ||
| 273 | #pragma pack(push, 4) | ||
| 274 | #endif | ||
| 275 | 	typedef struct { | ||
| 276 | 		mach_msg_header_t Head; | ||
| 277 | 		NDR_record_t NDR; | ||
| 278 | 		int policy; | ||
| 279 | 	} __Request__processor_set_policy_enable_t __attribute__((unused)); | ||
| 280 | #ifdef __MigPackStructs | ||
| 281 | #pragma pack(pop) | ||
| 282 | #endif | ||
| 283 | |||
| 284 | #ifdef __MigPackStructs | ||
| 285 | #pragma pack(push, 4) | ||
| 286 | #endif | ||
| 287 | 	typedef struct { | ||
| 288 | 		mach_msg_header_t Head; | ||
| 289 | 		NDR_record_t NDR; | ||
| 290 | 		int policy; | ||
| 291 | 		boolean_t change_threads; | ||
| 292 | 	} __Request__processor_set_policy_disable_t __attribute__((unused)); | ||
| 293 | #ifdef __MigPackStructs | ||
| 294 | #pragma pack(pop) | ||
| 295 | #endif | ||
| 296 | |||
| 297 | #ifdef __MigPackStructs | ||
| 298 | #pragma pack(push, 4) | ||
| 299 | #endif | ||
| 300 | 	typedef struct { | ||
| 301 | 		mach_msg_header_t Head; | ||
| 302 | 	} __Request__processor_set_tasks_t __attribute__((unused)); | ||
| 303 | #ifdef __MigPackStructs | ||
| 304 | #pragma pack(pop) | ||
| 305 | #endif | ||
| 306 | |||
| 307 | #ifdef __MigPackStructs | ||
| 308 | #pragma pack(push, 4) | ||
| 309 | #endif | ||
| 310 | 	typedef struct { | ||
| 311 | 		mach_msg_header_t Head; | ||
| 312 | 	} __Request__processor_set_threads_t __attribute__((unused)); | ||
| 313 | #ifdef __MigPackStructs | ||
| 314 | #pragma pack(pop) | ||
| 315 | #endif | ||
| 316 | |||
| 317 | #ifdef __MigPackStructs | ||
| 318 | #pragma pack(push, 4) | ||
| 319 | #endif | ||
| 320 | 	typedef struct { | ||
| 321 | 		mach_msg_header_t Head; | ||
| 322 | 		NDR_record_t NDR; | ||
| 323 | 		processor_set_flavor_t flavor; | ||
| 324 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 325 | 		integer_t policy_info[5]; | ||
| 326 | 		boolean_t change; | ||
| 327 | 	} __Request__processor_set_policy_control_t __attribute__((unused)); | ||
| 328 | #ifdef __MigPackStructs | ||
| 329 | #pragma pack(pop) | ||
| 330 | #endif | ||
| 331 | |||
| 332 | #ifdef __MigPackStructs | ||
| 333 | #pragma pack(push, 4) | ||
| 334 | #endif | ||
| 335 | 	typedef struct { | ||
| 336 | 		mach_msg_header_t Head; | ||
| 337 | 	} __Request__processor_set_stack_usage_t __attribute__((unused)); | ||
| 338 | #ifdef __MigPackStructs | ||
| 339 | #pragma pack(pop) | ||
| 340 | #endif | ||
| 341 | |||
| 342 | #ifdef __MigPackStructs | ||
| 343 | #pragma pack(push, 4) | ||
| 344 | #endif | ||
| 345 | 	typedef struct { | ||
| 346 | 		mach_msg_header_t Head; | ||
| 347 | 		NDR_record_t NDR; | ||
| 348 | 		int flavor; | ||
| 349 | 		mach_msg_type_number_t info_outCnt; | ||
| 350 | 	} __Request__processor_set_info_t __attribute__((unused)); | ||
| 351 | #ifdef __MigPackStructs | ||
| 352 | #pragma pack(pop) | ||
| 353 | #endif | ||
| 354 | |||
| 355 | #ifdef __MigPackStructs | ||
| 356 | #pragma pack(push, 4) | ||
| 357 | #endif | ||
| 358 | 	typedef struct { | ||
| 359 | 		mach_msg_header_t Head; | ||
| 360 | 		NDR_record_t NDR; | ||
| 361 | 		mach_task_flavor_t flavor; | ||
| 362 | 	} __Request__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 363 | #ifdef __MigPackStructs | ||
| 364 | #pragma pack(pop) | ||
| 365 | #endif | ||
| 366 | #endif /* !__Request__processor_set_subsystem__defined */ | ||
| 367 | |||
| 368 | /* union of all requests */ | ||
| 369 | |||
| 370 | #ifndef __RequestUnion__processor_set_subsystem__defined | ||
| 371 | #define __RequestUnion__processor_set_subsystem__defined | ||
| 372 | union __RequestUnion__processor_set_subsystem { | ||
| 373 | 	__Request__processor_set_statistics_t Request_processor_set_statistics; | ||
| 374 | 	__Request__processor_set_destroy_t Request_processor_set_destroy; | ||
| 375 | 	__Request__processor_set_max_priority_t Request_processor_set_max_priority; | ||
| 376 | 	__Request__processor_set_policy_enable_t Request_processor_set_policy_enable; | ||
| 377 | 	__Request__processor_set_policy_disable_t Request_processor_set_policy_disable; | ||
| 378 | 	__Request__processor_set_tasks_t Request_processor_set_tasks; | ||
| 379 | 	__Request__processor_set_threads_t Request_processor_set_threads; | ||
| 380 | 	__Request__processor_set_policy_control_t Request_processor_set_policy_control; | ||
| 381 | 	__Request__processor_set_stack_usage_t Request_processor_set_stack_usage; | ||
| 382 | 	__Request__processor_set_info_t Request_processor_set_info; | ||
| 383 | 	__Request__processor_set_tasks_with_flavor_t Request_processor_set_tasks_with_flavor; | ||
| 384 | }; | ||
| 385 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 386 | /* typedefs for all replies */ | ||
| 387 | |||
| 388 | #ifndef __Reply__processor_set_subsystem__defined | ||
| 389 | #define __Reply__processor_set_subsystem__defined | ||
| 390 | |||
| 391 | #ifdef __MigPackStructs | ||
| 392 | #pragma pack(push, 4) | ||
| 393 | #endif | ||
| 394 | 	typedef struct { | ||
| 395 | 		mach_msg_header_t Head; | ||
| 396 | 		NDR_record_t NDR; | ||
| 397 | 		kern_return_t RetCode; | ||
| 398 | 		mach_msg_type_number_t info_outCnt; | ||
| 399 | 		integer_t info_out[5]; | ||
| 400 | 	} __Reply__processor_set_statistics_t __attribute__((unused)); | ||
| 401 | #ifdef __MigPackStructs | ||
| 402 | #pragma pack(pop) | ||
| 403 | #endif | ||
| 404 | |||
| 405 | #ifdef __MigPackStructs | ||
| 406 | #pragma pack(push, 4) | ||
| 407 | #endif | ||
| 408 | 	typedef struct { | ||
| 409 | 		mach_msg_header_t Head; | ||
| 410 | 		NDR_record_t NDR; | ||
| 411 | 		kern_return_t RetCode; | ||
| 412 | 	} __Reply__processor_set_destroy_t __attribute__((unused)); | ||
| 413 | #ifdef __MigPackStructs | ||
| 414 | #pragma pack(pop) | ||
| 415 | #endif | ||
| 416 | |||
| 417 | #ifdef __MigPackStructs | ||
| 418 | #pragma pack(push, 4) | ||
| 419 | #endif | ||
| 420 | 	typedef struct { | ||
| 421 | 		mach_msg_header_t Head; | ||
| 422 | 		NDR_record_t NDR; | ||
| 423 | 		kern_return_t RetCode; | ||
| 424 | 	} __Reply__processor_set_max_priority_t __attribute__((unused)); | ||
| 425 | #ifdef __MigPackStructs | ||
| 426 | #pragma pack(pop) | ||
| 427 | #endif | ||
| 428 | |||
| 429 | #ifdef __MigPackStructs | ||
| 430 | #pragma pack(push, 4) | ||
| 431 | #endif | ||
| 432 | 	typedef struct { | ||
| 433 | 		mach_msg_header_t Head; | ||
| 434 | 		NDR_record_t NDR; | ||
| 435 | 		kern_return_t RetCode; | ||
| 436 | 	} __Reply__processor_set_policy_enable_t __attribute__((unused)); | ||
| 437 | #ifdef __MigPackStructs | ||
| 438 | #pragma pack(pop) | ||
| 439 | #endif | ||
| 440 | |||
| 441 | #ifdef __MigPackStructs | ||
| 442 | #pragma pack(push, 4) | ||
| 443 | #endif | ||
| 444 | 	typedef struct { | ||
| 445 | 		mach_msg_header_t Head; | ||
| 446 | 		NDR_record_t NDR; | ||
| 447 | 		kern_return_t RetCode; | ||
| 448 | 	} __Reply__processor_set_policy_disable_t __attribute__((unused)); | ||
| 449 | #ifdef __MigPackStructs | ||
| 450 | #pragma pack(pop) | ||
| 451 | #endif | ||
| 452 | |||
| 453 | #ifdef __MigPackStructs | ||
| 454 | #pragma pack(push, 4) | ||
| 455 | #endif | ||
| 456 | 	typedef struct { | ||
| 457 | 		mach_msg_header_t Head; | ||
| 458 | 		/* start of the kernel processed data */ | ||
| 459 | 		mach_msg_body_t msgh_body; | ||
| 460 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 461 | 		/* end of the kernel processed data */ | ||
| 462 | 		NDR_record_t NDR; | ||
| 463 | 		mach_msg_type_number_t task_listCnt; | ||
| 464 | 	} __Reply__processor_set_tasks_t __attribute__((unused)); | ||
| 465 | #ifdef __MigPackStructs | ||
| 466 | #pragma pack(pop) | ||
| 467 | #endif | ||
| 468 | |||
| 469 | #ifdef __MigPackStructs | ||
| 470 | #pragma pack(push, 4) | ||
| 471 | #endif | ||
| 472 | 	typedef struct { | ||
| 473 | 		mach_msg_header_t Head; | ||
| 474 | 		/* start of the kernel processed data */ | ||
| 475 | 		mach_msg_body_t msgh_body; | ||
| 476 | 		mach_msg_ool_ports_descriptor_t thread_list; | ||
| 477 | 		/* end of the kernel processed data */ | ||
| 478 | 		NDR_record_t NDR; | ||
| 479 | 		mach_msg_type_number_t thread_listCnt; | ||
| 480 | 	} __Reply__processor_set_threads_t __attribute__((unused)); | ||
| 481 | #ifdef __MigPackStructs | ||
| 482 | #pragma pack(pop) | ||
| 483 | #endif | ||
| 484 | |||
| 485 | #ifdef __MigPackStructs | ||
| 486 | #pragma pack(push, 4) | ||
| 487 | #endif | ||
| 488 | 	typedef struct { | ||
| 489 | 		mach_msg_header_t Head; | ||
| 490 | 		NDR_record_t NDR; | ||
| 491 | 		kern_return_t RetCode; | ||
| 492 | 	} __Reply__processor_set_policy_control_t __attribute__((unused)); | ||
| 493 | #ifdef __MigPackStructs | ||
| 494 | #pragma pack(pop) | ||
| 495 | #endif | ||
| 496 | |||
| 497 | #ifdef __MigPackStructs | ||
| 498 | #pragma pack(push, 4) | ||
| 499 | #endif | ||
| 500 | 	typedef struct { | ||
| 501 | 		mach_msg_header_t Head; | ||
| 502 | 		NDR_record_t NDR; | ||
| 503 | 		kern_return_t RetCode; | ||
| 504 | 		unsigned ltotal; | ||
| 505 | 		vm_size_t space; | ||
| 506 | 		vm_size_t resident; | ||
| 507 | 		vm_size_t maxusage; | ||
| 508 | 		vm_offset_t maxstack; | ||
| 509 | 	} __Reply__processor_set_stack_usage_t __attribute__((unused)); | ||
| 510 | #ifdef __MigPackStructs | ||
| 511 | #pragma pack(pop) | ||
| 512 | #endif | ||
| 513 | |||
| 514 | #ifdef __MigPackStructs | ||
| 515 | #pragma pack(push, 4) | ||
| 516 | #endif | ||
| 517 | 	typedef struct { | ||
| 518 | 		mach_msg_header_t Head; | ||
| 519 | 		/* start of the kernel processed data */ | ||
| 520 | 		mach_msg_body_t msgh_body; | ||
| 521 | 		mach_msg_port_descriptor_t host; | ||
| 522 | 		/* end of the kernel processed data */ | ||
| 523 | 		NDR_record_t NDR; | ||
| 524 | 		mach_msg_type_number_t info_outCnt; | ||
| 525 | 		integer_t info_out[5]; | ||
| 526 | 	} __Reply__processor_set_info_t __attribute__((unused)); | ||
| 527 | #ifdef __MigPackStructs | ||
| 528 | #pragma pack(pop) | ||
| 529 | #endif | ||
| 530 | |||
| 531 | #ifdef __MigPackStructs | ||
| 532 | #pragma pack(push, 4) | ||
| 533 | #endif | ||
| 534 | 	typedef struct { | ||
| 535 | 		mach_msg_header_t Head; | ||
| 536 | 		/* start of the kernel processed data */ | ||
| 537 | 		mach_msg_body_t msgh_body; | ||
| 538 | 		mach_msg_ool_ports_descriptor_t task_list; | ||
| 539 | 		/* end of the kernel processed data */ | ||
| 540 | 		NDR_record_t NDR; | ||
| 541 | 		mach_msg_type_number_t task_listCnt; | ||
| 542 | 	} __Reply__processor_set_tasks_with_flavor_t __attribute__((unused)); | ||
| 543 | #ifdef __MigPackStructs | ||
| 544 | #pragma pack(pop) | ||
| 545 | #endif | ||
| 546 | #endif /* !__Reply__processor_set_subsystem__defined */ | ||
| 547 | |||
| 548 | /* union of all replies */ | ||
| 549 | |||
| 550 | #ifndef __ReplyUnion__processor_set_subsystem__defined | ||
| 551 | #define __ReplyUnion__processor_set_subsystem__defined | ||
| 552 | union __ReplyUnion__processor_set_subsystem { | ||
| 553 | 	__Reply__processor_set_statistics_t Reply_processor_set_statistics; | ||
| 554 | 	__Reply__processor_set_destroy_t Reply_processor_set_destroy; | ||
| 555 | 	__Reply__processor_set_max_priority_t Reply_processor_set_max_priority; | ||
| 556 | 	__Reply__processor_set_policy_enable_t Reply_processor_set_policy_enable; | ||
| 557 | 	__Reply__processor_set_policy_disable_t Reply_processor_set_policy_disable; | ||
| 558 | 	__Reply__processor_set_tasks_t Reply_processor_set_tasks; | ||
| 559 | 	__Reply__processor_set_threads_t Reply_processor_set_threads; | ||
| 560 | 	__Reply__processor_set_policy_control_t Reply_processor_set_policy_control; | ||
| 561 | 	__Reply__processor_set_stack_usage_t Reply_processor_set_stack_usage; | ||
| 562 | 	__Reply__processor_set_info_t Reply_processor_set_info; | ||
| 563 | 	__Reply__processor_set_tasks_with_flavor_t Reply_processor_set_tasks_with_flavor; | ||
| 564 | }; | ||
| 565 | #endif /* !__RequestUnion__processor_set_subsystem__defined */ | ||
| 566 | |||
| 567 | #ifndef subsystem_to_name_map_processor_set | ||
| 568 | #define subsystem_to_name_map_processor_set \ | ||
| 569 | { "processor_set_statistics", 4000 },\ | ||
| 570 | { "processor_set_destroy", 4001 },\ | ||
| 571 | { "processor_set_max_priority", 4002 },\ | ||
| 572 | { "processor_set_policy_enable", 4003 },\ | ||
| 573 | { "processor_set_policy_disable", 4004 },\ | ||
| 574 | { "processor_set_tasks", 4005 },\ | ||
| 575 | { "processor_set_threads", 4006 },\ | ||
| 576 | { "processor_set_policy_control", 4007 },\ | ||
| 577 | { "processor_set_stack_usage", 4008 },\ | ||
| 578 | { "processor_set_info", 4009 },\ | ||
| 579 | { "processor_set_tasks_with_flavor", 4010 } | ||
| 580 | #endif | ||
| 581 | |||
| 582 | #ifdef __AfterMigUserHeader | ||
| 583 | __AfterMigUserHeader | ||
| 584 | #endif /* __AfterMigUserHeader */ | ||
| 585 | |||
| 586 | #endif	 /* _processor_set_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/sync_policy.h deleted-47| ... | @@ -1,47 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | |||
| 32 | #ifndef _MACH_SYNC_POLICY_H_ | ||
| 33 | #define _MACH_SYNC_POLICY_H_ | ||
| 34 | |||
| 35 | typedef int sync_policy_t; | ||
| 36 | |||
| 37 | /* | ||
| 38 | *	These options define the wait ordering of the synchronizers | ||
| 39 | */ | ||
| 40 | #define SYNC_POLICY_FIFO 0x0 | ||
| 41 | #define SYNC_POLICY_FIXED_PRIORITY 0x1 | ||
| 42 | #define SYNC_POLICY_REVERSED 0x2 | ||
| 43 | #define SYNC_POLICY_ORDER_MASK 0x3 | ||
| 44 | #define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) | ||
| 45 | |||
| 46 | |||
| 47 | #endif /* _MACH_SYNC_POLICY_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/task.h+50-50| ... | @@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t; | ... | @@ -49,7 +49,7 @@ typedef function_table_entry *function_table_t; |
| 49 | #endif /* AUTOTEST */ | 49 | #endif /* AUTOTEST */ |
| 50 | 50 | ||
| 51 | #ifndef	task_MSG_COUNT | 51 | #ifndef	task_MSG_COUNT |
| 52 | #define	task_MSG_COUNT	63 | 52 | #define	task_MSG_COUNT	64 |
| 53 | #endif	/* task_MSG_COUNT */ | 53 | #endif	/* task_MSG_COUNT */ |
| 54 | 54 | ||
| 55 | #include <Availability.h> | 55 | #include <Availability.h> |
| ... | @@ -812,20 +812,6 @@ kern_return_t task_set_exc_guard_behavior | ... | @@ -812,20 +812,6 @@ kern_return_t task_set_exc_guard_behavior |
| 812 | 	task_exc_guard_behavior_t behavior | 812 | 	task_exc_guard_behavior_t behavior |
| 813 | ); | 813 | ); |
| 814 | 814 | ||
| 815 | /* Routine task_create_suid_cred */ | ||
| 816 | #ifdef	mig_external | ||
| 817 | mig_external | ||
| 818 | #else | ||
| 819 | extern | ||
| 820 | #endif	/* mig_external */ | ||
| 821 | kern_return_t task_create_suid_cred | ||
| 822 | ( | ||
| 823 | 	task_t task, | ||
| 824 | 	suid_cred_path_t path, | ||
| 825 | 	suid_cred_uid_t uid, | ||
| 826 | 	suid_cred_t *delegation | ||
| 827 | ); | ||
| 828 | |||
| 829 | /* Routine task_dyld_process_info_notify_register */ | 815 | /* Routine task_dyld_process_info_notify_register */ |
| 830 | #ifdef	mig_external | 816 | #ifdef	mig_external |
| 831 | mig_external | 817 | mig_external |
| ... | @@ -916,6 +902,20 @@ kern_return_t task_set_corpse_forking_behavior | ... | @@ -916,6 +902,20 @@ kern_return_t task_set_corpse_forking_behavior |
| 916 | 	task_corpse_forking_behavior_t behavior | 902 | 	task_corpse_forking_behavior_t behavior |
| 917 | ); | 903 | ); |
| 918 | 904 | ||
| 905 | /* Routine task_test_async_upcall_propagation */ | ||
| 906 | #ifdef	mig_external | ||
| 907 | mig_external | ||
| 908 | #else | ||
| 909 | extern | ||
| 910 | #endif	/* mig_external */ | ||
| 911 | kern_return_t task_test_async_upcall_propagation | ||
| 912 | ( | ||
| 913 | 	task_t task, | ||
| 914 | 	mach_port_t port, | ||
| 915 | 	int qos, | ||
| 916 | 	int iotier | ||
| 917 | ); | ||
| 918 | |||
| 919 | __END_DECLS | 919 | __END_DECLS |
| 920 | 920 | ||
| 921 | /********************** Caution **************************/ | 921 | /********************** Caution **************************/ |
| ... | @@ -1018,7 +1018,7 @@ __END_DECLS | ... | @@ -1018,7 +1018,7 @@ __END_DECLS |
| 1018 | 		NDR_record_t NDR; | 1018 | 		NDR_record_t NDR; |
| 1019 | 		task_flavor_t flavor; | 1019 | 		task_flavor_t flavor; |
| 1020 | 		mach_msg_type_number_t task_info_inCnt; | 1020 | 		mach_msg_type_number_t task_info_inCnt; |
| 1021 | 		integer_t task_info_in[87]; | 1021 | 		integer_t task_info_in[89]; |
| 1022 | 	} __Request__task_set_info_t __attribute__((unused)); | 1022 | 	} __Request__task_set_info_t __attribute__((unused)); |
| 1023 | #ifdef __MigPackStructs | 1023 | #ifdef __MigPackStructs |
| 1024 | #pragma pack(pop) | 1024 | #pragma pack(pop) |
| ... | @@ -1640,21 +1640,6 @@ __END_DECLS | ... | @@ -1640,21 +1640,6 @@ __END_DECLS |
| 1640 | #pragma pack(pop) | 1640 | #pragma pack(pop) |
| 1641 | #endif | 1641 | #endif |
| 1642 | 1642 | ||
| 1643 | #ifdef __MigPackStructs | ||
| 1644 | #pragma pack(push, 4) | ||
| 1645 | #endif | ||
| 1646 | 	typedef struct { | ||
| 1647 | 		mach_msg_header_t Head; | ||
| 1648 | 		NDR_record_t NDR; | ||
| 1649 | 		mach_msg_type_number_t pathOffset; /* MiG doesn't use it */ | ||
| 1650 | 		mach_msg_type_number_t pathCnt; | ||
| 1651 | 		char path[1024]; | ||
| 1652 | 		suid_cred_uid_t uid; | ||
| 1653 | 	} __Request__task_create_suid_cred_t __attribute__((unused)); | ||
| 1654 | #ifdef __MigPackStructs | ||
| 1655 | #pragma pack(pop) | ||
| 1656 | #endif | ||
| 1657 | |||
| 1658 | #ifdef __MigPackStructs | 1643 | #ifdef __MigPackStructs |
| 1659 | #pragma pack(push, 4) | 1644 | #pragma pack(push, 4) |
| 1660 | #endif | 1645 | #endif |
| ... | @@ -1740,6 +1725,23 @@ __END_DECLS | ... | @@ -1740,6 +1725,23 @@ __END_DECLS |
| 1740 | #ifdef __MigPackStructs | 1725 | #ifdef __MigPackStructs |
| 1741 | #pragma pack(pop) | 1726 | #pragma pack(pop) |
| 1742 | #endif | 1727 | #endif |
| 1728 | |||
| 1729 | #ifdef __MigPackStructs | ||
| 1730 | #pragma pack(push, 4) | ||
| 1731 | #endif | ||
| 1732 | 	typedef struct { | ||
| 1733 | 		mach_msg_header_t Head; | ||
| 1734 | 		/* start of the kernel processed data */ | ||
| 1735 | 		mach_msg_body_t msgh_body; | ||
| 1736 | 		mach_msg_port_descriptor_t port; | ||
| 1737 | 		/* end of the kernel processed data */ | ||
| 1738 | 		NDR_record_t NDR; | ||
| 1739 | 		int qos; | ||
| 1740 | 		int iotier; | ||
| 1741 | 	} __Request__task_test_async_upcall_propagation_t __attribute__((unused)); | ||
| 1742 | #ifdef __MigPackStructs | ||
| 1743 | #pragma pack(pop) | ||
| 1744 | #endif | ||
| 1743 | #endif /* !__Request__task_subsystem__defined */ | 1745 | #endif /* !__Request__task_subsystem__defined */ |
| 1744 | 1746 | ||
| 1745 | /* union of all requests */ | 1747 | /* union of all requests */ |
| ... | @@ -1801,7 +1803,6 @@ union __RequestUnion__task_subsystem { | ... | @@ -1801,7 +1803,6 @@ union __RequestUnion__task_subsystem { |
| 1801 | 	__Request__task_inspect_t Request_task_inspect; | 1803 | 	__Request__task_inspect_t Request_task_inspect; |
| 1802 | 	__Request__task_get_exc_guard_behavior_t Request_task_get_exc_guard_behavior; | 1804 | 	__Request__task_get_exc_guard_behavior_t Request_task_get_exc_guard_behavior; |
| 1803 | 	__Request__task_set_exc_guard_behavior_t Request_task_set_exc_guard_behavior; | 1805 | 	__Request__task_set_exc_guard_behavior_t Request_task_set_exc_guard_behavior; |
| 1804 | 	__Request__task_create_suid_cred_t Request_task_create_suid_cred; | ||
| 1805 | 	__Request__task_dyld_process_info_notify_register_t Request_task_dyld_process_info_notify_register; | 1806 | 	__Request__task_dyld_process_info_notify_register_t Request_task_dyld_process_info_notify_register; |
| 1806 | 	__Request__task_create_identity_token_t Request_task_create_identity_token; | 1807 | 	__Request__task_create_identity_token_t Request_task_create_identity_token; |
| 1807 | 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; | 1808 | 	__Request__task_identity_token_get_task_port_t Request_task_identity_token_get_task_port; |
| ... | @@ -1809,6 +1810,7 @@ union __RequestUnion__task_subsystem { | ... | @@ -1809,6 +1810,7 @@ union __RequestUnion__task_subsystem { |
| 1809 | 	__Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info; | 1810 | 	__Request__task_get_exception_ports_info_t Request_task_get_exception_ports_info; |
| 1810 | 	__Request__task_test_sync_upcall_t Request_task_test_sync_upcall; | 1811 | 	__Request__task_test_sync_upcall_t Request_task_test_sync_upcall; |
| 1811 | 	__Request__task_set_corpse_forking_behavior_t Request_task_set_corpse_forking_behavior; | 1812 | 	__Request__task_set_corpse_forking_behavior_t Request_task_set_corpse_forking_behavior; |
| 1813 | 	__Request__task_test_async_upcall_propagation_t Request_task_test_async_upcall_propagation; | ||
| 1812 | }; | 1814 | }; |
| 1813 | #endif /* !__RequestUnion__task_subsystem__defined */ | 1815 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 1814 | /* typedefs for all replies */ | 1816 | /* typedefs for all replies */ |
| ... | @@ -1894,7 +1896,7 @@ union __RequestUnion__task_subsystem { | ... | @@ -1894,7 +1896,7 @@ union __RequestUnion__task_subsystem { |
| 1894 | 		NDR_record_t NDR; | 1896 | 		NDR_record_t NDR; |
| 1895 | 		kern_return_t RetCode; | 1897 | 		kern_return_t RetCode; |
| 1896 | 		mach_msg_type_number_t task_info_outCnt; | 1898 | 		mach_msg_type_number_t task_info_outCnt; |
| 1897 | 		integer_t task_info_out[87]; | 1899 | 		integer_t task_info_out[89]; |
| 1898 | 	} __Reply__task_info_t __attribute__((unused)); | 1900 | 	} __Reply__task_info_t __attribute__((unused)); |
| 1899 | #ifdef __MigPackStructs | 1901 | #ifdef __MigPackStructs |
| 1900 | #pragma pack(pop) | 1902 | #pragma pack(pop) |
| ... | @@ -2540,20 +2542,6 @@ union __RequestUnion__task_subsystem { | ... | @@ -2540,20 +2542,6 @@ union __RequestUnion__task_subsystem { |
| 2540 | #pragma pack(pop) | 2542 | #pragma pack(pop) |
| 2541 | #endif | 2543 | #endif |
| 2542 | 2544 | ||
| 2543 | #ifdef __MigPackStructs | ||
| 2544 | #pragma pack(push, 4) | ||
| 2545 | #endif | ||
| 2546 | 	typedef struct { | ||
| 2547 | 		mach_msg_header_t Head; | ||
| 2548 | 		/* start of the kernel processed data */ | ||
| 2549 | 		mach_msg_body_t msgh_body; | ||
| 2550 | 		mach_msg_port_descriptor_t delegation; | ||
| 2551 | 		/* end of the kernel processed data */ | ||
| 2552 | 	} __Reply__task_create_suid_cred_t __attribute__((unused)); | ||
| 2553 | #ifdef __MigPackStructs | ||
| 2554 | #pragma pack(pop) | ||
| 2555 | #endif | ||
| 2556 | |||
| 2557 | #ifdef __MigPackStructs | 2545 | #ifdef __MigPackStructs |
| 2558 | #pragma pack(push, 4) | 2546 | #pragma pack(push, 4) |
| 2559 | #endif | 2547 | #endif |
| ... | @@ -2646,6 +2634,18 @@ union __RequestUnion__task_subsystem { | ... | @@ -2646,6 +2634,18 @@ union __RequestUnion__task_subsystem { |
| 2646 | #ifdef __MigPackStructs | 2634 | #ifdef __MigPackStructs |
| 2647 | #pragma pack(pop) | 2635 | #pragma pack(pop) |
| 2648 | #endif | 2636 | #endif |
| 2637 | |||
| 2638 | #ifdef __MigPackStructs | ||
| 2639 | #pragma pack(push, 4) | ||
| 2640 | #endif | ||
| 2641 | 	typedef struct { | ||
| 2642 | 		mach_msg_header_t Head; | ||
| 2643 | 		NDR_record_t NDR; | ||
| 2644 | 		kern_return_t RetCode; | ||
| 2645 | 	} __Reply__task_test_async_upcall_propagation_t __attribute__((unused)); | ||
| 2646 | #ifdef __MigPackStructs | ||
| 2647 | #pragma pack(pop) | ||
| 2648 | #endif | ||
| 2649 | #endif /* !__Reply__task_subsystem__defined */ | 2649 | #endif /* !__Reply__task_subsystem__defined */ |
| 2650 | 2650 | ||
| 2651 | /* union of all replies */ | 2651 | /* union of all replies */ |
| ... | @@ -2707,7 +2707,6 @@ union __ReplyUnion__task_subsystem { | ... | @@ -2707,7 +2707,6 @@ union __ReplyUnion__task_subsystem { |
| 2707 | 	__Reply__task_inspect_t Reply_task_inspect; | 2707 | 	__Reply__task_inspect_t Reply_task_inspect; |
| 2708 | 	__Reply__task_get_exc_guard_behavior_t Reply_task_get_exc_guard_behavior; | 2708 | 	__Reply__task_get_exc_guard_behavior_t Reply_task_get_exc_guard_behavior; |
| 2709 | 	__Reply__task_set_exc_guard_behavior_t Reply_task_set_exc_guard_behavior; | 2709 | 	__Reply__task_set_exc_guard_behavior_t Reply_task_set_exc_guard_behavior; |
| 2710 | 	__Reply__task_create_suid_cred_t Reply_task_create_suid_cred; | ||
| 2711 | 	__Reply__task_dyld_process_info_notify_register_t Reply_task_dyld_process_info_notify_register; | 2710 | 	__Reply__task_dyld_process_info_notify_register_t Reply_task_dyld_process_info_notify_register; |
| 2712 | 	__Reply__task_create_identity_token_t Reply_task_create_identity_token; | 2711 | 	__Reply__task_create_identity_token_t Reply_task_create_identity_token; |
| 2713 | 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; | 2712 | 	__Reply__task_identity_token_get_task_port_t Reply_task_identity_token_get_task_port; |
| ... | @@ -2715,6 +2714,7 @@ union __ReplyUnion__task_subsystem { | ... | @@ -2715,6 +2714,7 @@ union __ReplyUnion__task_subsystem { |
| 2715 | 	__Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info; | 2714 | 	__Reply__task_get_exception_ports_info_t Reply_task_get_exception_ports_info; |
| 2716 | 	__Reply__task_test_sync_upcall_t Reply_task_test_sync_upcall; | 2715 | 	__Reply__task_test_sync_upcall_t Reply_task_test_sync_upcall; |
| 2717 | 	__Reply__task_set_corpse_forking_behavior_t Reply_task_set_corpse_forking_behavior; | 2716 | 	__Reply__task_set_corpse_forking_behavior_t Reply_task_set_corpse_forking_behavior; |
| 2717 | 	__Reply__task_test_async_upcall_propagation_t Reply_task_test_async_upcall_propagation; | ||
| 2718 | }; | 2718 | }; |
| 2719 | #endif /* !__RequestUnion__task_subsystem__defined */ | 2719 | #endif /* !__RequestUnion__task_subsystem__defined */ |
| 2720 | 2720 | ||
| ... | @@ -2774,14 +2774,14 @@ union __ReplyUnion__task_subsystem { | ... | @@ -2774,14 +2774,14 @@ union __ReplyUnion__task_subsystem { |
| 2774 | { "task_inspect", 3451 },\ | 2774 | { "task_inspect", 3451 },\ |
| 2775 | { "task_get_exc_guard_behavior", 3452 },\ | 2775 | { "task_get_exc_guard_behavior", 3452 },\ |
| 2776 | { "task_set_exc_guard_behavior", 3453 },\ | 2776 | { "task_set_exc_guard_behavior", 3453 },\ |
| 2777 | { "task_create_suid_cred", 3454 },\ | ||
| 2778 | { "task_dyld_process_info_notify_register", 3456 },\ | 2777 | { "task_dyld_process_info_notify_register", 3456 },\ |
| 2779 | { "task_create_identity_token", 3457 },\ | 2778 | { "task_create_identity_token", 3457 },\ |
| 2780 | { "task_identity_token_get_task_port", 3458 },\ | 2779 | { "task_identity_token_get_task_port", 3458 },\ |
| 2781 | { "task_dyld_process_info_notify_deregister", 3459 },\ | 2780 | { "task_dyld_process_info_notify_deregister", 3459 },\ |
| 2782 | { "task_get_exception_ports_info", 3460 },\ | 2781 | { "task_get_exception_ports_info", 3460 },\ |
| 2783 | { "task_test_sync_upcall", 3461 },\ | 2782 | { "task_test_sync_upcall", 3461 },\ |
| 2784 | { "task_set_corpse_forking_behavior", 3462 } | 2783 | { "task_set_corpse_forking_behavior", 3462 },\ |
| 2784 | { "task_test_async_upcall_propagation", 3463 } | ||
| 2785 | #endif | 2785 | #endif |
| 2786 | 2786 | ||
| 2787 | #ifdef __AfterMigUserHeader | 2787 | #ifdef __AfterMigUserHeader |
lib/libc/include/any-macos.12-any/mach/task_info.h+6-1| ... | @@ -400,12 +400,17 @@ struct task_vm_info { | ... | @@ -400,12 +400,17 @@ struct task_vm_info { |
| 400 | 400 | ||
| 401 | 	/* added for rev5 */ | 401 | 	/* added for rev5 */ |
| 402 | 	integer_t decompressions; | 402 | 	integer_t decompressions; |
| 403 | |||
| 404 | 	/* added for rev6 */ | ||
| 405 | 	int64_t ledger_swapins; | ||
| 403 | }; | 406 | }; |
| 404 | typedef struct task_vm_info task_vm_info_data_t; | 407 | typedef struct task_vm_info task_vm_info_data_t; |
| 405 | typedef struct task_vm_info *task_vm_info_t; | 408 | typedef struct task_vm_info *task_vm_info_t; |
| 406 | #define TASK_VM_INFO_COUNT ((mach_msg_type_number_t) \ | 409 | #define TASK_VM_INFO_COUNT ((mach_msg_type_number_t) \ |
| 407 | 	 (sizeof (task_vm_info_data_t) / sizeof (natural_t))) | 410 | 	 (sizeof (task_vm_info_data_t) / sizeof (natural_t))) |
| 408 | #define TASK_VM_INFO_REV5_COUNT TASK_VM_INFO_COUNT | 411 | #define TASK_VM_INFO_REV6_COUNT TASK_VM_INFO_COUNT |
| 412 | #define TASK_VM_INFO_REV5_COUNT /* doesn't include ledger swapins */ \ | ||
| 413 | 	((mach_msg_type_number_t) (TASK_VM_INFO_REV6_COUNT - 2)) | ||
| 409 | #define TASK_VM_INFO_REV4_COUNT /* doesn't include decompressions */ \ | 414 | #define TASK_VM_INFO_REV4_COUNT /* doesn't include decompressions */ \ |
| 410 | 	((mach_msg_type_number_t) (TASK_VM_INFO_REV5_COUNT - 1)) | 415 | 	((mach_msg_type_number_t) (TASK_VM_INFO_REV5_COUNT - 1)) |
| 411 | #define TASK_VM_INFO_REV3_COUNT /* doesn't include limit bytes */ \ | 416 | #define TASK_VM_INFO_REV3_COUNT /* doesn't include limit bytes */ \ |
lib/libc/include/any-macos.12-any/mach/task_inspect.h deleted-57| ... | @@ -1,57 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef MACH_TASK_INSPECT_H | ||
| 30 | #define MACH_TASK_INSPECT_H | ||
| 31 | |||
| 32 | #include <stdint.h> | ||
| 33 | #include <mach/vm_types.h> | ||
| 34 | |||
| 35 | /* | ||
| 36 | * XXX These interfaces are still in development -- they are subject to change | ||
| 37 | * without notice. | ||
| 38 | */ | ||
| 39 | |||
| 40 | typedef natural_t task_inspect_flavor_t; | ||
| 41 | |||
| 42 | enum task_inspect_flavor { | ||
| 43 | 	TASK_INSPECT_BASIC_COUNTS = 1, | ||
| 44 | }; | ||
| 45 | |||
| 46 | struct task_inspect_basic_counts { | ||
| 47 | 	uint64_t instructions; | ||
| 48 | 	uint64_t cycles; | ||
| 49 | }; | ||
| 50 | #define TASK_INSPECT_BASIC_COUNTS_COUNT \ | ||
| 51 | 	(sizeof(struct task_inspect_basic_counts) / sizeof(natural_t)) | ||
| 52 | typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t; | ||
| 53 | typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t; | ||
| 54 | |||
| 55 | typedef integer_t *task_inspect_info_t; | ||
| 56 | |||
| 57 | #endif /* !defined(MACH_TASK_INSPECT_H) */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/task_special_ports.h deleted-135| ... | @@ -1,135 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2010 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/task_special_ports.h | ||
| 60 | * | ||
| 61 | *	Defines codes for special_purpose task ports. These are NOT | ||
| 62 | *	port identifiers - they are only used for the task_get_special_port | ||
| 63 | *	and task_set_special_port routines. | ||
| 64 | * | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 68 | #define _MACH_TASK_SPECIAL_PORTS_H_ | ||
| 69 | |||
| 70 | typedef int task_special_port_t; | ||
| 71 | |||
| 72 | #define TASK_KERNEL_PORT 1 /* The full task port for task. */ | ||
| 73 | |||
| 74 | #define TASK_HOST_PORT 2 /* The host (priv) port for task. */ | ||
| 75 | |||
| 76 | #define TASK_NAME_PORT 3 /* The name port for task. */ | ||
| 77 | |||
| 78 | #define TASK_BOOTSTRAP_PORT 4 /* Bootstrap environment for task. */ | ||
| 79 | |||
| 80 | #define TASK_INSPECT_PORT 5 /* The inspect port for task. */ | ||
| 81 | |||
| 82 | #define TASK_READ_PORT 6 /* The read port for task. */ | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Evolving and likely to change. | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* Was TASK_SEATBELT_PORT 7 Seatbelt compiler/DEM port for task. */ | ||
| 89 | |||
| 90 | /* Was TASK_GSSD_PORT 8 which transformed to a host port */ | ||
| 91 | |||
| 92 | #define TASK_ACCESS_PORT 9 /* Permission check for task_for_pid. */ | ||
| 93 | |||
| 94 | #define TASK_DEBUG_CONTROL_PORT 10 /* debug control port */ | ||
| 95 | |||
| 96 | #define TASK_RESOURCE_NOTIFY_PORT 11 /* overrides host special RN port */ | ||
| 97 | |||
| 98 | #define TASK_MAX_SPECIAL_PORT TASK_RESOURCE_NOTIFY_PORT | ||
| 99 | |||
| 100 | /* | ||
| 101 | *	Definitions for ease of use | ||
| 102 | */ | ||
| 103 | |||
| 104 | #define task_get_kernel_port(task, port) \ | ||
| 105 | 	 (task_get_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 106 | |||
| 107 | #define task_set_kernel_port(task, port) \ | ||
| 108 | 	 (task_set_special_port((task), TASK_KERNEL_PORT, (port))) | ||
| 109 | |||
| 110 | #define task_get_host_port(task, port) \ | ||
| 111 | 	 (task_get_special_port((task), TASK_HOST_PORT, (port))) | ||
| 112 | |||
| 113 | #define task_set_host_port(task, port) \ | ||
| 114 | 	 (task_set_special_port((task), TASK_HOST_PORT, (port))) | ||
| 115 | |||
| 116 | #define task_get_bootstrap_port(task, port) \ | ||
| 117 | 	 (task_get_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 118 | |||
| 119 | #define task_get_debug_control_port(task, port) \ | ||
| 120 | 	 (task_get_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 121 | |||
| 122 | #define task_set_bootstrap_port(task, port) \ | ||
| 123 | 	 (task_set_special_port((task), TASK_BOOTSTRAP_PORT, (port))) | ||
| 124 | |||
| 125 | #define task_get_task_access_port(task, port) \ | ||
| 126 | 	 (task_get_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 127 | |||
| 128 | #define task_set_task_access_port(task, port) \ | ||
| 129 | 	 (task_set_special_port((task), TASK_ACCESS_PORT, (port))) | ||
| 130 | |||
| 131 | #define task_set_task_debug_control_port(task, port) \ | ||
| 132 | 	 (task_set_special_port((task), TASK_DEBUG_CONTROL_PORT, (port))) | ||
| 133 | |||
| 134 | |||
| 135 | #endif /* _MACH_TASK_SPECIAL_PORTS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/thread_act.h deleted-1424| ... | @@ -1,1424 +0,0 @@ | ||
| 1 | #ifndef	_thread_act_user_ | ||
| 2 | #define	_thread_act_user_ | ||
| 3 | |||
| 4 | /* Module thread_act */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	thread_act_MSG_COUNT | ||
| 52 | #define	thread_act_MSG_COUNT	31 | ||
| 53 | #endif	/* thread_act_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine thread_terminate */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 76 | kern_return_t thread_terminate | ||
| 77 | ( | ||
| 78 | 	thread_act_t target_act | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine act_get_state */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 88 | kern_return_t act_get_state | ||
| 89 | ( | ||
| 90 | 	thread_read_t target_act, | ||
| 91 | 	int flavor, | ||
| 92 | 	thread_state_t old_state, | ||
| 93 | 	mach_msg_type_number_t *old_stateCnt | ||
| 94 | ); | ||
| 95 | |||
| 96 | /* Routine act_set_state */ | ||
| 97 | #ifdef	mig_external | ||
| 98 | mig_external | ||
| 99 | #else | ||
| 100 | extern | ||
| 101 | #endif	/* mig_external */ | ||
| 102 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 103 | kern_return_t act_set_state | ||
| 104 | ( | ||
| 105 | 	thread_act_t target_act, | ||
| 106 | 	int flavor, | ||
| 107 | 	thread_state_t new_state, | ||
| 108 | 	mach_msg_type_number_t new_stateCnt | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine thread_get_state */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | __WATCHOS_PROHIBITED | ||
| 118 | kern_return_t thread_get_state | ||
| 119 | ( | ||
| 120 | 	thread_read_t target_act, | ||
| 121 | 	thread_state_flavor_t flavor, | ||
| 122 | 	thread_state_t old_state, | ||
| 123 | 	mach_msg_type_number_t *old_stateCnt | ||
| 124 | ); | ||
| 125 | |||
| 126 | /* Routine thread_set_state */ | ||
| 127 | #ifdef	mig_external | ||
| 128 | mig_external | ||
| 129 | #else | ||
| 130 | extern | ||
| 131 | #endif	/* mig_external */ | ||
| 132 | __WATCHOS_PROHIBITED | ||
| 133 | kern_return_t thread_set_state | ||
| 134 | ( | ||
| 135 | 	thread_act_t target_act, | ||
| 136 | 	thread_state_flavor_t flavor, | ||
| 137 | 	thread_state_t new_state, | ||
| 138 | 	mach_msg_type_number_t new_stateCnt | ||
| 139 | ); | ||
| 140 | |||
| 141 | /* Routine thread_suspend */ | ||
| 142 | #ifdef	mig_external | ||
| 143 | mig_external | ||
| 144 | #else | ||
| 145 | extern | ||
| 146 | #endif	/* mig_external */ | ||
| 147 | __WATCHOS_PROHIBITED | ||
| 148 | kern_return_t thread_suspend | ||
| 149 | ( | ||
| 150 | 	thread_read_t target_act | ||
| 151 | ); | ||
| 152 | |||
| 153 | /* Routine thread_resume */ | ||
| 154 | #ifdef	mig_external | ||
| 155 | mig_external | ||
| 156 | #else | ||
| 157 | extern | ||
| 158 | #endif	/* mig_external */ | ||
| 159 | __WATCHOS_PROHIBITED | ||
| 160 | kern_return_t thread_resume | ||
| 161 | ( | ||
| 162 | 	thread_read_t target_act | ||
| 163 | ); | ||
| 164 | |||
| 165 | /* Routine thread_abort */ | ||
| 166 | #ifdef	mig_external | ||
| 167 | mig_external | ||
| 168 | #else | ||
| 169 | extern | ||
| 170 | #endif	/* mig_external */ | ||
| 171 | __WATCHOS_PROHIBITED | ||
| 172 | kern_return_t thread_abort | ||
| 173 | ( | ||
| 174 | 	thread_act_t target_act | ||
| 175 | ); | ||
| 176 | |||
| 177 | /* Routine thread_abort_safely */ | ||
| 178 | #ifdef	mig_external | ||
| 179 | mig_external | ||
| 180 | #else | ||
| 181 | extern | ||
| 182 | #endif	/* mig_external */ | ||
| 183 | __WATCHOS_PROHIBITED | ||
| 184 | kern_return_t thread_abort_safely | ||
| 185 | ( | ||
| 186 | 	thread_act_t target_act | ||
| 187 | ); | ||
| 188 | |||
| 189 | /* Routine thread_depress_abort */ | ||
| 190 | #ifdef	mig_external | ||
| 191 | mig_external | ||
| 192 | #else | ||
| 193 | extern | ||
| 194 | #endif	/* mig_external */ | ||
| 195 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 196 | kern_return_t thread_depress_abort | ||
| 197 | ( | ||
| 198 | 	thread_act_t thread | ||
| 199 | ); | ||
| 200 | |||
| 201 | /* Routine thread_get_special_port */ | ||
| 202 | #ifdef	mig_external | ||
| 203 | mig_external | ||
| 204 | #else | ||
| 205 | extern | ||
| 206 | #endif	/* mig_external */ | ||
| 207 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 208 | kern_return_t thread_get_special_port | ||
| 209 | ( | ||
| 210 | 	thread_inspect_t thr_act, | ||
| 211 | 	int which_port, | ||
| 212 | 	mach_port_t *special_port | ||
| 213 | ); | ||
| 214 | |||
| 215 | /* Routine thread_set_special_port */ | ||
| 216 | #ifdef	mig_external | ||
| 217 | mig_external | ||
| 218 | #else | ||
| 219 | extern | ||
| 220 | #endif	/* mig_external */ | ||
| 221 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 222 | kern_return_t thread_set_special_port | ||
| 223 | ( | ||
| 224 | 	thread_act_t thr_act, | ||
| 225 | 	int which_port, | ||
| 226 | 	mach_port_t special_port | ||
| 227 | ); | ||
| 228 | |||
| 229 | /* Routine thread_info */ | ||
| 230 | #ifdef	mig_external | ||
| 231 | mig_external | ||
| 232 | #else | ||
| 233 | extern | ||
| 234 | #endif	/* mig_external */ | ||
| 235 | kern_return_t thread_info | ||
| 236 | ( | ||
| 237 | 	thread_inspect_t target_act, | ||
| 238 | 	thread_flavor_t flavor, | ||
| 239 | 	thread_info_t thread_info_out, | ||
| 240 | 	mach_msg_type_number_t *thread_info_outCnt | ||
| 241 | ); | ||
| 242 | |||
| 243 | /* Routine thread_set_exception_ports */ | ||
| 244 | #ifdef	mig_external | ||
| 245 | mig_external | ||
| 246 | #else | ||
| 247 | extern | ||
| 248 | #endif	/* mig_external */ | ||
| 249 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 250 | kern_return_t thread_set_exception_ports | ||
| 251 | ( | ||
| 252 | 	thread_act_t thread, | ||
| 253 | 	exception_mask_t exception_mask, | ||
| 254 | 	mach_port_t new_port, | ||
| 255 | 	exception_behavior_t behavior, | ||
| 256 | 	thread_state_flavor_t new_flavor | ||
| 257 | ); | ||
| 258 | |||
| 259 | /* Routine thread_get_exception_ports */ | ||
| 260 | #ifdef	mig_external | ||
| 261 | mig_external | ||
| 262 | #else | ||
| 263 | extern | ||
| 264 | #endif	/* mig_external */ | ||
| 265 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 266 | kern_return_t thread_get_exception_ports | ||
| 267 | ( | ||
| 268 | 	thread_act_t thread, | ||
| 269 | 	exception_mask_t exception_mask, | ||
| 270 | 	exception_mask_array_t masks, | ||
| 271 | 	mach_msg_type_number_t *masksCnt, | ||
| 272 | 	exception_handler_array_t old_handlers, | ||
| 273 | 	exception_behavior_array_t old_behaviors, | ||
| 274 | 	exception_flavor_array_t old_flavors | ||
| 275 | ); | ||
| 276 | |||
| 277 | /* Routine thread_swap_exception_ports */ | ||
| 278 | #ifdef	mig_external | ||
| 279 | mig_external | ||
| 280 | #else | ||
| 281 | extern | ||
| 282 | #endif	/* mig_external */ | ||
| 283 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 284 | kern_return_t thread_swap_exception_ports | ||
| 285 | ( | ||
| 286 | 	thread_act_t thread, | ||
| 287 | 	exception_mask_t exception_mask, | ||
| 288 | 	mach_port_t new_port, | ||
| 289 | 	exception_behavior_t behavior, | ||
| 290 | 	thread_state_flavor_t new_flavor, | ||
| 291 | 	exception_mask_array_t masks, | ||
| 292 | 	mach_msg_type_number_t *masksCnt, | ||
| 293 | 	exception_handler_array_t old_handlers, | ||
| 294 | 	exception_behavior_array_t old_behaviors, | ||
| 295 | 	exception_flavor_array_t old_flavors | ||
| 296 | ); | ||
| 297 | |||
| 298 | /* Routine thread_policy */ | ||
| 299 | #ifdef	mig_external | ||
| 300 | mig_external | ||
| 301 | #else | ||
| 302 | extern | ||
| 303 | #endif	/* mig_external */ | ||
| 304 | kern_return_t thread_policy | ||
| 305 | ( | ||
| 306 | 	thread_act_t thr_act, | ||
| 307 | 	policy_t policy, | ||
| 308 | 	policy_base_t base, | ||
| 309 | 	mach_msg_type_number_t baseCnt, | ||
| 310 | 	boolean_t set_limit | ||
| 311 | ); | ||
| 312 | |||
| 313 | /* Routine thread_policy_set */ | ||
| 314 | #ifdef	mig_external | ||
| 315 | mig_external | ||
| 316 | #else | ||
| 317 | extern | ||
| 318 | #endif	/* mig_external */ | ||
| 319 | kern_return_t thread_policy_set | ||
| 320 | ( | ||
| 321 | 	thread_act_t thread, | ||
| 322 | 	thread_policy_flavor_t flavor, | ||
| 323 | 	thread_policy_t policy_info, | ||
| 324 | 	mach_msg_type_number_t policy_infoCnt | ||
| 325 | ); | ||
| 326 | |||
| 327 | /* Routine thread_policy_get */ | ||
| 328 | #ifdef	mig_external | ||
| 329 | mig_external | ||
| 330 | #else | ||
| 331 | extern | ||
| 332 | #endif	/* mig_external */ | ||
| 333 | kern_return_t thread_policy_get | ||
| 334 | ( | ||
| 335 | 	thread_inspect_t thread, | ||
| 336 | 	thread_policy_flavor_t flavor, | ||
| 337 | 	thread_policy_t policy_info, | ||
| 338 | 	mach_msg_type_number_t *policy_infoCnt, | ||
| 339 | 	boolean_t *get_default | ||
| 340 | ); | ||
| 341 | |||
| 342 | /* Routine thread_sample */ | ||
| 343 | #ifdef	mig_external | ||
| 344 | mig_external | ||
| 345 | #else | ||
| 346 | extern | ||
| 347 | #endif	/* mig_external */ | ||
| 348 | kern_return_t thread_sample | ||
| 349 | ( | ||
| 350 | 	thread_act_t thread, | ||
| 351 | 	mach_port_t reply | ||
| 352 | ); | ||
| 353 | |||
| 354 | /* Routine etap_trace_thread */ | ||
| 355 | #ifdef	mig_external | ||
| 356 | mig_external | ||
| 357 | #else | ||
| 358 | extern | ||
| 359 | #endif	/* mig_external */ | ||
| 360 | kern_return_t etap_trace_thread | ||
| 361 | ( | ||
| 362 | 	thread_act_t target_act, | ||
| 363 | 	boolean_t trace_status | ||
| 364 | ); | ||
| 365 | |||
| 366 | /* Routine thread_assign */ | ||
| 367 | #ifdef	mig_external | ||
| 368 | mig_external | ||
| 369 | #else | ||
| 370 | extern | ||
| 371 | #endif	/* mig_external */ | ||
| 372 | kern_return_t thread_assign | ||
| 373 | ( | ||
| 374 | 	thread_act_t thread, | ||
| 375 | 	processor_set_t new_set | ||
| 376 | ); | ||
| 377 | |||
| 378 | /* Routine thread_assign_default */ | ||
| 379 | #ifdef	mig_external | ||
| 380 | mig_external | ||
| 381 | #else | ||
| 382 | extern | ||
| 383 | #endif	/* mig_external */ | ||
| 384 | kern_return_t thread_assign_default | ||
| 385 | ( | ||
| 386 | 	thread_act_t thread | ||
| 387 | ); | ||
| 388 | |||
| 389 | /* Routine thread_get_assignment */ | ||
| 390 | #ifdef	mig_external | ||
| 391 | mig_external | ||
| 392 | #else | ||
| 393 | extern | ||
| 394 | #endif	/* mig_external */ | ||
| 395 | kern_return_t thread_get_assignment | ||
| 396 | ( | ||
| 397 | 	thread_inspect_t thread, | ||
| 398 | 	processor_set_name_t *assigned_set | ||
| 399 | ); | ||
| 400 | |||
| 401 | /* Routine thread_set_policy */ | ||
| 402 | #ifdef	mig_external | ||
| 403 | mig_external | ||
| 404 | #else | ||
| 405 | extern | ||
| 406 | #endif	/* mig_external */ | ||
| 407 | kern_return_t thread_set_policy | ||
| 408 | ( | ||
| 409 | 	thread_act_t thr_act, | ||
| 410 | 	processor_set_t pset, | ||
| 411 | 	policy_t policy, | ||
| 412 | 	policy_base_t base, | ||
| 413 | 	mach_msg_type_number_t baseCnt, | ||
| 414 | 	policy_limit_t limit, | ||
| 415 | 	mach_msg_type_number_t limitCnt | ||
| 416 | ); | ||
| 417 | |||
| 418 | /* Routine thread_get_mach_voucher */ | ||
| 419 | #ifdef	mig_external | ||
| 420 | mig_external | ||
| 421 | #else | ||
| 422 | extern | ||
| 423 | #endif	/* mig_external */ | ||
| 424 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 425 | kern_return_t thread_get_mach_voucher | ||
| 426 | ( | ||
| 427 | 	thread_read_t thr_act, | ||
| 428 | 	mach_voucher_selector_t which, | ||
| 429 | 	ipc_voucher_t *voucher | ||
| 430 | ); | ||
| 431 | |||
| 432 | /* Routine thread_set_mach_voucher */ | ||
| 433 | #ifdef	mig_external | ||
| 434 | mig_external | ||
| 435 | #else | ||
| 436 | extern | ||
| 437 | #endif	/* mig_external */ | ||
| 438 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 439 | kern_return_t thread_set_mach_voucher | ||
| 440 | ( | ||
| 441 | 	thread_act_t thr_act, | ||
| 442 | 	ipc_voucher_t voucher | ||
| 443 | ); | ||
| 444 | |||
| 445 | /* Routine thread_swap_mach_voucher */ | ||
| 446 | #ifdef	mig_external | ||
| 447 | mig_external | ||
| 448 | #else | ||
| 449 | extern | ||
| 450 | #endif	/* mig_external */ | ||
| 451 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 452 | kern_return_t thread_swap_mach_voucher | ||
| 453 | ( | ||
| 454 | 	thread_act_t thr_act, | ||
| 455 | 	ipc_voucher_t new_voucher, | ||
| 456 | 	ipc_voucher_t *old_voucher | ||
| 457 | ); | ||
| 458 | |||
| 459 | /* Routine thread_convert_thread_state */ | ||
| 460 | #ifdef	mig_external | ||
| 461 | mig_external | ||
| 462 | #else | ||
| 463 | extern | ||
| 464 | #endif	/* mig_external */ | ||
| 465 | kern_return_t thread_convert_thread_state | ||
| 466 | ( | ||
| 467 | 	thread_act_t thread, | ||
| 468 | 	int direction, | ||
| 469 | 	thread_state_flavor_t flavor, | ||
| 470 | 	thread_state_t in_state, | ||
| 471 | 	mach_msg_type_number_t in_stateCnt, | ||
| 472 | 	thread_state_t out_state, | ||
| 473 | 	mach_msg_type_number_t *out_stateCnt | ||
| 474 | ); | ||
| 475 | |||
| 476 | /* Routine thread_get_exception_ports_info */ | ||
| 477 | #ifdef	mig_external | ||
| 478 | mig_external | ||
| 479 | #else | ||
| 480 | extern | ||
| 481 | #endif	/* mig_external */ | ||
| 482 | kern_return_t thread_get_exception_ports_info | ||
| 483 | ( | ||
| 484 | 	mach_port_t port, | ||
| 485 | 	exception_mask_t exception_mask, | ||
| 486 | 	exception_mask_array_t masks, | ||
| 487 | 	mach_msg_type_number_t *masksCnt, | ||
| 488 | 	exception_handler_info_array_t old_handlers_info, | ||
| 489 | 	exception_behavior_array_t old_behaviors, | ||
| 490 | 	exception_flavor_array_t old_flavors | ||
| 491 | ); | ||
| 492 | |||
| 493 | __END_DECLS | ||
| 494 | |||
| 495 | /********************** Caution **************************/ | ||
| 496 | /* The following data types should be used to calculate */ | ||
| 497 | /* maximum message sizes only. The actual message may be */ | ||
| 498 | /* smaller, and the position of the arguments within the */ | ||
| 499 | /* message layout may vary from what is presented here. */ | ||
| 500 | /* For example, if any of the arguments are variable- */ | ||
| 501 | /* sized, and less than the maximum is sent, the data */ | ||
| 502 | /* will be packed tight in the actual message to reduce */ | ||
| 503 | /* the presence of holes. */ | ||
| 504 | /********************** Caution **************************/ | ||
| 505 | |||
| 506 | /* typedefs for all requests */ | ||
| 507 | |||
| 508 | #ifndef __Request__thread_act_subsystem__defined | ||
| 509 | #define __Request__thread_act_subsystem__defined | ||
| 510 | |||
| 511 | #ifdef __MigPackStructs | ||
| 512 | #pragma pack(push, 4) | ||
| 513 | #endif | ||
| 514 | 	typedef struct { | ||
| 515 | 		mach_msg_header_t Head; | ||
| 516 | 	} __Request__thread_terminate_t __attribute__((unused)); | ||
| 517 | #ifdef __MigPackStructs | ||
| 518 | #pragma pack(pop) | ||
| 519 | #endif | ||
| 520 | |||
| 521 | #ifdef __MigPackStructs | ||
| 522 | #pragma pack(push, 4) | ||
| 523 | #endif | ||
| 524 | 	typedef struct { | ||
| 525 | 		mach_msg_header_t Head; | ||
| 526 | 		NDR_record_t NDR; | ||
| 527 | 		int flavor; | ||
| 528 | 		mach_msg_type_number_t old_stateCnt; | ||
| 529 | 	} __Request__act_get_state_t __attribute__((unused)); | ||
| 530 | #ifdef __MigPackStructs | ||
| 531 | #pragma pack(pop) | ||
| 532 | #endif | ||
| 533 | |||
| 534 | #ifdef __MigPackStructs | ||
| 535 | #pragma pack(push, 4) | ||
| 536 | #endif | ||
| 537 | 	typedef struct { | ||
| 538 | 		mach_msg_header_t Head; | ||
| 539 | 		NDR_record_t NDR; | ||
| 540 | 		int flavor; | ||
| 541 | 		mach_msg_type_number_t new_stateCnt; | ||
| 542 | 		natural_t new_state[1296]; | ||
| 543 | 	} __Request__act_set_state_t __attribute__((unused)); | ||
| 544 | #ifdef __MigPackStructs | ||
| 545 | #pragma pack(pop) | ||
| 546 | #endif | ||
| 547 | |||
| 548 | #ifdef __MigPackStructs | ||
| 549 | #pragma pack(push, 4) | ||
| 550 | #endif | ||
| 551 | 	typedef struct { | ||
| 552 | 		mach_msg_header_t Head; | ||
| 553 | 		NDR_record_t NDR; | ||
| 554 | 		thread_state_flavor_t flavor; | ||
| 555 | 		mach_msg_type_number_t old_stateCnt; | ||
| 556 | 	} __Request__thread_get_state_t __attribute__((unused)); | ||
| 557 | #ifdef __MigPackStructs | ||
| 558 | #pragma pack(pop) | ||
| 559 | #endif | ||
| 560 | |||
| 561 | #ifdef __MigPackStructs | ||
| 562 | #pragma pack(push, 4) | ||
| 563 | #endif | ||
| 564 | 	typedef struct { | ||
| 565 | 		mach_msg_header_t Head; | ||
| 566 | 		NDR_record_t NDR; | ||
| 567 | 		thread_state_flavor_t flavor; | ||
| 568 | 		mach_msg_type_number_t new_stateCnt; | ||
| 569 | 		natural_t new_state[1296]; | ||
| 570 | 	} __Request__thread_set_state_t __attribute__((unused)); | ||
| 571 | #ifdef __MigPackStructs | ||
| 572 | #pragma pack(pop) | ||
| 573 | #endif | ||
| 574 | |||
| 575 | #ifdef __MigPackStructs | ||
| 576 | #pragma pack(push, 4) | ||
| 577 | #endif | ||
| 578 | 	typedef struct { | ||
| 579 | 		mach_msg_header_t Head; | ||
| 580 | 	} __Request__thread_suspend_t __attribute__((unused)); | ||
| 581 | #ifdef __MigPackStructs | ||
| 582 | #pragma pack(pop) | ||
| 583 | #endif | ||
| 584 | |||
| 585 | #ifdef __MigPackStructs | ||
| 586 | #pragma pack(push, 4) | ||
| 587 | #endif | ||
| 588 | 	typedef struct { | ||
| 589 | 		mach_msg_header_t Head; | ||
| 590 | 	} __Request__thread_resume_t __attribute__((unused)); | ||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(pop) | ||
| 593 | #endif | ||
| 594 | |||
| 595 | #ifdef __MigPackStructs | ||
| 596 | #pragma pack(push, 4) | ||
| 597 | #endif | ||
| 598 | 	typedef struct { | ||
| 599 | 		mach_msg_header_t Head; | ||
| 600 | 	} __Request__thread_abort_t __attribute__((unused)); | ||
| 601 | #ifdef __MigPackStructs | ||
| 602 | #pragma pack(pop) | ||
| 603 | #endif | ||
| 604 | |||
| 605 | #ifdef __MigPackStructs | ||
| 606 | #pragma pack(push, 4) | ||
| 607 | #endif | ||
| 608 | 	typedef struct { | ||
| 609 | 		mach_msg_header_t Head; | ||
| 610 | 	} __Request__thread_abort_safely_t __attribute__((unused)); | ||
| 611 | #ifdef __MigPackStructs | ||
| 612 | #pragma pack(pop) | ||
| 613 | #endif | ||
| 614 | |||
| 615 | #ifdef __MigPackStructs | ||
| 616 | #pragma pack(push, 4) | ||
| 617 | #endif | ||
| 618 | 	typedef struct { | ||
| 619 | 		mach_msg_header_t Head; | ||
| 620 | 	} __Request__thread_depress_abort_t __attribute__((unused)); | ||
| 621 | #ifdef __MigPackStructs | ||
| 622 | #pragma pack(pop) | ||
| 623 | #endif | ||
| 624 | |||
| 625 | #ifdef __MigPackStructs | ||
| 626 | #pragma pack(push, 4) | ||
| 627 | #endif | ||
| 628 | 	typedef struct { | ||
| 629 | 		mach_msg_header_t Head; | ||
| 630 | 		NDR_record_t NDR; | ||
| 631 | 		int which_port; | ||
| 632 | 	} __Request__thread_get_special_port_t __attribute__((unused)); | ||
| 633 | #ifdef __MigPackStructs | ||
| 634 | #pragma pack(pop) | ||
| 635 | #endif | ||
| 636 | |||
| 637 | #ifdef __MigPackStructs | ||
| 638 | #pragma pack(push, 4) | ||
| 639 | #endif | ||
| 640 | 	typedef struct { | ||
| 641 | 		mach_msg_header_t Head; | ||
| 642 | 		/* start of the kernel processed data */ | ||
| 643 | 		mach_msg_body_t msgh_body; | ||
| 644 | 		mach_msg_port_descriptor_t special_port; | ||
| 645 | 		/* end of the kernel processed data */ | ||
| 646 | 		NDR_record_t NDR; | ||
| 647 | 		int which_port; | ||
| 648 | 	} __Request__thread_set_special_port_t __attribute__((unused)); | ||
| 649 | #ifdef __MigPackStructs | ||
| 650 | #pragma pack(pop) | ||
| 651 | #endif | ||
| 652 | |||
| 653 | #ifdef __MigPackStructs | ||
| 654 | #pragma pack(push, 4) | ||
| 655 | #endif | ||
| 656 | 	typedef struct { | ||
| 657 | 		mach_msg_header_t Head; | ||
| 658 | 		NDR_record_t NDR; | ||
| 659 | 		thread_flavor_t flavor; | ||
| 660 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 661 | 	} __Request__thread_info_t __attribute__((unused)); | ||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(pop) | ||
| 664 | #endif | ||
| 665 | |||
| 666 | #ifdef __MigPackStructs | ||
| 667 | #pragma pack(push, 4) | ||
| 668 | #endif | ||
| 669 | 	typedef struct { | ||
| 670 | 		mach_msg_header_t Head; | ||
| 671 | 		/* start of the kernel processed data */ | ||
| 672 | 		mach_msg_body_t msgh_body; | ||
| 673 | 		mach_msg_port_descriptor_t new_port; | ||
| 674 | 		/* end of the kernel processed data */ | ||
| 675 | 		NDR_record_t NDR; | ||
| 676 | 		exception_mask_t exception_mask; | ||
| 677 | 		exception_behavior_t behavior; | ||
| 678 | 		thread_state_flavor_t new_flavor; | ||
| 679 | 	} __Request__thread_set_exception_ports_t __attribute__((unused)); | ||
| 680 | #ifdef __MigPackStructs | ||
| 681 | #pragma pack(pop) | ||
| 682 | #endif | ||
| 683 | |||
| 684 | #ifdef __MigPackStructs | ||
| 685 | #pragma pack(push, 4) | ||
| 686 | #endif | ||
| 687 | 	typedef struct { | ||
| 688 | 		mach_msg_header_t Head; | ||
| 689 | 		NDR_record_t NDR; | ||
| 690 | 		exception_mask_t exception_mask; | ||
| 691 | 	} __Request__thread_get_exception_ports_t __attribute__((unused)); | ||
| 692 | #ifdef __MigPackStructs | ||
| 693 | #pragma pack(pop) | ||
| 694 | #endif | ||
| 695 | |||
| 696 | #ifdef __MigPackStructs | ||
| 697 | #pragma pack(push, 4) | ||
| 698 | #endif | ||
| 699 | 	typedef struct { | ||
| 700 | 		mach_msg_header_t Head; | ||
| 701 | 		/* start of the kernel processed data */ | ||
| 702 | 		mach_msg_body_t msgh_body; | ||
| 703 | 		mach_msg_port_descriptor_t new_port; | ||
| 704 | 		/* end of the kernel processed data */ | ||
| 705 | 		NDR_record_t NDR; | ||
| 706 | 		exception_mask_t exception_mask; | ||
| 707 | 		exception_behavior_t behavior; | ||
| 708 | 		thread_state_flavor_t new_flavor; | ||
| 709 | 	} __Request__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 710 | #ifdef __MigPackStructs | ||
| 711 | #pragma pack(pop) | ||
| 712 | #endif | ||
| 713 | |||
| 714 | #ifdef __MigPackStructs | ||
| 715 | #pragma pack(push, 4) | ||
| 716 | #endif | ||
| 717 | 	typedef struct { | ||
| 718 | 		mach_msg_header_t Head; | ||
| 719 | 		NDR_record_t NDR; | ||
| 720 | 		policy_t policy; | ||
| 721 | 		mach_msg_type_number_t baseCnt; | ||
| 722 | 		integer_t base[5]; | ||
| 723 | 		boolean_t set_limit; | ||
| 724 | 	} __Request__thread_policy_t __attribute__((unused)); | ||
| 725 | #ifdef __MigPackStructs | ||
| 726 | #pragma pack(pop) | ||
| 727 | #endif | ||
| 728 | |||
| 729 | #ifdef __MigPackStructs | ||
| 730 | #pragma pack(push, 4) | ||
| 731 | #endif | ||
| 732 | 	typedef struct { | ||
| 733 | 		mach_msg_header_t Head; | ||
| 734 | 		NDR_record_t NDR; | ||
| 735 | 		thread_policy_flavor_t flavor; | ||
| 736 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 737 | 		integer_t policy_info[16]; | ||
| 738 | 	} __Request__thread_policy_set_t __attribute__((unused)); | ||
| 739 | #ifdef __MigPackStructs | ||
| 740 | #pragma pack(pop) | ||
| 741 | #endif | ||
| 742 | |||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(push, 4) | ||
| 745 | #endif | ||
| 746 | 	typedef struct { | ||
| 747 | 		mach_msg_header_t Head; | ||
| 748 | 		NDR_record_t NDR; | ||
| 749 | 		thread_policy_flavor_t flavor; | ||
| 750 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 751 | 		boolean_t get_default; | ||
| 752 | 	} __Request__thread_policy_get_t __attribute__((unused)); | ||
| 753 | #ifdef __MigPackStructs | ||
| 754 | #pragma pack(pop) | ||
| 755 | #endif | ||
| 756 | |||
| 757 | #ifdef __MigPackStructs | ||
| 758 | #pragma pack(push, 4) | ||
| 759 | #endif | ||
| 760 | 	typedef struct { | ||
| 761 | 		mach_msg_header_t Head; | ||
| 762 | 		/* start of the kernel processed data */ | ||
| 763 | 		mach_msg_body_t msgh_body; | ||
| 764 | 		mach_msg_port_descriptor_t reply; | ||
| 765 | 		/* end of the kernel processed data */ | ||
| 766 | 	} __Request__thread_sample_t __attribute__((unused)); | ||
| 767 | #ifdef __MigPackStructs | ||
| 768 | #pragma pack(pop) | ||
| 769 | #endif | ||
| 770 | |||
| 771 | #ifdef __MigPackStructs | ||
| 772 | #pragma pack(push, 4) | ||
| 773 | #endif | ||
| 774 | 	typedef struct { | ||
| 775 | 		mach_msg_header_t Head; | ||
| 776 | 		NDR_record_t NDR; | ||
| 777 | 		boolean_t trace_status; | ||
| 778 | 	} __Request__etap_trace_thread_t __attribute__((unused)); | ||
| 779 | #ifdef __MigPackStructs | ||
| 780 | #pragma pack(pop) | ||
| 781 | #endif | ||
| 782 | |||
| 783 | #ifdef __MigPackStructs | ||
| 784 | #pragma pack(push, 4) | ||
| 785 | #endif | ||
| 786 | 	typedef struct { | ||
| 787 | 		mach_msg_header_t Head; | ||
| 788 | 		/* start of the kernel processed data */ | ||
| 789 | 		mach_msg_body_t msgh_body; | ||
| 790 | 		mach_msg_port_descriptor_t new_set; | ||
| 791 | 		/* end of the kernel processed data */ | ||
| 792 | 	} __Request__thread_assign_t __attribute__((unused)); | ||
| 793 | #ifdef __MigPackStructs | ||
| 794 | #pragma pack(pop) | ||
| 795 | #endif | ||
| 796 | |||
| 797 | #ifdef __MigPackStructs | ||
| 798 | #pragma pack(push, 4) | ||
| 799 | #endif | ||
| 800 | 	typedef struct { | ||
| 801 | 		mach_msg_header_t Head; | ||
| 802 | 	} __Request__thread_assign_default_t __attribute__((unused)); | ||
| 803 | #ifdef __MigPackStructs | ||
| 804 | #pragma pack(pop) | ||
| 805 | #endif | ||
| 806 | |||
| 807 | #ifdef __MigPackStructs | ||
| 808 | #pragma pack(push, 4) | ||
| 809 | #endif | ||
| 810 | 	typedef struct { | ||
| 811 | 		mach_msg_header_t Head; | ||
| 812 | 	} __Request__thread_get_assignment_t __attribute__((unused)); | ||
| 813 | #ifdef __MigPackStructs | ||
| 814 | #pragma pack(pop) | ||
| 815 | #endif | ||
| 816 | |||
| 817 | #ifdef __MigPackStructs | ||
| 818 | #pragma pack(push, 4) | ||
| 819 | #endif | ||
| 820 | 	typedef struct { | ||
| 821 | 		mach_msg_header_t Head; | ||
| 822 | 		/* start of the kernel processed data */ | ||
| 823 | 		mach_msg_body_t msgh_body; | ||
| 824 | 		mach_msg_port_descriptor_t pset; | ||
| 825 | 		/* end of the kernel processed data */ | ||
| 826 | 		NDR_record_t NDR; | ||
| 827 | 		policy_t policy; | ||
| 828 | 		mach_msg_type_number_t baseCnt; | ||
| 829 | 		integer_t base[5]; | ||
| 830 | 		mach_msg_type_number_t limitCnt; | ||
| 831 | 		integer_t limit[1]; | ||
| 832 | 	} __Request__thread_set_policy_t __attribute__((unused)); | ||
| 833 | #ifdef __MigPackStructs | ||
| 834 | #pragma pack(pop) | ||
| 835 | #endif | ||
| 836 | |||
| 837 | #ifdef __MigPackStructs | ||
| 838 | #pragma pack(push, 4) | ||
| 839 | #endif | ||
| 840 | 	typedef struct { | ||
| 841 | 		mach_msg_header_t Head; | ||
| 842 | 		NDR_record_t NDR; | ||
| 843 | 		mach_voucher_selector_t which; | ||
| 844 | 	} __Request__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 845 | #ifdef __MigPackStructs | ||
| 846 | #pragma pack(pop) | ||
| 847 | #endif | ||
| 848 | |||
| 849 | #ifdef __MigPackStructs | ||
| 850 | #pragma pack(push, 4) | ||
| 851 | #endif | ||
| 852 | 	typedef struct { | ||
| 853 | 		mach_msg_header_t Head; | ||
| 854 | 		/* start of the kernel processed data */ | ||
| 855 | 		mach_msg_body_t msgh_body; | ||
| 856 | 		mach_msg_port_descriptor_t voucher; | ||
| 857 | 		/* end of the kernel processed data */ | ||
| 858 | 	} __Request__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 859 | #ifdef __MigPackStructs | ||
| 860 | #pragma pack(pop) | ||
| 861 | #endif | ||
| 862 | |||
| 863 | #ifdef __MigPackStructs | ||
| 864 | #pragma pack(push, 4) | ||
| 865 | #endif | ||
| 866 | 	typedef struct { | ||
| 867 | 		mach_msg_header_t Head; | ||
| 868 | 		/* start of the kernel processed data */ | ||
| 869 | 		mach_msg_body_t msgh_body; | ||
| 870 | 		mach_msg_port_descriptor_t new_voucher; | ||
| 871 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 872 | 		/* end of the kernel processed data */ | ||
| 873 | 	} __Request__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 874 | #ifdef __MigPackStructs | ||
| 875 | #pragma pack(pop) | ||
| 876 | #endif | ||
| 877 | |||
| 878 | #ifdef __MigPackStructs | ||
| 879 | #pragma pack(push, 4) | ||
| 880 | #endif | ||
| 881 | 	typedef struct { | ||
| 882 | 		mach_msg_header_t Head; | ||
| 883 | 		NDR_record_t NDR; | ||
| 884 | 		int direction; | ||
| 885 | 		thread_state_flavor_t flavor; | ||
| 886 | 		mach_msg_type_number_t in_stateCnt; | ||
| 887 | 		natural_t in_state[1296]; | ||
| 888 | 		mach_msg_type_number_t out_stateCnt; | ||
| 889 | 	} __Request__thread_convert_thread_state_t __attribute__((unused)); | ||
| 890 | #ifdef __MigPackStructs | ||
| 891 | #pragma pack(pop) | ||
| 892 | #endif | ||
| 893 | |||
| 894 | #ifdef __MigPackStructs | ||
| 895 | #pragma pack(push, 4) | ||
| 896 | #endif | ||
| 897 | 	typedef struct { | ||
| 898 | 		mach_msg_header_t Head; | ||
| 899 | 		NDR_record_t NDR; | ||
| 900 | 		exception_mask_t exception_mask; | ||
| 901 | 	} __Request__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 902 | #ifdef __MigPackStructs | ||
| 903 | #pragma pack(pop) | ||
| 904 | #endif | ||
| 905 | #endif /* !__Request__thread_act_subsystem__defined */ | ||
| 906 | |||
| 907 | /* union of all requests */ | ||
| 908 | |||
| 909 | #ifndef __RequestUnion__thread_act_subsystem__defined | ||
| 910 | #define __RequestUnion__thread_act_subsystem__defined | ||
| 911 | union __RequestUnion__thread_act_subsystem { | ||
| 912 | 	__Request__thread_terminate_t Request_thread_terminate; | ||
| 913 | 	__Request__act_get_state_t Request_act_get_state; | ||
| 914 | 	__Request__act_set_state_t Request_act_set_state; | ||
| 915 | 	__Request__thread_get_state_t Request_thread_get_state; | ||
| 916 | 	__Request__thread_set_state_t Request_thread_set_state; | ||
| 917 | 	__Request__thread_suspend_t Request_thread_suspend; | ||
| 918 | 	__Request__thread_resume_t Request_thread_resume; | ||
| 919 | 	__Request__thread_abort_t Request_thread_abort; | ||
| 920 | 	__Request__thread_abort_safely_t Request_thread_abort_safely; | ||
| 921 | 	__Request__thread_depress_abort_t Request_thread_depress_abort; | ||
| 922 | 	__Request__thread_get_special_port_t Request_thread_get_special_port; | ||
| 923 | 	__Request__thread_set_special_port_t Request_thread_set_special_port; | ||
| 924 | 	__Request__thread_info_t Request_thread_info; | ||
| 925 | 	__Request__thread_set_exception_ports_t Request_thread_set_exception_ports; | ||
| 926 | 	__Request__thread_get_exception_ports_t Request_thread_get_exception_ports; | ||
| 927 | 	__Request__thread_swap_exception_ports_t Request_thread_swap_exception_ports; | ||
| 928 | 	__Request__thread_policy_t Request_thread_policy; | ||
| 929 | 	__Request__thread_policy_set_t Request_thread_policy_set; | ||
| 930 | 	__Request__thread_policy_get_t Request_thread_policy_get; | ||
| 931 | 	__Request__thread_sample_t Request_thread_sample; | ||
| 932 | 	__Request__etap_trace_thread_t Request_etap_trace_thread; | ||
| 933 | 	__Request__thread_assign_t Request_thread_assign; | ||
| 934 | 	__Request__thread_assign_default_t Request_thread_assign_default; | ||
| 935 | 	__Request__thread_get_assignment_t Request_thread_get_assignment; | ||
| 936 | 	__Request__thread_set_policy_t Request_thread_set_policy; | ||
| 937 | 	__Request__thread_get_mach_voucher_t Request_thread_get_mach_voucher; | ||
| 938 | 	__Request__thread_set_mach_voucher_t Request_thread_set_mach_voucher; | ||
| 939 | 	__Request__thread_swap_mach_voucher_t Request_thread_swap_mach_voucher; | ||
| 940 | 	__Request__thread_convert_thread_state_t Request_thread_convert_thread_state; | ||
| 941 | 	__Request__thread_get_exception_ports_info_t Request_thread_get_exception_ports_info; | ||
| 942 | }; | ||
| 943 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 944 | /* typedefs for all replies */ | ||
| 945 | |||
| 946 | #ifndef __Reply__thread_act_subsystem__defined | ||
| 947 | #define __Reply__thread_act_subsystem__defined | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		NDR_record_t NDR; | ||
| 955 | 		kern_return_t RetCode; | ||
| 956 | 	} __Reply__thread_terminate_t __attribute__((unused)); | ||
| 957 | #ifdef __MigPackStructs | ||
| 958 | #pragma pack(pop) | ||
| 959 | #endif | ||
| 960 | |||
| 961 | #ifdef __MigPackStructs | ||
| 962 | #pragma pack(push, 4) | ||
| 963 | #endif | ||
| 964 | 	typedef struct { | ||
| 965 | 		mach_msg_header_t Head; | ||
| 966 | 		NDR_record_t NDR; | ||
| 967 | 		kern_return_t RetCode; | ||
| 968 | 		mach_msg_type_number_t old_stateCnt; | ||
| 969 | 		natural_t old_state[1296]; | ||
| 970 | 	} __Reply__act_get_state_t __attribute__((unused)); | ||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(pop) | ||
| 973 | #endif | ||
| 974 | |||
| 975 | #ifdef __MigPackStructs | ||
| 976 | #pragma pack(push, 4) | ||
| 977 | #endif | ||
| 978 | 	typedef struct { | ||
| 979 | 		mach_msg_header_t Head; | ||
| 980 | 		NDR_record_t NDR; | ||
| 981 | 		kern_return_t RetCode; | ||
| 982 | 	} __Reply__act_set_state_t __attribute__((unused)); | ||
| 983 | #ifdef __MigPackStructs | ||
| 984 | #pragma pack(pop) | ||
| 985 | #endif | ||
| 986 | |||
| 987 | #ifdef __MigPackStructs | ||
| 988 | #pragma pack(push, 4) | ||
| 989 | #endif | ||
| 990 | 	typedef struct { | ||
| 991 | 		mach_msg_header_t Head; | ||
| 992 | 		NDR_record_t NDR; | ||
| 993 | 		kern_return_t RetCode; | ||
| 994 | 		mach_msg_type_number_t old_stateCnt; | ||
| 995 | 		natural_t old_state[1296]; | ||
| 996 | 	} __Reply__thread_get_state_t __attribute__((unused)); | ||
| 997 | #ifdef __MigPackStructs | ||
| 998 | #pragma pack(pop) | ||
| 999 | #endif | ||
| 1000 | |||
| 1001 | #ifdef __MigPackStructs | ||
| 1002 | #pragma pack(push, 4) | ||
| 1003 | #endif | ||
| 1004 | 	typedef struct { | ||
| 1005 | 		mach_msg_header_t Head; | ||
| 1006 | 		NDR_record_t NDR; | ||
| 1007 | 		kern_return_t RetCode; | ||
| 1008 | 	} __Reply__thread_set_state_t __attribute__((unused)); | ||
| 1009 | #ifdef __MigPackStructs | ||
| 1010 | #pragma pack(pop) | ||
| 1011 | #endif | ||
| 1012 | |||
| 1013 | #ifdef __MigPackStructs | ||
| 1014 | #pragma pack(push, 4) | ||
| 1015 | #endif | ||
| 1016 | 	typedef struct { | ||
| 1017 | 		mach_msg_header_t Head; | ||
| 1018 | 		NDR_record_t NDR; | ||
| 1019 | 		kern_return_t RetCode; | ||
| 1020 | 	} __Reply__thread_suspend_t __attribute__((unused)); | ||
| 1021 | #ifdef __MigPackStructs | ||
| 1022 | #pragma pack(pop) | ||
| 1023 | #endif | ||
| 1024 | |||
| 1025 | #ifdef __MigPackStructs | ||
| 1026 | #pragma pack(push, 4) | ||
| 1027 | #endif | ||
| 1028 | 	typedef struct { | ||
| 1029 | 		mach_msg_header_t Head; | ||
| 1030 | 		NDR_record_t NDR; | ||
| 1031 | 		kern_return_t RetCode; | ||
| 1032 | 	} __Reply__thread_resume_t __attribute__((unused)); | ||
| 1033 | #ifdef __MigPackStructs | ||
| 1034 | #pragma pack(pop) | ||
| 1035 | #endif | ||
| 1036 | |||
| 1037 | #ifdef __MigPackStructs | ||
| 1038 | #pragma pack(push, 4) | ||
| 1039 | #endif | ||
| 1040 | 	typedef struct { | ||
| 1041 | 		mach_msg_header_t Head; | ||
| 1042 | 		NDR_record_t NDR; | ||
| 1043 | 		kern_return_t RetCode; | ||
| 1044 | 	} __Reply__thread_abort_t __attribute__((unused)); | ||
| 1045 | #ifdef __MigPackStructs | ||
| 1046 | #pragma pack(pop) | ||
| 1047 | #endif | ||
| 1048 | |||
| 1049 | #ifdef __MigPackStructs | ||
| 1050 | #pragma pack(push, 4) | ||
| 1051 | #endif | ||
| 1052 | 	typedef struct { | ||
| 1053 | 		mach_msg_header_t Head; | ||
| 1054 | 		NDR_record_t NDR; | ||
| 1055 | 		kern_return_t RetCode; | ||
| 1056 | 	} __Reply__thread_abort_safely_t __attribute__((unused)); | ||
| 1057 | #ifdef __MigPackStructs | ||
| 1058 | #pragma pack(pop) | ||
| 1059 | #endif | ||
| 1060 | |||
| 1061 | #ifdef __MigPackStructs | ||
| 1062 | #pragma pack(push, 4) | ||
| 1063 | #endif | ||
| 1064 | 	typedef struct { | ||
| 1065 | 		mach_msg_header_t Head; | ||
| 1066 | 		NDR_record_t NDR; | ||
| 1067 | 		kern_return_t RetCode; | ||
| 1068 | 	} __Reply__thread_depress_abort_t __attribute__((unused)); | ||
| 1069 | #ifdef __MigPackStructs | ||
| 1070 | #pragma pack(pop) | ||
| 1071 | #endif | ||
| 1072 | |||
| 1073 | #ifdef __MigPackStructs | ||
| 1074 | #pragma pack(push, 4) | ||
| 1075 | #endif | ||
| 1076 | 	typedef struct { | ||
| 1077 | 		mach_msg_header_t Head; | ||
| 1078 | 		/* start of the kernel processed data */ | ||
| 1079 | 		mach_msg_body_t msgh_body; | ||
| 1080 | 		mach_msg_port_descriptor_t special_port; | ||
| 1081 | 		/* end of the kernel processed data */ | ||
| 1082 | 	} __Reply__thread_get_special_port_t __attribute__((unused)); | ||
| 1083 | #ifdef __MigPackStructs | ||
| 1084 | #pragma pack(pop) | ||
| 1085 | #endif | ||
| 1086 | |||
| 1087 | #ifdef __MigPackStructs | ||
| 1088 | #pragma pack(push, 4) | ||
| 1089 | #endif | ||
| 1090 | 	typedef struct { | ||
| 1091 | 		mach_msg_header_t Head; | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		kern_return_t RetCode; | ||
| 1094 | 	} __Reply__thread_set_special_port_t __attribute__((unused)); | ||
| 1095 | #ifdef __MigPackStructs | ||
| 1096 | #pragma pack(pop) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(push, 4) | ||
| 1101 | #endif | ||
| 1102 | 	typedef struct { | ||
| 1103 | 		mach_msg_header_t Head; | ||
| 1104 | 		NDR_record_t NDR; | ||
| 1105 | 		kern_return_t RetCode; | ||
| 1106 | 		mach_msg_type_number_t thread_info_outCnt; | ||
| 1107 | 		integer_t thread_info_out[32]; | ||
| 1108 | 	} __Reply__thread_info_t __attribute__((unused)); | ||
| 1109 | #ifdef __MigPackStructs | ||
| 1110 | #pragma pack(pop) | ||
| 1111 | #endif | ||
| 1112 | |||
| 1113 | #ifdef __MigPackStructs | ||
| 1114 | #pragma pack(push, 4) | ||
| 1115 | #endif | ||
| 1116 | 	typedef struct { | ||
| 1117 | 		mach_msg_header_t Head; | ||
| 1118 | 		NDR_record_t NDR; | ||
| 1119 | 		kern_return_t RetCode; | ||
| 1120 | 	} __Reply__thread_set_exception_ports_t __attribute__((unused)); | ||
| 1121 | #ifdef __MigPackStructs | ||
| 1122 | #pragma pack(pop) | ||
| 1123 | #endif | ||
| 1124 | |||
| 1125 | #ifdef __MigPackStructs | ||
| 1126 | #pragma pack(push, 4) | ||
| 1127 | #endif | ||
| 1128 | 	typedef struct { | ||
| 1129 | 		mach_msg_header_t Head; | ||
| 1130 | 		/* start of the kernel processed data */ | ||
| 1131 | 		mach_msg_body_t msgh_body; | ||
| 1132 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1133 | 		/* end of the kernel processed data */ | ||
| 1134 | 		NDR_record_t NDR; | ||
| 1135 | 		mach_msg_type_number_t masksCnt; | ||
| 1136 | 		exception_mask_t masks[32]; | ||
| 1137 | 		exception_behavior_t old_behaviors[32]; | ||
| 1138 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1139 | 	} __Reply__thread_get_exception_ports_t __attribute__((unused)); | ||
| 1140 | #ifdef __MigPackStructs | ||
| 1141 | #pragma pack(pop) | ||
| 1142 | #endif | ||
| 1143 | |||
| 1144 | #ifdef __MigPackStructs | ||
| 1145 | #pragma pack(push, 4) | ||
| 1146 | #endif | ||
| 1147 | 	typedef struct { | ||
| 1148 | 		mach_msg_header_t Head; | ||
| 1149 | 		/* start of the kernel processed data */ | ||
| 1150 | 		mach_msg_body_t msgh_body; | ||
| 1151 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 1152 | 		/* end of the kernel processed data */ | ||
| 1153 | 		NDR_record_t NDR; | ||
| 1154 | 		mach_msg_type_number_t masksCnt; | ||
| 1155 | 		exception_mask_t masks[32]; | ||
| 1156 | 		exception_behavior_t old_behaviors[32]; | ||
| 1157 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1158 | 	} __Reply__thread_swap_exception_ports_t __attribute__((unused)); | ||
| 1159 | #ifdef __MigPackStructs | ||
| 1160 | #pragma pack(pop) | ||
| 1161 | #endif | ||
| 1162 | |||
| 1163 | #ifdef __MigPackStructs | ||
| 1164 | #pragma pack(push, 4) | ||
| 1165 | #endif | ||
| 1166 | 	typedef struct { | ||
| 1167 | 		mach_msg_header_t Head; | ||
| 1168 | 		NDR_record_t NDR; | ||
| 1169 | 		kern_return_t RetCode; | ||
| 1170 | 	} __Reply__thread_policy_t __attribute__((unused)); | ||
| 1171 | #ifdef __MigPackStructs | ||
| 1172 | #pragma pack(pop) | ||
| 1173 | #endif | ||
| 1174 | |||
| 1175 | #ifdef __MigPackStructs | ||
| 1176 | #pragma pack(push, 4) | ||
| 1177 | #endif | ||
| 1178 | 	typedef struct { | ||
| 1179 | 		mach_msg_header_t Head; | ||
| 1180 | 		NDR_record_t NDR; | ||
| 1181 | 		kern_return_t RetCode; | ||
| 1182 | 	} __Reply__thread_policy_set_t __attribute__((unused)); | ||
| 1183 | #ifdef __MigPackStructs | ||
| 1184 | #pragma pack(pop) | ||
| 1185 | #endif | ||
| 1186 | |||
| 1187 | #ifdef __MigPackStructs | ||
| 1188 | #pragma pack(push, 4) | ||
| 1189 | #endif | ||
| 1190 | 	typedef struct { | ||
| 1191 | 		mach_msg_header_t Head; | ||
| 1192 | 		NDR_record_t NDR; | ||
| 1193 | 		kern_return_t RetCode; | ||
| 1194 | 		mach_msg_type_number_t policy_infoCnt; | ||
| 1195 | 		integer_t policy_info[16]; | ||
| 1196 | 		boolean_t get_default; | ||
| 1197 | 	} __Reply__thread_policy_get_t __attribute__((unused)); | ||
| 1198 | #ifdef __MigPackStructs | ||
| 1199 | #pragma pack(pop) | ||
| 1200 | #endif | ||
| 1201 | |||
| 1202 | #ifdef __MigPackStructs | ||
| 1203 | #pragma pack(push, 4) | ||
| 1204 | #endif | ||
| 1205 | 	typedef struct { | ||
| 1206 | 		mach_msg_header_t Head; | ||
| 1207 | 		NDR_record_t NDR; | ||
| 1208 | 		kern_return_t RetCode; | ||
| 1209 | 	} __Reply__thread_sample_t __attribute__((unused)); | ||
| 1210 | #ifdef __MigPackStructs | ||
| 1211 | #pragma pack(pop) | ||
| 1212 | #endif | ||
| 1213 | |||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(push, 4) | ||
| 1216 | #endif | ||
| 1217 | 	typedef struct { | ||
| 1218 | 		mach_msg_header_t Head; | ||
| 1219 | 		NDR_record_t NDR; | ||
| 1220 | 		kern_return_t RetCode; | ||
| 1221 | 	} __Reply__etap_trace_thread_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		NDR_record_t NDR; | ||
| 1232 | 		kern_return_t RetCode; | ||
| 1233 | 	} __Reply__thread_assign_t __attribute__((unused)); | ||
| 1234 | #ifdef __MigPackStructs | ||
| 1235 | #pragma pack(pop) | ||
| 1236 | #endif | ||
| 1237 | |||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(push, 4) | ||
| 1240 | #endif | ||
| 1241 | 	typedef struct { | ||
| 1242 | 		mach_msg_header_t Head; | ||
| 1243 | 		NDR_record_t NDR; | ||
| 1244 | 		kern_return_t RetCode; | ||
| 1245 | 	} __Reply__thread_assign_default_t __attribute__((unused)); | ||
| 1246 | #ifdef __MigPackStructs | ||
| 1247 | #pragma pack(pop) | ||
| 1248 | #endif | ||
| 1249 | |||
| 1250 | #ifdef __MigPackStructs | ||
| 1251 | #pragma pack(push, 4) | ||
| 1252 | #endif | ||
| 1253 | 	typedef struct { | ||
| 1254 | 		mach_msg_header_t Head; | ||
| 1255 | 		/* start of the kernel processed data */ | ||
| 1256 | 		mach_msg_body_t msgh_body; | ||
| 1257 | 		mach_msg_port_descriptor_t assigned_set; | ||
| 1258 | 		/* end of the kernel processed data */ | ||
| 1259 | 	} __Reply__thread_get_assignment_t __attribute__((unused)); | ||
| 1260 | #ifdef __MigPackStructs | ||
| 1261 | #pragma pack(pop) | ||
| 1262 | #endif | ||
| 1263 | |||
| 1264 | #ifdef __MigPackStructs | ||
| 1265 | #pragma pack(push, 4) | ||
| 1266 | #endif | ||
| 1267 | 	typedef struct { | ||
| 1268 | 		mach_msg_header_t Head; | ||
| 1269 | 		NDR_record_t NDR; | ||
| 1270 | 		kern_return_t RetCode; | ||
| 1271 | 	} __Reply__thread_set_policy_t __attribute__((unused)); | ||
| 1272 | #ifdef __MigPackStructs | ||
| 1273 | #pragma pack(pop) | ||
| 1274 | #endif | ||
| 1275 | |||
| 1276 | #ifdef __MigPackStructs | ||
| 1277 | #pragma pack(push, 4) | ||
| 1278 | #endif | ||
| 1279 | 	typedef struct { | ||
| 1280 | 		mach_msg_header_t Head; | ||
| 1281 | 		/* start of the kernel processed data */ | ||
| 1282 | 		mach_msg_body_t msgh_body; | ||
| 1283 | 		mach_msg_port_descriptor_t voucher; | ||
| 1284 | 		/* end of the kernel processed data */ | ||
| 1285 | 	} __Reply__thread_get_mach_voucher_t __attribute__((unused)); | ||
| 1286 | #ifdef __MigPackStructs | ||
| 1287 | #pragma pack(pop) | ||
| 1288 | #endif | ||
| 1289 | |||
| 1290 | #ifdef __MigPackStructs | ||
| 1291 | #pragma pack(push, 4) | ||
| 1292 | #endif | ||
| 1293 | 	typedef struct { | ||
| 1294 | 		mach_msg_header_t Head; | ||
| 1295 | 		NDR_record_t NDR; | ||
| 1296 | 		kern_return_t RetCode; | ||
| 1297 | 	} __Reply__thread_set_mach_voucher_t __attribute__((unused)); | ||
| 1298 | #ifdef __MigPackStructs | ||
| 1299 | #pragma pack(pop) | ||
| 1300 | #endif | ||
| 1301 | |||
| 1302 | #ifdef __MigPackStructs | ||
| 1303 | #pragma pack(push, 4) | ||
| 1304 | #endif | ||
| 1305 | 	typedef struct { | ||
| 1306 | 		mach_msg_header_t Head; | ||
| 1307 | 		/* start of the kernel processed data */ | ||
| 1308 | 		mach_msg_body_t msgh_body; | ||
| 1309 | 		mach_msg_port_descriptor_t old_voucher; | ||
| 1310 | 		/* end of the kernel processed data */ | ||
| 1311 | 	} __Reply__thread_swap_mach_voucher_t __attribute__((unused)); | ||
| 1312 | #ifdef __MigPackStructs | ||
| 1313 | #pragma pack(pop) | ||
| 1314 | #endif | ||
| 1315 | |||
| 1316 | #ifdef __MigPackStructs | ||
| 1317 | #pragma pack(push, 4) | ||
| 1318 | #endif | ||
| 1319 | 	typedef struct { | ||
| 1320 | 		mach_msg_header_t Head; | ||
| 1321 | 		NDR_record_t NDR; | ||
| 1322 | 		kern_return_t RetCode; | ||
| 1323 | 		mach_msg_type_number_t out_stateCnt; | ||
| 1324 | 		natural_t out_state[1296]; | ||
| 1325 | 	} __Reply__thread_convert_thread_state_t __attribute__((unused)); | ||
| 1326 | #ifdef __MigPackStructs | ||
| 1327 | #pragma pack(pop) | ||
| 1328 | #endif | ||
| 1329 | |||
| 1330 | #ifdef __MigPackStructs | ||
| 1331 | #pragma pack(push, 4) | ||
| 1332 | #endif | ||
| 1333 | 	typedef struct { | ||
| 1334 | 		mach_msg_header_t Head; | ||
| 1335 | 		NDR_record_t NDR; | ||
| 1336 | 		kern_return_t RetCode; | ||
| 1337 | 		mach_msg_type_number_t masksCnt; | ||
| 1338 | 		exception_mask_t masks[32]; | ||
| 1339 | 		exception_handler_info_t old_handlers_info[32]; | ||
| 1340 | 		exception_behavior_t old_behaviors[32]; | ||
| 1341 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1342 | 	} __Reply__thread_get_exception_ports_info_t __attribute__((unused)); | ||
| 1343 | #ifdef __MigPackStructs | ||
| 1344 | #pragma pack(pop) | ||
| 1345 | #endif | ||
| 1346 | #endif /* !__Reply__thread_act_subsystem__defined */ | ||
| 1347 | |||
| 1348 | /* union of all replies */ | ||
| 1349 | |||
| 1350 | #ifndef __ReplyUnion__thread_act_subsystem__defined | ||
| 1351 | #define __ReplyUnion__thread_act_subsystem__defined | ||
| 1352 | union __ReplyUnion__thread_act_subsystem { | ||
| 1353 | 	__Reply__thread_terminate_t Reply_thread_terminate; | ||
| 1354 | 	__Reply__act_get_state_t Reply_act_get_state; | ||
| 1355 | 	__Reply__act_set_state_t Reply_act_set_state; | ||
| 1356 | 	__Reply__thread_get_state_t Reply_thread_get_state; | ||
| 1357 | 	__Reply__thread_set_state_t Reply_thread_set_state; | ||
| 1358 | 	__Reply__thread_suspend_t Reply_thread_suspend; | ||
| 1359 | 	__Reply__thread_resume_t Reply_thread_resume; | ||
| 1360 | 	__Reply__thread_abort_t Reply_thread_abort; | ||
| 1361 | 	__Reply__thread_abort_safely_t Reply_thread_abort_safely; | ||
| 1362 | 	__Reply__thread_depress_abort_t Reply_thread_depress_abort; | ||
| 1363 | 	__Reply__thread_get_special_port_t Reply_thread_get_special_port; | ||
| 1364 | 	__Reply__thread_set_special_port_t Reply_thread_set_special_port; | ||
| 1365 | 	__Reply__thread_info_t Reply_thread_info; | ||
| 1366 | 	__Reply__thread_set_exception_ports_t Reply_thread_set_exception_ports; | ||
| 1367 | 	__Reply__thread_get_exception_ports_t Reply_thread_get_exception_ports; | ||
| 1368 | 	__Reply__thread_swap_exception_ports_t Reply_thread_swap_exception_ports; | ||
| 1369 | 	__Reply__thread_policy_t Reply_thread_policy; | ||
| 1370 | 	__Reply__thread_policy_set_t Reply_thread_policy_set; | ||
| 1371 | 	__Reply__thread_policy_get_t Reply_thread_policy_get; | ||
| 1372 | 	__Reply__thread_sample_t Reply_thread_sample; | ||
| 1373 | 	__Reply__etap_trace_thread_t Reply_etap_trace_thread; | ||
| 1374 | 	__Reply__thread_assign_t Reply_thread_assign; | ||
| 1375 | 	__Reply__thread_assign_default_t Reply_thread_assign_default; | ||
| 1376 | 	__Reply__thread_get_assignment_t Reply_thread_get_assignment; | ||
| 1377 | 	__Reply__thread_set_policy_t Reply_thread_set_policy; | ||
| 1378 | 	__Reply__thread_get_mach_voucher_t Reply_thread_get_mach_voucher; | ||
| 1379 | 	__Reply__thread_set_mach_voucher_t Reply_thread_set_mach_voucher; | ||
| 1380 | 	__Reply__thread_swap_mach_voucher_t Reply_thread_swap_mach_voucher; | ||
| 1381 | 	__Reply__thread_convert_thread_state_t Reply_thread_convert_thread_state; | ||
| 1382 | 	__Reply__thread_get_exception_ports_info_t Reply_thread_get_exception_ports_info; | ||
| 1383 | }; | ||
| 1384 | #endif /* !__RequestUnion__thread_act_subsystem__defined */ | ||
| 1385 | |||
| 1386 | #ifndef subsystem_to_name_map_thread_act | ||
| 1387 | #define subsystem_to_name_map_thread_act \ | ||
| 1388 | { "thread_terminate", 3600 },\ | ||
| 1389 | { "act_get_state", 3601 },\ | ||
| 1390 | { "act_set_state", 3602 },\ | ||
| 1391 | { "thread_get_state", 3603 },\ | ||
| 1392 | { "thread_set_state", 3604 },\ | ||
| 1393 | { "thread_suspend", 3605 },\ | ||
| 1394 | { "thread_resume", 3606 },\ | ||
| 1395 | { "thread_abort", 3607 },\ | ||
| 1396 | { "thread_abort_safely", 3608 },\ | ||
| 1397 | { "thread_depress_abort", 3609 },\ | ||
| 1398 | { "thread_get_special_port", 3610 },\ | ||
| 1399 | { "thread_set_special_port", 3611 },\ | ||
| 1400 | { "thread_info", 3612 },\ | ||
| 1401 | { "thread_set_exception_ports", 3613 },\ | ||
| 1402 | { "thread_get_exception_ports", 3614 },\ | ||
| 1403 | { "thread_swap_exception_ports", 3615 },\ | ||
| 1404 | { "thread_policy", 3616 },\ | ||
| 1405 | { "thread_policy_set", 3617 },\ | ||
| 1406 | { "thread_policy_get", 3618 },\ | ||
| 1407 | { "thread_sample", 3619 },\ | ||
| 1408 | { "etap_trace_thread", 3620 },\ | ||
| 1409 | { "thread_assign", 3621 },\ | ||
| 1410 | { "thread_assign_default", 3622 },\ | ||
| 1411 | { "thread_get_assignment", 3623 },\ | ||
| 1412 | { "thread_set_policy", 3624 },\ | ||
| 1413 | { "thread_get_mach_voucher", 3625 },\ | ||
| 1414 | { "thread_set_mach_voucher", 3626 },\ | ||
| 1415 | { "thread_swap_mach_voucher", 3627 },\ | ||
| 1416 | { "thread_convert_thread_state", 3628 },\ | ||
| 1417 | { "thread_get_exception_ports_info", 3630 } | ||
| 1418 | #endif | ||
| 1419 | |||
| 1420 | #ifdef __AfterMigUserHeader | ||
| 1421 | __AfterMigUserHeader | ||
| 1422 | #endif /* __AfterMigUserHeader */ | ||
| 1423 | |||
| 1424 | #endif	 /* _thread_act_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/thread_policy.h deleted-270| ... | @@ -1,270 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_THREAD_POLICY_H_ | ||
| 30 | #define _MACH_THREAD_POLICY_H_ | ||
| 31 | |||
| 32 | #include <mach/mach_types.h> | ||
| 33 | |||
| 34 | /* | ||
| 35 | * These are the calls for accessing the policy parameters | ||
| 36 | * of a particular thread. | ||
| 37 | * | ||
| 38 | * The extra 'get_default' parameter to the second call is | ||
| 39 | * IN/OUT as follows: | ||
| 40 | * 1) if asserted on the way in it indicates that the default | ||
| 41 | * values should be returned, not the ones currently set, in | ||
| 42 | * this case 'get_default' will always be asserted on return; | ||
| 43 | * 2) if unasserted on the way in, the current settings are | ||
| 44 | * desired and if still unasserted on return, then the info | ||
| 45 | * returned reflects the current settings, otherwise if | ||
| 46 | * 'get_default' returns asserted, it means that there are no | ||
| 47 | * current settings due to other parameters taking precedence, | ||
| 48 | * and the default ones are being returned instead. | ||
| 49 | */ | ||
| 50 | |||
| 51 | typedef natural_t thread_policy_flavor_t; | ||
| 52 | typedef integer_t *thread_policy_t; | ||
| 53 | |||
| 54 | /* | ||
| 55 | * kern_return_t	thread_policy_set( | ||
| 56 | * thread_t					thread, | ||
| 57 | * thread_policy_flavor_t		flavor, | ||
| 58 | * thread_policy_t				policy_info, | ||
| 59 | * mach_msg_type_number_t		count); | ||
| 60 | * | ||
| 61 | * kern_return_t	thread_policy_get( | ||
| 62 | * thread_t					thread, | ||
| 63 | * thread_policy_flavor_t		flavor, | ||
| 64 | * thread_policy_t				policy_info, | ||
| 65 | * mach_msg_type_number_t		*count, | ||
| 66 | * boolean_t					*get_default); | ||
| 67 | */ | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Defined flavors. | ||
| 71 | */ | ||
| 72 | /* | ||
| 73 | * THREAD_STANDARD_POLICY: | ||
| 74 | * | ||
| 75 | * This is the standard (fair) scheduling mode, assigned to new | ||
| 76 | * threads. The thread will be given processor time in a manner | ||
| 77 | * which apportions approximately equal share to long running | ||
| 78 | * computations. | ||
| 79 | * | ||
| 80 | * Parameters: | ||
| 81 | *	[none] | ||
| 82 | */ | ||
| 83 | |||
| 84 | #define THREAD_STANDARD_POLICY 1 | ||
| 85 | |||
| 86 | struct thread_standard_policy { | ||
| 87 | 	natural_t no_data; | ||
| 88 | }; | ||
| 89 | |||
| 90 | typedef struct thread_standard_policy thread_standard_policy_data_t; | ||
| 91 | typedef struct thread_standard_policy *thread_standard_policy_t; | ||
| 92 | |||
| 93 | #define THREAD_STANDARD_POLICY_COUNT 0 | ||
| 94 | |||
| 95 | /* | ||
| 96 | * THREAD_EXTENDED_POLICY: | ||
| 97 | * | ||
| 98 | * Extended form of THREAD_STANDARD_POLICY, which supplies a | ||
| 99 | * hint indicating whether this is a long running computation. | ||
| 100 | * | ||
| 101 | * Parameters: | ||
| 102 | * | ||
| 103 | * timeshare: TRUE (the default) results in identical scheduling | ||
| 104 | * behavior as THREAD_STANDARD_POLICY. | ||
| 105 | */ | ||
| 106 | |||
| 107 | #define THREAD_EXTENDED_POLICY 1 | ||
| 108 | |||
| 109 | struct thread_extended_policy { | ||
| 110 | 	boolean_t timeshare; | ||
| 111 | }; | ||
| 112 | |||
| 113 | typedef struct thread_extended_policy thread_extended_policy_data_t; | ||
| 114 | typedef struct thread_extended_policy *thread_extended_policy_t; | ||
| 115 | |||
| 116 | #define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 117 | 	(sizeof (thread_extended_policy_data_t) / sizeof (integer_t))) | ||
| 118 | |||
| 119 | /* | ||
| 120 | * THREAD_TIME_CONSTRAINT_POLICY: | ||
| 121 | * | ||
| 122 | * This scheduling mode is for threads which have real time | ||
| 123 | * constraints on their execution. | ||
| 124 | * | ||
| 125 | * Parameters: | ||
| 126 | * | ||
| 127 | * period: This is the nominal amount of time between separate | ||
| 128 | * processing arrivals, specified in absolute time units. A | ||
| 129 | * value of 0 indicates that there is no inherent periodicity in | ||
| 130 | * the computation. | ||
| 131 | * | ||
| 132 | * computation: This is the nominal amount of computation | ||
| 133 | * time needed during a separate processing arrival, specified | ||
| 134 | * in absolute time units. The thread may be preempted after | ||
| 135 | * the computation time has elapsed. | ||
| 136 | * If (computation < constraint/2) it will be forced to | ||
| 137 | * constraint/2 to avoid unintended preemption and associated | ||
| 138 | * timer interrupts. | ||
| 139 | * | ||
| 140 | * constraint: This is the maximum amount of real time that | ||
| 141 | * may elapse from the start of a separate processing arrival | ||
| 142 | * to the end of computation for logically correct functioning, | ||
| 143 | * specified in absolute time units. Must be (>= computation). | ||
| 144 | * Note that latency = (constraint - computation). | ||
| 145 | * | ||
| 146 | * preemptible: IGNORED (This indicates that the computation may be | ||
| 147 | * interrupted, subject to the constraint specified above.) | ||
| 148 | */ | ||
| 149 | |||
| 150 | #define THREAD_TIME_CONSTRAINT_POLICY 2 | ||
| 151 | |||
| 152 | struct thread_time_constraint_policy { | ||
| 153 | 	uint32_t period; | ||
| 154 | 	uint32_t computation; | ||
| 155 | 	uint32_t constraint; | ||
| 156 | 	boolean_t preemptible; | ||
| 157 | }; | ||
| 158 | |||
| 159 | typedef struct thread_time_constraint_policy \ | ||
| 160 | thread_time_constraint_policy_data_t; | ||
| 161 | typedef struct thread_time_constraint_policy \ | ||
| 162 | *thread_time_constraint_policy_t; | ||
| 163 | |||
| 164 | #define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 165 | 	(sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t))) | ||
| 166 | |||
| 167 | /* | ||
| 168 | * THREAD_PRECEDENCE_POLICY: | ||
| 169 | * | ||
| 170 | * This may be used to indicate the relative value of the | ||
| 171 | * computation compared to the other threads in the task. | ||
| 172 | * | ||
| 173 | * Parameters: | ||
| 174 | * | ||
| 175 | * importance: The importance is specified as a signed value. | ||
| 176 | */ | ||
| 177 | |||
| 178 | #define THREAD_PRECEDENCE_POLICY 3 | ||
| 179 | |||
| 180 | struct thread_precedence_policy { | ||
| 181 | 	integer_t importance; | ||
| 182 | }; | ||
| 183 | |||
| 184 | typedef struct thread_precedence_policy thread_precedence_policy_data_t; | ||
| 185 | typedef struct thread_precedence_policy *thread_precedence_policy_t; | ||
| 186 | |||
| 187 | #define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 188 | 	(sizeof (thread_precedence_policy_data_t) / sizeof (integer_t))) | ||
| 189 | |||
| 190 | /* | ||
| 191 | * THREAD_AFFINITY_POLICY: | ||
| 192 | * | ||
| 193 | * This policy is experimental. | ||
| 194 | * This may be used to express affinity relationships | ||
| 195 | * between threads in the task. Threads with the same affinity tag will | ||
| 196 | * be scheduled to share an L2 cache if possible. That is, affinity tags | ||
| 197 | * are a hint to the scheduler for thread placement. | ||
| 198 | * | ||
| 199 | * The namespace of affinity tags is generally local to one task. However, | ||
| 200 | * a child task created after the assignment of affinity tags by its parent | ||
| 201 | * will share that namespace. In particular, a family of forked processes | ||
| 202 | * may be created with a shared affinity namespace. | ||
| 203 | * | ||
| 204 | * Parameters: | ||
| 205 | * tag: The affinity set identifier. | ||
| 206 | */ | ||
| 207 | |||
| 208 | #define THREAD_AFFINITY_POLICY 4 | ||
| 209 | |||
| 210 | struct thread_affinity_policy { | ||
| 211 | 	integer_t affinity_tag; | ||
| 212 | }; | ||
| 213 | |||
| 214 | #define THREAD_AFFINITY_TAG_NULL 0 | ||
| 215 | |||
| 216 | typedef struct thread_affinity_policy thread_affinity_policy_data_t; | ||
| 217 | typedef struct thread_affinity_policy *thread_affinity_policy_t; | ||
| 218 | |||
| 219 | #define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 220 | 	(sizeof (thread_affinity_policy_data_t) / sizeof (integer_t))) | ||
| 221 | |||
| 222 | /* | ||
| 223 | * THREAD_BACKGROUND_POLICY: | ||
| 224 | */ | ||
| 225 | |||
| 226 | #define THREAD_BACKGROUND_POLICY 5 | ||
| 227 | |||
| 228 | struct thread_background_policy { | ||
| 229 | 	integer_t priority; | ||
| 230 | }; | ||
| 231 | |||
| 232 | #define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000 | ||
| 233 | |||
| 234 | typedef struct thread_background_policy thread_background_policy_data_t; | ||
| 235 | typedef struct thread_background_policy *thread_background_policy_t; | ||
| 236 | |||
| 237 | #define THREAD_BACKGROUND_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 238 | 	(sizeof (thread_background_policy_data_t) / sizeof (integer_t))) | ||
| 239 | |||
| 240 | |||
| 241 | #define THREAD_LATENCY_QOS_POLICY 7 | ||
| 242 | typedef integer_t thread_latency_qos_t; | ||
| 243 | |||
| 244 | struct thread_latency_qos_policy { | ||
| 245 | 	thread_latency_qos_t thread_latency_qos_tier; | ||
| 246 | }; | ||
| 247 | |||
| 248 | typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t; | ||
| 249 | typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t; | ||
| 250 | |||
| 251 | #define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 252 | 	 (sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t))) | ||
| 253 | |||
| 254 | #define THREAD_THROUGHPUT_QOS_POLICY 8 | ||
| 255 | typedef integer_t thread_throughput_qos_t; | ||
| 256 | |||
| 257 | struct thread_throughput_qos_policy { | ||
| 258 | 	thread_throughput_qos_t thread_throughput_qos_tier; | ||
| 259 | }; | ||
| 260 | |||
| 261 | typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t; | ||
| 262 | typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t; | ||
| 263 | |||
| 264 | #define THREAD_THROUGHPUT_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 265 | 	 (sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t))) | ||
| 266 | |||
| 267 | |||
| 268 | |||
| 269 | |||
| 270 | #endif /* _MACH_THREAD_POLICY_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/vm_map.h deleted-1503| ... | @@ -1,1503 +0,0 @@ | ||
| 1 | #ifndef	_vm_map_user_ | ||
| 2 | #define	_vm_map_user_ | ||
| 3 | |||
| 4 | /* Module vm_map */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	vm_map_MSG_COUNT | ||
| 52 | #define	vm_map_MSG_COUNT	33 | ||
| 53 | #endif	/* vm_map_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <Availability.h> | ||
| 56 | #include <mach/std_types.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mig.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine vm_region */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t vm_region | ||
| 77 | ( | ||
| 78 | 	vm_map_read_t target_task, | ||
| 79 | 	vm_address_t *address, | ||
| 80 | 	vm_size_t *size, | ||
| 81 | 	vm_region_flavor_t flavor, | ||
| 82 | 	vm_region_info_t info, | ||
| 83 | 	mach_msg_type_number_t *infoCnt, | ||
| 84 | 	mach_port_t *object_name | ||
| 85 | ); | ||
| 86 | |||
| 87 | /* Routine vm_allocate */ | ||
| 88 | #ifdef	mig_external | ||
| 89 | mig_external | ||
| 90 | #else | ||
| 91 | extern | ||
| 92 | #endif	/* mig_external */ | ||
| 93 | kern_return_t vm_allocate | ||
| 94 | ( | ||
| 95 | 	vm_map_t target_task, | ||
| 96 | 	vm_address_t *address, | ||
| 97 | 	vm_size_t size, | ||
| 98 | 	int flags | ||
| 99 | ); | ||
| 100 | |||
| 101 | /* Routine vm_deallocate */ | ||
| 102 | #ifdef	mig_external | ||
| 103 | mig_external | ||
| 104 | #else | ||
| 105 | extern | ||
| 106 | #endif	/* mig_external */ | ||
| 107 | kern_return_t vm_deallocate | ||
| 108 | ( | ||
| 109 | 	vm_map_t target_task, | ||
| 110 | 	vm_address_t address, | ||
| 111 | 	vm_size_t size | ||
| 112 | ); | ||
| 113 | |||
| 114 | /* Routine vm_protect */ | ||
| 115 | #ifdef	mig_external | ||
| 116 | mig_external | ||
| 117 | #else | ||
| 118 | extern | ||
| 119 | #endif	/* mig_external */ | ||
| 120 | kern_return_t vm_protect | ||
| 121 | ( | ||
| 122 | 	vm_map_t target_task, | ||
| 123 | 	vm_address_t address, | ||
| 124 | 	vm_size_t size, | ||
| 125 | 	boolean_t set_maximum, | ||
| 126 | 	vm_prot_t new_protection | ||
| 127 | ); | ||
| 128 | |||
| 129 | /* Routine vm_inherit */ | ||
| 130 | #ifdef	mig_external | ||
| 131 | mig_external | ||
| 132 | #else | ||
| 133 | extern | ||
| 134 | #endif	/* mig_external */ | ||
| 135 | kern_return_t vm_inherit | ||
| 136 | ( | ||
| 137 | 	vm_map_t target_task, | ||
| 138 | 	vm_address_t address, | ||
| 139 | 	vm_size_t size, | ||
| 140 | 	vm_inherit_t new_inheritance | ||
| 141 | ); | ||
| 142 | |||
| 143 | /* Routine vm_read */ | ||
| 144 | #ifdef	mig_external | ||
| 145 | mig_external | ||
| 146 | #else | ||
| 147 | extern | ||
| 148 | #endif	/* mig_external */ | ||
| 149 | kern_return_t vm_read | ||
| 150 | ( | ||
| 151 | 	vm_map_read_t target_task, | ||
| 152 | 	vm_address_t address, | ||
| 153 | 	vm_size_t size, | ||
| 154 | 	vm_offset_t *data, | ||
| 155 | 	mach_msg_type_number_t *dataCnt | ||
| 156 | ); | ||
| 157 | |||
| 158 | /* Routine vm_read_list */ | ||
| 159 | #ifdef	mig_external | ||
| 160 | mig_external | ||
| 161 | #else | ||
| 162 | extern | ||
| 163 | #endif	/* mig_external */ | ||
| 164 | kern_return_t vm_read_list | ||
| 165 | ( | ||
| 166 | 	vm_map_read_t target_task, | ||
| 167 | 	vm_read_entry_t data_list, | ||
| 168 | 	natural_t count | ||
| 169 | ); | ||
| 170 | |||
| 171 | /* Routine vm_write */ | ||
| 172 | #ifdef	mig_external | ||
| 173 | mig_external | ||
| 174 | #else | ||
| 175 | extern | ||
| 176 | #endif	/* mig_external */ | ||
| 177 | kern_return_t vm_write | ||
| 178 | ( | ||
| 179 | 	vm_map_t target_task, | ||
| 180 | 	vm_address_t address, | ||
| 181 | 	vm_offset_t data, | ||
| 182 | 	mach_msg_type_number_t dataCnt | ||
| 183 | ); | ||
| 184 | |||
| 185 | /* Routine vm_copy */ | ||
| 186 | #ifdef	mig_external | ||
| 187 | mig_external | ||
| 188 | #else | ||
| 189 | extern | ||
| 190 | #endif	/* mig_external */ | ||
| 191 | kern_return_t vm_copy | ||
| 192 | ( | ||
| 193 | 	vm_map_t target_task, | ||
| 194 | 	vm_address_t source_address, | ||
| 195 | 	vm_size_t size, | ||
| 196 | 	vm_address_t dest_address | ||
| 197 | ); | ||
| 198 | |||
| 199 | /* Routine vm_read_overwrite */ | ||
| 200 | #ifdef	mig_external | ||
| 201 | mig_external | ||
| 202 | #else | ||
| 203 | extern | ||
| 204 | #endif	/* mig_external */ | ||
| 205 | kern_return_t vm_read_overwrite | ||
| 206 | ( | ||
| 207 | 	vm_map_read_t target_task, | ||
| 208 | 	vm_address_t address, | ||
| 209 | 	vm_size_t size, | ||
| 210 | 	vm_address_t data, | ||
| 211 | 	vm_size_t *outsize | ||
| 212 | ); | ||
| 213 | |||
| 214 | /* Routine vm_msync */ | ||
| 215 | #ifdef	mig_external | ||
| 216 | mig_external | ||
| 217 | #else | ||
| 218 | extern | ||
| 219 | #endif	/* mig_external */ | ||
| 220 | kern_return_t vm_msync | ||
| 221 | ( | ||
| 222 | 	vm_map_t target_task, | ||
| 223 | 	vm_address_t address, | ||
| 224 | 	vm_size_t size, | ||
| 225 | 	vm_sync_t sync_flags | ||
| 226 | ); | ||
| 227 | |||
| 228 | /* Routine vm_behavior_set */ | ||
| 229 | #ifdef	mig_external | ||
| 230 | mig_external | ||
| 231 | #else | ||
| 232 | extern | ||
| 233 | #endif	/* mig_external */ | ||
| 234 | kern_return_t vm_behavior_set | ||
| 235 | ( | ||
| 236 | 	vm_map_t target_task, | ||
| 237 | 	vm_address_t address, | ||
| 238 | 	vm_size_t size, | ||
| 239 | 	vm_behavior_t new_behavior | ||
| 240 | ); | ||
| 241 | |||
| 242 | /* Routine vm_map */ | ||
| 243 | #ifdef	mig_external | ||
| 244 | mig_external | ||
| 245 | #else | ||
| 246 | extern | ||
| 247 | #endif	/* mig_external */ | ||
| 248 | kern_return_t vm_map | ||
| 249 | ( | ||
| 250 | 	vm_map_t target_task, | ||
| 251 | 	vm_address_t *address, | ||
| 252 | 	vm_size_t size, | ||
| 253 | 	vm_address_t mask, | ||
| 254 | 	int flags, | ||
| 255 | 	mem_entry_name_port_t object, | ||
| 256 | 	vm_offset_t offset, | ||
| 257 | 	boolean_t copy, | ||
| 258 | 	vm_prot_t cur_protection, | ||
| 259 | 	vm_prot_t max_protection, | ||
| 260 | 	vm_inherit_t inheritance | ||
| 261 | ); | ||
| 262 | |||
| 263 | /* Routine vm_machine_attribute */ | ||
| 264 | #ifdef	mig_external | ||
| 265 | mig_external | ||
| 266 | #else | ||
| 267 | extern | ||
| 268 | #endif	/* mig_external */ | ||
| 269 | kern_return_t vm_machine_attribute | ||
| 270 | ( | ||
| 271 | 	vm_map_t target_task, | ||
| 272 | 	vm_address_t address, | ||
| 273 | 	vm_size_t size, | ||
| 274 | 	vm_machine_attribute_t attribute, | ||
| 275 | 	vm_machine_attribute_val_t *value | ||
| 276 | ); | ||
| 277 | |||
| 278 | /* Routine vm_remap */ | ||
| 279 | #ifdef	mig_external | ||
| 280 | mig_external | ||
| 281 | #else | ||
| 282 | extern | ||
| 283 | #endif	/* mig_external */ | ||
| 284 | kern_return_t vm_remap | ||
| 285 | ( | ||
| 286 | 	vm_map_t target_task, | ||
| 287 | 	vm_address_t *target_address, | ||
| 288 | 	vm_size_t size, | ||
| 289 | 	vm_address_t mask, | ||
| 290 | 	int flags, | ||
| 291 | 	vm_map_t src_task, | ||
| 292 | 	vm_address_t src_address, | ||
| 293 | 	boolean_t copy, | ||
| 294 | 	vm_prot_t *cur_protection, | ||
| 295 | 	vm_prot_t *max_protection, | ||
| 296 | 	vm_inherit_t inheritance | ||
| 297 | ); | ||
| 298 | |||
| 299 | /* Routine task_wire */ | ||
| 300 | #ifdef	mig_external | ||
| 301 | mig_external | ||
| 302 | #else | ||
| 303 | extern | ||
| 304 | #endif	/* mig_external */ | ||
| 305 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 306 | kern_return_t task_wire | ||
| 307 | ( | ||
| 308 | 	vm_map_t target_task, | ||
| 309 | 	boolean_t must_wire | ||
| 310 | ); | ||
| 311 | |||
| 312 | /* Routine mach_make_memory_entry */ | ||
| 313 | #ifdef	mig_external | ||
| 314 | mig_external | ||
| 315 | #else | ||
| 316 | extern | ||
| 317 | #endif	/* mig_external */ | ||
| 318 | kern_return_t mach_make_memory_entry | ||
| 319 | ( | ||
| 320 | 	vm_map_t target_task, | ||
| 321 | 	vm_size_t *size, | ||
| 322 | 	vm_offset_t offset, | ||
| 323 | 	vm_prot_t permission, | ||
| 324 | 	mem_entry_name_port_t *object_handle, | ||
| 325 | 	mem_entry_name_port_t parent_entry | ||
| 326 | ); | ||
| 327 | |||
| 328 | /* Routine vm_map_page_query */ | ||
| 329 | #ifdef	mig_external | ||
| 330 | mig_external | ||
| 331 | #else | ||
| 332 | extern | ||
| 333 | #endif	/* mig_external */ | ||
| 334 | kern_return_t vm_map_page_query | ||
| 335 | ( | ||
| 336 | 	vm_map_read_t target_map, | ||
| 337 | 	vm_offset_t offset, | ||
| 338 | 	integer_t *disposition, | ||
| 339 | 	integer_t *ref_count | ||
| 340 | ); | ||
| 341 | |||
| 342 | /* Routine mach_vm_region_info */ | ||
| 343 | #ifdef	mig_external | ||
| 344 | mig_external | ||
| 345 | #else | ||
| 346 | extern | ||
| 347 | #endif	/* mig_external */ | ||
| 348 | kern_return_t mach_vm_region_info | ||
| 349 | ( | ||
| 350 | 	vm_map_read_t task, | ||
| 351 | 	vm_address_t address, | ||
| 352 | 	vm_info_region_t *region, | ||
| 353 | 	vm_info_object_array_t *objects, | ||
| 354 | 	mach_msg_type_number_t *objectsCnt | ||
| 355 | ); | ||
| 356 | |||
| 357 | /* Routine vm_mapped_pages_info */ | ||
| 358 | #ifdef	mig_external | ||
| 359 | mig_external | ||
| 360 | #else | ||
| 361 | extern | ||
| 362 | #endif	/* mig_external */ | ||
| 363 | kern_return_t vm_mapped_pages_info | ||
| 364 | ( | ||
| 365 | 	vm_map_read_t task, | ||
| 366 | 	page_address_array_t *pages, | ||
| 367 | 	mach_msg_type_number_t *pagesCnt | ||
| 368 | ); | ||
| 369 | |||
| 370 | /* Routine vm_region_recurse */ | ||
| 371 | #ifdef	mig_external | ||
| 372 | mig_external | ||
| 373 | #else | ||
| 374 | extern | ||
| 375 | #endif	/* mig_external */ | ||
| 376 | kern_return_t vm_region_recurse | ||
| 377 | ( | ||
| 378 | 	vm_map_read_t target_task, | ||
| 379 | 	vm_address_t *address, | ||
| 380 | 	vm_size_t *size, | ||
| 381 | 	natural_t *nesting_depth, | ||
| 382 | 	vm_region_recurse_info_t info, | ||
| 383 | 	mach_msg_type_number_t *infoCnt | ||
| 384 | ); | ||
| 385 | |||
| 386 | /* Routine vm_region_recurse_64 */ | ||
| 387 | #ifdef	mig_external | ||
| 388 | mig_external | ||
| 389 | #else | ||
| 390 | extern | ||
| 391 | #endif	/* mig_external */ | ||
| 392 | kern_return_t vm_region_recurse_64 | ||
| 393 | ( | ||
| 394 | 	vm_map_read_t target_task, | ||
| 395 | 	vm_address_t *address, | ||
| 396 | 	vm_size_t *size, | ||
| 397 | 	natural_t *nesting_depth, | ||
| 398 | 	vm_region_recurse_info_t info, | ||
| 399 | 	mach_msg_type_number_t *infoCnt | ||
| 400 | ); | ||
| 401 | |||
| 402 | /* Routine mach_vm_region_info_64 */ | ||
| 403 | #ifdef	mig_external | ||
| 404 | mig_external | ||
| 405 | #else | ||
| 406 | extern | ||
| 407 | #endif	/* mig_external */ | ||
| 408 | kern_return_t mach_vm_region_info_64 | ||
| 409 | ( | ||
| 410 | 	vm_map_read_t task, | ||
| 411 | 	vm_address_t address, | ||
| 412 | 	vm_info_region_64_t *region, | ||
| 413 | 	vm_info_object_array_t *objects, | ||
| 414 | 	mach_msg_type_number_t *objectsCnt | ||
| 415 | ); | ||
| 416 | |||
| 417 | /* Routine vm_region_64 */ | ||
| 418 | #ifdef	mig_external | ||
| 419 | mig_external | ||
| 420 | #else | ||
| 421 | extern | ||
| 422 | #endif	/* mig_external */ | ||
| 423 | kern_return_t vm_region_64 | ||
| 424 | ( | ||
| 425 | 	vm_map_read_t target_task, | ||
| 426 | 	vm_address_t *address, | ||
| 427 | 	vm_size_t *size, | ||
| 428 | 	vm_region_flavor_t flavor, | ||
| 429 | 	vm_region_info_t info, | ||
| 430 | 	mach_msg_type_number_t *infoCnt, | ||
| 431 | 	mach_port_t *object_name | ||
| 432 | ); | ||
| 433 | |||
| 434 | /* Routine mach_make_memory_entry_64 */ | ||
| 435 | #ifdef	mig_external | ||
| 436 | mig_external | ||
| 437 | #else | ||
| 438 | extern | ||
| 439 | #endif	/* mig_external */ | ||
| 440 | kern_return_t mach_make_memory_entry_64 | ||
| 441 | ( | ||
| 442 | 	vm_map_t target_task, | ||
| 443 | 	memory_object_size_t *size, | ||
| 444 | 	memory_object_offset_t offset, | ||
| 445 | 	vm_prot_t permission, | ||
| 446 | 	mach_port_t *object_handle, | ||
| 447 | 	mem_entry_name_port_t parent_entry | ||
| 448 | ); | ||
| 449 | |||
| 450 | /* Routine vm_map_64 */ | ||
| 451 | #ifdef	mig_external | ||
| 452 | mig_external | ||
| 453 | #else | ||
| 454 | extern | ||
| 455 | #endif	/* mig_external */ | ||
| 456 | kern_return_t vm_map_64 | ||
| 457 | ( | ||
| 458 | 	vm_map_t target_task, | ||
| 459 | 	vm_address_t *address, | ||
| 460 | 	vm_size_t size, | ||
| 461 | 	vm_address_t mask, | ||
| 462 | 	int flags, | ||
| 463 | 	mem_entry_name_port_t object, | ||
| 464 | 	memory_object_offset_t offset, | ||
| 465 | 	boolean_t copy, | ||
| 466 | 	vm_prot_t cur_protection, | ||
| 467 | 	vm_prot_t max_protection, | ||
| 468 | 	vm_inherit_t inheritance | ||
| 469 | ); | ||
| 470 | |||
| 471 | /* Routine vm_purgable_control */ | ||
| 472 | #ifdef	mig_external | ||
| 473 | mig_external | ||
| 474 | #else | ||
| 475 | extern | ||
| 476 | #endif	/* mig_external */ | ||
| 477 | kern_return_t vm_purgable_control | ||
| 478 | ( | ||
| 479 | 	vm_map_t target_task, | ||
| 480 | 	vm_address_t address, | ||
| 481 | 	vm_purgable_t control, | ||
| 482 | 	int *state | ||
| 483 | ); | ||
| 484 | |||
| 485 | /* Routine vm_map_exec_lockdown */ | ||
| 486 | #ifdef	mig_external | ||
| 487 | mig_external | ||
| 488 | #else | ||
| 489 | extern | ||
| 490 | #endif	/* mig_external */ | ||
| 491 | kern_return_t vm_map_exec_lockdown | ||
| 492 | ( | ||
| 493 | 	vm_map_t target_task | ||
| 494 | ); | ||
| 495 | |||
| 496 | /* Routine vm_remap_new */ | ||
| 497 | #ifdef	mig_external | ||
| 498 | mig_external | ||
| 499 | #else | ||
| 500 | extern | ||
| 501 | #endif	/* mig_external */ | ||
| 502 | kern_return_t vm_remap_new | ||
| 503 | ( | ||
| 504 | 	vm_map_t target_task, | ||
| 505 | 	vm_address_t *target_address, | ||
| 506 | 	vm_size_t size, | ||
| 507 | 	vm_address_t mask, | ||
| 508 | 	int flags, | ||
| 509 | 	vm_map_read_t src_task, | ||
| 510 | 	vm_address_t src_address, | ||
| 511 | 	boolean_t copy, | ||
| 512 | 	vm_prot_t *cur_protection, | ||
| 513 | 	vm_prot_t *max_protection, | ||
| 514 | 	vm_inherit_t inheritance | ||
| 515 | ); | ||
| 516 | |||
| 517 | __END_DECLS | ||
| 518 | |||
| 519 | /********************** Caution **************************/ | ||
| 520 | /* The following data types should be used to calculate */ | ||
| 521 | /* maximum message sizes only. The actual message may be */ | ||
| 522 | /* smaller, and the position of the arguments within the */ | ||
| 523 | /* message layout may vary from what is presented here. */ | ||
| 524 | /* For example, if any of the arguments are variable- */ | ||
| 525 | /* sized, and less than the maximum is sent, the data */ | ||
| 526 | /* will be packed tight in the actual message to reduce */ | ||
| 527 | /* the presence of holes. */ | ||
| 528 | /********************** Caution **************************/ | ||
| 529 | |||
| 530 | /* typedefs for all requests */ | ||
| 531 | |||
| 532 | #ifndef __Request__vm_map_subsystem__defined | ||
| 533 | #define __Request__vm_map_subsystem__defined | ||
| 534 | |||
| 535 | #ifdef __MigPackStructs | ||
| 536 | #pragma pack(push, 4) | ||
| 537 | #endif | ||
| 538 | 	typedef struct { | ||
| 539 | 		mach_msg_header_t Head; | ||
| 540 | 		NDR_record_t NDR; | ||
| 541 | 		vm_address_t address; | ||
| 542 | 		vm_region_flavor_t flavor; | ||
| 543 | 		mach_msg_type_number_t infoCnt; | ||
| 544 | 	} __Request__vm_region_t __attribute__((unused)); | ||
| 545 | #ifdef __MigPackStructs | ||
| 546 | #pragma pack(pop) | ||
| 547 | #endif | ||
| 548 | |||
| 549 | #ifdef __MigPackStructs | ||
| 550 | #pragma pack(push, 4) | ||
| 551 | #endif | ||
| 552 | 	typedef struct { | ||
| 553 | 		mach_msg_header_t Head; | ||
| 554 | 		NDR_record_t NDR; | ||
| 555 | 		vm_address_t address; | ||
| 556 | 		vm_size_t size; | ||
| 557 | 		int flags; | ||
| 558 | 	} __Request__vm_allocate_t __attribute__((unused)); | ||
| 559 | #ifdef __MigPackStructs | ||
| 560 | #pragma pack(pop) | ||
| 561 | #endif | ||
| 562 | |||
| 563 | #ifdef __MigPackStructs | ||
| 564 | #pragma pack(push, 4) | ||
| 565 | #endif | ||
| 566 | 	typedef struct { | ||
| 567 | 		mach_msg_header_t Head; | ||
| 568 | 		NDR_record_t NDR; | ||
| 569 | 		vm_address_t address; | ||
| 570 | 		vm_size_t size; | ||
| 571 | 	} __Request__vm_deallocate_t __attribute__((unused)); | ||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(pop) | ||
| 574 | #endif | ||
| 575 | |||
| 576 | #ifdef __MigPackStructs | ||
| 577 | #pragma pack(push, 4) | ||
| 578 | #endif | ||
| 579 | 	typedef struct { | ||
| 580 | 		mach_msg_header_t Head; | ||
| 581 | 		NDR_record_t NDR; | ||
| 582 | 		vm_address_t address; | ||
| 583 | 		vm_size_t size; | ||
| 584 | 		boolean_t set_maximum; | ||
| 585 | 		vm_prot_t new_protection; | ||
| 586 | 	} __Request__vm_protect_t __attribute__((unused)); | ||
| 587 | #ifdef __MigPackStructs | ||
| 588 | #pragma pack(pop) | ||
| 589 | #endif | ||
| 590 | |||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(push, 4) | ||
| 593 | #endif | ||
| 594 | 	typedef struct { | ||
| 595 | 		mach_msg_header_t Head; | ||
| 596 | 		NDR_record_t NDR; | ||
| 597 | 		vm_address_t address; | ||
| 598 | 		vm_size_t size; | ||
| 599 | 		vm_inherit_t new_inheritance; | ||
| 600 | 	} __Request__vm_inherit_t __attribute__((unused)); | ||
| 601 | #ifdef __MigPackStructs | ||
| 602 | #pragma pack(pop) | ||
| 603 | #endif | ||
| 604 | |||
| 605 | #ifdef __MigPackStructs | ||
| 606 | #pragma pack(push, 4) | ||
| 607 | #endif | ||
| 608 | 	typedef struct { | ||
| 609 | 		mach_msg_header_t Head; | ||
| 610 | 		NDR_record_t NDR; | ||
| 611 | 		vm_address_t address; | ||
| 612 | 		vm_size_t size; | ||
| 613 | 	} __Request__vm_read_t __attribute__((unused)); | ||
| 614 | #ifdef __MigPackStructs | ||
| 615 | #pragma pack(pop) | ||
| 616 | #endif | ||
| 617 | |||
| 618 | #ifdef __MigPackStructs | ||
| 619 | #pragma pack(push, 4) | ||
| 620 | #endif | ||
| 621 | 	typedef struct { | ||
| 622 | 		mach_msg_header_t Head; | ||
| 623 | 		NDR_record_t NDR; | ||
| 624 | 		vm_read_entry_t data_list; | ||
| 625 | 		natural_t count; | ||
| 626 | 	} __Request__vm_read_list_t __attribute__((unused)); | ||
| 627 | #ifdef __MigPackStructs | ||
| 628 | #pragma pack(pop) | ||
| 629 | #endif | ||
| 630 | |||
| 631 | #ifdef __MigPackStructs | ||
| 632 | #pragma pack(push, 4) | ||
| 633 | #endif | ||
| 634 | 	typedef struct { | ||
| 635 | 		mach_msg_header_t Head; | ||
| 636 | 		/* start of the kernel processed data */ | ||
| 637 | 		mach_msg_body_t msgh_body; | ||
| 638 | 		mach_msg_ool_descriptor_t data; | ||
| 639 | 		/* end of the kernel processed data */ | ||
| 640 | 		NDR_record_t NDR; | ||
| 641 | 		vm_address_t address; | ||
| 642 | 		mach_msg_type_number_t dataCnt; | ||
| 643 | 	} __Request__vm_write_t __attribute__((unused)); | ||
| 644 | #ifdef __MigPackStructs | ||
| 645 | #pragma pack(pop) | ||
| 646 | #endif | ||
| 647 | |||
| 648 | #ifdef __MigPackStructs | ||
| 649 | #pragma pack(push, 4) | ||
| 650 | #endif | ||
| 651 | 	typedef struct { | ||
| 652 | 		mach_msg_header_t Head; | ||
| 653 | 		NDR_record_t NDR; | ||
| 654 | 		vm_address_t source_address; | ||
| 655 | 		vm_size_t size; | ||
| 656 | 		vm_address_t dest_address; | ||
| 657 | 	} __Request__vm_copy_t __attribute__((unused)); | ||
| 658 | #ifdef __MigPackStructs | ||
| 659 | #pragma pack(pop) | ||
| 660 | #endif | ||
| 661 | |||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(push, 4) | ||
| 664 | #endif | ||
| 665 | 	typedef struct { | ||
| 666 | 		mach_msg_header_t Head; | ||
| 667 | 		NDR_record_t NDR; | ||
| 668 | 		vm_address_t address; | ||
| 669 | 		vm_size_t size; | ||
| 670 | 		vm_address_t data; | ||
| 671 | 	} __Request__vm_read_overwrite_t __attribute__((unused)); | ||
| 672 | #ifdef __MigPackStructs | ||
| 673 | #pragma pack(pop) | ||
| 674 | #endif | ||
| 675 | |||
| 676 | #ifdef __MigPackStructs | ||
| 677 | #pragma pack(push, 4) | ||
| 678 | #endif | ||
| 679 | 	typedef struct { | ||
| 680 | 		mach_msg_header_t Head; | ||
| 681 | 		NDR_record_t NDR; | ||
| 682 | 		vm_address_t address; | ||
| 683 | 		vm_size_t size; | ||
| 684 | 		vm_sync_t sync_flags; | ||
| 685 | 	} __Request__vm_msync_t __attribute__((unused)); | ||
| 686 | #ifdef __MigPackStructs | ||
| 687 | #pragma pack(pop) | ||
| 688 | #endif | ||
| 689 | |||
| 690 | #ifdef __MigPackStructs | ||
| 691 | #pragma pack(push, 4) | ||
| 692 | #endif | ||
| 693 | 	typedef struct { | ||
| 694 | 		mach_msg_header_t Head; | ||
| 695 | 		NDR_record_t NDR; | ||
| 696 | 		vm_address_t address; | ||
| 697 | 		vm_size_t size; | ||
| 698 | 		vm_behavior_t new_behavior; | ||
| 699 | 	} __Request__vm_behavior_set_t __attribute__((unused)); | ||
| 700 | #ifdef __MigPackStructs | ||
| 701 | #pragma pack(pop) | ||
| 702 | #endif | ||
| 703 | |||
| 704 | #ifdef __MigPackStructs | ||
| 705 | #pragma pack(push, 4) | ||
| 706 | #endif | ||
| 707 | 	typedef struct { | ||
| 708 | 		mach_msg_header_t Head; | ||
| 709 | 		/* start of the kernel processed data */ | ||
| 710 | 		mach_msg_body_t msgh_body; | ||
| 711 | 		mach_msg_port_descriptor_t object; | ||
| 712 | 		/* end of the kernel processed data */ | ||
| 713 | 		NDR_record_t NDR; | ||
| 714 | 		vm_address_t address; | ||
| 715 | 		vm_size_t size; | ||
| 716 | 		vm_address_t mask; | ||
| 717 | 		int flags; | ||
| 718 | 		vm_offset_t offset; | ||
| 719 | 		boolean_t copy; | ||
| 720 | 		vm_prot_t cur_protection; | ||
| 721 | 		vm_prot_t max_protection; | ||
| 722 | 		vm_inherit_t inheritance; | ||
| 723 | 	} __Request__vm_map_t __attribute__((unused)); | ||
| 724 | #ifdef __MigPackStructs | ||
| 725 | #pragma pack(pop) | ||
| 726 | #endif | ||
| 727 | |||
| 728 | #ifdef __MigPackStructs | ||
| 729 | #pragma pack(push, 4) | ||
| 730 | #endif | ||
| 731 | 	typedef struct { | ||
| 732 | 		mach_msg_header_t Head; | ||
| 733 | 		NDR_record_t NDR; | ||
| 734 | 		vm_address_t address; | ||
| 735 | 		vm_size_t size; | ||
| 736 | 		vm_machine_attribute_t attribute; | ||
| 737 | 		vm_machine_attribute_val_t value; | ||
| 738 | 	} __Request__vm_machine_attribute_t __attribute__((unused)); | ||
| 739 | #ifdef __MigPackStructs | ||
| 740 | #pragma pack(pop) | ||
| 741 | #endif | ||
| 742 | |||
| 743 | #ifdef __MigPackStructs | ||
| 744 | #pragma pack(push, 4) | ||
| 745 | #endif | ||
| 746 | 	typedef struct { | ||
| 747 | 		mach_msg_header_t Head; | ||
| 748 | 		/* start of the kernel processed data */ | ||
| 749 | 		mach_msg_body_t msgh_body; | ||
| 750 | 		mach_msg_port_descriptor_t src_task; | ||
| 751 | 		/* end of the kernel processed data */ | ||
| 752 | 		NDR_record_t NDR; | ||
| 753 | 		vm_address_t target_address; | ||
| 754 | 		vm_size_t size; | ||
| 755 | 		vm_address_t mask; | ||
| 756 | 		int flags; | ||
| 757 | 		vm_address_t src_address; | ||
| 758 | 		boolean_t copy; | ||
| 759 | 		vm_inherit_t inheritance; | ||
| 760 | 	} __Request__vm_remap_t __attribute__((unused)); | ||
| 761 | #ifdef __MigPackStructs | ||
| 762 | #pragma pack(pop) | ||
| 763 | #endif | ||
| 764 | |||
| 765 | #ifdef __MigPackStructs | ||
| 766 | #pragma pack(push, 4) | ||
| 767 | #endif | ||
| 768 | 	typedef struct { | ||
| 769 | 		mach_msg_header_t Head; | ||
| 770 | 		NDR_record_t NDR; | ||
| 771 | 		boolean_t must_wire; | ||
| 772 | 	} __Request__task_wire_t __attribute__((unused)); | ||
| 773 | #ifdef __MigPackStructs | ||
| 774 | #pragma pack(pop) | ||
| 775 | #endif | ||
| 776 | |||
| 777 | #ifdef __MigPackStructs | ||
| 778 | #pragma pack(push, 4) | ||
| 779 | #endif | ||
| 780 | 	typedef struct { | ||
| 781 | 		mach_msg_header_t Head; | ||
| 782 | 		/* start of the kernel processed data */ | ||
| 783 | 		mach_msg_body_t msgh_body; | ||
| 784 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 785 | 		/* end of the kernel processed data */ | ||
| 786 | 		NDR_record_t NDR; | ||
| 787 | 		vm_size_t size; | ||
| 788 | 		vm_offset_t offset; | ||
| 789 | 		vm_prot_t permission; | ||
| 790 | 	} __Request__mach_make_memory_entry_t __attribute__((unused)); | ||
| 791 | #ifdef __MigPackStructs | ||
| 792 | #pragma pack(pop) | ||
| 793 | #endif | ||
| 794 | |||
| 795 | #ifdef __MigPackStructs | ||
| 796 | #pragma pack(push, 4) | ||
| 797 | #endif | ||
| 798 | 	typedef struct { | ||
| 799 | 		mach_msg_header_t Head; | ||
| 800 | 		NDR_record_t NDR; | ||
| 801 | 		vm_offset_t offset; | ||
| 802 | 	} __Request__vm_map_page_query_t __attribute__((unused)); | ||
| 803 | #ifdef __MigPackStructs | ||
| 804 | #pragma pack(pop) | ||
| 805 | #endif | ||
| 806 | |||
| 807 | #ifdef __MigPackStructs | ||
| 808 | #pragma pack(push, 4) | ||
| 809 | #endif | ||
| 810 | 	typedef struct { | ||
| 811 | 		mach_msg_header_t Head; | ||
| 812 | 		NDR_record_t NDR; | ||
| 813 | 		vm_address_t address; | ||
| 814 | 	} __Request__mach_vm_region_info_t __attribute__((unused)); | ||
| 815 | #ifdef __MigPackStructs | ||
| 816 | #pragma pack(pop) | ||
| 817 | #endif | ||
| 818 | |||
| 819 | #ifdef __MigPackStructs | ||
| 820 | #pragma pack(push, 4) | ||
| 821 | #endif | ||
| 822 | 	typedef struct { | ||
| 823 | 		mach_msg_header_t Head; | ||
| 824 | 	} __Request__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 825 | #ifdef __MigPackStructs | ||
| 826 | #pragma pack(pop) | ||
| 827 | #endif | ||
| 828 | |||
| 829 | #ifdef __MigPackStructs | ||
| 830 | #pragma pack(push, 4) | ||
| 831 | #endif | ||
| 832 | 	typedef struct { | ||
| 833 | 		mach_msg_header_t Head; | ||
| 834 | 		NDR_record_t NDR; | ||
| 835 | 		vm_address_t address; | ||
| 836 | 		natural_t nesting_depth; | ||
| 837 | 		mach_msg_type_number_t infoCnt; | ||
| 838 | 	} __Request__vm_region_recurse_t __attribute__((unused)); | ||
| 839 | #ifdef __MigPackStructs | ||
| 840 | #pragma pack(pop) | ||
| 841 | #endif | ||
| 842 | |||
| 843 | #ifdef __MigPackStructs | ||
| 844 | #pragma pack(push, 4) | ||
| 845 | #endif | ||
| 846 | 	typedef struct { | ||
| 847 | 		mach_msg_header_t Head; | ||
| 848 | 		NDR_record_t NDR; | ||
| 849 | 		vm_address_t address; | ||
| 850 | 		natural_t nesting_depth; | ||
| 851 | 		mach_msg_type_number_t infoCnt; | ||
| 852 | 	} __Request__vm_region_recurse_64_t __attribute__((unused)); | ||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(pop) | ||
| 855 | #endif | ||
| 856 | |||
| 857 | #ifdef __MigPackStructs | ||
| 858 | #pragma pack(push, 4) | ||
| 859 | #endif | ||
| 860 | 	typedef struct { | ||
| 861 | 		mach_msg_header_t Head; | ||
| 862 | 		NDR_record_t NDR; | ||
| 863 | 		vm_address_t address; | ||
| 864 | 	} __Request__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 865 | #ifdef __MigPackStructs | ||
| 866 | #pragma pack(pop) | ||
| 867 | #endif | ||
| 868 | |||
| 869 | #ifdef __MigPackStructs | ||
| 870 | #pragma pack(push, 4) | ||
| 871 | #endif | ||
| 872 | 	typedef struct { | ||
| 873 | 		mach_msg_header_t Head; | ||
| 874 | 		NDR_record_t NDR; | ||
| 875 | 		vm_address_t address; | ||
| 876 | 		vm_region_flavor_t flavor; | ||
| 877 | 		mach_msg_type_number_t infoCnt; | ||
| 878 | 	} __Request__vm_region_64_t __attribute__((unused)); | ||
| 879 | #ifdef __MigPackStructs | ||
| 880 | #pragma pack(pop) | ||
| 881 | #endif | ||
| 882 | |||
| 883 | #ifdef __MigPackStructs | ||
| 884 | #pragma pack(push, 4) | ||
| 885 | #endif | ||
| 886 | 	typedef struct { | ||
| 887 | 		mach_msg_header_t Head; | ||
| 888 | 		/* start of the kernel processed data */ | ||
| 889 | 		mach_msg_body_t msgh_body; | ||
| 890 | 		mach_msg_port_descriptor_t parent_entry; | ||
| 891 | 		/* end of the kernel processed data */ | ||
| 892 | 		NDR_record_t NDR; | ||
| 893 | 		memory_object_size_t size; | ||
| 894 | 		memory_object_offset_t offset; | ||
| 895 | 		vm_prot_t permission; | ||
| 896 | 	} __Request__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 897 | #ifdef __MigPackStructs | ||
| 898 | #pragma pack(pop) | ||
| 899 | #endif | ||
| 900 | |||
| 901 | #ifdef __MigPackStructs | ||
| 902 | #pragma pack(push, 4) | ||
| 903 | #endif | ||
| 904 | 	typedef struct { | ||
| 905 | 		mach_msg_header_t Head; | ||
| 906 | 		/* start of the kernel processed data */ | ||
| 907 | 		mach_msg_body_t msgh_body; | ||
| 908 | 		mach_msg_port_descriptor_t object; | ||
| 909 | 		/* end of the kernel processed data */ | ||
| 910 | 		NDR_record_t NDR; | ||
| 911 | 		vm_address_t address; | ||
| 912 | 		vm_size_t size; | ||
| 913 | 		vm_address_t mask; | ||
| 914 | 		int flags; | ||
| 915 | 		memory_object_offset_t offset; | ||
| 916 | 		boolean_t copy; | ||
| 917 | 		vm_prot_t cur_protection; | ||
| 918 | 		vm_prot_t max_protection; | ||
| 919 | 		vm_inherit_t inheritance; | ||
| 920 | 	} __Request__vm_map_64_t __attribute__((unused)); | ||
| 921 | #ifdef __MigPackStructs | ||
| 922 | #pragma pack(pop) | ||
| 923 | #endif | ||
| 924 | |||
| 925 | #ifdef __MigPackStructs | ||
| 926 | #pragma pack(push, 4) | ||
| 927 | #endif | ||
| 928 | 	typedef struct { | ||
| 929 | 		mach_msg_header_t Head; | ||
| 930 | 		NDR_record_t NDR; | ||
| 931 | 		vm_address_t address; | ||
| 932 | 		vm_purgable_t control; | ||
| 933 | 		int state; | ||
| 934 | 	} __Request__vm_purgable_control_t __attribute__((unused)); | ||
| 935 | #ifdef __MigPackStructs | ||
| 936 | #pragma pack(pop) | ||
| 937 | #endif | ||
| 938 | |||
| 939 | #ifdef __MigPackStructs | ||
| 940 | #pragma pack(push, 4) | ||
| 941 | #endif | ||
| 942 | 	typedef struct { | ||
| 943 | 		mach_msg_header_t Head; | ||
| 944 | 	} __Request__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 945 | #ifdef __MigPackStructs | ||
| 946 | #pragma pack(pop) | ||
| 947 | #endif | ||
| 948 | |||
| 949 | #ifdef __MigPackStructs | ||
| 950 | #pragma pack(push, 4) | ||
| 951 | #endif | ||
| 952 | 	typedef struct { | ||
| 953 | 		mach_msg_header_t Head; | ||
| 954 | 		/* start of the kernel processed data */ | ||
| 955 | 		mach_msg_body_t msgh_body; | ||
| 956 | 		mach_msg_port_descriptor_t src_task; | ||
| 957 | 		/* end of the kernel processed data */ | ||
| 958 | 		NDR_record_t NDR; | ||
| 959 | 		vm_address_t target_address; | ||
| 960 | 		vm_size_t size; | ||
| 961 | 		vm_address_t mask; | ||
| 962 | 		int flags; | ||
| 963 | 		vm_address_t src_address; | ||
| 964 | 		boolean_t copy; | ||
| 965 | 		vm_prot_t cur_protection; | ||
| 966 | 		vm_prot_t max_protection; | ||
| 967 | 		vm_inherit_t inheritance; | ||
| 968 | 	} __Request__vm_remap_new_t __attribute__((unused)); | ||
| 969 | #ifdef __MigPackStructs | ||
| 970 | #pragma pack(pop) | ||
| 971 | #endif | ||
| 972 | #endif /* !__Request__vm_map_subsystem__defined */ | ||
| 973 | |||
| 974 | /* union of all requests */ | ||
| 975 | |||
| 976 | #ifndef __RequestUnion__vm_map_subsystem__defined | ||
| 977 | #define __RequestUnion__vm_map_subsystem__defined | ||
| 978 | union __RequestUnion__vm_map_subsystem { | ||
| 979 | 	__Request__vm_region_t Request_vm_region; | ||
| 980 | 	__Request__vm_allocate_t Request_vm_allocate; | ||
| 981 | 	__Request__vm_deallocate_t Request_vm_deallocate; | ||
| 982 | 	__Request__vm_protect_t Request_vm_protect; | ||
| 983 | 	__Request__vm_inherit_t Request_vm_inherit; | ||
| 984 | 	__Request__vm_read_t Request_vm_read; | ||
| 985 | 	__Request__vm_read_list_t Request_vm_read_list; | ||
| 986 | 	__Request__vm_write_t Request_vm_write; | ||
| 987 | 	__Request__vm_copy_t Request_vm_copy; | ||
| 988 | 	__Request__vm_read_overwrite_t Request_vm_read_overwrite; | ||
| 989 | 	__Request__vm_msync_t Request_vm_msync; | ||
| 990 | 	__Request__vm_behavior_set_t Request_vm_behavior_set; | ||
| 991 | 	__Request__vm_map_t Request_vm_map; | ||
| 992 | 	__Request__vm_machine_attribute_t Request_vm_machine_attribute; | ||
| 993 | 	__Request__vm_remap_t Request_vm_remap; | ||
| 994 | 	__Request__task_wire_t Request_task_wire; | ||
| 995 | 	__Request__mach_make_memory_entry_t Request_mach_make_memory_entry; | ||
| 996 | 	__Request__vm_map_page_query_t Request_vm_map_page_query; | ||
| 997 | 	__Request__mach_vm_region_info_t Request_mach_vm_region_info; | ||
| 998 | 	__Request__vm_mapped_pages_info_t Request_vm_mapped_pages_info; | ||
| 999 | 	__Request__vm_region_recurse_t Request_vm_region_recurse; | ||
| 1000 | 	__Request__vm_region_recurse_64_t Request_vm_region_recurse_64; | ||
| 1001 | 	__Request__mach_vm_region_info_64_t Request_mach_vm_region_info_64; | ||
| 1002 | 	__Request__vm_region_64_t Request_vm_region_64; | ||
| 1003 | 	__Request__mach_make_memory_entry_64_t Request_mach_make_memory_entry_64; | ||
| 1004 | 	__Request__vm_map_64_t Request_vm_map_64; | ||
| 1005 | 	__Request__vm_purgable_control_t Request_vm_purgable_control; | ||
| 1006 | 	__Request__vm_map_exec_lockdown_t Request_vm_map_exec_lockdown; | ||
| 1007 | 	__Request__vm_remap_new_t Request_vm_remap_new; | ||
| 1008 | }; | ||
| 1009 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1010 | /* typedefs for all replies */ | ||
| 1011 | |||
| 1012 | #ifndef __Reply__vm_map_subsystem__defined | ||
| 1013 | #define __Reply__vm_map_subsystem__defined | ||
| 1014 | |||
| 1015 | #ifdef __MigPackStructs | ||
| 1016 | #pragma pack(push, 4) | ||
| 1017 | #endif | ||
| 1018 | 	typedef struct { | ||
| 1019 | 		mach_msg_header_t Head; | ||
| 1020 | 		/* start of the kernel processed data */ | ||
| 1021 | 		mach_msg_body_t msgh_body; | ||
| 1022 | 		mach_msg_port_descriptor_t object_name; | ||
| 1023 | 		/* end of the kernel processed data */ | ||
| 1024 | 		NDR_record_t NDR; | ||
| 1025 | 		vm_address_t address; | ||
| 1026 | 		vm_size_t size; | ||
| 1027 | 		mach_msg_type_number_t infoCnt; | ||
| 1028 | 		int info[10]; | ||
| 1029 | 	} __Reply__vm_region_t __attribute__((unused)); | ||
| 1030 | #ifdef __MigPackStructs | ||
| 1031 | #pragma pack(pop) | ||
| 1032 | #endif | ||
| 1033 | |||
| 1034 | #ifdef __MigPackStructs | ||
| 1035 | #pragma pack(push, 4) | ||
| 1036 | #endif | ||
| 1037 | 	typedef struct { | ||
| 1038 | 		mach_msg_header_t Head; | ||
| 1039 | 		NDR_record_t NDR; | ||
| 1040 | 		kern_return_t RetCode; | ||
| 1041 | 		vm_address_t address; | ||
| 1042 | 	} __Reply__vm_allocate_t __attribute__((unused)); | ||
| 1043 | #ifdef __MigPackStructs | ||
| 1044 | #pragma pack(pop) | ||
| 1045 | #endif | ||
| 1046 | |||
| 1047 | #ifdef __MigPackStructs | ||
| 1048 | #pragma pack(push, 4) | ||
| 1049 | #endif | ||
| 1050 | 	typedef struct { | ||
| 1051 | 		mach_msg_header_t Head; | ||
| 1052 | 		NDR_record_t NDR; | ||
| 1053 | 		kern_return_t RetCode; | ||
| 1054 | 	} __Reply__vm_deallocate_t __attribute__((unused)); | ||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(pop) | ||
| 1057 | #endif | ||
| 1058 | |||
| 1059 | #ifdef __MigPackStructs | ||
| 1060 | #pragma pack(push, 4) | ||
| 1061 | #endif | ||
| 1062 | 	typedef struct { | ||
| 1063 | 		mach_msg_header_t Head; | ||
| 1064 | 		NDR_record_t NDR; | ||
| 1065 | 		kern_return_t RetCode; | ||
| 1066 | 	} __Reply__vm_protect_t __attribute__((unused)); | ||
| 1067 | #ifdef __MigPackStructs | ||
| 1068 | #pragma pack(pop) | ||
| 1069 | #endif | ||
| 1070 | |||
| 1071 | #ifdef __MigPackStructs | ||
| 1072 | #pragma pack(push, 4) | ||
| 1073 | #endif | ||
| 1074 | 	typedef struct { | ||
| 1075 | 		mach_msg_header_t Head; | ||
| 1076 | 		NDR_record_t NDR; | ||
| 1077 | 		kern_return_t RetCode; | ||
| 1078 | 	} __Reply__vm_inherit_t __attribute__((unused)); | ||
| 1079 | #ifdef __MigPackStructs | ||
| 1080 | #pragma pack(pop) | ||
| 1081 | #endif | ||
| 1082 | |||
| 1083 | #ifdef __MigPackStructs | ||
| 1084 | #pragma pack(push, 4) | ||
| 1085 | #endif | ||
| 1086 | 	typedef struct { | ||
| 1087 | 		mach_msg_header_t Head; | ||
| 1088 | 		/* start of the kernel processed data */ | ||
| 1089 | 		mach_msg_body_t msgh_body; | ||
| 1090 | 		mach_msg_ool_descriptor_t data; | ||
| 1091 | 		/* end of the kernel processed data */ | ||
| 1092 | 		NDR_record_t NDR; | ||
| 1093 | 		mach_msg_type_number_t dataCnt; | ||
| 1094 | 	} __Reply__vm_read_t __attribute__((unused)); | ||
| 1095 | #ifdef __MigPackStructs | ||
| 1096 | #pragma pack(pop) | ||
| 1097 | #endif | ||
| 1098 | |||
| 1099 | #ifdef __MigPackStructs | ||
| 1100 | #pragma pack(push, 4) | ||
| 1101 | #endif | ||
| 1102 | 	typedef struct { | ||
| 1103 | 		mach_msg_header_t Head; | ||
| 1104 | 		NDR_record_t NDR; | ||
| 1105 | 		kern_return_t RetCode; | ||
| 1106 | 		vm_read_entry_t data_list; | ||
| 1107 | 	} __Reply__vm_read_list_t __attribute__((unused)); | ||
| 1108 | #ifdef __MigPackStructs | ||
| 1109 | #pragma pack(pop) | ||
| 1110 | #endif | ||
| 1111 | |||
| 1112 | #ifdef __MigPackStructs | ||
| 1113 | #pragma pack(push, 4) | ||
| 1114 | #endif | ||
| 1115 | 	typedef struct { | ||
| 1116 | 		mach_msg_header_t Head; | ||
| 1117 | 		NDR_record_t NDR; | ||
| 1118 | 		kern_return_t RetCode; | ||
| 1119 | 	} __Reply__vm_write_t __attribute__((unused)); | ||
| 1120 | #ifdef __MigPackStructs | ||
| 1121 | #pragma pack(pop) | ||
| 1122 | #endif | ||
| 1123 | |||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(push, 4) | ||
| 1126 | #endif | ||
| 1127 | 	typedef struct { | ||
| 1128 | 		mach_msg_header_t Head; | ||
| 1129 | 		NDR_record_t NDR; | ||
| 1130 | 		kern_return_t RetCode; | ||
| 1131 | 	} __Reply__vm_copy_t __attribute__((unused)); | ||
| 1132 | #ifdef __MigPackStructs | ||
| 1133 | #pragma pack(pop) | ||
| 1134 | #endif | ||
| 1135 | |||
| 1136 | #ifdef __MigPackStructs | ||
| 1137 | #pragma pack(push, 4) | ||
| 1138 | #endif | ||
| 1139 | 	typedef struct { | ||
| 1140 | 		mach_msg_header_t Head; | ||
| 1141 | 		NDR_record_t NDR; | ||
| 1142 | 		kern_return_t RetCode; | ||
| 1143 | 		vm_size_t outsize; | ||
| 1144 | 	} __Reply__vm_read_overwrite_t __attribute__((unused)); | ||
| 1145 | #ifdef __MigPackStructs | ||
| 1146 | #pragma pack(pop) | ||
| 1147 | #endif | ||
| 1148 | |||
| 1149 | #ifdef __MigPackStructs | ||
| 1150 | #pragma pack(push, 4) | ||
| 1151 | #endif | ||
| 1152 | 	typedef struct { | ||
| 1153 | 		mach_msg_header_t Head; | ||
| 1154 | 		NDR_record_t NDR; | ||
| 1155 | 		kern_return_t RetCode; | ||
| 1156 | 	} __Reply__vm_msync_t __attribute__((unused)); | ||
| 1157 | #ifdef __MigPackStructs | ||
| 1158 | #pragma pack(pop) | ||
| 1159 | #endif | ||
| 1160 | |||
| 1161 | #ifdef __MigPackStructs | ||
| 1162 | #pragma pack(push, 4) | ||
| 1163 | #endif | ||
| 1164 | 	typedef struct { | ||
| 1165 | 		mach_msg_header_t Head; | ||
| 1166 | 		NDR_record_t NDR; | ||
| 1167 | 		kern_return_t RetCode; | ||
| 1168 | 	} __Reply__vm_behavior_set_t __attribute__((unused)); | ||
| 1169 | #ifdef __MigPackStructs | ||
| 1170 | #pragma pack(pop) | ||
| 1171 | #endif | ||
| 1172 | |||
| 1173 | #ifdef __MigPackStructs | ||
| 1174 | #pragma pack(push, 4) | ||
| 1175 | #endif | ||
| 1176 | 	typedef struct { | ||
| 1177 | 		mach_msg_header_t Head; | ||
| 1178 | 		NDR_record_t NDR; | ||
| 1179 | 		kern_return_t RetCode; | ||
| 1180 | 		vm_address_t address; | ||
| 1181 | 	} __Reply__vm_map_t __attribute__((unused)); | ||
| 1182 | #ifdef __MigPackStructs | ||
| 1183 | #pragma pack(pop) | ||
| 1184 | #endif | ||
| 1185 | |||
| 1186 | #ifdef __MigPackStructs | ||
| 1187 | #pragma pack(push, 4) | ||
| 1188 | #endif | ||
| 1189 | 	typedef struct { | ||
| 1190 | 		mach_msg_header_t Head; | ||
| 1191 | 		NDR_record_t NDR; | ||
| 1192 | 		kern_return_t RetCode; | ||
| 1193 | 		vm_machine_attribute_val_t value; | ||
| 1194 | 	} __Reply__vm_machine_attribute_t __attribute__((unused)); | ||
| 1195 | #ifdef __MigPackStructs | ||
| 1196 | #pragma pack(pop) | ||
| 1197 | #endif | ||
| 1198 | |||
| 1199 | #ifdef __MigPackStructs | ||
| 1200 | #pragma pack(push, 4) | ||
| 1201 | #endif | ||
| 1202 | 	typedef struct { | ||
| 1203 | 		mach_msg_header_t Head; | ||
| 1204 | 		NDR_record_t NDR; | ||
| 1205 | 		kern_return_t RetCode; | ||
| 1206 | 		vm_address_t target_address; | ||
| 1207 | 		vm_prot_t cur_protection; | ||
| 1208 | 		vm_prot_t max_protection; | ||
| 1209 | 	} __Reply__vm_remap_t __attribute__((unused)); | ||
| 1210 | #ifdef __MigPackStructs | ||
| 1211 | #pragma pack(pop) | ||
| 1212 | #endif | ||
| 1213 | |||
| 1214 | #ifdef __MigPackStructs | ||
| 1215 | #pragma pack(push, 4) | ||
| 1216 | #endif | ||
| 1217 | 	typedef struct { | ||
| 1218 | 		mach_msg_header_t Head; | ||
| 1219 | 		NDR_record_t NDR; | ||
| 1220 | 		kern_return_t RetCode; | ||
| 1221 | 	} __Reply__task_wire_t __attribute__((unused)); | ||
| 1222 | #ifdef __MigPackStructs | ||
| 1223 | #pragma pack(pop) | ||
| 1224 | #endif | ||
| 1225 | |||
| 1226 | #ifdef __MigPackStructs | ||
| 1227 | #pragma pack(push, 4) | ||
| 1228 | #endif | ||
| 1229 | 	typedef struct { | ||
| 1230 | 		mach_msg_header_t Head; | ||
| 1231 | 		/* start of the kernel processed data */ | ||
| 1232 | 		mach_msg_body_t msgh_body; | ||
| 1233 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1234 | 		/* end of the kernel processed data */ | ||
| 1235 | 		NDR_record_t NDR; | ||
| 1236 | 		vm_size_t size; | ||
| 1237 | 	} __Reply__mach_make_memory_entry_t __attribute__((unused)); | ||
| 1238 | #ifdef __MigPackStructs | ||
| 1239 | #pragma pack(pop) | ||
| 1240 | #endif | ||
| 1241 | |||
| 1242 | #ifdef __MigPackStructs | ||
| 1243 | #pragma pack(push, 4) | ||
| 1244 | #endif | ||
| 1245 | 	typedef struct { | ||
| 1246 | 		mach_msg_header_t Head; | ||
| 1247 | 		NDR_record_t NDR; | ||
| 1248 | 		kern_return_t RetCode; | ||
| 1249 | 		integer_t disposition; | ||
| 1250 | 		integer_t ref_count; | ||
| 1251 | 	} __Reply__vm_map_page_query_t __attribute__((unused)); | ||
| 1252 | #ifdef __MigPackStructs | ||
| 1253 | #pragma pack(pop) | ||
| 1254 | #endif | ||
| 1255 | |||
| 1256 | #ifdef __MigPackStructs | ||
| 1257 | #pragma pack(push, 4) | ||
| 1258 | #endif | ||
| 1259 | 	typedef struct { | ||
| 1260 | 		mach_msg_header_t Head; | ||
| 1261 | 		/* start of the kernel processed data */ | ||
| 1262 | 		mach_msg_body_t msgh_body; | ||
| 1263 | 		mach_msg_ool_descriptor_t objects; | ||
| 1264 | 		/* end of the kernel processed data */ | ||
| 1265 | 		NDR_record_t NDR; | ||
| 1266 | 		vm_info_region_t region; | ||
| 1267 | 		mach_msg_type_number_t objectsCnt; | ||
| 1268 | 	} __Reply__mach_vm_region_info_t __attribute__((unused)); | ||
| 1269 | #ifdef __MigPackStructs | ||
| 1270 | #pragma pack(pop) | ||
| 1271 | #endif | ||
| 1272 | |||
| 1273 | #ifdef __MigPackStructs | ||
| 1274 | #pragma pack(push, 4) | ||
| 1275 | #endif | ||
| 1276 | 	typedef struct { | ||
| 1277 | 		mach_msg_header_t Head; | ||
| 1278 | 		/* start of the kernel processed data */ | ||
| 1279 | 		mach_msg_body_t msgh_body; | ||
| 1280 | 		mach_msg_ool_descriptor_t pages; | ||
| 1281 | 		/* end of the kernel processed data */ | ||
| 1282 | 		NDR_record_t NDR; | ||
| 1283 | 		mach_msg_type_number_t pagesCnt; | ||
| 1284 | 	} __Reply__vm_mapped_pages_info_t __attribute__((unused)); | ||
| 1285 | #ifdef __MigPackStructs | ||
| 1286 | #pragma pack(pop) | ||
| 1287 | #endif | ||
| 1288 | |||
| 1289 | #ifdef __MigPackStructs | ||
| 1290 | #pragma pack(push, 4) | ||
| 1291 | #endif | ||
| 1292 | 	typedef struct { | ||
| 1293 | 		mach_msg_header_t Head; | ||
| 1294 | 		NDR_record_t NDR; | ||
| 1295 | 		kern_return_t RetCode; | ||
| 1296 | 		vm_address_t address; | ||
| 1297 | 		vm_size_t size; | ||
| 1298 | 		natural_t nesting_depth; | ||
| 1299 | 		mach_msg_type_number_t infoCnt; | ||
| 1300 | 		int info[19]; | ||
| 1301 | 	} __Reply__vm_region_recurse_t __attribute__((unused)); | ||
| 1302 | #ifdef __MigPackStructs | ||
| 1303 | #pragma pack(pop) | ||
| 1304 | #endif | ||
| 1305 | |||
| 1306 | #ifdef __MigPackStructs | ||
| 1307 | #pragma pack(push, 4) | ||
| 1308 | #endif | ||
| 1309 | 	typedef struct { | ||
| 1310 | 		mach_msg_header_t Head; | ||
| 1311 | 		NDR_record_t NDR; | ||
| 1312 | 		kern_return_t RetCode; | ||
| 1313 | 		vm_address_t address; | ||
| 1314 | 		vm_size_t size; | ||
| 1315 | 		natural_t nesting_depth; | ||
| 1316 | 		mach_msg_type_number_t infoCnt; | ||
| 1317 | 		int info[19]; | ||
| 1318 | 	} __Reply__vm_region_recurse_64_t __attribute__((unused)); | ||
| 1319 | #ifdef __MigPackStructs | ||
| 1320 | #pragma pack(pop) | ||
| 1321 | #endif | ||
| 1322 | |||
| 1323 | #ifdef __MigPackStructs | ||
| 1324 | #pragma pack(push, 4) | ||
| 1325 | #endif | ||
| 1326 | 	typedef struct { | ||
| 1327 | 		mach_msg_header_t Head; | ||
| 1328 | 		/* start of the kernel processed data */ | ||
| 1329 | 		mach_msg_body_t msgh_body; | ||
| 1330 | 		mach_msg_ool_descriptor_t objects; | ||
| 1331 | 		/* end of the kernel processed data */ | ||
| 1332 | 		NDR_record_t NDR; | ||
| 1333 | 		vm_info_region_64_t region; | ||
| 1334 | 		mach_msg_type_number_t objectsCnt; | ||
| 1335 | 	} __Reply__mach_vm_region_info_64_t __attribute__((unused)); | ||
| 1336 | #ifdef __MigPackStructs | ||
| 1337 | #pragma pack(pop) | ||
| 1338 | #endif | ||
| 1339 | |||
| 1340 | #ifdef __MigPackStructs | ||
| 1341 | #pragma pack(push, 4) | ||
| 1342 | #endif | ||
| 1343 | 	typedef struct { | ||
| 1344 | 		mach_msg_header_t Head; | ||
| 1345 | 		/* start of the kernel processed data */ | ||
| 1346 | 		mach_msg_body_t msgh_body; | ||
| 1347 | 		mach_msg_port_descriptor_t object_name; | ||
| 1348 | 		/* end of the kernel processed data */ | ||
| 1349 | 		NDR_record_t NDR; | ||
| 1350 | 		vm_address_t address; | ||
| 1351 | 		vm_size_t size; | ||
| 1352 | 		mach_msg_type_number_t infoCnt; | ||
| 1353 | 		int info[10]; | ||
| 1354 | 	} __Reply__vm_region_64_t __attribute__((unused)); | ||
| 1355 | #ifdef __MigPackStructs | ||
| 1356 | #pragma pack(pop) | ||
| 1357 | #endif | ||
| 1358 | |||
| 1359 | #ifdef __MigPackStructs | ||
| 1360 | #pragma pack(push, 4) | ||
| 1361 | #endif | ||
| 1362 | 	typedef struct { | ||
| 1363 | 		mach_msg_header_t Head; | ||
| 1364 | 		/* start of the kernel processed data */ | ||
| 1365 | 		mach_msg_body_t msgh_body; | ||
| 1366 | 		mach_msg_port_descriptor_t object_handle; | ||
| 1367 | 		/* end of the kernel processed data */ | ||
| 1368 | 		NDR_record_t NDR; | ||
| 1369 | 		memory_object_size_t size; | ||
| 1370 | 	} __Reply__mach_make_memory_entry_64_t __attribute__((unused)); | ||
| 1371 | #ifdef __MigPackStructs | ||
| 1372 | #pragma pack(pop) | ||
| 1373 | #endif | ||
| 1374 | |||
| 1375 | #ifdef __MigPackStructs | ||
| 1376 | #pragma pack(push, 4) | ||
| 1377 | #endif | ||
| 1378 | 	typedef struct { | ||
| 1379 | 		mach_msg_header_t Head; | ||
| 1380 | 		NDR_record_t NDR; | ||
| 1381 | 		kern_return_t RetCode; | ||
| 1382 | 		vm_address_t address; | ||
| 1383 | 	} __Reply__vm_map_64_t __attribute__((unused)); | ||
| 1384 | #ifdef __MigPackStructs | ||
| 1385 | #pragma pack(pop) | ||
| 1386 | #endif | ||
| 1387 | |||
| 1388 | #ifdef __MigPackStructs | ||
| 1389 | #pragma pack(push, 4) | ||
| 1390 | #endif | ||
| 1391 | 	typedef struct { | ||
| 1392 | 		mach_msg_header_t Head; | ||
| 1393 | 		NDR_record_t NDR; | ||
| 1394 | 		kern_return_t RetCode; | ||
| 1395 | 		int state; | ||
| 1396 | 	} __Reply__vm_purgable_control_t __attribute__((unused)); | ||
| 1397 | #ifdef __MigPackStructs | ||
| 1398 | #pragma pack(pop) | ||
| 1399 | #endif | ||
| 1400 | |||
| 1401 | #ifdef __MigPackStructs | ||
| 1402 | #pragma pack(push, 4) | ||
| 1403 | #endif | ||
| 1404 | 	typedef struct { | ||
| 1405 | 		mach_msg_header_t Head; | ||
| 1406 | 		NDR_record_t NDR; | ||
| 1407 | 		kern_return_t RetCode; | ||
| 1408 | 	} __Reply__vm_map_exec_lockdown_t __attribute__((unused)); | ||
| 1409 | #ifdef __MigPackStructs | ||
| 1410 | #pragma pack(pop) | ||
| 1411 | #endif | ||
| 1412 | |||
| 1413 | #ifdef __MigPackStructs | ||
| 1414 | #pragma pack(push, 4) | ||
| 1415 | #endif | ||
| 1416 | 	typedef struct { | ||
| 1417 | 		mach_msg_header_t Head; | ||
| 1418 | 		NDR_record_t NDR; | ||
| 1419 | 		kern_return_t RetCode; | ||
| 1420 | 		vm_address_t target_address; | ||
| 1421 | 		vm_prot_t cur_protection; | ||
| 1422 | 		vm_prot_t max_protection; | ||
| 1423 | 	} __Reply__vm_remap_new_t __attribute__((unused)); | ||
| 1424 | #ifdef __MigPackStructs | ||
| 1425 | #pragma pack(pop) | ||
| 1426 | #endif | ||
| 1427 | #endif /* !__Reply__vm_map_subsystem__defined */ | ||
| 1428 | |||
| 1429 | /* union of all replies */ | ||
| 1430 | |||
| 1431 | #ifndef __ReplyUnion__vm_map_subsystem__defined | ||
| 1432 | #define __ReplyUnion__vm_map_subsystem__defined | ||
| 1433 | union __ReplyUnion__vm_map_subsystem { | ||
| 1434 | 	__Reply__vm_region_t Reply_vm_region; | ||
| 1435 | 	__Reply__vm_allocate_t Reply_vm_allocate; | ||
| 1436 | 	__Reply__vm_deallocate_t Reply_vm_deallocate; | ||
| 1437 | 	__Reply__vm_protect_t Reply_vm_protect; | ||
| 1438 | 	__Reply__vm_inherit_t Reply_vm_inherit; | ||
| 1439 | 	__Reply__vm_read_t Reply_vm_read; | ||
| 1440 | 	__Reply__vm_read_list_t Reply_vm_read_list; | ||
| 1441 | 	__Reply__vm_write_t Reply_vm_write; | ||
| 1442 | 	__Reply__vm_copy_t Reply_vm_copy; | ||
| 1443 | 	__Reply__vm_read_overwrite_t Reply_vm_read_overwrite; | ||
| 1444 | 	__Reply__vm_msync_t Reply_vm_msync; | ||
| 1445 | 	__Reply__vm_behavior_set_t Reply_vm_behavior_set; | ||
| 1446 | 	__Reply__vm_map_t Reply_vm_map; | ||
| 1447 | 	__Reply__vm_machine_attribute_t Reply_vm_machine_attribute; | ||
| 1448 | 	__Reply__vm_remap_t Reply_vm_remap; | ||
| 1449 | 	__Reply__task_wire_t Reply_task_wire; | ||
| 1450 | 	__Reply__mach_make_memory_entry_t Reply_mach_make_memory_entry; | ||
| 1451 | 	__Reply__vm_map_page_query_t Reply_vm_map_page_query; | ||
| 1452 | 	__Reply__mach_vm_region_info_t Reply_mach_vm_region_info; | ||
| 1453 | 	__Reply__vm_mapped_pages_info_t Reply_vm_mapped_pages_info; | ||
| 1454 | 	__Reply__vm_region_recurse_t Reply_vm_region_recurse; | ||
| 1455 | 	__Reply__vm_region_recurse_64_t Reply_vm_region_recurse_64; | ||
| 1456 | 	__Reply__mach_vm_region_info_64_t Reply_mach_vm_region_info_64; | ||
| 1457 | 	__Reply__vm_region_64_t Reply_vm_region_64; | ||
| 1458 | 	__Reply__mach_make_memory_entry_64_t Reply_mach_make_memory_entry_64; | ||
| 1459 | 	__Reply__vm_map_64_t Reply_vm_map_64; | ||
| 1460 | 	__Reply__vm_purgable_control_t Reply_vm_purgable_control; | ||
| 1461 | 	__Reply__vm_map_exec_lockdown_t Reply_vm_map_exec_lockdown; | ||
| 1462 | 	__Reply__vm_remap_new_t Reply_vm_remap_new; | ||
| 1463 | }; | ||
| 1464 | #endif /* !__RequestUnion__vm_map_subsystem__defined */ | ||
| 1465 | |||
| 1466 | #ifndef subsystem_to_name_map_vm_map | ||
| 1467 | #define subsystem_to_name_map_vm_map \ | ||
| 1468 | { "vm_region", 3800 },\ | ||
| 1469 | { "vm_allocate", 3801 },\ | ||
| 1470 | { "vm_deallocate", 3802 },\ | ||
| 1471 | { "vm_protect", 3803 },\ | ||
| 1472 | { "vm_inherit", 3804 },\ | ||
| 1473 | { "vm_read", 3805 },\ | ||
| 1474 | { "vm_read_list", 3806 },\ | ||
| 1475 | { "vm_write", 3807 },\ | ||
| 1476 | { "vm_copy", 3808 },\ | ||
| 1477 | { "vm_read_overwrite", 3809 },\ | ||
| 1478 | { "vm_msync", 3810 },\ | ||
| 1479 | { "vm_behavior_set", 3811 },\ | ||
| 1480 | { "vm_map", 3812 },\ | ||
| 1481 | { "vm_machine_attribute", 3813 },\ | ||
| 1482 | { "vm_remap", 3814 },\ | ||
| 1483 | { "task_wire", 3815 },\ | ||
| 1484 | { "mach_make_memory_entry", 3816 },\ | ||
| 1485 | { "vm_map_page_query", 3817 },\ | ||
| 1486 | { "mach_vm_region_info", 3818 },\ | ||
| 1487 | { "vm_mapped_pages_info", 3819 },\ | ||
| 1488 | { "vm_region_recurse", 3821 },\ | ||
| 1489 | { "vm_region_recurse_64", 3822 },\ | ||
| 1490 | { "mach_vm_region_info_64", 3823 },\ | ||
| 1491 | { "vm_region_64", 3824 },\ | ||
| 1492 | { "mach_make_memory_entry_64", 3825 },\ | ||
| 1493 | { "vm_map_64", 3826 },\ | ||
| 1494 | { "vm_purgable_control", 3830 },\ | ||
| 1495 | { "vm_map_exec_lockdown", 3831 },\ | ||
| 1496 | { "vm_remap_new", 3832 } | ||
| 1497 | #endif | ||
| 1498 | |||
| 1499 | #ifdef __AfterMigUserHeader | ||
| 1500 | __AfterMigUserHeader | ||
| 1501 | #endif /* __AfterMigUserHeader */ | ||
| 1502 | |||
| 1503 | #endif	 /* _vm_map_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/vm_prot.h deleted-171| ... | @@ -1,171 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2021 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_prot.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young | ||
| 61 | * | ||
| 62 | *	Virtual memory protection definitions. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_PROT_H_ | ||
| 67 | #define _MACH_VM_PROT_H_ | ||
| 68 | |||
| 69 | /* | ||
| 70 | *	Types defined: | ||
| 71 | * | ||
| 72 | *	vm_prot_t		VM protection values. | ||
| 73 | */ | ||
| 74 | |||
| 75 | typedef int vm_prot_t; | ||
| 76 | |||
| 77 | /* | ||
| 78 | *	Protection values, defined as bits within the vm_prot_t type | ||
| 79 | */ | ||
| 80 | |||
| 81 | #define VM_PROT_NONE ((vm_prot_t) 0x00) | ||
| 82 | |||
| 83 | #define VM_PROT_READ ((vm_prot_t) 0x01) /* read permission */ | ||
| 84 | #define VM_PROT_WRITE ((vm_prot_t) 0x02) /* write permission */ | ||
| 85 | #define VM_PROT_EXECUTE ((vm_prot_t) 0x04) /* execute permission */ | ||
| 86 | |||
| 87 | /* | ||
| 88 | *	The default protection for newly-created virtual memory | ||
| 89 | */ | ||
| 90 | |||
| 91 | #define VM_PROT_DEFAULT (VM_PROT_READ|VM_PROT_WRITE) | ||
| 92 | |||
| 93 | /* | ||
| 94 | *	The maximum privileges possible, for parameter checking. | ||
| 95 | */ | ||
| 96 | |||
| 97 | #define VM_PROT_ALL (VM_PROT_READ|VM_PROT_WRITE|VM_PROT_EXECUTE) | ||
| 98 | |||
| 99 | /* | ||
| 100 | *	An invalid protection value. | ||
| 101 | *	Used only by memory_object_lock_request to indicate no change | ||
| 102 | *	to page locks. Using -1 here is a bad idea because it | ||
| 103 | *	looks like VM_PROT_ALL and then some. | ||
| 104 | */ | ||
| 105 | |||
| 106 | #define VM_PROT_NO_CHANGE_LEGACY ((vm_prot_t) 0x08) | ||
| 107 | #define VM_PROT_NO_CHANGE ((vm_prot_t) 0x01000000) | ||
| 108 | |||
| 109 | /* | ||
| 110 | * When a caller finds that he cannot obtain write permission on a | ||
| 111 | * mapped entry, the following flag can be used. The entry will | ||
| 112 | * be made "needs copy" effectively copying the object (using COW), | ||
| 113 | * and write permission will be added to the maximum protections | ||
| 114 | * for the associated entry. | ||
| 115 | */ | ||
| 116 | |||
| 117 | #define VM_PROT_COPY ((vm_prot_t) 0x10) | ||
| 118 | |||
| 119 | |||
| 120 | /* | ||
| 121 | *	Another invalid protection value. | ||
| 122 | *	Used only by memory_object_data_request upon an object | ||
| 123 | *	which has specified a copy_call copy strategy. It is used | ||
| 124 | *	when the kernel wants a page belonging to a copy of the | ||
| 125 | *	object, and is only asking the object as a result of | ||
| 126 | *	following a shadow chain. This solves the race between pages | ||
| 127 | *	being pushed up by the memory manager and the kernel | ||
| 128 | *	walking down the shadow chain. | ||
| 129 | */ | ||
| 130 | |||
| 131 | #define VM_PROT_WANTS_COPY ((vm_prot_t) 0x10) | ||
| 132 | |||
| 133 | |||
| 134 | /* | ||
| 135 | * Another invalid protection value. | ||
| 136 | *	Indicates that the other protection bits are to be applied as a mask | ||
| 137 | *	against the actual protection bits of the map entry. | ||
| 138 | */ | ||
| 139 | #define VM_PROT_IS_MASK ((vm_prot_t) 0x40) | ||
| 140 | |||
| 141 | /* | ||
| 142 | * Another invalid protection value to support execute-only protection. | ||
| 143 | * VM_PROT_STRIP_READ is a special marker that tells mprotect to not | ||
| 144 | * set VM_PROT_READ. We have to do it this way because existing code | ||
| 145 | * expects the system to set VM_PROT_READ if VM_PROT_EXECUTE is set. | ||
| 146 | * VM_PROT_EXECUTE_ONLY is just a convenience value to indicate that | ||
| 147 | * the memory should be executable and explicitly not readable. It will | ||
| 148 | * be ignored on platforms that do not support this type of protection. | ||
| 149 | */ | ||
| 150 | #define VM_PROT_STRIP_READ ((vm_prot_t) 0x80) | ||
| 151 | #define VM_PROT_EXECUTE_ONLY (VM_PROT_EXECUTE|VM_PROT_STRIP_READ) | ||
| 152 | |||
| 153 | |||
| 154 | #if defined(__x86_64__) | ||
| 155 | /* | ||
| 156 | * Another invalid protection value to support specifying different | ||
| 157 | * execute permissions for user- and supervisor- modes. When | ||
| 158 | * MBE is enabled in a VM, VM_PROT_EXECUTE is used to indicate | ||
| 159 | * supervisor-mode execute permission, and VM_PROT_UEXEC specifies | ||
| 160 | * user-mode execute permission. Currently only used by the | ||
| 161 | * x86 Hypervisor kext. | ||
| 162 | */ | ||
| 163 | #define VM_PROT_UEXEC ((vm_prot_t) 0x8) /* User-mode Execute Permission */ | ||
| 164 | |||
| 165 | #define VM_PROT_ALLEXEC (VM_PROT_EXECUTE | VM_PROT_UEXEC) | ||
| 166 | #else | ||
| 167 | #define VM_PROT_ALLEXEC (VM_PROT_EXECUTE) | ||
| 168 | #endif /* defined(__x86_64__) */ | ||
| 169 | |||
| 170 | |||
| 171 | #endif /* _MACH_VM_PROT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/vm_statistics.h deleted-556| ... | @@ -1,556 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988,1987 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	File:	mach/vm_statistics.h | ||
| 60 | *	Author:	Avadis Tevanian, Jr., Michael Wayne Young, David Golub | ||
| 61 | * | ||
| 62 | *	Virtual memory statistics structure. | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #ifndef _MACH_VM_STATISTICS_H_ | ||
| 67 | #define _MACH_VM_STATISTICS_H_ | ||
| 68 | |||
| 69 | #ifdef __cplusplus | ||
| 70 | extern "C" { | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #include <mach/machine/vm_types.h> | ||
| 74 | #include <mach/machine/kern_return.h> | ||
| 75 | |||
| 76 | /* | ||
| 77 | * vm_statistics | ||
| 78 | * | ||
| 79 | * History: | ||
| 80 | *	rev0 - original structure. | ||
| 81 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 82 | *	rev2 - added speculative_count. | ||
| 83 | * | ||
| 84 | * Note: you cannot add any new fields to this structure. Add them below in | ||
| 85 | * vm_statistics64. | ||
| 86 | */ | ||
| 87 | |||
| 88 | struct vm_statistics { | ||
| 89 | 	natural_t free_count; /* # of pages free */ | ||
| 90 | 	natural_t active_count; /* # of pages active */ | ||
| 91 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 92 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 93 | 	natural_t zero_fill_count; /* # of zero fill pages */ | ||
| 94 | 	natural_t reactivations; /* # of pages reactivated */ | ||
| 95 | 	natural_t pageins; /* # of pageins */ | ||
| 96 | 	natural_t pageouts; /* # of pageouts */ | ||
| 97 | 	natural_t faults; /* # of faults */ | ||
| 98 | 	natural_t cow_faults; /* # of copy-on-writes */ | ||
| 99 | 	natural_t lookups; /* object cache lookups */ | ||
| 100 | 	natural_t hits; /* object cache hits */ | ||
| 101 | |||
| 102 | 	/* added for rev1 */ | ||
| 103 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 104 | 	natural_t purges; /* # of pages purged */ | ||
| 105 | |||
| 106 | 	/* added for rev2 */ | ||
| 107 | 	/* | ||
| 108 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 109 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 110 | 	 * used to hold data that was read speculatively from disk but | ||
| 111 | 	 * haven't actually been used by anyone so far. | ||
| 112 | 	 */ | ||
| 113 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 114 | }; | ||
| 115 | |||
| 116 | /* Used by all architectures */ | ||
| 117 | typedef struct vm_statistics *vm_statistics_t; | ||
| 118 | typedef struct vm_statistics vm_statistics_data_t; | ||
| 119 | |||
| 120 | /* | ||
| 121 | * vm_statistics64 | ||
| 122 | * | ||
| 123 | * History: | ||
| 124 | *	rev0 - original structure. | ||
| 125 | *	rev1 - added purgable info (purgable_count and purges). | ||
| 126 | *	rev2 - added speculative_count. | ||
| 127 | *	 ---- | ||
| 128 | *	rev3 - changed name to vm_statistics64. | ||
| 129 | *		changed some fields in structure to 64-bit on | ||
| 130 | *		arm, i386 and x86_64 architectures. | ||
| 131 | *	rev4 - require 64-bit alignment for efficient access | ||
| 132 | *		in the kernel. No change to reported data. | ||
| 133 | * | ||
| 134 | */ | ||
| 135 | |||
| 136 | struct vm_statistics64 { | ||
| 137 | 	natural_t free_count; /* # of pages free */ | ||
| 138 | 	natural_t active_count; /* # of pages active */ | ||
| 139 | 	natural_t inactive_count; /* # of pages inactive */ | ||
| 140 | 	natural_t wire_count; /* # of pages wired down */ | ||
| 141 | 	uint64_t zero_fill_count; /* # of zero fill pages */ | ||
| 142 | 	uint64_t reactivations; /* # of pages reactivated */ | ||
| 143 | 	uint64_t pageins; /* # of pageins */ | ||
| 144 | 	uint64_t pageouts; /* # of pageouts */ | ||
| 145 | 	uint64_t faults; /* # of faults */ | ||
| 146 | 	uint64_t cow_faults; /* # of copy-on-writes */ | ||
| 147 | 	uint64_t lookups; /* object cache lookups */ | ||
| 148 | 	uint64_t hits; /* object cache hits */ | ||
| 149 | 	uint64_t purges; /* # of pages purged */ | ||
| 150 | 	natural_t purgeable_count; /* # of pages purgeable */ | ||
| 151 | 	/* | ||
| 152 | 	 * NB: speculative pages are already accounted for in "free_count", | ||
| 153 | 	 * so "speculative_count" is the number of "free" pages that are | ||
| 154 | 	 * used to hold data that was read speculatively from disk but | ||
| 155 | 	 * haven't actually been used by anyone so far. | ||
| 156 | 	 */ | ||
| 157 | 	natural_t speculative_count; /* # of pages speculative */ | ||
| 158 | |||
| 159 | 	/* added for rev1 */ | ||
| 160 | 	uint64_t decompressions; /* # of pages decompressed */ | ||
| 161 | 	uint64_t compressions; /* # of pages compressed */ | ||
| 162 | 	uint64_t swapins; /* # of pages swapped in (via compression segments) */ | ||
| 163 | 	uint64_t swapouts; /* # of pages swapped out (via compression segments) */ | ||
| 164 | 	natural_t compressor_page_count; /* # of pages used by the compressed pager to hold all the compressed data */ | ||
| 165 | 	natural_t throttled_count; /* # of pages throttled */ | ||
| 166 | 	natural_t external_page_count; /* # of pages that are file-backed (non-swap) */ | ||
| 167 | 	natural_t internal_page_count; /* # of pages that are anonymous */ | ||
| 168 | 	uint64_t total_uncompressed_pages_in_compressor; /* # of pages (uncompressed) held within the compressor. */ | ||
| 169 | } __attribute__((aligned(8))); | ||
| 170 | |||
| 171 | typedef struct vm_statistics64 *vm_statistics64_t; | ||
| 172 | typedef struct vm_statistics64 vm_statistics64_data_t; | ||
| 173 | |||
| 174 | kern_return_t vm_stats(void *info, unsigned int *count); | ||
| 175 | |||
| 176 | /* | ||
| 177 | * VM_STATISTICS_TRUNCATE_TO_32_BIT | ||
| 178 | * | ||
| 179 | * This is used by host_statistics() to truncate and peg the 64-bit in-kernel values from | ||
| 180 | * vm_statistics64 to the 32-bit values of the older structure above (vm_statistics). | ||
| 181 | */ | ||
| 182 | #define VM_STATISTICS_TRUNCATE_TO_32_BIT(value) ((uint32_t)(((value) > UINT32_MAX ) ? UINT32_MAX : (value))) | ||
| 183 | |||
| 184 | /* | ||
| 185 | * vm_extmod_statistics | ||
| 186 | * | ||
| 187 | * Structure to record modifications to a task by an | ||
| 188 | * external agent. | ||
| 189 | * | ||
| 190 | * History: | ||
| 191 | *	rev0 - original structure. | ||
| 192 | */ | ||
| 193 | |||
| 194 | struct vm_extmod_statistics { | ||
| 195 | 	int64_t task_for_pid_count; /* # of times task port was looked up */ | ||
| 196 | 	int64_t task_for_pid_caller_count; /* # of times this task called task_for_pid */ | ||
| 197 | 	int64_t thread_creation_count; /* # of threads created in task */ | ||
| 198 | 	int64_t thread_creation_caller_count; /* # of threads created by task */ | ||
| 199 | 	int64_t thread_set_state_count; /* # of register state sets in task */ | ||
| 200 | 	int64_t thread_set_state_caller_count; /* # of register state sets by task */ | ||
| 201 | } __attribute__((aligned(8))); | ||
| 202 | |||
| 203 | typedef struct vm_extmod_statistics *vm_extmod_statistics_t; | ||
| 204 | typedef struct vm_extmod_statistics vm_extmod_statistics_data_t; | ||
| 205 | |||
| 206 | typedef struct vm_purgeable_stat { | ||
| 207 | 	uint64_t count; | ||
| 208 | 	uint64_t size; | ||
| 209 | }vm_purgeable_stat_t; | ||
| 210 | |||
| 211 | struct vm_purgeable_info { | ||
| 212 | 	vm_purgeable_stat_t fifo_data[8]; | ||
| 213 | 	vm_purgeable_stat_t obsolete_data; | ||
| 214 | 	vm_purgeable_stat_t lifo_data[8]; | ||
| 215 | }; | ||
| 216 | |||
| 217 | typedef struct vm_purgeable_info *vm_purgeable_info_t; | ||
| 218 | |||
| 219 | /* included for the vm_map_page_query call */ | ||
| 220 | |||
| 221 | #define VM_PAGE_QUERY_PAGE_PRESENT 0x1 | ||
| 222 | #define VM_PAGE_QUERY_PAGE_FICTITIOUS 0x2 | ||
| 223 | #define VM_PAGE_QUERY_PAGE_REF 0x4 | ||
| 224 | #define VM_PAGE_QUERY_PAGE_DIRTY 0x8 | ||
| 225 | #define VM_PAGE_QUERY_PAGE_PAGED_OUT 0x10 | ||
| 226 | #define VM_PAGE_QUERY_PAGE_COPIED 0x20 | ||
| 227 | #define VM_PAGE_QUERY_PAGE_SPECULATIVE 0x40 | ||
| 228 | #define VM_PAGE_QUERY_PAGE_EXTERNAL 0x80 | ||
| 229 | #define VM_PAGE_QUERY_PAGE_CS_VALIDATED 0x100 | ||
| 230 | #define VM_PAGE_QUERY_PAGE_CS_TAINTED 0x200 | ||
| 231 | #define VM_PAGE_QUERY_PAGE_CS_NX 0x400 | ||
| 232 | #define VM_PAGE_QUERY_PAGE_REUSABLE 0x800 | ||
| 233 | |||
| 234 | /* | ||
| 235 | * VM allocation flags: | ||
| 236 | * | ||
| 237 | * VM_FLAGS_FIXED | ||
| 238 | * (really the absence of VM_FLAGS_ANYWHERE) | ||
| 239 | *	Allocate new VM region at the specified virtual address, if possible. | ||
| 240 | * | ||
| 241 | * VM_FLAGS_ANYWHERE | ||
| 242 | *	Allocate new VM region anywhere it would fit in the address space. | ||
| 243 | * | ||
| 244 | * VM_FLAGS_PURGABLE | ||
| 245 | *	Create a purgable VM object for that new VM region. | ||
| 246 | * | ||
| 247 | * VM_FLAGS_4GB_CHUNK | ||
| 248 | *	The new VM region will be chunked up into 4GB sized pieces. | ||
| 249 | * | ||
| 250 | * VM_FLAGS_NO_PMAP_CHECK | ||
| 251 | *	(for DEBUG kernel config only, ignored for other configs) | ||
| 252 | *	Do not check that there is no stale pmap mapping for the new VM region. | ||
| 253 | *	This is useful for kernel memory allocations at bootstrap when building | ||
| 254 | *	the initial kernel address space while some memory is already in use. | ||
| 255 | * | ||
| 256 | * VM_FLAGS_OVERWRITE | ||
| 257 | *	The new VM region can replace existing VM regions if necessary | ||
| 258 | *	(to be used in combination with VM_FLAGS_FIXED). | ||
| 259 | * | ||
| 260 | * VM_FLAGS_NO_CACHE | ||
| 261 | *	Pages brought in to this VM region are placed on the speculative | ||
| 262 | *	queue instead of the active queue. In other words, they are not | ||
| 263 | *	cached so that they will be stolen first if memory runs low. | ||
| 264 | */ | ||
| 265 | |||
| 266 | #define VM_FLAGS_FIXED 0x0000 | ||
| 267 | #define VM_FLAGS_ANYWHERE 0x0001 | ||
| 268 | #define VM_FLAGS_PURGABLE 0x0002 | ||
| 269 | #define VM_FLAGS_4GB_CHUNK 0x0004 | ||
| 270 | #define VM_FLAGS_RANDOM_ADDR 0x0008 | ||
| 271 | #define VM_FLAGS_NO_CACHE 0x0010 | ||
| 272 | #define VM_FLAGS_RESILIENT_CODESIGN 0x0020 | ||
| 273 | #define VM_FLAGS_RESILIENT_MEDIA 0x0040 | ||
| 274 | #define VM_FLAGS_PERMANENT 0x0080 | ||
| 275 | #define VM_FLAGS_OVERWRITE 0x4000 /* delete any existing mappings first */ | ||
| 276 | /* | ||
| 277 | * VM_FLAGS_SUPERPAGE_MASK | ||
| 278 | *	3 bits that specify whether large pages should be used instead of | ||
| 279 | *	base pages (!=0), as well as the requested page size. | ||
| 280 | */ | ||
| 281 | #define VM_FLAGS_SUPERPAGE_MASK 0x70000 /* bits 0x10000, 0x20000, 0x40000 */ | ||
| 282 | #define VM_FLAGS_RETURN_DATA_ADDR 0x100000 /* Return address of target data, rather than base of page */ | ||
| 283 | #define VM_FLAGS_RETURN_4K_DATA_ADDR 0x800000 /* Return 4K aligned address of target data */ | ||
| 284 | #define VM_FLAGS_ALIAS_MASK 0xFF000000 | ||
| 285 | #define VM_GET_FLAGS_ALIAS(flags, alias) \ | ||
| 286 | 	 (alias) = ((flags) & VM_FLAGS_ALIAS_MASK) >> 24 | ||
| 287 | #define VM_SET_FLAGS_ALIAS(flags, alias) \ | ||
| 288 | 	 (flags) = (((flags) & ~VM_FLAGS_ALIAS_MASK) | \ | ||
| 289 | 	 (((alias) & ~VM_FLAGS_ALIAS_MASK) << 24)) | ||
| 290 | |||
| 291 | /* These are the flags that we accept from user-space */ | ||
| 292 | #define VM_FLAGS_USER_ALLOCATE (VM_FLAGS_FIXED | \ | ||
| 293 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 294 | 	 VM_FLAGS_PURGABLE | \ | ||
| 295 | 	 VM_FLAGS_4GB_CHUNK | \ | ||
| 296 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 297 | 	 VM_FLAGS_NO_CACHE | \ | ||
| 298 | 	 VM_FLAGS_PERMANENT | \ | ||
| 299 | 	 VM_FLAGS_OVERWRITE | \ | ||
| 300 | 	 VM_FLAGS_SUPERPAGE_MASK | \ | ||
| 301 | 	 VM_FLAGS_ALIAS_MASK) | ||
| 302 | #define VM_FLAGS_USER_MAP (VM_FLAGS_USER_ALLOCATE | \ | ||
| 303 | 	 VM_FLAGS_RETURN_4K_DATA_ADDR | \ | ||
| 304 | 	 VM_FLAGS_RETURN_DATA_ADDR) | ||
| 305 | #define VM_FLAGS_USER_REMAP (VM_FLAGS_FIXED | \ | ||
| 306 | 	 VM_FLAGS_ANYWHERE | \ | ||
| 307 | 	 VM_FLAGS_RANDOM_ADDR | \ | ||
| 308 | 	 VM_FLAGS_OVERWRITE| \ | ||
| 309 | 	 VM_FLAGS_RETURN_DATA_ADDR | \ | ||
| 310 | 	 VM_FLAGS_RESILIENT_CODESIGN | \ | ||
| 311 | 	 VM_FLAGS_RESILIENT_MEDIA) | ||
| 312 | |||
| 313 | #define VM_FLAGS_SUPERPAGE_SHIFT 16 | ||
| 314 | #define SUPERPAGE_NONE 0 /* no superpages, if all bits are 0 */ | ||
| 315 | #define SUPERPAGE_SIZE_ANY 1 | ||
| 316 | #define VM_FLAGS_SUPERPAGE_NONE (SUPERPAGE_NONE << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 317 | #define VM_FLAGS_SUPERPAGE_SIZE_ANY (SUPERPAGE_SIZE_ANY << VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 318 | #define SUPERPAGE_SIZE_2MB 2 | ||
| 319 | #define VM_FLAGS_SUPERPAGE_SIZE_2MB (SUPERPAGE_SIZE_2MB<<VM_FLAGS_SUPERPAGE_SHIFT) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * EXC_GUARD definitions for virtual memory. | ||
| 323 | */ | ||
| 324 | #define GUARD_TYPE_VIRT_MEMORY 0x5 | ||
| 325 | |||
| 326 | /* Reasons for exception for virtual memory */ | ||
| 327 | enum virtual_memory_guard_exception_codes { | ||
| 328 | 	kGUARD_EXC_DEALLOC_GAP = 1u << 0 | ||
| 329 | }; | ||
| 330 | |||
| 331 | |||
| 332 | /* current accounting postmark */ | ||
| 333 | #define __VM_LEDGER_ACCOUNTING_POSTMARK 2019032600 | ||
| 334 | |||
| 335 | /* discrete values: */ | ||
| 336 | #define VM_LEDGER_TAG_NONE 0x00000000 | ||
| 337 | #define VM_LEDGER_TAG_DEFAULT 0x00000001 | ||
| 338 | #define VM_LEDGER_TAG_NETWORK 0x00000002 | ||
| 339 | #define VM_LEDGER_TAG_MEDIA 0x00000003 | ||
| 340 | #define VM_LEDGER_TAG_GRAPHICS 0x00000004 | ||
| 341 | #define VM_LEDGER_TAG_NEURAL 0x00000005 | ||
| 342 | #define VM_LEDGER_TAG_MAX 0x00000005 | ||
| 343 | /* individual bits: */ | ||
| 344 | #define VM_LEDGER_FLAG_NO_FOOTPRINT (1 << 0) | ||
| 345 | #define VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG (1 << 1) | ||
| 346 | #define VM_LEDGER_FLAGS (VM_LEDGER_FLAG_NO_FOOTPRINT | VM_LEDGER_FLAG_NO_FOOTPRINT_FOR_DEBUG) | ||
| 347 | |||
| 348 | |||
| 349 | #define VM_MEMORY_MALLOC 1 | ||
| 350 | #define VM_MEMORY_MALLOC_SMALL 2 | ||
| 351 | #define VM_MEMORY_MALLOC_LARGE 3 | ||
| 352 | #define VM_MEMORY_MALLOC_HUGE 4 | ||
| 353 | #define VM_MEMORY_SBRK 5// uninteresting -- no one should call | ||
| 354 | #define VM_MEMORY_REALLOC 6 | ||
| 355 | #define VM_MEMORY_MALLOC_TINY 7 | ||
| 356 | #define VM_MEMORY_MALLOC_LARGE_REUSABLE 8 | ||
| 357 | #define VM_MEMORY_MALLOC_LARGE_REUSED 9 | ||
| 358 | |||
| 359 | #define VM_MEMORY_ANALYSIS_TOOL 10 | ||
| 360 | |||
| 361 | #define VM_MEMORY_MALLOC_NANO 11 | ||
| 362 | #define VM_MEMORY_MALLOC_MEDIUM 12 | ||
| 363 | #define VM_MEMORY_MALLOC_PGUARD 13 // Will be removed | ||
| 364 | #define VM_MEMORY_MALLOC_PROB_GUARD 13 | ||
| 365 | |||
| 366 | #define VM_MEMORY_MACH_MSG 20 | ||
| 367 | #define VM_MEMORY_IOKIT 21 | ||
| 368 | #define VM_MEMORY_STACK 30 | ||
| 369 | #define VM_MEMORY_GUARD 31 | ||
| 370 | #define VM_MEMORY_SHARED_PMAP 32 | ||
| 371 | /* memory containing a dylib */ | ||
| 372 | #define VM_MEMORY_DYLIB 33 | ||
| 373 | #define VM_MEMORY_OBJC_DISPATCHERS 34 | ||
| 374 | |||
| 375 | /* Was a nested pmap (VM_MEMORY_SHARED_PMAP) which has now been unnested */ | ||
| 376 | #define VM_MEMORY_UNSHARED_PMAP 35 | ||
| 377 | |||
| 378 | |||
| 379 | // Placeholders for now -- as we analyze the libraries and find how they | ||
| 380 | // use memory, we can make these labels more specific. | ||
| 381 | #define VM_MEMORY_APPKIT 40 | ||
| 382 | #define VM_MEMORY_FOUNDATION 41 | ||
| 383 | #define VM_MEMORY_COREGRAPHICS 42 | ||
| 384 | #define VM_MEMORY_CORESERVICES 43 | ||
| 385 | #define VM_MEMORY_CARBON VM_MEMORY_CORESERVICES | ||
| 386 | #define VM_MEMORY_JAVA 44 | ||
| 387 | #define VM_MEMORY_COREDATA 45 | ||
| 388 | #define VM_MEMORY_COREDATA_OBJECTIDS 46 | ||
| 389 | #define VM_MEMORY_ATS 50 | ||
| 390 | #define VM_MEMORY_LAYERKIT 51 | ||
| 391 | #define VM_MEMORY_CGIMAGE 52 | ||
| 392 | #define VM_MEMORY_TCMALLOC 53 | ||
| 393 | |||
| 394 | /* private raster data (i.e. layers, some images, QGL allocator) */ | ||
| 395 | #define VM_MEMORY_COREGRAPHICS_DATA 54 | ||
| 396 | |||
| 397 | /* shared image and font caches */ | ||
| 398 | #define VM_MEMORY_COREGRAPHICS_SHARED 55 | ||
| 399 | |||
| 400 | /* Memory used for virtual framebuffers, shadowing buffers, etc... */ | ||
| 401 | #define VM_MEMORY_COREGRAPHICS_FRAMEBUFFERS 56 | ||
| 402 | |||
| 403 | /* Window backing stores, custom shadow data, and compressed backing stores */ | ||
| 404 | #define VM_MEMORY_COREGRAPHICS_BACKINGSTORES 57 | ||
| 405 | |||
| 406 | /* x-alloc'd memory */ | ||
| 407 | #define VM_MEMORY_COREGRAPHICS_XALLOC 58 | ||
| 408 | |||
| 409 | /* catch-all for other uses, such as the read-only shared data page */ | ||
| 410 | #define VM_MEMORY_COREGRAPHICS_MISC VM_MEMORY_COREGRAPHICS | ||
| 411 | |||
| 412 | /* memory allocated by the dynamic loader for itself */ | ||
| 413 | #define VM_MEMORY_DYLD 60 | ||
| 414 | /* malloc'd memory created by dyld */ | ||
| 415 | #define VM_MEMORY_DYLD_MALLOC 61 | ||
| 416 | |||
| 417 | /* Used for sqlite page cache */ | ||
| 418 | #define VM_MEMORY_SQLITE 62 | ||
| 419 | |||
| 420 | /* JavaScriptCore heaps */ | ||
| 421 | #define VM_MEMORY_JAVASCRIPT_CORE 63 | ||
| 422 | #define VM_MEMORY_WEBASSEMBLY VM_MEMORY_JAVASCRIPT_CORE | ||
| 423 | /* memory allocated for the JIT */ | ||
| 424 | #define VM_MEMORY_JAVASCRIPT_JIT_EXECUTABLE_ALLOCATOR 64 | ||
| 425 | #define VM_MEMORY_JAVASCRIPT_JIT_REGISTER_FILE 65 | ||
| 426 | |||
| 427 | /* memory allocated for GLSL */ | ||
| 428 | #define VM_MEMORY_GLSL 66 | ||
| 429 | |||
| 430 | /* memory allocated for OpenCL.framework */ | ||
| 431 | #define VM_MEMORY_OPENCL 67 | ||
| 432 | |||
| 433 | /* memory allocated for QuartzCore.framework */ | ||
| 434 | #define VM_MEMORY_COREIMAGE 68 | ||
| 435 | |||
| 436 | /* memory allocated for WebCore Purgeable Buffers */ | ||
| 437 | #define VM_MEMORY_WEBCORE_PURGEABLE_BUFFERS 69 | ||
| 438 | |||
| 439 | /* ImageIO memory */ | ||
| 440 | #define VM_MEMORY_IMAGEIO 70 | ||
| 441 | |||
| 442 | /* CoreProfile memory */ | ||
| 443 | #define VM_MEMORY_COREPROFILE 71 | ||
| 444 | |||
| 445 | /* assetsd / MobileSlideShow memory */ | ||
| 446 | #define VM_MEMORY_ASSETSD 72 | ||
| 447 | |||
| 448 | /* libsystem_kernel os_once_alloc */ | ||
| 449 | #define VM_MEMORY_OS_ALLOC_ONCE 73 | ||
| 450 | |||
| 451 | /* libdispatch internal allocator */ | ||
| 452 | #define VM_MEMORY_LIBDISPATCH 74 | ||
| 453 | |||
| 454 | /* Accelerate.framework image backing stores */ | ||
| 455 | #define VM_MEMORY_ACCELERATE 75 | ||
| 456 | |||
| 457 | /* CoreUI image block data */ | ||
| 458 | #define VM_MEMORY_COREUI 76 | ||
| 459 | |||
| 460 | /* CoreUI image file */ | ||
| 461 | #define VM_MEMORY_COREUIFILE 77 | ||
| 462 | |||
| 463 | /* Genealogy buffers */ | ||
| 464 | #define VM_MEMORY_GENEALOGY 78 | ||
| 465 | |||
| 466 | /* RawCamera VM allocated memory */ | ||
| 467 | #define VM_MEMORY_RAWCAMERA 79 | ||
| 468 | |||
| 469 | /* corpse info for dead process */ | ||
| 470 | #define VM_MEMORY_CORPSEINFO 80 | ||
| 471 | |||
| 472 | /* Apple System Logger (ASL) messages */ | ||
| 473 | #define VM_MEMORY_ASL 81 | ||
| 474 | |||
| 475 | /* Swift runtime */ | ||
| 476 | #define VM_MEMORY_SWIFT_RUNTIME 82 | ||
| 477 | |||
| 478 | /* Swift metadata */ | ||
| 479 | #define VM_MEMORY_SWIFT_METADATA 83 | ||
| 480 | |||
| 481 | /* DHMM data */ | ||
| 482 | #define VM_MEMORY_DHMM 84 | ||
| 483 | |||
| 484 | |||
| 485 | /* memory allocated by SceneKit.framework */ | ||
| 486 | #define VM_MEMORY_SCENEKIT 86 | ||
| 487 | |||
| 488 | /* memory allocated by skywalk networking */ | ||
| 489 | #define VM_MEMORY_SKYWALK 87 | ||
| 490 | |||
| 491 | #define VM_MEMORY_IOSURFACE 88 | ||
| 492 | |||
| 493 | #define VM_MEMORY_LIBNETWORK 89 | ||
| 494 | |||
| 495 | #define VM_MEMORY_AUDIO 90 | ||
| 496 | |||
| 497 | #define VM_MEMORY_VIDEOBITSTREAM 91 | ||
| 498 | |||
| 499 | /* memory allocated by CoreMedia */ | ||
| 500 | #define VM_MEMORY_CM_XPC 92 | ||
| 501 | |||
| 502 | #define VM_MEMORY_CM_RPC 93 | ||
| 503 | |||
| 504 | #define VM_MEMORY_CM_MEMORYPOOL 94 | ||
| 505 | |||
| 506 | #define VM_MEMORY_CM_READCACHE 95 | ||
| 507 | |||
| 508 | #define VM_MEMORY_CM_CRABS 96 | ||
| 509 | |||
| 510 | /* memory allocated for QuickLookThumbnailing */ | ||
| 511 | #define VM_MEMORY_QUICKLOOK_THUMBNAILS 97 | ||
| 512 | |||
| 513 | /* memory allocated by Accounts framework */ | ||
| 514 | #define VM_MEMORY_ACCOUNTS 98 | ||
| 515 | |||
| 516 | /* memory allocated by Sanitizer runtime libraries */ | ||
| 517 | #define VM_MEMORY_SANITIZER 99 | ||
| 518 | |||
| 519 | /* Differentiate memory needed by GPU drivers and frameworks from generic IOKit allocations */ | ||
| 520 | #define VM_MEMORY_IOACCELERATOR 100 | ||
| 521 | |||
| 522 | /* memory allocated by CoreMedia for global image registration of frames */ | ||
| 523 | #define VM_MEMORY_CM_REGWARP 101 | ||
| 524 | |||
| 525 | /* memory allocated by EmbeddedAcousticRecognition for speech decoder */ | ||
| 526 | #define VM_MEMORY_EAR_DECODER 102 | ||
| 527 | |||
| 528 | /* CoreUI cached image data */ | ||
| 529 | #define VM_MEMORY_COREUI_CACHED_IMAGE_DATA 103 | ||
| 530 | |||
| 531 | /* ColorSync is using mmap for read-only copies of ICC profile data */ | ||
| 532 | #define VM_MEMORY_COLORSYNC 104 | ||
| 533 | |||
| 534 | /* Reserve 230-239 for Rosetta */ | ||
| 535 | #define VM_MEMORY_ROSETTA 230 | ||
| 536 | #define VM_MEMORY_ROSETTA_THREAD_CONTEXT 231 | ||
| 537 | #define VM_MEMORY_ROSETTA_INDIRECT_BRANCH_MAP 232 | ||
| 538 | #define VM_MEMORY_ROSETTA_RETURN_STACK 233 | ||
| 539 | #define VM_MEMORY_ROSETTA_EXECUTABLE_HEAP 234 | ||
| 540 | #define VM_MEMORY_ROSETTA_USER_LDT 235 | ||
| 541 | #define VM_MEMORY_ROSETTA_ARENA 236 | ||
| 542 | #define VM_MEMORY_ROSETTA_10 239 | ||
| 543 | |||
| 544 | /* Reserve 240-255 for application */ | ||
| 545 | #define VM_MEMORY_APPLICATION_SPECIFIC_1 240 | ||
| 546 | #define VM_MEMORY_APPLICATION_SPECIFIC_16 255 | ||
| 547 | |||
| 548 | #define VM_MAKE_TAG(tag) ((tag) << 24) | ||
| 549 | |||
| 550 | |||
| 551 | |||
| 552 | #ifdef __cplusplus | ||
| 553 | } | ||
| 554 | #endif | ||
| 555 | |||
| 556 | #endif /* _MACH_VM_STATISTICS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach/vm_types.h deleted-98| ... | @@ -1,98 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | * | ||
| 31 | */ | ||
| 32 | #ifndef _MACH_VM_TYPES_H_ | ||
| 33 | #define _MACH_VM_TYPES_H_ | ||
| 34 | |||
| 35 | #include <mach/port.h> | ||
| 36 | #include <mach/machine/vm_types.h> | ||
| 37 | |||
| 38 | #include <stdint.h> | ||
| 39 | #include <sys/cdefs.h> | ||
| 40 | |||
| 41 | typedef vm_offset_t pointer_t __kernel_ptr_semantics; | ||
| 42 | typedef vm_offset_t vm_address_t __kernel_ptr_semantics; | ||
| 43 | |||
| 44 | /* | ||
| 45 | * We use addr64_t for 64-bit addresses that are used on both | ||
| 46 | * 32 and 64-bit machines. On PPC, they are passed and returned as | ||
| 47 | * two adjacent 32-bit GPRs. We use addr64_t in places where | ||
| 48 | * common code must be useable both on 32 and 64-bit machines. | ||
| 49 | */ | ||
| 50 | typedef uint64_t addr64_t; /* Basic effective address */ | ||
| 51 | |||
| 52 | /* | ||
| 53 | * We use reg64_t for addresses that are 32 bits on a 32-bit | ||
| 54 | * machine, and 64 bits on a 64-bit machine, but are always | ||
| 55 | * passed and returned in a single GPR on PPC. This type | ||
| 56 | * cannot be used in generic 32-bit c, since on a 64-bit | ||
| 57 | * machine the upper half of the register will be ignored | ||
| 58 | * by the c compiler in 32-bit mode. In c, we can only use the | ||
| 59 | * type in prototypes of functions that are written in and called | ||
| 60 | * from assembly language. This type is basically a comment. | ||
| 61 | */ | ||
| 62 | typedef uint32_t reg64_t; | ||
| 63 | |||
| 64 | /* | ||
| 65 | * To minimize the use of 64-bit fields, we keep some physical | ||
| 66 | * addresses (that are page aligned) as 32-bit page numbers. | ||
| 67 | * This limits the physical address space to 16TB of RAM. | ||
| 68 | */ | ||
| 69 | typedef uint32_t ppnum_t; /* Physical page number */ | ||
| 70 | #define PPNUM_MAX UINT32_MAX | ||
| 71 | |||
| 72 | |||
| 73 | |||
| 74 | typedef mach_port_t vm_map_t, vm_map_read_t, vm_map_inspect_t; | ||
| 75 | |||
| 76 | |||
| 77 | #define VM_MAP_NULL ((vm_map_t) 0) | ||
| 78 | #define VM_MAP_INSPECT_NULL ((vm_map_inspect_t) 0) | ||
| 79 | #define VM_MAP_READ_NULL ((vm_map_read_t) 0) | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Evolving definitions, likely to change. | ||
| 83 | */ | ||
| 84 | |||
| 85 | typedef uint64_t vm_object_offset_t; | ||
| 86 | typedef uint64_t vm_object_size_t; | ||
| 87 | |||
| 88 | |||
| 89 | |||
| 90 | |||
| 91 | typedef mach_port_t upl_t; | ||
| 92 | typedef mach_port_t vm_named_entry_t; | ||
| 93 | |||
| 94 | |||
| 95 | #define UPL_NULL ((upl_t) 0) | ||
| 96 | #define VM_NAMED_ENTRY_NULL ((vm_named_entry_t) 0) | ||
| 97 | |||
| 98 | #endif /* _MACH_VM_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/mach_debug/mach_debug_types.h deleted-199| ... | @@ -1,199 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	Mach kernel debugging interface type declarations | ||
| 60 | */ | ||
| 61 | |||
| 62 | #ifndef _MACH_DEBUG_MACH_DEBUG_TYPES_H_ | ||
| 63 | #define _MACH_DEBUG_MACH_DEBUG_TYPES_H_ | ||
| 64 | |||
| 65 | #include <mach_debug/ipc_info.h> | ||
| 66 | #include <mach_debug/vm_info.h> | ||
| 67 | #include <mach_debug/zone_info.h> | ||
| 68 | #include <mach_debug/page_info.h> | ||
| 69 | #include <mach_debug/hash_info.h> | ||
| 70 | #include <mach_debug/lockgroup_info.h> | ||
| 71 | |||
| 72 | #define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL | ||
| 73 | #define MACH_CORE_FILEHEADER_V2_SIGNATURE 0x63614d2073736f42ULL | ||
| 74 | #define MACH_CORE_FILEHEADER_MAXFILES 16 | ||
| 75 | #define MACH_CORE_FILEHEADER_NAMELEN 16 | ||
| 76 | |||
| 77 | /* The following are defined for mach_core_fileheader_v2 */ | ||
| 78 | #define MACH_CORE_FILEHEADER_V2_FLAG_LOG_ENCRYPTED_AEA (1ULL << 0) /* The log is encrypted using AEA */ | ||
| 79 | #define MACH_CORE_FILEHEADER_V2_FLAG_EXISTING_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 8) /* The public key is an NIST-P256 ECC key */ | ||
| 80 | #define MACH_CORE_FILEHEADER_V2_FLAG_NEXT_COREFILE_KEY_FORMAT_NIST_P256 (1ULL << 16) /* The next public key is an NIST-P256 ECC key */ | ||
| 81 | |||
| 82 | #define MACH_CORE_FILEHEADER_V2_FLAGS_EXISTING_COREFILE_KEY_FORMAT_MASK (0x1ULL << 8) /* A bit-mask for all supported key formats */ | ||
| 83 | #define MACH_CORE_FILEHEADER_V2_FLAGS_NEXT_COREFILE_KEY_FORMAT_MASK (0x1ULL << 16) /* A bit-mask for all supported next key formats */ | ||
| 84 | |||
| 85 | #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) | ||
| 86 | |||
| 87 | /* The following are defined for mach_core_details_v2 */ | ||
| 88 | #define MACH_CORE_DETAILS_V2_FLAG_ENCRYPTED_AEA (1ULL << 0) /* This core is encrypted using AEA */ | ||
| 89 | #define MACH_CORE_DETAILS_V2_FLAG_COMPRESSED_ZLIB (1ULL << 8) /* This core is compressed using ZLib */ | ||
| 90 | |||
| 91 | typedef char symtab_name_t[32]; | ||
| 92 | |||
| 93 | /* | ||
| 94 | *********************** | ||
| 95 | * | ||
| 96 | * Mach corefile layout | ||
| 97 | * | ||
| 98 | *********************** | ||
| 99 | * | ||
| 100 | * uint64_t signature | ||
| 101 | * uint64_t log_offset >---+ | ||
| 102 | * uint64_t log_length | | ||
| 103 | * mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES] | | ||
| 104 | * |--> uint64_t gzip_offset >---+ | | ||
| 105 | * | uint64_t gzip_length | | | ||
| 106 | * | char core_name[] | | | ||
| 107 | * |--> uint64_t gzip_offset >---+ | | | ||
| 108 | * | uint64_t gzip_length | | | | ||
| 109 | * | char core_name[] | | | | ||
| 110 | * |--> [...] | | | | ||
| 111 | * [log data. Plain-text] | | <---+ | ||
| 112 | * [core #1 data. Zlib compressed] | <---+ | ||
| 113 | * [core #2 data. Zlib compressed] <---+ | ||
| 114 | * [core #x data...] | ||
| 115 | */ | ||
| 116 | |||
| 117 | struct mach_core_details { | ||
| 118 | 	uint64_t gzip_offset; | ||
| 119 | 	uint64_t gzip_length; | ||
| 120 | 	char core_name[MACH_CORE_FILEHEADER_NAMELEN]; | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct mach_core_fileheader { | ||
| 124 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_SIGNATURE */ | ||
| 125 | 	uint64_t log_offset; | ||
| 126 | 	uint64_t log_length; | ||
| 127 | 	uint64_t num_files; | ||
| 128 | 	struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES]; | ||
| 129 | }; | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Mach corefile V2 headers are denoted with MACH_CORE_FILEHEADER_V2_SIGNATURE. | ||
| 133 | * Note that the V2 headers contain a version field that further indicates the version of the | ||
| 134 | * header's contents. For example, if a V2 header's 'version' field indicates version 5, then | ||
| 135 | * the header follows the format of the 'mach_core_fileheader_v5' structure. | ||
| 136 | * | ||
| 137 | * Further note that 'mach_core_details_' structures are not bound to the same versioning scheme | ||
| 138 | * as the header itself. This means that it's perfectly acceptable for a 'mach_core_fileheader_v5' header | ||
| 139 | * to make use of 'mach_core_details_v2' | ||
| 140 | * | ||
| 141 | ************************** | ||
| 142 | * | ||
| 143 | * Mach corefile layout V2 (using a version 2 header struct as an example) | ||
| 144 | * | ||
| 145 | ************************** | ||
| 146 | * | ||
| 147 | * uint64_t signature | ||
| 148 | * uint32_t version | ||
| 149 | * uint64_t flags | ||
| 150 | * uint64_t pub_key_offset >---+ | ||
| 151 | * uint16_t pub_key_length | | ||
| 152 | * uint64_t log_offset >---+ | | ||
| 153 | * uint64_t log_length | | | ||
| 154 | * uint64_t num_files | | | ||
| 155 | * mach_core_details_v2 files[] | | | ||
| 156 | * |--> uint64_t flags | | | ||
| 157 | * | uint64_t offset >---+ | | | ||
| 158 | * | uint64_t length | | | | ||
| 159 | * | char core_name[] | | | | ||
| 160 | * |--> uint64_t flags | | | | ||
| 161 | * | uint64_t offset >---+ | | | | ||
| 162 | * | uint64_t length | | | | | ||
| 163 | * | char core_name[] | | | | | ||
| 164 | * |--> [...] | | | | | ||
| 165 | * [public key data] | | | <---+ | ||
| 166 | * [log data. Plain-text or an AEA container] | | <---+ | ||
| 167 | * [core #1 data. Zlib compressed. Possibly in an AEA container] | <---+ | ||
| 168 | * [core #2 data. Zlib compressed. Possibly in an AEA container] <---+ | ||
| 169 | * [core #x data...] | ||
| 170 | */ | ||
| 171 | |||
| 172 | struct mach_core_details_v2 { | ||
| 173 | 	uint64_t flags; /* See the MACH_CORE_DETAILS_V2_FLAG_* definitions */ | ||
| 174 | 	uint64_t offset; | ||
| 175 | 	uint64_t length; | ||
| 176 | 	char core_name[MACH_CORE_FILEHEADER_NAMELEN]; | ||
| 177 | }; | ||
| 178 | |||
| 179 | struct mach_core_fileheader_base { | ||
| 180 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */ | ||
| 181 | 	uint32_t version; | ||
| 182 | }; | ||
| 183 | |||
| 184 | struct mach_core_fileheader_v2 { | ||
| 185 | 	uint64_t signature; /* MACH_CORE_FILEHEADER_V2_SIGNATURE */ | ||
| 186 | 	uint32_t version; /* 2 */ | ||
| 187 | 	uint64_t flags; /* See the MACH_CORE_FILEHEADER_V2_FLAG_* definitions */ | ||
| 188 | 	uint64_t pub_key_offset; /* Offset of the public key */ | ||
| 189 | 	uint16_t pub_key_length; /* Length of the public key */ | ||
| 190 | 	uint64_t log_offset; | ||
| 191 | 	uint64_t log_length; | ||
| 192 | 	uint64_t num_files; | ||
| 193 | 	struct mach_core_details_v2 files[]; | ||
| 194 | }; | ||
| 195 | |||
| 196 | #define KOBJECT_DESCRIPTION_LENGTH 512 | ||
| 197 | typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH]; | ||
| 198 | |||
| 199 | #endif /* _MACH_DEBUG_MACH_DEBUG_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/machine/_mcontext.h deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2003-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _BSD_MACHINE__MCONTEXT_H_ | ||
| 29 | #define _BSD_MACHINE__MCONTEXT_H_ | ||
| 30 | |||
| 31 | #if defined (__i386__) || defined (__x86_64__) | ||
| 32 | #include "i386/_mcontext.h" | ||
| 33 | #elif defined (__arm__) || defined (__arm64__) | ||
| 34 | #include "arm/_mcontext.h" | ||
| 35 | #else | ||
| 36 | #error architecture not supported | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #endif /* _BSD_MACHINE__MCONTEXT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/machine/_param.h deleted-39| ... | @@ -1,39 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2004-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _BSD_MACHINE__PARAM_H_ | ||
| 29 | #define _BSD_MACHINE__PARAM_H_ | ||
| 30 | |||
| 31 | #if defined (__i386__) || defined (__x86_64__) | ||
| 32 | #include <i386/_param.h> | ||
| 33 | #elif defined (__arm__) || defined (__arm64__) | ||
| 34 | #include <arm/_param.h> | ||
| 35 | #else | ||
| 36 | #error architecture not supported | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #endif /* _BSD_MACHINE__PARAM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/machine/limits.h deleted-16| ... | @@ -1,16 +0,0 @@ | ||
| 1 | /* This is the `system' limits.h, independent of any particular | ||
| 2 | * compiler. GCC provides its own limits.h which can be found in | ||
| 3 | * /usr/lib/gcc, although it is not very informative. | ||
| 4 | * This file is public domain. */ | ||
| 5 | #ifndef _BSD_MACHINE_LIMITS_H_ | ||
| 6 | #define _BSD_MACHINE_LIMITS_H_ | ||
| 7 | |||
| 8 | #if defined (__i386__) || defined(__x86_64__) | ||
| 9 | #include <i386/limits.h> | ||
| 10 | #elif defined (__arm__) || defined (__arm64__) | ||
| 11 | #include <arm/limits.h> | ||
| 12 | #else | ||
| 13 | #error architecture not supported | ||
| 14 | #endif | ||
| 15 | |||
| 16 | #endif /* _BSD_MACHINE_LIMITS_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/malloc/malloc.h deleted-341| ... | @@ -1,341 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999 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 _MALLOC_MALLOC_H_ | ||
| 25 | #define _MALLOC_MALLOC_H_ | ||
| 26 | |||
| 27 | #include <stddef.h> | ||
| 28 | #include <mach/mach_types.h> | ||
| 29 | #include <sys/cdefs.h> | ||
| 30 | #include <Availability.h> | ||
| 31 | |||
| 32 | #if __has_feature(ptrauth_calls) | ||
| 33 | #include <ptrauth.h> | ||
| 34 | |||
| 35 | // Zone function pointer, type-diversified but not address-diversified (because | ||
| 36 | // the zone can be copied). Process-independent because the zone structure may | ||
| 37 | // be in the shared library cache. | ||
| 38 | #define MALLOC_ZONE_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 39 | 		FALSE, ptrauth_string_discriminator("malloc_zone_fn." #fn)) fn | ||
| 40 | |||
| 41 | // Introspection function pointer, address- and type-diversified. | ||
| 42 | // Process-independent because the malloc_introspection_t structure that contains | ||
| 43 | // these pointers may be in the shared library cache. | ||
| 44 | #define MALLOC_INTROSPECT_FN_PTR(fn) __ptrauth(ptrauth_key_process_independent_code, \ | ||
| 45 | 		TRUE, ptrauth_string_discriminator("malloc_introspect_fn." #fn)) fn | ||
| 46 | |||
| 47 | // Pointer to the introspection pointer table, type-diversified but not | ||
| 48 | // address-diversified (because the zone can be copied). | ||
| 49 | // Process-independent because the table pointer may be in the shared library cache. | ||
| 50 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) __ptrauth(ptrauth_key_process_independent_data,\ | ||
| 51 | 		FALSE, ptrauth_string_discriminator("malloc_introspect_tbl")) ptr | ||
| 52 | |||
| 53 | #endif	// __has_feature(ptrauth_calls) | ||
| 54 | |||
| 55 | #ifndef MALLOC_ZONE_FN_PTR | ||
| 56 | #define MALLOC_ZONE_FN_PTR(fn) fn | ||
| 57 | #define MALLOC_INTROSPECT_FN_PTR(fn) fn | ||
| 58 | #define MALLOC_INTROSPECT_TBL_PTR(ptr) ptr | ||
| 59 | #endif // MALLOC_ZONE_FN_PTR | ||
| 60 | |||
| 61 | __BEGIN_DECLS | ||
| 62 | /*********	Type definitions	************/ | ||
| 63 | |||
| 64 | typedef struct _malloc_zone_t { | ||
| 65 | /* Only zone implementors should depend on the layout of this structure; | ||
| 66 | Regular callers should use the access functions below */ | ||
| 67 | void	*reserved1;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 68 | void	*reserved2;	/* RESERVED FOR CFAllocator DO NOT USE */ | ||
| 69 | size_t 	(* MALLOC_ZONE_FN_PTR(size))(struct _malloc_zone_t *zone, const void *ptr); /* returns the size of a block or 0 if not in this zone; must be fast, especially for negative answers */ | ||
| 70 | void 	*(* MALLOC_ZONE_FN_PTR(malloc))(struct _malloc_zone_t *zone, size_t size); | ||
| 71 | void 	*(* MALLOC_ZONE_FN_PTR(calloc))(struct _malloc_zone_t *zone, size_t num_items, size_t size); /* same as malloc, but block returned is set to zero */ | ||
| 72 | void 	*(* MALLOC_ZONE_FN_PTR(valloc))(struct _malloc_zone_t *zone, size_t size); /* same as malloc, but block returned is set to zero and is guaranteed to be page aligned */ | ||
| 73 | void 	(* MALLOC_ZONE_FN_PTR(free))(struct _malloc_zone_t *zone, void *ptr); | ||
| 74 | void 	*(* MALLOC_ZONE_FN_PTR(realloc))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 75 | void 	(* MALLOC_ZONE_FN_PTR(destroy))(struct _malloc_zone_t *zone); /* zone is destroyed and all memory reclaimed */ | ||
| 76 | const char	*zone_name; | ||
| 77 | |||
| 78 | /* Optional batch callbacks; these may be NULL */ | ||
| 79 | unsigned	(* MALLOC_ZONE_FN_PTR(batch_malloc))(struct _malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); /* given a size, returns pointers capable of holding that size; returns the number of pointers allocated (maybe 0 or less than num_requested) */ | ||
| 80 | void	(* MALLOC_ZONE_FN_PTR(batch_free))(struct _malloc_zone_t *zone, void **to_be_freed, unsigned num_to_be_freed); /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process */ | ||
| 81 | |||
| 82 | struct malloc_introspection_t	* MALLOC_INTROSPECT_TBL_PTR(introspect); | ||
| 83 | unsigned	version; | ||
| 84 | 	 | ||
| 85 | /* aligned memory allocation. The callback may be NULL. Present in version >= 5. */ | ||
| 86 | void *(* MALLOC_ZONE_FN_PTR(memalign))(struct _malloc_zone_t *zone, size_t alignment, size_t size); | ||
| 87 | |||
| 88 | /* free a pointer known to be in zone and known to have the given size. The callback may be NULL. Present in version >= 6.*/ | ||
| 89 | void (* MALLOC_ZONE_FN_PTR(free_definite_size))(struct _malloc_zone_t *zone, void *ptr, size_t size); | ||
| 90 | |||
| 91 | /* Empty out caches in the face of memory pressure. The callback may be NULL. Present in version >= 8. */ | ||
| 92 | size_t 	(* MALLOC_ZONE_FN_PTR(pressure_relief))(struct _malloc_zone_t *zone, size_t goal); | ||
| 93 | |||
| 94 | 	/* | ||
| 95 | 	 * Checks whether an address might belong to the zone. May be NULL. Present in version >= 10. | ||
| 96 | 	 * False positives are allowed (e.g. the pointer was freed, or it's in zone space that has | ||
| 97 | 	 * not yet been allocated. False negatives are not allowed. | ||
| 98 | 	 */ | ||
| 99 | boolean_t (* MALLOC_ZONE_FN_PTR(claimed_address))(struct _malloc_zone_t *zone, void *ptr); | ||
| 100 | } malloc_zone_t; | ||
| 101 | |||
| 102 | /*********	Creation and destruction	************/ | ||
| 103 | |||
| 104 | extern malloc_zone_t *malloc_default_zone(void); | ||
| 105 | /* The initial zone */ | ||
| 106 | |||
| 107 | extern malloc_zone_t *malloc_create_zone(vm_size_t start_size, unsigned flags); | ||
| 108 | /* Creates a new zone with default behavior and registers it */ | ||
| 109 | |||
| 110 | extern void malloc_destroy_zone(malloc_zone_t *zone); | ||
| 111 | /* Destroys zone and everything it allocated */ | ||
| 112 | |||
| 113 | /*********	Block creation and manipulation	************/ | ||
| 114 | |||
| 115 | extern void *malloc_zone_malloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 116 | /* Allocates a new pointer of size size; zone must be non-NULL */ | ||
| 117 | |||
| 118 | extern void *malloc_zone_calloc(malloc_zone_t *zone, size_t num_items, size_t size) __alloc_size(2,3); | ||
| 119 | /* Allocates a new pointer of size num_items * size; block is cleared; zone must be non-NULL */ | ||
| 120 | |||
| 121 | extern void *malloc_zone_valloc(malloc_zone_t *zone, size_t size) __alloc_size(2); | ||
| 122 | /* Allocates a new pointer of size size; zone must be non-NULL; Pointer is guaranteed to be page-aligned and block is cleared */ | ||
| 123 | |||
| 124 | extern void malloc_zone_free(malloc_zone_t *zone, void *ptr); | ||
| 125 | /* Frees pointer in zone; zone must be non-NULL */ | ||
| 126 | |||
| 127 | extern void *malloc_zone_realloc(malloc_zone_t *zone, void *ptr, size_t size) __alloc_size(3); | ||
| 128 | /* Enlarges block if necessary; zone must be non-NULL */ | ||
| 129 | |||
| 130 | extern malloc_zone_t *malloc_zone_from_ptr(const void *ptr); | ||
| 131 | /* Returns the zone for a pointer, or NULL if not in any zone. | ||
| 132 | The ptr must have been returned from a malloc or realloc call. */ | ||
| 133 | |||
| 134 | extern size_t malloc_size(const void *ptr); | ||
| 135 | /* Returns size of given ptr */ | ||
| 136 | |||
| 137 | extern size_t malloc_good_size(size_t size); | ||
| 138 | /* Returns number of bytes greater than or equal to size that can be allocated without padding */ | ||
| 139 | |||
| 140 | extern void *malloc_zone_memalign(malloc_zone_t *zone, size_t alignment, size_t size) __alloc_size(3) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 141 | /* | ||
| 142 | * Allocates a new pointer of size size whose address is an exact multiple of alignment. | ||
| 143 | * alignment must be a power of two and at least as large as sizeof(void *). | ||
| 144 | * zone must be non-NULL. | ||
| 145 | */ | ||
| 146 | |||
| 147 | /*********	Batch methods	************/ | ||
| 148 | |||
| 149 | extern unsigned malloc_zone_batch_malloc(malloc_zone_t *zone, size_t size, void **results, unsigned num_requested); | ||
| 150 | /* Allocates num blocks of the same size; Returns the number truly allocated (may be 0) */ | ||
| 151 | |||
| 152 | extern void malloc_zone_batch_free(malloc_zone_t *zone, void **to_be_freed, unsigned num); | ||
| 153 | /* frees all the pointers in to_be_freed; note that to_be_freed may be overwritten during the process; This function will always free even if the zone has no batch callback */ | ||
| 154 | |||
| 155 | /*********	Functions for libcache	************/ | ||
| 156 | |||
| 157 | extern malloc_zone_t *malloc_default_purgeable_zone(void) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 158 | /* Returns a pointer to the default purgeable_zone. */ | ||
| 159 | |||
| 160 | extern void malloc_make_purgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 161 | /* Make an allocation from the purgeable zone purgeable if possible. */ | ||
| 162 | |||
| 163 | extern int malloc_make_nonpurgeable(void *ptr) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 164 | /* Makes an allocation from the purgeable zone nonpurgeable. | ||
| 165 | * Returns zero if the contents were not purged since the last | ||
| 166 | * call to malloc_make_purgeable, else returns non-zero. */ | ||
| 167 | |||
| 168 | /*********	Functions for zone implementors	************/ | ||
| 169 | |||
| 170 | extern void malloc_zone_register(malloc_zone_t *zone); | ||
| 171 | /* Registers a custom malloc zone; Should typically be called after a | ||
| 172 | * malloc_zone_t has been filled in with custom methods by a client. See | ||
| 173 | * malloc_create_zone for creating additional malloc zones with the | ||
| 174 | * default allocation and free behavior. */ | ||
| 175 | |||
| 176 | extern void malloc_zone_unregister(malloc_zone_t *zone); | ||
| 177 | /* De-registers a zone | ||
| 178 | Should typically be called before calling the zone destruction routine */ | ||
| 179 | |||
| 180 | extern void malloc_set_zone_name(malloc_zone_t *zone, const char *name); | ||
| 181 | /* Sets the name of a zone */ | ||
| 182 | |||
| 183 | extern const char *malloc_get_zone_name(malloc_zone_t *zone); | ||
| 184 | /* Returns the name of a zone */ | ||
| 185 | |||
| 186 | size_t malloc_zone_pressure_relief(malloc_zone_t *zone, size_t goal) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 187 | /* malloc_zone_pressure_relief() advises the malloc subsystem that the process is under memory pressure and | ||
| 188 | * that the subsystem should make its best effort towards releasing (i.e. munmap()-ing) "goal" bytes from "zone". | ||
| 189 | * If "goal" is passed as zero, the malloc subsystem will attempt to achieve maximal pressure relief in "zone". | ||
| 190 | * If "zone" is passed as NULL, all zones are examined for pressure relief opportunities. | ||
| 191 | * malloc_zone_pressure_relief() returns the number of bytes released. | ||
| 192 | */ | ||
| 193 | |||
| 194 | typedef struct { | ||
| 195 | vm_address_t	address; | ||
| 196 | vm_size_t		size; | ||
| 197 | } vm_range_t; | ||
| 198 | |||
| 199 | typedef struct malloc_statistics_t { | ||
| 200 | unsigned	blocks_in_use; | ||
| 201 | size_t	size_in_use; | ||
| 202 | size_t	max_size_in_use;	/* high water mark of touched memory */ | ||
| 203 | size_t	size_allocated;		/* reserved in memory */ | ||
| 204 | } malloc_statistics_t; | ||
| 205 | |||
| 206 | typedef kern_return_t memory_reader_t(task_t remote_task, vm_address_t remote_address, vm_size_t size, void **local_memory); | ||
| 207 | /* given a task, "reads" the memory at the given address and size | ||
| 208 | local_memory: set to a contiguous chunk of memory; validity of local_memory is assumed to be limited (until next call) */ | ||
| 209 | |||
| 210 | #define MALLOC_PTR_IN_USE_RANGE_TYPE	1	/* for allocated pointers */ | ||
| 211 | #define MALLOC_PTR_REGION_RANGE_TYPE	2	/* for region containing pointers */ | ||
| 212 | #define MALLOC_ADMIN_REGION_RANGE_TYPE	4	/* for region used internally */ | ||
| 213 | #define MALLOC_ZONE_SPECIFIC_FLAGS	0xff00	/* bits reserved for zone-specific purposes */ | ||
| 214 | |||
| 215 | typedef void vm_range_recorder_t(task_t, void *, unsigned type, vm_range_t *, unsigned); | ||
| 216 | /* given a task and context, "records" the specified addresses */ | ||
| 217 | |||
| 218 | /* Print function for the print_task() operation. */ | ||
| 219 | typedef void print_task_printer_t(const char *fmt, ...) __printflike(1,2); | ||
| 220 | |||
| 221 | typedef struct malloc_introspection_t { | ||
| 222 | 	kern_return_t (* MALLOC_INTROSPECT_FN_PTR(enumerator))(task_t task, void *, unsigned type_mask, vm_address_t zone_address, memory_reader_t reader, vm_range_recorder_t recorder); /* enumerates all the malloc pointers in use */ | ||
| 223 | 	size_t	(* MALLOC_INTROSPECT_FN_PTR(good_size))(malloc_zone_t *zone, size_t size); | ||
| 224 | 	boolean_t 	(* MALLOC_INTROSPECT_FN_PTR(check))(malloc_zone_t *zone); /* Consistency checker */ | ||
| 225 | 	void 	(* MALLOC_INTROSPECT_FN_PTR(print))(malloc_zone_t *zone, boolean_t verbose); /* Prints zone */ | ||
| 226 | 	void	(* MALLOC_INTROSPECT_FN_PTR(log))(malloc_zone_t *zone, void *address); /* Enables logging of activity */ | ||
| 227 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_lock))(malloc_zone_t *zone); /* Forces locking zone */ | ||
| 228 | 	void	(* MALLOC_INTROSPECT_FN_PTR(force_unlock))(malloc_zone_t *zone); /* Forces unlocking zone */ | ||
| 229 | 	void	(* MALLOC_INTROSPECT_FN_PTR(statistics))(malloc_zone_t *zone, malloc_statistics_t *stats); /* Fills statistics */ | ||
| 230 | 	boolean_t (* MALLOC_INTROSPECT_FN_PTR(zone_locked))(malloc_zone_t *zone); /* Are any zone locks held */ | ||
| 231 | |||
| 232 | /* Discharge checking. Present in version >= 7. */ | ||
| 233 | 	boolean_t	(* MALLOC_INTROSPECT_FN_PTR(enable_discharge_checking))(malloc_zone_t *zone); | ||
| 234 | 	void	(* MALLOC_INTROSPECT_FN_PTR(disable_discharge_checking))(malloc_zone_t *zone); | ||
| 235 | 	void	(* MALLOC_INTROSPECT_FN_PTR(discharge))(malloc_zone_t *zone, void *memory); | ||
| 236 | #ifdef __BLOCKS__ | ||
| 237 | 	void (* MALLOC_INTROSPECT_FN_PTR(enumerate_discharged_pointers))(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)); | ||
| 238 | 	#else | ||
| 239 | void	*enumerate_unavailable_without_blocks; | ||
| 240 | #endif /* __BLOCKS__ */ | ||
| 241 | 	void	(* MALLOC_INTROSPECT_FN_PTR(reinit_lock))(malloc_zone_t *zone); /* Reinitialize zone locks, called only from atfork_child handler. Present in version >= 9. */ | ||
| 242 | 	void	(* MALLOC_INTROSPECT_FN_PTR(print_task))(task_t task, unsigned level, vm_address_t zone_address, memory_reader_t reader, print_task_printer_t printer); /* debug print for another process. Present in version >= 11. */ | ||
| 243 | 	void (* MALLOC_INTROSPECT_FN_PTR(task_statistics))(task_t task, vm_address_t zone_address, memory_reader_t reader, malloc_statistics_t *stats); /* Present in version >= 12 */ | ||
| 244 | } malloc_introspection_t; | ||
| 245 | |||
| 246 | // The value of "level" when passed to print_task() that corresponds to | ||
| 247 | // verbose passed to print() | ||
| 248 | #define MALLOC_VERBOSE_PRINT_LEVEL	2 | ||
| 249 | |||
| 250 | extern void malloc_printf(const char *format, ...); | ||
| 251 | /* Convenience for logging errors and warnings; | ||
| 252 | No allocation is performed during execution of this function; | ||
| 253 | Only understands usual %p %d %s formats, and %y that expresses a number of bytes (5b,10KB,1MB...) | ||
| 254 | */ | ||
| 255 | |||
| 256 | /*********	Functions for performance tools	************/ | ||
| 257 | |||
| 258 | extern kern_return_t malloc_get_all_zones(task_t task, memory_reader_t reader, vm_address_t **addresses, unsigned *count); | ||
| 259 | /* Fills addresses and count with the addresses of the zones in task; | ||
| 260 | Note that the validity of the addresses returned correspond to the validity of the memory returned by reader */ | ||
| 261 | |||
| 262 | /*********	Debug helpers	************/ | ||
| 263 | |||
| 264 | extern void malloc_zone_print_ptr_info(void *ptr); | ||
| 265 | /* print to stdout if this pointer is in the malloc heap, free status, and size */ | ||
| 266 | |||
| 267 | extern boolean_t malloc_zone_check(malloc_zone_t *zone); | ||
| 268 | /* Checks zone is well formed; if !zone, checks all zones */ | ||
| 269 | |||
| 270 | extern void malloc_zone_print(malloc_zone_t *zone, boolean_t verbose); | ||
| 271 | /* Prints summary on zone; if !zone, prints all zones */ | ||
| 272 | |||
| 273 | extern void malloc_zone_statistics(malloc_zone_t *zone, malloc_statistics_t *stats); | ||
| 274 | /* Fills statistics for zone; if !zone, sums up all zones */ | ||
| 275 | |||
| 276 | extern void malloc_zone_log(malloc_zone_t *zone, void *address); | ||
| 277 | /* Controls logging of all activity; if !zone, for all zones; | ||
| 278 | If address==0 nothing is logged; | ||
| 279 | If address==-1 all activity is logged; | ||
| 280 | Else only the activity regarding address is logged */ | ||
| 281 | |||
| 282 | struct mstats { | ||
| 283 | size_t	bytes_total; | ||
| 284 | size_t	chunks_used; | ||
| 285 | size_t	bytes_used; | ||
| 286 | size_t	chunks_free; | ||
| 287 | size_t	bytes_free; | ||
| 288 | }; | ||
| 289 | |||
| 290 | extern struct mstats mstats(void); | ||
| 291 | |||
| 292 | extern boolean_t malloc_zone_enable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 293 | /* Increment the discharge checking enabled counter for a zone. Returns true if the zone supports checking, false if it does not. */ | ||
| 294 | |||
| 295 | extern void malloc_zone_disable_discharge_checking(malloc_zone_t *zone) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 296 | /* Decrement the discharge checking enabled counter for a zone. */ | ||
| 297 | |||
| 298 | extern void malloc_zone_discharge(malloc_zone_t *zone, void *memory) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 299 | /* Register memory that the programmer expects to be freed soon. | ||
| 300 | zone may be NULL in which case the zone is determined using malloc_zone_from_ptr(). | ||
| 301 | If discharge checking is off for the zone this function is a no-op. */ | ||
| 302 | |||
| 303 | #ifdef __BLOCKS__ | ||
| 304 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void (^report_discharged)(void *memory, void *info)) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 305 | /* Calls report_discharged for each block that was registered using malloc_zone_discharge() but has not yet been freed. | ||
| 306 | info is used to provide zone defined information about the memory block. | ||
| 307 | If zone is NULL then the enumeration covers all zones. */ | ||
| 308 | #else | ||
| 309 | extern void malloc_zone_enumerate_discharged_pointers(malloc_zone_t *zone, void *) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 310 | #endif /* __BLOCKS__ */ | ||
| 311 | |||
| 312 | /********* Zone version summary ************/ | ||
| 313 | // Version 0, but optional: | ||
| 314 | // malloc_zone_t::batch_malloc | ||
| 315 | // malloc_zone_t::batch_free | ||
| 316 | // Version 5: | ||
| 317 | // malloc_zone_t::memalign | ||
| 318 | // Version 6: | ||
| 319 | // malloc_zone_t::free_definite_size | ||
| 320 | // Version 7: | ||
| 321 | // malloc_introspection_t::enable_discharge_checking | ||
| 322 | // malloc_introspection_t::disable_discharge_checking | ||
| 323 | // malloc_introspection_t::discharge | ||
| 324 | // Version 8: | ||
| 325 | // malloc_zone_t::pressure_relief | ||
| 326 | // Version 9: | ||
| 327 | // malloc_introspection_t::reinit_lock | ||
| 328 | // Version 10: | ||
| 329 | // malloc_zone_t::claimed_address | ||
| 330 | // Version 11: | ||
| 331 | // malloc_introspection_t::print_task | ||
| 332 | // Version 12: | ||
| 333 | // malloc_introspection_t::task_statistics | ||
| 334 | |||
| 335 | // These functions are optional and calling them requires two checks: | ||
| 336 | // * Check zone version to ensure zone struct is large enough to include the member. | ||
| 337 | // * Check that the function pointer is not null. | ||
| 338 | |||
| 339 | __END_DECLS | ||
| 340 | |||
| 341 | #endif /* _MALLOC_MALLOC_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/net/if.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2020 Apple Inc. All rights reserved. | 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
lib/libc/include/any-macos.12-any/net/if_var.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. | 2 | * Copyright (c) 2000-2022 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
lib/libc/include/any-macos.12-any/net/net_kev.h deleted-100| ... | @@ -1,100 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2016-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _NET_NETKEV_H_ | ||
| 30 | #define _NET_NETKEV_H_ | ||
| 31 | |||
| 32 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 33 | |||
| 34 | /* Kernel event subclass identifiers for KEV_NETWORK_CLASS */ | ||
| 35 | #define KEV_INET_SUBCLASS 1 /* inet subclass */ | ||
| 36 | /* KEV_INET_SUBCLASS event codes */ | ||
| 37 | #define KEV_INET_NEW_ADDR 1 /* Userland configured IP address */ | ||
| 38 | #define KEV_INET_CHANGED_ADDR 2 /* Address changed event */ | ||
| 39 | #define KEV_INET_ADDR_DELETED 3 /* IPv6 address was deleted */ | ||
| 40 | #define KEV_INET_SIFDSTADDR 4 /* Dest. address was set */ | ||
| 41 | #define KEV_INET_SIFBRDADDR 5 /* Broadcast address was set */ | ||
| 42 | #define KEV_INET_SIFNETMASK 6 /* Netmask was set */ | ||
| 43 | #define KEV_INET_ARPCOLLISION 7 /* ARP collision detected */ | ||
| 44 | #ifdef __APPLE_API_PRIVATE | ||
| 45 | #define KEV_INET_PORTINUSE 8 /* use ken_in_portinuse */ | ||
| 46 | #endif | ||
| 47 | #define KEV_INET_ARPRTRFAILURE 9 /* ARP resolution failed for router */ | ||
| 48 | #define KEV_INET_ARPRTRALIVE 10 /* ARP resolution succeeded for router */ | ||
| 49 | |||
| 50 | #define KEV_DL_SUBCLASS 2 /* Data Link subclass */ | ||
| 51 | /* | ||
| 52 | * Define Data-Link event subclass, and associated | ||
| 53 | * events. | ||
| 54 | */ | ||
| 55 | #define KEV_DL_SIFFLAGS 1 | ||
| 56 | #define KEV_DL_SIFMETRICS 2 | ||
| 57 | #define KEV_DL_SIFMTU 3 | ||
| 58 | #define KEV_DL_SIFPHYS 4 | ||
| 59 | #define KEV_DL_SIFMEDIA 5 | ||
| 60 | #define KEV_DL_SIFGENERIC 6 | ||
| 61 | #define KEV_DL_ADDMULTI 7 | ||
| 62 | #define KEV_DL_DELMULTI 8 | ||
| 63 | #define KEV_DL_IF_ATTACHED 9 | ||
| 64 | #define KEV_DL_IF_DETACHING 10 | ||
| 65 | #define KEV_DL_IF_DETACHED 11 | ||
| 66 | #define KEV_DL_LINK_OFF 12 | ||
| 67 | #define KEV_DL_LINK_ON 13 | ||
| 68 | #define KEV_DL_PROTO_ATTACHED 14 | ||
| 69 | #define KEV_DL_PROTO_DETACHED 15 | ||
| 70 | #define KEV_DL_LINK_ADDRESS_CHANGED 16 | ||
| 71 | #define KEV_DL_WAKEFLAGS_CHANGED 17 | ||
| 72 | #define KEV_DL_IF_IDLE_ROUTE_REFCNT 18 | ||
| 73 | #define KEV_DL_IFCAP_CHANGED 19 | ||
| 74 | #define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20 | ||
| 75 | #define KEV_DL_NODE_PRESENCE 21 | ||
| 76 | #define KEV_DL_NODE_ABSENCE 22 | ||
| 77 | #define KEV_DL_PRIMARY_ELECTED 23 | ||
| 78 | #define KEV_DL_ISSUES 24 | ||
| 79 | #define KEV_DL_IFDELEGATE_CHANGED 25 | ||
| 80 | #define KEV_DL_AWDL_RESTRICTED 26 | ||
| 81 | #define KEV_DL_AWDL_UNRESTRICTED 27 | ||
| 82 | #define KEV_DL_RRC_STATE_CHANGED 28 | ||
| 83 | #define KEV_DL_QOS_MODE_CHANGED 29 | ||
| 84 | #define KEV_DL_LOW_POWER_MODE_CHANGED 30 | ||
| 85 | |||
| 86 | #define KEV_DL_MASTER_ELECTED (_Pragma("gcc warn Use KEV_DL_PRIMARY_ELECTED instead") KEV_DL_PRIMARY_ELECTED) | ||
| 87 | |||
| 88 | |||
| 89 | #define KEV_INET6_SUBCLASS 6 /* inet6 subclass */ | ||
| 90 | /* KEV_INET6_SUBCLASS event codes */ | ||
| 91 | #define KEV_INET6_NEW_USER_ADDR 1 /* Userland configured IPv6 address */ | ||
| 92 | #define KEV_INET6_CHANGED_ADDR 2 /* Address changed event (future) */ | ||
| 93 | #define KEV_INET6_ADDR_DELETED 3 /* IPv6 address was deleted */ | ||
| 94 | #define KEV_INET6_NEW_LL_ADDR 4 /* Autoconf LL address appeared */ | ||
| 95 | #define KEV_INET6_NEW_RTADV_ADDR 5 /* Autoconf address has appeared */ | ||
| 96 | #define KEV_INET6_DEFROUTER 6 /* Default router detected */ | ||
| 97 | #define KEV_INET6_REQUEST_NAT64_PREFIX 7 /* Asking for the NAT64-prefix */ | ||
| 98 | |||
| 99 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 100 | #endif /* _NET_NETKEV_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/net/route.h created+263| ... | @@ -0,0 +1,263 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Copyright (c) 1980, 1986, 1993 | ||
| 30 | *	The Regents of the University of California. All rights reserved. | ||
| 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 | *	@(#)route.h	8.3 (Berkeley) 4/19/94 | ||
| 61 | * $FreeBSD: src/sys/net/route.h,v 1.36.2.1 2000/08/16 06:14:23 jayanth Exp $ | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _NET_ROUTE_H_ | ||
| 65 | #define _NET_ROUTE_H_ | ||
| 66 | #include <sys/appleapiopts.h> | ||
| 67 | #include <stdint.h> | ||
| 68 | #include <sys/types.h> | ||
| 69 | #include <sys/socket.h> | ||
| 70 | |||
| 71 | /* | ||
| 72 | * These numbers are used by reliable protocols for determining | ||
| 73 | * retransmission behavior and are included in the routing structure. | ||
| 74 | */ | ||
| 75 | struct rt_metrics { | ||
| 76 | 	u_int32_t rmx_locks; /* Kernel leaves these values alone */ | ||
| 77 | 	u_int32_t rmx_mtu; /* MTU for this path */ | ||
| 78 | 	u_int32_t rmx_hopcount; /* max hops expected */ | ||
| 79 | 	int32_t rmx_expire; /* lifetime for route, e.g. redirect */ | ||
| 80 | 	u_int32_t rmx_recvpipe; /* inbound delay-bandwidth product */ | ||
| 81 | 	u_int32_t rmx_sendpipe; /* outbound delay-bandwidth product */ | ||
| 82 | 	u_int32_t rmx_ssthresh; /* outbound gateway buffer limit */ | ||
| 83 | 	u_int32_t rmx_rtt; /* estimated round trip time */ | ||
| 84 | 	u_int32_t rmx_rttvar; /* estimated rtt variance */ | ||
| 85 | 	u_int32_t rmx_pksent; /* packets sent using this route */ | ||
| 86 | 	u_int32_t rmx_state; /* route state */ | ||
| 87 | 	u_int32_t rmx_filler[3]; /* will be used for TCP's peer-MSS cache */ | ||
| 88 | }; | ||
| 89 | |||
| 90 | /* | ||
| 91 | * rmx_rtt and rmx_rttvar are stored as microseconds; | ||
| 92 | */ | ||
| 93 | #define RTM_RTTUNIT 1000000 /* units for rtt, rttvar, as units per sec */ | ||
| 94 | |||
| 95 | |||
| 96 | |||
| 97 | #define RTF_UP 0x1 /* route usable */ | ||
| 98 | #define RTF_GATEWAY 0x2 /* destination is a gateway */ | ||
| 99 | #define RTF_HOST 0x4 /* host entry (net otherwise) */ | ||
| 100 | #define RTF_REJECT 0x8 /* host or net unreachable */ | ||
| 101 | #define RTF_DYNAMIC 0x10 /* created dynamically (by redirect) */ | ||
| 102 | #define RTF_MODIFIED 0x20 /* modified dynamically (by redirect) */ | ||
| 103 | #define RTF_DONE 0x40 /* message confirmed */ | ||
| 104 | #define RTF_DELCLONE 0x80 /* delete cloned route */ | ||
| 105 | #define RTF_CLONING 0x100 /* generate new routes on use */ | ||
| 106 | #define RTF_XRESOLVE 0x200 /* external daemon resolves name */ | ||
| 107 | #define RTF_LLINFO 0x400 /* DEPRECATED - exists ONLY for backward | ||
| 108 | 	 * compatibility */ | ||
| 109 | #define RTF_LLDATA 0x400 /* used by apps to add/del L2 entries */ | ||
| 110 | #define RTF_STATIC 0x800 /* manually added */ | ||
| 111 | #define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ | ||
| 112 | #define RTF_NOIFREF 0x2000 /* not eligible for RTF_IFREF */ | ||
| 113 | #define RTF_PROTO2 0x4000 /* protocol specific routing flag */ | ||
| 114 | #define RTF_PROTO1 0x8000 /* protocol specific routing flag */ | ||
| 115 | |||
| 116 | #define RTF_PRCLONING 0x10000 /* protocol requires cloning */ | ||
| 117 | #define RTF_WASCLONED 0x20000 /* route generated through cloning */ | ||
| 118 | #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ | ||
| 119 | /* 0x80000 unused */ | ||
| 120 | #define RTF_PINNED 0x100000 /* future use */ | ||
| 121 | #define RTF_LOCAL 0x200000 /* route represents a local address */ | ||
| 122 | #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ | ||
| 123 | #define RTF_MULTICAST 0x800000 /* route represents a mcast address */ | ||
| 124 | #define RTF_IFSCOPE 0x1000000 /* has valid interface scope */ | ||
| 125 | #define RTF_CONDEMNED 0x2000000 /* defunct; no longer modifiable */ | ||
| 126 | #define RTF_IFREF 0x4000000 /* route holds a ref to interface */ | ||
| 127 | #define RTF_PROXY 0x8000000 /* proxying, no interface scope */ | ||
| 128 | #define RTF_ROUTER 0x10000000 /* host is a router */ | ||
| 129 | #define RTF_DEAD 0x20000000 /* Route entry is being freed */ | ||
| 130 | #define RTF_GLOBAL 0x40000000 /* route to destination of the global internet */ | ||
| 131 | /* 0x80000000 unassigned */ | ||
| 132 | |||
| 133 | #define RTPRF_OURS RTF_PROTO3 /* set on routes we manage */ | ||
| 134 | #define RTF_BITS \ | ||
| 135 | 	"\020\1UP\2GATEWAY\3HOST\4REJECT\5DYNAMIC\6MODIFIED\7DONE" \ | ||
| 136 | 	"\10DELCLONE\11CLONING\12XRESOLVE\13LLINFO\14STATIC\15BLACKHOLE" \ | ||
| 137 | 	"\16NOIFREF\17PROTO2\20PROTO1\21PRCLONING\22WASCLONED\23PROTO3" \ | ||
| 138 | 	"\25PINNED\26LOCAL\27BROADCAST\30MULTICAST\31IFSCOPE\32CONDEMNED" \ | ||
| 139 | 	"\33IFREF\34PROXY\35ROUTER\37GLOBAL" | ||
| 140 | |||
| 141 | #define IS_DIRECT_HOSTROUTE(rt) \ | ||
| 142 | 	(((rt)->rt_flags & (RTF_HOST | RTF_GATEWAY)) == RTF_HOST) | ||
| 143 | |||
| 144 | #define IS_DYNAMIC_DIRECT_HOSTROUTE(rt) \ | ||
| 145 | 	(((rt)->rt_flags & (RTF_CLONING | RTF_PRCLONING | RTF_HOST | RTF_LLINFO |\ | ||
| 146 | 	 RTF_WASCLONED | RTF_GATEWAY)) ==\ | ||
| 147 | 	 (RTF_HOST | RTF_LLINFO | RTF_WASCLONED)) | ||
| 148 | /* | ||
| 149 | * Routing statistics. | ||
| 150 | */ | ||
| 151 | struct rtstat { | ||
| 152 | 	short rts_badredirect; /* bogus redirect calls */ | ||
| 153 | 	short rts_dynamic; /* routes created by redirects */ | ||
| 154 | 	short rts_newgateway; /* routes modified by redirects */ | ||
| 155 | 	short rts_unreach; /* lookups which failed */ | ||
| 156 | 	short rts_wildcard; /* lookups satisfied by a wildcard */ | ||
| 157 | 	short rts_badrtgwroute; /* route to gateway is not direct */ | ||
| 158 | }; | ||
| 159 | |||
| 160 | /* | ||
| 161 | * Structures for routing messages. | ||
| 162 | */ | ||
| 163 | struct rt_msghdr { | ||
| 164 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 165 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 166 | 	u_char rtm_type; /* message type */ | ||
| 167 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 168 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 169 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 170 | 	pid_t rtm_pid; /* identify sender */ | ||
| 171 | 	int rtm_seq; /* for sender to identify action */ | ||
| 172 | 	int rtm_errno; /* why failed */ | ||
| 173 | 	int rtm_use; /* from rtentry */ | ||
| 174 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 175 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 176 | }; | ||
| 177 | |||
| 178 | struct rt_msghdr2 { | ||
| 179 | 	u_short rtm_msglen; /* to skip over non-understood messages */ | ||
| 180 | 	u_char rtm_version; /* future binary compatibility */ | ||
| 181 | 	u_char rtm_type; /* message type */ | ||
| 182 | 	u_short rtm_index; /* index for associated ifp */ | ||
| 183 | 	int rtm_flags; /* flags, incl. kern & message, e.g. DONE */ | ||
| 184 | 	int rtm_addrs; /* bitmask identifying sockaddrs in msg */ | ||
| 185 | 	int32_t rtm_refcnt; /* reference count */ | ||
| 186 | 	int rtm_parentflags; /* flags of the parent route */ | ||
| 187 | 	int rtm_reserved; /* reserved field set to 0 */ | ||
| 188 | 	int rtm_use; /* from rtentry */ | ||
| 189 | 	u_int32_t rtm_inits; /* which metrics we are initializing */ | ||
| 190 | 	struct rt_metrics rtm_rmx; /* metrics themselves */ | ||
| 191 | }; | ||
| 192 | |||
| 193 | |||
| 194 | #define RTM_VERSION 5 /* Up the ante and ignore older versions */ | ||
| 195 | |||
| 196 | /* | ||
| 197 | * Message types. | ||
| 198 | */ | ||
| 199 | #define RTM_ADD 0x1 /* Add Route */ | ||
| 200 | #define RTM_DELETE 0x2 /* Delete Route */ | ||
| 201 | #define RTM_CHANGE 0x3 /* Change Metrics or flags */ | ||
| 202 | #define RTM_GET 0x4 /* Report Metrics */ | ||
| 203 | #define RTM_LOSING 0x5 /* RTM_LOSING is no longer generated by xnu | ||
| 204 | 	 * and is deprecated */ | ||
| 205 | #define RTM_REDIRECT 0x6 /* Told to use different route */ | ||
| 206 | #define RTM_MISS 0x7 /* Lookup failed on this address */ | ||
| 207 | #define RTM_LOCK 0x8 /* fix specified metrics */ | ||
| 208 | #define RTM_OLDADD 0x9 /* caused by SIOCADDRT */ | ||
| 209 | #define RTM_OLDDEL 0xa /* caused by SIOCDELRT */ | ||
| 210 | #define RTM_RESOLVE 0xb /* req to resolve dst to LL addr */ | ||
| 211 | #define RTM_NEWADDR 0xc /* address being added to iface */ | ||
| 212 | #define RTM_DELADDR 0xd /* address being removed from iface */ | ||
| 213 | #define RTM_IFINFO 0xe /* iface going up/down etc. */ | ||
| 214 | #define RTM_NEWMADDR 0xf /* mcast group membership being added to if */ | ||
| 215 | #define RTM_DELMADDR 0x10 /* mcast group membership being deleted */ | ||
| 216 | #define RTM_IFINFO2 0x12 /* */ | ||
| 217 | #define RTM_NEWMADDR2 0x13 /* */ | ||
| 218 | #define RTM_GET2 0x14 /* */ | ||
| 219 | |||
| 220 | /* | ||
| 221 | * Bitmask values for rtm_inits and rmx_locks. | ||
| 222 | */ | ||
| 223 | #define RTV_MTU 0x1 /* init or lock _mtu */ | ||
| 224 | #define RTV_HOPCOUNT 0x2 /* init or lock _hopcount */ | ||
| 225 | #define RTV_EXPIRE 0x4 /* init or lock _expire */ | ||
| 226 | #define RTV_RPIPE 0x8 /* init or lock _recvpipe */ | ||
| 227 | #define RTV_SPIPE 0x10 /* init or lock _sendpipe */ | ||
| 228 | #define RTV_SSTHRESH 0x20 /* init or lock _ssthresh */ | ||
| 229 | #define RTV_RTT 0x40 /* init or lock _rtt */ | ||
| 230 | #define RTV_RTTVAR 0x80 /* init or lock _rttvar */ | ||
| 231 | |||
| 232 | /* | ||
| 233 | * Bitmask values for rtm_addrs. | ||
| 234 | */ | ||
| 235 | #define RTA_DST 0x1 /* destination sockaddr present */ | ||
| 236 | #define RTA_GATEWAY 0x2 /* gateway sockaddr present */ | ||
| 237 | #define RTA_NETMASK 0x4 /* netmask sockaddr present */ | ||
| 238 | #define RTA_GENMASK 0x8 /* cloning mask sockaddr present */ | ||
| 239 | #define RTA_IFP 0x10 /* interface name sockaddr present */ | ||
| 240 | #define RTA_IFA 0x20 /* interface addr sockaddr present */ | ||
| 241 | #define RTA_AUTHOR 0x40 /* sockaddr for author of redirect */ | ||
| 242 | #define RTA_BRD 0x80 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 243 | |||
| 244 | /* | ||
| 245 | * Index offsets for sockaddr array for alternate internal encoding. | ||
| 246 | */ | ||
| 247 | #define RTAX_DST 0 /* destination sockaddr present */ | ||
| 248 | #define RTAX_GATEWAY 1 /* gateway sockaddr present */ | ||
| 249 | #define RTAX_NETMASK 2 /* netmask sockaddr present */ | ||
| 250 | #define RTAX_GENMASK 3 /* cloning mask sockaddr present */ | ||
| 251 | #define RTAX_IFP 4 /* interface name sockaddr present */ | ||
| 252 | #define RTAX_IFA 5 /* interface addr sockaddr present */ | ||
| 253 | #define RTAX_AUTHOR 6 /* sockaddr for author of redirect */ | ||
| 254 | #define RTAX_BRD 7 /* for NEWADDR, broadcast or p-p dest addr */ | ||
| 255 | #define RTAX_MAX 8 /* size of array to allocate */ | ||
| 256 | |||
| 257 | struct rt_addrinfo { | ||
| 258 | 	int rti_addrs; | ||
| 259 | 	struct sockaddr *rti_info[RTAX_MAX]; | ||
| 260 | }; | ||
| 261 | |||
| 262 | |||
| 263 | #endif /* _NET_ROUTE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/netinet6/in6.h deleted-683| ... | @@ -1,683 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | /* | ||
| 30 | * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. | ||
| 31 | * All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. Neither the name of the project nor the names of its contributors | ||
| 42 | * may be used to endorse or promote products derived from this software | ||
| 43 | * without specific prior written permission. | ||
| 44 | * | ||
| 45 | * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND | ||
| 46 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 47 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 48 | * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE | ||
| 49 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 50 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 51 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 52 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 53 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 54 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 55 | * SUCH DAMAGE. | ||
| 56 | */ | ||
| 57 | |||
| 58 | /* | ||
| 59 | * Copyright (c) 1982, 1986, 1990, 1993 | ||
| 60 | *	The Regents of the University of California. All rights reserved. | ||
| 61 | * | ||
| 62 | * Redistribution and use in source and binary forms, with or without | ||
| 63 | * modification, are permitted provided that the following conditions | ||
| 64 | * are met: | ||
| 65 | * 1. Redistributions of source code must retain the above copyright | ||
| 66 | * notice, this list of conditions and the following disclaimer. | ||
| 67 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 68 | * notice, this list of conditions and the following disclaimer in the | ||
| 69 | * documentation and/or other materials provided with the distribution. | ||
| 70 | * 3. All advertising materials mentioning features or use of this software | ||
| 71 | * must display the following acknowledgement: | ||
| 72 | *	This product includes software developed by the University of | ||
| 73 | *	California, Berkeley and its contributors. | ||
| 74 | * 4. Neither the name of the University nor the names of its contributors | ||
| 75 | * may be used to endorse or promote products derived from this software | ||
| 76 | * without specific prior written permission. | ||
| 77 | * | ||
| 78 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 79 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 80 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 81 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 82 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 83 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 84 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 85 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 86 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 87 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 88 | * SUCH DAMAGE. | ||
| 89 | * | ||
| 90 | *	@(#)in.h	8.3 (Berkeley) 1/3/94 | ||
| 91 | */ | ||
| 92 | |||
| 93 | #ifndef __KAME_NETINET_IN_H_INCLUDED_ | ||
| 94 | #error "do not include netinet6/in6.h directly, include netinet/in.h. " \ | ||
| 95 | " see RFC2553" | ||
| 96 | #endif | ||
| 97 | |||
| 98 | #ifndef _NETINET6_IN6_H_ | ||
| 99 | #define _NETINET6_IN6_H_ | ||
| 100 | #include <sys/appleapiopts.h> | ||
| 101 | |||
| 102 | #include <sys/_types.h> | ||
| 103 | #include <sys/_types/_sa_family_t.h> | ||
| 104 | |||
| 105 | /* | ||
| 106 | * Identification of the network protocol stack | ||
| 107 | * for *BSD-current/release: http://www.kame.net/dev/cvsweb.cgi/kame/COVERAGE | ||
| 108 | * has the table of implementation/integration differences. | ||
| 109 | */ | ||
| 110 | #define __KAME__ | ||
| 111 | #define __KAME_VERSION "2009/apple-darwin" | ||
| 112 | |||
| 113 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 114 | /* | ||
| 115 | * Local port number conventions: | ||
| 116 | * | ||
| 117 | * Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root), | ||
| 118 | * unless a kernel is compiled with IPNOPRIVPORTS defined. | ||
| 119 | * | ||
| 120 | * When a user does a bind(2) or connect(2) with a port number of zero, | ||
| 121 | * a non-conflicting local port address is chosen. | ||
| 122 | * | ||
| 123 | * The default range is IPPORT_ANONMIN to IPPORT_ANONMAX, although | ||
| 124 | * that is settable by sysctl(3); net.inet.ip.anonportmin and | ||
| 125 | * net.inet.ip.anonportmax respectively. | ||
| 126 | * | ||
| 127 | * A user may set the IPPROTO_IP option IP_PORTRANGE to change this | ||
| 128 | * default assignment range. | ||
| 129 | * | ||
| 130 | * The value IP_PORTRANGE_DEFAULT causes the default behavior. | ||
| 131 | * | ||
| 132 | * The value IP_PORTRANGE_HIGH is the same as IP_PORTRANGE_DEFAULT, | ||
| 133 | * and exists only for FreeBSD compatibility purposes. | ||
| 134 | * | ||
| 135 | * The value IP_PORTRANGE_LOW changes the range to the "low" are | ||
| 136 | * that is (by convention) restricted to privileged processes. | ||
| 137 | * This convention is based on "vouchsafe" principles only. | ||
| 138 | * It is only secure if you trust the remote host to restrict these ports. | ||
| 139 | * The range is IPPORT_RESERVEDMIN to IPPORT_RESERVEDMAX. | ||
| 140 | */ | ||
| 141 | |||
| 142 | #define IPV6PORT_RESERVED 1024 | ||
| 143 | #define IPV6PORT_ANONMIN 49152 | ||
| 144 | #define IPV6PORT_ANONMAX 65535 | ||
| 145 | #define IPV6PORT_RESERVEDMIN 600 | ||
| 146 | #define IPV6PORT_RESERVEDMAX (IPV6PORT_RESERVED-1) | ||
| 147 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 148 | |||
| 149 | /* | ||
| 150 | * IPv6 address | ||
| 151 | */ | ||
| 152 | typedef struct in6_addr { | ||
| 153 | 	union { | ||
| 154 | 		__uint8_t __u6_addr8[16]; | ||
| 155 | 		__uint16_t __u6_addr16[8]; | ||
| 156 | 		__uint32_t __u6_addr32[4]; | ||
| 157 | 	} __u6_addr; /* 128-bit IP6 address */ | ||
| 158 | } in6_addr_t; | ||
| 159 | |||
| 160 | #define s6_addr __u6_addr.__u6_addr8 | ||
| 161 | |||
| 162 | #define INET6_ADDRSTRLEN 46 | ||
| 163 | |||
| 164 | /* | ||
| 165 | * Socket address for IPv6 | ||
| 166 | */ | ||
| 167 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 168 | #define SIN6_LEN | ||
| 169 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 170 | struct sockaddr_in6 { | ||
| 171 | 	__uint8_t sin6_len; /* length of this struct(sa_family_t) */ | ||
| 172 | 	sa_family_t sin6_family; /* AF_INET6 (sa_family_t) */ | ||
| 173 | 	in_port_t sin6_port; /* Transport layer port # (in_port_t) */ | ||
| 174 | 	__uint32_t sin6_flowinfo; /* IP6 flow information */ | ||
| 175 | 	struct in6_addr sin6_addr; /* IP6 address */ | ||
| 176 | 	__uint32_t sin6_scope_id; /* scope zone index */ | ||
| 177 | }; | ||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | /* | ||
| 184 | * Definition of some useful macros to handle IP6 addresses | ||
| 185 | */ | ||
| 186 | #define IN6ADDR_ANY_INIT \ | ||
| 187 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 188 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 189 | #define IN6ADDR_LOOPBACK_INIT \ | ||
| 190 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 191 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 192 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 193 | #define IN6ADDR_NODELOCAL_ALLNODES_INIT \ | ||
| 194 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 195 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 196 | #define IN6ADDR_INTFACELOCAL_ALLNODES_INIT \ | ||
| 197 | 	{{{ 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 198 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 199 | #define IN6ADDR_LINKLOCAL_ALLNODES_INIT \ | ||
| 200 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 201 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }}} | ||
| 202 | #define IN6ADDR_LINKLOCAL_ALLROUTERS_INIT \ | ||
| 203 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 204 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02 }}} | ||
| 205 | #define IN6ADDR_LINKLOCAL_ALLV2ROUTERS_INIT \ | ||
| 206 | 	{{{ 0xff, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 207 | 	 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16 }}} | ||
| 208 | #define IN6ADDR_V4MAPPED_INIT \ | ||
| 209 | 	{{{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ | ||
| 210 | 	 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00 }}} | ||
| 211 | #define IN6ADDR_MULTICAST_PREFIX IN6MASK8 | ||
| 212 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 213 | |||
| 214 | extern const struct in6_addr in6addr_any; | ||
| 215 | extern const struct in6_addr in6addr_loopback; | ||
| 216 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 217 | extern const struct in6_addr in6addr_nodelocal_allnodes; | ||
| 218 | extern const struct in6_addr in6addr_linklocal_allnodes; | ||
| 219 | extern const struct in6_addr in6addr_linklocal_allrouters; | ||
| 220 | extern const struct in6_addr in6addr_linklocal_allv2routers; | ||
| 221 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 222 | |||
| 223 | /* | ||
| 224 | * Equality | ||
| 225 | * NOTE: Some of kernel programming environment (for example, openbsd/sparc) | ||
| 226 | * does not supply memcmp(). For userland memcmp() is preferred as it is | ||
| 227 | * in ANSI standard. | ||
| 228 | */ | ||
| 229 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 230 | #define IN6_ARE_ADDR_EQUAL(a, b) \ | ||
| 231 | 	(memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof (struct in6_addr)) \ | ||
| 232 | 	== 0) | ||
| 233 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 234 | |||
| 235 | |||
| 236 | /* | ||
| 237 | * Unspecified | ||
| 238 | */ | ||
| 239 | #define IN6_IS_ADDR_UNSPECIFIED(a) \ | ||
| 240 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 241 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 242 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 243 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == 0)) | ||
| 244 | |||
| 245 | /* | ||
| 246 | * Loopback | ||
| 247 | */ | ||
| 248 | #define IN6_IS_ADDR_LOOPBACK(a) \ | ||
| 249 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 250 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 251 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 252 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) == ntohl(1))) | ||
| 253 | |||
| 254 | /* | ||
| 255 | * IPv4 compatible | ||
| 256 | */ | ||
| 257 | #define IN6_IS_ADDR_V4COMPAT(a) \ | ||
| 258 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 259 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 260 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \ | ||
| 261 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != 0) && \ | ||
| 262 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[12]) != ntohl(1))) | ||
| 263 | |||
| 264 | /* | ||
| 265 | * Mapped | ||
| 266 | */ | ||
| 267 | #define IN6_IS_ADDR_V4MAPPED(a) \ | ||
| 268 | 	((*(const __uint32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \ | ||
| 269 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \ | ||
| 270 | 	(*(const __uint32_t *)(const void *)(&(a)->s6_addr[8]) == \ | ||
| 271 | 	ntohl(0x0000ffff))) | ||
| 272 | |||
| 273 | /* | ||
| 274 | * 6to4 | ||
| 275 | */ | ||
| 276 | #define IN6_IS_ADDR_6TO4(x) (ntohs((x)->s6_addr16[0]) == 0x2002) | ||
| 277 | |||
| 278 | /* | ||
| 279 | * KAME Scope Values | ||
| 280 | */ | ||
| 281 | |||
| 282 | #define __IPV6_ADDR_SCOPE_NODELOCAL 0x01 | ||
| 283 | #define __IPV6_ADDR_SCOPE_INTFACELOCAL 0x01 | ||
| 284 | #define __IPV6_ADDR_SCOPE_LINKLOCAL 0x02 | ||
| 285 | #define __IPV6_ADDR_SCOPE_SITELOCAL 0x05 | ||
| 286 | #define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 /* just used in this file */ | ||
| 287 | #define __IPV6_ADDR_SCOPE_GLOBAL 0x0e | ||
| 288 | |||
| 289 | /* | ||
| 290 | * Unicast Scope | ||
| 291 | * Note that we must check topmost 10 bits only, not 16 bits (see RFC2373). | ||
| 292 | */ | ||
| 293 | #define IN6_IS_ADDR_LINKLOCAL(a) \ | ||
| 294 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80)) | ||
| 295 | #define IN6_IS_ADDR_SITELOCAL(a) \ | ||
| 296 | 	(((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) | ||
| 297 | |||
| 298 | /* | ||
| 299 | * Multicast | ||
| 300 | */ | ||
| 301 | #define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) | ||
| 302 | |||
| 303 | #define IPV6_ADDR_MC_FLAGS(a) ((a)->s6_addr[1] & 0xf0) | ||
| 304 | |||
| 305 | #define IPV6_ADDR_MC_FLAGS_TRANSIENT 0x10 | ||
| 306 | #define IPV6_ADDR_MC_FLAGS_PREFIX 0x20 | ||
| 307 | #define IPV6_ADDR_MC_FLAGS_UNICAST_BASED (IPV6_ADDR_MC_FLAGS_TRANSIENT | IPV6_ADDR_MC_FLAGS_PREFIX) | ||
| 308 | |||
| 309 | #define IN6_IS_ADDR_UNICAST_BASED_MULTICAST(a) \ | ||
| 310 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 311 | 	(IPV6_ADDR_MC_FLAGS(a) == IPV6_ADDR_MC_FLAGS_UNICAST_BASED)) | ||
| 312 | |||
| 313 | /* | ||
| 314 | * Unique Local IPv6 Unicast Addresses (per RFC 4193) | ||
| 315 | */ | ||
| 316 | #define IN6_IS_ADDR_UNIQUE_LOCAL(a) \ | ||
| 317 | 	(((a)->s6_addr[0] == 0xfc) || ((a)->s6_addr[0] == 0xfd)) | ||
| 318 | |||
| 319 | #define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) | ||
| 320 | |||
| 321 | /* | ||
| 322 | * Multicast Scope | ||
| 323 | */ | ||
| 324 | #define IN6_IS_ADDR_MC_NODELOCAL(a) \ | ||
| 325 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 326 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_NODELOCAL)) | ||
| 327 | #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ | ||
| 328 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 329 | 	(IPV6_ADDR_MC_FLAGS(a) != IPV6_ADDR_MC_FLAGS_UNICAST_BASED) && \ | ||
| 330 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_LINKLOCAL)) | ||
| 331 | #define IN6_IS_ADDR_MC_SITELOCAL(a) \ | ||
| 332 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 333 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) | ||
| 334 | #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ | ||
| 335 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 336 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) | ||
| 337 | #define IN6_IS_ADDR_MC_GLOBAL(a) \ | ||
| 338 | 	(IN6_IS_ADDR_MULTICAST(a) && \ | ||
| 339 | 	(__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_GLOBAL)) | ||
| 340 | |||
| 341 | |||
| 342 | |||
| 343 | |||
| 344 | /* | ||
| 345 | * Options for use with [gs]etsockopt at the IPV6 level. | ||
| 346 | * First word of comment is data type; bool is stored in int. | ||
| 347 | */ | ||
| 348 | /* no hdrincl */ | ||
| 349 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 350 | /* | ||
| 351 | * RFC 3542 define the following socket options in a manner incompatible | ||
| 352 | * with RFC 2292: | ||
| 353 | * IPV6_PKTINFO | ||
| 354 | * IPV6_HOPLIMIT | ||
| 355 | * IPV6_NEXTHOP | ||
| 356 | * IPV6_HOPOPTS | ||
| 357 | * IPV6_DSTOPTS | ||
| 358 | * IPV6_RTHDR | ||
| 359 | * | ||
| 360 | * To use the new IPv6 Sockets options introduced by RFC 3542 | ||
| 361 | * the constant __APPLE_USE_RFC_3542 must be defined before | ||
| 362 | * including <netinet/in.h> | ||
| 363 | * | ||
| 364 | * To use the old IPv6 Sockets options from RFC 2292 | ||
| 365 | * the constant __APPLE_USE_RFC_2292 must be defined before | ||
| 366 | * including <netinet/in.h> | ||
| 367 | * | ||
| 368 | * Note that eventually RFC 3542 is going to be the | ||
| 369 | * default and RFC 2292 will be obsolete. | ||
| 370 | */ | ||
| 371 | |||
| 372 | #if defined(__APPLE_USE_RFC_3542) && defined(__APPLE_USE_RFC_2292) | ||
| 373 | #error "__APPLE_USE_RFC_3542 and __APPLE_USE_RFC_2292 cannot be both defined" | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #if 0 /* the followings are relic in IPv4 and hence are disabled */ | ||
| 377 | #define IPV6_OPTIONS 1 /* buf/ip6_opts; set/get IP6 options */ | ||
| 378 | #define IPV6_RECVOPTS 5 /* bool; receive all IP6 opts w/dgram */ | ||
| 379 | #define IPV6_RECVRETOPTS 6 /* bool; receive IP6 opts for response */ | ||
| 380 | #define IPV6_RECVDSTADDR 7 /* bool; receive IP6 dst addr w/dgram */ | ||
| 381 | #define IPV6_RETOPTS 8 /* ip6_opts; set/get IP6 options */ | ||
| 382 | #endif /* 0 */ | ||
| 383 | #define IPV6_SOCKOPT_RESERVED1 3 /* reserved for future use */ | ||
| 384 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 385 | #define IPV6_UNICAST_HOPS 4 /* int; IP6 hops */ | ||
| 386 | #define IPV6_MULTICAST_IF 9 /* u_int; set/get IP6 multicast i/f */ | ||
| 387 | #define IPV6_MULTICAST_HOPS 10 /* int; set/get IP6 multicast hops */ | ||
| 388 | #define IPV6_MULTICAST_LOOP 11 /* u_int; set/get IP6 mcast loopback */ | ||
| 389 | #define IPV6_JOIN_GROUP 12 /* ip6_mreq; join a group membership */ | ||
| 390 | #define IPV6_LEAVE_GROUP 13 /* ip6_mreq; leave a group membership */ | ||
| 391 | |||
| 392 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 393 | #define IPV6_PORTRANGE 14 /* int; range to choose for unspec port */ | ||
| 394 | #define ICMP6_FILTER 18 /* icmp6_filter; icmp6 filter */ | ||
| 395 | #define IPV6_2292PKTINFO 19 /* bool; send/recv if, src/dst addr */ | ||
| 396 | #define IPV6_2292HOPLIMIT 20 /* bool; hop limit */ | ||
| 397 | #define IPV6_2292NEXTHOP 21 /* bool; next hop addr */ | ||
| 398 | #define IPV6_2292HOPOPTS 22 /* bool; hop-by-hop option */ | ||
| 399 | #define IPV6_2292DSTOPTS 23 /* bool; destinaion option */ | ||
| 400 | #define IPV6_2292RTHDR 24 /* ip6_rthdr: routing header */ | ||
| 401 | |||
| 402 | /* buf/cmsghdr; set/get IPv6 options [obsoleted by RFC3542] */ | ||
| 403 | #define IPV6_2292PKTOPTIONS 25 | ||
| 404 | |||
| 405 | #ifdef __APPLE_USE_RFC_2292 | ||
| 406 | #define IPV6_PKTINFO IPV6_2292PKTINFO | ||
| 407 | #define IPV6_HOPLIMIT IPV6_2292HOPLIMIT | ||
| 408 | #define IPV6_NEXTHOP IPV6_2292NEXTHOP | ||
| 409 | #define IPV6_HOPOPTS IPV6_2292HOPOPTS | ||
| 410 | #define IPV6_DSTOPTS IPV6_2292DSTOPTS | ||
| 411 | #define IPV6_RTHDR IPV6_2292RTHDR | ||
| 412 | #define IPV6_PKTOPTIONS IPV6_2292PKTOPTIONS | ||
| 413 | #endif /* __APPLE_USE_RFC_2292 */ | ||
| 414 | |||
| 415 | #define IPV6_CHECKSUM 26 /* int; checksum offset for raw socket */ | ||
| 416 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 417 | #define IPV6_V6ONLY 27 /* bool; only bind INET6 at wildcard bind */ | ||
| 418 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 419 | #define IPV6_BINDV6ONLY IPV6_V6ONLY | ||
| 420 | |||
| 421 | |||
| 422 | #if 1 /* IPSEC */ | ||
| 423 | #define IPV6_IPSEC_POLICY 28 /* struct; get/set security policy */ | ||
| 424 | #endif /* 1 */ | ||
| 425 | #define IPV6_FAITH 29 /* deprecated */ | ||
| 426 | |||
| 427 | #if 1 /* IPV6FIREWALL */ | ||
| 428 | #define IPV6_FW_ADD 30 /* add a firewall rule to chain */ | ||
| 429 | #define IPV6_FW_DEL 31 /* delete a firewall rule from chain */ | ||
| 430 | #define IPV6_FW_FLUSH 32 /* flush firewall rule chain */ | ||
| 431 | #define IPV6_FW_ZERO 33 /* clear single/all firewall counter(s) */ | ||
| 432 | #define IPV6_FW_GET 34 /* get entire firewall rule chain */ | ||
| 433 | #endif /* 1 */ | ||
| 434 | |||
| 435 | /* | ||
| 436 | * APPLE: NOTE the value of those 2 options is kept unchanged from | ||
| 437 | * previous version of darwin/OS X for binary compatibility reasons | ||
| 438 | * and differ from FreeBSD (values 57 and 61). See below. | ||
| 439 | */ | ||
| 440 | #define IPV6_RECVTCLASS 35 /* bool; recv traffic class values */ | ||
| 441 | #define IPV6_TCLASS 36 /* int; send traffic class value */ | ||
| 442 | |||
| 443 | #ifdef __APPLE_USE_RFC_3542 | ||
| 444 | /* new socket options introduced in RFC3542 */ | ||
| 445 | /* | ||
| 446 | * ip6_dest; send dst option before rthdr | ||
| 447 | * APPLE: Value purposely different than FreeBSD (35) to avoid | ||
| 448 | * collision with definition of IPV6_RECVTCLASS in previous | ||
| 449 | * darwin implementations | ||
| 450 | */ | ||
| 451 | #define IPV6_RTHDRDSTOPTS 57 | ||
| 452 | |||
| 453 | /* | ||
| 454 | * bool; recv if, dst addr | ||
| 455 | * APPLE: Value purposely different than FreeBSD(36) to avoid | ||
| 456 | * collision with definition of IPV6_TCLASS in previous | ||
| 457 | * darwin implementations | ||
| 458 | */ | ||
| 459 | #define IPV6_RECVPKTINFO 61 | ||
| 460 | |||
| 461 | #define IPV6_RECVHOPLIMIT 37 /* bool; recv hop limit */ | ||
| 462 | #define IPV6_RECVRTHDR 38 /* bool; recv routing header */ | ||
| 463 | #define IPV6_RECVHOPOPTS 39 /* bool; recv hop-by-hop option */ | ||
| 464 | #define IPV6_RECVDSTOPTS 40 /* bool; recv dst option after rthdr */ | ||
| 465 | |||
| 466 | #define IPV6_USE_MIN_MTU 42 /* bool; send packets at the minimum MTU */ | ||
| 467 | #define IPV6_RECVPATHMTU 43 /* bool; notify an according MTU */ | ||
| 468 | |||
| 469 | /* | ||
| 470 | * mtuinfo; get the current path MTU (sopt), 4 bytes int; | ||
| 471 | * MTU notification (cmsg) | ||
| 472 | */ | ||
| 473 | #define IPV6_PATHMTU 44 | ||
| 474 | |||
| 475 | #if 0 /* obsoleted during 2292bis -> 3542 */ | ||
| 476 | /* no data; ND reachability confirm (cmsg only/not in of RFC3542) */ | ||
| 477 | #define IPV6_REACHCONF 45 | ||
| 478 | #endif | ||
| 479 | /* more new socket options introduced in RFC3542 */ | ||
| 480 | #define IPV6_3542PKTINFO 46 /* in6_pktinfo; send if, src addr */ | ||
| 481 | #define IPV6_3542HOPLIMIT 47 /* int; send hop limit */ | ||
| 482 | #define IPV6_3542NEXTHOP 48 /* sockaddr; next hop addr */ | ||
| 483 | #define IPV6_3542HOPOPTS 49 /* ip6_hbh; send hop-by-hop option */ | ||
| 484 | #define IPV6_3542DSTOPTS 50 /* ip6_dest; send dst option befor rthdr */ | ||
| 485 | #define IPV6_3542RTHDR 51 /* ip6_rthdr; send routing header */ | ||
| 486 | |||
| 487 | #define IPV6_PKTINFO IPV6_3542PKTINFO | ||
| 488 | #define IPV6_HOPLIMIT IPV6_3542HOPLIMIT | ||
| 489 | #define IPV6_NEXTHOP IPV6_3542NEXTHOP | ||
| 490 | #define IPV6_HOPOPTS IPV6_3542HOPOPTS | ||
| 491 | #define IPV6_DSTOPTS IPV6_3542DSTOPTS | ||
| 492 | #define IPV6_RTHDR IPV6_3542RTHDR | ||
| 493 | |||
| 494 | #define IPV6_AUTOFLOWLABEL 59 /* bool; attach flowlabel automagically */ | ||
| 495 | |||
| 496 | #define IPV6_DONTFRAG 62 /* bool; disable IPv6 fragmentation */ | ||
| 497 | |||
| 498 | /* int; prefer temporary addresses as the source address. */ | ||
| 499 | #define IPV6_PREFER_TEMPADDR 63 | ||
| 500 | |||
| 501 | /* | ||
| 502 | * The following option is private; do not use it from user applications. | ||
| 503 | * It is deliberately defined to the same value as IP_MSFILTER. | ||
| 504 | */ | ||
| 505 | #define IPV6_MSFILTER 74 /* struct __msfilterreq; */ | ||
| 506 | #endif /* __APPLE_USE_RFC_3542 */ | ||
| 507 | |||
| 508 | #define IPV6_BOUND_IF 125 /* int; set/get bound interface */ | ||
| 509 | |||
| 510 | |||
| 511 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 512 | |||
| 513 | #define IPV6_RTHDR_LOOSE 0 /* this hop need not be a neighbor. */ | ||
| 514 | #define IPV6_RTHDR_STRICT 1 /* this hop must be a neighbor. */ | ||
| 515 | #define IPV6_RTHDR_TYPE_0 0 /* IPv6 routing header type 0 */ | ||
| 516 | |||
| 517 | /* | ||
| 518 | * Defaults and limits for options | ||
| 519 | */ | ||
| 520 | #define IPV6_DEFAULT_MULTICAST_HOPS 1 /* normally limit m'casts to 1 hop */ | ||
| 521 | #define IPV6_DEFAULT_MULTICAST_LOOP 1 /* normally hear sends if a member */ | ||
| 522 | |||
| 523 | /* | ||
| 524 | * The im6o_membership vector for each socket is now dynamically allocated at | ||
| 525 | * run-time, bounded by USHRT_MAX, and is reallocated when needed, sized | ||
| 526 | * according to a power-of-two increment. | ||
| 527 | */ | ||
| 528 | #define IPV6_MIN_MEMBERSHIPS 31 | ||
| 529 | #define IPV6_MAX_MEMBERSHIPS 4095 | ||
| 530 | |||
| 531 | /* | ||
| 532 | * Default resource limits for IPv6 multicast source filtering. | ||
| 533 | * These may be modified by sysctl. | ||
| 534 | */ | ||
| 535 | #define IPV6_MAX_GROUP_SRC_FILTER 512 /* sources per group */ | ||
| 536 | #define IPV6_MAX_SOCK_SRC_FILTER 128 /* sources per socket/group */ | ||
| 537 | |||
| 538 | /* | ||
| 539 | * Argument structure for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. | ||
| 540 | */ | ||
| 541 | struct ipv6_mreq { | ||
| 542 | 	struct in6_addr ipv6mr_multiaddr; | ||
| 543 | 	unsigned int ipv6mr_interface; | ||
| 544 | }; | ||
| 545 | |||
| 546 | /* | ||
| 547 | * IPV6_2292PKTINFO: Packet information(RFC2292 sec 5) | ||
| 548 | */ | ||
| 549 | struct in6_pktinfo { | ||
| 550 | 	struct in6_addr ipi6_addr; /* src/dst IPv6 address */ | ||
| 551 | 	unsigned int ipi6_ifindex; /* send/recv interface index */ | ||
| 552 | }; | ||
| 553 | |||
| 554 | /* | ||
| 555 | * Control structure for IPV6_RECVPATHMTU socket option. | ||
| 556 | */ | ||
| 557 | struct ip6_mtuinfo { | ||
| 558 | 	struct sockaddr_in6 ip6m_addr; /* or sockaddr_storage? */ | ||
| 559 | 	uint32_t ip6m_mtu; | ||
| 560 | }; | ||
| 561 | |||
| 562 | /* | ||
| 563 | * Argument for IPV6_PORTRANGE: | ||
| 564 | * - which range to search when port is unspecified at bind() or connect() | ||
| 565 | */ | ||
| 566 | #define IPV6_PORTRANGE_DEFAULT 0 /* default range */ | ||
| 567 | #define IPV6_PORTRANGE_HIGH 1 /* "high" - request firewall bypass */ | ||
| 568 | #define IPV6_PORTRANGE_LOW 2 /* "low" - vouchsafe security */ | ||
| 569 | |||
| 570 | /* | ||
| 571 | * Definitions for inet6 sysctl operations. | ||
| 572 | * | ||
| 573 | * Third level is protocol number. | ||
| 574 | * Fourth level is desired variable within that protocol. | ||
| 575 | */ | ||
| 576 | #define IPV6PROTO_MAXID (IPPROTO_PIM + 1) /* don't list to IPV6PROTO_MAX */ | ||
| 577 | |||
| 578 | /* | ||
| 579 | * Names for IP sysctl objects | ||
| 580 | */ | ||
| 581 | #define IPV6CTL_FORWARDING 1 /* act as router */ | ||
| 582 | #define IPV6CTL_SENDREDIRECTS 2 /* may send redirects when forwarding */ | ||
| 583 | #define IPV6CTL_DEFHLIM 3 /* default Hop-Limit */ | ||
| 584 | #ifdef notyet | ||
| 585 | #define IPV6CTL_DEFMTU 4 /* default MTU */ | ||
| 586 | #endif | ||
| 587 | #define IPV6CTL_FORWSRCRT 5 /* forward source-routed dgrams */ | ||
| 588 | #define IPV6CTL_STATS 6 /* stats */ | ||
| 589 | #define IPV6CTL_MRTSTATS 7 /* multicast forwarding stats */ | ||
| 590 | #define IPV6CTL_MRTPROTO 8 /* multicast routing protocol */ | ||
| 591 | #define IPV6CTL_MAXFRAGPACKETS 9 /* max packets reassembly queue */ | ||
| 592 | #define IPV6CTL_SOURCECHECK 10 /* verify source route and intf */ | ||
| 593 | #define IPV6CTL_SOURCECHECK_LOGINT 11 /* minimume logging interval */ | ||
| 594 | #define IPV6CTL_ACCEPT_RTADV 12 | ||
| 595 | #define IPV6CTL_KEEPFAITH 13 /* deprecated */ | ||
| 596 | #define IPV6CTL_LOG_INTERVAL 14 | ||
| 597 | #define IPV6CTL_HDRNESTLIMIT 15 | ||
| 598 | #define IPV6CTL_DAD_COUNT 16 | ||
| 599 | #define IPV6CTL_AUTO_FLOWLABEL 17 | ||
| 600 | #define IPV6CTL_DEFMCASTHLIM 18 | ||
| 601 | #define IPV6CTL_GIF_HLIM 19 /* default HLIM for gif encap packet */ | ||
| 602 | #define IPV6CTL_KAME_VERSION 20 | ||
| 603 | #define IPV6CTL_USE_DEPRECATED 21 /* use deprec addr (RFC2462 5.5.4) */ | ||
| 604 | #define IPV6CTL_RR_PRUNE 22 /* walk timer for router renumbering */ | ||
| 605 | #if 0 /* obsolete */ | ||
| 606 | #define IPV6CTL_MAPPED_ADDR 23 | ||
| 607 | #endif | ||
| 608 | #define IPV6CTL_V6ONLY 24 | ||
| 609 | #define IPV6CTL_RTEXPIRE 25 /* cloned route expiration time */ | ||
| 610 | #define IPV6CTL_RTMINEXPIRE 26 /* min value for expiration time */ | ||
| 611 | #define IPV6CTL_RTMAXCACHE 27 /* trigger level for dynamic expire */ | ||
| 612 | |||
| 613 | #define IPV6CTL_USETEMPADDR 32 /* use temporary addresses [RFC 4941] */ | ||
| 614 | #define IPV6CTL_TEMPPLTIME 33 /* preferred lifetime for tmpaddrs */ | ||
| 615 | #define IPV6CTL_TEMPVLTIME 34 /* valid lifetime for tmpaddrs */ | ||
| 616 | #define IPV6CTL_AUTO_LINKLOCAL 35 /* automatic link-local addr assign */ | ||
| 617 | #define IPV6CTL_RIP6STATS 36 /* raw_ip6 stats */ | ||
| 618 | #define IPV6CTL_PREFER_TEMPADDR 37 /* prefer temporary addr as src */ | ||
| 619 | #define IPV6CTL_ADDRCTLPOLICY 38 /* get/set address selection policy */ | ||
| 620 | #define IPV6CTL_USE_DEFAULTZONE 39 /* use default scope zone */ | ||
| 621 | |||
| 622 | #define IPV6CTL_MAXFRAGS 41 /* max fragments */ | ||
| 623 | #define IPV6CTL_MCAST_PMTU 44 /* enable pMTU discovery for mcast? */ | ||
| 624 | |||
| 625 | #define IPV6CTL_NEIGHBORGCTHRESH 46 | ||
| 626 | #define IPV6CTL_MAXIFPREFIXES 47 | ||
| 627 | #define IPV6CTL_MAXIFDEFROUTERS 48 | ||
| 628 | #define IPV6CTL_MAXDYNROUTES 49 | ||
| 629 | #define ICMPV6CTL_ND6_ONLINKNSRFC4861 50 | ||
| 630 | #define IPV6CTL_ULA_USETEMPADDR 51 | ||
| 631 | |||
| 632 | |||
| 633 | /* New entries should be added here from current IPV6CTL_MAXID value. */ | ||
| 634 | /* to define items, should talk with KAME guys first, for *BSD compatibility */ | ||
| 635 | #define IPV6CTL_MAXID 51 | ||
| 636 | |||
| 637 | |||
| 638 | |||
| 639 | |||
| 640 | |||
| 641 | __BEGIN_DECLS | ||
| 642 | struct cmsghdr; | ||
| 643 | |||
| 644 | extern int inet6_option_space(int); | ||
| 645 | extern int inet6_option_init(void *, struct cmsghdr **, int); | ||
| 646 | extern int inet6_option_append(struct cmsghdr *, const __uint8_t *, int, int); | ||
| 647 | extern __uint8_t *inet6_option_alloc(struct cmsghdr *, int, int, int); | ||
| 648 | extern int inet6_option_next(const struct cmsghdr *, __uint8_t **); | ||
| 649 | extern int inet6_option_find(const struct cmsghdr *, __uint8_t **, int); | ||
| 650 | |||
| 651 | extern size_t inet6_rthdr_space(int, int); | ||
| 652 | extern struct cmsghdr *inet6_rthdr_init(void *, int); | ||
| 653 | extern int inet6_rthdr_add(struct cmsghdr *, const struct in6_addr *, | ||
| 654 | unsigned int); | ||
| 655 | extern int inet6_rthdr_lasthop(struct cmsghdr *, unsigned int); | ||
| 656 | #if 0 /* not implemented yet */ | ||
| 657 | extern int inet6_rthdr_reverse(const struct cmsghdr *, struct cmsghdr *); | ||
| 658 | #endif | ||
| 659 | extern int inet6_rthdr_segments(const struct cmsghdr *); | ||
| 660 | extern struct in6_addr *inet6_rthdr_getaddr(struct cmsghdr *, int); | ||
| 661 | extern int inet6_rthdr_getflags(const struct cmsghdr *, int); | ||
| 662 | |||
| 663 | extern int inet6_opt_init(void *, socklen_t); | ||
| 664 | extern int inet6_opt_append(void *, socklen_t, int, __uint8_t, socklen_t, | ||
| 665 | __uint8_t, void **); | ||
| 666 | extern int inet6_opt_finish(void *, socklen_t, int); | ||
| 667 | extern int inet6_opt_set_val(void *, int, void *, socklen_t); | ||
| 668 | |||
| 669 | extern int inet6_opt_next(void *, socklen_t, int, __uint8_t *, socklen_t *, | ||
| 670 | void **); | ||
| 671 | extern int inet6_opt_find(void *, socklen_t, int, __uint8_t, socklen_t *, | ||
| 672 | void **); | ||
| 673 | extern int inet6_opt_get_val(void *, int, void *, socklen_t); | ||
| 674 | extern socklen_t inet6_rth_space(int, int); | ||
| 675 | extern void *inet6_rth_init(void *, socklen_t, int, int); | ||
| 676 | extern int inet6_rth_add(void *, const struct in6_addr *); | ||
| 677 | extern int inet6_rth_reverse(const void *, void *); | ||
| 678 | extern int inet6_rth_segments(const void *); | ||
| 679 | extern struct in6_addr *inet6_rth_getaddr(const void *, int); | ||
| 680 | |||
| 681 | __END_DECLS | ||
| 682 | #endif /* PLATFORM_DriverKit */ | ||
| 683 | #endif /* !_NETINET6_IN6_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/objc/NSObjCRuntime.h deleted-33| ... | @@ -1,33 +0,0 @@ | ||
| 1 | /*	NSObjCRuntime.h | ||
| 2 | 	Copyright (c) 1994-2012, Apple Inc. All rights reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _OBJC_NSOBJCRUNTIME_H_ | ||
| 6 | #define _OBJC_NSOBJCRUNTIME_H_ | ||
| 7 | |||
| 8 | #include <TargetConditionals.h> | ||
| 9 | #include <objc/objc.h> | ||
| 10 | |||
| 11 | #if __LP64__ || TARGET_OS_WIN32 || NS_BUILD_32_LIKE_64 | ||
| 12 | typedef long NSInteger; | ||
| 13 | typedef unsigned long NSUInteger; | ||
| 14 | #else | ||
| 15 | typedef int NSInteger; | ||
| 16 | typedef unsigned int NSUInteger; | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #define NSIntegerMax LONG_MAX | ||
| 20 | #define NSIntegerMin LONG_MIN | ||
| 21 | #define NSUIntegerMax ULONG_MAX | ||
| 22 | |||
| 23 | #define NSINTEGER_DEFINED 1 | ||
| 24 | |||
| 25 | #ifndef NS_DESIGNATED_INITIALIZER | ||
| 26 | #if __has_attribute(objc_designated_initializer) | ||
| 27 | #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 28 | #else | ||
| 29 | #define NS_DESIGNATED_INITIALIZER | ||
| 30 | #endif | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/objc/message.h deleted-319| ... | @@ -1,319 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef _OBJC_MESSAGE_H | ||
| 25 | #define _OBJC_MESSAGE_H | ||
| 26 | |||
| 27 | #include <objc/objc.h> | ||
| 28 | #include <objc/runtime.h> | ||
| 29 | |||
| 30 | #ifndef OBJC_SUPER | ||
| 31 | #define OBJC_SUPER | ||
| 32 | |||
| 33 | /// Specifies the superclass of an instance. | ||
| 34 | struct objc_super { | ||
| 35 | /// Specifies an instance of a class. | ||
| 36 | __unsafe_unretained _Nonnull id receiver; | ||
| 37 | |||
| 38 | /// Specifies the particular superclass of the instance to message. | ||
| 39 | #if !defined(__cplusplus) && !__OBJC2__ | ||
| 40 | /* For compatibility with old objc-runtime.h header */ | ||
| 41 | __unsafe_unretained _Nonnull Class class; | ||
| 42 | #else | ||
| 43 | __unsafe_unretained _Nonnull Class super_class; | ||
| 44 | #endif | ||
| 45 | /* super_class is the first class to search */ | ||
| 46 | }; | ||
| 47 | #endif | ||
| 48 | |||
| 49 | |||
| 50 | /* Basic Messaging Primitives | ||
| 51 | * | ||
| 52 | * On some architectures, use objc_msgSend_stret for some struct return types. | ||
| 53 | * On some architectures, use objc_msgSend_fpret for some float return types. | ||
| 54 | * On some architectures, use objc_msgSend_fp2ret for some float return types. | ||
| 55 | * | ||
| 56 | * These functions must be cast to an appropriate function pointer type | ||
| 57 | * before being called. | ||
| 58 | */ | ||
| 59 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 60 | #pragma clang diagnostic push | ||
| 61 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 62 | OBJC_EXPORT void | ||
| 63 | objc_msgSend(void /* id self, SEL op, ... */ ) | ||
| 64 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 65 | |||
| 66 | OBJC_EXPORT void | ||
| 67 | objc_msgSendSuper(void /* struct objc_super *super, SEL op, ... */ ) | ||
| 68 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 69 | #pragma clang diagnostic pop | ||
| 70 | #else | ||
| 71 | /** | ||
| 72 | * Sends a message with a simple return value to an instance of a class. | ||
| 73 | * | ||
| 74 | * @param self A pointer to the instance of the class that is to receive the message. | ||
| 75 | * @param op The selector of the method that handles the message. | ||
| 76 | * @param ... | ||
| 77 | * A variable argument list containing the arguments to the method. | ||
| 78 | * | ||
| 79 | * @return The return value of the method. | ||
| 80 | * | ||
| 81 | * @note When it encounters a method call, the compiler generates a call to one of the | ||
| 82 | * functions \c objc_msgSend, \c objc_msgSend_stret, \c objc_msgSendSuper, or \c objc_msgSendSuper_stret. | ||
| 83 | * Messages sent to an object’s superclass (using the \c super keyword) are sent using \c objc_msgSendSuper; | ||
| 84 | * other messages are sent using \c objc_msgSend. Methods that have data structures as return values | ||
| 85 | * are sent using \c objc_msgSendSuper_stret and \c objc_msgSend_stret. | ||
| 86 | */ | ||
| 87 | OBJC_EXPORT id _Nullable | ||
| 88 | objc_msgSend(id _Nullable self, SEL _Nonnull op, ...) | ||
| 89 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 90 | /** | ||
| 91 | * Sends a message with a simple return value to the superclass of an instance of a class. | ||
| 92 | * | ||
| 93 | * @param super A pointer to an \c objc_super data structure. Pass values identifying the | ||
| 94 | * context the message was sent to, including the instance of the class that is to receive the | ||
| 95 | * message and the superclass at which to start searching for the method implementation. | ||
| 96 | * @param op A pointer of type SEL. Pass the selector of the method that will handle the message. | ||
| 97 | * @param ... | ||
| 98 | * A variable argument list containing the arguments to the method. | ||
| 99 | * | ||
| 100 | * @return The return value of the method identified by \e op. | ||
| 101 | * | ||
| 102 | * @see objc_msgSend | ||
| 103 | */ | ||
| 104 | OBJC_EXPORT id _Nullable | ||
| 105 | objc_msgSendSuper(struct objc_super * _Nonnull super, SEL _Nonnull op, ...) | ||
| 106 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 107 | #endif | ||
| 108 | |||
| 109 | |||
| 110 | /* Struct-returning Messaging Primitives | ||
| 111 | * | ||
| 112 | * Use these functions to call methods that return structs on the stack. | ||
| 113 | * On some architectures, some structures are returned in registers. | ||
| 114 | * Consult your local function call ABI documentation for details. | ||
| 115 | * | ||
| 116 | * These functions must be cast to an appropriate function pointer type | ||
| 117 | * before being called. | ||
| 118 | */ | ||
| 119 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 120 | #pragma clang diagnostic push | ||
| 121 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 122 | OBJC_EXPORT void | ||
| 123 | objc_msgSend_stret(void /* id self, SEL op, ... */ ) | ||
| 124 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 125 | OBJC_ARM64_UNAVAILABLE; | ||
| 126 | |||
| 127 | OBJC_EXPORT void | ||
| 128 | objc_msgSendSuper_stret(void /* struct objc_super *super, SEL op, ... */ ) | ||
| 129 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 130 | OBJC_ARM64_UNAVAILABLE; | ||
| 131 | #pragma clang diagnostic pop | ||
| 132 | #else | ||
| 133 | /** | ||
| 134 | * Sends a message with a data-structure return value to an instance of a class. | ||
| 135 | * | ||
| 136 | * @see objc_msgSend | ||
| 137 | */ | ||
| 138 | OBJC_EXPORT void | ||
| 139 | objc_msgSend_stret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 140 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 141 | OBJC_ARM64_UNAVAILABLE; | ||
| 142 | |||
| 143 | /** | ||
| 144 | * Sends a message with a data-structure return value to the superclass of an instance of a class. | ||
| 145 | * | ||
| 146 | * @see objc_msgSendSuper | ||
| 147 | */ | ||
| 148 | OBJC_EXPORT void | ||
| 149 | objc_msgSendSuper_stret(struct objc_super * _Nonnull super, | ||
| 150 | SEL _Nonnull op, ...) | ||
| 151 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 152 | OBJC_ARM64_UNAVAILABLE; | ||
| 153 | #endif | ||
| 154 | |||
| 155 | |||
| 156 | /* Floating-point-returning Messaging Primitives | ||
| 157 | * | ||
| 158 | * Use these functions to call methods that return floating-point values | ||
| 159 | * on the stack. | ||
| 160 | * Consult your local function call ABI documentation for details. | ||
| 161 | * | ||
| 162 | * arm: objc_msgSend_fpret not used | ||
| 163 | * i386: objc_msgSend_fpret used for `float`, `double`, `long double`. | ||
| 164 | * x86-64: objc_msgSend_fpret used for `long double`. | ||
| 165 | * | ||
| 166 | * arm: objc_msgSend_fp2ret not used | ||
| 167 | * i386: objc_msgSend_fp2ret not used | ||
| 168 | * x86-64: objc_msgSend_fp2ret used for `_Complex long double`. | ||
| 169 | * | ||
| 170 | * These functions must be cast to an appropriate function pointer type | ||
| 171 | * before being called. | ||
| 172 | */ | ||
| 173 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 174 | #pragma clang diagnostic push | ||
| 175 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 176 | |||
| 177 | # if defined(__i386__) | ||
| 178 | |||
| 179 | OBJC_EXPORT void | ||
| 180 | objc_msgSend_fpret(void /* id self, SEL op, ... */ ) | ||
| 181 | OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); | ||
| 182 | |||
| 183 | # elif defined(__x86_64__) | ||
| 184 | |||
| 185 | OBJC_EXPORT void | ||
| 186 | objc_msgSend_fpret(void /* id self, SEL op, ... */ ) | ||
| 187 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 188 | |||
| 189 | OBJC_EXPORT void | ||
| 190 | objc_msgSend_fp2ret(void /* id self, SEL op, ... */ ) | ||
| 191 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 192 | |||
| 193 | #pragma clang diagnostic pop | ||
| 194 | # endif | ||
| 195 | |||
| 196 | // !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 197 | #else | ||
| 198 | // OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 199 | # if defined(__i386__) | ||
| 200 | |||
| 201 | /** | ||
| 202 | * Sends a message with a floating-point return value to an instance of a class. | ||
| 203 | * | ||
| 204 | * @see objc_msgSend | ||
| 205 | * @note On the i386 platform, the ABI for functions returning a floating-point value is | ||
| 206 | * incompatible with that for functions returning an integral type. On the i386 platform, therefore, | ||
| 207 | * you must use \c objc_msgSend_fpret for functions returning non-integral type. For \c float or | ||
| 208 | * \c long \c double return types, cast the function to an appropriate function pointer type first. | ||
| 209 | */ | ||
| 210 | #pragma clang diagnostic push | ||
| 211 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 212 | OBJC_EXPORT double | ||
| 213 | objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 214 | OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); | ||
| 215 | #pragma clang diagnostic pop | ||
| 216 | |||
| 217 | /* Use objc_msgSendSuper() for fp-returning messages to super. */ | ||
| 218 | /* See also objc_msgSendv_fpret() below. */ | ||
| 219 | |||
| 220 | # elif defined(__x86_64__) | ||
| 221 | /** | ||
| 222 | * Sends a message with a floating-point return value to an instance of a class. | ||
| 223 | * | ||
| 224 | * @see objc_msgSend | ||
| 225 | */ | ||
| 226 | OBJC_EXPORT long double | ||
| 227 | objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 228 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 229 | |||
| 230 | # if __STDC_VERSION__ >= 199901L | ||
| 231 | OBJC_EXPORT _Complex long double | ||
| 232 | objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 233 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 234 | # else | ||
| 235 | OBJC_EXPORT void objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 236 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 237 | # endif | ||
| 238 | |||
| 239 | /* Use objc_msgSendSuper() for fp-returning messages to super. */ | ||
| 240 | /* See also objc_msgSendv_fpret() below. */ | ||
| 241 | |||
| 242 | # endif | ||
| 243 | |||
| 244 | // OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 245 | #endif | ||
| 246 | |||
| 247 | |||
| 248 | /* Direct Method Invocation Primitives | ||
| 249 | * Use these functions to call the implementation of a given Method. | ||
| 250 | * This is faster than calling method_getImplementation() and method_getName(). | ||
| 251 | * | ||
| 252 | * The receiver must not be nil. | ||
| 253 | * | ||
| 254 | * These functions must be cast to an appropriate function pointer type | ||
| 255 | * before being called. | ||
| 256 | */ | ||
| 257 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 258 | #pragma clang diagnostic push | ||
| 259 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 260 | OBJC_EXPORT void | ||
| 261 | method_invoke(void /* id receiver, Method m, ... */ ) | ||
| 262 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 263 | |||
| 264 | OBJC_EXPORT void | ||
| 265 | method_invoke_stret(void /* id receiver, Method m, ... */ ) | ||
| 266 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) | ||
| 267 | OBJC_ARM64_UNAVAILABLE; | ||
| 268 | #pragma clang diagnostic pop | ||
| 269 | #else | ||
| 270 | OBJC_EXPORT id _Nullable | ||
| 271 | method_invoke(id _Nullable receiver, Method _Nonnull m, ...) | ||
| 272 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 273 | |||
| 274 | OBJC_EXPORT void | ||
| 275 | method_invoke_stret(id _Nullable receiver, Method _Nonnull m, ...) | ||
| 276 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) | ||
| 277 | OBJC_ARM64_UNAVAILABLE; | ||
| 278 | #endif | ||
| 279 | |||
| 280 | |||
| 281 | /* Message Forwarding Primitives | ||
| 282 | * Use these functions to forward a message as if the receiver did not | ||
| 283 | * respond to it. | ||
| 284 | * | ||
| 285 | * The receiver must not be nil. | ||
| 286 | * | ||
| 287 | * class_getMethodImplementation() may return (IMP)_objc_msgForward. | ||
| 288 | * class_getMethodImplementation_stret() may return (IMP)_objc_msgForward_stret | ||
| 289 | * | ||
| 290 | * These functions must be cast to an appropriate function pointer type | ||
| 291 | * before being called. | ||
| 292 | * | ||
| 293 | * Before Mac OS X 10.6, _objc_msgForward must not be called directly | ||
| 294 | * but may be compared to other IMP values. | ||
| 295 | */ | ||
| 296 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 297 | #pragma clang diagnostic push | ||
| 298 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 299 | OBJC_EXPORT void | ||
| 300 | _objc_msgForward(void /* id receiver, SEL sel, ... */ ) | ||
| 301 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 302 | |||
| 303 | OBJC_EXPORT void | ||
| 304 | _objc_msgForward_stret(void /* id receiver, SEL sel, ... */ ) | ||
| 305 | OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) | ||
| 306 | OBJC_ARM64_UNAVAILABLE; | ||
| 307 | #pragma clang diagnostic pop | ||
| 308 | #else | ||
| 309 | OBJC_EXPORT id _Nullable | ||
| 310 | _objc_msgForward(id _Nonnull receiver, SEL _Nonnull sel, ...) | ||
| 311 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 312 | |||
| 313 | OBJC_EXPORT void | ||
| 314 | _objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) | ||
| 315 | OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) | ||
| 316 | OBJC_ARM64_UNAVAILABLE; | ||
| 317 | #endif | ||
| 318 | |||
| 319 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/objc/objc-api.h deleted-296| ... | @@ -1,296 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2006 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 | // Copyright 1988-1996 NeXT Software, Inc. | ||
| 24 | |||
| 25 | #ifndef _OBJC_OBJC_API_H_ | ||
| 26 | #define _OBJC_OBJC_API_H_ | ||
| 27 | |||
| 28 | #include <Availability.h> | ||
| 29 | #include <AvailabilityMacros.h> | ||
| 30 | #include <TargetConditionals.h> | ||
| 31 | #include <sys/types.h> | ||
| 32 | |||
| 33 | #ifndef __has_feature | ||
| 34 | # define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef __has_extension | ||
| 38 | # define __has_extension __has_feature | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifndef __has_attribute | ||
| 42 | # define __has_attribute(x) 0 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #if !__has_feature(nullability) | ||
| 46 | # ifndef _Nullable | ||
| 47 | # define _Nullable | ||
| 48 | # endif | ||
| 49 | # ifndef _Nonnull | ||
| 50 | # define _Nonnull | ||
| 51 | # endif | ||
| 52 | # ifndef _Null_unspecified | ||
| 53 | # define _Null_unspecified | ||
| 54 | # endif | ||
| 55 | #endif | ||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | /* | ||
| 60 | * OBJC_API_VERSION 0 or undef: Tiger and earlier API only | ||
| 61 | * OBJC_API_VERSION 2: Leopard and later API available | ||
| 62 | */ | ||
| 63 | #if !defined(OBJC_API_VERSION) | ||
| 64 | # if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_5 | ||
| 65 | # define OBJC_API_VERSION 0 | ||
| 66 | # else | ||
| 67 | # define OBJC_API_VERSION 2 | ||
| 68 | # endif | ||
| 69 | #endif | ||
| 70 | |||
| 71 | |||
| 72 | /* | ||
| 73 | * OBJC_NO_GC 1: GC is not supported | ||
| 74 | * OBJC_NO_GC undef: GC is supported. This SDK no longer supports this mode. | ||
| 75 | * | ||
| 76 | * OBJC_NO_GC_API undef: Libraries must export any symbols that | ||
| 77 | * dual-mode code may links to. | ||
| 78 | * OBJC_NO_GC_API 1: Libraries need not export GC-related symbols. | ||
| 79 | */ | ||
| 80 | #if defined(__OBJC_GC__) | ||
| 81 | # error Objective-C garbage collection is not supported. | ||
| 82 | #elif TARGET_OS_OSX | ||
| 83 | /* GC is unsupported. GC API symbols are exported. */ | ||
| 84 | # define OBJC_NO_GC 1 | ||
| 85 | # undef OBJC_NO_GC_API | ||
| 86 | #else | ||
| 87 | /* GC is unsupported. GC API symbols are not exported. */ | ||
| 88 | # define OBJC_NO_GC 1 | ||
| 89 | # define OBJC_NO_GC_API 1 | ||
| 90 | #endif | ||
| 91 | |||
| 92 | |||
| 93 | /* NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER == 1 | ||
| 94 | * marks -[NSObject init] as a designated initializer. */ | ||
| 95 | #if !defined(NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER) | ||
| 96 | # define NS_ENFORCE_NSOBJECT_DESIGNATED_INITIALIZER 1 | ||
| 97 | #endif | ||
| 98 | |||
| 99 | /* The arm64 ABI requires proper casting to ensure arguments are passed | ||
| 100 | * * correctly. */ | ||
| 101 | #if defined(__arm64__) && !__swift__ | ||
| 102 | # undef OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 103 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 104 | #endif | ||
| 105 | |||
| 106 | /* OBJC_OLD_DISPATCH_PROTOTYPES == 0 enforces the rule that the dispatch | ||
| 107 | * functions must be cast to an appropriate function pointer type. */ | ||
| 108 | #if !defined(OBJC_OLD_DISPATCH_PROTOTYPES) | ||
| 109 | # if __swift__ | ||
| 110 | // Existing Swift code expects IMP to be Comparable. | ||
| 111 | // Variadic IMP is comparable via OpaquePointer; non-variadic IMP isn't. | ||
| 112 | # define OBJC_OLD_DISPATCH_PROTOTYPES 1 | ||
| 113 | # else | ||
| 114 | # define OBJC_OLD_DISPATCH_PROTOTYPES 0 | ||
| 115 | # endif | ||
| 116 | #endif | ||
| 117 | |||
| 118 | |||
| 119 | /* OBJC_AVAILABLE: shorthand for all-OS availability */ | ||
| 120 | |||
| 121 | # if !defined(OBJC_AVAILABLE) | ||
| 122 | # define OBJC_AVAILABLE(x, i, t, w, b) \ | ||
| 123 | __OSX_AVAILABLE(x) __IOS_AVAILABLE(i) __TVOS_AVAILABLE(t) \ | ||
| 124 | __WATCHOS_AVAILABLE(w) | ||
| 125 | # endif | ||
| 126 | |||
| 127 | |||
| 128 | |||
| 129 | /* OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE: Deprecated on OS X, | ||
| 130 | * unavailable everywhere else. */ | ||
| 131 | |||
| 132 | # if !defined(OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE) | ||
| 133 | # define OBJC_OSX_DEPRECATED_OTHERS_UNAVAILABLE(_start, _dep, _msg) \ | ||
| 134 | __OSX_DEPRECATED(_start, _dep, _msg) \ | ||
| 135 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 136 | __WATCHOS_UNAVAILABLE | ||
| 137 | # endif | ||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | /* OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE: Available on OS X, | ||
| 142 | * unavailable everywhere else. */ | ||
| 143 | |||
| 144 | # if !defined(OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE) | ||
| 145 | # define OBJC_OSX_AVAILABLE_OTHERS_UNAVAILABLE(vers) \ | ||
| 146 | __OSX_AVAILABLE(vers) \ | ||
| 147 | __IOS_UNAVAILABLE __TVOS_UNAVAILABLE \ | ||
| 148 | __WATCHOS_UNAVAILABLE | ||
| 149 | # endif | ||
| 150 | |||
| 151 | |||
| 152 | |||
| 153 | /* OBJC_ISA_AVAILABILITY: `isa` will be deprecated or unavailable | ||
| 154 | * in the future */ | ||
| 155 | #if !defined(OBJC_ISA_AVAILABILITY) | ||
| 156 | # if __OBJC2__ | ||
| 157 | # define OBJC_ISA_AVAILABILITY __attribute__((deprecated)) | ||
| 158 | # else | ||
| 159 | # define OBJC_ISA_AVAILABILITY /* still available */ | ||
| 160 | # endif | ||
| 161 | #endif | ||
| 162 | |||
| 163 | /* OBJC_UNAVAILABLE: unavailable, with a message where supported */ | ||
| 164 | #if !defined(OBJC_UNAVAILABLE) | ||
| 165 | # if __has_extension(attribute_unavailable_with_message) | ||
| 166 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable(_msg))) | ||
| 167 | # else | ||
| 168 | # define OBJC_UNAVAILABLE(_msg) __attribute__((unavailable)) | ||
| 169 | # endif | ||
| 170 | #endif | ||
| 171 | |||
| 172 | /* OBJC_DEPRECATED: deprecated, with a message where supported */ | ||
| 173 | #if !defined(OBJC_DEPRECATED) | ||
| 174 | # if __has_extension(attribute_deprecated_with_message) | ||
| 175 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated(_msg))) | ||
| 176 | # else | ||
| 177 | # define OBJC_DEPRECATED(_msg) __attribute__((deprecated)) | ||
| 178 | # endif | ||
| 179 | #endif | ||
| 180 | |||
| 181 | /* OBJC_ARC_UNAVAILABLE: unavailable with -fobjc-arc */ | ||
| 182 | #if !defined(OBJC_ARC_UNAVAILABLE) | ||
| 183 | # if __has_feature(objc_arc) | ||
| 184 | # define OBJC_ARC_UNAVAILABLE OBJC_UNAVAILABLE("not available in automatic reference counting mode") | ||
| 185 | # else | ||
| 186 | # define OBJC_ARC_UNAVAILABLE | ||
| 187 | # endif | ||
| 188 | #endif | ||
| 189 | |||
| 190 | /* OBJC_SWIFT_UNAVAILABLE: unavailable in Swift */ | ||
| 191 | #if !defined(OBJC_SWIFT_UNAVAILABLE) | ||
| 192 | # if __has_feature(attribute_availability_swift) | ||
| 193 | # define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg))) | ||
| 194 | # else | ||
| 195 | # define OBJC_SWIFT_UNAVAILABLE(_msg) | ||
| 196 | # endif | ||
| 197 | #endif | ||
| 198 | |||
| 199 | /* OBJC_ARM64_UNAVAILABLE: unavailable on arm64 (i.e. stret dispatch) */ | ||
| 200 | #if !defined(OBJC_ARM64_UNAVAILABLE) | ||
| 201 | # if defined(__arm64__) | ||
| 202 | # define OBJC_ARM64_UNAVAILABLE OBJC_UNAVAILABLE("not available in arm64") | ||
| 203 | # else | ||
| 204 | # define OBJC_ARM64_UNAVAILABLE | ||
| 205 | # endif | ||
| 206 | #endif | ||
| 207 | |||
| 208 | /* OBJC_GC_UNAVAILABLE: unavailable with -fobjc-gc or -fobjc-gc-only */ | ||
| 209 | #if !defined(OBJC_GC_UNAVAILABLE) | ||
| 210 | # define OBJC_GC_UNAVAILABLE | ||
| 211 | #endif | ||
| 212 | |||
| 213 | #if !defined(OBJC_EXTERN) | ||
| 214 | # if defined(__cplusplus) | ||
| 215 | # define OBJC_EXTERN extern "C" | ||
| 216 | # else | ||
| 217 | # define OBJC_EXTERN extern | ||
| 218 | # endif | ||
| 219 | #endif | ||
| 220 | |||
| 221 | #if !defined(OBJC_VISIBLE) | ||
| 222 | # if TARGET_OS_WIN32 | ||
| 223 | # if defined(BUILDING_OBJC) | ||
| 224 | # define OBJC_VISIBLE __declspec(dllexport) | ||
| 225 | # else | ||
| 226 | # define OBJC_VISIBLE __declspec(dllimport) | ||
| 227 | # endif | ||
| 228 | # else | ||
| 229 | # define OBJC_VISIBLE __attribute__((visibility("default"))) | ||
| 230 | # endif | ||
| 231 | #endif | ||
| 232 | |||
| 233 | #if !defined(OBJC_EXPORT) | ||
| 234 | # define OBJC_EXPORT OBJC_EXTERN OBJC_VISIBLE | ||
| 235 | #endif | ||
| 236 | |||
| 237 | #if !defined(OBJC_IMPORT) | ||
| 238 | # define OBJC_IMPORT extern | ||
| 239 | #endif | ||
| 240 | |||
| 241 | #if !defined(OBJC_ROOT_CLASS) | ||
| 242 | # if __has_attribute(objc_root_class) | ||
| 243 | # define OBJC_ROOT_CLASS __attribute__((objc_root_class)) | ||
| 244 | # else | ||
| 245 | # define OBJC_ROOT_CLASS | ||
| 246 | # endif | ||
| 247 | #endif | ||
| 248 | |||
| 249 | #ifndef __DARWIN_NULL | ||
| 250 | #define __DARWIN_NULL NULL | ||
| 251 | #endif | ||
| 252 | |||
| 253 | #if !defined(OBJC_INLINE) | ||
| 254 | # define OBJC_INLINE __inline | ||
| 255 | #endif | ||
| 256 | |||
| 257 | // Declares an enum type or option bits type as appropriate for each language. | ||
| 258 | #if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum)) | ||
| 259 | #define OBJC_ENUM(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 260 | #if (__cplusplus) | ||
| 261 | #define OBJC_OPTIONS(_type, _name) _type _name; enum : _type | ||
| 262 | #else | ||
| 263 | #define OBJC_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type | ||
| 264 | #endif | ||
| 265 | #else | ||
| 266 | #define OBJC_ENUM(_type, _name) _type _name; enum | ||
| 267 | #define OBJC_OPTIONS(_type, _name) _type _name; enum | ||
| 268 | #endif | ||
| 269 | |||
| 270 | #if !defined(OBJC_RETURNS_RETAINED) | ||
| 271 | # if __OBJC__ && __has_attribute(ns_returns_retained) | ||
| 272 | # define OBJC_RETURNS_RETAINED __attribute__((ns_returns_retained)) | ||
| 273 | # else | ||
| 274 | # define OBJC_RETURNS_RETAINED | ||
| 275 | # endif | ||
| 276 | #endif | ||
| 277 | |||
| 278 | /* OBJC_COLD: very rarely called, e.g. on error path */ | ||
| 279 | #if !defined(OBJC_COLD) | ||
| 280 | # if __OBJC__ && __has_attribute(cold) | ||
| 281 | # define OBJC_COLD __attribute__((cold)) | ||
| 282 | # else | ||
| 283 | # define OBJC_COLD | ||
| 284 | # endif | ||
| 285 | #endif | ||
| 286 | |||
| 287 | /* OBJC_NORETURN: does not return normally, but may throw */ | ||
| 288 | #if !defined(OBJC_NORETURN) | ||
| 289 | # if __OBJC__ && __has_attribute(noreturn) | ||
| 290 | # define OBJC_NORETURN __attribute__((noreturn)) | ||
| 291 | # else | ||
| 292 | # define OBJC_NORETURN | ||
| 293 | # endif | ||
| 294 | #endif | ||
| 295 | |||
| 296 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/objc/runtime.h+45-31| ... | @@ -1827,37 +1827,51 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously) | ... | @@ -1827,37 +1827,51 @@ _objc_realizeClassFromSwift(Class _Nullable cls, void * _Nullable previously) |
| 1827 | OBJC_AVAILABLE(10.14.4, 12.2, 12.2, 5.2, 3.2); | 1827 | OBJC_AVAILABLE(10.14.4, 12.2, 12.2, 5.2, 3.2); |
| 1828 | #endif | 1828 | #endif |
| 1829 | 1829 | ||
| 1830 | 1830 | // Type encoding characters | |
| 1831 | #define _C_ID '@' | 1831 | #define _C_ID '@' |
| 1832 | #define _C_CLASS '#' | 1832 | #define _C_CLASS '#' |
| 1833 | #define _C_SEL ':' | 1833 | #define _C_SEL ':' |
| 1834 | #define _C_CHR 'c' | 1834 | #define _C_CHR 'c' |
| 1835 | #define _C_UCHR 'C' | 1835 | #define _C_UCHR 'C' |
| 1836 | #define _C_SHT 's' | 1836 | #define _C_SHT 's' |
| 1837 | #define _C_USHT 'S' | 1837 | #define _C_USHT 'S' |
| 1838 | #define _C_INT 'i' | 1838 | #define _C_INT 'i' |
| 1839 | #define _C_UINT 'I' | 1839 | #define _C_UINT 'I' |
| 1840 | #define _C_LNG 'l' | 1840 | #define _C_LNG 'l' |
| 1841 | #define _C_ULNG 'L' | 1841 | #define _C_ULNG 'L' |
| 1842 | #define _C_LNG_LNG 'q' | 1842 | #define _C_LNG_LNG 'q' |
| 1843 | #define _C_ULNG_LNG 'Q' | 1843 | #define _C_ULNG_LNG 'Q' |
| 1844 | #define _C_FLT 'f' | 1844 | #define _C_INT128 't' |
| 1845 | #define _C_DBL 'd' | 1845 | #define _C_UINT128 'T' |
| 1846 | #define _C_BFLD 'b' | 1846 | #define _C_FLT 'f' |
| 1847 | #define _C_BOOL 'B' | 1847 | #define _C_DBL 'd' |
| 1848 | #define _C_VOID 'v' | 1848 | #define _C_LNG_DBL 'D' |
| 1849 | #define _C_UNDEF '?' | 1849 | #define _C_BFLD 'b' |
| 1850 | #define _C_PTR '^' | 1850 | #define _C_BOOL 'B' |
| 1851 | #define _C_CHARPTR '*' | 1851 | #define _C_VOID 'v' |
| 1852 | #define _C_ATOM '%' | 1852 | #define _C_UNDEF '?' |
| 1853 | #define _C_ARY_B '[' | 1853 | #define _C_PTR '^' |
| 1854 | #define _C_ARY_E ']' | 1854 | #define _C_CHARPTR '*' |
| 1855 | #define _C_UNION_B '(' | 1855 | #define _C_ATOM '%' |
| 1856 | #define _C_UNION_E ')' | 1856 | #define _C_ARY_B '[' |
| 1857 | #define _C_STRUCT_B '{' | 1857 | #define _C_ARY_E ']' |
| 1858 | #define _C_STRUCT_E '}' | 1858 | #define _C_UNION_B '(' |
| 1859 | #define _C_VECTOR '!' | 1859 | #define _C_UNION_E ')' |
| 1860 | #define _C_CONST 'r' | 1860 | #define _C_STRUCT_B '{' |
| 1861 | #define _C_STRUCT_E '}' | ||
| 1862 | #define _C_VECTOR '!' | ||
| 1863 | |||
| 1864 | // Modifiers | ||
| 1865 | #define _C_COMPLEX 'j' | ||
| 1866 | #define _C_ATOMIC 'A' | ||
| 1867 | #define _C_CONST 'r' | ||
| 1868 | #define _C_IN 'n' | ||
| 1869 | #define _C_INOUT 'N' | ||
| 1870 | #define _C_OUT 'o' | ||
| 1871 | #define _C_BYCOPY 'O' | ||
| 1872 | #define _C_BYREF 'R' | ||
| 1873 | #define _C_ONEWAY 'V' | ||
| 1874 | #define _C_GNUREGISTER '+' | ||
| 1861 | 1875 | ||
| 1862 | struct objc_method_list; | 1876 | struct objc_method_list; |
| 1863 | 1877 |
lib/libc/include/any-macos.12-any/os/base.h deleted-328| ... | @@ -1,328 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2020 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 7 | * you may not use this file except in compliance with the License. | ||
| 8 | * You may obtain a copy of the License at | ||
| 9 | * | ||
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 11 | * | ||
| 12 | * Unless required by applicable law or agreed to in writing, software | ||
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 15 | * See the License for the specific language governing permissions and | ||
| 16 | * limitations under the License. | ||
| 17 | * | ||
| 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __OS_BASE__ | ||
| 22 | #define __OS_BASE__ | ||
| 23 | |||
| 24 | #include <sys/cdefs.h> | ||
| 25 | |||
| 26 | |||
| 27 | #ifndef __has_builtin | ||
| 28 | #define __has_builtin(x) 0 | ||
| 29 | #endif | ||
| 30 | #ifndef __has_include | ||
| 31 | #define __has_include(x) 0 | ||
| 32 | #endif | ||
| 33 | #ifndef __has_feature | ||
| 34 | #define __has_feature(x) 0 | ||
| 35 | #endif | ||
| 36 | #ifndef __has_attribute | ||
| 37 | #define __has_attribute(x) 0 | ||
| 38 | #endif | ||
| 39 | #ifndef __has_extension | ||
| 40 | #define __has_extension(x) 0 | ||
| 41 | #endif | ||
| 42 | |||
| 43 | #undef OS_INLINE // <sys/_types/_os_inline.h> | ||
| 44 | #if __GNUC__ | ||
| 45 | #define OS_NORETURN __attribute__((__noreturn__)) | ||
| 46 | #define OS_NOTHROW __attribute__((__nothrow__)) | ||
| 47 | #define OS_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 48 | #define OS_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 49 | #define OS_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 50 | #define OS_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 51 | #define OS_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 52 | #define OS_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 53 | #define OS_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 54 | #define OS_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 55 | #define OS_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 56 | #define OS_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 57 | #define OS_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 58 | #define OS_NONNULL12 __attribute__((__nonnull__(12))) | ||
| 59 | #define OS_NONNULL13 __attribute__((__nonnull__(13))) | ||
| 60 | #define OS_NONNULL14 __attribute__((__nonnull__(14))) | ||
| 61 | #define OS_NONNULL15 __attribute__((__nonnull__(15))) | ||
| 62 | #define OS_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 63 | #define OS_SENTINEL __attribute__((__sentinel__)) | ||
| 64 | #define OS_PURE __attribute__((__pure__)) | ||
| 65 | #define OS_CONST __attribute__((__const__)) | ||
| 66 | #define OS_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 67 | #define OS_MALLOC __attribute__((__malloc__)) | ||
| 68 | #define OS_USED __attribute__((__used__)) | ||
| 69 | #define OS_UNUSED __attribute__((__unused__)) | ||
| 70 | #define OS_COLD __attribute__((__cold__)) | ||
| 71 | #define OS_WEAK __attribute__((__weak__)) | ||
| 72 | #define OS_WEAK_IMPORT __attribute__((__weak_import__)) | ||
| 73 | #define OS_NOINLINE __attribute__((__noinline__)) | ||
| 74 | #define OS_ALWAYS_INLINE __attribute__((__always_inline__)) | ||
| 75 | #define OS_TRANSPARENT_UNION __attribute__((__transparent_union__)) | ||
| 76 | #define OS_ALIGNED(n) __attribute__((__aligned__((n)))) | ||
| 77 | #define OS_FORMAT_PRINTF(x, y) __attribute__((__format__(printf,x,y))) | ||
| 78 | #define OS_EXPORT extern __attribute__((__visibility__("default"))) | ||
| 79 | #define OS_INLINE static __inline__ | ||
| 80 | #define OS_EXPECT(x, v) __builtin_expect((x), (v)) | ||
| 81 | #else | ||
| 82 | #define OS_NORETURN | ||
| 83 | #define OS_NOTHROW | ||
| 84 | #define OS_NONNULL1 | ||
| 85 | #define OS_NONNULL2 | ||
| 86 | #define OS_NONNULL3 | ||
| 87 | #define OS_NONNULL4 | ||
| 88 | #define OS_NONNULL5 | ||
| 89 | #define OS_NONNULL6 | ||
| 90 | #define OS_NONNULL7 | ||
| 91 | #define OS_NONNULL8 | ||
| 92 | #define OS_NONNULL9 | ||
| 93 | #define OS_NONNULL10 | ||
| 94 | #define OS_NONNULL11 | ||
| 95 | #define OS_NONNULL12 | ||
| 96 | #define OS_NONNULL13 | ||
| 97 | #define OS_NONNULL14 | ||
| 98 | #define OS_NONNULL15 | ||
| 99 | #define OS_NONNULL_ALL | ||
| 100 | #define OS_SENTINEL | ||
| 101 | #define OS_PURE | ||
| 102 | #define OS_CONST | ||
| 103 | #define OS_WARN_RESULT | ||
| 104 | #define OS_MALLOC | ||
| 105 | #define OS_USED | ||
| 106 | #define OS_UNUSED | ||
| 107 | #define OS_COLD | ||
| 108 | #define OS_WEAK | ||
| 109 | #define OS_WEAK_IMPORT | ||
| 110 | #define OS_NOINLINE | ||
| 111 | #define OS_ALWAYS_INLINE | ||
| 112 | #define OS_TRANSPARENT_UNION | ||
| 113 | #define OS_ALIGNED(n) | ||
| 114 | #define OS_FORMAT_PRINTF(x, y) | ||
| 115 | #define OS_EXPORT extern | ||
| 116 | #define OS_INLINE static inline | ||
| 117 | #define OS_EXPECT(x, v) (x) | ||
| 118 | #endif | ||
| 119 | |||
| 120 | #if __has_attribute(noescape) | ||
| 121 | #define OS_NOESCAPE __attribute__((__noescape__)) | ||
| 122 | #else | ||
| 123 | #define OS_NOESCAPE | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #if defined(__cplusplus) && defined(__clang__) | ||
| 127 | #define OS_FALLTHROUGH [[clang::fallthrough]] | ||
| 128 | #elif __has_attribute(fallthrough) | ||
| 129 | #define OS_FALLTHROUGH __attribute__((__fallthrough__)) | ||
| 130 | #else | ||
| 131 | #define OS_FALLTHROUGH | ||
| 132 | #endif | ||
| 133 | |||
| 134 | #if __has_feature(assume_nonnull) | ||
| 135 | #define OS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 136 | #define OS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 137 | #else | ||
| 138 | #define OS_ASSUME_NONNULL_BEGIN | ||
| 139 | #define OS_ASSUME_NONNULL_END | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #if __has_builtin(__builtin_assume) | ||
| 143 | #define OS_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | ||
| 144 | #else | ||
| 145 | #define OS_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | ||
| 146 | #endif | ||
| 147 | |||
| 148 | #if __has_extension(attribute_overloadable) | ||
| 149 | #define OS_OVERLOADABLE __attribute__((__overloadable__)) | ||
| 150 | #else | ||
| 151 | #define OS_OVERLOADABLE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | #if __has_attribute(analyzer_suppress) | ||
| 155 | #define OS_ANALYZER_SUPPRESS(RADAR) __attribute__((analyzer_suppress)) | ||
| 156 | #else | ||
| 157 | #define OS_ANALYZER_SUPPRESS(RADAR) | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #if __has_attribute(enum_extensibility) | ||
| 161 | #define __OS_ENUM_ATTR __attribute__((enum_extensibility(open))) | ||
| 162 | #define __OS_ENUM_ATTR_CLOSED __attribute__((enum_extensibility(closed))) | ||
| 163 | #else | ||
| 164 | #define __OS_ENUM_ATTR | ||
| 165 | #define __OS_ENUM_ATTR_CLOSED | ||
| 166 | #endif // __has_attribute(enum_extensibility) | ||
| 167 | |||
| 168 | #if __has_attribute(flag_enum) | ||
| 169 | /*! | ||
| 170 | * Compile with -Wflag-enum and -Wassign-enum to enforce at definition and | ||
| 171 | * assignment, respectively, i.e. -Wflag-enum prevents you from creating new | ||
| 172 | * enumeration values from illegal values within the enum definition, and | ||
| 173 | * -Wassign-enum prevents you from assigning illegal values to a variable of the | ||
| 174 | * enum type. | ||
| 175 | */ | ||
| 176 | #define __OS_OPTIONS_ATTR __attribute__((flag_enum)) | ||
| 177 | #else | ||
| 178 | #define __OS_OPTIONS_ATTR | ||
| 179 | #endif // __has_attribute(flag_enum) | ||
| 180 | |||
| 181 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_fixed_enum) || \ | ||
| 182 | __has_extension(cxx_strong_enums) | ||
| 183 | #define OS_ENUM(_name, _type, ...) \ | ||
| 184 | 	typedef enum : _type { __VA_ARGS__ } _name##_t | ||
| 185 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 186 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED _name##_t | ||
| 187 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 188 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR __OS_OPTIONS_ATTR _name##_t | ||
| 189 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 190 | 	typedef enum : _type { __VA_ARGS__ } __OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR _name##_t | ||
| 191 | #else | ||
| 192 | /*! | ||
| 193 | * There is unfortunately no good way in plain C to have both fixed-type enums | ||
| 194 | * and enforcement for clang's enum_extensibility extensions. The primary goal | ||
| 195 | * of these macros is to allow you to define an enum and specify its width in a | ||
| 196 | * single statement, and for plain C that is accomplished by defining an | ||
| 197 | * anonymous enum and then separately typedef'ing the requested type name to the | ||
| 198 | * requested underlying integer type. So the type emitted actually has no | ||
| 199 | * relationship at all to the enum, and therefore while the compiler could | ||
| 200 | * enforce enum extensibility if you used the enum type, it cannot do so if you | ||
| 201 | * use the "_t" type resulting from this expression. | ||
| 202 | * | ||
| 203 | * But we still define a named enum type and decorate it appropriately for you, | ||
| 204 | * so if you really want the enum extensibility enforcement, you can use the | ||
| 205 | * enum type yourself, i.e. when compiling with a C compiler: | ||
| 206 | * | ||
| 207 | * OS_CLOSED_ENUM(my_type, uint64_t, | ||
| 208 | * FOO, | ||
| 209 | * BAR, | ||
| 210 | * BAZ, | ||
| 211 | * ); | ||
| 212 | * | ||
| 213 | * my_type_t mt = 98; // legal | ||
| 214 | * enum my_type emt = 98; // illegal | ||
| 215 | * | ||
| 216 | * But be aware that the underlying enum type's width is subject only to the C | ||
| 217 | * language's guarantees -- namely that it will be compatible with int, char, | ||
| 218 | * and unsigned char. It is not safe to rely on the size of this type. | ||
| 219 | * | ||
| 220 | * When compiling in ObjC or C++, both of the above assignments are illegal. | ||
| 221 | */ | ||
| 222 | #define __OS_ENUM_C_FALLBACK(_name, _type, ...) \ | ||
| 223 | 	typedef _type _name##_t; enum _name { __VA_ARGS__ } | ||
| 224 | |||
| 225 | #define OS_ENUM(_name, _type, ...) \ | ||
| 226 | 	typedef _type _name##_t; enum { __VA_ARGS__ } | ||
| 227 | #define OS_CLOSED_ENUM(_name, _type, ...) \ | ||
| 228 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 229 | 	__OS_ENUM_ATTR_CLOSED | ||
| 230 | #define OS_OPTIONS(_name, _type, ...) \ | ||
| 231 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 232 | 	__OS_ENUM_ATTR __OS_OPTIONS_ATTR | ||
| 233 | #define OS_CLOSED_OPTIONS(_name, _type, ...) \ | ||
| 234 | 	__OS_ENUM_C_FALLBACK(_name, _type, ## __VA_ARGS__) \ | ||
| 235 | 	__OS_ENUM_ATTR_CLOSED __OS_OPTIONS_ATTR | ||
| 236 | #endif // __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) | ||
| 237 | |||
| 238 | #if __has_feature(attribute_availability_swift) | ||
| 239 | // equivalent to __SWIFT_UNAVAILABLE from Availability.h | ||
| 240 | #define OS_SWIFT_UNAVAILABLE(_msg) \ | ||
| 241 | 	__attribute__((__availability__(swift, unavailable, message=_msg))) | ||
| 242 | #else | ||
| 243 | #define OS_SWIFT_UNAVAILABLE(_msg) | ||
| 244 | #endif | ||
| 245 | |||
| 246 | #if __has_attribute(swift_private) | ||
| 247 | # define OS_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | ||
| 248 | #else | ||
| 249 | # define OS_REFINED_FOR_SWIFT | ||
| 250 | #endif | ||
| 251 | |||
| 252 | #if __has_attribute(swift_name) | ||
| 253 | # define OS_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | ||
| 254 | #else | ||
| 255 | # define OS_SWIFT_NAME(_name) | ||
| 256 | #endif | ||
| 257 | |||
| 258 | #define __OS_STRINGIFY(s) #s | ||
| 259 | #define OS_STRINGIFY(s) __OS_STRINGIFY(s) | ||
| 260 | #define __OS_CONCAT(x, y) x ## y | ||
| 261 | #define OS_CONCAT(x, y) __OS_CONCAT(x, y) | ||
| 262 | |||
| 263 | #ifdef __GNUC__ | ||
| 264 | #define os_prevent_tail_call_optimization() __asm__("") | ||
| 265 | #define os_is_compile_time_constant(expr) __builtin_constant_p(expr) | ||
| 266 | #define os_compiler_barrier() __asm__ __volatile__("" ::: "memory") | ||
| 267 | #else | ||
| 268 | #define os_prevent_tail_call_optimization() do { } while (0) | ||
| 269 | #define os_is_compile_time_constant(expr) 0 | ||
| 270 | #define os_compiler_barrier() do { } while (0) | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #if __has_attribute(not_tail_called) | ||
| 274 | #define OS_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | ||
| 275 | #else | ||
| 276 | #define OS_NOT_TAIL_CALLED | ||
| 277 | #endif | ||
| 278 | |||
| 279 | |||
| 280 | typedef void (*os_function_t)(void *_Nullable); | ||
| 281 | |||
| 282 | #ifdef __BLOCKS__ | ||
| 283 | /*! | ||
| 284 | * @typedef os_block_t | ||
| 285 | * | ||
| 286 | * @abstract | ||
| 287 | * Generic type for a block taking no arguments and returning no value. | ||
| 288 | * | ||
| 289 | * @discussion | ||
| 290 | * When not building with Objective-C ARC, a block object allocated on or | ||
| 291 | * copied to the heap must be released with a -[release] message or the | ||
| 292 | * Block_release() function. | ||
| 293 | * | ||
| 294 | * The declaration of a block literal allocates storage on the stack. | ||
| 295 | * Therefore, this is an invalid construct: | ||
| 296 | * <code> | ||
| 297 | * os_block_t block; | ||
| 298 | * if (x) { | ||
| 299 | * block = ^{ printf("true\n"); }; | ||
| 300 | * } else { | ||
| 301 | * block = ^{ printf("false\n"); }; | ||
| 302 | * } | ||
| 303 | * block(); // unsafe!!! | ||
| 304 | * </code> | ||
| 305 | * | ||
| 306 | * What is happening behind the scenes: | ||
| 307 | * <code> | ||
| 308 | * if (x) { | ||
| 309 | * struct Block __tmp_1 = ...; // setup details | ||
| 310 | * block = &__tmp_1; | ||
| 311 | * } else { | ||
| 312 | * struct Block __tmp_2 = ...; // setup details | ||
| 313 | * block = &__tmp_2; | ||
| 314 | * } | ||
| 315 | * </code> | ||
| 316 | * | ||
| 317 | * As the example demonstrates, the address of a stack variable is escaping the | ||
| 318 | * scope in which it is allocated. That is a classic C bug. | ||
| 319 | * | ||
| 320 | * Instead, the block literal must be copied to the heap with the Block_copy() | ||
| 321 | * function or by sending it a -[copy] message. | ||
| 322 | */ | ||
| 323 | typedef void (^os_block_t)(void); | ||
| 324 | #endif | ||
| 325 | |||
| 326 | |||
| 327 | |||
| 328 | #endif // __OS_BASE__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/pthread.h deleted-693| ... | @@ -1,693 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2012 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 1996 1995 by Open Software Foundation, Inc. 1997 1996 1995 1994 1993 1992 1991 | ||
| 25 | * All Rights Reserved | ||
| 26 | * | ||
| 27 | * Permission to use, copy, modify, and distribute this software and | ||
| 28 | * its documentation for any purpose and without fee is hereby granted, | ||
| 29 | * provided that the above copyright notice appears in all copies and | ||
| 30 | * that both the copyright notice and this permission notice appear in | ||
| 31 | * supporting documentation. | ||
| 32 | * | ||
| 33 | * OSF DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE | ||
| 34 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 35 | * FOR A PARTICULAR PURPOSE. | ||
| 36 | * | ||
| 37 | * IN NO EVENT SHALL OSF BE LIABLE FOR ANY SPECIAL, INDIRECT, OR | ||
| 38 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
| 39 | * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, | ||
| 40 | * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION | ||
| 41 | * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | */ | ||
| 44 | /* | ||
| 45 | * MkLinux | ||
| 46 | */ | ||
| 47 | |||
| 48 | /* | ||
| 49 | * POSIX Threads - IEEE 1003.1c | ||
| 50 | */ | ||
| 51 | |||
| 52 | #ifndef _PTHREAD_H | ||
| 53 | #define _PTHREAD_H | ||
| 54 | |||
| 55 | #include <_types.h> | ||
| 56 | #include <pthread/sched.h> | ||
| 57 | #include <time.h> | ||
| 58 | #include <sys/_pthread/_pthread_types.h> | ||
| 59 | #include <sys/_pthread/_pthread_attr_t.h> | ||
| 60 | #include <sys/_pthread/_pthread_cond_t.h> | ||
| 61 | #include <sys/_pthread/_pthread_condattr_t.h> | ||
| 62 | #include <sys/_pthread/_pthread_key_t.h> | ||
| 63 | #include <sys/_pthread/_pthread_mutex_t.h> | ||
| 64 | #include <sys/_pthread/_pthread_mutexattr_t.h> | ||
| 65 | #include <sys/_pthread/_pthread_once_t.h> | ||
| 66 | #include <sys/_pthread/_pthread_rwlock_t.h> | ||
| 67 | #include <sys/_pthread/_pthread_rwlockattr_t.h> | ||
| 68 | #include <sys/_pthread/_pthread_t.h> | ||
| 69 | |||
| 70 | #include <pthread/qos.h> | ||
| 71 | |||
| 72 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 73 | |||
| 74 | #include <sys/_types/_mach_port_t.h> | ||
| 75 | #include <sys/_types/_sigset_t.h> | ||
| 76 | |||
| 77 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 78 | |||
| 79 | /* | ||
| 80 | * These symbols indicate which [optional] features are available | ||
| 81 | * They can be tested at compile time via '#ifdef XXX' | ||
| 82 | * The way to check for pthreads is like so: | ||
| 83 | |||
| 84 | * #include <unistd.h> | ||
| 85 | * #ifdef _POSIX_THREADS | ||
| 86 | * #include <pthread.h> | ||
| 87 | * #endif | ||
| 88 | |||
| 89 | */ | ||
| 90 | |||
| 91 | /* These will be moved to unistd.h */ | ||
| 92 | |||
| 93 | /* | ||
| 94 | * Note: These data structures are meant to be opaque. Only enough | ||
| 95 | * structure is exposed to support initializers. | ||
| 96 | * All of the typedefs will be moved to <sys/types.h> | ||
| 97 | */ | ||
| 98 | |||
| 99 | #include <sys/cdefs.h> | ||
| 100 | #include <Availability.h> | ||
| 101 | |||
| 102 | #if __has_feature(assume_nonnull) | ||
| 103 | _Pragma("clang assume_nonnull begin") | ||
| 104 | #endif | ||
| 105 | __BEGIN_DECLS | ||
| 106 | /* | ||
| 107 | * Threads | ||
| 108 | */ | ||
| 109 | |||
| 110 | |||
| 111 | /* | ||
| 112 | * Cancel cleanup handler management. Note, since these are implemented as macros, | ||
| 113 | * they *MUST* occur in matched pairs! | ||
| 114 | */ | ||
| 115 | |||
| 116 | #define pthread_cleanup_push(func, val) \ | ||
| 117 | { \ | ||
| 118 | 	 struct __darwin_pthread_handler_rec __handler; \ | ||
| 119 | 	 pthread_t __self = pthread_self(); \ | ||
| 120 | 	 __handler.__routine = func; \ | ||
| 121 | 	 __handler.__arg = val; \ | ||
| 122 | 	 __handler.__next = __self->__cleanup_stack; \ | ||
| 123 | 	 __self->__cleanup_stack = &__handler; | ||
| 124 | |||
| 125 | #define pthread_cleanup_pop(execute) \ | ||
| 126 | 	 /* Note: 'handler' must be in this same lexical context! */ \ | ||
| 127 | 	 __self->__cleanup_stack = __handler.__next; \ | ||
| 128 | 	 if (execute) (__handler.__routine)(__handler.__arg); \ | ||
| 129 | } | ||
| 130 | |||
| 131 | /* | ||
| 132 | * Thread attributes | ||
| 133 | */ | ||
| 134 | |||
| 135 | #define PTHREAD_CREATE_JOINABLE 1 | ||
| 136 | #define PTHREAD_CREATE_DETACHED 2 | ||
| 137 | |||
| 138 | #define PTHREAD_INHERIT_SCHED 1 | ||
| 139 | #define PTHREAD_EXPLICIT_SCHED 2 | ||
| 140 | |||
| 141 | #define PTHREAD_CANCEL_ENABLE 0x01 /* Cancel takes place at next cancellation point */ | ||
| 142 | #define PTHREAD_CANCEL_DISABLE 0x00 /* Cancel postponed */ | ||
| 143 | #define PTHREAD_CANCEL_DEFERRED 0x02 /* Cancel waits until cancellation point */ | ||
| 144 | #define PTHREAD_CANCEL_ASYNCHRONOUS 0x00 /* Cancel occurs immediately */ | ||
| 145 | |||
| 146 | /* Value returned from pthread_join() when a thread is canceled */ | ||
| 147 | #define PTHREAD_CANCELED	 ((void *) 1) | ||
| 148 | |||
| 149 | /* We only support PTHREAD_SCOPE_SYSTEM */ | ||
| 150 | #define PTHREAD_SCOPE_SYSTEM 1 | ||
| 151 | #define PTHREAD_SCOPE_PROCESS 2 | ||
| 152 | |||
| 153 | #define PTHREAD_PROCESS_SHARED 1 | ||
| 154 | #define PTHREAD_PROCESS_PRIVATE 2 | ||
| 155 | |||
| 156 | /* | ||
| 157 | * Mutex protocol attributes | ||
| 158 | */ | ||
| 159 | #define PTHREAD_PRIO_NONE 0 | ||
| 160 | #define PTHREAD_PRIO_INHERIT 1 | ||
| 161 | #define PTHREAD_PRIO_PROTECT 2 | ||
| 162 | |||
| 163 | /* | ||
| 164 | * Mutex type attributes | ||
| 165 | */ | ||
| 166 | #define PTHREAD_MUTEX_NORMAL		0 | ||
| 167 | #define PTHREAD_MUTEX_ERRORCHECK	1 | ||
| 168 | #define PTHREAD_MUTEX_RECURSIVE		2 | ||
| 169 | #define PTHREAD_MUTEX_DEFAULT		PTHREAD_MUTEX_NORMAL | ||
| 170 | |||
| 171 | /* | ||
| 172 | * Mutex policy attributes | ||
| 173 | */ | ||
| 174 | #define PTHREAD_MUTEX_POLICY_FAIRSHARE_NP 1 | ||
| 175 | #define PTHREAD_MUTEX_POLICY_FIRSTFIT_NP 3 | ||
| 176 | |||
| 177 | /* | ||
| 178 | * RWLock variables | ||
| 179 | */ | ||
| 180 | #define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWLOCK_SIG_init, {0}} | ||
| 181 | |||
| 182 | /* | ||
| 183 | * Mutex variables | ||
| 184 | */ | ||
| 185 | #define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MUTEX_SIG_init, {0}} | ||
| 186 | |||
| 187 | /* <rdar://problem/10854763> */ | ||
| 188 | #if ((__MAC_OS_X_VERSION_MIN_REQUIRED && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070) || (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED >= 50000)) || defined(__DRIVERKIT_VERSION_MIN_REQUIRED) | ||
| 189 | #	if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) | ||
| 190 | #		define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER {_PTHREAD_ERRORCHECK_MUTEX_SIG_init, {0}} | ||
| 191 | #		define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {_PTHREAD_RECURSIVE_MUTEX_SIG_init, {0}} | ||
| 192 | #	endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ | ||
| 193 | #endif | ||
| 194 | |||
| 195 | /* <rdar://problem/25944576> */ | ||
| 196 | #define _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT \ | ||
| 197 | 	defined(SWIFT_CLASS_EXTRA) && (!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH < 1)) | ||
| 198 | |||
| 199 | /* | ||
| 200 | * Condition variable attributes | ||
| 201 | */ | ||
| 202 | |||
| 203 | /* | ||
| 204 | * Condition variables | ||
| 205 | */ | ||
| 206 | |||
| 207 | #define PTHREAD_COND_INITIALIZER {_PTHREAD_COND_SIG_init, {0}} | ||
| 208 | |||
| 209 | /* | ||
| 210 | * Initialization control (once) variables | ||
| 211 | */ | ||
| 212 | |||
| 213 | #define PTHREAD_ONCE_INIT {_PTHREAD_ONCE_SIG_init, {0}} | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Prototypes for all PTHREAD interfaces | ||
| 217 | */ | ||
| 218 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 219 | int pthread_atfork(void (* _Nullable)(void), void (* _Nullable)(void), | ||
| 220 | 		void (* _Nullable)(void)); | ||
| 221 | |||
| 222 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 223 | int pthread_attr_destroy(pthread_attr_t *); | ||
| 224 | |||
| 225 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 226 | int pthread_attr_getdetachstate(const pthread_attr_t *, int *); | ||
| 227 | |||
| 228 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 229 | int pthread_attr_getguardsize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 230 | |||
| 231 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 232 | int pthread_attr_getinheritsched(const pthread_attr_t * __restrict, int * __restrict); | ||
| 233 | |||
| 234 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 235 | int pthread_attr_getschedparam(const pthread_attr_t * __restrict, | ||
| 236 | 		struct sched_param * __restrict); | ||
| 237 | |||
| 238 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 239 | int pthread_attr_getschedpolicy(const pthread_attr_t * __restrict, int * __restrict); | ||
| 240 | |||
| 241 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 242 | int pthread_attr_getscope(const pthread_attr_t * __restrict, int * __restrict); | ||
| 243 | |||
| 244 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 245 | int pthread_attr_getstack(const pthread_attr_t * __restrict, | ||
| 246 | 		void * _Nullable * _Nonnull __restrict, size_t * __restrict); | ||
| 247 | |||
| 248 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 249 | int pthread_attr_getstackaddr(const pthread_attr_t * __restrict, | ||
| 250 | 		void * _Nullable * _Nonnull __restrict); | ||
| 251 | |||
| 252 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 253 | int pthread_attr_getstacksize(const pthread_attr_t * __restrict, size_t * __restrict); | ||
| 254 | |||
| 255 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 256 | int pthread_attr_init(pthread_attr_t *); | ||
| 257 | |||
| 258 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 259 | int pthread_attr_setdetachstate(pthread_attr_t *, int); | ||
| 260 | |||
| 261 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 262 | int pthread_attr_setguardsize(pthread_attr_t *, size_t); | ||
| 263 | |||
| 264 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 265 | int pthread_attr_setinheritsched(pthread_attr_t *, int); | ||
| 266 | |||
| 267 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 268 | int pthread_attr_setschedparam(pthread_attr_t * __restrict, | ||
| 269 | 		const struct sched_param * __restrict); | ||
| 270 | |||
| 271 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 272 | int pthread_attr_setschedpolicy(pthread_attr_t *, int); | ||
| 273 | |||
| 274 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 275 | int pthread_attr_setscope(pthread_attr_t *, int); | ||
| 276 | |||
| 277 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 278 | int pthread_attr_setstack(pthread_attr_t *, void *, size_t); | ||
| 279 | |||
| 280 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 281 | int pthread_attr_setstackaddr(pthread_attr_t *, void *); | ||
| 282 | |||
| 283 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 284 | int pthread_attr_setstacksize(pthread_attr_t *, size_t); | ||
| 285 | |||
| 286 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 287 | int pthread_cancel(pthread_t) __DARWIN_ALIAS(pthread_cancel); | ||
| 288 | |||
| 289 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 290 | int pthread_cond_broadcast(pthread_cond_t *); | ||
| 291 | |||
| 292 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 293 | int pthread_cond_destroy(pthread_cond_t *); | ||
| 294 | |||
| 295 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 296 | int pthread_cond_init( | ||
| 297 | 		pthread_cond_t * __restrict, | ||
| 298 | 		const pthread_condattr_t * _Nullable __restrict) | ||
| 299 | 		__DARWIN_ALIAS(pthread_cond_init); | ||
| 300 | |||
| 301 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 302 | int pthread_cond_signal(pthread_cond_t *); | ||
| 303 | |||
| 304 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 305 | int pthread_cond_timedwait( | ||
| 306 | 		pthread_cond_t * __restrict, pthread_mutex_t * __restrict, | ||
| 307 | 		const struct timespec * _Nullable __restrict) | ||
| 308 | 		__DARWIN_ALIAS_C(pthread_cond_timedwait); | ||
| 309 | |||
| 310 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 311 | int pthread_cond_wait(pthread_cond_t * __restrict, | ||
| 312 | 		pthread_mutex_t * __restrict) __DARWIN_ALIAS_C(pthread_cond_wait); | ||
| 313 | |||
| 314 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 315 | int pthread_condattr_destroy(pthread_condattr_t *); | ||
| 316 | |||
| 317 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 318 | int pthread_condattr_init(pthread_condattr_t *); | ||
| 319 | |||
| 320 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 321 | int pthread_condattr_getpshared(const pthread_condattr_t * __restrict, | ||
| 322 | 		int * __restrict); | ||
| 323 | |||
| 324 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 325 | int pthread_condattr_setpshared(pthread_condattr_t *, int); | ||
| 326 | |||
| 327 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 328 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 329 | int pthread_create(pthread_t _Nullable * _Nonnull __restrict, | ||
| 330 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 331 | 		void * _Nullable (* _Nonnull)(void * _Nullable), | ||
| 332 | 		void * _Nullable __restrict); | ||
| 333 | #else | ||
| 334 | int pthread_create(pthread_t * __restrict, | ||
| 335 | 		const pthread_attr_t * _Nullable __restrict, | ||
| 336 | 		void *(* _Nonnull)(void *), void * _Nullable __restrict); | ||
| 337 | #endif // _PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 338 | |||
| 339 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 340 | int pthread_detach(pthread_t); | ||
| 341 | |||
| 342 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 343 | int pthread_equal(pthread_t _Nullable, pthread_t _Nullable); | ||
| 344 | |||
| 345 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 346 | void pthread_exit(void * _Nullable) __dead2; | ||
| 347 | |||
| 348 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 349 | int pthread_getconcurrency(void); | ||
| 350 | |||
| 351 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 352 | int pthread_getschedparam(pthread_t , int * _Nullable __restrict, | ||
| 353 | 		struct sched_param * _Nullable __restrict); | ||
| 354 | |||
| 355 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 356 | void* _Nullable pthread_getspecific(pthread_key_t); | ||
| 357 | |||
| 358 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 359 | int pthread_join(pthread_t , void * _Nullable * _Nullable) | ||
| 360 | 		__DARWIN_ALIAS_C(pthread_join); | ||
| 361 | |||
| 362 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 363 | int pthread_key_create(pthread_key_t *, void (* _Nullable)(void *)); | ||
| 364 | |||
| 365 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 366 | int pthread_key_delete(pthread_key_t); | ||
| 367 | |||
| 368 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 369 | int pthread_mutex_destroy(pthread_mutex_t *); | ||
| 370 | |||
| 371 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 372 | int pthread_mutex_getprioceiling(const pthread_mutex_t * __restrict, | ||
| 373 | 		int * __restrict); | ||
| 374 | |||
| 375 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 376 | int pthread_mutex_init(pthread_mutex_t * __restrict, | ||
| 377 | 		const pthread_mutexattr_t * _Nullable __restrict); | ||
| 378 | |||
| 379 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 380 | int pthread_mutex_lock(pthread_mutex_t *); | ||
| 381 | |||
| 382 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 383 | int pthread_mutex_setprioceiling(pthread_mutex_t * __restrict, int, | ||
| 384 | 		int * __restrict); | ||
| 385 | |||
| 386 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 387 | int pthread_mutex_trylock(pthread_mutex_t *); | ||
| 388 | |||
| 389 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 390 | int pthread_mutex_unlock(pthread_mutex_t *); | ||
| 391 | |||
| 392 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 393 | int pthread_mutexattr_destroy(pthread_mutexattr_t *) __DARWIN_ALIAS(pthread_mutexattr_destroy); | ||
| 394 | |||
| 395 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 396 | int pthread_mutexattr_getprioceiling(const pthread_mutexattr_t * __restrict, | ||
| 397 | 		int * __restrict); | ||
| 398 | |||
| 399 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 400 | int pthread_mutexattr_getprotocol(const pthread_mutexattr_t * __restrict, | ||
| 401 | 		int * __restrict); | ||
| 402 | |||
| 403 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 404 | int pthread_mutexattr_getpshared(const pthread_mutexattr_t * __restrict, | ||
| 405 | 		int * __restrict); | ||
| 406 | |||
| 407 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 408 | int pthread_mutexattr_gettype(const pthread_mutexattr_t * __restrict, | ||
| 409 | 		int * __restrict); | ||
| 410 | |||
| 411 | __API_AVAILABLE(macos(10.13.4), ios(11.3), watchos(4.3), tvos(11.3)) | ||
| 412 | int pthread_mutexattr_getpolicy_np(const pthread_mutexattr_t * __restrict, | ||
| 413 | 		int * __restrict); | ||
| 414 | |||
| 415 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 416 | int pthread_mutexattr_init(pthread_mutexattr_t *); | ||
| 417 | |||
| 418 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 419 | int pthread_mutexattr_setprioceiling(pthread_mutexattr_t *, int); | ||
| 420 | |||
| 421 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 422 | int pthread_mutexattr_setprotocol(pthread_mutexattr_t *, int); | ||
| 423 | |||
| 424 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 425 | int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); | ||
| 426 | |||
| 427 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 428 | int pthread_mutexattr_settype(pthread_mutexattr_t *, int); | ||
| 429 | |||
| 430 | __API_AVAILABLE(macos(10.7), ios(5.0)) | ||
| 431 | int pthread_mutexattr_setpolicy_np(pthread_mutexattr_t *, int); | ||
| 432 | |||
| 433 | __SWIFT_UNAVAILABLE_MSG("Use lazily initialized globals instead") | ||
| 434 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 435 | int pthread_once(pthread_once_t *, void (* _Nonnull)(void)); | ||
| 436 | |||
| 437 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 438 | int pthread_rwlock_destroy(pthread_rwlock_t * ) __DARWIN_ALIAS(pthread_rwlock_destroy); | ||
| 439 | |||
| 440 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 441 | int pthread_rwlock_init(pthread_rwlock_t * __restrict, | ||
| 442 | 		const pthread_rwlockattr_t * _Nullable __restrict) | ||
| 443 | 		__DARWIN_ALIAS(pthread_rwlock_init); | ||
| 444 | |||
| 445 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 446 | int pthread_rwlock_rdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_rdlock); | ||
| 447 | |||
| 448 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 449 | int pthread_rwlock_tryrdlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_tryrdlock); | ||
| 450 | |||
| 451 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 452 | int pthread_rwlock_trywrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_trywrlock); | ||
| 453 | |||
| 454 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 455 | int pthread_rwlock_wrlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_wrlock); | ||
| 456 | |||
| 457 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 458 | int pthread_rwlock_unlock(pthread_rwlock_t *) __DARWIN_ALIAS(pthread_rwlock_unlock); | ||
| 459 | |||
| 460 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 461 | int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); | ||
| 462 | |||
| 463 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 464 | int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t * __restrict, | ||
| 465 | 		int * __restrict); | ||
| 466 | |||
| 467 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 468 | int pthread_rwlockattr_init(pthread_rwlockattr_t *); | ||
| 469 | |||
| 470 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 471 | int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); | ||
| 472 | |||
| 473 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 474 | pthread_t pthread_self(void); | ||
| 475 | |||
| 476 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 477 | int pthread_setcancelstate(int , int * _Nullable) | ||
| 478 | 		__DARWIN_ALIAS(pthread_setcancelstate); | ||
| 479 | |||
| 480 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 481 | int pthread_setcanceltype(int , int * _Nullable) | ||
| 482 | 		__DARWIN_ALIAS(pthread_setcanceltype); | ||
| 483 | |||
| 484 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 485 | int pthread_setconcurrency(int); | ||
| 486 | |||
| 487 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 488 | int pthread_setschedparam(pthread_t, int, const struct sched_param *); | ||
| 489 | |||
| 490 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 491 | int pthread_setspecific(pthread_key_t , const void * _Nullable); | ||
| 492 | |||
| 493 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 494 | void pthread_testcancel(void) __DARWIN_ALIAS(pthread_testcancel); | ||
| 495 | |||
| 496 | #if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(__cplusplus) | ||
| 497 | |||
| 498 | /* returns non-zero if pthread_create or cthread_fork have been called */ | ||
| 499 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 500 | int pthread_is_threaded_np(void); | ||
| 501 | |||
| 502 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 503 | int pthread_threadid_np(pthread_t _Nullable,__uint64_t* _Nullable); | ||
| 504 | |||
| 505 | /*SPI to set and get pthread name*/ | ||
| 506 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 507 | int	pthread_getname_np(pthread_t,char*,size_t); | ||
| 508 | |||
| 509 | __API_AVAILABLE(macos(10.6), ios(3.2)) | ||
| 510 | int	pthread_setname_np(const char*); | ||
| 511 | |||
| 512 | /* returns non-zero if the current thread is the main thread */ | ||
| 513 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 514 | int	pthread_main_np(void); | ||
| 515 | |||
| 516 | /* return the mach thread bound to the pthread */ | ||
| 517 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 518 | mach_port_t pthread_mach_thread_np(pthread_t); | ||
| 519 | |||
| 520 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 521 | size_t pthread_get_stacksize_np(pthread_t); | ||
| 522 | |||
| 523 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 524 | void* pthread_get_stackaddr_np(pthread_t); | ||
| 525 | |||
| 526 | /* Like pthread_cond_signal(), but only wake up the specified pthread */ | ||
| 527 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 528 | int pthread_cond_signal_thread_np(pthread_cond_t *, pthread_t _Nullable); | ||
| 529 | |||
| 530 | /* Like pthread_cond_timedwait, but use a relative timeout */ | ||
| 531 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 532 | int pthread_cond_timedwait_relative_np(pthread_cond_t *, pthread_mutex_t *, | ||
| 533 | 		const struct timespec * _Nullable); | ||
| 534 | |||
| 535 | /* Like pthread_create(), but leaves the thread suspended */ | ||
| 536 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 537 | #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT | ||
| 538 | int pthread_create_suspended_np( | ||
| 539 | 		pthread_t _Nullable * _Nonnull, const pthread_attr_t * _Nullable, | ||
| 540 | 		void * _Nullable (* _Nonnull)(void * _Nullable), void * _Nullable); | ||
| 541 | #else | ||
| 542 | int pthread_create_suspended_np(pthread_t *, const pthread_attr_t * _Nullable, | ||
| 543 | 		void *(* _Nonnull)(void *), void * _Nullable); | ||
| 544 | #endif | ||
| 545 | |||
| 546 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 547 | int pthread_kill(pthread_t, int); | ||
| 548 | |||
| 549 | __API_AVAILABLE(macos(10.5), ios(2.0)) | ||
| 550 | _Nullable pthread_t pthread_from_mach_thread_np(mach_port_t); | ||
| 551 | |||
| 552 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 553 | int pthread_sigmask(int, const sigset_t * _Nullable, sigset_t * _Nullable) | ||
| 554 | 		__DARWIN_ALIAS(pthread_sigmask); | ||
| 555 | |||
| 556 | __API_AVAILABLE(macos(10.4), ios(2.0)) | ||
| 557 | void pthread_yield_np(void); | ||
| 558 | |||
| 559 | __API_AVAILABLE(macos(11.0)) | ||
| 560 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 561 | void pthread_jit_write_protect_np(int enabled); | ||
| 562 | |||
| 563 | __API_AVAILABLE(macos(11.0)) | ||
| 564 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 565 | int pthread_jit_write_protect_supported_np(void); | ||
| 566 | |||
| 567 | /*! | ||
| 568 | * @typedef pthread_jit_write_callback_t | ||
| 569 | * The type of a function that can be supplied to {@link | ||
| 570 | * pthread_jit_write_with_callback_np} to write to the MAP_JIT region while it | ||
| 571 | * is writeable. | ||
| 572 | * | ||
| 573 | * @param ctx | ||
| 574 | * A pointer to context that will be passed through to the callback function. | ||
| 575 | * | ||
| 576 | * @result | ||
| 577 | * A result code to be returned to the caller of @{link | ||
| 578 | * pthread_jit_write_with_callback_np}. The system does not interpret/act on | ||
| 579 | * the value of this result. | ||
| 580 | */ | ||
| 581 | typedef int (*pthread_jit_write_callback_t)(void * _Nullable ctx); | ||
| 582 | |||
| 583 | /*! | ||
| 584 | * @define PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP | ||
| 585 | * A macro to be used at file scope to list the functions allowed to be passed | ||
| 586 | * to {@link pthread_jit_write_with_callback_np} to write to the MAP_JIT region | ||
| 587 | * while it is writeable. It may be invoked only once per executable/library. | ||
| 588 | * | ||
| 589 | * @param callbacks | ||
| 590 | * The pthread_jit_write_callback_t functions to allow. They should be supplied | ||
| 591 | * as a comma-delimited list. | ||
| 592 | */ | ||
| 593 | #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__OBJC__) || defined(__cplusplus) | ||
| 594 | #define PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP(...) \ | ||
| 595 | 		__attribute__((__used__, __section__("__DATA_CONST,__pth_jit_func"))) \ | ||
| 596 | 		static const pthread_jit_write_callback_t __pthread_jit_write_callback_allowlist[] = { \ | ||
| 597 | 			__VA_ARGS__, NULL \ | ||
| 598 | 		} | ||
| 599 | #endif /* (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__OBJC__) || defined(__cplusplus) */ | ||
| 600 | |||
| 601 | /*! | ||
| 602 | * @function pthread_jit_write_with_callback_np | ||
| 603 | * | ||
| 604 | * @abstract | ||
| 605 | * Toggles per-thread write-protection of the MAP_JIT region to writeable, | ||
| 606 | * invokes an allowed callback function to write to it, and toggles protection | ||
| 607 | * back to executable. | ||
| 608 | * | ||
| 609 | * @param callback | ||
| 610 | * The callback function to invoke to write to the MAP_JIT region. It must be | ||
| 611 | * statically allowed using {@link PTHREAD_JIT_WRITE_ALLOW_CALLBACKS_NP}. | ||
| 612 | * | ||
| 613 | * @param ctx | ||
| 614 | * Context to pass through to the invocation of the callback function. | ||
| 615 | * | ||
| 616 | * @result | ||
| 617 | * The result code returned by the callback function. | ||
| 618 | * | ||
| 619 | * @discussion | ||
| 620 | * This function assumes that the MAP_JIT region has executable protection when | ||
| 621 | * called. It is therefore invalid to call it recursively from within a write | ||
| 622 | * callback. The implementation does not detect such invalid recursive calls, | ||
| 623 | * so the client is responsible for preventing them. | ||
| 624 | * | ||
| 625 | * Callbacks _must not_ perform any non-local transfer of control flow (e.g. | ||
| 626 | * throw an exception, longjmp(3)), as doing so would leave the MAP_JIT region | ||
| 627 | * writeable. | ||
| 628 | * | ||
| 629 | * On systems where pthread_jit_write_protect_supported_np(3) is false, this | ||
| 630 | * function calls @callback directly and does nothing else. | ||
| 631 | * | ||
| 632 | * Only callbacks in libraries/images present at process start-up are allowed - | ||
| 633 | * callbacks in images loaded dynamically via dlopen(3)/etc. are not permitted. | ||
| 634 | * | ||
| 635 | * This function only enforces that @callback is allowed if the caller has the | ||
| 636 | * com.apple.security.cs.jit-write-allowlist entitlement. That entitlement also | ||
| 637 | * disallows use of pthread_jit_write_protect_np(3). Adopting the entitlement | ||
| 638 | * is therefore crucial in realizing the security benefits of this interface. | ||
| 639 | * | ||
| 640 | * If the entitlement is not present then this function toggles protection of | ||
| 641 | * the MAP_JIT to writeable, calls @callback and then toggles protection back to | ||
| 642 | * executable, without validating that @callback is an allowed function. This | ||
| 643 | * behavior is intended to permit independent adoption of this interface by | ||
| 644 | * libraries - once all libraries in an application have adopted, the | ||
| 645 | * application should add the entitlement. | ||
| 646 | * | ||
| 647 | * The goal of this interface is to allow applications that execute JIT-compiled | ||
| 648 | * code to mitigate against attempts from attackers to escalate to code | ||
| 649 | * execution by getting their own instructions written to the MAP_JIT region. | ||
| 650 | * | ||
| 651 | * Callbacks should assume an attacker can control the input to this function. | ||
| 652 | * They must therefore carefully validate the data that they are passed and do | ||
| 653 | * so using as little attackable state as possible. This means simplifying | ||
| 654 | * control flow and avoiding spills of sensitive registers (e.g. those used for | ||
| 655 | * validation or control flow). | ||
| 656 | * | ||
| 657 | * In the event a callback detects that its input is invalid, it should either | ||
| 658 | * abort in the simplest fashion possible (preferring e.g. __builtin_trap() over | ||
| 659 | * abort(3), the latter being encumbered by various conformance requirements) or | ||
| 660 | * return a result indicating failure. | ||
| 661 | */ | ||
| 662 | __API_AVAILABLE(macos(11.4)) | ||
| 663 | __API_UNAVAILABLE(ios, tvos, watchos, driverkit) | ||
| 664 | __SWIFT_UNAVAILABLE_MSG("This interface cannot be safely used from Swift") | ||
| 665 | int pthread_jit_write_with_callback_np( | ||
| 666 | 		pthread_jit_write_callback_t _Nonnull callback, void * _Nullable ctx); | ||
| 667 | |||
| 668 | /*! | ||
| 669 | * @function pthread_cpu_number_np | ||
| 670 | * | ||
| 671 | * @param cpu_number_out | ||
| 672 | * The CPU number that the thread was running on at the time of query. | ||
| 673 | * This cpu number is in the interval [0, ncpus) (from sysctlbyname("hw.ncpu")) | ||
| 674 | * | ||
| 675 | * @result | ||
| 676 | * This function returns 0 or the value of errno if an error occurred. | ||
| 677 | * | ||
| 678 | * @note | ||
| 679 | * Optimizations of per-CPU datastructures based on the result of this function | ||
| 680 | * still require synchronization since it is not guaranteed that the thread will | ||
| 681 | * still be on the same CPU by the time the function returns. | ||
| 682 | */ | ||
| 683 | __API_AVAILABLE(macos(11.0), ios(14.2), tvos(14.2), watchos(7.1)) | ||
| 684 | int | ||
| 685 | pthread_cpu_number_np(size_t *cpu_number_out); | ||
| 686 | |||
| 687 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE || __cplusplus */ | ||
| 688 | __END_DECLS | ||
| 689 | #if __has_feature(assume_nonnull) | ||
| 690 | _Pragma("clang assume_nonnull end") | ||
| 691 | #endif | ||
| 692 | |||
| 693 | #endif /* _PTHREAD_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/base.h deleted-129| ... | @@ -1,129 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines macros used in the implementation of <simd/simd.h> | ||
| 3 | * types and functions. Even though they are exposed in a public header, | ||
| 4 | * the macros defined in this header are implementation details, and you | ||
| 5 | * should not use or rely on them. They may be changed or removed entirely | ||
| 6 | * in a future release. | ||
| 7 | * | ||
| 8 | * @copyright 2016-2017 Apple, Inc. All rights reserved. | ||
| 9 | * @unsorted */ | ||
| 10 | |||
| 11 | #ifndef SIMD_BASE | ||
| 12 | #define SIMD_BASE | ||
| 13 | |||
| 14 | /* Define __has_attribute and __has_include if they aren't available */ | ||
| 15 | # ifndef __has_attribute | ||
| 16 | # define __has_attribute(__x) 0 | ||
| 17 | # endif | ||
| 18 | # ifndef __has_include | ||
| 19 | # define __has_include(__x) 0 | ||
| 20 | # endif | ||
| 21 | # ifndef __has_feature | ||
| 22 | # define __has_feature(__x) 0 | ||
| 23 | # endif | ||
| 24 | |||
| 25 | # if __has_attribute(__ext_vector_type__) && __has_attribute(__overloadable__) | ||
| 26 | # define SIMD_COMPILER_HAS_REQUIRED_FEATURES 1 | ||
| 27 | # else | ||
| 28 | /* Your compiler is missing one or more features that are hard requirements | ||
| 29 | * for any <simd/simd.h> support. None of the types or functions defined by | ||
| 30 | * the simd headers will be available. */ | ||
| 31 | # define SIMD_COMPILER_HAS_REQUIRED_FEATURES 0 | ||
| 32 | # endif | ||
| 33 | |||
| 34 | # if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 35 | # if __has_include(<Availability.h>) | ||
| 36 | # include <Availability.h> | ||
| 37 | /* A number of new features are added in newer releases; most of these are | ||
| 38 | * inline in the header, which makes them available even when targeting older | ||
| 39 | * OS versions. Those that make external calls, however, are only available | ||
| 40 | * when targeting the release in which they became available. Because of the | ||
| 41 | * way in which simd functions are overloaded, the usual weak-linking tricks | ||
| 42 | * do not work; these functions are simply unavailable when targeting older | ||
| 43 | * versions of the library. */ | ||
| 44 | # if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_12_0 || \ | ||
| 45 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_15_0 || \ | ||
| 46 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_8_0 || \ | ||
| 47 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_15_0 || \ | ||
| 48 | __BRIDGE_OS_VERSION_MIN_REQUIRED >= 60000 || \ | ||
| 49 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_21_0 | ||
| 50 | # define SIMD_LIBRARY_VERSION 4 | ||
| 51 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \ | ||
| 52 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \ | ||
| 53 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \ | ||
| 54 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \ | ||
| 55 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 | ||
| 56 | # define SIMD_LIBRARY_VERSION 3 | ||
| 57 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12 || \ | ||
| 58 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0 || \ | ||
| 59 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_3_0 || \ | ||
| 60 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0 | ||
| 61 | # define SIMD_LIBRARY_VERSION 2 | ||
| 62 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || \ | ||
| 63 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 | ||
| 64 | # define SIMD_LIBRARY_VERSION 1 | ||
| 65 | # else | ||
| 66 | # define SIMD_LIBRARY_VERSION 0 | ||
| 67 | # endif | ||
| 68 | # else /* !__has_include(<Availability.h>) */ | ||
| 69 | # define SIMD_LIBRARY_VERSION 3 | ||
| 70 | # define __API_AVAILABLE(...) /* Nothing */ | ||
| 71 | # endif | ||
| 72 | |||
| 73 | /* The simd types interoperate with the native simd intrinsic types for each | ||
| 74 | * architecture; the headers that define those types and operations are | ||
| 75 | * automatically included with simd.h */ | ||
| 76 | # if defined __ARM_NEON__ | ||
| 77 | # include <arm_neon.h> | ||
| 78 | # elif defined __i386__ || defined __x86_64__ | ||
| 79 | # include <immintrin.h> | ||
| 80 | # endif | ||
| 81 | |||
| 82 | /* Define a number of function attributes used by the simd functions. */ | ||
| 83 | # if __has_attribute(__always_inline__) | ||
| 84 | # define SIMD_INLINE __attribute__((__always_inline__)) | ||
| 85 | # else | ||
| 86 | # define SIMD_INLINE inline | ||
| 87 | # endif | ||
| 88 | |||
| 89 | # if __has_attribute(__const__) | ||
| 90 | # define SIMD_CONST __attribute__((__const__)) | ||
| 91 | # else | ||
| 92 | # define SIMD_CONST /* nothing */ | ||
| 93 | # endif | ||
| 94 | |||
| 95 | # if __has_attribute(__nodebug__) | ||
| 96 | # define SIMD_NODEBUG __attribute__((__nodebug__)) | ||
| 97 | # else | ||
| 98 | # define SIMD_NODEBUG /* nothing */ | ||
| 99 | # endif | ||
| 100 | |||
| 101 | # if __has_attribute(__deprecated__) | ||
| 102 | # define SIMD_DEPRECATED(message) __attribute__((__deprecated__(message))) | ||
| 103 | # else | ||
| 104 | # define SIMD_DEPRECATED(message) /* nothing */ | ||
| 105 | # endif | ||
| 106 | |||
| 107 | #define SIMD_OVERLOAD __attribute__((__overloadable__)) | ||
| 108 | #define SIMD_CPPFUNC SIMD_INLINE SIMD_CONST SIMD_NODEBUG | ||
| 109 | #define SIMD_CFUNC SIMD_CPPFUNC SIMD_OVERLOAD | ||
| 110 | #define SIMD_NOINLINE SIMD_CONST SIMD_NODEBUG SIMD_OVERLOAD | ||
| 111 | #define SIMD_NONCONST SIMD_INLINE SIMD_NODEBUG SIMD_OVERLOAD | ||
| 112 | #define __SIMD_INLINE__ SIMD_CPPFUNC | ||
| 113 | #define __SIMD_ATTRIBUTES__ SIMD_CFUNC | ||
| 114 | #define __SIMD_OVERLOAD__ SIMD_OVERLOAD | ||
| 115 | |||
| 116 | #if defined __cplusplus | ||
| 117 | /*! @abstract A boolean scalar. */ | ||
| 118 | typedef bool simd_bool; | ||
| 119 | #else | ||
| 120 | /*! @abstract A boolean scalar. */ | ||
| 121 | typedef _Bool simd_bool; | ||
| 122 | #endif | ||
| 123 | /*! @abstract A boolean scalar. | ||
| 124 | * @discussion This type is deprecated; In C or Objective-C sources, use | ||
| 125 | * `_Bool` instead. In C++ sources, use `bool`. */ | ||
| 126 | typedef simd_bool __SIMD_BOOLEAN_TYPE__; | ||
| 127 | |||
| 128 | # endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 129 | #endif /* defined SIMD_BASE */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/common.h deleted-4461| ... | @@ -1,4461 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide "common" elementwise | ||
| 3 | * operations that are neither math nor logic functions. These are available | ||
| 4 | * only for floating-point vectors and scalars, except for min, max, abs, | ||
| 5 | * clamp, and the reduce operations, which also support integer vectors. | ||
| 6 | * | ||
| 7 | * simd_abs(x) Absolute value of x. Also available as fabs | ||
| 8 | * for floating-point vectors. If x is the | ||
| 9 | * smallest signed integer, x is returned. | ||
| 10 | * | ||
| 11 | * simd_max(x,y) Returns the maximum of x and y. Also available | ||
| 12 | * as fmax for floating-point vectors. | ||
| 13 | * | ||
| 14 | * simd_min(x,y) Returns the minimum of x and y. Also available | ||
| 15 | * as fmin for floating-point vectors. | ||
| 16 | * | ||
| 17 | * simd_clamp(x,min,max) x clamped to the range [min, max]. | ||
| 18 | * | ||
| 19 | * simd_sign(x) -1 if x is less than zero, 0 if x is zero or | ||
| 20 | * NaN, and +1 if x is greater than zero. | ||
| 21 | * | ||
| 22 | * simd_mix(x,y,t) If t is not in the range [0,1], the result is | ||
| 23 | * simd_lerp(x,y,t) undefined. Otherwise the result is x+(y-x)*t, | ||
| 24 | * which linearly interpolates between x and y. | ||
| 25 | * | ||
| 26 | * simd_recip(x) An approximation to 1/x. If x is very near the | ||
| 27 | * limits of representable values, or is infinity | ||
| 28 | * or NaN, the result is undefined. There are | ||
| 29 | * two variants of this function: | ||
| 30 | * | ||
| 31 | * simd_precise_recip(x) | ||
| 32 | * | ||
| 33 | * and | ||
| 34 | * | ||
| 35 | * simd_fast_recip(x). | ||
| 36 | * | ||
| 37 | * The "precise" variant is accurate to a few ULPs, | ||
| 38 | * whereas the "fast" variant may have as little | ||
| 39 | * as 11 bits of accuracy in float and about 22 | ||
| 40 | * bits in double. | ||
| 41 | * | ||
| 42 | * The function simd_recip(x) resolves to | ||
| 43 | * simd_precise_recip(x) ordinarily, but to | ||
| 44 | * simd_fast_recip(x) when used in a translation | ||
| 45 | * unit compiled with -ffast-math (when | ||
| 46 | * -ffast-math is in effect, you may still use the | ||
| 47 | * precise version of this function by calling it | ||
| 48 | * explicitly by name). | ||
| 49 | * | ||
| 50 | * simd_rsqrt(x) An approximation to 1/sqrt(x). If x is | ||
| 51 | * infinity or NaN, the result is undefined. | ||
| 52 | * There are two variants of this function: | ||
| 53 | * | ||
| 54 | * simd_precise_rsqrt(x) | ||
| 55 | * | ||
| 56 | * and | ||
| 57 | * | ||
| 58 | * simd_fast_rsqrt(x). | ||
| 59 | * | ||
| 60 | * The "precise" variant is accurate to a few ULPs, | ||
| 61 | * whereas the "fast" variant may have as little | ||
| 62 | * as 11 bits of accuracy in float and about 22 | ||
| 63 | * bits in double. | ||
| 64 | * | ||
| 65 | * The function simd_rsqrt(x) resolves to | ||
| 66 | * simd_precise_rsqrt(x) ordinarily, but to | ||
| 67 | * simd_fast_rsqrt(x) when used in a translation | ||
| 68 | * unit compiled with -ffast-math (when | ||
| 69 | * -ffast-math is in effect, you may still use the | ||
| 70 | * precise version of this function by calling it | ||
| 71 | * explicitly by name). | ||
| 72 | * | ||
| 73 | * simd_fract(x) The "fractional part" of x, which lies strictly | ||
| 74 | * in the range [0, 0x1.fffffep-1]. | ||
| 75 | * | ||
| 76 | * simd_step(edge,x) 0 if x < edge, and 1 otherwise. | ||
| 77 | * | ||
| 78 | * simd_smoothstep(edge0,edge1,x) 0 if x <= edge0, 1 if x >= edge1, and | ||
| 79 | * a Hermite interpolation between 0 and 1 if | ||
| 80 | * edge0 < x < edge1. | ||
| 81 | * | ||
| 82 | * simd_reduce_add(x) Sum of the elements of x. | ||
| 83 | * | ||
| 84 | * simd_reduce_min(x) Minimum of the elements of x. | ||
| 85 | * | ||
| 86 | * simd_reduce_max(x) Maximum of the elements of x. | ||
| 87 | * | ||
| 88 | * simd_equal(x,y) True if and only if every lane of x is equal | ||
| 89 | * to the corresponding lane of y. | ||
| 90 | * | ||
| 91 | * The following common functions are available in the simd:: namespace: | ||
| 92 | * | ||
| 93 | * C++ Function Equivalent C Function | ||
| 94 | * -------------------------------------------------------------------- | ||
| 95 | * simd::abs(x) simd_abs(x) | ||
| 96 | * simd::max(x,y) simd_max(x,y) | ||
| 97 | * simd::min(x,y) simd_min(x,y) | ||
| 98 | * simd::clamp(x,min,max) simd_clamp(x,min,max) | ||
| 99 | * simd::sign(x) simd_sign(x) | ||
| 100 | * simd::mix(x,y,t) simd_mix(x,y,t) | ||
| 101 | * simd::lerp(x,y,t) simd_lerp(x,y,t) | ||
| 102 | * simd::recip(x) simd_recip(x) | ||
| 103 | * simd::rsqrt(x) simd_rsqrt(x) | ||
| 104 | * simd::fract(x) simd_fract(x) | ||
| 105 | * simd::step(edge,x) simd_step(edge,x) | ||
| 106 | * simd::smoothstep(e0,e1,x) simd_smoothstep(e0,e1,x) | ||
| 107 | * simd::reduce_add(x) simd_reduce_add(x) | ||
| 108 | * simd::reduce_max(x) simd_reduce_max(x) | ||
| 109 | * simd::reduce_min(x) simd_reduce_min(x) | ||
| 110 | * simd::equal(x,y) simd_equal(x,y) | ||
| 111 | * | ||
| 112 | * simd::precise::recip(x) simd_precise_recip(x) | ||
| 113 | * simd::precise::rsqrt(x) simd_precise_rsqrt(x) | ||
| 114 | * | ||
| 115 | * simd::fast::recip(x) simd_fast_recip(x) | ||
| 116 | * simd::fast::rsqrt(x) simd_fast_rsqrt(x) | ||
| 117 | * | ||
| 118 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 119 | * @unsorted */ | ||
| 120 | |||
| 121 | #ifndef SIMD_COMMON_HEADER | ||
| 122 | #define SIMD_COMMON_HEADER | ||
| 123 | |||
| 124 | #include <simd/base.h> | ||
| 125 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 126 | #include <simd/vector_make.h> | ||
| 127 | #include <simd/logic.h> | ||
| 128 | #include <simd/math.h> | ||
| 129 | |||
| 130 | #ifdef __cplusplus | ||
| 131 | extern "C" { | ||
| 132 | #endif | ||
| 133 | |||
| 134 | /*! @abstract The elementwise absolute value of x. */ | ||
| 135 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x); | ||
| 136 | /*! @abstract The elementwise absolute value of x. */ | ||
| 137 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x); | ||
| 138 | /*! @abstract The elementwise absolute value of x. */ | ||
| 139 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x); | ||
| 140 | /*! @abstract The elementwise absolute value of x. */ | ||
| 141 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x); | ||
| 142 | /*! @abstract The elementwise absolute value of x. */ | ||
| 143 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x); | ||
| 144 | /*! @abstract The elementwise absolute value of x. */ | ||
| 145 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x); | ||
| 146 | /*! @abstract The elementwise absolute value of x. */ | ||
| 147 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x); | ||
| 148 | /*! @abstract The elementwise absolute value of x. */ | ||
| 149 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x); | ||
| 150 | /*! @abstract The elementwise absolute value of x. */ | ||
| 151 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x); | ||
| 152 | /*! @abstract The elementwise absolute value of x. */ | ||
| 153 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x); | ||
| 154 | /*! @abstract The elementwise absolute value of x. */ | ||
| 155 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x); | ||
| 156 | /*! @abstract The elementwise absolute value of x. */ | ||
| 157 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x); | ||
| 158 | /*! @abstract The elementwise absolute value of x. */ | ||
| 159 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x); | ||
| 160 | /*! @abstract The elementwise absolute value of x. */ | ||
| 161 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x); | ||
| 162 | /*! @abstract The elementwise absolute value of x. */ | ||
| 163 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x); | ||
| 164 | /*! @abstract The elementwise absolute value of x. */ | ||
| 165 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x); | ||
| 166 | /*! @abstract The elementwise absolute value of x. */ | ||
| 167 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x); | ||
| 168 | /*! @abstract The elementwise absolute value of x. */ | ||
| 169 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x); | ||
| 170 | /*! @abstract The elementwise absolute value of x. */ | ||
| 171 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x); | ||
| 172 | /*! @abstract The elementwise absolute value of x. */ | ||
| 173 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x); | ||
| 174 | /*! @abstract The elementwise absolute value of x. */ | ||
| 175 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x); | ||
| 176 | /*! @abstract The elementwise absolute value of x. */ | ||
| 177 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x); | ||
| 178 | /*! @abstract The elementwise absolute value of x. */ | ||
| 179 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x); | ||
| 180 | /*! @abstract The elementwise absolute value of x. */ | ||
| 181 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x); | ||
| 182 | /*! @abstract The elementwise absolute value of x. */ | ||
| 183 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x); | ||
| 184 | /*! @abstract The elementwise absolute value of x. */ | ||
| 185 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x); | ||
| 186 | /*! @abstract The elementwise absolute value of x. */ | ||
| 187 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x); | ||
| 188 | /*! @abstract The elementwise absolute value of x. */ | ||
| 189 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x); | ||
| 190 | /*! @abstract The elementwise absolute value of x. */ | ||
| 191 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x); | ||
| 192 | /*! @abstract The elementwise absolute value of x. */ | ||
| 193 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x); | ||
| 194 | /*! @abstract The elementwise absolute value of x. */ | ||
| 195 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x); | ||
| 196 | /*! @abstract The elementwise absolute value of x. | ||
| 197 | * @discussion Deprecated. Use simd_abs(x) instead. */ | ||
| 198 | #define vector_abs simd_abs | ||
| 199 | |||
| 200 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 201 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y); | ||
| 202 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 203 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y); | ||
| 204 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 205 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y); | ||
| 206 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 207 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y); | ||
| 208 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 209 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y); | ||
| 210 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 211 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y); | ||
| 212 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 213 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y); | ||
| 214 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 215 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y); | ||
| 216 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 217 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y); | ||
| 218 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 219 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y); | ||
| 220 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 221 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y); | ||
| 222 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 223 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y); | ||
| 224 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 225 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y); | ||
| 226 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 227 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y); | ||
| 228 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 229 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y); | ||
| 230 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 231 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y); | ||
| 232 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 233 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y); | ||
| 234 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 235 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y); | ||
| 236 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 237 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y); | ||
| 238 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 239 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y); | ||
| 240 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 241 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y); | ||
| 242 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 243 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y); | ||
| 244 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 245 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y); | ||
| 246 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 247 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y); | ||
| 248 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 249 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y); | ||
| 250 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 251 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y); | ||
| 252 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 253 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y); | ||
| 254 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 255 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y); | ||
| 256 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 257 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y); | ||
| 258 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 259 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y); | ||
| 260 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 261 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y); | ||
| 262 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 263 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y); | ||
| 264 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 265 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y); | ||
| 266 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 267 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y); | ||
| 268 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 269 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y); | ||
| 270 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 271 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y); | ||
| 272 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 273 | static inline SIMD_CFUNC float simd_max(float x, float y); | ||
| 274 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 275 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y); | ||
| 276 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 277 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y); | ||
| 278 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 279 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y); | ||
| 280 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 281 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y); | ||
| 282 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 283 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y); | ||
| 284 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 285 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y); | ||
| 286 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 287 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y); | ||
| 288 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 289 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y); | ||
| 290 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 291 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y); | ||
| 292 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 293 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y); | ||
| 294 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 295 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y); | ||
| 296 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 297 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y); | ||
| 298 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 299 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y); | ||
| 300 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 301 | static inline SIMD_CFUNC double simd_max(double x, double y); | ||
| 302 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 303 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y); | ||
| 304 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 305 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y); | ||
| 306 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 307 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y); | ||
| 308 | /*! @abstract The elementwise maximum of x and y. */ | ||
| 309 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y); | ||
| 310 | /*! @abstract The elementwise maximum of x and y. | ||
| 311 | * @discussion Deprecated. Use simd_max(x,y) instead. */ | ||
| 312 | #define vector_max simd_max | ||
| 313 | |||
| 314 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 315 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y); | ||
| 316 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 317 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y); | ||
| 318 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 319 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y); | ||
| 320 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 321 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y); | ||
| 322 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 323 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y); | ||
| 324 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 325 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y); | ||
| 326 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 327 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y); | ||
| 328 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 329 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y); | ||
| 330 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 331 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y); | ||
| 332 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 333 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y); | ||
| 334 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 335 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y); | ||
| 336 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 337 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y); | ||
| 338 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 339 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y); | ||
| 340 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 341 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y); | ||
| 342 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 343 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y); | ||
| 344 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 345 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y); | ||
| 346 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 347 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y); | ||
| 348 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 349 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y); | ||
| 350 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 351 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y); | ||
| 352 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 353 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y); | ||
| 354 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 355 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y); | ||
| 356 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 357 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y); | ||
| 358 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 359 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y); | ||
| 360 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 361 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y); | ||
| 362 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 363 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y); | ||
| 364 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 365 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y); | ||
| 366 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 367 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y); | ||
| 368 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 369 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y); | ||
| 370 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 371 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y); | ||
| 372 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 373 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y); | ||
| 374 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 375 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y); | ||
| 376 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 377 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y); | ||
| 378 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 379 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y); | ||
| 380 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 381 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y); | ||
| 382 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 383 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y); | ||
| 384 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 385 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y); | ||
| 386 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 387 | static inline SIMD_CFUNC float simd_min(float x, float y); | ||
| 388 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 389 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y); | ||
| 390 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 391 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y); | ||
| 392 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 393 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y); | ||
| 394 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 395 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y); | ||
| 396 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 397 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y); | ||
| 398 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 399 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y); | ||
| 400 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 401 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y); | ||
| 402 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 403 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y); | ||
| 404 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 405 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y); | ||
| 406 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 407 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y); | ||
| 408 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 409 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y); | ||
| 410 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 411 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y); | ||
| 412 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 413 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y); | ||
| 414 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 415 | static inline SIMD_CFUNC double simd_min(double x, double y); | ||
| 416 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 417 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y); | ||
| 418 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 419 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y); | ||
| 420 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 421 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y); | ||
| 422 | /*! @abstract The elementwise minimum of x and y. */ | ||
| 423 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y); | ||
| 424 | /*! @abstract The elementwise minimum of x and y. | ||
| 425 | * @discussion Deprecated. Use simd_min(x,y) instead. */ | ||
| 426 | #define vector_min simd_min | ||
| 427 | |||
| 428 | |||
| 429 | /*! @abstract x clamped to the range [min, max]. | ||
| 430 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 431 | * you can use a scalar value for min and max. */ | ||
| 432 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max); | ||
| 433 | /*! @abstract x clamped to the range [min, max]. | ||
| 434 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 435 | * you can use a scalar value for min and max. */ | ||
| 436 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max); | ||
| 437 | /*! @abstract x clamped to the range [min, max]. | ||
| 438 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 439 | * you can use a scalar value for min and max. */ | ||
| 440 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max); | ||
| 441 | /*! @abstract x clamped to the range [min, max]. | ||
| 442 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 443 | * you can use a scalar value for min and max. */ | ||
| 444 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max); | ||
| 445 | /*! @abstract x clamped to the range [min, max]. | ||
| 446 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 447 | * you can use a scalar value for min and max. */ | ||
| 448 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max); | ||
| 449 | /*! @abstract x clamped to the range [min, max]. | ||
| 450 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 451 | * you can use a scalar value for min and max. */ | ||
| 452 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max); | ||
| 453 | /*! @abstract x clamped to the range [min, max]. | ||
| 454 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 455 | * you can use a scalar value for min and max. */ | ||
| 456 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max); | ||
| 457 | /*! @abstract x clamped to the range [min, max]. | ||
| 458 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 459 | * you can use a scalar value for min and max. */ | ||
| 460 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max); | ||
| 461 | /*! @abstract x clamped to the range [min, max]. | ||
| 462 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 463 | * you can use a scalar value for min and max. */ | ||
| 464 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max); | ||
| 465 | /*! @abstract x clamped to the range [min, max]. | ||
| 466 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 467 | * you can use a scalar value for min and max. */ | ||
| 468 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max); | ||
| 469 | /*! @abstract x clamped to the range [min, max]. | ||
| 470 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 471 | * you can use a scalar value for min and max. */ | ||
| 472 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max); | ||
| 473 | /*! @abstract x clamped to the range [min, max]. | ||
| 474 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 475 | * you can use a scalar value for min and max. */ | ||
| 476 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max); | ||
| 477 | /*! @abstract x clamped to the range [min, max]. | ||
| 478 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 479 | * you can use a scalar value for min and max. */ | ||
| 480 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max); | ||
| 481 | /*! @abstract x clamped to the range [min, max]. | ||
| 482 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 483 | * you can use a scalar value for min and max. */ | ||
| 484 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max); | ||
| 485 | /*! @abstract x clamped to the range [min, max]. | ||
| 486 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 487 | * you can use a scalar value for min and max. */ | ||
| 488 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max); | ||
| 489 | /*! @abstract x clamped to the range [min, max]. | ||
| 490 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 491 | * you can use a scalar value for min and max. */ | ||
| 492 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max); | ||
| 493 | /*! @abstract x clamped to the range [min, max]. | ||
| 494 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 495 | * you can use a scalar value for min and max. */ | ||
| 496 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max); | ||
| 497 | /*! @abstract x clamped to the range [min, max]. | ||
| 498 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 499 | * you can use a scalar value for min and max. */ | ||
| 500 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max); | ||
| 501 | /*! @abstract x clamped to the range [min, max]. | ||
| 502 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 503 | * you can use a scalar value for min and max. */ | ||
| 504 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max); | ||
| 505 | /*! @abstract x clamped to the range [min, max]. | ||
| 506 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 507 | * you can use a scalar value for min and max. */ | ||
| 508 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max); | ||
| 509 | /*! @abstract x clamped to the range [min, max]. | ||
| 510 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 511 | * you can use a scalar value for min and max. */ | ||
| 512 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max); | ||
| 513 | /*! @abstract x clamped to the range [min, max]. | ||
| 514 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 515 | * you can use a scalar value for min and max. */ | ||
| 516 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max); | ||
| 517 | /*! @abstract x clamped to the range [min, max]. | ||
| 518 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 519 | * you can use a scalar value for min and max. */ | ||
| 520 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max); | ||
| 521 | /*! @abstract x clamped to the range [min, max]. | ||
| 522 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 523 | * you can use a scalar value for min and max. */ | ||
| 524 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max); | ||
| 525 | /*! @abstract x clamped to the range [min, max]. | ||
| 526 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 527 | * you can use a scalar value for min and max. */ | ||
| 528 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max); | ||
| 529 | /*! @abstract x clamped to the range [min, max]. | ||
| 530 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 531 | * you can use a scalar value for min and max. */ | ||
| 532 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max); | ||
| 533 | /*! @abstract x clamped to the range [min, max]. | ||
| 534 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 535 | * you can use a scalar value for min and max. */ | ||
| 536 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max); | ||
| 537 | /*! @abstract x clamped to the range [min, max]. | ||
| 538 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 539 | * you can use a scalar value for min and max. */ | ||
| 540 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max); | ||
| 541 | /*! @abstract x clamped to the range [min, max]. | ||
| 542 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 543 | * you can use a scalar value for min and max. */ | ||
| 544 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max); | ||
| 545 | /*! @abstract x clamped to the range [min, max]. | ||
| 546 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 547 | * you can use a scalar value for min and max. */ | ||
| 548 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max); | ||
| 549 | /*! @abstract x clamped to the range [min, max]. | ||
| 550 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 551 | * you can use a scalar value for min and max. */ | ||
| 552 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max); | ||
| 553 | /*! @abstract x clamped to the range [min, max]. | ||
| 554 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 555 | * you can use a scalar value for min and max. */ | ||
| 556 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max); | ||
| 557 | /*! @abstract x clamped to the range [min, max]. | ||
| 558 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 559 | * you can use a scalar value for min and max. */ | ||
| 560 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max); | ||
| 561 | /*! @abstract x clamped to the range [min, max]. | ||
| 562 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 563 | * you can use a scalar value for min and max. */ | ||
| 564 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max); | ||
| 565 | /*! @abstract x clamped to the range [min, max]. | ||
| 566 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 567 | * you can use a scalar value for min and max. */ | ||
| 568 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max); | ||
| 569 | /*! @abstract x clamped to the range [min, max]. | ||
| 570 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 571 | * you can use a scalar value for min and max. */ | ||
| 572 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max); | ||
| 573 | /*! @abstract x clamped to the range [min, max]. | ||
| 574 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 575 | * you can use a scalar value for min and max. */ | ||
| 576 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max); | ||
| 577 | /*! @abstract x clamped to the range [min, max]. | ||
| 578 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 579 | * you can use a scalar value for min and max. */ | ||
| 580 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max); | ||
| 581 | /*! @abstract x clamped to the range [min, max]. | ||
| 582 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 583 | * you can use a scalar value for min and max. */ | ||
| 584 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max); | ||
| 585 | /*! @abstract x clamped to the range [min, max]. | ||
| 586 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 587 | * you can use a scalar value for min and max. */ | ||
| 588 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max); | ||
| 589 | /*! @abstract x clamped to the range [min, max]. | ||
| 590 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 591 | * you can use a scalar value for min and max. */ | ||
| 592 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max); | ||
| 593 | /*! @abstract x clamped to the range [min, max]. | ||
| 594 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 595 | * you can use a scalar value for min and max. */ | ||
| 596 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max); | ||
| 597 | /*! @abstract x clamped to the range [min, max]. | ||
| 598 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 599 | * you can use a scalar value for min and max. */ | ||
| 600 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max); | ||
| 601 | /*! @abstract x clamped to the range [min, max]. | ||
| 602 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 603 | * you can use a scalar value for min and max. */ | ||
| 604 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max); | ||
| 605 | /*! @abstract x clamped to the range [min, max]. | ||
| 606 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 607 | * you can use a scalar value for min and max. */ | ||
| 608 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max); | ||
| 609 | /*! @abstract x clamped to the range [min, max]. | ||
| 610 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 611 | * you can use a scalar value for min and max. */ | ||
| 612 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max); | ||
| 613 | /*! @abstract x clamped to the range [min, max]. | ||
| 614 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 615 | * you can use a scalar value for min and max. */ | ||
| 616 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max); | ||
| 617 | /*! @abstract x clamped to the range [min, max]. | ||
| 618 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 619 | * you can use a scalar value for min and max. */ | ||
| 620 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max); | ||
| 621 | /*! @abstract x clamped to the range [min, max]. | ||
| 622 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 623 | * you can use a scalar value for min and max. */ | ||
| 624 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max); | ||
| 625 | /*! @abstract x clamped to the range [min, max]. | ||
| 626 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 627 | * you can use a scalar value for min and max. */ | ||
| 628 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max); | ||
| 629 | /*! @abstract x clamped to the range [min, max]. | ||
| 630 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 631 | * you can use a scalar value for min and max. */ | ||
| 632 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max); | ||
| 633 | /*! @abstract x clamped to the range [min, max]. | ||
| 634 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 635 | * you can use a scalar value for min and max. */ | ||
| 636 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max); | ||
| 637 | /*! @abstract x clamped to the range [min, max]. | ||
| 638 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 639 | * you can use a scalar value for min and max. */ | ||
| 640 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max); | ||
| 641 | /*! @abstract x clamped to the range [min, max]. | ||
| 642 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 643 | * you can use a scalar value for min and max. */ | ||
| 644 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max); | ||
| 645 | /*! @abstract x clamped to the range [min, max]. | ||
| 646 | * @discussion Note that if you want to clamp all lanes to the same range, | ||
| 647 | * you can use a scalar value for min and max. */ | ||
| 648 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max); | ||
| 649 | /*! @abstract x clamped to the range [min, max]. | ||
| 650 | * @discussion Deprecated. Use simd_clamp(x,min,max) instead. */ | ||
| 651 | #define vector_clamp simd_clamp | ||
| 652 | |||
| 653 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 654 | static inline SIMD_CFUNC float simd_sign(float x); | ||
| 655 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 656 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x); | ||
| 657 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 658 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x); | ||
| 659 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 660 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x); | ||
| 661 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 662 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x); | ||
| 663 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 664 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x); | ||
| 665 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 666 | static inline SIMD_CFUNC double simd_sign(double x); | ||
| 667 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 668 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x); | ||
| 669 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 670 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x); | ||
| 671 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 672 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x); | ||
| 673 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. */ | ||
| 674 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x); | ||
| 675 | /*! @abstract -1 if x is negative, +1 if x is positive, and 0 otherwise. | ||
| 676 | * @discussion Deprecated. Use simd_sign(x) instead. */ | ||
| 677 | #define vector_sign simd_sign | ||
| 678 | |||
| 679 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 680 | * t=0 and y when t=1 */ | ||
| 681 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t); | ||
| 682 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 683 | * t=0 and y when t=1 */ | ||
| 684 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t); | ||
| 685 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 686 | * t=0 and y when t=1 */ | ||
| 687 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t); | ||
| 688 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 689 | * t=0 and y when t=1 */ | ||
| 690 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t); | ||
| 691 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 692 | * t=0 and y when t=1 */ | ||
| 693 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t); | ||
| 694 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 695 | * t=0 and y when t=1 */ | ||
| 696 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t); | ||
| 697 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 698 | * t=0 and y when t=1 */ | ||
| 699 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t); | ||
| 700 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 701 | * t=0 and y when t=1 */ | ||
| 702 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t); | ||
| 703 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 704 | * t=0 and y when t=1 */ | ||
| 705 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t); | ||
| 706 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 707 | * t=0 and y when t=1 */ | ||
| 708 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t); | ||
| 709 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 710 | * t=0 and y when t=1 */ | ||
| 711 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t); | ||
| 712 | /*! @abstract Linearly interpolates between x and y, taking the value x when | ||
| 713 | * t=0 and y when t=1 | ||
| 714 | * @discussion Deprecated. Use simd_mix(x, y, t) instead. */ | ||
| 715 | #define vector_mix simd_mix | ||
| 716 | #define simd_lerp simd_mix | ||
| 717 | |||
| 718 | /*! @abstract A good approximation to 1/x. | ||
| 719 | * @discussion If x is very close to the limits of representation, the | ||
| 720 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 721 | * a few units in the last place (ULPs). */ | ||
| 722 | static inline SIMD_CFUNC float simd_precise_recip(float x); | ||
| 723 | /*! @abstract A good approximation to 1/x. | ||
| 724 | * @discussion If x is very close to the limits of representation, the | ||
| 725 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 726 | * a few units in the last place (ULPs). */ | ||
| 727 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x); | ||
| 728 | /*! @abstract A good approximation to 1/x. | ||
| 729 | * @discussion If x is very close to the limits of representation, the | ||
| 730 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 731 | * a few units in the last place (ULPs). */ | ||
| 732 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x); | ||
| 733 | /*! @abstract A good approximation to 1/x. | ||
| 734 | * @discussion If x is very close to the limits of representation, the | ||
| 735 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 736 | * a few units in the last place (ULPs). */ | ||
| 737 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x); | ||
| 738 | /*! @abstract A good approximation to 1/x. | ||
| 739 | * @discussion If x is very close to the limits of representation, the | ||
| 740 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 741 | * a few units in the last place (ULPs). */ | ||
| 742 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x); | ||
| 743 | /*! @abstract A good approximation to 1/x. | ||
| 744 | * @discussion If x is very close to the limits of representation, the | ||
| 745 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 746 | * a few units in the last place (ULPs). */ | ||
| 747 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x); | ||
| 748 | /*! @abstract A good approximation to 1/x. | ||
| 749 | * @discussion If x is very close to the limits of representation, the | ||
| 750 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 751 | * a few units in the last place (ULPs). */ | ||
| 752 | static inline SIMD_CFUNC double simd_precise_recip(double x); | ||
| 753 | /*! @abstract A good approximation to 1/x. | ||
| 754 | * @discussion If x is very close to the limits of representation, the | ||
| 755 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 756 | * a few units in the last place (ULPs). */ | ||
| 757 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x); | ||
| 758 | /*! @abstract A good approximation to 1/x. | ||
| 759 | * @discussion If x is very close to the limits of representation, the | ||
| 760 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 761 | * a few units in the last place (ULPs). */ | ||
| 762 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x); | ||
| 763 | /*! @abstract A good approximation to 1/x. | ||
| 764 | * @discussion If x is very close to the limits of representation, the | ||
| 765 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 766 | * a few units in the last place (ULPs). */ | ||
| 767 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x); | ||
| 768 | /*! @abstract A good approximation to 1/x. | ||
| 769 | * @discussion If x is very close to the limits of representation, the | ||
| 770 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 771 | * a few units in the last place (ULPs). */ | ||
| 772 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x); | ||
| 773 | /*! @abstract A good approximation to 1/x. | ||
| 774 | * @discussion Deprecated. Use simd_precise_recip(x) instead. */ | ||
| 775 | #define vector_precise_recip simd_precise_recip | ||
| 776 | |||
| 777 | /*! @abstract A fast approximation to 1/x. | ||
| 778 | * @discussion If x is very close to the limits of representation, the | ||
| 779 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 780 | * at least 11 bits for float and 22 bits for double. */ | ||
| 781 | static inline SIMD_CFUNC float simd_fast_recip(float x); | ||
| 782 | /*! @abstract A fast approximation to 1/x. | ||
| 783 | * @discussion If x is very close to the limits of representation, the | ||
| 784 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 785 | * at least 11 bits for float and 22 bits for double. */ | ||
| 786 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x); | ||
| 787 | /*! @abstract A fast approximation to 1/x. | ||
| 788 | * @discussion If x is very close to the limits of representation, the | ||
| 789 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 790 | * at least 11 bits for float and 22 bits for double. */ | ||
| 791 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x); | ||
| 792 | /*! @abstract A fast approximation to 1/x. | ||
| 793 | * @discussion If x is very close to the limits of representation, the | ||
| 794 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 795 | * at least 11 bits for float and 22 bits for double. */ | ||
| 796 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x); | ||
| 797 | /*! @abstract A fast approximation to 1/x. | ||
| 798 | * @discussion If x is very close to the limits of representation, the | ||
| 799 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 800 | * at least 11 bits for float and 22 bits for double. */ | ||
| 801 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x); | ||
| 802 | /*! @abstract A fast approximation to 1/x. | ||
| 803 | * @discussion If x is very close to the limits of representation, the | ||
| 804 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 805 | * at least 11 bits for float and 22 bits for double. */ | ||
| 806 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x); | ||
| 807 | /*! @abstract A fast approximation to 1/x. | ||
| 808 | * @discussion If x is very close to the limits of representation, the | ||
| 809 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 810 | * at least 11 bits for float and 22 bits for double. */ | ||
| 811 | static inline SIMD_CFUNC double simd_fast_recip(double x); | ||
| 812 | /*! @abstract A fast approximation to 1/x. | ||
| 813 | * @discussion If x is very close to the limits of representation, the | ||
| 814 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 815 | * at least 11 bits for float and 22 bits for double. */ | ||
| 816 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x); | ||
| 817 | /*! @abstract A fast approximation to 1/x. | ||
| 818 | * @discussion If x is very close to the limits of representation, the | ||
| 819 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 820 | * at least 11 bits for float and 22 bits for double. */ | ||
| 821 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x); | ||
| 822 | /*! @abstract A fast approximation to 1/x. | ||
| 823 | * @discussion If x is very close to the limits of representation, the | ||
| 824 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 825 | * at least 11 bits for float and 22 bits for double. */ | ||
| 826 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x); | ||
| 827 | /*! @abstract A fast approximation to 1/x. | ||
| 828 | * @discussion If x is very close to the limits of representation, the | ||
| 829 | * result may overflow or underflow; otherwise this function is accurate to | ||
| 830 | * at least 11 bits for float and 22 bits for double. */ | ||
| 831 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x); | ||
| 832 | /*! @abstract A fast approximation to 1/x. | ||
| 833 | * @discussion Deprecated. Use simd_fast_recip(x) instead. */ | ||
| 834 | #define vector_fast_recip simd_fast_recip | ||
| 835 | |||
| 836 | /*! @abstract An approximation to 1/x. | ||
| 837 | * @discussion If x is very close to the limits of representation, the | ||
| 838 | * result may overflow or underflow. This function maps to | ||
| 839 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 840 | * simd_precise_recip(x) otherwise. */ | ||
| 841 | static inline SIMD_CFUNC float simd_recip(float x); | ||
| 842 | /*! @abstract An approximation to 1/x. | ||
| 843 | * @discussion If x is very close to the limits of representation, the | ||
| 844 | * result may overflow or underflow. This function maps to | ||
| 845 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 846 | * simd_precise_recip(x) otherwise. */ | ||
| 847 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x); | ||
| 848 | /*! @abstract An approximation to 1/x. | ||
| 849 | * @discussion If x is very close to the limits of representation, the | ||
| 850 | * result may overflow or underflow. This function maps to | ||
| 851 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 852 | * simd_precise_recip(x) otherwise. */ | ||
| 853 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x); | ||
| 854 | /*! @abstract An approximation to 1/x. | ||
| 855 | * @discussion If x is very close to the limits of representation, the | ||
| 856 | * result may overflow or underflow. This function maps to | ||
| 857 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 858 | * simd_precise_recip(x) otherwise. */ | ||
| 859 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x); | ||
| 860 | /*! @abstract An approximation to 1/x. | ||
| 861 | * @discussion If x is very close to the limits of representation, the | ||
| 862 | * result may overflow or underflow. This function maps to | ||
| 863 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 864 | * simd_precise_recip(x) otherwise. */ | ||
| 865 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x); | ||
| 866 | /*! @abstract An approximation to 1/x. | ||
| 867 | * @discussion If x is very close to the limits of representation, the | ||
| 868 | * result may overflow or underflow. This function maps to | ||
| 869 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 870 | * simd_precise_recip(x) otherwise. */ | ||
| 871 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x); | ||
| 872 | /*! @abstract An approximation to 1/x. | ||
| 873 | * @discussion If x is very close to the limits of representation, the | ||
| 874 | * result may overflow or underflow. This function maps to | ||
| 875 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 876 | * simd_precise_recip(x) otherwise. */ | ||
| 877 | static inline SIMD_CFUNC double simd_recip(double x); | ||
| 878 | /*! @abstract An approximation to 1/x. | ||
| 879 | * @discussion If x is very close to the limits of representation, the | ||
| 880 | * result may overflow or underflow. This function maps to | ||
| 881 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 882 | * simd_precise_recip(x) otherwise. */ | ||
| 883 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x); | ||
| 884 | /*! @abstract An approximation to 1/x. | ||
| 885 | * @discussion If x is very close to the limits of representation, the | ||
| 886 | * result may overflow or underflow. This function maps to | ||
| 887 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 888 | * simd_precise_recip(x) otherwise. */ | ||
| 889 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x); | ||
| 890 | /*! @abstract An approximation to 1/x. | ||
| 891 | * @discussion If x is very close to the limits of representation, the | ||
| 892 | * result may overflow or underflow. This function maps to | ||
| 893 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 894 | * simd_precise_recip(x) otherwise. */ | ||
| 895 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x); | ||
| 896 | /*! @abstract An approximation to 1/x. | ||
| 897 | * @discussion If x is very close to the limits of representation, the | ||
| 898 | * result may overflow or underflow. This function maps to | ||
| 899 | * simd_fast_recip(x) if -ffast-math is specified, and to | ||
| 900 | * simd_precise_recip(x) otherwise. */ | ||
| 901 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x); | ||
| 902 | /*! @abstract An approximation to 1/x. | ||
| 903 | * @discussion Deprecated. Use simd_recip(x) instead. */ | ||
| 904 | #define vector_recip simd_recip | ||
| 905 | |||
| 906 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 907 | * @discussion This function is accurate to a few units in the last place | ||
| 908 | * (ULPs). */ | ||
| 909 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x); | ||
| 910 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 911 | * @discussion This function is accurate to a few units in the last place | ||
| 912 | * (ULPs). */ | ||
| 913 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x); | ||
| 914 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 915 | * @discussion This function is accurate to a few units in the last place | ||
| 916 | * (ULPs). */ | ||
| 917 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x); | ||
| 918 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 919 | * @discussion This function is accurate to a few units in the last place | ||
| 920 | * (ULPs). */ | ||
| 921 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x); | ||
| 922 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 923 | * @discussion This function is accurate to a few units in the last place | ||
| 924 | * (ULPs). */ | ||
| 925 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x); | ||
| 926 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 927 | * @discussion This function is accurate to a few units in the last place | ||
| 928 | * (ULPs). */ | ||
| 929 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x); | ||
| 930 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 931 | * @discussion This function is accurate to a few units in the last place | ||
| 932 | * (ULPs). */ | ||
| 933 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x); | ||
| 934 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 935 | * @discussion This function is accurate to a few units in the last place | ||
| 936 | * (ULPs). */ | ||
| 937 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x); | ||
| 938 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 939 | * @discussion This function is accurate to a few units in the last place | ||
| 940 | * (ULPs). */ | ||
| 941 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x); | ||
| 942 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 943 | * @discussion This function is accurate to a few units in the last place | ||
| 944 | * (ULPs). */ | ||
| 945 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x); | ||
| 946 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 947 | * @discussion This function is accurate to a few units in the last place | ||
| 948 | * (ULPs). */ | ||
| 949 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x); | ||
| 950 | /*! @abstract A good approximation to 1/sqrt(x). | ||
| 951 | * @discussion Deprecated. Use simd_precise_rsqrt(x) instead. */ | ||
| 952 | #define vector_precise_rsqrt simd_precise_rsqrt | ||
| 953 | |||
| 954 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 955 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 956 | * 22 bits for double. */ | ||
| 957 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x); | ||
| 958 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 959 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 960 | * 22 bits for double. */ | ||
| 961 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x); | ||
| 962 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 963 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 964 | * 22 bits for double. */ | ||
| 965 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x); | ||
| 966 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 967 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 968 | * 22 bits for double. */ | ||
| 969 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x); | ||
| 970 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 971 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 972 | * 22 bits for double. */ | ||
| 973 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x); | ||
| 974 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 975 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 976 | * 22 bits for double. */ | ||
| 977 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x); | ||
| 978 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 979 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 980 | * 22 bits for double. */ | ||
| 981 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x); | ||
| 982 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 983 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 984 | * 22 bits for double. */ | ||
| 985 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x); | ||
| 986 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 987 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 988 | * 22 bits for double. */ | ||
| 989 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x); | ||
| 990 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 991 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 992 | * 22 bits for double. */ | ||
| 993 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x); | ||
| 994 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 995 | * @discussion This function is accurate to at least 11 bits for float and | ||
| 996 | * 22 bits for double. */ | ||
| 997 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x); | ||
| 998 | /*! @abstract A fast approximation to 1/sqrt(x). | ||
| 999 | * @discussion Deprecated. Use simd_fast_rsqrt(x) instead. */ | ||
| 1000 | #define vector_fast_rsqrt simd_fast_rsqrt | ||
| 1001 | |||
| 1002 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1003 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1004 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1005 | static inline SIMD_CFUNC float simd_rsqrt(float x); | ||
| 1006 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1007 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1008 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1009 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x); | ||
| 1010 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1011 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1012 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1013 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x); | ||
| 1014 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1015 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1016 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1017 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x); | ||
| 1018 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1019 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1020 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1021 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x); | ||
| 1022 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1023 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1024 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1025 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x); | ||
| 1026 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1027 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1028 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1029 | static inline SIMD_CFUNC double simd_rsqrt(double x); | ||
| 1030 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1031 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1032 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1033 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x); | ||
| 1034 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1035 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1036 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1037 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x); | ||
| 1038 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1039 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1040 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1041 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x); | ||
| 1042 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1043 | * @discussion This function maps to simd_fast_recip(x) if -ffast-math is | ||
| 1044 | * specified, and to simd_precise_recip(x) otherwise. */ | ||
| 1045 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x); | ||
| 1046 | /*! @abstract An approximation to 1/sqrt(x). | ||
| 1047 | * @discussion Deprecated. Use simd_rsqrt(x) instead. */ | ||
| 1048 | #define vector_rsqrt simd_rsqrt | ||
| 1049 | |||
| 1050 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1051 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1052 | * positive and finite, then the two values are exactly equal. */ | ||
| 1053 | static inline SIMD_CFUNC float simd_fract(float x); | ||
| 1054 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1055 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1056 | * positive and finite, then the two values are exactly equal. */ | ||
| 1057 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x); | ||
| 1058 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1059 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1060 | * positive and finite, then the two values are exactly equal. */ | ||
| 1061 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x); | ||
| 1062 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1063 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1064 | * positive and finite, then the two values are exactly equal. */ | ||
| 1065 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x); | ||
| 1066 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1067 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1068 | * positive and finite, then the two values are exactly equal. */ | ||
| 1069 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x); | ||
| 1070 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1071 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1072 | * positive and finite, then the two values are exactly equal. */ | ||
| 1073 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x); | ||
| 1074 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1075 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1076 | * positive and finite, then the two values are exactly equal. */ | ||
| 1077 | static inline SIMD_CFUNC double simd_fract(double x); | ||
| 1078 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1079 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1080 | * positive and finite, then the two values are exactly equal. */ | ||
| 1081 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x); | ||
| 1082 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1083 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1084 | * positive and finite, then the two values are exactly equal. */ | ||
| 1085 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x); | ||
| 1086 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1087 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1088 | * positive and finite, then the two values are exactly equal. */ | ||
| 1089 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x); | ||
| 1090 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1091 | * @discussion floor(x) + fract(x) is *approximately* equal to x. If x is | ||
| 1092 | * positive and finite, then the two values are exactly equal. */ | ||
| 1093 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x); | ||
| 1094 | /*! @abstract The "fractional part" of x, lying in the range [0, 1). | ||
| 1095 | * @discussion Deprecated. Use simd_fract(x) instead. */ | ||
| 1096 | #define vector_fract simd_fract | ||
| 1097 | |||
| 1098 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1099 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1100 | * threshold to all lanes. */ | ||
| 1101 | static inline SIMD_CFUNC float simd_step(float edge, float x); | ||
| 1102 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1103 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1104 | * threshold to all lanes. */ | ||
| 1105 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x); | ||
| 1106 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1107 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1108 | * threshold to all lanes. */ | ||
| 1109 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x); | ||
| 1110 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1111 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1112 | * threshold to all lanes. */ | ||
| 1113 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x); | ||
| 1114 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1115 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1116 | * threshold to all lanes. */ | ||
| 1117 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x); | ||
| 1118 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1119 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1120 | * threshold to all lanes. */ | ||
| 1121 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x); | ||
| 1122 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1123 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1124 | * threshold to all lanes. */ | ||
| 1125 | static inline SIMD_CFUNC double simd_step(double edge, double x); | ||
| 1126 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1127 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1128 | * threshold to all lanes. */ | ||
| 1129 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x); | ||
| 1130 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1131 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1132 | * threshold to all lanes. */ | ||
| 1133 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x); | ||
| 1134 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1135 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1136 | * threshold to all lanes. */ | ||
| 1137 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x); | ||
| 1138 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1139 | * @discussion Use a scalar value for edge if you want to apply the same | ||
| 1140 | * threshold to all lanes. */ | ||
| 1141 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x); | ||
| 1142 | /*! @abstract 0 if x < edge, and 1 otherwise. | ||
| 1143 | * @discussion Deprecated. Use simd_step(edge, x) instead. */ | ||
| 1144 | #define vector_step simd_step | ||
| 1145 | |||
| 1146 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1147 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1148 | * to clamp all lanes at the same points. */ | ||
| 1149 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x); | ||
| 1150 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1151 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1152 | * to clamp all lanes at the same points. */ | ||
| 1153 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x); | ||
| 1154 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1155 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1156 | * to clamp all lanes at the same points. */ | ||
| 1157 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x); | ||
| 1158 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1159 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1160 | * to clamp all lanes at the same points. */ | ||
| 1161 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x); | ||
| 1162 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1163 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1164 | * to clamp all lanes at the same points. */ | ||
| 1165 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x); | ||
| 1166 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1167 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1168 | * to clamp all lanes at the same points. */ | ||
| 1169 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x); | ||
| 1170 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1171 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1172 | * to clamp all lanes at the same points. */ | ||
| 1173 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x); | ||
| 1174 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1175 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1176 | * to clamp all lanes at the same points. */ | ||
| 1177 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x); | ||
| 1178 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1179 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1180 | * to clamp all lanes at the same points. */ | ||
| 1181 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x); | ||
| 1182 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1183 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1184 | * to clamp all lanes at the same points. */ | ||
| 1185 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x); | ||
| 1186 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1187 | * @discussion You can use a scalar value for edge0 and edge1 if you want | ||
| 1188 | * to clamp all lanes at the same points. */ | ||
| 1189 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x); | ||
| 1190 | /*! @abstract Interpolates smoothly between 0 at edge0 and 1 at edge1 | ||
| 1191 | * @discussion Deprecated. Use simd_smoothstep(edge0, edge1, x) instead. */ | ||
| 1192 | #define vector_smoothstep simd_smoothstep | ||
| 1193 | |||
| 1194 | /*! @abstract Sum of elements in x. | ||
| 1195 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1196 | * may need to convert to a wider type before reducing. */ | ||
| 1197 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x); | ||
| 1198 | /*! @abstract Sum of elements in x. | ||
| 1199 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1200 | * may need to convert to a wider type before reducing. */ | ||
| 1201 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x); | ||
| 1202 | /*! @abstract Sum of elements in x. | ||
| 1203 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1204 | * may need to convert to a wider type before reducing. */ | ||
| 1205 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x); | ||
| 1206 | /*! @abstract Sum of elements in x. | ||
| 1207 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1208 | * may need to convert to a wider type before reducing. */ | ||
| 1209 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x); | ||
| 1210 | /*! @abstract Sum of elements in x. | ||
| 1211 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1212 | * may need to convert to a wider type before reducing. */ | ||
| 1213 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x); | ||
| 1214 | /*! @abstract Sum of elements in x. | ||
| 1215 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1216 | * may need to convert to a wider type before reducing. */ | ||
| 1217 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x); | ||
| 1218 | /*! @abstract Sum of elements in x. | ||
| 1219 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1220 | * may need to convert to a wider type before reducing. */ | ||
| 1221 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x); | ||
| 1222 | /*! @abstract Sum of elements in x. | ||
| 1223 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1224 | * may need to convert to a wider type before reducing. */ | ||
| 1225 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x); | ||
| 1226 | /*! @abstract Sum of elements in x. | ||
| 1227 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1228 | * may need to convert to a wider type before reducing. */ | ||
| 1229 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x); | ||
| 1230 | /*! @abstract Sum of elements in x. | ||
| 1231 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1232 | * may need to convert to a wider type before reducing. */ | ||
| 1233 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x); | ||
| 1234 | /*! @abstract Sum of elements in x. | ||
| 1235 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1236 | * may need to convert to a wider type before reducing. */ | ||
| 1237 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x); | ||
| 1238 | /*! @abstract Sum of elements in x. | ||
| 1239 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1240 | * may need to convert to a wider type before reducing. */ | ||
| 1241 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x); | ||
| 1242 | /*! @abstract Sum of elements in x. | ||
| 1243 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1244 | * may need to convert to a wider type before reducing. */ | ||
| 1245 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x); | ||
| 1246 | /*! @abstract Sum of elements in x. | ||
| 1247 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1248 | * may need to convert to a wider type before reducing. */ | ||
| 1249 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x); | ||
| 1250 | /*! @abstract Sum of elements in x. | ||
| 1251 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1252 | * may need to convert to a wider type before reducing. */ | ||
| 1253 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x); | ||
| 1254 | /*! @abstract Sum of elements in x. | ||
| 1255 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1256 | * may need to convert to a wider type before reducing. */ | ||
| 1257 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x); | ||
| 1258 | /*! @abstract Sum of elements in x. | ||
| 1259 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1260 | * may need to convert to a wider type before reducing. */ | ||
| 1261 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x); | ||
| 1262 | /*! @abstract Sum of elements in x. | ||
| 1263 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1264 | * may need to convert to a wider type before reducing. */ | ||
| 1265 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x); | ||
| 1266 | /*! @abstract Sum of elements in x. | ||
| 1267 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1268 | * may need to convert to a wider type before reducing. */ | ||
| 1269 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x); | ||
| 1270 | /*! @abstract Sum of elements in x. | ||
| 1271 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1272 | * may need to convert to a wider type before reducing. */ | ||
| 1273 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x); | ||
| 1274 | /*! @abstract Sum of elements in x. | ||
| 1275 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1276 | * may need to convert to a wider type before reducing. */ | ||
| 1277 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x); | ||
| 1278 | /*! @abstract Sum of elements in x. | ||
| 1279 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1280 | * may need to convert to a wider type before reducing. */ | ||
| 1281 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x); | ||
| 1282 | /*! @abstract Sum of elements in x. | ||
| 1283 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1284 | * may need to convert to a wider type before reducing. */ | ||
| 1285 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x); | ||
| 1286 | /*! @abstract Sum of elements in x. | ||
| 1287 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1288 | * may need to convert to a wider type before reducing. */ | ||
| 1289 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x); | ||
| 1290 | /*! @abstract Sum of elements in x. | ||
| 1291 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1292 | * may need to convert to a wider type before reducing. */ | ||
| 1293 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x); | ||
| 1294 | /*! @abstract Sum of elements in x. | ||
| 1295 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1296 | * may need to convert to a wider type before reducing. */ | ||
| 1297 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x); | ||
| 1298 | /*! @abstract Sum of elements in x. | ||
| 1299 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1300 | * may need to convert to a wider type before reducing. */ | ||
| 1301 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x); | ||
| 1302 | /*! @abstract Sum of elements in x. | ||
| 1303 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1304 | * may need to convert to a wider type before reducing. */ | ||
| 1305 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x); | ||
| 1306 | /*! @abstract Sum of elements in x. | ||
| 1307 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1308 | * may need to convert to a wider type before reducing. */ | ||
| 1309 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x); | ||
| 1310 | /*! @abstract Sum of elements in x. | ||
| 1311 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1312 | * may need to convert to a wider type before reducing. */ | ||
| 1313 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x); | ||
| 1314 | /*! @abstract Sum of elements in x. | ||
| 1315 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1316 | * may need to convert to a wider type before reducing. */ | ||
| 1317 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x); | ||
| 1318 | /*! @abstract Sum of elements in x. | ||
| 1319 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1320 | * may need to convert to a wider type before reducing. */ | ||
| 1321 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x); | ||
| 1322 | /*! @abstract Sum of elements in x. | ||
| 1323 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1324 | * may need to convert to a wider type before reducing. */ | ||
| 1325 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x); | ||
| 1326 | /*! @abstract Sum of elements in x. | ||
| 1327 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1328 | * may need to convert to a wider type before reducing. */ | ||
| 1329 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x); | ||
| 1330 | /*! @abstract Sum of elements in x. | ||
| 1331 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1332 | * may need to convert to a wider type before reducing. */ | ||
| 1333 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x); | ||
| 1334 | /*! @abstract Sum of elements in x. | ||
| 1335 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1336 | * may need to convert to a wider type before reducing. */ | ||
| 1337 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x); | ||
| 1338 | /*! @abstract Sum of elements in x. | ||
| 1339 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1340 | * may need to convert to a wider type before reducing. */ | ||
| 1341 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x); | ||
| 1342 | /*! @abstract Sum of elements in x. | ||
| 1343 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1344 | * may need to convert to a wider type before reducing. */ | ||
| 1345 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x); | ||
| 1346 | /*! @abstract Sum of elements in x. | ||
| 1347 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1348 | * may need to convert to a wider type before reducing. */ | ||
| 1349 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x); | ||
| 1350 | /*! @abstract Sum of elements in x. | ||
| 1351 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1352 | * may need to convert to a wider type before reducing. */ | ||
| 1353 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x); | ||
| 1354 | /*! @abstract Sum of elements in x. | ||
| 1355 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1356 | * may need to convert to a wider type before reducing. */ | ||
| 1357 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x); | ||
| 1358 | /*! @abstract Sum of elements in x. | ||
| 1359 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1360 | * may need to convert to a wider type before reducing. */ | ||
| 1361 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x); | ||
| 1362 | /*! @abstract Sum of elements in x. | ||
| 1363 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1364 | * may need to convert to a wider type before reducing. */ | ||
| 1365 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x); | ||
| 1366 | /*! @abstract Sum of elements in x. | ||
| 1367 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1368 | * may need to convert to a wider type before reducing. */ | ||
| 1369 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x); | ||
| 1370 | /*! @abstract Sum of elements in x. | ||
| 1371 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1372 | * may need to convert to a wider type before reducing. */ | ||
| 1373 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x); | ||
| 1374 | /*! @abstract Sum of elements in x. | ||
| 1375 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1376 | * may need to convert to a wider type before reducing. */ | ||
| 1377 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x); | ||
| 1378 | /*! @abstract Sum of elements in x. | ||
| 1379 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1380 | * may need to convert to a wider type before reducing. */ | ||
| 1381 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x); | ||
| 1382 | /*! @abstract Sum of elements in x. | ||
| 1383 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1384 | * may need to convert to a wider type before reducing. */ | ||
| 1385 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x); | ||
| 1386 | /*! @abstract Sum of elements in x. | ||
| 1387 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1388 | * may need to convert to a wider type before reducing. */ | ||
| 1389 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x); | ||
| 1390 | /*! @abstract Sum of elements in x. | ||
| 1391 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1392 | * may need to convert to a wider type before reducing. */ | ||
| 1393 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x); | ||
| 1394 | /*! @abstract Sum of elements in x. | ||
| 1395 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1396 | * may need to convert to a wider type before reducing. */ | ||
| 1397 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x); | ||
| 1398 | /*! @abstract Sum of elements in x. | ||
| 1399 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1400 | * may need to convert to a wider type before reducing. */ | ||
| 1401 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x); | ||
| 1402 | /*! @abstract Sum of elements in x. | ||
| 1403 | * @discussion This computation may overflow; especial for 8-bit types you | ||
| 1404 | * may need to convert to a wider type before reducing. */ | ||
| 1405 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x); | ||
| 1406 | /*! @abstract Sum of elements in x. | ||
| 1407 | * @discussion Deprecated. Use simd_add(x) instead. */ | ||
| 1408 | #define vector_reduce_add simd_reduce_add | ||
| 1409 | |||
| 1410 | /*! @abstract Minimum of elements in x. */ | ||
| 1411 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x); | ||
| 1412 | /*! @abstract Minimum of elements in x. */ | ||
| 1413 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x); | ||
| 1414 | /*! @abstract Minimum of elements in x. */ | ||
| 1415 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x); | ||
| 1416 | /*! @abstract Minimum of elements in x. */ | ||
| 1417 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x); | ||
| 1418 | /*! @abstract Minimum of elements in x. */ | ||
| 1419 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x); | ||
| 1420 | /*! @abstract Minimum of elements in x. */ | ||
| 1421 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x); | ||
| 1422 | /*! @abstract Minimum of elements in x. */ | ||
| 1423 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x); | ||
| 1424 | /*! @abstract Minimum of elements in x. */ | ||
| 1425 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x); | ||
| 1426 | /*! @abstract Minimum of elements in x. */ | ||
| 1427 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x); | ||
| 1428 | /*! @abstract Minimum of elements in x. */ | ||
| 1429 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x); | ||
| 1430 | /*! @abstract Minimum of elements in x. */ | ||
| 1431 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x); | ||
| 1432 | /*! @abstract Minimum of elements in x. */ | ||
| 1433 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x); | ||
| 1434 | /*! @abstract Minimum of elements in x. */ | ||
| 1435 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x); | ||
| 1436 | /*! @abstract Minimum of elements in x. */ | ||
| 1437 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x); | ||
| 1438 | /*! @abstract Minimum of elements in x. */ | ||
| 1439 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x); | ||
| 1440 | /*! @abstract Minimum of elements in x. */ | ||
| 1441 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x); | ||
| 1442 | /*! @abstract Minimum of elements in x. */ | ||
| 1443 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x); | ||
| 1444 | /*! @abstract Minimum of elements in x. */ | ||
| 1445 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x); | ||
| 1446 | /*! @abstract Minimum of elements in x. */ | ||
| 1447 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x); | ||
| 1448 | /*! @abstract Minimum of elements in x. */ | ||
| 1449 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x); | ||
| 1450 | /*! @abstract Minimum of elements in x. */ | ||
| 1451 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x); | ||
| 1452 | /*! @abstract Minimum of elements in x. */ | ||
| 1453 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x); | ||
| 1454 | /*! @abstract Minimum of elements in x. */ | ||
| 1455 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x); | ||
| 1456 | /*! @abstract Minimum of elements in x. */ | ||
| 1457 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x); | ||
| 1458 | /*! @abstract Minimum of elements in x. */ | ||
| 1459 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x); | ||
| 1460 | /*! @abstract Minimum of elements in x. */ | ||
| 1461 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x); | ||
| 1462 | /*! @abstract Minimum of elements in x. */ | ||
| 1463 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x); | ||
| 1464 | /*! @abstract Minimum of elements in x. */ | ||
| 1465 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x); | ||
| 1466 | /*! @abstract Minimum of elements in x. */ | ||
| 1467 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x); | ||
| 1468 | /*! @abstract Minimum of elements in x. */ | ||
| 1469 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x); | ||
| 1470 | /*! @abstract Minimum of elements in x. */ | ||
| 1471 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x); | ||
| 1472 | /*! @abstract Minimum of elements in x. */ | ||
| 1473 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x); | ||
| 1474 | /*! @abstract Minimum of elements in x. */ | ||
| 1475 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x); | ||
| 1476 | /*! @abstract Minimum of elements in x. */ | ||
| 1477 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x); | ||
| 1478 | /*! @abstract Minimum of elements in x. */ | ||
| 1479 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x); | ||
| 1480 | /*! @abstract Minimum of elements in x. */ | ||
| 1481 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x); | ||
| 1482 | /*! @abstract Minimum of elements in x. */ | ||
| 1483 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x); | ||
| 1484 | /*! @abstract Minimum of elements in x. */ | ||
| 1485 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x); | ||
| 1486 | /*! @abstract Minimum of elements in x. */ | ||
| 1487 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x); | ||
| 1488 | /*! @abstract Minimum of elements in x. */ | ||
| 1489 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x); | ||
| 1490 | /*! @abstract Minimum of elements in x. */ | ||
| 1491 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x); | ||
| 1492 | /*! @abstract Minimum of elements in x. */ | ||
| 1493 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x); | ||
| 1494 | /*! @abstract Minimum of elements in x. */ | ||
| 1495 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x); | ||
| 1496 | /*! @abstract Minimum of elements in x. */ | ||
| 1497 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x); | ||
| 1498 | /*! @abstract Minimum of elements in x. */ | ||
| 1499 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x); | ||
| 1500 | /*! @abstract Minimum of elements in x. */ | ||
| 1501 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x); | ||
| 1502 | /*! @abstract Minimum of elements in x. */ | ||
| 1503 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x); | ||
| 1504 | /*! @abstract Minimum of elements in x. */ | ||
| 1505 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x); | ||
| 1506 | /*! @abstract Minimum of elements in x. */ | ||
| 1507 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x); | ||
| 1508 | /*! @abstract Minimum of elements in x. */ | ||
| 1509 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x); | ||
| 1510 | /*! @abstract Minimum of elements in x. */ | ||
| 1511 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x); | ||
| 1512 | /*! @abstract Minimum of elements in x. */ | ||
| 1513 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x); | ||
| 1514 | /*! @abstract Minimum of elements in x. */ | ||
| 1515 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x); | ||
| 1516 | /*! @abstract Minimum of elements in x. | ||
| 1517 | * @discussion Deprecated. Use simd_min(x) instead. */ | ||
| 1518 | #define vector_reduce_min simd_reduce_min | ||
| 1519 | |||
| 1520 | /*! @abstract Maximum of elements in x. */ | ||
| 1521 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x); | ||
| 1522 | /*! @abstract Maximum of elements in x. */ | ||
| 1523 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x); | ||
| 1524 | /*! @abstract Maximum of elements in x. */ | ||
| 1525 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x); | ||
| 1526 | /*! @abstract Maximum of elements in x. */ | ||
| 1527 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x); | ||
| 1528 | /*! @abstract Maximum of elements in x. */ | ||
| 1529 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x); | ||
| 1530 | /*! @abstract Maximum of elements in x. */ | ||
| 1531 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x); | ||
| 1532 | /*! @abstract Maximum of elements in x. */ | ||
| 1533 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x); | ||
| 1534 | /*! @abstract Maximum of elements in x. */ | ||
| 1535 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x); | ||
| 1536 | /*! @abstract Maximum of elements in x. */ | ||
| 1537 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x); | ||
| 1538 | /*! @abstract Maximum of elements in x. */ | ||
| 1539 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x); | ||
| 1540 | /*! @abstract Maximum of elements in x. */ | ||
| 1541 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x); | ||
| 1542 | /*! @abstract Maximum of elements in x. */ | ||
| 1543 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x); | ||
| 1544 | /*! @abstract Maximum of elements in x. */ | ||
| 1545 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x); | ||
| 1546 | /*! @abstract Maximum of elements in x. */ | ||
| 1547 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x); | ||
| 1548 | /*! @abstract Maximum of elements in x. */ | ||
| 1549 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x); | ||
| 1550 | /*! @abstract Maximum of elements in x. */ | ||
| 1551 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x); | ||
| 1552 | /*! @abstract Maximum of elements in x. */ | ||
| 1553 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x); | ||
| 1554 | /*! @abstract Maximum of elements in x. */ | ||
| 1555 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x); | ||
| 1556 | /*! @abstract Maximum of elements in x. */ | ||
| 1557 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x); | ||
| 1558 | /*! @abstract Maximum of elements in x. */ | ||
| 1559 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x); | ||
| 1560 | /*! @abstract Maximum of elements in x. */ | ||
| 1561 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x); | ||
| 1562 | /*! @abstract Maximum of elements in x. */ | ||
| 1563 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x); | ||
| 1564 | /*! @abstract Maximum of elements in x. */ | ||
| 1565 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x); | ||
| 1566 | /*! @abstract Maximum of elements in x. */ | ||
| 1567 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x); | ||
| 1568 | /*! @abstract Maximum of elements in x. */ | ||
| 1569 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x); | ||
| 1570 | /*! @abstract Maximum of elements in x. */ | ||
| 1571 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x); | ||
| 1572 | /*! @abstract Maximum of elements in x. */ | ||
| 1573 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x); | ||
| 1574 | /*! @abstract Maximum of elements in x. */ | ||
| 1575 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x); | ||
| 1576 | /*! @abstract Maximum of elements in x. */ | ||
| 1577 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x); | ||
| 1578 | /*! @abstract Maximum of elements in x. */ | ||
| 1579 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x); | ||
| 1580 | /*! @abstract Maximum of elements in x. */ | ||
| 1581 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x); | ||
| 1582 | /*! @abstract Maximum of elements in x. */ | ||
| 1583 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x); | ||
| 1584 | /*! @abstract Maximum of elements in x. */ | ||
| 1585 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x); | ||
| 1586 | /*! @abstract Maximum of elements in x. */ | ||
| 1587 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x); | ||
| 1588 | /*! @abstract Maximum of elements in x. */ | ||
| 1589 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x); | ||
| 1590 | /*! @abstract Maximum of elements in x. */ | ||
| 1591 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x); | ||
| 1592 | /*! @abstract Maximum of elements in x. */ | ||
| 1593 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x); | ||
| 1594 | /*! @abstract Maximum of elements in x. */ | ||
| 1595 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x); | ||
| 1596 | /*! @abstract Maximum of elements in x. */ | ||
| 1597 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x); | ||
| 1598 | /*! @abstract Maximum of elements in x. */ | ||
| 1599 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x); | ||
| 1600 | /*! @abstract Maximum of elements in x. */ | ||
| 1601 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x); | ||
| 1602 | /*! @abstract Maximum of elements in x. */ | ||
| 1603 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x); | ||
| 1604 | /*! @abstract Maximum of elements in x. */ | ||
| 1605 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x); | ||
| 1606 | /*! @abstract Maximum of elements in x. */ | ||
| 1607 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x); | ||
| 1608 | /*! @abstract Maximum of elements in x. */ | ||
| 1609 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x); | ||
| 1610 | /*! @abstract Maximum of elements in x. */ | ||
| 1611 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x); | ||
| 1612 | /*! @abstract Maximum of elements in x. */ | ||
| 1613 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x); | ||
| 1614 | /*! @abstract Maximum of elements in x. */ | ||
| 1615 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x); | ||
| 1616 | /*! @abstract Maximum of elements in x. */ | ||
| 1617 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x); | ||
| 1618 | /*! @abstract Maximum of elements in x. */ | ||
| 1619 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x); | ||
| 1620 | /*! @abstract Maximum of elements in x. */ | ||
| 1621 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x); | ||
| 1622 | /*! @abstract Maximum of elements in x. */ | ||
| 1623 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x); | ||
| 1624 | /*! @abstract Maximum of elements in x. */ | ||
| 1625 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x); | ||
| 1626 | /*! @abstract Maximum of elements in x. | ||
| 1627 | * @discussion Deprecated. Use simd_max(x) instead. */ | ||
| 1628 | #define vector_reduce_max simd_reduce_max | ||
| 1629 | |||
| 1630 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1631 | * corresponding lane of y. */ | ||
| 1632 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char2 x, simd_char2 y) { | ||
| 1633 | return simd_all(x == y); | ||
| 1634 | } | ||
| 1635 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1636 | * corresponding lane of y. */ | ||
| 1637 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char3 x, simd_char3 y) { | ||
| 1638 | return simd_all(x == y); | ||
| 1639 | } | ||
| 1640 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1641 | * corresponding lane of y. */ | ||
| 1642 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char4 x, simd_char4 y) { | ||
| 1643 | return simd_all(x == y); | ||
| 1644 | } | ||
| 1645 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1646 | * corresponding lane of y. */ | ||
| 1647 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char8 x, simd_char8 y) { | ||
| 1648 | return simd_all(x == y); | ||
| 1649 | } | ||
| 1650 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1651 | * corresponding lane of y. */ | ||
| 1652 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char16 x, simd_char16 y) { | ||
| 1653 | return simd_all(x == y); | ||
| 1654 | } | ||
| 1655 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1656 | * corresponding lane of y. */ | ||
| 1657 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char32 x, simd_char32 y) { | ||
| 1658 | return simd_all(x == y); | ||
| 1659 | } | ||
| 1660 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1661 | * corresponding lane of y. */ | ||
| 1662 | static inline SIMD_CFUNC simd_bool simd_equal(simd_char64 x, simd_char64 y) { | ||
| 1663 | return simd_all(x == y); | ||
| 1664 | } | ||
| 1665 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1666 | * corresponding lane of y. */ | ||
| 1667 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar2 x, simd_uchar2 y) { | ||
| 1668 | return simd_all(x == y); | ||
| 1669 | } | ||
| 1670 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1671 | * corresponding lane of y. */ | ||
| 1672 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar3 x, simd_uchar3 y) { | ||
| 1673 | return simd_all(x == y); | ||
| 1674 | } | ||
| 1675 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1676 | * corresponding lane of y. */ | ||
| 1677 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar4 x, simd_uchar4 y) { | ||
| 1678 | return simd_all(x == y); | ||
| 1679 | } | ||
| 1680 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1681 | * corresponding lane of y. */ | ||
| 1682 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar8 x, simd_uchar8 y) { | ||
| 1683 | return simd_all(x == y); | ||
| 1684 | } | ||
| 1685 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1686 | * corresponding lane of y. */ | ||
| 1687 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar16 x, simd_uchar16 y) { | ||
| 1688 | return simd_all(x == y); | ||
| 1689 | } | ||
| 1690 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1691 | * corresponding lane of y. */ | ||
| 1692 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar32 x, simd_uchar32 y) { | ||
| 1693 | return simd_all(x == y); | ||
| 1694 | } | ||
| 1695 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1696 | * corresponding lane of y. */ | ||
| 1697 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uchar64 x, simd_uchar64 y) { | ||
| 1698 | return simd_all(x == y); | ||
| 1699 | } | ||
| 1700 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1701 | * corresponding lane of y. */ | ||
| 1702 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short2 x, simd_short2 y) { | ||
| 1703 | return simd_all(x == y); | ||
| 1704 | } | ||
| 1705 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1706 | * corresponding lane of y. */ | ||
| 1707 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short3 x, simd_short3 y) { | ||
| 1708 | return simd_all(x == y); | ||
| 1709 | } | ||
| 1710 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1711 | * corresponding lane of y. */ | ||
| 1712 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short4 x, simd_short4 y) { | ||
| 1713 | return simd_all(x == y); | ||
| 1714 | } | ||
| 1715 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1716 | * corresponding lane of y. */ | ||
| 1717 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short8 x, simd_short8 y) { | ||
| 1718 | return simd_all(x == y); | ||
| 1719 | } | ||
| 1720 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1721 | * corresponding lane of y. */ | ||
| 1722 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short16 x, simd_short16 y) { | ||
| 1723 | return simd_all(x == y); | ||
| 1724 | } | ||
| 1725 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1726 | * corresponding lane of y. */ | ||
| 1727 | static inline SIMD_CFUNC simd_bool simd_equal(simd_short32 x, simd_short32 y) { | ||
| 1728 | return simd_all(x == y); | ||
| 1729 | } | ||
| 1730 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1731 | * corresponding lane of y. */ | ||
| 1732 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort2 x, simd_ushort2 y) { | ||
| 1733 | return simd_all(x == y); | ||
| 1734 | } | ||
| 1735 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1736 | * corresponding lane of y. */ | ||
| 1737 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort3 x, simd_ushort3 y) { | ||
| 1738 | return simd_all(x == y); | ||
| 1739 | } | ||
| 1740 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1741 | * corresponding lane of y. */ | ||
| 1742 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort4 x, simd_ushort4 y) { | ||
| 1743 | return simd_all(x == y); | ||
| 1744 | } | ||
| 1745 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1746 | * corresponding lane of y. */ | ||
| 1747 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort8 x, simd_ushort8 y) { | ||
| 1748 | return simd_all(x == y); | ||
| 1749 | } | ||
| 1750 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1751 | * corresponding lane of y. */ | ||
| 1752 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort16 x, simd_ushort16 y) { | ||
| 1753 | return simd_all(x == y); | ||
| 1754 | } | ||
| 1755 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1756 | * corresponding lane of y. */ | ||
| 1757 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ushort32 x, simd_ushort32 y) { | ||
| 1758 | return simd_all(x == y); | ||
| 1759 | } | ||
| 1760 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1761 | * corresponding lane of y. */ | ||
| 1762 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int2 x, simd_int2 y) { | ||
| 1763 | return simd_all(x == y); | ||
| 1764 | } | ||
| 1765 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1766 | * corresponding lane of y. */ | ||
| 1767 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int3 x, simd_int3 y) { | ||
| 1768 | return simd_all(x == y); | ||
| 1769 | } | ||
| 1770 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1771 | * corresponding lane of y. */ | ||
| 1772 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int4 x, simd_int4 y) { | ||
| 1773 | return simd_all(x == y); | ||
| 1774 | } | ||
| 1775 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1776 | * corresponding lane of y. */ | ||
| 1777 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int8 x, simd_int8 y) { | ||
| 1778 | return simd_all(x == y); | ||
| 1779 | } | ||
| 1780 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1781 | * corresponding lane of y. */ | ||
| 1782 | static inline SIMD_CFUNC simd_bool simd_equal(simd_int16 x, simd_int16 y) { | ||
| 1783 | return simd_all(x == y); | ||
| 1784 | } | ||
| 1785 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1786 | * corresponding lane of y. */ | ||
| 1787 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint2 x, simd_uint2 y) { | ||
| 1788 | return simd_all(x == y); | ||
| 1789 | } | ||
| 1790 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1791 | * corresponding lane of y. */ | ||
| 1792 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint3 x, simd_uint3 y) { | ||
| 1793 | return simd_all(x == y); | ||
| 1794 | } | ||
| 1795 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1796 | * corresponding lane of y. */ | ||
| 1797 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint4 x, simd_uint4 y) { | ||
| 1798 | return simd_all(x == y); | ||
| 1799 | } | ||
| 1800 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1801 | * corresponding lane of y. */ | ||
| 1802 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint8 x, simd_uint8 y) { | ||
| 1803 | return simd_all(x == y); | ||
| 1804 | } | ||
| 1805 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1806 | * corresponding lane of y. */ | ||
| 1807 | static inline SIMD_CFUNC simd_bool simd_equal(simd_uint16 x, simd_uint16 y) { | ||
| 1808 | return simd_all(x == y); | ||
| 1809 | } | ||
| 1810 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1811 | * corresponding lane of y. */ | ||
| 1812 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float2 x, simd_float2 y) { | ||
| 1813 | return simd_all(x == y); | ||
| 1814 | } | ||
| 1815 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1816 | * corresponding lane of y. */ | ||
| 1817 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float3 x, simd_float3 y) { | ||
| 1818 | return simd_all(x == y); | ||
| 1819 | } | ||
| 1820 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1821 | * corresponding lane of y. */ | ||
| 1822 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float4 x, simd_float4 y) { | ||
| 1823 | return simd_all(x == y); | ||
| 1824 | } | ||
| 1825 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1826 | * corresponding lane of y. */ | ||
| 1827 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float8 x, simd_float8 y) { | ||
| 1828 | return simd_all(x == y); | ||
| 1829 | } | ||
| 1830 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1831 | * corresponding lane of y. */ | ||
| 1832 | static inline SIMD_CFUNC simd_bool simd_equal(simd_float16 x, simd_float16 y) { | ||
| 1833 | return simd_all(x == y); | ||
| 1834 | } | ||
| 1835 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1836 | * corresponding lane of y. */ | ||
| 1837 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long2 x, simd_long2 y) { | ||
| 1838 | return simd_all(x == y); | ||
| 1839 | } | ||
| 1840 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1841 | * corresponding lane of y. */ | ||
| 1842 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long3 x, simd_long3 y) { | ||
| 1843 | return simd_all(x == y); | ||
| 1844 | } | ||
| 1845 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1846 | * corresponding lane of y. */ | ||
| 1847 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long4 x, simd_long4 y) { | ||
| 1848 | return simd_all(x == y); | ||
| 1849 | } | ||
| 1850 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1851 | * corresponding lane of y. */ | ||
| 1852 | static inline SIMD_CFUNC simd_bool simd_equal(simd_long8 x, simd_long8 y) { | ||
| 1853 | return simd_all(x == y); | ||
| 1854 | } | ||
| 1855 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1856 | * corresponding lane of y. */ | ||
| 1857 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong2 x, simd_ulong2 y) { | ||
| 1858 | return simd_all(x == y); | ||
| 1859 | } | ||
| 1860 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1861 | * corresponding lane of y. */ | ||
| 1862 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong3 x, simd_ulong3 y) { | ||
| 1863 | return simd_all(x == y); | ||
| 1864 | } | ||
| 1865 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1866 | * corresponding lane of y. */ | ||
| 1867 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong4 x, simd_ulong4 y) { | ||
| 1868 | return simd_all(x == y); | ||
| 1869 | } | ||
| 1870 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1871 | * corresponding lane of y. */ | ||
| 1872 | static inline SIMD_CFUNC simd_bool simd_equal(simd_ulong8 x, simd_ulong8 y) { | ||
| 1873 | return simd_all(x == y); | ||
| 1874 | } | ||
| 1875 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1876 | * corresponding lane of y. */ | ||
| 1877 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double2 x, simd_double2 y) { | ||
| 1878 | return simd_all(x == y); | ||
| 1879 | } | ||
| 1880 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1881 | * corresponding lane of y. */ | ||
| 1882 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double3 x, simd_double3 y) { | ||
| 1883 | return simd_all(x == y); | ||
| 1884 | } | ||
| 1885 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1886 | * corresponding lane of y. */ | ||
| 1887 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double4 x, simd_double4 y) { | ||
| 1888 | return simd_all(x == y); | ||
| 1889 | } | ||
| 1890 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1891 | * corresponding lane of y. */ | ||
| 1892 | static inline SIMD_CFUNC simd_bool simd_equal(simd_double8 x, simd_double8 y) { | ||
| 1893 | return simd_all(x == y); | ||
| 1894 | } | ||
| 1895 | |||
| 1896 | #ifdef __cplusplus | ||
| 1897 | } /* extern "C" */ | ||
| 1898 | |||
| 1899 | namespace simd { | ||
| 1900 | /*! @abstract The lanewise absolute value of x. */ | ||
| 1901 | template <typename typeN> static SIMD_CPPFUNC typeN abs(const typeN x) { return ::simd_abs(x); } | ||
| 1902 | /*! @abstract The lanewise maximum of x and y. */ | ||
| 1903 | template <typename typeN> static SIMD_CPPFUNC typeN max(const typeN x, const typeN y) { return ::simd_max(x,y); } | ||
| 1904 | /*! @abstract The lanewise minimum of x and y. */ | ||
| 1905 | template <typename typeN> static SIMD_CPPFUNC typeN min(const typeN x, const typeN y) { return ::simd_min(x,y); } | ||
| 1906 | /*! @abstract x clamped to the interval [min, max]. */ | ||
| 1907 | template <typename typeN> static SIMD_CPPFUNC typeN clamp(const typeN x, const typeN min, const typeN max) { return ::simd_clamp(x,min,max); } | ||
| 1908 | /*! @abstract -1 if x < 0, +1 if x > 0, and 0 otherwise. */ | ||
| 1909 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN sign(const fptypeN x) { return ::simd_sign(x); } | ||
| 1910 | /*! @abstract Linearly interpolates between x and y, taking the value x when t=0 and y when t=1 */ | ||
| 1911 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN mix(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); } | ||
| 1912 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN lerp(const fptypeN x, const fptypeN y, const fptypeN t) { return ::simd_mix(x,y,t); } | ||
| 1913 | /*! @abstract An approximation to 1/x. */ | ||
| 1914 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return simd_recip(x); } | ||
| 1915 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1916 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return simd_rsqrt(x); } | ||
| 1917 | /*! @abstract The "fracional part" of x, in the range [0,1). */ | ||
| 1918 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN fract(const fptypeN x) { return ::simd_fract(x); } | ||
| 1919 | /*! @abstract 0 if x < edge, 1 otherwise. */ | ||
| 1920 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN step(const fptypeN edge, const fptypeN x) { return ::simd_step(edge,x); } | ||
| 1921 | /*! @abstract smoothly interpolates from 0 at edge0 to 1 at edge1. */ | ||
| 1922 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN smoothstep(const fptypeN edge0, const fptypeN edge1, const fptypeN x) { return ::simd_smoothstep(edge0,edge1,x); } | ||
| 1923 | /*! @abstract True if and only if each lane of x is equal to the | ||
| 1924 | * corresponding lane of y. | ||
| 1925 | * | ||
| 1926 | * @discussion This isn't operator== because that's already defined by | ||
| 1927 | * the compiler to return a lane mask. */ | ||
| 1928 | template <typename fptypeN> static SIMD_CPPFUNC simd_bool equal(const fptypeN x, const fptypeN y) { return ::simd_equal(x, y); } | ||
| 1929 | #if __cpp_decltype_auto | ||
| 1930 | /* If you are targeting an earlier version of the C++ standard that lacks | ||
| 1931 | decltype_auto support, you may use the C-style simd_reduce_* functions | ||
| 1932 | instead. */ | ||
| 1933 | /*! @abstract The sum of the elements in x. May overflow. */ | ||
| 1934 | template <typename typeN> static SIMD_CPPFUNC auto reduce_add(typeN x) { return ::simd_reduce_add(x); } | ||
| 1935 | /*! @abstract The least element in x. */ | ||
| 1936 | template <typename typeN> static SIMD_CPPFUNC auto reduce_min(typeN x) { return ::simd_reduce_min(x); } | ||
| 1937 | /*! @abstract The greatest element in x. */ | ||
| 1938 | template <typename typeN> static SIMD_CPPFUNC auto reduce_max(typeN x) { return ::simd_reduce_max(x); } | ||
| 1939 | #endif | ||
| 1940 | namespace precise { | ||
| 1941 | /*! @abstract An approximation to 1/x. */ | ||
| 1942 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_precise_recip(x); } | ||
| 1943 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1944 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_precise_rsqrt(x); } | ||
| 1945 | } | ||
| 1946 | namespace fast { | ||
| 1947 | /*! @abstract An approximation to 1/x. */ | ||
| 1948 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN recip(const fptypeN x) { return ::simd_fast_recip(x); } | ||
| 1949 | /*! @abstract An approximation to 1/sqrt(x). */ | ||
| 1950 | template <typename fptypeN> static SIMD_CPPFUNC fptypeN rsqrt(const fptypeN x) { return ::simd_fast_rsqrt(x); } | ||
| 1951 | } | ||
| 1952 | } | ||
| 1953 | |||
| 1954 | extern "C" { | ||
| 1955 | #endif /* __cplusplus */ | ||
| 1956 | |||
| 1957 | #pragma mark - Implementation | ||
| 1958 | |||
| 1959 | static inline SIMD_CFUNC simd_char2 simd_abs(simd_char2 x) { | ||
| 1960 | return simd_make_char2(simd_abs(simd_make_char8_undef(x))); | ||
| 1961 | } | ||
| 1962 | |||
| 1963 | static inline SIMD_CFUNC simd_char3 simd_abs(simd_char3 x) { | ||
| 1964 | return simd_make_char3(simd_abs(simd_make_char8_undef(x))); | ||
| 1965 | } | ||
| 1966 | |||
| 1967 | static inline SIMD_CFUNC simd_char4 simd_abs(simd_char4 x) { | ||
| 1968 | return simd_make_char4(simd_abs(simd_make_char8_undef(x))); | ||
| 1969 | } | ||
| 1970 | |||
| 1971 | static inline SIMD_CFUNC simd_char8 simd_abs(simd_char8 x) { | ||
| 1972 | #if defined __arm__ || defined __arm64__ | ||
| 1973 | return vabs_s8(x); | ||
| 1974 | #else | ||
| 1975 | return simd_make_char8(simd_abs(simd_make_char16_undef(x))); | ||
| 1976 | #endif | ||
| 1977 | } | ||
| 1978 | |||
| 1979 | static inline SIMD_CFUNC simd_char16 simd_abs(simd_char16 x) { | ||
| 1980 | #if defined __arm__ || defined __arm64__ | ||
| 1981 | return vabsq_s8(x); | ||
| 1982 | #elif defined __SSE4_1__ | ||
| 1983 | return (simd_char16) _mm_abs_epi8((__m128i)x); | ||
| 1984 | #else | ||
| 1985 | simd_char16 mask = x >> 7; return (x ^ mask) - mask; | ||
| 1986 | #endif | ||
| 1987 | } | ||
| 1988 | |||
| 1989 | static inline SIMD_CFUNC simd_char32 simd_abs(simd_char32 x) { | ||
| 1990 | #if defined __AVX2__ | ||
| 1991 | return _mm256_abs_epi8(x); | ||
| 1992 | #else | ||
| 1993 | return simd_make_char32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 1994 | #endif | ||
| 1995 | } | ||
| 1996 | |||
| 1997 | static inline SIMD_CFUNC simd_char64 simd_abs(simd_char64 x) { | ||
| 1998 | #if defined __AVX512BW__ | ||
| 1999 | return _mm512_abs_epi8(x); | ||
| 2000 | #else | ||
| 2001 | return simd_make_char64(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2002 | #endif | ||
| 2003 | } | ||
| 2004 | |||
| 2005 | static inline SIMD_CFUNC simd_short2 simd_abs(simd_short2 x) { | ||
| 2006 | return simd_make_short2(simd_abs(simd_make_short4_undef(x))); | ||
| 2007 | } | ||
| 2008 | |||
| 2009 | static inline SIMD_CFUNC simd_short3 simd_abs(simd_short3 x) { | ||
| 2010 | return simd_make_short3(simd_abs(simd_make_short4_undef(x))); | ||
| 2011 | } | ||
| 2012 | |||
| 2013 | static inline SIMD_CFUNC simd_short4 simd_abs(simd_short4 x) { | ||
| 2014 | #if defined __arm__ || defined __arm64__ | ||
| 2015 | return vabs_s16(x); | ||
| 2016 | #else | ||
| 2017 | return simd_make_short4(simd_abs(simd_make_short8_undef(x))); | ||
| 2018 | #endif | ||
| 2019 | } | ||
| 2020 | |||
| 2021 | static inline SIMD_CFUNC simd_short8 simd_abs(simd_short8 x) { | ||
| 2022 | #if defined __arm__ || defined __arm64__ | ||
| 2023 | return vabsq_s16(x); | ||
| 2024 | #elif defined __SSE4_1__ | ||
| 2025 | return (simd_short8) _mm_abs_epi16((__m128i)x); | ||
| 2026 | #else | ||
| 2027 | simd_short8 mask = x >> 15; return (x ^ mask) - mask; | ||
| 2028 | #endif | ||
| 2029 | } | ||
| 2030 | |||
| 2031 | static inline SIMD_CFUNC simd_short16 simd_abs(simd_short16 x) { | ||
| 2032 | #if defined __AVX2__ | ||
| 2033 | return _mm256_abs_epi16(x); | ||
| 2034 | #else | ||
| 2035 | return simd_make_short16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2036 | #endif | ||
| 2037 | } | ||
| 2038 | |||
| 2039 | static inline SIMD_CFUNC simd_short32 simd_abs(simd_short32 x) { | ||
| 2040 | #if defined __AVX512BW__ | ||
| 2041 | return _mm512_abs_epi16(x); | ||
| 2042 | #else | ||
| 2043 | return simd_make_short32(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2044 | #endif | ||
| 2045 | } | ||
| 2046 | |||
| 2047 | static inline SIMD_CFUNC simd_int2 simd_abs(simd_int2 x) { | ||
| 2048 | #if defined __arm__ || defined __arm64__ | ||
| 2049 | return vabs_s32(x); | ||
| 2050 | #else | ||
| 2051 | return simd_make_int2(simd_abs(simd_make_int4_undef(x))); | ||
| 2052 | #endif | ||
| 2053 | } | ||
| 2054 | |||
| 2055 | static inline SIMD_CFUNC simd_int3 simd_abs(simd_int3 x) { | ||
| 2056 | return simd_make_int3(simd_abs(simd_make_int4_undef(x))); | ||
| 2057 | } | ||
| 2058 | |||
| 2059 | static inline SIMD_CFUNC simd_int4 simd_abs(simd_int4 x) { | ||
| 2060 | #if defined __arm__ || defined __arm64__ | ||
| 2061 | return vabsq_s32(x); | ||
| 2062 | #elif defined __SSE4_1__ | ||
| 2063 | return (simd_int4) _mm_abs_epi32((__m128i)x); | ||
| 2064 | #else | ||
| 2065 | simd_int4 mask = x >> 31; return (x ^ mask) - mask; | ||
| 2066 | #endif | ||
| 2067 | } | ||
| 2068 | |||
| 2069 | static inline SIMD_CFUNC simd_int8 simd_abs(simd_int8 x) { | ||
| 2070 | #if defined __AVX2__ | ||
| 2071 | return _mm256_abs_epi32(x); | ||
| 2072 | #else | ||
| 2073 | return simd_make_int8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2074 | #endif | ||
| 2075 | } | ||
| 2076 | |||
| 2077 | static inline SIMD_CFUNC simd_int16 simd_abs(simd_int16 x) { | ||
| 2078 | #if defined __AVX512F__ | ||
| 2079 | return _mm512_abs_epi32(x); | ||
| 2080 | #else | ||
| 2081 | return simd_make_int16(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2082 | #endif | ||
| 2083 | } | ||
| 2084 | |||
| 2085 | static inline SIMD_CFUNC simd_float2 simd_abs(simd_float2 x) { | ||
| 2086 | return __tg_fabs(x); | ||
| 2087 | } | ||
| 2088 | |||
| 2089 | static inline SIMD_CFUNC simd_float3 simd_abs(simd_float3 x) { | ||
| 2090 | return __tg_fabs(x); | ||
| 2091 | } | ||
| 2092 | |||
| 2093 | static inline SIMD_CFUNC simd_float4 simd_abs(simd_float4 x) { | ||
| 2094 | return __tg_fabs(x); | ||
| 2095 | } | ||
| 2096 | |||
| 2097 | static inline SIMD_CFUNC simd_float8 simd_abs(simd_float8 x) { | ||
| 2098 | return __tg_fabs(x); | ||
| 2099 | } | ||
| 2100 | |||
| 2101 | static inline SIMD_CFUNC simd_float16 simd_abs(simd_float16 x) { | ||
| 2102 | return __tg_fabs(x); | ||
| 2103 | } | ||
| 2104 | |||
| 2105 | static inline SIMD_CFUNC simd_long2 simd_abs(simd_long2 x) { | ||
| 2106 | #if defined __arm64__ | ||
| 2107 | return vabsq_s64(x); | ||
| 2108 | #elif defined __AVX512VL__ | ||
| 2109 | return (simd_long2) _mm_abs_epi64((__m128i)x); | ||
| 2110 | #else | ||
| 2111 | simd_long2 mask = x >> 63; return (x ^ mask) - mask; | ||
| 2112 | #endif | ||
| 2113 | } | ||
| 2114 | |||
| 2115 | static inline SIMD_CFUNC simd_long3 simd_abs(simd_long3 x) { | ||
| 2116 | return simd_make_long3(simd_abs(simd_make_long4_undef(x))); | ||
| 2117 | } | ||
| 2118 | |||
| 2119 | static inline SIMD_CFUNC simd_long4 simd_abs(simd_long4 x) { | ||
| 2120 | #if defined __AVX512VL__ | ||
| 2121 | return _mm256_abs_epi64(x); | ||
| 2122 | #else | ||
| 2123 | return simd_make_long4(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2124 | #endif | ||
| 2125 | } | ||
| 2126 | |||
| 2127 | static inline SIMD_CFUNC simd_long8 simd_abs(simd_long8 x) { | ||
| 2128 | #if defined __AVX512F__ | ||
| 2129 | return _mm512_abs_epi64(x); | ||
| 2130 | #else | ||
| 2131 | return simd_make_long8(simd_abs(x.lo), simd_abs(x.hi)); | ||
| 2132 | #endif | ||
| 2133 | } | ||
| 2134 | |||
| 2135 | static inline SIMD_CFUNC simd_double2 simd_abs(simd_double2 x) { | ||
| 2136 | return __tg_fabs(x); | ||
| 2137 | } | ||
| 2138 | |||
| 2139 | static inline SIMD_CFUNC simd_double3 simd_abs(simd_double3 x) { | ||
| 2140 | return __tg_fabs(x); | ||
| 2141 | } | ||
| 2142 | |||
| 2143 | static inline SIMD_CFUNC simd_double4 simd_abs(simd_double4 x) { | ||
| 2144 | return __tg_fabs(x); | ||
| 2145 | } | ||
| 2146 | |||
| 2147 | static inline SIMD_CFUNC simd_double8 simd_abs(simd_double8 x) { | ||
| 2148 | return __tg_fabs(x); | ||
| 2149 | } | ||
| 2150 | |||
| 2151 | static inline SIMD_CFUNC simd_char2 simd_min(simd_char2 x, simd_char2 y) { | ||
| 2152 | return simd_make_char2(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2153 | } | ||
| 2154 | |||
| 2155 | static inline SIMD_CFUNC simd_char3 simd_min(simd_char3 x, simd_char3 y) { | ||
| 2156 | return simd_make_char3(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2157 | } | ||
| 2158 | |||
| 2159 | static inline SIMD_CFUNC simd_char4 simd_min(simd_char4 x, simd_char4 y) { | ||
| 2160 | return simd_make_char4(simd_min(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2161 | } | ||
| 2162 | |||
| 2163 | static inline SIMD_CFUNC simd_char8 simd_min(simd_char8 x, simd_char8 y) { | ||
| 2164 | #if defined __arm__ || defined __arm64__ | ||
| 2165 | return vmin_s8(x, y); | ||
| 2166 | #else | ||
| 2167 | return simd_make_char8(simd_min(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2168 | #endif | ||
| 2169 | |||
| 2170 | } | ||
| 2171 | |||
| 2172 | static inline SIMD_CFUNC simd_char16 simd_min(simd_char16 x, simd_char16 y) { | ||
| 2173 | #if defined __arm__ || defined __arm64__ | ||
| 2174 | return vminq_s8(x, y); | ||
| 2175 | #elif defined __SSE4_1__ | ||
| 2176 | return (simd_char16) _mm_min_epi8((__m128i)x, (__m128i)y); | ||
| 2177 | #else | ||
| 2178 | return simd_bitselect(x, y, y < x); | ||
| 2179 | #endif | ||
| 2180 | } | ||
| 2181 | |||
| 2182 | static inline SIMD_CFUNC simd_char32 simd_min(simd_char32 x, simd_char32 y) { | ||
| 2183 | #if defined __AVX2__ | ||
| 2184 | return _mm256_min_epi8(x, y); | ||
| 2185 | #else | ||
| 2186 | return simd_bitselect(x, y, y < x); | ||
| 2187 | #endif | ||
| 2188 | } | ||
| 2189 | |||
| 2190 | static inline SIMD_CFUNC simd_char64 simd_min(simd_char64 x, simd_char64 y) { | ||
| 2191 | #if defined __AVX512BW__ | ||
| 2192 | return _mm512_min_epi8(x, y); | ||
| 2193 | #else | ||
| 2194 | return simd_bitselect(x, y, y < x); | ||
| 2195 | #endif | ||
| 2196 | } | ||
| 2197 | |||
| 2198 | static inline SIMD_CFUNC simd_uchar2 simd_min(simd_uchar2 x, simd_uchar2 y) { | ||
| 2199 | return simd_make_uchar2(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2200 | } | ||
| 2201 | |||
| 2202 | static inline SIMD_CFUNC simd_uchar3 simd_min(simd_uchar3 x, simd_uchar3 y) { | ||
| 2203 | return simd_make_uchar3(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2204 | } | ||
| 2205 | |||
| 2206 | static inline SIMD_CFUNC simd_uchar4 simd_min(simd_uchar4 x, simd_uchar4 y) { | ||
| 2207 | return simd_make_uchar4(simd_min(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2208 | } | ||
| 2209 | |||
| 2210 | static inline SIMD_CFUNC simd_uchar8 simd_min(simd_uchar8 x, simd_uchar8 y) { | ||
| 2211 | #if defined __arm__ || defined __arm64__ | ||
| 2212 | return vmin_u8(x, y); | ||
| 2213 | #else | ||
| 2214 | return simd_make_uchar8(simd_min(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2215 | #endif | ||
| 2216 | |||
| 2217 | } | ||
| 2218 | |||
| 2219 | static inline SIMD_CFUNC simd_uchar16 simd_min(simd_uchar16 x, simd_uchar16 y) { | ||
| 2220 | #if defined __arm__ || defined __arm64__ | ||
| 2221 | return vminq_u8(x, y); | ||
| 2222 | #elif defined __SSE4_1__ | ||
| 2223 | return (simd_uchar16) _mm_min_epu8((__m128i)x, (__m128i)y); | ||
| 2224 | #else | ||
| 2225 | return simd_bitselect(x, y, y < x); | ||
| 2226 | #endif | ||
| 2227 | } | ||
| 2228 | |||
| 2229 | static inline SIMD_CFUNC simd_uchar32 simd_min(simd_uchar32 x, simd_uchar32 y) { | ||
| 2230 | #if defined __AVX2__ | ||
| 2231 | return _mm256_min_epu8(x, y); | ||
| 2232 | #else | ||
| 2233 | return simd_bitselect(x, y, y < x); | ||
| 2234 | #endif | ||
| 2235 | } | ||
| 2236 | |||
| 2237 | static inline SIMD_CFUNC simd_uchar64 simd_min(simd_uchar64 x, simd_uchar64 y) { | ||
| 2238 | #if defined __AVX512BW__ | ||
| 2239 | return _mm512_min_epu8(x, y); | ||
| 2240 | #else | ||
| 2241 | return simd_bitselect(x, y, y < x); | ||
| 2242 | #endif | ||
| 2243 | } | ||
| 2244 | |||
| 2245 | static inline SIMD_CFUNC simd_short2 simd_min(simd_short2 x, simd_short2 y) { | ||
| 2246 | return simd_make_short2(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2247 | } | ||
| 2248 | |||
| 2249 | static inline SIMD_CFUNC simd_short3 simd_min(simd_short3 x, simd_short3 y) { | ||
| 2250 | return simd_make_short3(simd_min(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2251 | } | ||
| 2252 | |||
| 2253 | static inline SIMD_CFUNC simd_short4 simd_min(simd_short4 x, simd_short4 y) { | ||
| 2254 | #if defined __arm__ || defined __arm64__ | ||
| 2255 | return vmin_s16(x, y); | ||
| 2256 | #else | ||
| 2257 | return simd_make_short4(simd_min(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2258 | #endif | ||
| 2259 | |||
| 2260 | } | ||
| 2261 | |||
| 2262 | static inline SIMD_CFUNC simd_short8 simd_min(simd_short8 x, simd_short8 y) { | ||
| 2263 | #if defined __arm__ || defined __arm64__ | ||
| 2264 | return vminq_s16(x, y); | ||
| 2265 | #elif defined __SSE4_1__ | ||
| 2266 | return (simd_short8) _mm_min_epi16((__m128i)x, (__m128i)y); | ||
| 2267 | #else | ||
| 2268 | return simd_bitselect(x, y, y < x); | ||
| 2269 | #endif | ||
| 2270 | } | ||
| 2271 | |||
| 2272 | static inline SIMD_CFUNC simd_short16 simd_min(simd_short16 x, simd_short16 y) { | ||
| 2273 | #if defined __AVX2__ | ||
| 2274 | return _mm256_min_epi16(x, y); | ||
| 2275 | #else | ||
| 2276 | return simd_bitselect(x, y, y < x); | ||
| 2277 | #endif | ||
| 2278 | } | ||
| 2279 | |||
| 2280 | static inline SIMD_CFUNC simd_short32 simd_min(simd_short32 x, simd_short32 y) { | ||
| 2281 | #if defined __AVX512BW__ | ||
| 2282 | return _mm512_min_epi16(x, y); | ||
| 2283 | #else | ||
| 2284 | return simd_bitselect(x, y, y < x); | ||
| 2285 | #endif | ||
| 2286 | } | ||
| 2287 | |||
| 2288 | static inline SIMD_CFUNC simd_ushort2 simd_min(simd_ushort2 x, simd_ushort2 y) { | ||
| 2289 | return simd_make_ushort2(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2290 | } | ||
| 2291 | |||
| 2292 | static inline SIMD_CFUNC simd_ushort3 simd_min(simd_ushort3 x, simd_ushort3 y) { | ||
| 2293 | return simd_make_ushort3(simd_min(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2294 | } | ||
| 2295 | |||
| 2296 | static inline SIMD_CFUNC simd_ushort4 simd_min(simd_ushort4 x, simd_ushort4 y) { | ||
| 2297 | #if defined __arm__ || defined __arm64__ | ||
| 2298 | return vmin_u16(x, y); | ||
| 2299 | #else | ||
| 2300 | return simd_make_ushort4(simd_min(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2301 | #endif | ||
| 2302 | |||
| 2303 | } | ||
| 2304 | |||
| 2305 | static inline SIMD_CFUNC simd_ushort8 simd_min(simd_ushort8 x, simd_ushort8 y) { | ||
| 2306 | #if defined __arm__ || defined __arm64__ | ||
| 2307 | return vminq_u16(x, y); | ||
| 2308 | #elif defined __SSE4_1__ | ||
| 2309 | return (simd_ushort8) _mm_min_epu16((__m128i)x, (__m128i)y); | ||
| 2310 | #else | ||
| 2311 | return simd_bitselect(x, y, y < x); | ||
| 2312 | #endif | ||
| 2313 | } | ||
| 2314 | |||
| 2315 | static inline SIMD_CFUNC simd_ushort16 simd_min(simd_ushort16 x, simd_ushort16 y) { | ||
| 2316 | #if defined __AVX2__ | ||
| 2317 | return _mm256_min_epu16(x, y); | ||
| 2318 | #else | ||
| 2319 | return simd_bitselect(x, y, y < x); | ||
| 2320 | #endif | ||
| 2321 | } | ||
| 2322 | |||
| 2323 | static inline SIMD_CFUNC simd_ushort32 simd_min(simd_ushort32 x, simd_ushort32 y) { | ||
| 2324 | #if defined __AVX512BW__ | ||
| 2325 | return _mm512_min_epu16(x, y); | ||
| 2326 | #else | ||
| 2327 | return simd_bitselect(x, y, y < x); | ||
| 2328 | #endif | ||
| 2329 | } | ||
| 2330 | |||
| 2331 | static inline SIMD_CFUNC simd_int2 simd_min(simd_int2 x, simd_int2 y) { | ||
| 2332 | #if defined __arm__ || defined __arm64__ | ||
| 2333 | return vmin_s32(x, y); | ||
| 2334 | #else | ||
| 2335 | return simd_make_int2(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2336 | #endif | ||
| 2337 | |||
| 2338 | } | ||
| 2339 | |||
| 2340 | static inline SIMD_CFUNC simd_int3 simd_min(simd_int3 x, simd_int3 y) { | ||
| 2341 | return simd_make_int3(simd_min(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2342 | } | ||
| 2343 | |||
| 2344 | static inline SIMD_CFUNC simd_int4 simd_min(simd_int4 x, simd_int4 y) { | ||
| 2345 | #if defined __arm__ || defined __arm64__ | ||
| 2346 | return vminq_s32(x, y); | ||
| 2347 | #elif defined __SSE4_1__ | ||
| 2348 | return (simd_int4) _mm_min_epi32((__m128i)x, (__m128i)y); | ||
| 2349 | #else | ||
| 2350 | return simd_bitselect(x, y, y < x); | ||
| 2351 | #endif | ||
| 2352 | } | ||
| 2353 | |||
| 2354 | static inline SIMD_CFUNC simd_int8 simd_min(simd_int8 x, simd_int8 y) { | ||
| 2355 | #if defined __AVX2__ | ||
| 2356 | return _mm256_min_epi32(x, y); | ||
| 2357 | #else | ||
| 2358 | return simd_bitselect(x, y, y < x); | ||
| 2359 | #endif | ||
| 2360 | } | ||
| 2361 | |||
| 2362 | static inline SIMD_CFUNC simd_int16 simd_min(simd_int16 x, simd_int16 y) { | ||
| 2363 | #if defined __AVX512F__ | ||
| 2364 | return _mm512_min_epi32(x, y); | ||
| 2365 | #else | ||
| 2366 | return simd_bitselect(x, y, y < x); | ||
| 2367 | #endif | ||
| 2368 | } | ||
| 2369 | |||
| 2370 | static inline SIMD_CFUNC simd_uint2 simd_min(simd_uint2 x, simd_uint2 y) { | ||
| 2371 | #if defined __arm__ || defined __arm64__ | ||
| 2372 | return vmin_u32(x, y); | ||
| 2373 | #else | ||
| 2374 | return simd_make_uint2(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2375 | #endif | ||
| 2376 | |||
| 2377 | } | ||
| 2378 | |||
| 2379 | static inline SIMD_CFUNC simd_uint3 simd_min(simd_uint3 x, simd_uint3 y) { | ||
| 2380 | return simd_make_uint3(simd_min(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2381 | } | ||
| 2382 | |||
| 2383 | static inline SIMD_CFUNC simd_uint4 simd_min(simd_uint4 x, simd_uint4 y) { | ||
| 2384 | #if defined __arm__ || defined __arm64__ | ||
| 2385 | return vminq_u32(x, y); | ||
| 2386 | #elif defined __SSE4_1__ | ||
| 2387 | return (simd_uint4) _mm_min_epu32((__m128i)x, (__m128i)y); | ||
| 2388 | #else | ||
| 2389 | return simd_bitselect(x, y, y < x); | ||
| 2390 | #endif | ||
| 2391 | } | ||
| 2392 | |||
| 2393 | static inline SIMD_CFUNC simd_uint8 simd_min(simd_uint8 x, simd_uint8 y) { | ||
| 2394 | #if defined __AVX2__ | ||
| 2395 | return _mm256_min_epu32(x, y); | ||
| 2396 | #else | ||
| 2397 | return simd_bitselect(x, y, y < x); | ||
| 2398 | #endif | ||
| 2399 | } | ||
| 2400 | |||
| 2401 | static inline SIMD_CFUNC simd_uint16 simd_min(simd_uint16 x, simd_uint16 y) { | ||
| 2402 | #if defined __AVX512F__ | ||
| 2403 | return _mm512_min_epu32(x, y); | ||
| 2404 | #else | ||
| 2405 | return simd_bitselect(x, y, y < x); | ||
| 2406 | #endif | ||
| 2407 | } | ||
| 2408 | |||
| 2409 | static inline SIMD_CFUNC float simd_min(float x, float y) { | ||
| 2410 | return __tg_fmin(x,y); | ||
| 2411 | } | ||
| 2412 | |||
| 2413 | static inline SIMD_CFUNC simd_float2 simd_min(simd_float2 x, simd_float2 y) { | ||
| 2414 | return __tg_fmin(x,y); | ||
| 2415 | } | ||
| 2416 | |||
| 2417 | static inline SIMD_CFUNC simd_float3 simd_min(simd_float3 x, simd_float3 y) { | ||
| 2418 | return __tg_fmin(x,y); | ||
| 2419 | } | ||
| 2420 | |||
| 2421 | static inline SIMD_CFUNC simd_float4 simd_min(simd_float4 x, simd_float4 y) { | ||
| 2422 | return __tg_fmin(x,y); | ||
| 2423 | } | ||
| 2424 | |||
| 2425 | static inline SIMD_CFUNC simd_float8 simd_min(simd_float8 x, simd_float8 y) { | ||
| 2426 | return __tg_fmin(x,y); | ||
| 2427 | } | ||
| 2428 | |||
| 2429 | static inline SIMD_CFUNC simd_float16 simd_min(simd_float16 x, simd_float16 y) { | ||
| 2430 | return __tg_fmin(x,y); | ||
| 2431 | } | ||
| 2432 | |||
| 2433 | static inline SIMD_CFUNC simd_long2 simd_min(simd_long2 x, simd_long2 y) { | ||
| 2434 | #if defined __AVX512VL__ | ||
| 2435 | return _mm_min_epi64(x, y); | ||
| 2436 | #else | ||
| 2437 | return simd_bitselect(x, y, y < x); | ||
| 2438 | #endif | ||
| 2439 | } | ||
| 2440 | |||
| 2441 | static inline SIMD_CFUNC simd_long3 simd_min(simd_long3 x, simd_long3 y) { | ||
| 2442 | return simd_make_long3(simd_min(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2443 | } | ||
| 2444 | |||
| 2445 | static inline SIMD_CFUNC simd_long4 simd_min(simd_long4 x, simd_long4 y) { | ||
| 2446 | #if defined __AVX512VL__ | ||
| 2447 | return _mm256_min_epi64(x, y); | ||
| 2448 | #else | ||
| 2449 | return simd_bitselect(x, y, y < x); | ||
| 2450 | #endif | ||
| 2451 | } | ||
| 2452 | |||
| 2453 | static inline SIMD_CFUNC simd_long8 simd_min(simd_long8 x, simd_long8 y) { | ||
| 2454 | #if defined __AVX512F__ | ||
| 2455 | return _mm512_min_epi64(x, y); | ||
| 2456 | #else | ||
| 2457 | return simd_bitselect(x, y, y < x); | ||
| 2458 | #endif | ||
| 2459 | } | ||
| 2460 | |||
| 2461 | static inline SIMD_CFUNC simd_ulong2 simd_min(simd_ulong2 x, simd_ulong2 y) { | ||
| 2462 | #if defined __AVX512VL__ | ||
| 2463 | return _mm_min_epu64(x, y); | ||
| 2464 | #else | ||
| 2465 | return simd_bitselect(x, y, y < x); | ||
| 2466 | #endif | ||
| 2467 | } | ||
| 2468 | |||
| 2469 | static inline SIMD_CFUNC simd_ulong3 simd_min(simd_ulong3 x, simd_ulong3 y) { | ||
| 2470 | return simd_make_ulong3(simd_min(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2471 | } | ||
| 2472 | |||
| 2473 | static inline SIMD_CFUNC simd_ulong4 simd_min(simd_ulong4 x, simd_ulong4 y) { | ||
| 2474 | #if defined __AVX512VL__ | ||
| 2475 | return _mm256_min_epu64(x, y); | ||
| 2476 | #else | ||
| 2477 | return simd_bitselect(x, y, y < x); | ||
| 2478 | #endif | ||
| 2479 | } | ||
| 2480 | |||
| 2481 | static inline SIMD_CFUNC simd_ulong8 simd_min(simd_ulong8 x, simd_ulong8 y) { | ||
| 2482 | #if defined __AVX512F__ | ||
| 2483 | return _mm512_min_epu64(x, y); | ||
| 2484 | #else | ||
| 2485 | return simd_bitselect(x, y, y < x); | ||
| 2486 | #endif | ||
| 2487 | } | ||
| 2488 | |||
| 2489 | static inline SIMD_CFUNC double simd_min(double x, double y) { | ||
| 2490 | return __tg_fmin(x,y); | ||
| 2491 | } | ||
| 2492 | |||
| 2493 | static inline SIMD_CFUNC simd_double2 simd_min(simd_double2 x, simd_double2 y) { | ||
| 2494 | return __tg_fmin(x,y); | ||
| 2495 | } | ||
| 2496 | |||
| 2497 | static inline SIMD_CFUNC simd_double3 simd_min(simd_double3 x, simd_double3 y) { | ||
| 2498 | return __tg_fmin(x,y); | ||
| 2499 | } | ||
| 2500 | |||
| 2501 | static inline SIMD_CFUNC simd_double4 simd_min(simd_double4 x, simd_double4 y) { | ||
| 2502 | return __tg_fmin(x,y); | ||
| 2503 | } | ||
| 2504 | |||
| 2505 | static inline SIMD_CFUNC simd_double8 simd_min(simd_double8 x, simd_double8 y) { | ||
| 2506 | return __tg_fmin(x,y); | ||
| 2507 | } | ||
| 2508 | |||
| 2509 | static inline SIMD_CFUNC simd_char2 simd_max(simd_char2 x, simd_char2 y) { | ||
| 2510 | return simd_make_char2(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2511 | } | ||
| 2512 | |||
| 2513 | static inline SIMD_CFUNC simd_char3 simd_max(simd_char3 x, simd_char3 y) { | ||
| 2514 | return simd_make_char3(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2515 | } | ||
| 2516 | |||
| 2517 | static inline SIMD_CFUNC simd_char4 simd_max(simd_char4 x, simd_char4 y) { | ||
| 2518 | return simd_make_char4(simd_max(simd_make_char8_undef(x), simd_make_char8_undef(y))); | ||
| 2519 | } | ||
| 2520 | |||
| 2521 | static inline SIMD_CFUNC simd_char8 simd_max(simd_char8 x, simd_char8 y) { | ||
| 2522 | #if defined __arm__ || defined __arm64__ | ||
| 2523 | return vmax_s8(x, y); | ||
| 2524 | #else | ||
| 2525 | return simd_make_char8(simd_max(simd_make_char16_undef(x), simd_make_char16_undef(y))); | ||
| 2526 | #endif | ||
| 2527 | |||
| 2528 | } | ||
| 2529 | |||
| 2530 | static inline SIMD_CFUNC simd_char16 simd_max(simd_char16 x, simd_char16 y) { | ||
| 2531 | #if defined __arm__ || defined __arm64__ | ||
| 2532 | return vmaxq_s8(x, y); | ||
| 2533 | #elif defined __SSE4_1__ | ||
| 2534 | return (simd_char16) _mm_max_epi8((__m128i)x, (__m128i)y); | ||
| 2535 | #else | ||
| 2536 | return simd_bitselect(x, y, x < y); | ||
| 2537 | #endif | ||
| 2538 | } | ||
| 2539 | |||
| 2540 | static inline SIMD_CFUNC simd_char32 simd_max(simd_char32 x, simd_char32 y) { | ||
| 2541 | #if defined __AVX2__ | ||
| 2542 | return _mm256_max_epi8(x, y); | ||
| 2543 | #else | ||
| 2544 | return simd_bitselect(x, y, x < y); | ||
| 2545 | #endif | ||
| 2546 | } | ||
| 2547 | |||
| 2548 | static inline SIMD_CFUNC simd_char64 simd_max(simd_char64 x, simd_char64 y) { | ||
| 2549 | #if defined __AVX512BW__ | ||
| 2550 | return _mm512_max_epi8(x, y); | ||
| 2551 | #else | ||
| 2552 | return simd_bitselect(x, y, x < y); | ||
| 2553 | #endif | ||
| 2554 | } | ||
| 2555 | |||
| 2556 | static inline SIMD_CFUNC simd_uchar2 simd_max(simd_uchar2 x, simd_uchar2 y) { | ||
| 2557 | return simd_make_uchar2(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2558 | } | ||
| 2559 | |||
| 2560 | static inline SIMD_CFUNC simd_uchar3 simd_max(simd_uchar3 x, simd_uchar3 y) { | ||
| 2561 | return simd_make_uchar3(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2562 | } | ||
| 2563 | |||
| 2564 | static inline SIMD_CFUNC simd_uchar4 simd_max(simd_uchar4 x, simd_uchar4 y) { | ||
| 2565 | return simd_make_uchar4(simd_max(simd_make_uchar8_undef(x), simd_make_uchar8_undef(y))); | ||
| 2566 | } | ||
| 2567 | |||
| 2568 | static inline SIMD_CFUNC simd_uchar8 simd_max(simd_uchar8 x, simd_uchar8 y) { | ||
| 2569 | #if defined __arm__ || defined __arm64__ | ||
| 2570 | return vmax_u8(x, y); | ||
| 2571 | #else | ||
| 2572 | return simd_make_uchar8(simd_max(simd_make_uchar16_undef(x), simd_make_uchar16_undef(y))); | ||
| 2573 | #endif | ||
| 2574 | |||
| 2575 | } | ||
| 2576 | |||
| 2577 | static inline SIMD_CFUNC simd_uchar16 simd_max(simd_uchar16 x, simd_uchar16 y) { | ||
| 2578 | #if defined __arm__ || defined __arm64__ | ||
| 2579 | return vmaxq_u8(x, y); | ||
| 2580 | #elif defined __SSE4_1__ | ||
| 2581 | return (simd_uchar16) _mm_max_epu8((__m128i)x, (__m128i)y); | ||
| 2582 | #else | ||
| 2583 | return simd_bitselect(x, y, x < y); | ||
| 2584 | #endif | ||
| 2585 | } | ||
| 2586 | |||
| 2587 | static inline SIMD_CFUNC simd_uchar32 simd_max(simd_uchar32 x, simd_uchar32 y) { | ||
| 2588 | #if defined __AVX2__ | ||
| 2589 | return _mm256_max_epu8(x, y); | ||
| 2590 | #else | ||
| 2591 | return simd_bitselect(x, y, x < y); | ||
| 2592 | #endif | ||
| 2593 | } | ||
| 2594 | |||
| 2595 | static inline SIMD_CFUNC simd_uchar64 simd_max(simd_uchar64 x, simd_uchar64 y) { | ||
| 2596 | #if defined __AVX512BW__ | ||
| 2597 | return _mm512_max_epu8(x, y); | ||
| 2598 | #else | ||
| 2599 | return simd_bitselect(x, y, x < y); | ||
| 2600 | #endif | ||
| 2601 | } | ||
| 2602 | |||
| 2603 | static inline SIMD_CFUNC simd_short2 simd_max(simd_short2 x, simd_short2 y) { | ||
| 2604 | return simd_make_short2(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2605 | } | ||
| 2606 | |||
| 2607 | static inline SIMD_CFUNC simd_short3 simd_max(simd_short3 x, simd_short3 y) { | ||
| 2608 | return simd_make_short3(simd_max(simd_make_short4_undef(x), simd_make_short4_undef(y))); | ||
| 2609 | } | ||
| 2610 | |||
| 2611 | static inline SIMD_CFUNC simd_short4 simd_max(simd_short4 x, simd_short4 y) { | ||
| 2612 | #if defined __arm__ || defined __arm64__ | ||
| 2613 | return vmax_s16(x, y); | ||
| 2614 | #else | ||
| 2615 | return simd_make_short4(simd_max(simd_make_short8_undef(x), simd_make_short8_undef(y))); | ||
| 2616 | #endif | ||
| 2617 | |||
| 2618 | } | ||
| 2619 | |||
| 2620 | static inline SIMD_CFUNC simd_short8 simd_max(simd_short8 x, simd_short8 y) { | ||
| 2621 | #if defined __arm__ || defined __arm64__ | ||
| 2622 | return vmaxq_s16(x, y); | ||
| 2623 | #elif defined __SSE4_1__ | ||
| 2624 | return (simd_short8) _mm_max_epi16((__m128i)x, (__m128i)y); | ||
| 2625 | #else | ||
| 2626 | return simd_bitselect(x, y, x < y); | ||
| 2627 | #endif | ||
| 2628 | } | ||
| 2629 | |||
| 2630 | static inline SIMD_CFUNC simd_short16 simd_max(simd_short16 x, simd_short16 y) { | ||
| 2631 | #if defined __AVX2__ | ||
| 2632 | return _mm256_max_epi16(x, y); | ||
| 2633 | #else | ||
| 2634 | return simd_bitselect(x, y, x < y); | ||
| 2635 | #endif | ||
| 2636 | } | ||
| 2637 | |||
| 2638 | static inline SIMD_CFUNC simd_short32 simd_max(simd_short32 x, simd_short32 y) { | ||
| 2639 | #if defined __AVX512BW__ | ||
| 2640 | return _mm512_max_epi16(x, y); | ||
| 2641 | #else | ||
| 2642 | return simd_bitselect(x, y, x < y); | ||
| 2643 | #endif | ||
| 2644 | } | ||
| 2645 | |||
| 2646 | static inline SIMD_CFUNC simd_ushort2 simd_max(simd_ushort2 x, simd_ushort2 y) { | ||
| 2647 | return simd_make_ushort2(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2648 | } | ||
| 2649 | |||
| 2650 | static inline SIMD_CFUNC simd_ushort3 simd_max(simd_ushort3 x, simd_ushort3 y) { | ||
| 2651 | return simd_make_ushort3(simd_max(simd_make_ushort4_undef(x), simd_make_ushort4_undef(y))); | ||
| 2652 | } | ||
| 2653 | |||
| 2654 | static inline SIMD_CFUNC simd_ushort4 simd_max(simd_ushort4 x, simd_ushort4 y) { | ||
| 2655 | #if defined __arm__ || defined __arm64__ | ||
| 2656 | return vmax_u16(x, y); | ||
| 2657 | #else | ||
| 2658 | return simd_make_ushort4(simd_max(simd_make_ushort8_undef(x), simd_make_ushort8_undef(y))); | ||
| 2659 | #endif | ||
| 2660 | |||
| 2661 | } | ||
| 2662 | |||
| 2663 | static inline SIMD_CFUNC simd_ushort8 simd_max(simd_ushort8 x, simd_ushort8 y) { | ||
| 2664 | #if defined __arm__ || defined __arm64__ | ||
| 2665 | return vmaxq_u16(x, y); | ||
| 2666 | #elif defined __SSE4_1__ | ||
| 2667 | return (simd_ushort8) _mm_max_epu16((__m128i)x, (__m128i)y); | ||
| 2668 | #else | ||
| 2669 | return simd_bitselect(x, y, x < y); | ||
| 2670 | #endif | ||
| 2671 | } | ||
| 2672 | |||
| 2673 | static inline SIMD_CFUNC simd_ushort16 simd_max(simd_ushort16 x, simd_ushort16 y) { | ||
| 2674 | #if defined __AVX2__ | ||
| 2675 | return _mm256_max_epu16(x, y); | ||
| 2676 | #else | ||
| 2677 | return simd_bitselect(x, y, x < y); | ||
| 2678 | #endif | ||
| 2679 | } | ||
| 2680 | |||
| 2681 | static inline SIMD_CFUNC simd_ushort32 simd_max(simd_ushort32 x, simd_ushort32 y) { | ||
| 2682 | #if defined __AVX512BW__ | ||
| 2683 | return _mm512_max_epu16(x, y); | ||
| 2684 | #else | ||
| 2685 | return simd_bitselect(x, y, x < y); | ||
| 2686 | #endif | ||
| 2687 | } | ||
| 2688 | |||
| 2689 | static inline SIMD_CFUNC simd_int2 simd_max(simd_int2 x, simd_int2 y) { | ||
| 2690 | #if defined __arm__ || defined __arm64__ | ||
| 2691 | return vmax_s32(x, y); | ||
| 2692 | #else | ||
| 2693 | return simd_make_int2(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2694 | #endif | ||
| 2695 | |||
| 2696 | } | ||
| 2697 | |||
| 2698 | static inline SIMD_CFUNC simd_int3 simd_max(simd_int3 x, simd_int3 y) { | ||
| 2699 | return simd_make_int3(simd_max(simd_make_int4_undef(x), simd_make_int4_undef(y))); | ||
| 2700 | } | ||
| 2701 | |||
| 2702 | static inline SIMD_CFUNC simd_int4 simd_max(simd_int4 x, simd_int4 y) { | ||
| 2703 | #if defined __arm__ || defined __arm64__ | ||
| 2704 | return vmaxq_s32(x, y); | ||
| 2705 | #elif defined __SSE4_1__ | ||
| 2706 | return (simd_int4) _mm_max_epi32((__m128i)x, (__m128i)y); | ||
| 2707 | #else | ||
| 2708 | return simd_bitselect(x, y, x < y); | ||
| 2709 | #endif | ||
| 2710 | } | ||
| 2711 | |||
| 2712 | static inline SIMD_CFUNC simd_int8 simd_max(simd_int8 x, simd_int8 y) { | ||
| 2713 | #if defined __AVX2__ | ||
| 2714 | return _mm256_max_epi32(x, y); | ||
| 2715 | #else | ||
| 2716 | return simd_bitselect(x, y, x < y); | ||
| 2717 | #endif | ||
| 2718 | } | ||
| 2719 | |||
| 2720 | static inline SIMD_CFUNC simd_int16 simd_max(simd_int16 x, simd_int16 y) { | ||
| 2721 | #if defined __AVX512F__ | ||
| 2722 | return _mm512_max_epi32(x, y); | ||
| 2723 | #else | ||
| 2724 | return simd_bitselect(x, y, x < y); | ||
| 2725 | #endif | ||
| 2726 | } | ||
| 2727 | |||
| 2728 | static inline SIMD_CFUNC simd_uint2 simd_max(simd_uint2 x, simd_uint2 y) { | ||
| 2729 | #if defined __arm__ || defined __arm64__ | ||
| 2730 | return vmax_u32(x, y); | ||
| 2731 | #else | ||
| 2732 | return simd_make_uint2(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2733 | #endif | ||
| 2734 | |||
| 2735 | } | ||
| 2736 | |||
| 2737 | static inline SIMD_CFUNC simd_uint3 simd_max(simd_uint3 x, simd_uint3 y) { | ||
| 2738 | return simd_make_uint3(simd_max(simd_make_uint4_undef(x), simd_make_uint4_undef(y))); | ||
| 2739 | } | ||
| 2740 | |||
| 2741 | static inline SIMD_CFUNC simd_uint4 simd_max(simd_uint4 x, simd_uint4 y) { | ||
| 2742 | #if defined __arm__ || defined __arm64__ | ||
| 2743 | return vmaxq_u32(x, y); | ||
| 2744 | #elif defined __SSE4_1__ | ||
| 2745 | return (simd_uint4) _mm_max_epu32((__m128i)x, (__m128i)y); | ||
| 2746 | #else | ||
| 2747 | return simd_bitselect(x, y, x < y); | ||
| 2748 | #endif | ||
| 2749 | } | ||
| 2750 | |||
| 2751 | static inline SIMD_CFUNC simd_uint8 simd_max(simd_uint8 x, simd_uint8 y) { | ||
| 2752 | #if defined __AVX2__ | ||
| 2753 | return _mm256_max_epu32(x, y); | ||
| 2754 | #else | ||
| 2755 | return simd_bitselect(x, y, x < y); | ||
| 2756 | #endif | ||
| 2757 | } | ||
| 2758 | |||
| 2759 | static inline SIMD_CFUNC simd_uint16 simd_max(simd_uint16 x, simd_uint16 y) { | ||
| 2760 | #if defined __AVX512F__ | ||
| 2761 | return _mm512_max_epu32(x, y); | ||
| 2762 | #else | ||
| 2763 | return simd_bitselect(x, y, x < y); | ||
| 2764 | #endif | ||
| 2765 | } | ||
| 2766 | |||
| 2767 | static inline SIMD_CFUNC float simd_max(float x, float y) { | ||
| 2768 | return __tg_fmax(x,y); | ||
| 2769 | } | ||
| 2770 | |||
| 2771 | static inline SIMD_CFUNC simd_float2 simd_max(simd_float2 x, simd_float2 y) { | ||
| 2772 | return __tg_fmax(x,y); | ||
| 2773 | } | ||
| 2774 | |||
| 2775 | static inline SIMD_CFUNC simd_float3 simd_max(simd_float3 x, simd_float3 y) { | ||
| 2776 | return __tg_fmax(x,y); | ||
| 2777 | } | ||
| 2778 | |||
| 2779 | static inline SIMD_CFUNC simd_float4 simd_max(simd_float4 x, simd_float4 y) { | ||
| 2780 | return __tg_fmax(x,y); | ||
| 2781 | } | ||
| 2782 | |||
| 2783 | static inline SIMD_CFUNC simd_float8 simd_max(simd_float8 x, simd_float8 y) { | ||
| 2784 | return __tg_fmax(x,y); | ||
| 2785 | } | ||
| 2786 | |||
| 2787 | static inline SIMD_CFUNC simd_float16 simd_max(simd_float16 x, simd_float16 y) { | ||
| 2788 | return __tg_fmax(x,y); | ||
| 2789 | } | ||
| 2790 | |||
| 2791 | static inline SIMD_CFUNC simd_long2 simd_max(simd_long2 x, simd_long2 y) { | ||
| 2792 | #if defined __AVX512VL__ | ||
| 2793 | return _mm_max_epi64(x, y); | ||
| 2794 | #else | ||
| 2795 | return simd_bitselect(x, y, x < y); | ||
| 2796 | #endif | ||
| 2797 | } | ||
| 2798 | |||
| 2799 | static inline SIMD_CFUNC simd_long3 simd_max(simd_long3 x, simd_long3 y) { | ||
| 2800 | return simd_make_long3(simd_max(simd_make_long4_undef(x), simd_make_long4_undef(y))); | ||
| 2801 | } | ||
| 2802 | |||
| 2803 | static inline SIMD_CFUNC simd_long4 simd_max(simd_long4 x, simd_long4 y) { | ||
| 2804 | #if defined __AVX512VL__ | ||
| 2805 | return _mm256_max_epi64(x, y); | ||
| 2806 | #else | ||
| 2807 | return simd_bitselect(x, y, x < y); | ||
| 2808 | #endif | ||
| 2809 | } | ||
| 2810 | |||
| 2811 | static inline SIMD_CFUNC simd_long8 simd_max(simd_long8 x, simd_long8 y) { | ||
| 2812 | #if defined __AVX512F__ | ||
| 2813 | return _mm512_max_epi64(x, y); | ||
| 2814 | #else | ||
| 2815 | return simd_bitselect(x, y, x < y); | ||
| 2816 | #endif | ||
| 2817 | } | ||
| 2818 | |||
| 2819 | static inline SIMD_CFUNC simd_ulong2 simd_max(simd_ulong2 x, simd_ulong2 y) { | ||
| 2820 | #if defined __AVX512VL__ | ||
| 2821 | return _mm_max_epu64(x, y); | ||
| 2822 | #else | ||
| 2823 | return simd_bitselect(x, y, x < y); | ||
| 2824 | #endif | ||
| 2825 | } | ||
| 2826 | |||
| 2827 | static inline SIMD_CFUNC simd_ulong3 simd_max(simd_ulong3 x, simd_ulong3 y) { | ||
| 2828 | return simd_make_ulong3(simd_max(simd_make_ulong4_undef(x), simd_make_ulong4_undef(y))); | ||
| 2829 | } | ||
| 2830 | |||
| 2831 | static inline SIMD_CFUNC simd_ulong4 simd_max(simd_ulong4 x, simd_ulong4 y) { | ||
| 2832 | #if defined __AVX512VL__ | ||
| 2833 | return _mm256_max_epu64(x, y); | ||
| 2834 | #else | ||
| 2835 | return simd_bitselect(x, y, x < y); | ||
| 2836 | #endif | ||
| 2837 | } | ||
| 2838 | |||
| 2839 | static inline SIMD_CFUNC simd_ulong8 simd_max(simd_ulong8 x, simd_ulong8 y) { | ||
| 2840 | #if defined __AVX512F__ | ||
| 2841 | return _mm512_max_epu64(x, y); | ||
| 2842 | #else | ||
| 2843 | return simd_bitselect(x, y, x < y); | ||
| 2844 | #endif | ||
| 2845 | } | ||
| 2846 | |||
| 2847 | static inline SIMD_CFUNC double simd_max(double x, double y) { | ||
| 2848 | return __tg_fmax(x,y); | ||
| 2849 | } | ||
| 2850 | |||
| 2851 | static inline SIMD_CFUNC simd_double2 simd_max(simd_double2 x, simd_double2 y) { | ||
| 2852 | return __tg_fmax(x,y); | ||
| 2853 | } | ||
| 2854 | |||
| 2855 | static inline SIMD_CFUNC simd_double3 simd_max(simd_double3 x, simd_double3 y) { | ||
| 2856 | return __tg_fmax(x,y); | ||
| 2857 | } | ||
| 2858 | |||
| 2859 | static inline SIMD_CFUNC simd_double4 simd_max(simd_double4 x, simd_double4 y) { | ||
| 2860 | return __tg_fmax(x,y); | ||
| 2861 | } | ||
| 2862 | |||
| 2863 | static inline SIMD_CFUNC simd_double8 simd_max(simd_double8 x, simd_double8 y) { | ||
| 2864 | return __tg_fmax(x,y); | ||
| 2865 | } | ||
| 2866 | |||
| 2867 | static inline SIMD_CFUNC simd_char2 simd_clamp(simd_char2 x, simd_char2 min, simd_char2 max) { | ||
| 2868 | return simd_min(simd_max(x, min), max); | ||
| 2869 | } | ||
| 2870 | |||
| 2871 | static inline SIMD_CFUNC simd_char3 simd_clamp(simd_char3 x, simd_char3 min, simd_char3 max) { | ||
| 2872 | return simd_min(simd_max(x, min), max); | ||
| 2873 | } | ||
| 2874 | |||
| 2875 | static inline SIMD_CFUNC simd_char4 simd_clamp(simd_char4 x, simd_char4 min, simd_char4 max) { | ||
| 2876 | return simd_min(simd_max(x, min), max); | ||
| 2877 | } | ||
| 2878 | |||
| 2879 | static inline SIMD_CFUNC simd_char8 simd_clamp(simd_char8 x, simd_char8 min, simd_char8 max) { | ||
| 2880 | return simd_min(simd_max(x, min), max); | ||
| 2881 | } | ||
| 2882 | |||
| 2883 | static inline SIMD_CFUNC simd_char16 simd_clamp(simd_char16 x, simd_char16 min, simd_char16 max) { | ||
| 2884 | return simd_min(simd_max(x, min), max); | ||
| 2885 | } | ||
| 2886 | |||
| 2887 | static inline SIMD_CFUNC simd_char32 simd_clamp(simd_char32 x, simd_char32 min, simd_char32 max) { | ||
| 2888 | return simd_min(simd_max(x, min), max); | ||
| 2889 | } | ||
| 2890 | |||
| 2891 | static inline SIMD_CFUNC simd_char64 simd_clamp(simd_char64 x, simd_char64 min, simd_char64 max) { | ||
| 2892 | return simd_min(simd_max(x, min), max); | ||
| 2893 | } | ||
| 2894 | |||
| 2895 | static inline SIMD_CFUNC simd_uchar2 simd_clamp(simd_uchar2 x, simd_uchar2 min, simd_uchar2 max) { | ||
| 2896 | return simd_min(simd_max(x, min), max); | ||
| 2897 | } | ||
| 2898 | |||
| 2899 | static inline SIMD_CFUNC simd_uchar3 simd_clamp(simd_uchar3 x, simd_uchar3 min, simd_uchar3 max) { | ||
| 2900 | return simd_min(simd_max(x, min), max); | ||
| 2901 | } | ||
| 2902 | |||
| 2903 | static inline SIMD_CFUNC simd_uchar4 simd_clamp(simd_uchar4 x, simd_uchar4 min, simd_uchar4 max) { | ||
| 2904 | return simd_min(simd_max(x, min), max); | ||
| 2905 | } | ||
| 2906 | |||
| 2907 | static inline SIMD_CFUNC simd_uchar8 simd_clamp(simd_uchar8 x, simd_uchar8 min, simd_uchar8 max) { | ||
| 2908 | return simd_min(simd_max(x, min), max); | ||
| 2909 | } | ||
| 2910 | |||
| 2911 | static inline SIMD_CFUNC simd_uchar16 simd_clamp(simd_uchar16 x, simd_uchar16 min, simd_uchar16 max) { | ||
| 2912 | return simd_min(simd_max(x, min), max); | ||
| 2913 | } | ||
| 2914 | |||
| 2915 | static inline SIMD_CFUNC simd_uchar32 simd_clamp(simd_uchar32 x, simd_uchar32 min, simd_uchar32 max) { | ||
| 2916 | return simd_min(simd_max(x, min), max); | ||
| 2917 | } | ||
| 2918 | |||
| 2919 | static inline SIMD_CFUNC simd_uchar64 simd_clamp(simd_uchar64 x, simd_uchar64 min, simd_uchar64 max) { | ||
| 2920 | return simd_min(simd_max(x, min), max); | ||
| 2921 | } | ||
| 2922 | |||
| 2923 | static inline SIMD_CFUNC simd_short2 simd_clamp(simd_short2 x, simd_short2 min, simd_short2 max) { | ||
| 2924 | return simd_min(simd_max(x, min), max); | ||
| 2925 | } | ||
| 2926 | |||
| 2927 | static inline SIMD_CFUNC simd_short3 simd_clamp(simd_short3 x, simd_short3 min, simd_short3 max) { | ||
| 2928 | return simd_min(simd_max(x, min), max); | ||
| 2929 | } | ||
| 2930 | |||
| 2931 | static inline SIMD_CFUNC simd_short4 simd_clamp(simd_short4 x, simd_short4 min, simd_short4 max) { | ||
| 2932 | return simd_min(simd_max(x, min), max); | ||
| 2933 | } | ||
| 2934 | |||
| 2935 | static inline SIMD_CFUNC simd_short8 simd_clamp(simd_short8 x, simd_short8 min, simd_short8 max) { | ||
| 2936 | return simd_min(simd_max(x, min), max); | ||
| 2937 | } | ||
| 2938 | |||
| 2939 | static inline SIMD_CFUNC simd_short16 simd_clamp(simd_short16 x, simd_short16 min, simd_short16 max) { | ||
| 2940 | return simd_min(simd_max(x, min), max); | ||
| 2941 | } | ||
| 2942 | |||
| 2943 | static inline SIMD_CFUNC simd_short32 simd_clamp(simd_short32 x, simd_short32 min, simd_short32 max) { | ||
| 2944 | return simd_min(simd_max(x, min), max); | ||
| 2945 | } | ||
| 2946 | |||
| 2947 | static inline SIMD_CFUNC simd_ushort2 simd_clamp(simd_ushort2 x, simd_ushort2 min, simd_ushort2 max) { | ||
| 2948 | return simd_min(simd_max(x, min), max); | ||
| 2949 | } | ||
| 2950 | |||
| 2951 | static inline SIMD_CFUNC simd_ushort3 simd_clamp(simd_ushort3 x, simd_ushort3 min, simd_ushort3 max) { | ||
| 2952 | return simd_min(simd_max(x, min), max); | ||
| 2953 | } | ||
| 2954 | |||
| 2955 | static inline SIMD_CFUNC simd_ushort4 simd_clamp(simd_ushort4 x, simd_ushort4 min, simd_ushort4 max) { | ||
| 2956 | return simd_min(simd_max(x, min), max); | ||
| 2957 | } | ||
| 2958 | |||
| 2959 | static inline SIMD_CFUNC simd_ushort8 simd_clamp(simd_ushort8 x, simd_ushort8 min, simd_ushort8 max) { | ||
| 2960 | return simd_min(simd_max(x, min), max); | ||
| 2961 | } | ||
| 2962 | |||
| 2963 | static inline SIMD_CFUNC simd_ushort16 simd_clamp(simd_ushort16 x, simd_ushort16 min, simd_ushort16 max) { | ||
| 2964 | return simd_min(simd_max(x, min), max); | ||
| 2965 | } | ||
| 2966 | |||
| 2967 | static inline SIMD_CFUNC simd_ushort32 simd_clamp(simd_ushort32 x, simd_ushort32 min, simd_ushort32 max) { | ||
| 2968 | return simd_min(simd_max(x, min), max); | ||
| 2969 | } | ||
| 2970 | |||
| 2971 | static inline SIMD_CFUNC simd_int2 simd_clamp(simd_int2 x, simd_int2 min, simd_int2 max) { | ||
| 2972 | return simd_min(simd_max(x, min), max); | ||
| 2973 | } | ||
| 2974 | |||
| 2975 | static inline SIMD_CFUNC simd_int3 simd_clamp(simd_int3 x, simd_int3 min, simd_int3 max) { | ||
| 2976 | return simd_min(simd_max(x, min), max); | ||
| 2977 | } | ||
| 2978 | |||
| 2979 | static inline SIMD_CFUNC simd_int4 simd_clamp(simd_int4 x, simd_int4 min, simd_int4 max) { | ||
| 2980 | return simd_min(simd_max(x, min), max); | ||
| 2981 | } | ||
| 2982 | |||
| 2983 | static inline SIMD_CFUNC simd_int8 simd_clamp(simd_int8 x, simd_int8 min, simd_int8 max) { | ||
| 2984 | return simd_min(simd_max(x, min), max); | ||
| 2985 | } | ||
| 2986 | |||
| 2987 | static inline SIMD_CFUNC simd_int16 simd_clamp(simd_int16 x, simd_int16 min, simd_int16 max) { | ||
| 2988 | return simd_min(simd_max(x, min), max); | ||
| 2989 | } | ||
| 2990 | |||
| 2991 | static inline SIMD_CFUNC simd_uint2 simd_clamp(simd_uint2 x, simd_uint2 min, simd_uint2 max) { | ||
| 2992 | return simd_min(simd_max(x, min), max); | ||
| 2993 | } | ||
| 2994 | |||
| 2995 | static inline SIMD_CFUNC simd_uint3 simd_clamp(simd_uint3 x, simd_uint3 min, simd_uint3 max) { | ||
| 2996 | return simd_min(simd_max(x, min), max); | ||
| 2997 | } | ||
| 2998 | |||
| 2999 | static inline SIMD_CFUNC simd_uint4 simd_clamp(simd_uint4 x, simd_uint4 min, simd_uint4 max) { | ||
| 3000 | return simd_min(simd_max(x, min), max); | ||
| 3001 | } | ||
| 3002 | |||
| 3003 | static inline SIMD_CFUNC simd_uint8 simd_clamp(simd_uint8 x, simd_uint8 min, simd_uint8 max) { | ||
| 3004 | return simd_min(simd_max(x, min), max); | ||
| 3005 | } | ||
| 3006 | |||
| 3007 | static inline SIMD_CFUNC simd_uint16 simd_clamp(simd_uint16 x, simd_uint16 min, simd_uint16 max) { | ||
| 3008 | return simd_min(simd_max(x, min), max); | ||
| 3009 | } | ||
| 3010 | |||
| 3011 | static inline SIMD_CFUNC float simd_clamp(float x, float min, float max) { | ||
| 3012 | return simd_min(simd_max(x, min), max); | ||
| 3013 | } | ||
| 3014 | |||
| 3015 | static inline SIMD_CFUNC simd_float2 simd_clamp(simd_float2 x, simd_float2 min, simd_float2 max) { | ||
| 3016 | return simd_min(simd_max(x, min), max); | ||
| 3017 | } | ||
| 3018 | |||
| 3019 | static inline SIMD_CFUNC simd_float3 simd_clamp(simd_float3 x, simd_float3 min, simd_float3 max) { | ||
| 3020 | return simd_min(simd_max(x, min), max); | ||
| 3021 | } | ||
| 3022 | |||
| 3023 | static inline SIMD_CFUNC simd_float4 simd_clamp(simd_float4 x, simd_float4 min, simd_float4 max) { | ||
| 3024 | return simd_min(simd_max(x, min), max); | ||
| 3025 | } | ||
| 3026 | |||
| 3027 | static inline SIMD_CFUNC simd_float8 simd_clamp(simd_float8 x, simd_float8 min, simd_float8 max) { | ||
| 3028 | return simd_min(simd_max(x, min), max); | ||
| 3029 | } | ||
| 3030 | |||
| 3031 | static inline SIMD_CFUNC simd_float16 simd_clamp(simd_float16 x, simd_float16 min, simd_float16 max) { | ||
| 3032 | return simd_min(simd_max(x, min), max); | ||
| 3033 | } | ||
| 3034 | |||
| 3035 | static inline SIMD_CFUNC simd_long2 simd_clamp(simd_long2 x, simd_long2 min, simd_long2 max) { | ||
| 3036 | return simd_min(simd_max(x, min), max); | ||
| 3037 | } | ||
| 3038 | |||
| 3039 | static inline SIMD_CFUNC simd_long3 simd_clamp(simd_long3 x, simd_long3 min, simd_long3 max) { | ||
| 3040 | return simd_min(simd_max(x, min), max); | ||
| 3041 | } | ||
| 3042 | |||
| 3043 | static inline SIMD_CFUNC simd_long4 simd_clamp(simd_long4 x, simd_long4 min, simd_long4 max) { | ||
| 3044 | return simd_min(simd_max(x, min), max); | ||
| 3045 | } | ||
| 3046 | |||
| 3047 | static inline SIMD_CFUNC simd_long8 simd_clamp(simd_long8 x, simd_long8 min, simd_long8 max) { | ||
| 3048 | return simd_min(simd_max(x, min), max); | ||
| 3049 | } | ||
| 3050 | |||
| 3051 | static inline SIMD_CFUNC simd_ulong2 simd_clamp(simd_ulong2 x, simd_ulong2 min, simd_ulong2 max) { | ||
| 3052 | return simd_min(simd_max(x, min), max); | ||
| 3053 | } | ||
| 3054 | |||
| 3055 | static inline SIMD_CFUNC simd_ulong3 simd_clamp(simd_ulong3 x, simd_ulong3 min, simd_ulong3 max) { | ||
| 3056 | return simd_min(simd_max(x, min), max); | ||
| 3057 | } | ||
| 3058 | |||
| 3059 | static inline SIMD_CFUNC simd_ulong4 simd_clamp(simd_ulong4 x, simd_ulong4 min, simd_ulong4 max) { | ||
| 3060 | return simd_min(simd_max(x, min), max); | ||
| 3061 | } | ||
| 3062 | |||
| 3063 | static inline SIMD_CFUNC simd_ulong8 simd_clamp(simd_ulong8 x, simd_ulong8 min, simd_ulong8 max) { | ||
| 3064 | return simd_min(simd_max(x, min), max); | ||
| 3065 | } | ||
| 3066 | |||
| 3067 | static inline SIMD_CFUNC double simd_clamp(double x, double min, double max) { | ||
| 3068 | return simd_min(simd_max(x, min), max); | ||
| 3069 | } | ||
| 3070 | |||
| 3071 | static inline SIMD_CFUNC simd_double2 simd_clamp(simd_double2 x, simd_double2 min, simd_double2 max) { | ||
| 3072 | return simd_min(simd_max(x, min), max); | ||
| 3073 | } | ||
| 3074 | |||
| 3075 | static inline SIMD_CFUNC simd_double3 simd_clamp(simd_double3 x, simd_double3 min, simd_double3 max) { | ||
| 3076 | return simd_min(simd_max(x, min), max); | ||
| 3077 | } | ||
| 3078 | |||
| 3079 | static inline SIMD_CFUNC simd_double4 simd_clamp(simd_double4 x, simd_double4 min, simd_double4 max) { | ||
| 3080 | return simd_min(simd_max(x, min), max); | ||
| 3081 | } | ||
| 3082 | |||
| 3083 | static inline SIMD_CFUNC simd_double8 simd_clamp(simd_double8 x, simd_double8 min, simd_double8 max) { | ||
| 3084 | return simd_min(simd_max(x, min), max); | ||
| 3085 | } | ||
| 3086 | |||
| 3087 | |||
| 3088 | static inline SIMD_CFUNC float simd_sign(float x) { | ||
| 3089 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3090 | } | ||
| 3091 | |||
| 3092 | static inline SIMD_CFUNC simd_float2 simd_sign(simd_float2 x) { | ||
| 3093 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3094 | } | ||
| 3095 | |||
| 3096 | static inline SIMD_CFUNC simd_float3 simd_sign(simd_float3 x) { | ||
| 3097 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3098 | } | ||
| 3099 | |||
| 3100 | static inline SIMD_CFUNC simd_float4 simd_sign(simd_float4 x) { | ||
| 3101 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3102 | } | ||
| 3103 | |||
| 3104 | static inline SIMD_CFUNC simd_float8 simd_sign(simd_float8 x) { | ||
| 3105 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3106 | } | ||
| 3107 | |||
| 3108 | static inline SIMD_CFUNC simd_float16 simd_sign(simd_float16 x) { | ||
| 3109 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3110 | } | ||
| 3111 | |||
| 3112 | static inline SIMD_CFUNC double simd_sign(double x) { | ||
| 3113 | return (x == 0 | x != x) ? 0 : copysign(1,x); | ||
| 3114 | } | ||
| 3115 | |||
| 3116 | static inline SIMD_CFUNC simd_double2 simd_sign(simd_double2 x) { | ||
| 3117 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3118 | } | ||
| 3119 | |||
| 3120 | static inline SIMD_CFUNC simd_double3 simd_sign(simd_double3 x) { | ||
| 3121 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3122 | } | ||
| 3123 | |||
| 3124 | static inline SIMD_CFUNC simd_double4 simd_sign(simd_double4 x) { | ||
| 3125 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3126 | } | ||
| 3127 | |||
| 3128 | static inline SIMD_CFUNC simd_double8 simd_sign(simd_double8 x) { | ||
| 3129 | return simd_bitselect(__tg_copysign(1,x), 0, x == 0 | x != x); | ||
| 3130 | } | ||
| 3131 | |||
| 3132 | static inline SIMD_CFUNC float simd_mix(float x, float y, float t) { | ||
| 3133 | return x + t*(y - x); | ||
| 3134 | } | ||
| 3135 | |||
| 3136 | static inline SIMD_CFUNC simd_float2 simd_mix(simd_float2 x, simd_float2 y, simd_float2 t) { | ||
| 3137 | return x + t*(y - x); | ||
| 3138 | } | ||
| 3139 | |||
| 3140 | static inline SIMD_CFUNC simd_float3 simd_mix(simd_float3 x, simd_float3 y, simd_float3 t) { | ||
| 3141 | return x + t*(y - x); | ||
| 3142 | } | ||
| 3143 | |||
| 3144 | static inline SIMD_CFUNC simd_float4 simd_mix(simd_float4 x, simd_float4 y, simd_float4 t) { | ||
| 3145 | return x + t*(y - x); | ||
| 3146 | } | ||
| 3147 | |||
| 3148 | static inline SIMD_CFUNC simd_float8 simd_mix(simd_float8 x, simd_float8 y, simd_float8 t) { | ||
| 3149 | return x + t*(y - x); | ||
| 3150 | } | ||
| 3151 | |||
| 3152 | static inline SIMD_CFUNC simd_float16 simd_mix(simd_float16 x, simd_float16 y, simd_float16 t) { | ||
| 3153 | return x + t*(y - x); | ||
| 3154 | } | ||
| 3155 | |||
| 3156 | static inline SIMD_CFUNC double simd_mix(double x, double y, double t) { | ||
| 3157 | return x + t*(y - x); | ||
| 3158 | } | ||
| 3159 | |||
| 3160 | static inline SIMD_CFUNC simd_double2 simd_mix(simd_double2 x, simd_double2 y, simd_double2 t) { | ||
| 3161 | return x + t*(y - x); | ||
| 3162 | } | ||
| 3163 | |||
| 3164 | static inline SIMD_CFUNC simd_double3 simd_mix(simd_double3 x, simd_double3 y, simd_double3 t) { | ||
| 3165 | return x + t*(y - x); | ||
| 3166 | } | ||
| 3167 | |||
| 3168 | static inline SIMD_CFUNC simd_double4 simd_mix(simd_double4 x, simd_double4 y, simd_double4 t) { | ||
| 3169 | return x + t*(y - x); | ||
| 3170 | } | ||
| 3171 | |||
| 3172 | static inline SIMD_CFUNC simd_double8 simd_mix(simd_double8 x, simd_double8 y, simd_double8 t) { | ||
| 3173 | return x + t*(y - x); | ||
| 3174 | } | ||
| 3175 | |||
| 3176 | static inline SIMD_CFUNC float simd_recip(float x) { | ||
| 3177 | #if __FAST_MATH__ | ||
| 3178 | return simd_fast_recip(x); | ||
| 3179 | #else | ||
| 3180 | return simd_precise_recip(x); | ||
| 3181 | #endif | ||
| 3182 | } | ||
| 3183 | |||
| 3184 | static inline SIMD_CFUNC simd_float2 simd_recip(simd_float2 x) { | ||
| 3185 | #if __FAST_MATH__ | ||
| 3186 | return simd_fast_recip(x); | ||
| 3187 | #else | ||
| 3188 | return simd_precise_recip(x); | ||
| 3189 | #endif | ||
| 3190 | } | ||
| 3191 | |||
| 3192 | static inline SIMD_CFUNC simd_float3 simd_recip(simd_float3 x) { | ||
| 3193 | #if __FAST_MATH__ | ||
| 3194 | return simd_fast_recip(x); | ||
| 3195 | #else | ||
| 3196 | return simd_precise_recip(x); | ||
| 3197 | #endif | ||
| 3198 | } | ||
| 3199 | |||
| 3200 | static inline SIMD_CFUNC simd_float4 simd_recip(simd_float4 x) { | ||
| 3201 | #if __FAST_MATH__ | ||
| 3202 | return simd_fast_recip(x); | ||
| 3203 | #else | ||
| 3204 | return simd_precise_recip(x); | ||
| 3205 | #endif | ||
| 3206 | } | ||
| 3207 | |||
| 3208 | static inline SIMD_CFUNC simd_float8 simd_recip(simd_float8 x) { | ||
| 3209 | #if __FAST_MATH__ | ||
| 3210 | return simd_fast_recip(x); | ||
| 3211 | #else | ||
| 3212 | return simd_precise_recip(x); | ||
| 3213 | #endif | ||
| 3214 | } | ||
| 3215 | |||
| 3216 | static inline SIMD_CFUNC simd_float16 simd_recip(simd_float16 x) { | ||
| 3217 | #if __FAST_MATH__ | ||
| 3218 | return simd_fast_recip(x); | ||
| 3219 | #else | ||
| 3220 | return simd_precise_recip(x); | ||
| 3221 | #endif | ||
| 3222 | } | ||
| 3223 | |||
| 3224 | static inline SIMD_CFUNC double simd_recip(double x) { | ||
| 3225 | #if __FAST_MATH__ | ||
| 3226 | return simd_fast_recip(x); | ||
| 3227 | #else | ||
| 3228 | return simd_precise_recip(x); | ||
| 3229 | #endif | ||
| 3230 | } | ||
| 3231 | |||
| 3232 | static inline SIMD_CFUNC simd_double2 simd_recip(simd_double2 x) { | ||
| 3233 | #if __FAST_MATH__ | ||
| 3234 | return simd_fast_recip(x); | ||
| 3235 | #else | ||
| 3236 | return simd_precise_recip(x); | ||
| 3237 | #endif | ||
| 3238 | } | ||
| 3239 | |||
| 3240 | static inline SIMD_CFUNC simd_double3 simd_recip(simd_double3 x) { | ||
| 3241 | #if __FAST_MATH__ | ||
| 3242 | return simd_fast_recip(x); | ||
| 3243 | #else | ||
| 3244 | return simd_precise_recip(x); | ||
| 3245 | #endif | ||
| 3246 | } | ||
| 3247 | |||
| 3248 | static inline SIMD_CFUNC simd_double4 simd_recip(simd_double4 x) { | ||
| 3249 | #if __FAST_MATH__ | ||
| 3250 | return simd_fast_recip(x); | ||
| 3251 | #else | ||
| 3252 | return simd_precise_recip(x); | ||
| 3253 | #endif | ||
| 3254 | } | ||
| 3255 | |||
| 3256 | static inline SIMD_CFUNC simd_double8 simd_recip(simd_double8 x) { | ||
| 3257 | #if __FAST_MATH__ | ||
| 3258 | return simd_fast_recip(x); | ||
| 3259 | #else | ||
| 3260 | return simd_precise_recip(x); | ||
| 3261 | #endif | ||
| 3262 | } | ||
| 3263 | |||
| 3264 | static inline SIMD_CFUNC float simd_fast_recip(float x) { | ||
| 3265 | #if defined __AVX512VL__ | ||
| 3266 | simd_float4 x4 = simd_make_float4(x); | ||
| 3267 | return ((simd_float4)_mm_rcp14_ss(x4, x4)).x; | ||
| 3268 | #elif defined __SSE__ | ||
| 3269 | return ((simd_float4)_mm_rcp_ss(simd_make_float4(x))).x; | ||
| 3270 | #elif defined __ARM_NEON__ | ||
| 3271 | return simd_fast_recip(simd_make_float2_undef(x)).x; | ||
| 3272 | #else | ||
| 3273 | return simd_precise_recip(x); | ||
| 3274 | #endif | ||
| 3275 | } | ||
| 3276 | |||
| 3277 | static inline SIMD_CFUNC simd_float2 simd_fast_recip(simd_float2 x) { | ||
| 3278 | #if defined __SSE__ | ||
| 3279 | return simd_make_float2(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3280 | #elif defined __ARM_NEON__ | ||
| 3281 | simd_float2 r = vrecpe_f32(x); | ||
| 3282 | return r * vrecps_f32(x, r); | ||
| 3283 | #else | ||
| 3284 | return simd_precise_recip(x); | ||
| 3285 | #endif | ||
| 3286 | } | ||
| 3287 | |||
| 3288 | static inline SIMD_CFUNC simd_float3 simd_fast_recip(simd_float3 x) { | ||
| 3289 | return simd_make_float3(simd_fast_recip(simd_make_float4_undef(x))); | ||
| 3290 | } | ||
| 3291 | |||
| 3292 | static inline SIMD_CFUNC simd_float4 simd_fast_recip(simd_float4 x) { | ||
| 3293 | #if defined __AVX512VL__ | ||
| 3294 | return _mm_rcp14_ps(x); | ||
| 3295 | #elif defined __SSE__ | ||
| 3296 | return _mm_rcp_ps(x); | ||
| 3297 | #elif defined __ARM_NEON__ | ||
| 3298 | simd_float4 r = vrecpeq_f32(x); | ||
| 3299 | return r * vrecpsq_f32(x, r); | ||
| 3300 | #else | ||
| 3301 | return simd_precise_recip(x); | ||
| 3302 | #endif | ||
| 3303 | } | ||
| 3304 | |||
| 3305 | static inline SIMD_CFUNC simd_float8 simd_fast_recip(simd_float8 x) { | ||
| 3306 | #if defined __AVX512VL__ | ||
| 3307 | return _mm256_rcp14_ps(x); | ||
| 3308 | #elif defined __AVX__ | ||
| 3309 | return _mm256_rcp_ps(x); | ||
| 3310 | #else | ||
| 3311 | return simd_make_float8(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3312 | #endif | ||
| 3313 | } | ||
| 3314 | |||
| 3315 | static inline SIMD_CFUNC simd_float16 simd_fast_recip(simd_float16 x) { | ||
| 3316 | #if defined __AVX512F__ | ||
| 3317 | return _mm512_rcp14_ps(x); | ||
| 3318 | #else | ||
| 3319 | return simd_make_float16(simd_fast_recip(x.lo), simd_fast_recip(x.hi)); | ||
| 3320 | #endif | ||
| 3321 | } | ||
| 3322 | |||
| 3323 | static inline SIMD_CFUNC double simd_fast_recip(double x) { | ||
| 3324 | return simd_precise_recip(x); | ||
| 3325 | } | ||
| 3326 | |||
| 3327 | static inline SIMD_CFUNC simd_double2 simd_fast_recip(simd_double2 x) { | ||
| 3328 | return simd_precise_recip(x); | ||
| 3329 | } | ||
| 3330 | |||
| 3331 | static inline SIMD_CFUNC simd_double3 simd_fast_recip(simd_double3 x) { | ||
| 3332 | return simd_precise_recip(x); | ||
| 3333 | } | ||
| 3334 | |||
| 3335 | static inline SIMD_CFUNC simd_double4 simd_fast_recip(simd_double4 x) { | ||
| 3336 | return simd_precise_recip(x); | ||
| 3337 | } | ||
| 3338 | |||
| 3339 | static inline SIMD_CFUNC simd_double8 simd_fast_recip(simd_double8 x) { | ||
| 3340 | return simd_precise_recip(x); | ||
| 3341 | } | ||
| 3342 | |||
| 3343 | static inline SIMD_CFUNC float simd_precise_recip(float x) { | ||
| 3344 | #if defined __SSE__ | ||
| 3345 | float r = simd_fast_recip(x); | ||
| 3346 | return r*(2 - (x == 0 ? -INFINITY : x)*r); | ||
| 3347 | #elif defined __ARM_NEON__ | ||
| 3348 | return simd_precise_recip(simd_make_float2_undef(x)).x; | ||
| 3349 | #else | ||
| 3350 | return 1/x; | ||
| 3351 | #endif | ||
| 3352 | } | ||
| 3353 | |||
| 3354 | static inline SIMD_CFUNC simd_float2 simd_precise_recip(simd_float2 x) { | ||
| 3355 | #if defined __SSE__ | ||
| 3356 | return simd_make_float2(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3357 | #elif defined __ARM_NEON__ | ||
| 3358 | simd_float2 r = simd_fast_recip(x); | ||
| 3359 | return r*vrecps_f32(x, r); | ||
| 3360 | #else | ||
| 3361 | return 1/x; | ||
| 3362 | #endif | ||
| 3363 | } | ||
| 3364 | |||
| 3365 | static inline SIMD_CFUNC simd_float3 simd_precise_recip(simd_float3 x) { | ||
| 3366 | return simd_make_float3(simd_precise_recip(simd_make_float4_undef(x))); | ||
| 3367 | } | ||
| 3368 | |||
| 3369 | static inline SIMD_CFUNC simd_float4 simd_precise_recip(simd_float4 x) { | ||
| 3370 | #if defined __SSE__ | ||
| 3371 | simd_float4 r = simd_fast_recip(x); | ||
| 3372 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3373 | #elif defined __ARM_NEON__ | ||
| 3374 | simd_float4 r = simd_fast_recip(x); | ||
| 3375 | return r*vrecpsq_f32(x, r); | ||
| 3376 | #else | ||
| 3377 | return 1/x; | ||
| 3378 | #endif | ||
| 3379 | } | ||
| 3380 | |||
| 3381 | static inline SIMD_CFUNC simd_float8 simd_precise_recip(simd_float8 x) { | ||
| 3382 | #if defined __AVX__ | ||
| 3383 | simd_float8 r = simd_fast_recip(x); | ||
| 3384 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3385 | #else | ||
| 3386 | return simd_make_float8(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3387 | #endif | ||
| 3388 | } | ||
| 3389 | |||
| 3390 | static inline SIMD_CFUNC simd_float16 simd_precise_recip(simd_float16 x) { | ||
| 3391 | #if defined __AVX512F__ | ||
| 3392 | simd_float16 r = simd_fast_recip(x); | ||
| 3393 | return r*(2 - simd_bitselect(x, -INFINITY, x == 0)*r); | ||
| 3394 | #else | ||
| 3395 | return simd_make_float16(simd_precise_recip(x.lo), simd_precise_recip(x.hi)); | ||
| 3396 | #endif | ||
| 3397 | } | ||
| 3398 | |||
| 3399 | static inline SIMD_CFUNC double simd_precise_recip(double x) { | ||
| 3400 | return 1/x; | ||
| 3401 | } | ||
| 3402 | |||
| 3403 | static inline SIMD_CFUNC simd_double2 simd_precise_recip(simd_double2 x) { | ||
| 3404 | return 1/x; | ||
| 3405 | } | ||
| 3406 | |||
| 3407 | static inline SIMD_CFUNC simd_double3 simd_precise_recip(simd_double3 x) { | ||
| 3408 | return 1/x; | ||
| 3409 | } | ||
| 3410 | |||
| 3411 | static inline SIMD_CFUNC simd_double4 simd_precise_recip(simd_double4 x) { | ||
| 3412 | return 1/x; | ||
| 3413 | } | ||
| 3414 | |||
| 3415 | static inline SIMD_CFUNC simd_double8 simd_precise_recip(simd_double8 x) { | ||
| 3416 | return 1/x; | ||
| 3417 | } | ||
| 3418 | |||
| 3419 | static inline SIMD_CFUNC float simd_rsqrt(float x) { | ||
| 3420 | #if __FAST_MATH__ | ||
| 3421 | return simd_fast_rsqrt(x); | ||
| 3422 | #else | ||
| 3423 | return simd_precise_rsqrt(x); | ||
| 3424 | #endif | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | static inline SIMD_CFUNC simd_float2 simd_rsqrt(simd_float2 x) { | ||
| 3428 | #if __FAST_MATH__ | ||
| 3429 | return simd_fast_rsqrt(x); | ||
| 3430 | #else | ||
| 3431 | return simd_precise_rsqrt(x); | ||
| 3432 | #endif | ||
| 3433 | } | ||
| 3434 | |||
| 3435 | static inline SIMD_CFUNC simd_float3 simd_rsqrt(simd_float3 x) { | ||
| 3436 | #if __FAST_MATH__ | ||
| 3437 | return simd_fast_rsqrt(x); | ||
| 3438 | #else | ||
| 3439 | return simd_precise_rsqrt(x); | ||
| 3440 | #endif | ||
| 3441 | } | ||
| 3442 | |||
| 3443 | static inline SIMD_CFUNC simd_float4 simd_rsqrt(simd_float4 x) { | ||
| 3444 | #if __FAST_MATH__ | ||
| 3445 | return simd_fast_rsqrt(x); | ||
| 3446 | #else | ||
| 3447 | return simd_precise_rsqrt(x); | ||
| 3448 | #endif | ||
| 3449 | } | ||
| 3450 | |||
| 3451 | static inline SIMD_CFUNC simd_float8 simd_rsqrt(simd_float8 x) { | ||
| 3452 | #if __FAST_MATH__ | ||
| 3453 | return simd_fast_rsqrt(x); | ||
| 3454 | #else | ||
| 3455 | return simd_precise_rsqrt(x); | ||
| 3456 | #endif | ||
| 3457 | } | ||
| 3458 | |||
| 3459 | static inline SIMD_CFUNC simd_float16 simd_rsqrt(simd_float16 x) { | ||
| 3460 | #if __FAST_MATH__ | ||
| 3461 | return simd_fast_rsqrt(x); | ||
| 3462 | #else | ||
| 3463 | return simd_precise_rsqrt(x); | ||
| 3464 | #endif | ||
| 3465 | } | ||
| 3466 | |||
| 3467 | static inline SIMD_CFUNC double simd_rsqrt(double x) { | ||
| 3468 | #if __FAST_MATH__ | ||
| 3469 | return simd_fast_rsqrt(x); | ||
| 3470 | #else | ||
| 3471 | return simd_precise_rsqrt(x); | ||
| 3472 | #endif | ||
| 3473 | } | ||
| 3474 | |||
| 3475 | static inline SIMD_CFUNC simd_double2 simd_rsqrt(simd_double2 x) { | ||
| 3476 | #if __FAST_MATH__ | ||
| 3477 | return simd_fast_rsqrt(x); | ||
| 3478 | #else | ||
| 3479 | return simd_precise_rsqrt(x); | ||
| 3480 | #endif | ||
| 3481 | } | ||
| 3482 | |||
| 3483 | static inline SIMD_CFUNC simd_double3 simd_rsqrt(simd_double3 x) { | ||
| 3484 | #if __FAST_MATH__ | ||
| 3485 | return simd_fast_rsqrt(x); | ||
| 3486 | #else | ||
| 3487 | return simd_precise_rsqrt(x); | ||
| 3488 | #endif | ||
| 3489 | } | ||
| 3490 | |||
| 3491 | static inline SIMD_CFUNC simd_double4 simd_rsqrt(simd_double4 x) { | ||
| 3492 | #if __FAST_MATH__ | ||
| 3493 | return simd_fast_rsqrt(x); | ||
| 3494 | #else | ||
| 3495 | return simd_precise_rsqrt(x); | ||
| 3496 | #endif | ||
| 3497 | } | ||
| 3498 | |||
| 3499 | static inline SIMD_CFUNC simd_double8 simd_rsqrt(simd_double8 x) { | ||
| 3500 | #if __FAST_MATH__ | ||
| 3501 | return simd_fast_rsqrt(x); | ||
| 3502 | #else | ||
| 3503 | return simd_precise_rsqrt(x); | ||
| 3504 | #endif | ||
| 3505 | } | ||
| 3506 | |||
| 3507 | static inline SIMD_CFUNC float simd_fast_rsqrt(float x) { | ||
| 3508 | #if defined __AVX512VL__ | ||
| 3509 | simd_float4 x4 = simd_make_float4(x); | ||
| 3510 | return ((simd_float4)_mm_rsqrt14_ss(x4, x4)).x; | ||
| 3511 | #elif defined __SSE__ | ||
| 3512 | return ((simd_float4)_mm_rsqrt_ss(simd_make_float4(x))).x; | ||
| 3513 | #elif defined __ARM_NEON__ | ||
| 3514 | return simd_fast_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3515 | #else | ||
| 3516 | return simd_precise_rsqrt(x); | ||
| 3517 | #endif | ||
| 3518 | } | ||
| 3519 | |||
| 3520 | static inline SIMD_CFUNC simd_float2 simd_fast_rsqrt(simd_float2 x) { | ||
| 3521 | #if defined __SSE__ | ||
| 3522 | return simd_make_float2(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3523 | #elif defined __ARM_NEON__ | ||
| 3524 | simd_float2 r = vrsqrte_f32(x); | ||
| 3525 | return r * vrsqrts_f32(x, r*r); | ||
| 3526 | #else | ||
| 3527 | return simd_precise_rsqrt(x); | ||
| 3528 | #endif | ||
| 3529 | } | ||
| 3530 | |||
| 3531 | static inline SIMD_CFUNC simd_float3 simd_fast_rsqrt(simd_float3 x) { | ||
| 3532 | return simd_make_float3(simd_fast_rsqrt(simd_make_float4_undef(x))); | ||
| 3533 | } | ||
| 3534 | |||
| 3535 | static inline SIMD_CFUNC simd_float4 simd_fast_rsqrt(simd_float4 x) { | ||
| 3536 | #if defined __AVX512VL__ | ||
| 3537 | return _mm_rsqrt14_ps(x); | ||
| 3538 | #elif defined __SSE__ | ||
| 3539 | return _mm_rsqrt_ps(x); | ||
| 3540 | #elif defined __ARM_NEON__ | ||
| 3541 | simd_float4 r = vrsqrteq_f32(x); | ||
| 3542 | return r * vrsqrtsq_f32(x, r*r); | ||
| 3543 | #else | ||
| 3544 | return simd_precise_rsqrt(x); | ||
| 3545 | #endif | ||
| 3546 | } | ||
| 3547 | |||
| 3548 | static inline SIMD_CFUNC simd_float8 simd_fast_rsqrt(simd_float8 x) { | ||
| 3549 | #if defined __AVX512VL__ | ||
| 3550 | return _mm256_rsqrt14_ps(x); | ||
| 3551 | #elif defined __AVX__ | ||
| 3552 | return _mm256_rsqrt_ps(x); | ||
| 3553 | #else | ||
| 3554 | return simd_make_float8(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3555 | #endif | ||
| 3556 | } | ||
| 3557 | |||
| 3558 | static inline SIMD_CFUNC simd_float16 simd_fast_rsqrt(simd_float16 x) { | ||
| 3559 | #if defined __AVX512F__ | ||
| 3560 | return _mm512_rsqrt14_ps(x); | ||
| 3561 | #else | ||
| 3562 | return simd_make_float16(simd_fast_rsqrt(x.lo), simd_fast_rsqrt(x.hi)); | ||
| 3563 | #endif | ||
| 3564 | } | ||
| 3565 | |||
| 3566 | static inline SIMD_CFUNC double simd_fast_rsqrt(double x) { | ||
| 3567 | return simd_precise_rsqrt(x); | ||
| 3568 | } | ||
| 3569 | |||
| 3570 | static inline SIMD_CFUNC simd_double2 simd_fast_rsqrt(simd_double2 x) { | ||
| 3571 | return simd_precise_rsqrt(x); | ||
| 3572 | } | ||
| 3573 | |||
| 3574 | static inline SIMD_CFUNC simd_double3 simd_fast_rsqrt(simd_double3 x) { | ||
| 3575 | return simd_precise_rsqrt(x); | ||
| 3576 | } | ||
| 3577 | |||
| 3578 | static inline SIMD_CFUNC simd_double4 simd_fast_rsqrt(simd_double4 x) { | ||
| 3579 | return simd_precise_rsqrt(x); | ||
| 3580 | } | ||
| 3581 | |||
| 3582 | static inline SIMD_CFUNC simd_double8 simd_fast_rsqrt(simd_double8 x) { | ||
| 3583 | return simd_precise_rsqrt(x); | ||
| 3584 | } | ||
| 3585 | |||
| 3586 | static inline SIMD_CFUNC float simd_precise_rsqrt(float x) { | ||
| 3587 | #if defined __SSE__ | ||
| 3588 | float r = simd_fast_rsqrt(x); | ||
| 3589 | return r*(1.5f - 0.5f*(r == INFINITY ? -INFINITY : x)*r*r); | ||
| 3590 | #elif defined __ARM_NEON__ | ||
| 3591 | return simd_precise_rsqrt(simd_make_float2_undef(x)).x; | ||
| 3592 | #else | ||
| 3593 | return 1/sqrt(x); | ||
| 3594 | #endif | ||
| 3595 | } | ||
| 3596 | |||
| 3597 | static inline SIMD_CFUNC simd_float2 simd_precise_rsqrt(simd_float2 x) { | ||
| 3598 | #if defined __SSE__ | ||
| 3599 | return simd_make_float2(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3600 | #elif defined __ARM_NEON__ | ||
| 3601 | simd_float2 r = simd_fast_rsqrt(x); | ||
| 3602 | return r*vrsqrts_f32(x, r*r); | ||
| 3603 | #else | ||
| 3604 | return 1/__tg_sqrt(x); | ||
| 3605 | #endif | ||
| 3606 | } | ||
| 3607 | |||
| 3608 | static inline SIMD_CFUNC simd_float3 simd_precise_rsqrt(simd_float3 x) { | ||
| 3609 | return simd_make_float3(simd_precise_rsqrt(simd_make_float4_undef(x))); | ||
| 3610 | } | ||
| 3611 | |||
| 3612 | static inline SIMD_CFUNC simd_float4 simd_precise_rsqrt(simd_float4 x) { | ||
| 3613 | #if defined __SSE__ | ||
| 3614 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3615 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3616 | #elif defined __ARM_NEON__ | ||
| 3617 | simd_float4 r = simd_fast_rsqrt(x); | ||
| 3618 | return r*vrsqrtsq_f32(x, r*r); | ||
| 3619 | #else | ||
| 3620 | return 1/__tg_sqrt(x); | ||
| 3621 | #endif | ||
| 3622 | } | ||
| 3623 | |||
| 3624 | static inline SIMD_CFUNC simd_float8 simd_precise_rsqrt(simd_float8 x) { | ||
| 3625 | #if defined __AVX__ | ||
| 3626 | simd_float8 r = simd_fast_rsqrt(x); | ||
| 3627 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3628 | #else | ||
| 3629 | return simd_make_float8(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3630 | #endif | ||
| 3631 | } | ||
| 3632 | |||
| 3633 | static inline SIMD_CFUNC simd_float16 simd_precise_rsqrt(simd_float16 x) { | ||
| 3634 | #if defined __AVX512F__ | ||
| 3635 | simd_float16 r = simd_fast_rsqrt(x); | ||
| 3636 | return r*(1.5 - 0.5*simd_bitselect(x, -INFINITY, r == INFINITY)*r*r); | ||
| 3637 | #else | ||
| 3638 | return simd_make_float16(simd_precise_rsqrt(x.lo), simd_precise_rsqrt(x.hi)); | ||
| 3639 | #endif | ||
| 3640 | } | ||
| 3641 | |||
| 3642 | static inline SIMD_CFUNC double simd_precise_rsqrt(double x) { | ||
| 3643 | return 1/sqrt(x); | ||
| 3644 | } | ||
| 3645 | |||
| 3646 | static inline SIMD_CFUNC simd_double2 simd_precise_rsqrt(simd_double2 x) { | ||
| 3647 | return 1/__tg_sqrt(x); | ||
| 3648 | } | ||
| 3649 | |||
| 3650 | static inline SIMD_CFUNC simd_double3 simd_precise_rsqrt(simd_double3 x) { | ||
| 3651 | return 1/__tg_sqrt(x); | ||
| 3652 | } | ||
| 3653 | |||
| 3654 | static inline SIMD_CFUNC simd_double4 simd_precise_rsqrt(simd_double4 x) { | ||
| 3655 | return 1/__tg_sqrt(x); | ||
| 3656 | } | ||
| 3657 | |||
| 3658 | static inline SIMD_CFUNC simd_double8 simd_precise_rsqrt(simd_double8 x) { | ||
| 3659 | return 1/__tg_sqrt(x); | ||
| 3660 | } | ||
| 3661 | |||
| 3662 | static inline SIMD_CFUNC float simd_fract(float x) { | ||
| 3663 | return fmin(x - floor(x), 0x1.fffffep-1f); | ||
| 3664 | } | ||
| 3665 | |||
| 3666 | static inline SIMD_CFUNC simd_float2 simd_fract(simd_float2 x) { | ||
| 3667 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3668 | } | ||
| 3669 | |||
| 3670 | static inline SIMD_CFUNC simd_float3 simd_fract(simd_float3 x) { | ||
| 3671 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3672 | } | ||
| 3673 | |||
| 3674 | static inline SIMD_CFUNC simd_float4 simd_fract(simd_float4 x) { | ||
| 3675 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3676 | } | ||
| 3677 | |||
| 3678 | static inline SIMD_CFUNC simd_float8 simd_fract(simd_float8 x) { | ||
| 3679 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3680 | } | ||
| 3681 | |||
| 3682 | static inline SIMD_CFUNC simd_float16 simd_fract(simd_float16 x) { | ||
| 3683 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffep-1f); | ||
| 3684 | } | ||
| 3685 | |||
| 3686 | static inline SIMD_CFUNC double simd_fract(double x) { | ||
| 3687 | return fmin(x - floor(x), 0x1.fffffffffffffp-1); | ||
| 3688 | } | ||
| 3689 | |||
| 3690 | static inline SIMD_CFUNC simd_double2 simd_fract(simd_double2 x) { | ||
| 3691 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3692 | } | ||
| 3693 | |||
| 3694 | static inline SIMD_CFUNC simd_double3 simd_fract(simd_double3 x) { | ||
| 3695 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3696 | } | ||
| 3697 | |||
| 3698 | static inline SIMD_CFUNC simd_double4 simd_fract(simd_double4 x) { | ||
| 3699 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3700 | } | ||
| 3701 | |||
| 3702 | static inline SIMD_CFUNC simd_double8 simd_fract(simd_double8 x) { | ||
| 3703 | return __tg_fmin(x - __tg_floor(x), 0x1.fffffffffffffp-1); | ||
| 3704 | } | ||
| 3705 | |||
| 3706 | static inline SIMD_CFUNC float simd_step(float edge, float x) { | ||
| 3707 | return !(x < edge); | ||
| 3708 | } | ||
| 3709 | |||
| 3710 | static inline SIMD_CFUNC simd_float2 simd_step(simd_float2 edge, simd_float2 x) { | ||
| 3711 | return simd_bitselect((simd_float2)1, 0, x < edge); | ||
| 3712 | } | ||
| 3713 | |||
| 3714 | static inline SIMD_CFUNC simd_float3 simd_step(simd_float3 edge, simd_float3 x) { | ||
| 3715 | return simd_bitselect((simd_float3)1, 0, x < edge); | ||
| 3716 | } | ||
| 3717 | |||
| 3718 | static inline SIMD_CFUNC simd_float4 simd_step(simd_float4 edge, simd_float4 x) { | ||
| 3719 | return simd_bitselect((simd_float4)1, 0, x < edge); | ||
| 3720 | } | ||
| 3721 | |||
| 3722 | static inline SIMD_CFUNC simd_float8 simd_step(simd_float8 edge, simd_float8 x) { | ||
| 3723 | return simd_bitselect((simd_float8)1, 0, x < edge); | ||
| 3724 | } | ||
| 3725 | |||
| 3726 | static inline SIMD_CFUNC simd_float16 simd_step(simd_float16 edge, simd_float16 x) { | ||
| 3727 | return simd_bitselect((simd_float16)1, 0, x < edge); | ||
| 3728 | } | ||
| 3729 | |||
| 3730 | static inline SIMD_CFUNC double simd_step(double edge, double x) { | ||
| 3731 | return !(x < edge); | ||
| 3732 | } | ||
| 3733 | |||
| 3734 | static inline SIMD_CFUNC simd_double2 simd_step(simd_double2 edge, simd_double2 x) { | ||
| 3735 | return simd_bitselect((simd_double2)1, 0, x < edge); | ||
| 3736 | } | ||
| 3737 | |||
| 3738 | static inline SIMD_CFUNC simd_double3 simd_step(simd_double3 edge, simd_double3 x) { | ||
| 3739 | return simd_bitselect((simd_double3)1, 0, x < edge); | ||
| 3740 | } | ||
| 3741 | |||
| 3742 | static inline SIMD_CFUNC simd_double4 simd_step(simd_double4 edge, simd_double4 x) { | ||
| 3743 | return simd_bitselect((simd_double4)1, 0, x < edge); | ||
| 3744 | } | ||
| 3745 | |||
| 3746 | static inline SIMD_CFUNC simd_double8 simd_step(simd_double8 edge, simd_double8 x) { | ||
| 3747 | return simd_bitselect((simd_double8)1, 0, x < edge); | ||
| 3748 | } | ||
| 3749 | |||
| 3750 | static inline SIMD_CFUNC float simd_smoothstep(float edge0, float edge1, float x) { | ||
| 3751 | float t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3752 | return t*t*(3 - 2*t); | ||
| 3753 | } | ||
| 3754 | |||
| 3755 | static inline SIMD_CFUNC simd_float2 simd_smoothstep(simd_float2 edge0, simd_float2 edge1, simd_float2 x) { | ||
| 3756 | simd_float2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3757 | return t*t*(3 - 2*t); | ||
| 3758 | } | ||
| 3759 | |||
| 3760 | static inline SIMD_CFUNC simd_float3 simd_smoothstep(simd_float3 edge0, simd_float3 edge1, simd_float3 x) { | ||
| 3761 | simd_float3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3762 | return t*t*(3 - 2*t); | ||
| 3763 | } | ||
| 3764 | |||
| 3765 | static inline SIMD_CFUNC simd_float4 simd_smoothstep(simd_float4 edge0, simd_float4 edge1, simd_float4 x) { | ||
| 3766 | simd_float4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3767 | return t*t*(3 - 2*t); | ||
| 3768 | } | ||
| 3769 | |||
| 3770 | static inline SIMD_CFUNC simd_float8 simd_smoothstep(simd_float8 edge0, simd_float8 edge1, simd_float8 x) { | ||
| 3771 | simd_float8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3772 | return t*t*(3 - 2*t); | ||
| 3773 | } | ||
| 3774 | |||
| 3775 | static inline SIMD_CFUNC simd_float16 simd_smoothstep(simd_float16 edge0, simd_float16 edge1, simd_float16 x) { | ||
| 3776 | simd_float16 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3777 | return t*t*(3 - 2*t); | ||
| 3778 | } | ||
| 3779 | |||
| 3780 | static inline SIMD_CFUNC double simd_smoothstep(double edge0, double edge1, double x) { | ||
| 3781 | double t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3782 | return t*t*(3 - 2*t); | ||
| 3783 | } | ||
| 3784 | |||
| 3785 | static inline SIMD_CFUNC simd_double2 simd_smoothstep(simd_double2 edge0, simd_double2 edge1, simd_double2 x) { | ||
| 3786 | simd_double2 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3787 | return t*t*(3 - 2*t); | ||
| 3788 | } | ||
| 3789 | |||
| 3790 | static inline SIMD_CFUNC simd_double3 simd_smoothstep(simd_double3 edge0, simd_double3 edge1, simd_double3 x) { | ||
| 3791 | simd_double3 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3792 | return t*t*(3 - 2*t); | ||
| 3793 | } | ||
| 3794 | |||
| 3795 | static inline SIMD_CFUNC simd_double4 simd_smoothstep(simd_double4 edge0, simd_double4 edge1, simd_double4 x) { | ||
| 3796 | simd_double4 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3797 | return t*t*(3 - 2*t); | ||
| 3798 | } | ||
| 3799 | |||
| 3800 | static inline SIMD_CFUNC simd_double8 simd_smoothstep(simd_double8 edge0, simd_double8 edge1, simd_double8 x) { | ||
| 3801 | simd_double8 t = simd_clamp((x - edge0)/(edge1 - edge0), 0, 1); | ||
| 3802 | return t*t*(3 - 2*t); | ||
| 3803 | } | ||
| 3804 | |||
| 3805 | static inline SIMD_CFUNC char simd_reduce_add(simd_char2 x) { | ||
| 3806 | return x.x + x.y; | ||
| 3807 | } | ||
| 3808 | |||
| 3809 | static inline SIMD_CFUNC char simd_reduce_add(simd_char3 x) { | ||
| 3810 | return x.x + x.y + x.z; | ||
| 3811 | } | ||
| 3812 | |||
| 3813 | static inline SIMD_CFUNC char simd_reduce_add(simd_char4 x) { | ||
| 3814 | return simd_reduce_add(x.lo + x.hi); | ||
| 3815 | } | ||
| 3816 | |||
| 3817 | static inline SIMD_CFUNC char simd_reduce_add(simd_char8 x) { | ||
| 3818 | return simd_reduce_add(x.lo + x.hi); | ||
| 3819 | } | ||
| 3820 | |||
| 3821 | static inline SIMD_CFUNC char simd_reduce_add(simd_char16 x) { | ||
| 3822 | return simd_reduce_add(x.lo + x.hi); | ||
| 3823 | } | ||
| 3824 | |||
| 3825 | static inline SIMD_CFUNC char simd_reduce_add(simd_char32 x) { | ||
| 3826 | return simd_reduce_add(x.lo + x.hi); | ||
| 3827 | } | ||
| 3828 | |||
| 3829 | static inline SIMD_CFUNC char simd_reduce_add(simd_char64 x) { | ||
| 3830 | return simd_reduce_add(x.lo + x.hi); | ||
| 3831 | } | ||
| 3832 | |||
| 3833 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar2 x) { | ||
| 3834 | return x.x + x.y; | ||
| 3835 | } | ||
| 3836 | |||
| 3837 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar3 x) { | ||
| 3838 | return x.x + x.y + x.z; | ||
| 3839 | } | ||
| 3840 | |||
| 3841 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar4 x) { | ||
| 3842 | return simd_reduce_add(x.lo + x.hi); | ||
| 3843 | } | ||
| 3844 | |||
| 3845 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar8 x) { | ||
| 3846 | return simd_reduce_add(x.lo + x.hi); | ||
| 3847 | } | ||
| 3848 | |||
| 3849 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar16 x) { | ||
| 3850 | return simd_reduce_add(x.lo + x.hi); | ||
| 3851 | } | ||
| 3852 | |||
| 3853 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar32 x) { | ||
| 3854 | return simd_reduce_add(x.lo + x.hi); | ||
| 3855 | } | ||
| 3856 | |||
| 3857 | static inline SIMD_CFUNC unsigned char simd_reduce_add(simd_uchar64 x) { | ||
| 3858 | return simd_reduce_add(x.lo + x.hi); | ||
| 3859 | } | ||
| 3860 | |||
| 3861 | static inline SIMD_CFUNC short simd_reduce_add(simd_short2 x) { | ||
| 3862 | return x.x + x.y; | ||
| 3863 | } | ||
| 3864 | |||
| 3865 | static inline SIMD_CFUNC short simd_reduce_add(simd_short3 x) { | ||
| 3866 | return x.x + x.y + x.z; | ||
| 3867 | } | ||
| 3868 | |||
| 3869 | static inline SIMD_CFUNC short simd_reduce_add(simd_short4 x) { | ||
| 3870 | return simd_reduce_add(x.lo + x.hi); | ||
| 3871 | } | ||
| 3872 | |||
| 3873 | static inline SIMD_CFUNC short simd_reduce_add(simd_short8 x) { | ||
| 3874 | return simd_reduce_add(x.lo + x.hi); | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | static inline SIMD_CFUNC short simd_reduce_add(simd_short16 x) { | ||
| 3878 | return simd_reduce_add(x.lo + x.hi); | ||
| 3879 | } | ||
| 3880 | |||
| 3881 | static inline SIMD_CFUNC short simd_reduce_add(simd_short32 x) { | ||
| 3882 | return simd_reduce_add(x.lo + x.hi); | ||
| 3883 | } | ||
| 3884 | |||
| 3885 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort2 x) { | ||
| 3886 | return x.x + x.y; | ||
| 3887 | } | ||
| 3888 | |||
| 3889 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort3 x) { | ||
| 3890 | return x.x + x.y + x.z; | ||
| 3891 | } | ||
| 3892 | |||
| 3893 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort4 x) { | ||
| 3894 | return simd_reduce_add(x.lo + x.hi); | ||
| 3895 | } | ||
| 3896 | |||
| 3897 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort8 x) { | ||
| 3898 | return simd_reduce_add(x.lo + x.hi); | ||
| 3899 | } | ||
| 3900 | |||
| 3901 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort16 x) { | ||
| 3902 | return simd_reduce_add(x.lo + x.hi); | ||
| 3903 | } | ||
| 3904 | |||
| 3905 | static inline SIMD_CFUNC unsigned short simd_reduce_add(simd_ushort32 x) { | ||
| 3906 | return simd_reduce_add(x.lo + x.hi); | ||
| 3907 | } | ||
| 3908 | |||
| 3909 | static inline SIMD_CFUNC int simd_reduce_add(simd_int2 x) { | ||
| 3910 | return x.x + x.y; | ||
| 3911 | } | ||
| 3912 | |||
| 3913 | static inline SIMD_CFUNC int simd_reduce_add(simd_int3 x) { | ||
| 3914 | return x.x + x.y + x.z; | ||
| 3915 | } | ||
| 3916 | |||
| 3917 | static inline SIMD_CFUNC int simd_reduce_add(simd_int4 x) { | ||
| 3918 | return simd_reduce_add(x.lo + x.hi); | ||
| 3919 | } | ||
| 3920 | |||
| 3921 | static inline SIMD_CFUNC int simd_reduce_add(simd_int8 x) { | ||
| 3922 | return simd_reduce_add(x.lo + x.hi); | ||
| 3923 | } | ||
| 3924 | |||
| 3925 | static inline SIMD_CFUNC int simd_reduce_add(simd_int16 x) { | ||
| 3926 | return simd_reduce_add(x.lo + x.hi); | ||
| 3927 | } | ||
| 3928 | |||
| 3929 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint2 x) { | ||
| 3930 | return x.x + x.y; | ||
| 3931 | } | ||
| 3932 | |||
| 3933 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint3 x) { | ||
| 3934 | return x.x + x.y + x.z; | ||
| 3935 | } | ||
| 3936 | |||
| 3937 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint4 x) { | ||
| 3938 | return simd_reduce_add(x.lo + x.hi); | ||
| 3939 | } | ||
| 3940 | |||
| 3941 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint8 x) { | ||
| 3942 | return simd_reduce_add(x.lo + x.hi); | ||
| 3943 | } | ||
| 3944 | |||
| 3945 | static inline SIMD_CFUNC unsigned int simd_reduce_add(simd_uint16 x) { | ||
| 3946 | return simd_reduce_add(x.lo + x.hi); | ||
| 3947 | } | ||
| 3948 | |||
| 3949 | static inline SIMD_CFUNC float simd_reduce_add(simd_float2 x) { | ||
| 3950 | return x.x + x.y; | ||
| 3951 | } | ||
| 3952 | |||
| 3953 | static inline SIMD_CFUNC float simd_reduce_add(simd_float3 x) { | ||
| 3954 | return x.x + x.y + x.z; | ||
| 3955 | } | ||
| 3956 | |||
| 3957 | static inline SIMD_CFUNC float simd_reduce_add(simd_float4 x) { | ||
| 3958 | return simd_reduce_add(x.lo + x.hi); | ||
| 3959 | } | ||
| 3960 | |||
| 3961 | static inline SIMD_CFUNC float simd_reduce_add(simd_float8 x) { | ||
| 3962 | return simd_reduce_add(x.lo + x.hi); | ||
| 3963 | } | ||
| 3964 | |||
| 3965 | static inline SIMD_CFUNC float simd_reduce_add(simd_float16 x) { | ||
| 3966 | return simd_reduce_add(x.lo + x.hi); | ||
| 3967 | } | ||
| 3968 | |||
| 3969 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long2 x) { | ||
| 3970 | return x.x + x.y; | ||
| 3971 | } | ||
| 3972 | |||
| 3973 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long3 x) { | ||
| 3974 | return x.x + x.y + x.z; | ||
| 3975 | } | ||
| 3976 | |||
| 3977 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long4 x) { | ||
| 3978 | return simd_reduce_add(x.lo + x.hi); | ||
| 3979 | } | ||
| 3980 | |||
| 3981 | static inline SIMD_CFUNC simd_long1 simd_reduce_add(simd_long8 x) { | ||
| 3982 | return simd_reduce_add(x.lo + x.hi); | ||
| 3983 | } | ||
| 3984 | |||
| 3985 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong2 x) { | ||
| 3986 | return x.x + x.y; | ||
| 3987 | } | ||
| 3988 | |||
| 3989 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong3 x) { | ||
| 3990 | return x.x + x.y + x.z; | ||
| 3991 | } | ||
| 3992 | |||
| 3993 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong4 x) { | ||
| 3994 | return simd_reduce_add(x.lo + x.hi); | ||
| 3995 | } | ||
| 3996 | |||
| 3997 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_add(simd_ulong8 x) { | ||
| 3998 | return simd_reduce_add(x.lo + x.hi); | ||
| 3999 | } | ||
| 4000 | |||
| 4001 | static inline SIMD_CFUNC double simd_reduce_add(simd_double2 x) { | ||
| 4002 | return x.x + x.y; | ||
| 4003 | } | ||
| 4004 | |||
| 4005 | static inline SIMD_CFUNC double simd_reduce_add(simd_double3 x) { | ||
| 4006 | return x.x + x.y + x.z; | ||
| 4007 | } | ||
| 4008 | |||
| 4009 | static inline SIMD_CFUNC double simd_reduce_add(simd_double4 x) { | ||
| 4010 | return simd_reduce_add(x.lo + x.hi); | ||
| 4011 | } | ||
| 4012 | |||
| 4013 | static inline SIMD_CFUNC double simd_reduce_add(simd_double8 x) { | ||
| 4014 | return simd_reduce_add(x.lo + x.hi); | ||
| 4015 | } | ||
| 4016 | |||
| 4017 | static inline SIMD_CFUNC char simd_reduce_min(simd_char2 x) { | ||
| 4018 | return x.y < x.x ? x.y : x.x; | ||
| 4019 | } | ||
| 4020 | |||
| 4021 | static inline SIMD_CFUNC char simd_reduce_min(simd_char3 x) { | ||
| 4022 | char t = x.z < x.x ? x.z : x.x; | ||
| 4023 | return x.y < t ? x.y : t; | ||
| 4024 | } | ||
| 4025 | |||
| 4026 | static inline SIMD_CFUNC char simd_reduce_min(simd_char4 x) { | ||
| 4027 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4028 | } | ||
| 4029 | |||
| 4030 | static inline SIMD_CFUNC char simd_reduce_min(simd_char8 x) { | ||
| 4031 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4032 | } | ||
| 4033 | |||
| 4034 | static inline SIMD_CFUNC char simd_reduce_min(simd_char16 x) { | ||
| 4035 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4036 | } | ||
| 4037 | |||
| 4038 | static inline SIMD_CFUNC char simd_reduce_min(simd_char32 x) { | ||
| 4039 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4040 | } | ||
| 4041 | |||
| 4042 | static inline SIMD_CFUNC char simd_reduce_min(simd_char64 x) { | ||
| 4043 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4044 | } | ||
| 4045 | |||
| 4046 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar2 x) { | ||
| 4047 | return x.y < x.x ? x.y : x.x; | ||
| 4048 | } | ||
| 4049 | |||
| 4050 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar3 x) { | ||
| 4051 | unsigned char t = x.z < x.x ? x.z : x.x; | ||
| 4052 | return x.y < t ? x.y : t; | ||
| 4053 | } | ||
| 4054 | |||
| 4055 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar4 x) { | ||
| 4056 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4057 | } | ||
| 4058 | |||
| 4059 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar8 x) { | ||
| 4060 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4061 | } | ||
| 4062 | |||
| 4063 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar16 x) { | ||
| 4064 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4065 | } | ||
| 4066 | |||
| 4067 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar32 x) { | ||
| 4068 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4069 | } | ||
| 4070 | |||
| 4071 | static inline SIMD_CFUNC unsigned char simd_reduce_min(simd_uchar64 x) { | ||
| 4072 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4073 | } | ||
| 4074 | |||
| 4075 | static inline SIMD_CFUNC short simd_reduce_min(simd_short2 x) { | ||
| 4076 | return x.y < x.x ? x.y : x.x; | ||
| 4077 | } | ||
| 4078 | |||
| 4079 | static inline SIMD_CFUNC short simd_reduce_min(simd_short3 x) { | ||
| 4080 | short t = x.z < x.x ? x.z : x.x; | ||
| 4081 | return x.y < t ? x.y : t; | ||
| 4082 | } | ||
| 4083 | |||
| 4084 | static inline SIMD_CFUNC short simd_reduce_min(simd_short4 x) { | ||
| 4085 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4086 | } | ||
| 4087 | |||
| 4088 | static inline SIMD_CFUNC short simd_reduce_min(simd_short8 x) { | ||
| 4089 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4090 | } | ||
| 4091 | |||
| 4092 | static inline SIMD_CFUNC short simd_reduce_min(simd_short16 x) { | ||
| 4093 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4094 | } | ||
| 4095 | |||
| 4096 | static inline SIMD_CFUNC short simd_reduce_min(simd_short32 x) { | ||
| 4097 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4098 | } | ||
| 4099 | |||
| 4100 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort2 x) { | ||
| 4101 | return x.y < x.x ? x.y : x.x; | ||
| 4102 | } | ||
| 4103 | |||
| 4104 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort3 x) { | ||
| 4105 | unsigned short t = x.z < x.x ? x.z : x.x; | ||
| 4106 | return x.y < t ? x.y : t; | ||
| 4107 | } | ||
| 4108 | |||
| 4109 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort4 x) { | ||
| 4110 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4111 | } | ||
| 4112 | |||
| 4113 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort8 x) { | ||
| 4114 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4115 | } | ||
| 4116 | |||
| 4117 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort16 x) { | ||
| 4118 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4119 | } | ||
| 4120 | |||
| 4121 | static inline SIMD_CFUNC unsigned short simd_reduce_min(simd_ushort32 x) { | ||
| 4122 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4123 | } | ||
| 4124 | |||
| 4125 | static inline SIMD_CFUNC int simd_reduce_min(simd_int2 x) { | ||
| 4126 | return x.y < x.x ? x.y : x.x; | ||
| 4127 | } | ||
| 4128 | |||
| 4129 | static inline SIMD_CFUNC int simd_reduce_min(simd_int3 x) { | ||
| 4130 | int t = x.z < x.x ? x.z : x.x; | ||
| 4131 | return x.y < t ? x.y : t; | ||
| 4132 | } | ||
| 4133 | |||
| 4134 | static inline SIMD_CFUNC int simd_reduce_min(simd_int4 x) { | ||
| 4135 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4136 | } | ||
| 4137 | |||
| 4138 | static inline SIMD_CFUNC int simd_reduce_min(simd_int8 x) { | ||
| 4139 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4140 | } | ||
| 4141 | |||
| 4142 | static inline SIMD_CFUNC int simd_reduce_min(simd_int16 x) { | ||
| 4143 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4144 | } | ||
| 4145 | |||
| 4146 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint2 x) { | ||
| 4147 | return x.y < x.x ? x.y : x.x; | ||
| 4148 | } | ||
| 4149 | |||
| 4150 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint3 x) { | ||
| 4151 | unsigned int t = x.z < x.x ? x.z : x.x; | ||
| 4152 | return x.y < t ? x.y : t; | ||
| 4153 | } | ||
| 4154 | |||
| 4155 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint4 x) { | ||
| 4156 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4157 | } | ||
| 4158 | |||
| 4159 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint8 x) { | ||
| 4160 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4161 | } | ||
| 4162 | |||
| 4163 | static inline SIMD_CFUNC unsigned int simd_reduce_min(simd_uint16 x) { | ||
| 4164 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4165 | } | ||
| 4166 | |||
| 4167 | static inline SIMD_CFUNC float simd_reduce_min(simd_float2 x) { | ||
| 4168 | return fmin(x.x, x.y); | ||
| 4169 | } | ||
| 4170 | |||
| 4171 | static inline SIMD_CFUNC float simd_reduce_min(simd_float3 x) { | ||
| 4172 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4173 | } | ||
| 4174 | |||
| 4175 | static inline SIMD_CFUNC float simd_reduce_min(simd_float4 x) { | ||
| 4176 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4177 | } | ||
| 4178 | |||
| 4179 | static inline SIMD_CFUNC float simd_reduce_min(simd_float8 x) { | ||
| 4180 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4181 | } | ||
| 4182 | |||
| 4183 | static inline SIMD_CFUNC float simd_reduce_min(simd_float16 x) { | ||
| 4184 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4185 | } | ||
| 4186 | |||
| 4187 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long2 x) { | ||
| 4188 | return x.y < x.x ? x.y : x.x; | ||
| 4189 | } | ||
| 4190 | |||
| 4191 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long3 x) { | ||
| 4192 | simd_long1 t = x.z < x.x ? x.z : x.x; | ||
| 4193 | return x.y < t ? x.y : t; | ||
| 4194 | } | ||
| 4195 | |||
| 4196 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long4 x) { | ||
| 4197 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4198 | } | ||
| 4199 | |||
| 4200 | static inline SIMD_CFUNC simd_long1 simd_reduce_min(simd_long8 x) { | ||
| 4201 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4202 | } | ||
| 4203 | |||
| 4204 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong2 x) { | ||
| 4205 | return x.y < x.x ? x.y : x.x; | ||
| 4206 | } | ||
| 4207 | |||
| 4208 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong3 x) { | ||
| 4209 | simd_ulong1 t = x.z < x.x ? x.z : x.x; | ||
| 4210 | return x.y < t ? x.y : t; | ||
| 4211 | } | ||
| 4212 | |||
| 4213 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong4 x) { | ||
| 4214 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4215 | } | ||
| 4216 | |||
| 4217 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_min(simd_ulong8 x) { | ||
| 4218 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4219 | } | ||
| 4220 | |||
| 4221 | static inline SIMD_CFUNC double simd_reduce_min(simd_double2 x) { | ||
| 4222 | return fmin(x.x, x.y); | ||
| 4223 | } | ||
| 4224 | |||
| 4225 | static inline SIMD_CFUNC double simd_reduce_min(simd_double3 x) { | ||
| 4226 | return fmin(fmin(x.x, x.z), x.y); | ||
| 4227 | } | ||
| 4228 | |||
| 4229 | static inline SIMD_CFUNC double simd_reduce_min(simd_double4 x) { | ||
| 4230 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4231 | } | ||
| 4232 | |||
| 4233 | static inline SIMD_CFUNC double simd_reduce_min(simd_double8 x) { | ||
| 4234 | return simd_reduce_min(simd_min(x.lo, x.hi)); | ||
| 4235 | } | ||
| 4236 | |||
| 4237 | static inline SIMD_CFUNC char simd_reduce_max(simd_char2 x) { | ||
| 4238 | return x.y > x.x ? x.y : x.x; | ||
| 4239 | } | ||
| 4240 | |||
| 4241 | static inline SIMD_CFUNC char simd_reduce_max(simd_char3 x) { | ||
| 4242 | char t = x.z > x.x ? x.z : x.x; | ||
| 4243 | return x.y > t ? x.y : t; | ||
| 4244 | } | ||
| 4245 | |||
| 4246 | static inline SIMD_CFUNC char simd_reduce_max(simd_char4 x) { | ||
| 4247 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4248 | } | ||
| 4249 | |||
| 4250 | static inline SIMD_CFUNC char simd_reduce_max(simd_char8 x) { | ||
| 4251 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4252 | } | ||
| 4253 | |||
| 4254 | static inline SIMD_CFUNC char simd_reduce_max(simd_char16 x) { | ||
| 4255 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4256 | } | ||
| 4257 | |||
| 4258 | static inline SIMD_CFUNC char simd_reduce_max(simd_char32 x) { | ||
| 4259 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4260 | } | ||
| 4261 | |||
| 4262 | static inline SIMD_CFUNC char simd_reduce_max(simd_char64 x) { | ||
| 4263 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4264 | } | ||
| 4265 | |||
| 4266 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar2 x) { | ||
| 4267 | return x.y > x.x ? x.y : x.x; | ||
| 4268 | } | ||
| 4269 | |||
| 4270 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar3 x) { | ||
| 4271 | unsigned char t = x.z > x.x ? x.z : x.x; | ||
| 4272 | return x.y > t ? x.y : t; | ||
| 4273 | } | ||
| 4274 | |||
| 4275 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar4 x) { | ||
| 4276 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4277 | } | ||
| 4278 | |||
| 4279 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar8 x) { | ||
| 4280 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4281 | } | ||
| 4282 | |||
| 4283 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar16 x) { | ||
| 4284 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4285 | } | ||
| 4286 | |||
| 4287 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar32 x) { | ||
| 4288 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4289 | } | ||
| 4290 | |||
| 4291 | static inline SIMD_CFUNC unsigned char simd_reduce_max(simd_uchar64 x) { | ||
| 4292 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4293 | } | ||
| 4294 | |||
| 4295 | static inline SIMD_CFUNC short simd_reduce_max(simd_short2 x) { | ||
| 4296 | return x.y > x.x ? x.y : x.x; | ||
| 4297 | } | ||
| 4298 | |||
| 4299 | static inline SIMD_CFUNC short simd_reduce_max(simd_short3 x) { | ||
| 4300 | short t = x.z > x.x ? x.z : x.x; | ||
| 4301 | return x.y > t ? x.y : t; | ||
| 4302 | } | ||
| 4303 | |||
| 4304 | static inline SIMD_CFUNC short simd_reduce_max(simd_short4 x) { | ||
| 4305 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4306 | } | ||
| 4307 | |||
| 4308 | static inline SIMD_CFUNC short simd_reduce_max(simd_short8 x) { | ||
| 4309 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4310 | } | ||
| 4311 | |||
| 4312 | static inline SIMD_CFUNC short simd_reduce_max(simd_short16 x) { | ||
| 4313 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4314 | } | ||
| 4315 | |||
| 4316 | static inline SIMD_CFUNC short simd_reduce_max(simd_short32 x) { | ||
| 4317 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4318 | } | ||
| 4319 | |||
| 4320 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort2 x) { | ||
| 4321 | return x.y > x.x ? x.y : x.x; | ||
| 4322 | } | ||
| 4323 | |||
| 4324 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort3 x) { | ||
| 4325 | unsigned short t = x.z > x.x ? x.z : x.x; | ||
| 4326 | return x.y > t ? x.y : t; | ||
| 4327 | } | ||
| 4328 | |||
| 4329 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort4 x) { | ||
| 4330 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4331 | } | ||
| 4332 | |||
| 4333 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort8 x) { | ||
| 4334 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4335 | } | ||
| 4336 | |||
| 4337 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort16 x) { | ||
| 4338 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4339 | } | ||
| 4340 | |||
| 4341 | static inline SIMD_CFUNC unsigned short simd_reduce_max(simd_ushort32 x) { | ||
| 4342 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4343 | } | ||
| 4344 | |||
| 4345 | static inline SIMD_CFUNC int simd_reduce_max(simd_int2 x) { | ||
| 4346 | return x.y > x.x ? x.y : x.x; | ||
| 4347 | } | ||
| 4348 | |||
| 4349 | static inline SIMD_CFUNC int simd_reduce_max(simd_int3 x) { | ||
| 4350 | int t = x.z > x.x ? x.z : x.x; | ||
| 4351 | return x.y > t ? x.y : t; | ||
| 4352 | } | ||
| 4353 | |||
| 4354 | static inline SIMD_CFUNC int simd_reduce_max(simd_int4 x) { | ||
| 4355 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4356 | } | ||
| 4357 | |||
| 4358 | static inline SIMD_CFUNC int simd_reduce_max(simd_int8 x) { | ||
| 4359 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4360 | } | ||
| 4361 | |||
| 4362 | static inline SIMD_CFUNC int simd_reduce_max(simd_int16 x) { | ||
| 4363 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4364 | } | ||
| 4365 | |||
| 4366 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint2 x) { | ||
| 4367 | return x.y > x.x ? x.y : x.x; | ||
| 4368 | } | ||
| 4369 | |||
| 4370 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint3 x) { | ||
| 4371 | unsigned int t = x.z > x.x ? x.z : x.x; | ||
| 4372 | return x.y > t ? x.y : t; | ||
| 4373 | } | ||
| 4374 | |||
| 4375 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint4 x) { | ||
| 4376 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4377 | } | ||
| 4378 | |||
| 4379 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint8 x) { | ||
| 4380 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4381 | } | ||
| 4382 | |||
| 4383 | static inline SIMD_CFUNC unsigned int simd_reduce_max(simd_uint16 x) { | ||
| 4384 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4385 | } | ||
| 4386 | |||
| 4387 | static inline SIMD_CFUNC float simd_reduce_max(simd_float2 x) { | ||
| 4388 | return fmax(x.x, x.y); | ||
| 4389 | } | ||
| 4390 | |||
| 4391 | static inline SIMD_CFUNC float simd_reduce_max(simd_float3 x) { | ||
| 4392 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4393 | } | ||
| 4394 | |||
| 4395 | static inline SIMD_CFUNC float simd_reduce_max(simd_float4 x) { | ||
| 4396 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4397 | } | ||
| 4398 | |||
| 4399 | static inline SIMD_CFUNC float simd_reduce_max(simd_float8 x) { | ||
| 4400 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4401 | } | ||
| 4402 | |||
| 4403 | static inline SIMD_CFUNC float simd_reduce_max(simd_float16 x) { | ||
| 4404 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4405 | } | ||
| 4406 | |||
| 4407 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long2 x) { | ||
| 4408 | return x.y > x.x ? x.y : x.x; | ||
| 4409 | } | ||
| 4410 | |||
| 4411 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long3 x) { | ||
| 4412 | simd_long1 t = x.z > x.x ? x.z : x.x; | ||
| 4413 | return x.y > t ? x.y : t; | ||
| 4414 | } | ||
| 4415 | |||
| 4416 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long4 x) { | ||
| 4417 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4418 | } | ||
| 4419 | |||
| 4420 | static inline SIMD_CFUNC simd_long1 simd_reduce_max(simd_long8 x) { | ||
| 4421 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4422 | } | ||
| 4423 | |||
| 4424 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong2 x) { | ||
| 4425 | return x.y > x.x ? x.y : x.x; | ||
| 4426 | } | ||
| 4427 | |||
| 4428 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong3 x) { | ||
| 4429 | simd_ulong1 t = x.z > x.x ? x.z : x.x; | ||
| 4430 | return x.y > t ? x.y : t; | ||
| 4431 | } | ||
| 4432 | |||
| 4433 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong4 x) { | ||
| 4434 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4435 | } | ||
| 4436 | |||
| 4437 | static inline SIMD_CFUNC simd_ulong1 simd_reduce_max(simd_ulong8 x) { | ||
| 4438 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4439 | } | ||
| 4440 | |||
| 4441 | static inline SIMD_CFUNC double simd_reduce_max(simd_double2 x) { | ||
| 4442 | return fmax(x.x, x.y); | ||
| 4443 | } | ||
| 4444 | |||
| 4445 | static inline SIMD_CFUNC double simd_reduce_max(simd_double3 x) { | ||
| 4446 | return fmax(fmax(x.x, x.z), x.y); | ||
| 4447 | } | ||
| 4448 | |||
| 4449 | static inline SIMD_CFUNC double simd_reduce_max(simd_double4 x) { | ||
| 4450 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4451 | } | ||
| 4452 | |||
| 4453 | static inline SIMD_CFUNC double simd_reduce_max(simd_double8 x) { | ||
| 4454 | return simd_reduce_max(simd_max(x.lo, x.hi)); | ||
| 4455 | } | ||
| 4456 | |||
| 4457 | #ifdef __cplusplus | ||
| 4458 | } | ||
| 4459 | #endif | ||
| 4460 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 4461 | #endif /* SIMD_COMMON_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/conversion.h deleted-2031| ... | @@ -1,2031 +0,0 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * The interfaces declared in this header provide conversions between vector | ||
| 4 | * types. The following functions are available: | ||
| 5 | * | ||
| 6 | * simd_char(x) simd_uchar(x) | ||
| 7 | * simd_short(x) simd_ushort(x) | ||
| 8 | * simd_int(x) simd_uint(x) | ||
| 9 | * simd_long(x) simd_ulong(x) | ||
| 10 | * simd_float(x) | ||
| 11 | * simd_double(x) | ||
| 12 | * | ||
| 13 | * Each of these functions converts x to a vector whose elements have the | ||
| 14 | * type named by the function, with the same number of elements as x. Unlike | ||
| 15 | * a vector cast, these functions convert the elements to the new element | ||
| 16 | * type. These conversions behave exactly as C scalar conversions, except | ||
| 17 | * that conversions from integer vector types to signed integer vector types | ||
| 18 | * are guaranteed to wrap modulo 2^N (where N is the number of bits in an | ||
| 19 | * element of the result type). | ||
| 20 | * | ||
| 21 | * For integer vector types, saturating conversions are also available: | ||
| 22 | * | ||
| 23 | * simd_char_sat(x) simd_uchar_sat(x) | ||
| 24 | * simd_short_sat(x) simd_ushort_sat(x) | ||
| 25 | * simd_int_sat(x) simd_uint_sat(x) | ||
| 26 | * simd_long_sat(x) simd_ulong_sat(x) | ||
| 27 | * | ||
| 28 | * These conversions clamp x to the representable range of the result type | ||
| 29 | * before converting. | ||
| 30 | * | ||
| 31 | * In C++ the conversion functions are templated in the simd:: namespace. | ||
| 32 | * | ||
| 33 | * C++ Function Equivalent C Function | ||
| 34 | * ------------------------------------------------------------------- | ||
| 35 | * simd::convert<ScalarType>(x) simd_ScalarType(x) | ||
| 36 | * simd::convert_sat<ScalarType>(x) simd_ScalarType_sat(x) | ||
| 37 | */ | ||
| 38 | |||
| 39 | #ifndef __SIMD_CONVERSION_HEADER__ | ||
| 40 | #define __SIMD_CONVERSION_HEADER__ | ||
| 41 | |||
| 42 | #include <simd/base.h> | ||
| 43 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 44 | #include <simd/vector_types.h> | ||
| 45 | #include <simd/common.h> | ||
| 46 | #include <simd/logic.h> | ||
| 47 | |||
| 48 | #ifdef __cplusplus | ||
| 49 | extern "C" { | ||
| 50 | #endif | ||
| 51 | |||
| 52 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x); | ||
| 53 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x); | ||
| 54 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x); | ||
| 55 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x); | ||
| 56 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x); | ||
| 57 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x); | ||
| 58 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x); | ||
| 59 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x); | ||
| 60 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x); | ||
| 61 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x); | ||
| 62 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x); | ||
| 63 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x); | ||
| 64 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x); | ||
| 65 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x); | ||
| 66 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x); | ||
| 67 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x); | ||
| 68 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x); | ||
| 69 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x); | ||
| 70 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x); | ||
| 71 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x); | ||
| 72 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x); | ||
| 73 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x); | ||
| 74 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x); | ||
| 75 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x); | ||
| 76 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x); | ||
| 77 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x); | ||
| 78 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x); | ||
| 79 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x); | ||
| 80 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x); | ||
| 81 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x); | ||
| 82 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x); | ||
| 83 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x); | ||
| 84 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x); | ||
| 85 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x); | ||
| 86 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x); | ||
| 87 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x); | ||
| 88 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x); | ||
| 89 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x); | ||
| 90 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x); | ||
| 91 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x); | ||
| 92 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x); | ||
| 93 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x); | ||
| 94 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x); | ||
| 95 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x); | ||
| 96 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x); | ||
| 97 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x); | ||
| 98 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x); | ||
| 99 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x); | ||
| 100 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x); | ||
| 101 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x); | ||
| 102 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x); | ||
| 103 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x); | ||
| 104 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x); | ||
| 105 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x); | ||
| 106 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x); | ||
| 107 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x); | ||
| 108 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x); | ||
| 109 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x); | ||
| 110 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x); | ||
| 111 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x); | ||
| 112 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x); | ||
| 113 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x); | ||
| 114 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x); | ||
| 115 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x); | ||
| 116 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x); | ||
| 117 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x); | ||
| 118 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x); | ||
| 119 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x); | ||
| 120 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x); | ||
| 121 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x); | ||
| 122 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x); | ||
| 123 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x); | ||
| 124 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x); | ||
| 125 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x); | ||
| 126 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x); | ||
| 127 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x); | ||
| 128 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x); | ||
| 129 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x); | ||
| 130 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x); | ||
| 131 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x); | ||
| 132 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x); | ||
| 133 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x); | ||
| 134 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x); | ||
| 135 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x); | ||
| 136 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x); | ||
| 137 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x); | ||
| 138 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x); | ||
| 139 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x); | ||
| 140 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x); | ||
| 141 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x); | ||
| 142 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x); | ||
| 143 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x); | ||
| 144 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x); | ||
| 145 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x); | ||
| 146 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x); | ||
| 147 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x); | ||
| 148 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x); | ||
| 149 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x); | ||
| 150 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x); | ||
| 151 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x); | ||
| 152 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x); | ||
| 153 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x); | ||
| 154 | #define vector_char simd_char | ||
| 155 | #define vector_char_sat simd_char_sat | ||
| 156 | |||
| 157 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x); | ||
| 158 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x); | ||
| 159 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x); | ||
| 160 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x); | ||
| 161 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x); | ||
| 162 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x); | ||
| 163 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x); | ||
| 164 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x); | ||
| 165 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x); | ||
| 166 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x); | ||
| 167 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x); | ||
| 168 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x); | ||
| 169 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x); | ||
| 170 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x); | ||
| 171 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x); | ||
| 172 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x); | ||
| 173 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x); | ||
| 174 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x); | ||
| 175 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x); | ||
| 176 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x); | ||
| 177 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x); | ||
| 178 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x); | ||
| 179 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x); | ||
| 180 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x); | ||
| 181 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x); | ||
| 182 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x); | ||
| 183 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x); | ||
| 184 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x); | ||
| 185 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x); | ||
| 186 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x); | ||
| 187 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x); | ||
| 188 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x); | ||
| 189 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x); | ||
| 190 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x); | ||
| 191 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x); | ||
| 192 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x); | ||
| 193 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x); | ||
| 194 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x); | ||
| 195 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x); | ||
| 196 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x); | ||
| 197 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x); | ||
| 198 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x); | ||
| 199 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x); | ||
| 200 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x); | ||
| 201 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x); | ||
| 202 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x); | ||
| 203 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x); | ||
| 204 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x); | ||
| 205 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x); | ||
| 206 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x); | ||
| 207 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x); | ||
| 208 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x); | ||
| 209 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x); | ||
| 210 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x); | ||
| 211 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x); | ||
| 212 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x); | ||
| 213 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x); | ||
| 214 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x); | ||
| 215 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x); | ||
| 216 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x); | ||
| 217 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x); | ||
| 218 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x); | ||
| 219 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x); | ||
| 220 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x); | ||
| 221 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x); | ||
| 222 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x); | ||
| 223 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x); | ||
| 224 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x); | ||
| 225 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x); | ||
| 226 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x); | ||
| 227 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x); | ||
| 228 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x); | ||
| 229 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x); | ||
| 230 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x); | ||
| 231 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x); | ||
| 232 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x); | ||
| 233 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x); | ||
| 234 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x); | ||
| 235 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x); | ||
| 236 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x); | ||
| 237 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x); | ||
| 238 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x); | ||
| 239 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x); | ||
| 240 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x); | ||
| 241 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x); | ||
| 242 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x); | ||
| 243 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x); | ||
| 244 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x); | ||
| 245 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x); | ||
| 246 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x); | ||
| 247 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x); | ||
| 248 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x); | ||
| 249 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x); | ||
| 250 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x); | ||
| 251 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x); | ||
| 252 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x); | ||
| 253 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x); | ||
| 254 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x); | ||
| 255 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x); | ||
| 256 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x); | ||
| 257 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x); | ||
| 258 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x); | ||
| 259 | #define vector_uchar simd_uchar | ||
| 260 | #define vector_uchar_sat simd_uchar_sat | ||
| 261 | |||
| 262 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x); | ||
| 263 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x); | ||
| 264 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x); | ||
| 265 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x); | ||
| 266 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x); | ||
| 267 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x); | ||
| 268 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x); | ||
| 269 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x); | ||
| 270 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x); | ||
| 271 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x); | ||
| 272 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x); | ||
| 273 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x); | ||
| 274 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x); | ||
| 275 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x); | ||
| 276 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x); | ||
| 277 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x); | ||
| 278 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x); | ||
| 279 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x); | ||
| 280 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x); | ||
| 281 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x); | ||
| 282 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x); | ||
| 283 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x); | ||
| 284 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x); | ||
| 285 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x); | ||
| 286 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x); | ||
| 287 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x); | ||
| 288 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x); | ||
| 289 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x); | ||
| 290 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x); | ||
| 291 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x); | ||
| 292 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x); | ||
| 293 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x); | ||
| 294 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x); | ||
| 295 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x); | ||
| 296 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x); | ||
| 297 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x); | ||
| 298 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x); | ||
| 299 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x); | ||
| 300 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x); | ||
| 301 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x); | ||
| 302 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x); | ||
| 303 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x); | ||
| 304 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x); | ||
| 305 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x); | ||
| 306 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x); | ||
| 307 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x); | ||
| 308 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x); | ||
| 309 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x); | ||
| 310 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x); | ||
| 311 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x); | ||
| 312 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x); | ||
| 313 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x); | ||
| 314 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x); | ||
| 315 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x); | ||
| 316 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x); | ||
| 317 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x); | ||
| 318 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x); | ||
| 319 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x); | ||
| 320 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x); | ||
| 321 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x); | ||
| 322 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x); | ||
| 323 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x); | ||
| 324 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x); | ||
| 325 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x); | ||
| 326 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x); | ||
| 327 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x); | ||
| 328 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x); | ||
| 329 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x); | ||
| 330 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x); | ||
| 331 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x); | ||
| 332 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x); | ||
| 333 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x); | ||
| 334 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x); | ||
| 335 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x); | ||
| 336 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x); | ||
| 337 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x); | ||
| 338 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x); | ||
| 339 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x); | ||
| 340 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x); | ||
| 341 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x); | ||
| 342 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x); | ||
| 343 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x); | ||
| 344 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x); | ||
| 345 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x); | ||
| 346 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x); | ||
| 347 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x); | ||
| 348 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x); | ||
| 349 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x); | ||
| 350 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x); | ||
| 351 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x); | ||
| 352 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x); | ||
| 353 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x); | ||
| 354 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x); | ||
| 355 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x); | ||
| 356 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x); | ||
| 357 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x); | ||
| 358 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x); | ||
| 359 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x); | ||
| 360 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x); | ||
| 361 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x); | ||
| 362 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x); | ||
| 363 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x); | ||
| 364 | #define vector_short simd_short | ||
| 365 | #define vector_short_sat simd_short_sat | ||
| 366 | |||
| 367 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x); | ||
| 368 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x); | ||
| 369 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x); | ||
| 370 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x); | ||
| 371 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x); | ||
| 372 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x); | ||
| 373 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x); | ||
| 374 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x); | ||
| 375 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x); | ||
| 376 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x); | ||
| 377 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x); | ||
| 378 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x); | ||
| 379 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x); | ||
| 380 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x); | ||
| 381 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x); | ||
| 382 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x); | ||
| 383 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x); | ||
| 384 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x); | ||
| 385 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x); | ||
| 386 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x); | ||
| 387 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x); | ||
| 388 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x); | ||
| 389 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x); | ||
| 390 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x); | ||
| 391 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x); | ||
| 392 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x); | ||
| 393 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x); | ||
| 394 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x); | ||
| 395 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x); | ||
| 396 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x); | ||
| 397 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x); | ||
| 398 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x); | ||
| 399 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x); | ||
| 400 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x); | ||
| 401 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x); | ||
| 402 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x); | ||
| 403 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x); | ||
| 404 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x); | ||
| 405 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x); | ||
| 406 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x); | ||
| 407 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x); | ||
| 408 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x); | ||
| 409 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x); | ||
| 410 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x); | ||
| 411 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x); | ||
| 412 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x); | ||
| 413 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x); | ||
| 414 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x); | ||
| 415 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x); | ||
| 416 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x); | ||
| 417 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x); | ||
| 418 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x); | ||
| 419 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x); | ||
| 420 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x); | ||
| 421 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x); | ||
| 422 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x); | ||
| 423 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x); | ||
| 424 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x); | ||
| 425 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x); | ||
| 426 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x); | ||
| 427 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x); | ||
| 428 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x); | ||
| 429 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x); | ||
| 430 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x); | ||
| 431 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x); | ||
| 432 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x); | ||
| 433 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x); | ||
| 434 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x); | ||
| 435 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x); | ||
| 436 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x); | ||
| 437 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x); | ||
| 438 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x); | ||
| 439 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x); | ||
| 440 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x); | ||
| 441 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x); | ||
| 442 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x); | ||
| 443 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x); | ||
| 444 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x); | ||
| 445 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x); | ||
| 446 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x); | ||
| 447 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x); | ||
| 448 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x); | ||
| 449 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x); | ||
| 450 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x); | ||
| 451 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x); | ||
| 452 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x); | ||
| 453 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x); | ||
| 454 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x); | ||
| 455 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x); | ||
| 456 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x); | ||
| 457 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x); | ||
| 458 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x); | ||
| 459 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x); | ||
| 460 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x); | ||
| 461 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x); | ||
| 462 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x); | ||
| 463 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x); | ||
| 464 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x); | ||
| 465 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x); | ||
| 466 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x); | ||
| 467 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x); | ||
| 468 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x); | ||
| 469 | #define vector_ushort simd_ushort | ||
| 470 | #define vector_ushort_sat simd_ushort_sat | ||
| 471 | |||
| 472 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x); | ||
| 473 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x); | ||
| 474 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x); | ||
| 475 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x); | ||
| 476 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x); | ||
| 477 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x); | ||
| 478 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x); | ||
| 479 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x); | ||
| 480 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x); | ||
| 481 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x); | ||
| 482 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x); | ||
| 483 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x); | ||
| 484 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x); | ||
| 485 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x); | ||
| 486 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x); | ||
| 487 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x); | ||
| 488 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x); | ||
| 489 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x); | ||
| 490 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x); | ||
| 491 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x); | ||
| 492 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x); | ||
| 493 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x); | ||
| 494 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x); | ||
| 495 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x); | ||
| 496 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x); | ||
| 497 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x); | ||
| 498 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x); | ||
| 499 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x); | ||
| 500 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x); | ||
| 501 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x); | ||
| 502 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x); | ||
| 503 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x); | ||
| 504 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x); | ||
| 505 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x); | ||
| 506 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x); | ||
| 507 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x); | ||
| 508 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x); | ||
| 509 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x); | ||
| 510 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x); | ||
| 511 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x); | ||
| 512 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x); | ||
| 513 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x); | ||
| 514 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x); | ||
| 515 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x); | ||
| 516 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x); | ||
| 517 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x); | ||
| 518 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x); | ||
| 519 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x); | ||
| 520 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x); | ||
| 521 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x); | ||
| 522 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x); | ||
| 523 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x); | ||
| 524 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x); | ||
| 525 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x); | ||
| 526 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x); | ||
| 527 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x); | ||
| 528 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x); | ||
| 529 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x); | ||
| 530 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x); | ||
| 531 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x); | ||
| 532 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x); | ||
| 533 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x); | ||
| 534 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x); | ||
| 535 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x); | ||
| 536 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x); | ||
| 537 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x); | ||
| 538 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x); | ||
| 539 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x); | ||
| 540 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x); | ||
| 541 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x); | ||
| 542 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x); | ||
| 543 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x); | ||
| 544 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x); | ||
| 545 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x); | ||
| 546 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x); | ||
| 547 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x); | ||
| 548 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x); | ||
| 549 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x); | ||
| 550 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x); | ||
| 551 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x); | ||
| 552 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x); | ||
| 553 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x); | ||
| 554 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x); | ||
| 555 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x); | ||
| 556 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x); | ||
| 557 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x); | ||
| 558 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x); | ||
| 559 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x); | ||
| 560 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x); | ||
| 561 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x); | ||
| 562 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x); | ||
| 563 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x); | ||
| 564 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x); | ||
| 565 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x); | ||
| 566 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x); | ||
| 567 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x); | ||
| 568 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x); | ||
| 569 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x); | ||
| 570 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x); | ||
| 571 | #define vector_int simd_int | ||
| 572 | #define vector_int_sat simd_int_sat | ||
| 573 | |||
| 574 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x); | ||
| 575 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x); | ||
| 576 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x); | ||
| 577 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x); | ||
| 578 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x); | ||
| 579 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x); | ||
| 580 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x); | ||
| 581 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x); | ||
| 582 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x); | ||
| 583 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x); | ||
| 584 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x); | ||
| 585 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x); | ||
| 586 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x); | ||
| 587 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x); | ||
| 588 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x); | ||
| 589 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x); | ||
| 590 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x); | ||
| 591 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x); | ||
| 592 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x); | ||
| 593 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x); | ||
| 594 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x); | ||
| 595 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x); | ||
| 596 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x); | ||
| 597 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x); | ||
| 598 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x); | ||
| 599 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x); | ||
| 600 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x); | ||
| 601 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x); | ||
| 602 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x); | ||
| 603 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x); | ||
| 604 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x); | ||
| 605 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x); | ||
| 606 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x); | ||
| 607 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x); | ||
| 608 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x); | ||
| 609 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x); | ||
| 610 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x); | ||
| 611 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x); | ||
| 612 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x); | ||
| 613 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x); | ||
| 614 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x); | ||
| 615 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x); | ||
| 616 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x); | ||
| 617 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x); | ||
| 618 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x); | ||
| 619 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x); | ||
| 620 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x); | ||
| 621 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x); | ||
| 622 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x); | ||
| 623 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x); | ||
| 624 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x); | ||
| 625 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x); | ||
| 626 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x); | ||
| 627 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x); | ||
| 628 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x); | ||
| 629 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x); | ||
| 630 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x); | ||
| 631 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x); | ||
| 632 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x); | ||
| 633 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x); | ||
| 634 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x); | ||
| 635 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x); | ||
| 636 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x); | ||
| 637 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x); | ||
| 638 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x); | ||
| 639 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x); | ||
| 640 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x); | ||
| 641 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x); | ||
| 642 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x); | ||
| 643 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x); | ||
| 644 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x); | ||
| 645 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x); | ||
| 646 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x); | ||
| 647 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x); | ||
| 648 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x); | ||
| 649 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x); | ||
| 650 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x); | ||
| 651 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x); | ||
| 652 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x); | ||
| 653 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x); | ||
| 654 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x); | ||
| 655 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x); | ||
| 656 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x); | ||
| 657 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x); | ||
| 658 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x); | ||
| 659 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x); | ||
| 660 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x); | ||
| 661 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x); | ||
| 662 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x); | ||
| 663 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x); | ||
| 664 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x); | ||
| 665 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x); | ||
| 666 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x); | ||
| 667 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x); | ||
| 668 | #define vector_uint simd_uint | ||
| 669 | #define vector_uint_sat simd_uint_sat | ||
| 670 | |||
| 671 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x); | ||
| 672 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x); | ||
| 673 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x); | ||
| 674 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x); | ||
| 675 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x); | ||
| 676 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x); | ||
| 677 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x); | ||
| 678 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x); | ||
| 679 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x); | ||
| 680 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x); | ||
| 681 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x); | ||
| 682 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x); | ||
| 683 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x); | ||
| 684 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x); | ||
| 685 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x); | ||
| 686 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x); | ||
| 687 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x); | ||
| 688 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x); | ||
| 689 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x); | ||
| 690 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x); | ||
| 691 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x); | ||
| 692 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x); | ||
| 693 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x); | ||
| 694 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x); | ||
| 695 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x); | ||
| 696 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x); | ||
| 697 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x); | ||
| 698 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x); | ||
| 699 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x); | ||
| 700 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x); | ||
| 701 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x); | ||
| 702 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x); | ||
| 703 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x); | ||
| 704 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x); | ||
| 705 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x); | ||
| 706 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x); | ||
| 707 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x); | ||
| 708 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x); | ||
| 709 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x); | ||
| 710 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x); | ||
| 711 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x); | ||
| 712 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x); | ||
| 713 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x); | ||
| 714 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x); | ||
| 715 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x); | ||
| 716 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x); | ||
| 717 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x); | ||
| 718 | #define vector_float simd_float | ||
| 719 | |||
| 720 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x); | ||
| 721 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x); | ||
| 722 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x); | ||
| 723 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x); | ||
| 724 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x); | ||
| 725 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x); | ||
| 726 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x); | ||
| 727 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x); | ||
| 728 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x); | ||
| 729 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x); | ||
| 730 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x); | ||
| 731 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x); | ||
| 732 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x); | ||
| 733 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x); | ||
| 734 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x); | ||
| 735 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x); | ||
| 736 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x); | ||
| 737 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x); | ||
| 738 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x); | ||
| 739 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x); | ||
| 740 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x); | ||
| 741 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x); | ||
| 742 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x); | ||
| 743 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x); | ||
| 744 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x); | ||
| 745 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x); | ||
| 746 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x); | ||
| 747 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x); | ||
| 748 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x); | ||
| 749 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x); | ||
| 750 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x); | ||
| 751 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x); | ||
| 752 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x); | ||
| 753 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x); | ||
| 754 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x); | ||
| 755 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x); | ||
| 756 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x); | ||
| 757 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x); | ||
| 758 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x); | ||
| 759 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x); | ||
| 760 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x); | ||
| 761 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x); | ||
| 762 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x); | ||
| 763 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x); | ||
| 764 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x); | ||
| 765 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x); | ||
| 766 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x); | ||
| 767 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x); | ||
| 768 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x); | ||
| 769 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x); | ||
| 770 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x); | ||
| 771 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x); | ||
| 772 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x); | ||
| 773 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x); | ||
| 774 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x); | ||
| 775 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x); | ||
| 776 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x); | ||
| 777 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x); | ||
| 778 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x); | ||
| 779 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x); | ||
| 780 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x); | ||
| 781 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x); | ||
| 782 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x); | ||
| 783 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x); | ||
| 784 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x); | ||
| 785 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x); | ||
| 786 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x); | ||
| 787 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x); | ||
| 788 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x); | ||
| 789 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x); | ||
| 790 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x); | ||
| 791 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x); | ||
| 792 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x); | ||
| 793 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x); | ||
| 794 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x); | ||
| 795 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x); | ||
| 796 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x); | ||
| 797 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x); | ||
| 798 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x); | ||
| 799 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x); | ||
| 800 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x); | ||
| 801 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x); | ||
| 802 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x); | ||
| 803 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x); | ||
| 804 | #define vector_long simd_long | ||
| 805 | #define vector_long_sat simd_long_sat | ||
| 806 | |||
| 807 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x); | ||
| 808 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x); | ||
| 809 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x); | ||
| 810 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x); | ||
| 811 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x); | ||
| 812 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x); | ||
| 813 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x); | ||
| 814 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x); | ||
| 815 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x); | ||
| 816 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x); | ||
| 817 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x); | ||
| 818 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x); | ||
| 819 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x); | ||
| 820 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x); | ||
| 821 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x); | ||
| 822 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x); | ||
| 823 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x); | ||
| 824 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x); | ||
| 825 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x); | ||
| 826 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x); | ||
| 827 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x); | ||
| 828 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x); | ||
| 829 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x); | ||
| 830 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x); | ||
| 831 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x); | ||
| 832 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x); | ||
| 833 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x); | ||
| 834 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x); | ||
| 835 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x); | ||
| 836 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x); | ||
| 837 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x); | ||
| 838 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x); | ||
| 839 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x); | ||
| 840 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x); | ||
| 841 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x); | ||
| 842 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x); | ||
| 843 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x); | ||
| 844 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x); | ||
| 845 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x); | ||
| 846 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x); | ||
| 847 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x); | ||
| 848 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x); | ||
| 849 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x); | ||
| 850 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x); | ||
| 851 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x); | ||
| 852 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x); | ||
| 853 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x); | ||
| 854 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x); | ||
| 855 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x); | ||
| 856 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x); | ||
| 857 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x); | ||
| 858 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x); | ||
| 859 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x); | ||
| 860 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x); | ||
| 861 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x); | ||
| 862 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x); | ||
| 863 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x); | ||
| 864 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x); | ||
| 865 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x); | ||
| 866 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x); | ||
| 867 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x); | ||
| 868 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x); | ||
| 869 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x); | ||
| 870 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x); | ||
| 871 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x); | ||
| 872 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x); | ||
| 873 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x); | ||
| 874 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x); | ||
| 875 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x); | ||
| 876 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x); | ||
| 877 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x); | ||
| 878 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x); | ||
| 879 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x); | ||
| 880 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x); | ||
| 881 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x); | ||
| 882 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x); | ||
| 883 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x); | ||
| 884 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x); | ||
| 885 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x); | ||
| 886 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x); | ||
| 887 | #define vector_ulong simd_ulong | ||
| 888 | #define vector_ulong_sat simd_ulong_sat | ||
| 889 | |||
| 890 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x); | ||
| 891 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x); | ||
| 892 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x); | ||
| 893 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x); | ||
| 894 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x); | ||
| 895 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x); | ||
| 896 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x); | ||
| 897 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x); | ||
| 898 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x); | ||
| 899 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x); | ||
| 900 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x); | ||
| 901 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x); | ||
| 902 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x); | ||
| 903 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x); | ||
| 904 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x); | ||
| 905 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x); | ||
| 906 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x); | ||
| 907 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x); | ||
| 908 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x); | ||
| 909 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x); | ||
| 910 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x); | ||
| 911 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x); | ||
| 912 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x); | ||
| 913 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x); | ||
| 914 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x); | ||
| 915 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x); | ||
| 916 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x); | ||
| 917 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x); | ||
| 918 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x); | ||
| 919 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x); | ||
| 920 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x); | ||
| 921 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x); | ||
| 922 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x); | ||
| 923 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x); | ||
| 924 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x); | ||
| 925 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x); | ||
| 926 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x); | ||
| 927 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x); | ||
| 928 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x); | ||
| 929 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x); | ||
| 930 | #define vector_double simd_double | ||
| 931 | |||
| 932 | static simd_char2 SIMD_CFUNC vector2(char __x, char __y) { return ( simd_char2){__x, __y}; } | ||
| 933 | static simd_uchar2 SIMD_CFUNC vector2(unsigned char __x, unsigned char __y) { return ( simd_uchar2){__x, __y}; } | ||
| 934 | static simd_short2 SIMD_CFUNC vector2(short __x, short __y) { return ( simd_short2){__x, __y}; } | ||
| 935 | static simd_ushort2 SIMD_CFUNC vector2(unsigned short __x, unsigned short __y) { return (simd_ushort2){__x, __y}; } | ||
| 936 | static simd_int2 SIMD_CFUNC vector2(int __x, int __y) { return ( simd_int2){__x, __y}; } | ||
| 937 | static simd_uint2 SIMD_CFUNC vector2(unsigned int __x, unsigned int __y) { return ( simd_uint2){__x, __y}; } | ||
| 938 | static simd_float2 SIMD_CFUNC vector2(float __x, float __y) { return ( simd_float2){__x, __y}; } | ||
| 939 | static simd_long2 SIMD_CFUNC vector2(simd_long1 __x, simd_long1 __y) { return ( simd_long2){__x, __y}; } | ||
| 940 | static simd_ulong2 SIMD_CFUNC vector2(simd_ulong1 __x, simd_ulong1 __y) { return ( simd_ulong2){__x, __y}; } | ||
| 941 | static simd_double2 SIMD_CFUNC vector2(double __x, double __y) { return (simd_double2){__x, __y}; } | ||
| 942 | |||
| 943 | static simd_char3 SIMD_CFUNC vector3(char __x, char __y, char __z) { return ( simd_char3){__x, __y, __z}; } | ||
| 944 | static simd_uchar3 SIMD_CFUNC vector3(unsigned char __x, unsigned char __y, unsigned char __z) { return ( simd_uchar3){__x, __y, __z}; } | ||
| 945 | static simd_short3 SIMD_CFUNC vector3(short __x, short __y, short __z) { return ( simd_short3){__x, __y, __z}; } | ||
| 946 | static simd_ushort3 SIMD_CFUNC vector3(unsigned short __x, unsigned short __y, unsigned short __z) { return (simd_ushort3){__x, __y, __z}; } | ||
| 947 | static simd_int3 SIMD_CFUNC vector3(int __x, int __y, int __z) { return ( simd_int3){__x, __y, __z}; } | ||
| 948 | static simd_uint3 SIMD_CFUNC vector3(unsigned int __x, unsigned int __y, unsigned int __z) { return ( simd_uint3){__x, __y, __z}; } | ||
| 949 | static simd_float3 SIMD_CFUNC vector3(float __x, float __y, float __z) { return ( simd_float3){__x, __y, __z}; } | ||
| 950 | static simd_long3 SIMD_CFUNC vector3(simd_long1 __x, simd_long1 __y, simd_long1 __z) { return ( simd_long3){__x, __y, __z}; } | ||
| 951 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z) { return ( simd_ulong3){__x, __y, __z}; } | ||
| 952 | static simd_double3 SIMD_CFUNC vector3(double __x, double __y, double __z) { return (simd_double3){__x, __y, __z}; } | ||
| 953 | |||
| 954 | static simd_char3 SIMD_CFUNC vector3(simd_char2 __xy, char __z) { simd_char3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 955 | static simd_uchar3 SIMD_CFUNC vector3(simd_uchar2 __xy, unsigned char __z) { simd_uchar3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 956 | static simd_short3 SIMD_CFUNC vector3(simd_short2 __xy, short __z) { simd_short3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 957 | static simd_ushort3 SIMD_CFUNC vector3(simd_ushort2 __xy, unsigned short __z) { simd_ushort3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 958 | static simd_int3 SIMD_CFUNC vector3(simd_int2 __xy, int __z) { simd_int3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 959 | static simd_uint3 SIMD_CFUNC vector3(simd_uint2 __xy, unsigned int __z) { simd_uint3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 960 | static simd_float3 SIMD_CFUNC vector3(simd_float2 __xy, float __z) { simd_float3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 961 | static simd_long3 SIMD_CFUNC vector3(simd_long2 __xy, simd_long1 __z) { simd_long3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 962 | static simd_ulong3 SIMD_CFUNC vector3(simd_ulong2 __xy, simd_ulong1 __z) { simd_ulong3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 963 | static simd_double3 SIMD_CFUNC vector3(simd_double2 __xy, double __z) { simd_double3 __r; __r.xy = __xy; __r.z = __z; return __r; } | ||
| 964 | |||
| 965 | static simd_char4 SIMD_CFUNC vector4(char __x, char __y, char __z, char __w) { return ( simd_char4){__x, __y, __z, __w}; } | ||
| 966 | static simd_uchar4 SIMD_CFUNC vector4(unsigned char __x, unsigned char __y, unsigned char __z, unsigned char __w) { return ( simd_uchar4){__x, __y, __z, __w}; } | ||
| 967 | static simd_short4 SIMD_CFUNC vector4(short __x, short __y, short __z, short __w) { return ( simd_short4){__x, __y, __z, __w}; } | ||
| 968 | static simd_ushort4 SIMD_CFUNC vector4(unsigned short __x, unsigned short __y, unsigned short __z, unsigned short __w) { return (simd_ushort4){__x, __y, __z, __w}; } | ||
| 969 | static simd_int4 SIMD_CFUNC vector4(int __x, int __y, int __z, int __w) { return ( simd_int4){__x, __y, __z, __w}; } | ||
| 970 | static simd_uint4 SIMD_CFUNC vector4(unsigned int __x, unsigned int __y, unsigned int __z, unsigned int __w) { return ( simd_uint4){__x, __y, __z, __w}; } | ||
| 971 | static simd_float4 SIMD_CFUNC vector4(float __x, float __y, float __z, float __w) { return ( simd_float4){__x, __y, __z, __w}; } | ||
| 972 | static simd_long4 SIMD_CFUNC vector4(simd_long1 __x, simd_long1 __y, simd_long1 __z, simd_long1 __w) { return ( simd_long4){__x, __y, __z, __w}; } | ||
| 973 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong1 __x, simd_ulong1 __y, simd_ulong1 __z, simd_ulong1 __w) { return ( simd_ulong4){__x, __y, __z, __w}; } | ||
| 974 | static simd_double4 SIMD_CFUNC vector4(double __x, double __y, double __z, double __w) { return (simd_double4){__x, __y, __z, __w}; } | ||
| 975 | |||
| 976 | static simd_char4 SIMD_CFUNC vector4(simd_char2 __xy, simd_char2 __zw) { simd_char4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 977 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar2 __xy, simd_uchar2 __zw) { simd_uchar4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 978 | static simd_short4 SIMD_CFUNC vector4(simd_short2 __xy, simd_short2 __zw) { simd_short4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 979 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort2 __xy, simd_ushort2 __zw) { simd_ushort4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 980 | static simd_int4 SIMD_CFUNC vector4(simd_int2 __xy, simd_int2 __zw) { simd_int4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 981 | static simd_uint4 SIMD_CFUNC vector4(simd_uint2 __xy, simd_uint2 __zw) { simd_uint4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 982 | static simd_float4 SIMD_CFUNC vector4(simd_float2 __xy, simd_float2 __zw) { simd_float4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 983 | static simd_long4 SIMD_CFUNC vector4(simd_long2 __xy, simd_long2 __zw) { simd_long4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 984 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong2 __xy, simd_ulong2 __zw) { simd_ulong4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 985 | static simd_double4 SIMD_CFUNC vector4(simd_double2 __xy, simd_double2 __zw) { simd_double4 __r; __r.xy = __xy; __r.zw = __zw; return __r; } | ||
| 986 | |||
| 987 | static simd_char4 SIMD_CFUNC vector4(simd_char3 __xyz, char __w) { simd_char4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 988 | static simd_uchar4 SIMD_CFUNC vector4(simd_uchar3 __xyz, unsigned char __w) { simd_uchar4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 989 | static simd_short4 SIMD_CFUNC vector4(simd_short3 __xyz, short __w) { simd_short4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 990 | static simd_ushort4 SIMD_CFUNC vector4(simd_ushort3 __xyz, unsigned short __w) { simd_ushort4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 991 | static simd_int4 SIMD_CFUNC vector4(simd_int3 __xyz, int __w) { simd_int4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 992 | static simd_uint4 SIMD_CFUNC vector4(simd_uint3 __xyz, unsigned int __w) { simd_uint4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 993 | static simd_float4 SIMD_CFUNC vector4(simd_float3 __xyz, float __w) { simd_float4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 994 | static simd_long4 SIMD_CFUNC vector4(simd_long3 __xyz, simd_long1 __w) { simd_long4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 995 | static simd_ulong4 SIMD_CFUNC vector4(simd_ulong3 __xyz, simd_ulong1 __w) { simd_ulong4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 996 | static simd_double4 SIMD_CFUNC vector4(simd_double3 __xyz, double __w) { simd_double4 __r; __r.xyz = __xyz; __r.w = __w; return __r; } | ||
| 997 | |||
| 998 | static simd_char8 SIMD_CFUNC vector8(simd_char4 __lo, simd_char4 __hi) { simd_char8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 999 | static simd_uchar8 SIMD_CFUNC vector8(simd_uchar4 __lo, simd_uchar4 __hi) { simd_uchar8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1000 | static simd_short8 SIMD_CFUNC vector8(simd_short4 __lo, simd_short4 __hi) { simd_short8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1001 | static simd_ushort8 SIMD_CFUNC vector8(simd_ushort4 __lo, simd_ushort4 __hi) { simd_ushort8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1002 | static simd_int8 SIMD_CFUNC vector8(simd_int4 __lo, simd_int4 __hi) { simd_int8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1003 | static simd_uint8 SIMD_CFUNC vector8(simd_uint4 __lo, simd_uint4 __hi) { simd_uint8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1004 | static simd_float8 SIMD_CFUNC vector8(simd_float4 __lo, simd_float4 __hi) { simd_float8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1005 | static simd_long8 SIMD_CFUNC vector8(simd_long4 __lo, simd_long4 __hi) { simd_long8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1006 | static simd_ulong8 SIMD_CFUNC vector8(simd_ulong4 __lo, simd_ulong4 __hi) { simd_ulong8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1007 | static simd_double8 SIMD_CFUNC vector8(simd_double4 __lo, simd_double4 __hi) { simd_double8 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1008 | |||
| 1009 | static simd_char16 SIMD_CFUNC vector16(simd_char8 __lo, simd_char8 __hi) { simd_char16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1010 | static simd_uchar16 SIMD_CFUNC vector16(simd_uchar8 __lo, simd_uchar8 __hi) { simd_uchar16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1011 | static simd_short16 SIMD_CFUNC vector16(simd_short8 __lo, simd_short8 __hi) { simd_short16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1012 | static simd_ushort16 SIMD_CFUNC vector16(simd_ushort8 __lo, simd_ushort8 __hi) { simd_ushort16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1013 | static simd_int16 SIMD_CFUNC vector16(simd_int8 __lo, simd_int8 __hi) { simd_int16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1014 | static simd_uint16 SIMD_CFUNC vector16(simd_uint8 __lo, simd_uint8 __hi) { simd_uint16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1015 | static simd_float16 SIMD_CFUNC vector16(simd_float8 __lo, simd_float8 __hi) { simd_float16 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1016 | |||
| 1017 | static simd_char32 SIMD_CFUNC vector32(simd_char16 __lo, simd_char16 __hi) { simd_char32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1018 | static simd_uchar32 SIMD_CFUNC vector32(simd_uchar16 __lo, simd_uchar16 __hi) { simd_uchar32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1019 | static simd_short32 SIMD_CFUNC vector32(simd_short16 __lo, simd_short16 __hi) { simd_short32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1020 | static simd_ushort32 SIMD_CFUNC vector32(simd_ushort16 __lo, simd_ushort16 __hi) { simd_ushort32 __r; __r.lo = __lo; __r.hi = __hi; return __r; } | ||
| 1021 | |||
| 1022 | #pragma mark - Implementation | ||
| 1023 | |||
| 1024 | static simd_char2 SIMD_CFUNC simd_char(simd_char2 __x) { return __x; } | ||
| 1025 | static simd_char3 SIMD_CFUNC simd_char(simd_char3 __x) { return __x; } | ||
| 1026 | static simd_char4 SIMD_CFUNC simd_char(simd_char4 __x) { return __x; } | ||
| 1027 | static simd_char8 SIMD_CFUNC simd_char(simd_char8 __x) { return __x; } | ||
| 1028 | static simd_char16 SIMD_CFUNC simd_char(simd_char16 __x) { return __x; } | ||
| 1029 | static simd_char32 SIMD_CFUNC simd_char(simd_char32 __x) { return __x; } | ||
| 1030 | static simd_char2 SIMD_CFUNC simd_char(simd_uchar2 __x) { return (simd_char2)__x; } | ||
| 1031 | static simd_char3 SIMD_CFUNC simd_char(simd_uchar3 __x) { return (simd_char3)__x; } | ||
| 1032 | static simd_char4 SIMD_CFUNC simd_char(simd_uchar4 __x) { return (simd_char4)__x; } | ||
| 1033 | static simd_char8 SIMD_CFUNC simd_char(simd_uchar8 __x) { return (simd_char8)__x; } | ||
| 1034 | static simd_char16 SIMD_CFUNC simd_char(simd_uchar16 __x) { return (simd_char16)__x; } | ||
| 1035 | static simd_char32 SIMD_CFUNC simd_char(simd_uchar32 __x) { return (simd_char32)__x; } | ||
| 1036 | static simd_char2 SIMD_CFUNC simd_char(simd_short2 __x) { return __builtin_convertvector(__x & 0xff, simd_char2); } | ||
| 1037 | static simd_char3 SIMD_CFUNC simd_char(simd_short3 __x) { return __builtin_convertvector(__x & 0xff, simd_char3); } | ||
| 1038 | static simd_char4 SIMD_CFUNC simd_char(simd_short4 __x) { return __builtin_convertvector(__x & 0xff, simd_char4); } | ||
| 1039 | static simd_char8 SIMD_CFUNC simd_char(simd_short8 __x) { return __builtin_convertvector(__x & 0xff, simd_char8); } | ||
| 1040 | static simd_char16 SIMD_CFUNC simd_char(simd_short16 __x) { return __builtin_convertvector(__x & 0xff, simd_char16); } | ||
| 1041 | static simd_char32 SIMD_CFUNC simd_char(simd_short32 __x) { return __builtin_convertvector(__x & 0xff, simd_char32); } | ||
| 1042 | static simd_char2 SIMD_CFUNC simd_char(simd_ushort2 __x) { return simd_char(simd_short(__x)); } | ||
| 1043 | static simd_char3 SIMD_CFUNC simd_char(simd_ushort3 __x) { return simd_char(simd_short(__x)); } | ||
| 1044 | static simd_char4 SIMD_CFUNC simd_char(simd_ushort4 __x) { return simd_char(simd_short(__x)); } | ||
| 1045 | static simd_char8 SIMD_CFUNC simd_char(simd_ushort8 __x) { return simd_char(simd_short(__x)); } | ||
| 1046 | static simd_char16 SIMD_CFUNC simd_char(simd_ushort16 __x) { return simd_char(simd_short(__x)); } | ||
| 1047 | static simd_char32 SIMD_CFUNC simd_char(simd_ushort32 __x) { return simd_char(simd_short(__x)); } | ||
| 1048 | static simd_char2 SIMD_CFUNC simd_char(simd_int2 __x) { return simd_char(simd_short(__x)); } | ||
| 1049 | static simd_char3 SIMD_CFUNC simd_char(simd_int3 __x) { return simd_char(simd_short(__x)); } | ||
| 1050 | static simd_char4 SIMD_CFUNC simd_char(simd_int4 __x) { return simd_char(simd_short(__x)); } | ||
| 1051 | static simd_char8 SIMD_CFUNC simd_char(simd_int8 __x) { return simd_char(simd_short(__x)); } | ||
| 1052 | static simd_char16 SIMD_CFUNC simd_char(simd_int16 __x) { return simd_char(simd_short(__x)); } | ||
| 1053 | static simd_char2 SIMD_CFUNC simd_char(simd_uint2 __x) { return simd_char(simd_short(__x)); } | ||
| 1054 | static simd_char3 SIMD_CFUNC simd_char(simd_uint3 __x) { return simd_char(simd_short(__x)); } | ||
| 1055 | static simd_char4 SIMD_CFUNC simd_char(simd_uint4 __x) { return simd_char(simd_short(__x)); } | ||
| 1056 | static simd_char8 SIMD_CFUNC simd_char(simd_uint8 __x) { return simd_char(simd_short(__x)); } | ||
| 1057 | static simd_char16 SIMD_CFUNC simd_char(simd_uint16 __x) { return simd_char(simd_short(__x)); } | ||
| 1058 | static simd_char2 SIMD_CFUNC simd_char(simd_float2 __x) { return simd_char(simd_short(__x)); } | ||
| 1059 | static simd_char3 SIMD_CFUNC simd_char(simd_float3 __x) { return simd_char(simd_short(__x)); } | ||
| 1060 | static simd_char4 SIMD_CFUNC simd_char(simd_float4 __x) { return simd_char(simd_short(__x)); } | ||
| 1061 | static simd_char8 SIMD_CFUNC simd_char(simd_float8 __x) { return simd_char(simd_short(__x)); } | ||
| 1062 | static simd_char16 SIMD_CFUNC simd_char(simd_float16 __x) { return simd_char(simd_short(__x)); } | ||
| 1063 | static simd_char2 SIMD_CFUNC simd_char(simd_long2 __x) { return simd_char(simd_short(__x)); } | ||
| 1064 | static simd_char3 SIMD_CFUNC simd_char(simd_long3 __x) { return simd_char(simd_short(__x)); } | ||
| 1065 | static simd_char4 SIMD_CFUNC simd_char(simd_long4 __x) { return simd_char(simd_short(__x)); } | ||
| 1066 | static simd_char8 SIMD_CFUNC simd_char(simd_long8 __x) { return simd_char(simd_short(__x)); } | ||
| 1067 | static simd_char2 SIMD_CFUNC simd_char(simd_ulong2 __x) { return simd_char(simd_short(__x)); } | ||
| 1068 | static simd_char3 SIMD_CFUNC simd_char(simd_ulong3 __x) { return simd_char(simd_short(__x)); } | ||
| 1069 | static simd_char4 SIMD_CFUNC simd_char(simd_ulong4 __x) { return simd_char(simd_short(__x)); } | ||
| 1070 | static simd_char8 SIMD_CFUNC simd_char(simd_ulong8 __x) { return simd_char(simd_short(__x)); } | ||
| 1071 | static simd_char2 SIMD_CFUNC simd_char(simd_double2 __x) { return simd_char(simd_short(__x)); } | ||
| 1072 | static simd_char3 SIMD_CFUNC simd_char(simd_double3 __x) { return simd_char(simd_short(__x)); } | ||
| 1073 | static simd_char4 SIMD_CFUNC simd_char(simd_double4 __x) { return simd_char(simd_short(__x)); } | ||
| 1074 | static simd_char8 SIMD_CFUNC simd_char(simd_double8 __x) { return simd_char(simd_short(__x)); } | ||
| 1075 | |||
| 1076 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_char2 __x) { return __x; } | ||
| 1077 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_char3 __x) { return __x; } | ||
| 1078 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_char4 __x) { return __x; } | ||
| 1079 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_char8 __x) { return __x; } | ||
| 1080 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_char16 __x) { return __x; } | ||
| 1081 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_char32 __x) { return __x; } | ||
| 1082 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_short2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1083 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_short3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1084 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_short4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1085 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_short8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1086 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_short16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1087 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_short32 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1088 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_int2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1089 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_int3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1090 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_int4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1091 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_int8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1092 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_int16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1093 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_float2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1094 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_float3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1095 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_float4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1096 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_float8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1097 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_float16 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1098 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_long2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1099 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_long3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1100 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_long4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1101 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_long8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1102 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_double2 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1103 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_double3 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1104 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_double4 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1105 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_double8 __x) { return simd_char(simd_clamp(__x,-0x80,0x7f)); } | ||
| 1106 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uchar2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1107 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uchar3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1108 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uchar4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1109 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uchar8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1110 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uchar16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1111 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_uchar32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1112 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ushort2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1113 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ushort3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1114 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ushort4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1115 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ushort8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1116 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_ushort16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1117 | static simd_char32 SIMD_CFUNC simd_char_sat(simd_ushort32 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1118 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_uint2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1119 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_uint3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1120 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_uint4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1121 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_uint8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1122 | static simd_char16 SIMD_CFUNC simd_char_sat(simd_uint16 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1123 | static simd_char2 SIMD_CFUNC simd_char_sat(simd_ulong2 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1124 | static simd_char3 SIMD_CFUNC simd_char_sat(simd_ulong3 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1125 | static simd_char4 SIMD_CFUNC simd_char_sat(simd_ulong4 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1126 | static simd_char8 SIMD_CFUNC simd_char_sat(simd_ulong8 __x) { return simd_char(simd_min(__x,0x7f)); } | ||
| 1127 | |||
| 1128 | |||
| 1129 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_char2 __x) { return (simd_uchar2)__x; } | ||
| 1130 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_char3 __x) { return (simd_uchar3)__x; } | ||
| 1131 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_char4 __x) { return (simd_uchar4)__x; } | ||
| 1132 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_char8 __x) { return (simd_uchar8)__x; } | ||
| 1133 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_char16 __x) { return (simd_uchar16)__x; } | ||
| 1134 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_char32 __x) { return (simd_uchar32)__x; } | ||
| 1135 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uchar2 __x) { return __x; } | ||
| 1136 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uchar3 __x) { return __x; } | ||
| 1137 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uchar4 __x) { return __x; } | ||
| 1138 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uchar8 __x) { return __x; } | ||
| 1139 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uchar16 __x) { return __x; } | ||
| 1140 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_uchar32 __x) { return __x; } | ||
| 1141 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_short2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1142 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_short3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1143 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_short4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1144 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_short8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1145 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_short16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1146 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_short32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1147 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ushort2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1148 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ushort3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1149 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ushort4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1150 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ushort8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1151 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_ushort16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1152 | static simd_uchar32 SIMD_CFUNC simd_uchar(simd_ushort32 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1153 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_int2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1154 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_int3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1155 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_int4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1156 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_int8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1157 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_int16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1158 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_uint2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1159 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_uint3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1160 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_uint4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1161 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_uint8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1162 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_uint16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1163 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_float2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1164 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_float3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1165 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_float4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1166 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_float8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1167 | static simd_uchar16 SIMD_CFUNC simd_uchar(simd_float16 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1168 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_long2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1169 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_long3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1170 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_long4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1171 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_long8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1172 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_ulong2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1173 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_ulong3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1174 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_ulong4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1175 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_ulong8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1176 | static simd_uchar2 SIMD_CFUNC simd_uchar(simd_double2 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1177 | static simd_uchar3 SIMD_CFUNC simd_uchar(simd_double3 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1178 | static simd_uchar4 SIMD_CFUNC simd_uchar(simd_double4 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1179 | static simd_uchar8 SIMD_CFUNC simd_uchar(simd_double8 __x) { return simd_uchar(simd_char(__x)); } | ||
| 1180 | |||
| 1181 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_char2 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1182 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_char3 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1183 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_char4 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1184 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_char8 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1185 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_char16 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1186 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_char32 __x) { return simd_uchar(simd_max(0,__x)); } | ||
| 1187 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_short2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1188 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_short3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1189 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_short4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1190 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_short8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1191 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_short16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1192 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_short32 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1193 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_int2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1194 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_int3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1195 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_int4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1196 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_int8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1197 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_int16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1198 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_float2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1199 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_float3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1200 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_float4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1201 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_float8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1202 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_float16 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1203 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_long2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1204 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_long3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1205 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_long4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1206 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_long8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1207 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_double2 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1208 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_double3 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1209 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_double4 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1210 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_double8 __x) { return simd_uchar(simd_clamp(__x,0,0xff)); } | ||
| 1211 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uchar2 __x) { return __x; } | ||
| 1212 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uchar3 __x) { return __x; } | ||
| 1213 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uchar4 __x) { return __x; } | ||
| 1214 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uchar8 __x) { return __x; } | ||
| 1215 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uchar16 __x) { return __x; } | ||
| 1216 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_uchar32 __x) { return __x; } | ||
| 1217 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ushort2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1218 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ushort3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1219 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ushort4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1220 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ushort8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1221 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_ushort16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1222 | static simd_uchar32 SIMD_CFUNC simd_uchar_sat(simd_ushort32 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1223 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_uint2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1224 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_uint3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1225 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_uint4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1226 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_uint8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1227 | static simd_uchar16 SIMD_CFUNC simd_uchar_sat(simd_uint16 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1228 | static simd_uchar2 SIMD_CFUNC simd_uchar_sat(simd_ulong2 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1229 | static simd_uchar3 SIMD_CFUNC simd_uchar_sat(simd_ulong3 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1230 | static simd_uchar4 SIMD_CFUNC simd_uchar_sat(simd_ulong4 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1231 | static simd_uchar8 SIMD_CFUNC simd_uchar_sat(simd_ulong8 __x) { return simd_uchar(simd_min(__x,0xff)); } | ||
| 1232 | |||
| 1233 | |||
| 1234 | static simd_short2 SIMD_CFUNC simd_short(simd_char2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1235 | static simd_short3 SIMD_CFUNC simd_short(simd_char3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1236 | static simd_short4 SIMD_CFUNC simd_short(simd_char4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1237 | static simd_short8 SIMD_CFUNC simd_short(simd_char8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1238 | static simd_short16 SIMD_CFUNC simd_short(simd_char16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1239 | static simd_short32 SIMD_CFUNC simd_short(simd_char32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1240 | static simd_short2 SIMD_CFUNC simd_short(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_short2); } | ||
| 1241 | static simd_short3 SIMD_CFUNC simd_short(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_short3); } | ||
| 1242 | static simd_short4 SIMD_CFUNC simd_short(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_short4); } | ||
| 1243 | static simd_short8 SIMD_CFUNC simd_short(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_short8); } | ||
| 1244 | static simd_short16 SIMD_CFUNC simd_short(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_short16); } | ||
| 1245 | static simd_short32 SIMD_CFUNC simd_short(simd_uchar32 __x) { return __builtin_convertvector(__x, simd_short32); } | ||
| 1246 | static simd_short2 SIMD_CFUNC simd_short(simd_short2 __x) { return __x; } | ||
| 1247 | static simd_short3 SIMD_CFUNC simd_short(simd_short3 __x) { return __x; } | ||
| 1248 | static simd_short4 SIMD_CFUNC simd_short(simd_short4 __x) { return __x; } | ||
| 1249 | static simd_short8 SIMD_CFUNC simd_short(simd_short8 __x) { return __x; } | ||
| 1250 | static simd_short16 SIMD_CFUNC simd_short(simd_short16 __x) { return __x; } | ||
| 1251 | static simd_short32 SIMD_CFUNC simd_short(simd_short32 __x) { return __x; } | ||
| 1252 | static simd_short2 SIMD_CFUNC simd_short(simd_ushort2 __x) { return (simd_short2)__x; } | ||
| 1253 | static simd_short3 SIMD_CFUNC simd_short(simd_ushort3 __x) { return (simd_short3)__x; } | ||
| 1254 | static simd_short4 SIMD_CFUNC simd_short(simd_ushort4 __x) { return (simd_short4)__x; } | ||
| 1255 | static simd_short8 SIMD_CFUNC simd_short(simd_ushort8 __x) { return (simd_short8)__x; } | ||
| 1256 | static simd_short16 SIMD_CFUNC simd_short(simd_ushort16 __x) { return (simd_short16)__x; } | ||
| 1257 | static simd_short32 SIMD_CFUNC simd_short(simd_ushort32 __x) { return (simd_short32)__x; } | ||
| 1258 | static simd_short2 SIMD_CFUNC simd_short(simd_int2 __x) { return __builtin_convertvector(__x & 0xffff, simd_short2); } | ||
| 1259 | static simd_short3 SIMD_CFUNC simd_short(simd_int3 __x) { return __builtin_convertvector(__x & 0xffff, simd_short3); } | ||
| 1260 | static simd_short4 SIMD_CFUNC simd_short(simd_int4 __x) { return __builtin_convertvector(__x & 0xffff, simd_short4); } | ||
| 1261 | static simd_short8 SIMD_CFUNC simd_short(simd_int8 __x) { return __builtin_convertvector(__x & 0xffff, simd_short8); } | ||
| 1262 | static simd_short16 SIMD_CFUNC simd_short(simd_int16 __x) { return __builtin_convertvector(__x & 0xffff, simd_short16); } | ||
| 1263 | static simd_short2 SIMD_CFUNC simd_short(simd_uint2 __x) { return simd_short(simd_int(__x)); } | ||
| 1264 | static simd_short3 SIMD_CFUNC simd_short(simd_uint3 __x) { return simd_short(simd_int(__x)); } | ||
| 1265 | static simd_short4 SIMD_CFUNC simd_short(simd_uint4 __x) { return simd_short(simd_int(__x)); } | ||
| 1266 | static simd_short8 SIMD_CFUNC simd_short(simd_uint8 __x) { return simd_short(simd_int(__x)); } | ||
| 1267 | static simd_short16 SIMD_CFUNC simd_short(simd_uint16 __x) { return simd_short(simd_int(__x)); } | ||
| 1268 | static simd_short2 SIMD_CFUNC simd_short(simd_float2 __x) { return simd_short(simd_int(__x)); } | ||
| 1269 | static simd_short3 SIMD_CFUNC simd_short(simd_float3 __x) { return simd_short(simd_int(__x)); } | ||
| 1270 | static simd_short4 SIMD_CFUNC simd_short(simd_float4 __x) { return simd_short(simd_int(__x)); } | ||
| 1271 | static simd_short8 SIMD_CFUNC simd_short(simd_float8 __x) { return simd_short(simd_int(__x)); } | ||
| 1272 | static simd_short16 SIMD_CFUNC simd_short(simd_float16 __x) { return simd_short(simd_int(__x)); } | ||
| 1273 | static simd_short2 SIMD_CFUNC simd_short(simd_long2 __x) { return simd_short(simd_int(__x)); } | ||
| 1274 | static simd_short3 SIMD_CFUNC simd_short(simd_long3 __x) { return simd_short(simd_int(__x)); } | ||
| 1275 | static simd_short4 SIMD_CFUNC simd_short(simd_long4 __x) { return simd_short(simd_int(__x)); } | ||
| 1276 | static simd_short8 SIMD_CFUNC simd_short(simd_long8 __x) { return simd_short(simd_int(__x)); } | ||
| 1277 | static simd_short2 SIMD_CFUNC simd_short(simd_ulong2 __x) { return simd_short(simd_int(__x)); } | ||
| 1278 | static simd_short3 SIMD_CFUNC simd_short(simd_ulong3 __x) { return simd_short(simd_int(__x)); } | ||
| 1279 | static simd_short4 SIMD_CFUNC simd_short(simd_ulong4 __x) { return simd_short(simd_int(__x)); } | ||
| 1280 | static simd_short8 SIMD_CFUNC simd_short(simd_ulong8 __x) { return simd_short(simd_int(__x)); } | ||
| 1281 | static simd_short2 SIMD_CFUNC simd_short(simd_double2 __x) { return simd_short(simd_int(__x)); } | ||
| 1282 | static simd_short3 SIMD_CFUNC simd_short(simd_double3 __x) { return simd_short(simd_int(__x)); } | ||
| 1283 | static simd_short4 SIMD_CFUNC simd_short(simd_double4 __x) { return simd_short(simd_int(__x)); } | ||
| 1284 | static simd_short8 SIMD_CFUNC simd_short(simd_double8 __x) { return simd_short(simd_int(__x)); } | ||
| 1285 | |||
| 1286 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_char2 __x) { return simd_short(__x); } | ||
| 1287 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_char3 __x) { return simd_short(__x); } | ||
| 1288 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_char4 __x) { return simd_short(__x); } | ||
| 1289 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_char8 __x) { return simd_short(__x); } | ||
| 1290 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_char16 __x) { return simd_short(__x); } | ||
| 1291 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_char32 __x) { return simd_short(__x); } | ||
| 1292 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_short2 __x) { return __x; } | ||
| 1293 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_short3 __x) { return __x; } | ||
| 1294 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_short4 __x) { return __x; } | ||
| 1295 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_short8 __x) { return __x; } | ||
| 1296 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_short16 __x) { return __x; } | ||
| 1297 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_short32 __x) { return __x; } | ||
| 1298 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_int2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1299 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_int3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1300 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_int4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1301 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_int8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1302 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_int16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1303 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_float2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1304 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_float3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1305 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_float4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1306 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_float8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1307 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_float16 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1308 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_long2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1309 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_long3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1310 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_long4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1311 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_long8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1312 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_double2 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1313 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_double3 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1314 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_double4 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1315 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_double8 __x) { return simd_short(simd_clamp(__x,-0x8000,0x7fff)); } | ||
| 1316 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uchar2 __x) { return simd_short(__x); } | ||
| 1317 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uchar3 __x) { return simd_short(__x); } | ||
| 1318 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uchar4 __x) { return simd_short(__x); } | ||
| 1319 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uchar8 __x) { return simd_short(__x); } | ||
| 1320 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uchar16 __x) { return simd_short(__x); } | ||
| 1321 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_uchar32 __x) { return simd_short(__x); } | ||
| 1322 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ushort2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1323 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ushort3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1324 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ushort4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1325 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ushort8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1326 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_ushort16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1327 | static simd_short32 SIMD_CFUNC simd_short_sat(simd_ushort32 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1328 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_uint2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1329 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_uint3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1330 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_uint4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1331 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_uint8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1332 | static simd_short16 SIMD_CFUNC simd_short_sat(simd_uint16 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1333 | static simd_short2 SIMD_CFUNC simd_short_sat(simd_ulong2 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1334 | static simd_short3 SIMD_CFUNC simd_short_sat(simd_ulong3 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1335 | static simd_short4 SIMD_CFUNC simd_short_sat(simd_ulong4 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1336 | static simd_short8 SIMD_CFUNC simd_short_sat(simd_ulong8 __x) { return simd_short(simd_min(__x,0x7fff)); } | ||
| 1337 | |||
| 1338 | |||
| 1339 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_char2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1340 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_char3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1341 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_char4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1342 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_char8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1343 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_char16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1344 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_char32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1345 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uchar2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1346 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uchar3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1347 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uchar4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1348 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uchar8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1349 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uchar16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1350 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_uchar32 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1351 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_short2 __x) { return (simd_ushort2)__x; } | ||
| 1352 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_short3 __x) { return (simd_ushort3)__x; } | ||
| 1353 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_short4 __x) { return (simd_ushort4)__x; } | ||
| 1354 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_short8 __x) { return (simd_ushort8)__x; } | ||
| 1355 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_short16 __x) { return (simd_ushort16)__x; } | ||
| 1356 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_short32 __x) { return (simd_ushort32)__x; } | ||
| 1357 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ushort2 __x) { return __x; } | ||
| 1358 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ushort3 __x) { return __x; } | ||
| 1359 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ushort4 __x) { return __x; } | ||
| 1360 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ushort8 __x) { return __x; } | ||
| 1361 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_ushort16 __x) { return __x; } | ||
| 1362 | static simd_ushort32 SIMD_CFUNC simd_ushort(simd_ushort32 __x) { return __x; } | ||
| 1363 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_int2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1364 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_int3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1365 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_int4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1366 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_int8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1367 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_int16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1368 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_uint2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1369 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_uint3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1370 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_uint4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1371 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_uint8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1372 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_uint16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1373 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_float2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1374 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_float3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1375 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_float4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1376 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_float8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1377 | static simd_ushort16 SIMD_CFUNC simd_ushort(simd_float16 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1378 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_long2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1379 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_long3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1380 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_long4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1381 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_long8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1382 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_ulong2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1383 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_ulong3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1384 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_ulong4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1385 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_ulong8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1386 | static simd_ushort2 SIMD_CFUNC simd_ushort(simd_double2 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1387 | static simd_ushort3 SIMD_CFUNC simd_ushort(simd_double3 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1388 | static simd_ushort4 SIMD_CFUNC simd_ushort(simd_double4 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1389 | static simd_ushort8 SIMD_CFUNC simd_ushort(simd_double8 __x) { return simd_ushort(simd_short(__x)); } | ||
| 1390 | |||
| 1391 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_char2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1392 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_char3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1393 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_char4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1394 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_char8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1395 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_char16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1396 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_char32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1397 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_short2 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1398 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_short3 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1399 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_short4 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1400 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_short8 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1401 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_short16 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1402 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_short32 __x) { return simd_ushort(simd_max(__x, 0)); } | ||
| 1403 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_int2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1404 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_int3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1405 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_int4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1406 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_int8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1407 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_int16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1408 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_float2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1409 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_float3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1410 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_float4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1411 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_float8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1412 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_float16 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1413 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_long2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1414 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_long3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1415 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_long4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1416 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_long8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1417 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_double2 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1418 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_double3 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1419 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_double4 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1420 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_double8 __x) { return simd_ushort(simd_clamp(__x, 0, 0xffff)); } | ||
| 1421 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uchar2 __x) { return simd_ushort(__x); } | ||
| 1422 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uchar3 __x) { return simd_ushort(__x); } | ||
| 1423 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uchar4 __x) { return simd_ushort(__x); } | ||
| 1424 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uchar8 __x) { return simd_ushort(__x); } | ||
| 1425 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uchar16 __x) { return simd_ushort(__x); } | ||
| 1426 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_uchar32 __x) { return simd_ushort(__x); } | ||
| 1427 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ushort2 __x) { return __x; } | ||
| 1428 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ushort3 __x) { return __x; } | ||
| 1429 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ushort4 __x) { return __x; } | ||
| 1430 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ushort8 __x) { return __x; } | ||
| 1431 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_ushort16 __x) { return __x; } | ||
| 1432 | static simd_ushort32 SIMD_CFUNC simd_ushort_sat(simd_ushort32 __x) { return __x; } | ||
| 1433 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_uint2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1434 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_uint3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1435 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_uint4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1436 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_uint8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1437 | static simd_ushort16 SIMD_CFUNC simd_ushort_sat(simd_uint16 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1438 | static simd_ushort2 SIMD_CFUNC simd_ushort_sat(simd_ulong2 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1439 | static simd_ushort3 SIMD_CFUNC simd_ushort_sat(simd_ulong3 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1440 | static simd_ushort4 SIMD_CFUNC simd_ushort_sat(simd_ulong4 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1441 | static simd_ushort8 SIMD_CFUNC simd_ushort_sat(simd_ulong8 __x) { return simd_ushort(simd_min(__x, 0xffff)); } | ||
| 1442 | |||
| 1443 | |||
| 1444 | static simd_int2 SIMD_CFUNC simd_int(simd_char2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1445 | static simd_int3 SIMD_CFUNC simd_int(simd_char3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1446 | static simd_int4 SIMD_CFUNC simd_int(simd_char4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1447 | static simd_int8 SIMD_CFUNC simd_int(simd_char8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1448 | static simd_int16 SIMD_CFUNC simd_int(simd_char16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1449 | static simd_int2 SIMD_CFUNC simd_int(simd_uchar2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1450 | static simd_int3 SIMD_CFUNC simd_int(simd_uchar3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1451 | static simd_int4 SIMD_CFUNC simd_int(simd_uchar4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1452 | static simd_int8 SIMD_CFUNC simd_int(simd_uchar8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1453 | static simd_int16 SIMD_CFUNC simd_int(simd_uchar16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1454 | static simd_int2 SIMD_CFUNC simd_int(simd_short2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1455 | static simd_int3 SIMD_CFUNC simd_int(simd_short3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1456 | static simd_int4 SIMD_CFUNC simd_int(simd_short4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1457 | static simd_int8 SIMD_CFUNC simd_int(simd_short8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1458 | static simd_int16 SIMD_CFUNC simd_int(simd_short16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1459 | static simd_int2 SIMD_CFUNC simd_int(simd_ushort2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1460 | static simd_int3 SIMD_CFUNC simd_int(simd_ushort3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1461 | static simd_int4 SIMD_CFUNC simd_int(simd_ushort4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1462 | static simd_int8 SIMD_CFUNC simd_int(simd_ushort8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1463 | static simd_int16 SIMD_CFUNC simd_int(simd_ushort16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1464 | static simd_int2 SIMD_CFUNC simd_int(simd_int2 __x) { return __x; } | ||
| 1465 | static simd_int3 SIMD_CFUNC simd_int(simd_int3 __x) { return __x; } | ||
| 1466 | static simd_int4 SIMD_CFUNC simd_int(simd_int4 __x) { return __x; } | ||
| 1467 | static simd_int8 SIMD_CFUNC simd_int(simd_int8 __x) { return __x; } | ||
| 1468 | static simd_int16 SIMD_CFUNC simd_int(simd_int16 __x) { return __x; } | ||
| 1469 | static simd_int2 SIMD_CFUNC simd_int(simd_uint2 __x) { return (simd_int2)__x; } | ||
| 1470 | static simd_int3 SIMD_CFUNC simd_int(simd_uint3 __x) { return (simd_int3)__x; } | ||
| 1471 | static simd_int4 SIMD_CFUNC simd_int(simd_uint4 __x) { return (simd_int4)__x; } | ||
| 1472 | static simd_int8 SIMD_CFUNC simd_int(simd_uint8 __x) { return (simd_int8)__x; } | ||
| 1473 | static simd_int16 SIMD_CFUNC simd_int(simd_uint16 __x) { return (simd_int16)__x; } | ||
| 1474 | static simd_int2 SIMD_CFUNC simd_int(simd_float2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1475 | static simd_int3 SIMD_CFUNC simd_int(simd_float3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1476 | static simd_int4 SIMD_CFUNC simd_int(simd_float4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1477 | static simd_int8 SIMD_CFUNC simd_int(simd_float8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1478 | static simd_int16 SIMD_CFUNC simd_int(simd_float16 __x) { return __builtin_convertvector(__x, simd_int16); } | ||
| 1479 | static simd_int2 SIMD_CFUNC simd_int(simd_long2 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int2); } | ||
| 1480 | static simd_int3 SIMD_CFUNC simd_int(simd_long3 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int3); } | ||
| 1481 | static simd_int4 SIMD_CFUNC simd_int(simd_long4 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int4); } | ||
| 1482 | static simd_int8 SIMD_CFUNC simd_int(simd_long8 __x) { return __builtin_convertvector(__x & 0xffffffff, simd_int8); } | ||
| 1483 | static simd_int2 SIMD_CFUNC simd_int(simd_ulong2 __x) { return simd_int(simd_long(__x)); } | ||
| 1484 | static simd_int3 SIMD_CFUNC simd_int(simd_ulong3 __x) { return simd_int(simd_long(__x)); } | ||
| 1485 | static simd_int4 SIMD_CFUNC simd_int(simd_ulong4 __x) { return simd_int(simd_long(__x)); } | ||
| 1486 | static simd_int8 SIMD_CFUNC simd_int(simd_ulong8 __x) { return simd_int(simd_long(__x)); } | ||
| 1487 | static simd_int2 SIMD_CFUNC simd_int(simd_double2 __x) { return __builtin_convertvector(__x, simd_int2); } | ||
| 1488 | static simd_int3 SIMD_CFUNC simd_int(simd_double3 __x) { return __builtin_convertvector(__x, simd_int3); } | ||
| 1489 | static simd_int4 SIMD_CFUNC simd_int(simd_double4 __x) { return __builtin_convertvector(__x, simd_int4); } | ||
| 1490 | static simd_int8 SIMD_CFUNC simd_int(simd_double8 __x) { return __builtin_convertvector(__x, simd_int8); } | ||
| 1491 | |||
| 1492 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_char2 __x) { return simd_int(__x); } | ||
| 1493 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_char3 __x) { return simd_int(__x); } | ||
| 1494 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_char4 __x) { return simd_int(__x); } | ||
| 1495 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_char8 __x) { return simd_int(__x); } | ||
| 1496 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_char16 __x) { return simd_int(__x); } | ||
| 1497 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_short2 __x) { return simd_int(__x); } | ||
| 1498 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_short3 __x) { return simd_int(__x); } | ||
| 1499 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_short4 __x) { return simd_int(__x); } | ||
| 1500 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_short8 __x) { return simd_int(__x); } | ||
| 1501 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_short16 __x) { return simd_int(__x); } | ||
| 1502 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_int2 __x) { return __x; } | ||
| 1503 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_int3 __x) { return __x; } | ||
| 1504 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_int4 __x) { return __x; } | ||
| 1505 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_int8 __x) { return __x; } | ||
| 1506 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_int16 __x) { return __x; } | ||
| 1507 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_float2 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1508 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_float3 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1509 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_float4 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1510 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_float8 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1511 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_float16 __x) { return simd_bitselect(simd_int(simd_max(__x,-0x1.0p31f)), 0x7fffffff, __x >= 0x1.0p31f); } | ||
| 1512 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_long2 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1513 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_long3 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1514 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_long4 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1515 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_long8 __x) { return simd_int(simd_clamp(__x,-0x80000000LL,0x7fffffffLL)); } | ||
| 1516 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_double2 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1517 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_double3 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1518 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_double4 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1519 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_double8 __x) { return simd_int(simd_clamp(__x,-0x1.0p31,0x1.fffffffcp30)); } | ||
| 1520 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uchar2 __x) { return simd_int(__x); } | ||
| 1521 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uchar3 __x) { return simd_int(__x); } | ||
| 1522 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uchar4 __x) { return simd_int(__x); } | ||
| 1523 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uchar8 __x) { return simd_int(__x); } | ||
| 1524 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uchar16 __x) { return simd_int(__x); } | ||
| 1525 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ushort2 __x) { return simd_int(__x); } | ||
| 1526 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ushort3 __x) { return simd_int(__x); } | ||
| 1527 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ushort4 __x) { return simd_int(__x); } | ||
| 1528 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ushort8 __x) { return simd_int(__x); } | ||
| 1529 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_ushort16 __x) { return simd_int(__x); } | ||
| 1530 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_uint2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1531 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_uint3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1532 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_uint4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1533 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_uint8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1534 | static simd_int16 SIMD_CFUNC simd_int_sat(simd_uint16 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1535 | static simd_int2 SIMD_CFUNC simd_int_sat(simd_ulong2 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1536 | static simd_int3 SIMD_CFUNC simd_int_sat(simd_ulong3 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1537 | static simd_int4 SIMD_CFUNC simd_int_sat(simd_ulong4 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1538 | static simd_int8 SIMD_CFUNC simd_int_sat(simd_ulong8 __x) { return simd_int(simd_min(__x,0x7fffffff)); } | ||
| 1539 | |||
| 1540 | static simd_int2 SIMD_CFUNC simd_int_rte(simd_float2 __x) { | ||
| 1541 | #if defined __arm64__ | ||
| 1542 | return vcvtn_s32_f32(__x); | ||
| 1543 | #else | ||
| 1544 | return simd_make_int2(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1545 | #endif | ||
| 1546 | } | ||
| 1547 | |||
| 1548 | static simd_int3 SIMD_CFUNC simd_int_rte(simd_float3 __x) { | ||
| 1549 | return simd_make_int3(simd_int_rte(simd_make_float4_undef(__x))); | ||
| 1550 | } | ||
| 1551 | |||
| 1552 | static simd_int4 SIMD_CFUNC simd_int_rte(simd_float4 __x) { | ||
| 1553 | #if defined __SSE2__ | ||
| 1554 | return _mm_cvtps_epi32(__x); | ||
| 1555 | #elif defined __arm64__ | ||
| 1556 | return vcvtnq_s32_f32(__x); | ||
| 1557 | #else | ||
| 1558 | simd_float4 magic = __tg_copysign(0x1.0p23, __x); | ||
| 1559 | simd_int4 x_is_small = __tg_fabs(__x) < 0x1.0p23; | ||
| 1560 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffff), simd_int4); | ||
| 1561 | #endif | ||
| 1562 | } | ||
| 1563 | |||
| 1564 | static simd_int8 SIMD_CFUNC simd_int_rte(simd_float8 __x) { | ||
| 1565 | #if defined __AVX__ | ||
| 1566 | return _mm256_cvtps_epi32(__x); | ||
| 1567 | #else | ||
| 1568 | return simd_make_int8(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1569 | #endif | ||
| 1570 | } | ||
| 1571 | |||
| 1572 | static simd_int16 SIMD_CFUNC simd_int_rte(simd_float16 __x) { | ||
| 1573 | #if defined __AVX512F__ | ||
| 1574 | return _mm512_cvt_roundps_epi32(__x, _MM_FROUND_RINT); | ||
| 1575 | #else | ||
| 1576 | return simd_make_int16(simd_int_rte(__x.lo), simd_int_rte(__x.hi)); | ||
| 1577 | #endif | ||
| 1578 | } | ||
| 1579 | |||
| 1580 | static simd_uint2 SIMD_CFUNC simd_uint(simd_char2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1581 | static simd_uint3 SIMD_CFUNC simd_uint(simd_char3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1582 | static simd_uint4 SIMD_CFUNC simd_uint(simd_char4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1583 | static simd_uint8 SIMD_CFUNC simd_uint(simd_char8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1584 | static simd_uint16 SIMD_CFUNC simd_uint(simd_char16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1585 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uchar2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1586 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uchar3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1587 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uchar4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1588 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uchar8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1589 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uchar16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1590 | static simd_uint2 SIMD_CFUNC simd_uint(simd_short2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1591 | static simd_uint3 SIMD_CFUNC simd_uint(simd_short3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1592 | static simd_uint4 SIMD_CFUNC simd_uint(simd_short4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1593 | static simd_uint8 SIMD_CFUNC simd_uint(simd_short8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1594 | static simd_uint16 SIMD_CFUNC simd_uint(simd_short16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1595 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ushort2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1596 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ushort3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1597 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ushort4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1598 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ushort8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1599 | static simd_uint16 SIMD_CFUNC simd_uint(simd_ushort16 __x) { return simd_uint(simd_int(__x)); } | ||
| 1600 | static simd_uint2 SIMD_CFUNC simd_uint(simd_int2 __x) { return (simd_uint2)__x; } | ||
| 1601 | static simd_uint3 SIMD_CFUNC simd_uint(simd_int3 __x) { return (simd_uint3)__x; } | ||
| 1602 | static simd_uint4 SIMD_CFUNC simd_uint(simd_int4 __x) { return (simd_uint4)__x; } | ||
| 1603 | static simd_uint8 SIMD_CFUNC simd_uint(simd_int8 __x) { return (simd_uint8)__x; } | ||
| 1604 | static simd_uint16 SIMD_CFUNC simd_uint(simd_int16 __x) { return (simd_uint16)__x; } | ||
| 1605 | static simd_uint2 SIMD_CFUNC simd_uint(simd_uint2 __x) { return __x; } | ||
| 1606 | static simd_uint3 SIMD_CFUNC simd_uint(simd_uint3 __x) { return __x; } | ||
| 1607 | static simd_uint4 SIMD_CFUNC simd_uint(simd_uint4 __x) { return __x; } | ||
| 1608 | static simd_uint8 SIMD_CFUNC simd_uint(simd_uint8 __x) { return __x; } | ||
| 1609 | static simd_uint16 SIMD_CFUNC simd_uint(simd_uint16 __x) { return __x; } | ||
| 1610 | static simd_uint2 SIMD_CFUNC simd_uint(simd_float2 __x) { simd_int2 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float2)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint2)0,0x80000000,__big); } | ||
| 1611 | static simd_uint3 SIMD_CFUNC simd_uint(simd_float3 __x) { simd_int3 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float3)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint3)0,0x80000000,__big); } | ||
| 1612 | static simd_uint4 SIMD_CFUNC simd_uint(simd_float4 __x) { simd_int4 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float4)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint4)0,0x80000000,__big); } | ||
| 1613 | static simd_uint8 SIMD_CFUNC simd_uint(simd_float8 __x) { simd_int8 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float8)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint8)0,0x80000000,__big); } | ||
| 1614 | static simd_uint16 SIMD_CFUNC simd_uint(simd_float16 __x) { simd_int16 __big = __x > 0x1.0p31f; return simd_uint(simd_int(__x - simd_bitselect((simd_float16)0,0x1.0p31f,__big))) + simd_bitselect((simd_uint16)0,0x80000000,__big); } | ||
| 1615 | static simd_uint2 SIMD_CFUNC simd_uint(simd_long2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1616 | static simd_uint3 SIMD_CFUNC simd_uint(simd_long3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1617 | static simd_uint4 SIMD_CFUNC simd_uint(simd_long4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1618 | static simd_uint8 SIMD_CFUNC simd_uint(simd_long8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1619 | static simd_uint2 SIMD_CFUNC simd_uint(simd_ulong2 __x) { return simd_uint(simd_int(__x)); } | ||
| 1620 | static simd_uint3 SIMD_CFUNC simd_uint(simd_ulong3 __x) { return simd_uint(simd_int(__x)); } | ||
| 1621 | static simd_uint4 SIMD_CFUNC simd_uint(simd_ulong4 __x) { return simd_uint(simd_int(__x)); } | ||
| 1622 | static simd_uint8 SIMD_CFUNC simd_uint(simd_ulong8 __x) { return simd_uint(simd_int(__x)); } | ||
| 1623 | static simd_uint2 SIMD_CFUNC simd_uint(simd_double2 __x) { simd_long2 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double2)0,0x1.0p31,__big))) + simd_bitselect((simd_uint2)0,0x80000000,simd_int(__big)); } | ||
| 1624 | static simd_uint3 SIMD_CFUNC simd_uint(simd_double3 __x) { simd_long3 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double3)0,0x1.0p31,__big))) + simd_bitselect((simd_uint3)0,0x80000000,simd_int(__big)); } | ||
| 1625 | static simd_uint4 SIMD_CFUNC simd_uint(simd_double4 __x) { simd_long4 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double4)0,0x1.0p31,__big))) + simd_bitselect((simd_uint4)0,0x80000000,simd_int(__big)); } | ||
| 1626 | static simd_uint8 SIMD_CFUNC simd_uint(simd_double8 __x) { simd_long8 __big = __x > 0x1.fffffffcp30; return simd_uint(simd_int(__x - simd_bitselect((simd_double8)0,0x1.0p31,__big))) + simd_bitselect((simd_uint8)0,0x80000000,simd_int(__big)); } | ||
| 1627 | |||
| 1628 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_char2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1629 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_char3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1630 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_char4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1631 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_char8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1632 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_char16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1633 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_short2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1634 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_short3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1635 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_short4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1636 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_short8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1637 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_short16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1638 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_int2 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1639 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_int3 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1640 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_int4 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1641 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_int8 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1642 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_int16 __x) { return simd_uint(simd_max(__x,0)); } | ||
| 1643 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_float2 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1644 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_float3 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1645 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_float4 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1646 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_float8 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1647 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_float16 __x) { return simd_bitselect(simd_uint(simd_max(__x,0)), 0xffffffff, __x >= 0x1.0p32f); } | ||
| 1648 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_long2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1649 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_long3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1650 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_long4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1651 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_long8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1652 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_double2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1653 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_double3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1654 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_double4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1655 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_double8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1656 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uchar2 __x) { return simd_uint(__x); } | ||
| 1657 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uchar3 __x) { return simd_uint(__x); } | ||
| 1658 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uchar4 __x) { return simd_uint(__x); } | ||
| 1659 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uchar8 __x) { return simd_uint(__x); } | ||
| 1660 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uchar16 __x) { return simd_uint(__x); } | ||
| 1661 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ushort2 __x) { return simd_uint(__x); } | ||
| 1662 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ushort3 __x) { return simd_uint(__x); } | ||
| 1663 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ushort4 __x) { return simd_uint(__x); } | ||
| 1664 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ushort8 __x) { return simd_uint(__x); } | ||
| 1665 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_ushort16 __x) { return simd_uint(__x); } | ||
| 1666 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_uint2 __x) { return __x; } | ||
| 1667 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_uint3 __x) { return __x; } | ||
| 1668 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_uint4 __x) { return __x; } | ||
| 1669 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_uint8 __x) { return __x; } | ||
| 1670 | static simd_uint16 SIMD_CFUNC simd_uint_sat(simd_uint16 __x) { return __x; } | ||
| 1671 | static simd_uint2 SIMD_CFUNC simd_uint_sat(simd_ulong2 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1672 | static simd_uint3 SIMD_CFUNC simd_uint_sat(simd_ulong3 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1673 | static simd_uint4 SIMD_CFUNC simd_uint_sat(simd_ulong4 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1674 | static simd_uint8 SIMD_CFUNC simd_uint_sat(simd_ulong8 __x) { return simd_uint(simd_clamp(__x,0,0xffffffff)); } | ||
| 1675 | |||
| 1676 | |||
| 1677 | static simd_float2 SIMD_CFUNC simd_float(simd_char2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1678 | static simd_float3 SIMD_CFUNC simd_float(simd_char3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1679 | static simd_float4 SIMD_CFUNC simd_float(simd_char4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1680 | static simd_float8 SIMD_CFUNC simd_float(simd_char8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1681 | static simd_float16 SIMD_CFUNC simd_float(simd_char16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1682 | static simd_float2 SIMD_CFUNC simd_float(simd_uchar2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1683 | static simd_float3 SIMD_CFUNC simd_float(simd_uchar3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1684 | static simd_float4 SIMD_CFUNC simd_float(simd_uchar4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1685 | static simd_float8 SIMD_CFUNC simd_float(simd_uchar8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1686 | static simd_float16 SIMD_CFUNC simd_float(simd_uchar16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1687 | static simd_float2 SIMD_CFUNC simd_float(simd_short2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1688 | static simd_float3 SIMD_CFUNC simd_float(simd_short3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1689 | static simd_float4 SIMD_CFUNC simd_float(simd_short4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1690 | static simd_float8 SIMD_CFUNC simd_float(simd_short8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1691 | static simd_float16 SIMD_CFUNC simd_float(simd_short16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1692 | static simd_float2 SIMD_CFUNC simd_float(simd_ushort2 __x) { return (simd_float2)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1693 | static simd_float3 SIMD_CFUNC simd_float(simd_ushort3 __x) { return (simd_float3)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1694 | static simd_float4 SIMD_CFUNC simd_float(simd_ushort4 __x) { return (simd_float4)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1695 | static simd_float8 SIMD_CFUNC simd_float(simd_ushort8 __x) { return (simd_float8)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1696 | static simd_float16 SIMD_CFUNC simd_float(simd_ushort16 __x) { return (simd_float16)(simd_int(__x) + 0x4b400000) - 0x1.8p23f; } | ||
| 1697 | static simd_float2 SIMD_CFUNC simd_float(simd_int2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1698 | static simd_float3 SIMD_CFUNC simd_float(simd_int3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1699 | static simd_float4 SIMD_CFUNC simd_float(simd_int4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1700 | static simd_float8 SIMD_CFUNC simd_float(simd_int8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1701 | static simd_float16 SIMD_CFUNC simd_float(simd_int16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1702 | static simd_float2 SIMD_CFUNC simd_float(simd_uint2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1703 | static simd_float3 SIMD_CFUNC simd_float(simd_uint3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1704 | static simd_float4 SIMD_CFUNC simd_float(simd_uint4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1705 | static simd_float8 SIMD_CFUNC simd_float(simd_uint8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1706 | static simd_float16 SIMD_CFUNC simd_float(simd_uint16 __x) { return __builtin_convertvector(__x,simd_float16); } | ||
| 1707 | static simd_float2 SIMD_CFUNC simd_float(simd_float2 __x) { return __x; } | ||
| 1708 | static simd_float3 SIMD_CFUNC simd_float(simd_float3 __x) { return __x; } | ||
| 1709 | static simd_float4 SIMD_CFUNC simd_float(simd_float4 __x) { return __x; } | ||
| 1710 | static simd_float8 SIMD_CFUNC simd_float(simd_float8 __x) { return __x; } | ||
| 1711 | static simd_float16 SIMD_CFUNC simd_float(simd_float16 __x) { return __x; } | ||
| 1712 | static simd_float2 SIMD_CFUNC simd_float(simd_long2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1713 | static simd_float3 SIMD_CFUNC simd_float(simd_long3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1714 | static simd_float4 SIMD_CFUNC simd_float(simd_long4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1715 | static simd_float8 SIMD_CFUNC simd_float(simd_long8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1716 | static simd_float2 SIMD_CFUNC simd_float(simd_ulong2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1717 | static simd_float3 SIMD_CFUNC simd_float(simd_ulong3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1718 | static simd_float4 SIMD_CFUNC simd_float(simd_ulong4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1719 | static simd_float8 SIMD_CFUNC simd_float(simd_ulong8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1720 | static simd_float2 SIMD_CFUNC simd_float(simd_double2 __x) { return __builtin_convertvector(__x,simd_float2); } | ||
| 1721 | static simd_float3 SIMD_CFUNC simd_float(simd_double3 __x) { return __builtin_convertvector(__x,simd_float3); } | ||
| 1722 | static simd_float4 SIMD_CFUNC simd_float(simd_double4 __x) { return __builtin_convertvector(__x,simd_float4); } | ||
| 1723 | static simd_float8 SIMD_CFUNC simd_float(simd_double8 __x) { return __builtin_convertvector(__x,simd_float8); } | ||
| 1724 | |||
| 1725 | |||
| 1726 | static simd_long2 SIMD_CFUNC simd_long(simd_char2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1727 | static simd_long3 SIMD_CFUNC simd_long(simd_char3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1728 | static simd_long4 SIMD_CFUNC simd_long(simd_char4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1729 | static simd_long8 SIMD_CFUNC simd_long(simd_char8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1730 | static simd_long2 SIMD_CFUNC simd_long(simd_uchar2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1731 | static simd_long3 SIMD_CFUNC simd_long(simd_uchar3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1732 | static simd_long4 SIMD_CFUNC simd_long(simd_uchar4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1733 | static simd_long8 SIMD_CFUNC simd_long(simd_uchar8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1734 | static simd_long2 SIMD_CFUNC simd_long(simd_short2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1735 | static simd_long3 SIMD_CFUNC simd_long(simd_short3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1736 | static simd_long4 SIMD_CFUNC simd_long(simd_short4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1737 | static simd_long8 SIMD_CFUNC simd_long(simd_short8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1738 | static simd_long2 SIMD_CFUNC simd_long(simd_ushort2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1739 | static simd_long3 SIMD_CFUNC simd_long(simd_ushort3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1740 | static simd_long4 SIMD_CFUNC simd_long(simd_ushort4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1741 | static simd_long8 SIMD_CFUNC simd_long(simd_ushort8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1742 | static simd_long2 SIMD_CFUNC simd_long(simd_int2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1743 | static simd_long3 SIMD_CFUNC simd_long(simd_int3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1744 | static simd_long4 SIMD_CFUNC simd_long(simd_int4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1745 | static simd_long8 SIMD_CFUNC simd_long(simd_int8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1746 | static simd_long2 SIMD_CFUNC simd_long(simd_uint2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1747 | static simd_long3 SIMD_CFUNC simd_long(simd_uint3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1748 | static simd_long4 SIMD_CFUNC simd_long(simd_uint4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1749 | static simd_long8 SIMD_CFUNC simd_long(simd_uint8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1750 | static simd_long2 SIMD_CFUNC simd_long(simd_float2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1751 | static simd_long3 SIMD_CFUNC simd_long(simd_float3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1752 | static simd_long4 SIMD_CFUNC simd_long(simd_float4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1753 | static simd_long8 SIMD_CFUNC simd_long(simd_float8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1754 | static simd_long2 SIMD_CFUNC simd_long(simd_long2 __x) { return __x; } | ||
| 1755 | static simd_long3 SIMD_CFUNC simd_long(simd_long3 __x) { return __x; } | ||
| 1756 | static simd_long4 SIMD_CFUNC simd_long(simd_long4 __x) { return __x; } | ||
| 1757 | static simd_long8 SIMD_CFUNC simd_long(simd_long8 __x) { return __x; } | ||
| 1758 | static simd_long2 SIMD_CFUNC simd_long(simd_ulong2 __x) { return (simd_long2)__x; } | ||
| 1759 | static simd_long3 SIMD_CFUNC simd_long(simd_ulong3 __x) { return (simd_long3)__x; } | ||
| 1760 | static simd_long4 SIMD_CFUNC simd_long(simd_ulong4 __x) { return (simd_long4)__x; } | ||
| 1761 | static simd_long8 SIMD_CFUNC simd_long(simd_ulong8 __x) { return (simd_long8)__x; } | ||
| 1762 | static simd_long2 SIMD_CFUNC simd_long(simd_double2 __x) { return __builtin_convertvector(__x,simd_long2); } | ||
| 1763 | static simd_long3 SIMD_CFUNC simd_long(simd_double3 __x) { return __builtin_convertvector(__x,simd_long3); } | ||
| 1764 | static simd_long4 SIMD_CFUNC simd_long(simd_double4 __x) { return __builtin_convertvector(__x,simd_long4); } | ||
| 1765 | static simd_long8 SIMD_CFUNC simd_long(simd_double8 __x) { return __builtin_convertvector(__x,simd_long8); } | ||
| 1766 | |||
| 1767 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_char2 __x) { return simd_long(__x); } | ||
| 1768 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_char3 __x) { return simd_long(__x); } | ||
| 1769 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_char4 __x) { return simd_long(__x); } | ||
| 1770 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_char8 __x) { return simd_long(__x); } | ||
| 1771 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_short2 __x) { return simd_long(__x); } | ||
| 1772 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_short3 __x) { return simd_long(__x); } | ||
| 1773 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_short4 __x) { return simd_long(__x); } | ||
| 1774 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_short8 __x) { return simd_long(__x); } | ||
| 1775 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_int2 __x) { return simd_long(__x); } | ||
| 1776 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_int3 __x) { return simd_long(__x); } | ||
| 1777 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_int4 __x) { return simd_long(__x); } | ||
| 1778 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_int8 __x) { return simd_long(__x); } | ||
| 1779 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_float2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1780 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_float3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1781 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_float4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1782 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_float8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63f)), 0x7fffffffffffffff, simd_long(__x >= 0x1.0p63f)); } | ||
| 1783 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_long2 __x) { return __x; } | ||
| 1784 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_long3 __x) { return __x; } | ||
| 1785 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_long4 __x) { return __x; } | ||
| 1786 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_long8 __x) { return __x; } | ||
| 1787 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_double2 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1788 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_double3 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1789 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_double4 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1790 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_double8 __x) { return simd_bitselect(simd_long(simd_max(__x,-0x1.0p63)), 0x7fffffffffffffff, __x >= 0x1.0p63); } | ||
| 1791 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uchar2 __x) { return simd_long(__x); } | ||
| 1792 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uchar3 __x) { return simd_long(__x); } | ||
| 1793 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uchar4 __x) { return simd_long(__x); } | ||
| 1794 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uchar8 __x) { return simd_long(__x); } | ||
| 1795 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ushort2 __x) { return simd_long(__x); } | ||
| 1796 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ushort3 __x) { return simd_long(__x); } | ||
| 1797 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ushort4 __x) { return simd_long(__x); } | ||
| 1798 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ushort8 __x) { return simd_long(__x); } | ||
| 1799 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_uint2 __x) { return simd_long(__x); } | ||
| 1800 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_uint3 __x) { return simd_long(__x); } | ||
| 1801 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_uint4 __x) { return simd_long(__x); } | ||
| 1802 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_uint8 __x) { return simd_long(__x); } | ||
| 1803 | static simd_long2 SIMD_CFUNC simd_long_sat(simd_ulong2 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1804 | static simd_long3 SIMD_CFUNC simd_long_sat(simd_ulong3 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1805 | static simd_long4 SIMD_CFUNC simd_long_sat(simd_ulong4 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1806 | static simd_long8 SIMD_CFUNC simd_long_sat(simd_ulong8 __x) { return simd_long(simd_min(__x,0x7fffffffffffffff)); } | ||
| 1807 | |||
| 1808 | static simd_long2 SIMD_CFUNC simd_long_rte(simd_double2 __x) { | ||
| 1809 | #if defined __AVX512F__ | ||
| 1810 | return _mm_cvtpd_epi64(__x); | ||
| 1811 | #elif defined __arm64__ | ||
| 1812 | return vcvtnq_s64_f64(__x); | ||
| 1813 | #else | ||
| 1814 | simd_double2 magic = __tg_copysign(0x1.0p52, __x); | ||
| 1815 | simd_long2 x_is_small = __tg_fabs(__x) < 0x1.0p52; | ||
| 1816 | return __builtin_convertvector(simd_bitselect(__x, (__x + magic) - magic, x_is_small & 0x7fffffffffffffff), simd_long2); | ||
| 1817 | #endif | ||
| 1818 | } | ||
| 1819 | |||
| 1820 | static simd_long3 SIMD_CFUNC simd_long_rte(simd_double3 __x) { | ||
| 1821 | return simd_make_long3(simd_long_rte(simd_make_double4_undef(__x))); | ||
| 1822 | } | ||
| 1823 | |||
| 1824 | static simd_long4 SIMD_CFUNC simd_long_rte(simd_double4 __x) { | ||
| 1825 | #if defined __AVX512F__ | ||
| 1826 | return _mm256_cvtpd_epi64(__x); | ||
| 1827 | #else | ||
| 1828 | return simd_make_long4(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1829 | #endif | ||
| 1830 | } | ||
| 1831 | |||
| 1832 | static simd_long8 SIMD_CFUNC simd_long_rte(simd_double8 __x) { | ||
| 1833 | #if defined __AVX512F__ | ||
| 1834 | return _mm512_cvt_roundpd_epi64(__x, _MM_FROUND_RINT); | ||
| 1835 | #else | ||
| 1836 | return simd_make_long8(simd_long_rte(__x.lo), simd_long_rte(__x.hi)); | ||
| 1837 | #endif | ||
| 1838 | } | ||
| 1839 | |||
| 1840 | |||
| 1841 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_char2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1842 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_char3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1843 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_char4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1844 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_char8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1845 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uchar2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1846 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uchar3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1847 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uchar4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1848 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uchar8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1849 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_short2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1850 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_short3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1851 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_short4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1852 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_short8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1853 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ushort2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1854 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ushort3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1855 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ushort4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1856 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ushort8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1857 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_int2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1858 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_int3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1859 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_int4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1860 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_int8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1861 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_uint2 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1862 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_uint3 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1863 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_uint4 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1864 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_uint8 __x) { return simd_ulong(simd_long(__x)); } | ||
| 1865 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_float2 __x) { simd_int2 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float2)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,simd_long(__big)); } | ||
| 1866 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_float3 __x) { simd_int3 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float3)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,simd_long(__big)); } | ||
| 1867 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_float4 __x) { simd_int4 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float4)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,simd_long(__big)); } | ||
| 1868 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_float8 __x) { simd_int8 __big = __x >= 0x1.0p63f; return simd_ulong(simd_long(__x - simd_bitselect((simd_float8)0,0x1.0p63f,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,simd_long(__big)); } | ||
| 1869 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_long2 __x) { return (simd_ulong2)__x; } | ||
| 1870 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_long3 __x) { return (simd_ulong3)__x; } | ||
| 1871 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_long4 __x) { return (simd_ulong4)__x; } | ||
| 1872 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_long8 __x) { return (simd_ulong8)__x; } | ||
| 1873 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_ulong2 __x) { return __x; } | ||
| 1874 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_ulong3 __x) { return __x; } | ||
| 1875 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_ulong4 __x) { return __x; } | ||
| 1876 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_ulong8 __x) { return __x; } | ||
| 1877 | static simd_ulong2 SIMD_CFUNC simd_ulong(simd_double2 __x) { simd_long2 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double2)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong2)0,0x8000000000000000,__big); } | ||
| 1878 | static simd_ulong3 SIMD_CFUNC simd_ulong(simd_double3 __x) { simd_long3 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double3)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong3)0,0x8000000000000000,__big); } | ||
| 1879 | static simd_ulong4 SIMD_CFUNC simd_ulong(simd_double4 __x) { simd_long4 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double4)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong4)0,0x8000000000000000,__big); } | ||
| 1880 | static simd_ulong8 SIMD_CFUNC simd_ulong(simd_double8 __x) { simd_long8 __big = __x >= 0x1.0p63; return simd_ulong(simd_long(__x - simd_bitselect((simd_double8)0,0x1.0p63,__big))) + simd_bitselect((simd_ulong8)0,0x8000000000000000,__big); } | ||
| 1881 | |||
| 1882 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_char2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1883 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_char3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1884 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_char4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1885 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_char8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1886 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_short2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1887 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_short3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1888 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_short4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1889 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_short8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1890 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_int2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1891 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_int3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1892 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_int4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1893 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_int8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1894 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_float2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1895 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_float3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1896 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_float4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1897 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_float8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.f)), 0xffffffffffffffff, simd_long(__x >= 0x1.0p64f)); } | ||
| 1898 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_long2 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1899 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_long3 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1900 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_long4 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1901 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_long8 __x) { return simd_ulong(simd_max(__x,0)); } | ||
| 1902 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_double2 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1903 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_double3 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1904 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_double4 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1905 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_double8 __x) { return simd_bitselect(simd_ulong(simd_max(__x,0.0)), 0xffffffffffffffff, __x >= 0x1.0p64); } | ||
| 1906 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uchar2 __x) { return simd_ulong(__x); } | ||
| 1907 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uchar3 __x) { return simd_ulong(__x); } | ||
| 1908 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uchar4 __x) { return simd_ulong(__x); } | ||
| 1909 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uchar8 __x) { return simd_ulong(__x); } | ||
| 1910 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ushort2 __x) { return simd_ulong(__x); } | ||
| 1911 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ushort3 __x) { return simd_ulong(__x); } | ||
| 1912 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ushort4 __x) { return simd_ulong(__x); } | ||
| 1913 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ushort8 __x) { return simd_ulong(__x); } | ||
| 1914 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_uint2 __x) { return simd_ulong(__x); } | ||
| 1915 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_uint3 __x) { return simd_ulong(__x); } | ||
| 1916 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_uint4 __x) { return simd_ulong(__x); } | ||
| 1917 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_uint8 __x) { return simd_ulong(__x); } | ||
| 1918 | static simd_ulong2 SIMD_CFUNC simd_ulong_sat(simd_ulong2 __x) { return __x; } | ||
| 1919 | static simd_ulong3 SIMD_CFUNC simd_ulong_sat(simd_ulong3 __x) { return __x; } | ||
| 1920 | static simd_ulong4 SIMD_CFUNC simd_ulong_sat(simd_ulong4 __x) { return __x; } | ||
| 1921 | static simd_ulong8 SIMD_CFUNC simd_ulong_sat(simd_ulong8 __x) { return __x; } | ||
| 1922 | |||
| 1923 | |||
| 1924 | static simd_double2 SIMD_CFUNC simd_double(simd_char2 __x) { return simd_double(simd_int(__x)); } | ||
| 1925 | static simd_double3 SIMD_CFUNC simd_double(simd_char3 __x) { return simd_double(simd_int(__x)); } | ||
| 1926 | static simd_double4 SIMD_CFUNC simd_double(simd_char4 __x) { return simd_double(simd_int(__x)); } | ||
| 1927 | static simd_double8 SIMD_CFUNC simd_double(simd_char8 __x) { return simd_double(simd_int(__x)); } | ||
| 1928 | static simd_double2 SIMD_CFUNC simd_double(simd_uchar2 __x) { return simd_double(simd_int(__x)); } | ||
| 1929 | static simd_double3 SIMD_CFUNC simd_double(simd_uchar3 __x) { return simd_double(simd_int(__x)); } | ||
| 1930 | static simd_double4 SIMD_CFUNC simd_double(simd_uchar4 __x) { return simd_double(simd_int(__x)); } | ||
| 1931 | static simd_double8 SIMD_CFUNC simd_double(simd_uchar8 __x) { return simd_double(simd_int(__x)); } | ||
| 1932 | static simd_double2 SIMD_CFUNC simd_double(simd_short2 __x) { return simd_double(simd_int(__x)); } | ||
| 1933 | static simd_double3 SIMD_CFUNC simd_double(simd_short3 __x) { return simd_double(simd_int(__x)); } | ||
| 1934 | static simd_double4 SIMD_CFUNC simd_double(simd_short4 __x) { return simd_double(simd_int(__x)); } | ||
| 1935 | static simd_double8 SIMD_CFUNC simd_double(simd_short8 __x) { return simd_double(simd_int(__x)); } | ||
| 1936 | static simd_double2 SIMD_CFUNC simd_double(simd_ushort2 __x) { return simd_double(simd_int(__x)); } | ||
| 1937 | static simd_double3 SIMD_CFUNC simd_double(simd_ushort3 __x) { return simd_double(simd_int(__x)); } | ||
| 1938 | static simd_double4 SIMD_CFUNC simd_double(simd_ushort4 __x) { return simd_double(simd_int(__x)); } | ||
| 1939 | static simd_double8 SIMD_CFUNC simd_double(simd_ushort8 __x) { return simd_double(simd_int(__x)); } | ||
| 1940 | static simd_double2 SIMD_CFUNC simd_double(simd_int2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1941 | static simd_double3 SIMD_CFUNC simd_double(simd_int3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1942 | static simd_double4 SIMD_CFUNC simd_double(simd_int4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1943 | static simd_double8 SIMD_CFUNC simd_double(simd_int8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1944 | static simd_double2 SIMD_CFUNC simd_double(simd_uint2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1945 | static simd_double3 SIMD_CFUNC simd_double(simd_uint3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1946 | static simd_double4 SIMD_CFUNC simd_double(simd_uint4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1947 | static simd_double8 SIMD_CFUNC simd_double(simd_uint8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1948 | static simd_double2 SIMD_CFUNC simd_double(simd_float2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1949 | static simd_double3 SIMD_CFUNC simd_double(simd_float3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1950 | static simd_double4 SIMD_CFUNC simd_double(simd_float4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1951 | static simd_double8 SIMD_CFUNC simd_double(simd_float8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1952 | static simd_double2 SIMD_CFUNC simd_double(simd_long2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1953 | static simd_double3 SIMD_CFUNC simd_double(simd_long3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1954 | static simd_double4 SIMD_CFUNC simd_double(simd_long4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1955 | static simd_double8 SIMD_CFUNC simd_double(simd_long8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1956 | static simd_double2 SIMD_CFUNC simd_double(simd_ulong2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1957 | static simd_double3 SIMD_CFUNC simd_double(simd_ulong3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1958 | static simd_double4 SIMD_CFUNC simd_double(simd_ulong4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1959 | static simd_double8 SIMD_CFUNC simd_double(simd_ulong8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1960 | static simd_double2 SIMD_CFUNC simd_double(simd_double2 __x) { return __builtin_convertvector(__x, simd_double2); } | ||
| 1961 | static simd_double3 SIMD_CFUNC simd_double(simd_double3 __x) { return __builtin_convertvector(__x, simd_double3); } | ||
| 1962 | static simd_double4 SIMD_CFUNC simd_double(simd_double4 __x) { return __builtin_convertvector(__x, simd_double4); } | ||
| 1963 | static simd_double8 SIMD_CFUNC simd_double(simd_double8 __x) { return __builtin_convertvector(__x, simd_double8); } | ||
| 1964 | |||
| 1965 | |||
| 1966 | #ifdef __cplusplus | ||
| 1967 | } // extern "C" | ||
| 1968 | |||
| 1969 | namespace simd { | ||
| 1970 | |||
| 1971 | #if __has_feature(cxx_constexpr) | ||
| 1972 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements. */ | ||
| 1973 | template<typename ScalarType, typename typeN> | ||
| 1974 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert(typeN vector) | ||
| 1975 | { | ||
| 1976 | if constexpr (traits<typeN>::count == 1) | ||
| 1977 | return static_cast<Vector_t<ScalarType, traits<typeN>::count>>(vector); | ||
| 1978 | else if constexpr (std::is_same<ScalarType, char1>::value) | ||
| 1979 | return simd_char(vector); | ||
| 1980 | else if constexpr (std::is_same<ScalarType, uchar1>::value) | ||
| 1981 | return simd_uchar(vector); | ||
| 1982 | else if constexpr (std::is_same<ScalarType, short1>::value) | ||
| 1983 | return simd_short(vector); | ||
| 1984 | else if constexpr (std::is_same<ScalarType, ushort1>::value) | ||
| 1985 | return simd_ushort(vector); | ||
| 1986 | else if constexpr (std::is_same<ScalarType, int1>::value) | ||
| 1987 | return simd_int(vector); | ||
| 1988 | else if constexpr (std::is_same<ScalarType, uint1>::value) | ||
| 1989 | return simd_uint(vector); | ||
| 1990 | else if constexpr (std::is_same<ScalarType, long1>::value) | ||
| 1991 | return simd_long(vector); | ||
| 1992 | else if constexpr (std::is_same<ScalarType, ulong1>::value) | ||
| 1993 | return simd_ulong(vector); | ||
| 1994 | else if constexpr (std::is_same<ScalarType, float1>::value) | ||
| 1995 | return simd_float(vector); | ||
| 1996 | else if constexpr (std::is_same<ScalarType, double1>::value) | ||
| 1997 | return simd_double(vector); | ||
| 1998 | } | ||
| 1999 | |||
| 2000 | /*! @abstract Convert a vector to another vector of the ScalarType and the same number of elements with saturation. | ||
| 2001 | * @discussion When the input value is too large to be represented in the return type, the input value | ||
| 2002 | * will be saturated to the maximum value of the return type. */ | ||
| 2003 | template<typename ScalarType, typename typeN> | ||
| 2004 | static constexpr Vector_t<ScalarType, traits<typeN>::count> convert_sat(typeN vector) | ||
| 2005 | { | ||
| 2006 | static_assert(traits<typeN>::count != 1); | ||
| 2007 | if constexpr (std::is_same<ScalarType, char1>::value) | ||
| 2008 | return simd_char_sat(vector); | ||
| 2009 | else if constexpr (std::is_same<ScalarType, uchar1>::value) | ||
| 2010 | return simd_uchar_sat(vector); | ||
| 2011 | else if constexpr (std::is_same<ScalarType, short1>::value) | ||
| 2012 | return simd_short_sat(vector); | ||
| 2013 | else if constexpr (std::is_same<ScalarType, ushort1>::value) | ||
| 2014 | return simd_ushort_sat(vector); | ||
| 2015 | else if constexpr (std::is_same<ScalarType, int1>::value) | ||
| 2016 | return simd_int_sat(vector); | ||
| 2017 | else if constexpr (std::is_same<ScalarType, uint1>::value) | ||
| 2018 | return simd_uint_sat(vector); | ||
| 2019 | else if constexpr (std::is_same<ScalarType, long1>::value) | ||
| 2020 | return simd_long_sat(vector); | ||
| 2021 | else if constexpr (std::is_same<ScalarType, ulong1>::value) | ||
| 2022 | return simd_ulong_sat(vector); | ||
| 2023 | else | ||
| 2024 | return convert<ScalarType, typeN>(vector); | ||
| 2025 | } | ||
| 2026 | #endif /* __has_feature(cxx_constexpr) */ | ||
| 2027 | |||
| 2028 | } /* namespace simd */ | ||
| 2029 | #endif // __cplusplus | ||
| 2030 | #endif // SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 2031 | #endif // __SIMD_CONVERSION_HEADER__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/math.h deleted-5783| ... | @@ -1,5783 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * The interfaces declared in this header provide elementwise math operations | ||
| 3 | * on vectors; each lane of the result vector depends only on the data in the | ||
| 4 | * corresponding lane of the argument(s) to the function. | ||
| 5 | * | ||
| 6 | * You should not use the C functions declared in this header directly (these | ||
| 7 | * are functions with names like `__tg_cos(x)`). These are merely | ||
| 8 | * implementation details of <tgmath.h> overloading; instead of calling | ||
| 9 | * `__tg_cos(x)`, call `cos(x)`. If you are writing C++, use `simd::cos(x)`. | ||
| 10 | * | ||
| 11 | * Note that while these vector functions are relatively recent additions, | ||
| 12 | * scalar fallback is provided for all of them, so they are available even | ||
| 13 | * when targeting older OS versions. | ||
| 14 | * | ||
| 15 | * The following functions are available: | ||
| 16 | * | ||
| 17 | * C name C++ name Notes | ||
| 18 | * ---------------------------------------------------------------------- | ||
| 19 | * acos(x) simd::acos(x) | ||
| 20 | * asin(x) simd::asin(x) | ||
| 21 | * atan(x) simd::atan(x) | ||
| 22 | * atan2(y,x) simd::atan2(y,x) The argument order matches the scalar | ||
| 23 | * atan2 function, which gives the angle | ||
| 24 | * of a line with slope y/x. | ||
| 25 | * cos(x) simd::cos(x) | ||
| 26 | * sin(x) simd::sin(x) | ||
| 27 | * tan(x) simd::tan(x) | ||
| 28 | * | ||
| 29 | * cospi(x) simd::cospi(x) Returns cos(pi*x), sin(pi*x), tan(pi*x) | ||
| 30 | * sinpi(x) simd::sinpi(x) more efficiently and accurately than | ||
| 31 | * tanpi(x) simd::tanpi(x) would otherwise be possible | ||
| 32 | * | ||
| 33 | * acosh(x) simd::acosh(x) | ||
| 34 | * asinh(x) simd::asinh(x) | ||
| 35 | * atanh(x) simd::atanh(x) | ||
| 36 | * | ||
| 37 | * cosh(x) simd::cosh(x) | ||
| 38 | * sinh(x) simd::sinh(x) | ||
| 39 | * tanh(x) simd::tanh(x) | ||
| 40 | * | ||
| 41 | * exp(x) simd::exp(x) | ||
| 42 | * exp2(x) simd::exp2(x) | ||
| 43 | * exp10(x) simd::exp10(x) More efficient that pow(10,x). | ||
| 44 | * expm1(x) simd::expm1(x) exp(x)-1, accurate even for tiny x. | ||
| 45 | * | ||
| 46 | * log(x) simd::log(x) | ||
| 47 | * log2(x) simd::log2(x) | ||
| 48 | * log10(x) simd::log10(x) | ||
| 49 | * log1p(x) simd::log1p(x) log(1+x), accurate even for tiny x. | ||
| 50 | * | ||
| 51 | * fabs(x) simd::fabs(x) | ||
| 52 | * cbrt(x) simd::cbrt(x) | ||
| 53 | * sqrt(x) simd::sqrt(x) | ||
| 54 | * pow(x,y) simd::pow(x,y) | ||
| 55 | * copysign(x,y) simd::copysign(x,y) | ||
| 56 | * hypot(x,y) simd::hypot(x,y) sqrt(x*x + y*y), computed without | ||
| 57 | * overflow.1 | ||
| 58 | * erf(x) simd::erf(x) | ||
| 59 | * erfc(x) simd::erfc(x) | ||
| 60 | * tgamma(x) simd::tgamma(x) | ||
| 61 | * lgamma(x) simd::lgamma(x) | ||
| 62 | * | ||
| 63 | * fmod(x,y) simd::fmod(x,y) | ||
| 64 | * remainder(x,y) simd::remainder(x,y) | ||
| 65 | * | ||
| 66 | * ceil(x) simd::ceil(x) | ||
| 67 | * floor(x) simd::floor(x) | ||
| 68 | * rint(x) simd::rint(x) | ||
| 69 | * round(x) simd::round(x) | ||
| 70 | * trunc(x) simd::trunc(x) | ||
| 71 | * | ||
| 72 | * fdim(x,y) simd::fdim(x,y) | ||
| 73 | * fmax(x,y) simd::fmax(x,y) When one argument to fmin or fmax is | ||
| 74 | * fmin(x,y) simd::fmin(x,y) constant, use it as the *second* (y) | ||
| 75 | * argument to get better codegen on some | ||
| 76 | * architectures. E.g., write fmin(x,2) | ||
| 77 | * instead of fmin(2,x). | ||
| 78 | * fma(x,y,z) simd::fma(x,y,z) Fast on arm64 and when targeting AVX2 | ||
| 79 | * and later; may be quite expensive on | ||
| 80 | * older hardware. | ||
| 81 | * simd_muladd(x,y,z) simd::muladd(x,y,z) | ||
| 82 | * | ||
| 83 | * @copyright 2014-2017 Apple, Inc. All rights reserved. | ||
| 84 | * @unsorted */ | ||
| 85 | |||
| 86 | #ifndef SIMD_MATH_HEADER | ||
| 87 | #define SIMD_MATH_HEADER | ||
| 88 | |||
| 89 | #include <simd/base.h> | ||
| 90 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 91 | #include <simd/vector_make.h> | ||
| 92 | #include <simd/logic.h> | ||
| 93 | |||
| 94 | #ifdef __cplusplus | ||
| 95 | extern "C" { | ||
| 96 | #endif | ||
| 97 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 98 | * Objective-C, and `simd::acos` in C++. */ | ||
| 99 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x); | ||
| 100 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 101 | * Objective-C, and `simd::acos` in C++. */ | ||
| 102 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x); | ||
| 103 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 104 | * Objective-C, and `simd::acos` in C++. */ | ||
| 105 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x); | ||
| 106 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 107 | * Objective-C, and `simd::acos` in C++. */ | ||
| 108 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x); | ||
| 109 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 110 | * Objective-C, and `simd::acos` in C++. */ | ||
| 111 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x); | ||
| 112 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 113 | * Objective-C, and `simd::acos` in C++. */ | ||
| 114 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x); | ||
| 115 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 116 | * Objective-C, and `simd::acos` in C++. */ | ||
| 117 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x); | ||
| 118 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 119 | * Objective-C, and `simd::acos` in C++. */ | ||
| 120 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x); | ||
| 121 | /*! @abstract Do not call this function; instead use `acos` in C and | ||
| 122 | * Objective-C, and `simd::acos` in C++. */ | ||
| 123 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x); | ||
| 124 | |||
| 125 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 126 | * Objective-C, and `simd::asin` in C++. */ | ||
| 127 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x); | ||
| 128 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 129 | * Objective-C, and `simd::asin` in C++. */ | ||
| 130 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x); | ||
| 131 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 132 | * Objective-C, and `simd::asin` in C++. */ | ||
| 133 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x); | ||
| 134 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 135 | * Objective-C, and `simd::asin` in C++. */ | ||
| 136 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x); | ||
| 137 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 138 | * Objective-C, and `simd::asin` in C++. */ | ||
| 139 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x); | ||
| 140 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 141 | * Objective-C, and `simd::asin` in C++. */ | ||
| 142 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x); | ||
| 143 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 144 | * Objective-C, and `simd::asin` in C++. */ | ||
| 145 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x); | ||
| 146 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 147 | * Objective-C, and `simd::asin` in C++. */ | ||
| 148 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x); | ||
| 149 | /*! @abstract Do not call this function; instead use `asin` in C and | ||
| 150 | * Objective-C, and `simd::asin` in C++. */ | ||
| 151 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x); | ||
| 152 | |||
| 153 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 154 | * Objective-C, and `simd::atan` in C++. */ | ||
| 155 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x); | ||
| 156 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 157 | * Objective-C, and `simd::atan` in C++. */ | ||
| 158 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x); | ||
| 159 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 160 | * Objective-C, and `simd::atan` in C++. */ | ||
| 161 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x); | ||
| 162 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 163 | * Objective-C, and `simd::atan` in C++. */ | ||
| 164 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x); | ||
| 165 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 166 | * Objective-C, and `simd::atan` in C++. */ | ||
| 167 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x); | ||
| 168 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 169 | * Objective-C, and `simd::atan` in C++. */ | ||
| 170 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x); | ||
| 171 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 172 | * Objective-C, and `simd::atan` in C++. */ | ||
| 173 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x); | ||
| 174 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 175 | * Objective-C, and `simd::atan` in C++. */ | ||
| 176 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x); | ||
| 177 | /*! @abstract Do not call this function; instead use `atan` in C and | ||
| 178 | * Objective-C, and `simd::atan` in C++. */ | ||
| 179 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x); | ||
| 180 | |||
| 181 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 182 | * Objective-C, and `simd::cos` in C++. */ | ||
| 183 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x); | ||
| 184 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 185 | * Objective-C, and `simd::cos` in C++. */ | ||
| 186 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x); | ||
| 187 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 188 | * Objective-C, and `simd::cos` in C++. */ | ||
| 189 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x); | ||
| 190 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 191 | * Objective-C, and `simd::cos` in C++. */ | ||
| 192 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x); | ||
| 193 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 194 | * Objective-C, and `simd::cos` in C++. */ | ||
| 195 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x); | ||
| 196 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 197 | * Objective-C, and `simd::cos` in C++. */ | ||
| 198 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x); | ||
| 199 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 200 | * Objective-C, and `simd::cos` in C++. */ | ||
| 201 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x); | ||
| 202 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 203 | * Objective-C, and `simd::cos` in C++. */ | ||
| 204 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x); | ||
| 205 | /*! @abstract Do not call this function; instead use `cos` in C and | ||
| 206 | * Objective-C, and `simd::cos` in C++. */ | ||
| 207 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x); | ||
| 208 | |||
| 209 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 210 | * Objective-C, and `simd::sin` in C++. */ | ||
| 211 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x); | ||
| 212 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 213 | * Objective-C, and `simd::sin` in C++. */ | ||
| 214 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x); | ||
| 215 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 216 | * Objective-C, and `simd::sin` in C++. */ | ||
| 217 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x); | ||
| 218 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 219 | * Objective-C, and `simd::sin` in C++. */ | ||
| 220 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x); | ||
| 221 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 222 | * Objective-C, and `simd::sin` in C++. */ | ||
| 223 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x); | ||
| 224 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 225 | * Objective-C, and `simd::sin` in C++. */ | ||
| 226 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x); | ||
| 227 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 228 | * Objective-C, and `simd::sin` in C++. */ | ||
| 229 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x); | ||
| 230 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 231 | * Objective-C, and `simd::sin` in C++. */ | ||
| 232 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x); | ||
| 233 | /*! @abstract Do not call this function; instead use `sin` in C and | ||
| 234 | * Objective-C, and `simd::sin` in C++. */ | ||
| 235 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x); | ||
| 236 | |||
| 237 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 238 | * Objective-C, and `simd::tan` in C++. */ | ||
| 239 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x); | ||
| 240 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 241 | * Objective-C, and `simd::tan` in C++. */ | ||
| 242 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x); | ||
| 243 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 244 | * Objective-C, and `simd::tan` in C++. */ | ||
| 245 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x); | ||
| 246 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 247 | * Objective-C, and `simd::tan` in C++. */ | ||
| 248 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x); | ||
| 249 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 250 | * Objective-C, and `simd::tan` in C++. */ | ||
| 251 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x); | ||
| 252 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 253 | * Objective-C, and `simd::tan` in C++. */ | ||
| 254 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x); | ||
| 255 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 256 | * Objective-C, and `simd::tan` in C++. */ | ||
| 257 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x); | ||
| 258 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 259 | * Objective-C, and `simd::tan` in C++. */ | ||
| 260 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x); | ||
| 261 | /*! @abstract Do not call this function; instead use `tan` in C and | ||
| 262 | * Objective-C, and `simd::tan` in C++. */ | ||
| 263 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x); | ||
| 264 | |||
| 265 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 266 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 267 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 268 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x); | ||
| 269 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 270 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 271 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x); | ||
| 272 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 273 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 274 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x); | ||
| 275 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 276 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 277 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x); | ||
| 278 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 279 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 280 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x); | ||
| 281 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 282 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 283 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x); | ||
| 284 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 285 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 286 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x); | ||
| 287 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 288 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 289 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x); | ||
| 290 | /*! @abstract Do not call this function; instead use `cospi` in C and | ||
| 291 | * Objective-C, and `simd::cospi` in C++. */ | ||
| 292 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x); | ||
| 293 | #endif | ||
| 294 | |||
| 295 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 296 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 297 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 298 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x); | ||
| 299 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 300 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 301 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x); | ||
| 302 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 303 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 304 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x); | ||
| 305 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 306 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 307 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x); | ||
| 308 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 309 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 310 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x); | ||
| 311 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 312 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 313 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x); | ||
| 314 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 315 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 316 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x); | ||
| 317 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 318 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 319 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x); | ||
| 320 | /*! @abstract Do not call this function; instead use `sinpi` in C and | ||
| 321 | * Objective-C, and `simd::sinpi` in C++. */ | ||
| 322 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x); | ||
| 323 | #endif | ||
| 324 | |||
| 325 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 326 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 327 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 328 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x); | ||
| 329 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 330 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 331 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x); | ||
| 332 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 333 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 334 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x); | ||
| 335 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 336 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 337 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x); | ||
| 338 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 339 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 340 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x); | ||
| 341 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 342 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 343 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x); | ||
| 344 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 345 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 346 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x); | ||
| 347 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 348 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 349 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x); | ||
| 350 | /*! @abstract Do not call this function; instead use `tanpi` in C and | ||
| 351 | * Objective-C, and `simd::tanpi` in C++. */ | ||
| 352 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x); | ||
| 353 | #endif | ||
| 354 | |||
| 355 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 356 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 357 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x); | ||
| 358 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 359 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 360 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x); | ||
| 361 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 362 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 363 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x); | ||
| 364 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 365 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 366 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x); | ||
| 367 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 368 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 369 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x); | ||
| 370 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 371 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 372 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x); | ||
| 373 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 374 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 375 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x); | ||
| 376 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 377 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 378 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x); | ||
| 379 | /*! @abstract Do not call this function; instead use `acosh` in C and | ||
| 380 | * Objective-C, and `simd::acosh` in C++. */ | ||
| 381 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x); | ||
| 382 | |||
| 383 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 384 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 385 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x); | ||
| 386 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 387 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 388 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x); | ||
| 389 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 390 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 391 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x); | ||
| 392 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 393 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 394 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x); | ||
| 395 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 396 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 397 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x); | ||
| 398 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 399 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 400 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x); | ||
| 401 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 402 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 403 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x); | ||
| 404 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 405 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 406 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x); | ||
| 407 | /*! @abstract Do not call this function; instead use `asinh` in C and | ||
| 408 | * Objective-C, and `simd::asinh` in C++. */ | ||
| 409 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x); | ||
| 410 | |||
| 411 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 412 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 413 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x); | ||
| 414 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 415 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 416 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x); | ||
| 417 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 418 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 419 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x); | ||
| 420 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 421 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 422 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x); | ||
| 423 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 424 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 425 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x); | ||
| 426 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 427 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 428 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x); | ||
| 429 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 430 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 431 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x); | ||
| 432 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 433 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 434 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x); | ||
| 435 | /*! @abstract Do not call this function; instead use `atanh` in C and | ||
| 436 | * Objective-C, and `simd::atanh` in C++. */ | ||
| 437 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x); | ||
| 438 | |||
| 439 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 440 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 441 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x); | ||
| 442 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 443 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 444 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x); | ||
| 445 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 446 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 447 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x); | ||
| 448 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 449 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 450 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x); | ||
| 451 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 452 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 453 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x); | ||
| 454 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 455 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 456 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x); | ||
| 457 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 458 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 459 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x); | ||
| 460 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 461 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 462 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x); | ||
| 463 | /*! @abstract Do not call this function; instead use `cosh` in C and | ||
| 464 | * Objective-C, and `simd::cosh` in C++. */ | ||
| 465 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x); | ||
| 466 | |||
| 467 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 468 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 469 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x); | ||
| 470 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 471 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 472 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x); | ||
| 473 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 474 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 475 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x); | ||
| 476 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 477 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 478 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x); | ||
| 479 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 480 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 481 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x); | ||
| 482 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 483 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 484 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x); | ||
| 485 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 486 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 487 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x); | ||
| 488 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 489 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 490 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x); | ||
| 491 | /*! @abstract Do not call this function; instead use `sinh` in C and | ||
| 492 | * Objective-C, and `simd::sinh` in C++. */ | ||
| 493 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x); | ||
| 494 | |||
| 495 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 496 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 497 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x); | ||
| 498 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 499 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 500 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x); | ||
| 501 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 502 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 503 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x); | ||
| 504 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 505 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 506 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x); | ||
| 507 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 508 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 509 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x); | ||
| 510 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 511 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 512 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x); | ||
| 513 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 514 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 515 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x); | ||
| 516 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 517 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 518 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x); | ||
| 519 | /*! @abstract Do not call this function; instead use `tanh` in C and | ||
| 520 | * Objective-C, and `simd::tanh` in C++. */ | ||
| 521 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x); | ||
| 522 | |||
| 523 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 524 | * Objective-C, and `simd::exp` in C++. */ | ||
| 525 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x); | ||
| 526 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 527 | * Objective-C, and `simd::exp` in C++. */ | ||
| 528 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x); | ||
| 529 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 530 | * Objective-C, and `simd::exp` in C++. */ | ||
| 531 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x); | ||
| 532 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 533 | * Objective-C, and `simd::exp` in C++. */ | ||
| 534 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x); | ||
| 535 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 536 | * Objective-C, and `simd::exp` in C++. */ | ||
| 537 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x); | ||
| 538 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 539 | * Objective-C, and `simd::exp` in C++. */ | ||
| 540 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x); | ||
| 541 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 542 | * Objective-C, and `simd::exp` in C++. */ | ||
| 543 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x); | ||
| 544 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 545 | * Objective-C, and `simd::exp` in C++. */ | ||
| 546 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x); | ||
| 547 | /*! @abstract Do not call this function; instead use `exp` in C and | ||
| 548 | * Objective-C, and `simd::exp` in C++. */ | ||
| 549 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x); | ||
| 550 | |||
| 551 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 552 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 553 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x); | ||
| 554 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 555 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 556 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x); | ||
| 557 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 558 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 559 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x); | ||
| 560 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 561 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 562 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x); | ||
| 563 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 564 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 565 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x); | ||
| 566 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 567 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 568 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x); | ||
| 569 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 570 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 571 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x); | ||
| 572 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 573 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 574 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x); | ||
| 575 | /*! @abstract Do not call this function; instead use `exp2` in C and | ||
| 576 | * Objective-C, and `simd::exp2` in C++. */ | ||
| 577 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x); | ||
| 578 | |||
| 579 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 580 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 581 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 582 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x); | ||
| 583 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 584 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 585 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x); | ||
| 586 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 587 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 588 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x); | ||
| 589 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 590 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 591 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x); | ||
| 592 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 593 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 594 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x); | ||
| 595 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 596 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 597 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x); | ||
| 598 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 599 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 600 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x); | ||
| 601 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 602 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 603 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x); | ||
| 604 | /*! @abstract Do not call this function; instead use `exp10` in C and | ||
| 605 | * Objective-C, and `simd::exp10` in C++. */ | ||
| 606 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x); | ||
| 607 | #endif | ||
| 608 | |||
| 609 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 610 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 611 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x); | ||
| 612 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 613 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 614 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x); | ||
| 615 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 616 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 617 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x); | ||
| 618 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 619 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 620 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x); | ||
| 621 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 622 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 623 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x); | ||
| 624 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 625 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 626 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x); | ||
| 627 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 628 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 629 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x); | ||
| 630 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 631 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 632 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x); | ||
| 633 | /*! @abstract Do not call this function; instead use `expm1` in C and | ||
| 634 | * Objective-C, and `simd::expm1` in C++. */ | ||
| 635 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x); | ||
| 636 | |||
| 637 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 638 | * Objective-C, and `simd::log` in C++. */ | ||
| 639 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x); | ||
| 640 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 641 | * Objective-C, and `simd::log` in C++. */ | ||
| 642 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x); | ||
| 643 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 644 | * Objective-C, and `simd::log` in C++. */ | ||
| 645 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x); | ||
| 646 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 647 | * Objective-C, and `simd::log` in C++. */ | ||
| 648 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x); | ||
| 649 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 650 | * Objective-C, and `simd::log` in C++. */ | ||
| 651 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x); | ||
| 652 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 653 | * Objective-C, and `simd::log` in C++. */ | ||
| 654 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x); | ||
| 655 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 656 | * Objective-C, and `simd::log` in C++. */ | ||
| 657 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x); | ||
| 658 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 659 | * Objective-C, and `simd::log` in C++. */ | ||
| 660 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x); | ||
| 661 | /*! @abstract Do not call this function; instead use `log` in C and | ||
| 662 | * Objective-C, and `simd::log` in C++. */ | ||
| 663 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x); | ||
| 664 | |||
| 665 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 666 | * Objective-C, and `simd::log2` in C++. */ | ||
| 667 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x); | ||
| 668 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 669 | * Objective-C, and `simd::log2` in C++. */ | ||
| 670 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x); | ||
| 671 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 672 | * Objective-C, and `simd::log2` in C++. */ | ||
| 673 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x); | ||
| 674 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 675 | * Objective-C, and `simd::log2` in C++. */ | ||
| 676 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x); | ||
| 677 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 678 | * Objective-C, and `simd::log2` in C++. */ | ||
| 679 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x); | ||
| 680 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 681 | * Objective-C, and `simd::log2` in C++. */ | ||
| 682 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x); | ||
| 683 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 684 | * Objective-C, and `simd::log2` in C++. */ | ||
| 685 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x); | ||
| 686 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 687 | * Objective-C, and `simd::log2` in C++. */ | ||
| 688 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x); | ||
| 689 | /*! @abstract Do not call this function; instead use `log2` in C and | ||
| 690 | * Objective-C, and `simd::log2` in C++. */ | ||
| 691 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x); | ||
| 692 | |||
| 693 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 694 | * Objective-C, and `simd::log10` in C++. */ | ||
| 695 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x); | ||
| 696 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 697 | * Objective-C, and `simd::log10` in C++. */ | ||
| 698 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x); | ||
| 699 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 700 | * Objective-C, and `simd::log10` in C++. */ | ||
| 701 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x); | ||
| 702 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 703 | * Objective-C, and `simd::log10` in C++. */ | ||
| 704 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x); | ||
| 705 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 706 | * Objective-C, and `simd::log10` in C++. */ | ||
| 707 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x); | ||
| 708 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 709 | * Objective-C, and `simd::log10` in C++. */ | ||
| 710 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x); | ||
| 711 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 712 | * Objective-C, and `simd::log10` in C++. */ | ||
| 713 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x); | ||
| 714 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 715 | * Objective-C, and `simd::log10` in C++. */ | ||
| 716 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x); | ||
| 717 | /*! @abstract Do not call this function; instead use `log10` in C and | ||
| 718 | * Objective-C, and `simd::log10` in C++. */ | ||
| 719 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x); | ||
| 720 | |||
| 721 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 722 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 723 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x); | ||
| 724 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 725 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 726 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x); | ||
| 727 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 728 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 729 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x); | ||
| 730 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 731 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 732 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x); | ||
| 733 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 734 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 735 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x); | ||
| 736 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 737 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 738 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x); | ||
| 739 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 740 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 741 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x); | ||
| 742 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 743 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 744 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x); | ||
| 745 | /*! @abstract Do not call this function; instead use `log1p` in C and | ||
| 746 | * Objective-C, and `simd::log1p` in C++. */ | ||
| 747 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x); | ||
| 748 | |||
| 749 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 750 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 751 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x); | ||
| 752 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 753 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 754 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x); | ||
| 755 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 756 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 757 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x); | ||
| 758 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 759 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 760 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x); | ||
| 761 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 762 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 763 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x); | ||
| 764 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 765 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 766 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x); | ||
| 767 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 768 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 769 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x); | ||
| 770 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 771 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 772 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x); | ||
| 773 | /*! @abstract Do not call this function; instead use `fabs` in C and | ||
| 774 | * Objective-C, and `simd::fabs` in C++. */ | ||
| 775 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x); | ||
| 776 | |||
| 777 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 778 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 779 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x); | ||
| 780 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 781 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 782 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x); | ||
| 783 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 784 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 785 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x); | ||
| 786 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 787 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 788 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x); | ||
| 789 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 790 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 791 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x); | ||
| 792 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 793 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 794 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x); | ||
| 795 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 796 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 797 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x); | ||
| 798 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 799 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 800 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x); | ||
| 801 | /*! @abstract Do not call this function; instead use `cbrt` in C and | ||
| 802 | * Objective-C, and `simd::cbrt` in C++. */ | ||
| 803 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x); | ||
| 804 | |||
| 805 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 806 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 807 | static inline SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x); | ||
| 808 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 809 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 810 | static inline SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x); | ||
| 811 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 812 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 813 | static inline SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x); | ||
| 814 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 815 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 816 | static inline SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x); | ||
| 817 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 818 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 819 | static inline SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x); | ||
| 820 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 821 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 822 | static inline SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x); | ||
| 823 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 824 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 825 | static inline SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x); | ||
| 826 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 827 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 828 | static inline SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x); | ||
| 829 | /*! @abstract Do not call this function; instead use `sqrt` in C and | ||
| 830 | * Objective-C, and `simd::sqrt` in C++. */ | ||
| 831 | static inline SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x); | ||
| 832 | |||
| 833 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 834 | * Objective-C, and `simd::erf` in C++. */ | ||
| 835 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x); | ||
| 836 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 837 | * Objective-C, and `simd::erf` in C++. */ | ||
| 838 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x); | ||
| 839 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 840 | * Objective-C, and `simd::erf` in C++. */ | ||
| 841 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x); | ||
| 842 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 843 | * Objective-C, and `simd::erf` in C++. */ | ||
| 844 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x); | ||
| 845 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 846 | * Objective-C, and `simd::erf` in C++. */ | ||
| 847 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x); | ||
| 848 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 849 | * Objective-C, and `simd::erf` in C++. */ | ||
| 850 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x); | ||
| 851 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 852 | * Objective-C, and `simd::erf` in C++. */ | ||
| 853 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x); | ||
| 854 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 855 | * Objective-C, and `simd::erf` in C++. */ | ||
| 856 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x); | ||
| 857 | /*! @abstract Do not call this function; instead use `erf` in C and | ||
| 858 | * Objective-C, and `simd::erf` in C++. */ | ||
| 859 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x); | ||
| 860 | |||
| 861 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 862 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 863 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x); | ||
| 864 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 865 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 866 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x); | ||
| 867 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 868 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 869 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x); | ||
| 870 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 871 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 872 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x); | ||
| 873 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 874 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 875 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x); | ||
| 876 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 877 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 878 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x); | ||
| 879 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 880 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 881 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x); | ||
| 882 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 883 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 884 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x); | ||
| 885 | /*! @abstract Do not call this function; instead use `erfc` in C and | ||
| 886 | * Objective-C, and `simd::erfc` in C++. */ | ||
| 887 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x); | ||
| 888 | |||
| 889 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 890 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 891 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x); | ||
| 892 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 893 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 894 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x); | ||
| 895 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 896 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 897 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x); | ||
| 898 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 899 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 900 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x); | ||
| 901 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 902 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 903 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x); | ||
| 904 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 905 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 906 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x); | ||
| 907 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 908 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 909 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x); | ||
| 910 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 911 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 912 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x); | ||
| 913 | /*! @abstract Do not call this function; instead use `tgamma` in C and | ||
| 914 | * Objective-C, and `simd::tgamma` in C++. */ | ||
| 915 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x); | ||
| 916 | |||
| 917 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 918 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 919 | static inline SIMD_CFUNC simd_float2 __tg_lgamma(simd_float2 x); | ||
| 920 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 921 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 922 | static inline SIMD_CFUNC simd_float3 __tg_lgamma(simd_float3 x); | ||
| 923 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 924 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 925 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x); | ||
| 926 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 927 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 928 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x); | ||
| 929 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 930 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 931 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x); | ||
| 932 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 933 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 934 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x); | ||
| 935 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 936 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 937 | static inline SIMD_CFUNC simd_double3 __tg_lgamma(simd_double3 x); | ||
| 938 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 939 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 940 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x); | ||
| 941 | /*! @abstract Do not call this function; instead use `lgamma` in C and | ||
| 942 | * Objective-C, and `simd::lgamma` in C++. */ | ||
| 943 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x); | ||
| 944 | |||
| 945 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 946 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 947 | static inline SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x); | ||
| 948 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 949 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 950 | static inline SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x); | ||
| 951 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 952 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 953 | static inline SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x); | ||
| 954 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 955 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 956 | static inline SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x); | ||
| 957 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 958 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 959 | static inline SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x); | ||
| 960 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 961 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 962 | static inline SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x); | ||
| 963 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 964 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 965 | static inline SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x); | ||
| 966 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 967 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 968 | static inline SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x); | ||
| 969 | /*! @abstract Do not call this function; instead use `ceil` in C and | ||
| 970 | * Objective-C, and `simd::ceil` in C++. */ | ||
| 971 | static inline SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x); | ||
| 972 | |||
| 973 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 974 | * Objective-C, and `simd::floor` in C++. */ | ||
| 975 | static inline SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x); | ||
| 976 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 977 | * Objective-C, and `simd::floor` in C++. */ | ||
| 978 | static inline SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x); | ||
| 979 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 980 | * Objective-C, and `simd::floor` in C++. */ | ||
| 981 | static inline SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x); | ||
| 982 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 983 | * Objective-C, and `simd::floor` in C++. */ | ||
| 984 | static inline SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x); | ||
| 985 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 986 | * Objective-C, and `simd::floor` in C++. */ | ||
| 987 | static inline SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x); | ||
| 988 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 989 | * Objective-C, and `simd::floor` in C++. */ | ||
| 990 | static inline SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x); | ||
| 991 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 992 | * Objective-C, and `simd::floor` in C++. */ | ||
| 993 | static inline SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x); | ||
| 994 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 995 | * Objective-C, and `simd::floor` in C++. */ | ||
| 996 | static inline SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x); | ||
| 997 | /*! @abstract Do not call this function; instead use `floor` in C and | ||
| 998 | * Objective-C, and `simd::floor` in C++. */ | ||
| 999 | static inline SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x); | ||
| 1000 | |||
| 1001 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1002 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1003 | static inline SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x); | ||
| 1004 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1005 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1006 | static inline SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x); | ||
| 1007 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1008 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1009 | static inline SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x); | ||
| 1010 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1011 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1012 | static inline SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x); | ||
| 1013 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1014 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1015 | static inline SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x); | ||
| 1016 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1017 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1018 | static inline SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x); | ||
| 1019 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1020 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1021 | static inline SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x); | ||
| 1022 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1023 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1024 | static inline SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x); | ||
| 1025 | /*! @abstract Do not call this function; instead use `rint` in C and | ||
| 1026 | * Objective-C, and `simd::rint` in C++. */ | ||
| 1027 | static inline SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x); | ||
| 1028 | |||
| 1029 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1030 | * Objective-C, and `simd::round` in C++. */ | ||
| 1031 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x); | ||
| 1032 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1033 | * Objective-C, and `simd::round` in C++. */ | ||
| 1034 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x); | ||
| 1035 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1036 | * Objective-C, and `simd::round` in C++. */ | ||
| 1037 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x); | ||
| 1038 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1039 | * Objective-C, and `simd::round` in C++. */ | ||
| 1040 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x); | ||
| 1041 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1042 | * Objective-C, and `simd::round` in C++. */ | ||
| 1043 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x); | ||
| 1044 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1045 | * Objective-C, and `simd::round` in C++. */ | ||
| 1046 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x); | ||
| 1047 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1048 | * Objective-C, and `simd::round` in C++. */ | ||
| 1049 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x); | ||
| 1050 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1051 | * Objective-C, and `simd::round` in C++. */ | ||
| 1052 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x); | ||
| 1053 | /*! @abstract Do not call this function; instead use `round` in C and | ||
| 1054 | * Objective-C, and `simd::round` in C++. */ | ||
| 1055 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x); | ||
| 1056 | |||
| 1057 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1058 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1059 | static inline SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x); | ||
| 1060 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1061 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1062 | static inline SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x); | ||
| 1063 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1064 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1065 | static inline SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x); | ||
| 1066 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1067 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1068 | static inline SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x); | ||
| 1069 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1070 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1071 | static inline SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x); | ||
| 1072 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1073 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1074 | static inline SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x); | ||
| 1075 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1076 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1077 | static inline SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x); | ||
| 1078 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1079 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1080 | static inline SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x); | ||
| 1081 | /*! @abstract Do not call this function; instead use `trunc` in C and | ||
| 1082 | * Objective-C, and `simd::trunc` in C++. */ | ||
| 1083 | static inline SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x); | ||
| 1084 | |||
| 1085 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1086 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1087 | static inline SIMD_CFUNC simd_int2 __tg_isfinite(simd_float2 x); | ||
| 1088 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1089 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1090 | static inline SIMD_CFUNC simd_int3 __tg_isfinite(simd_float3 x); | ||
| 1091 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1092 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1093 | static inline SIMD_CFUNC simd_int4 __tg_isfinite(simd_float4 x); | ||
| 1094 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1095 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1096 | static inline SIMD_CFUNC simd_int8 __tg_isfinite(simd_float8 x); | ||
| 1097 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1098 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1099 | static inline SIMD_CFUNC simd_int16 __tg_isfinite(simd_float16 x); | ||
| 1100 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1101 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1102 | static inline SIMD_CFUNC simd_long2 __tg_isfinite(simd_double2 x); | ||
| 1103 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1104 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1105 | static inline SIMD_CFUNC simd_long3 __tg_isfinite(simd_double3 x); | ||
| 1106 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1107 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1108 | static inline SIMD_CFUNC simd_long4 __tg_isfinite(simd_double4 x); | ||
| 1109 | /*! @abstract Do not call this function; instead use `isfinite` in C and | ||
| 1110 | * Objective-C, and `simd::isfinite` in C++. */ | ||
| 1111 | static inline SIMD_CFUNC simd_long8 __tg_isfinite(simd_double8 x); | ||
| 1112 | |||
| 1113 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1114 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1115 | static inline SIMD_CFUNC simd_int2 __tg_isinf(simd_float2 x); | ||
| 1116 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1117 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1118 | static inline SIMD_CFUNC simd_int3 __tg_isinf(simd_float3 x); | ||
| 1119 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1120 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1121 | static inline SIMD_CFUNC simd_int4 __tg_isinf(simd_float4 x); | ||
| 1122 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1123 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1124 | static inline SIMD_CFUNC simd_int8 __tg_isinf(simd_float8 x); | ||
| 1125 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1126 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1127 | static inline SIMD_CFUNC simd_int16 __tg_isinf(simd_float16 x); | ||
| 1128 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1129 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1130 | static inline SIMD_CFUNC simd_long2 __tg_isinf(simd_double2 x); | ||
| 1131 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1132 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1133 | static inline SIMD_CFUNC simd_long3 __tg_isinf(simd_double3 x); | ||
| 1134 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1135 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1136 | static inline SIMD_CFUNC simd_long4 __tg_isinf(simd_double4 x); | ||
| 1137 | /*! @abstract Do not call this function; instead use `isinf` in C and | ||
| 1138 | * Objective-C, and `simd::isinf` in C++. */ | ||
| 1139 | static inline SIMD_CFUNC simd_long8 __tg_isinf(simd_double8 x); | ||
| 1140 | |||
| 1141 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1142 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1143 | static inline SIMD_CFUNC simd_int2 __tg_isnan(simd_float2 x); | ||
| 1144 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1145 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1146 | static inline SIMD_CFUNC simd_int3 __tg_isnan(simd_float3 x); | ||
| 1147 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1148 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1149 | static inline SIMD_CFUNC simd_int4 __tg_isnan(simd_float4 x); | ||
| 1150 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1151 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1152 | static inline SIMD_CFUNC simd_int8 __tg_isnan(simd_float8 x); | ||
| 1153 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1154 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1155 | static inline SIMD_CFUNC simd_int16 __tg_isnan(simd_float16 x); | ||
| 1156 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1157 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1158 | static inline SIMD_CFUNC simd_long2 __tg_isnan(simd_double2 x); | ||
| 1159 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1160 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1161 | static inline SIMD_CFUNC simd_long3 __tg_isnan(simd_double3 x); | ||
| 1162 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1163 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1164 | static inline SIMD_CFUNC simd_long4 __tg_isnan(simd_double4 x); | ||
| 1165 | /*! @abstract Do not call this function; instead use `isnan` in C and | ||
| 1166 | * Objective-C, and `simd::isnan` in C++. */ | ||
| 1167 | static inline SIMD_CFUNC simd_long8 __tg_isnan(simd_double8 x); | ||
| 1168 | |||
| 1169 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1170 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1171 | static inline SIMD_CFUNC simd_int2 __tg_isnormal(simd_float2 x); | ||
| 1172 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1173 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1174 | static inline SIMD_CFUNC simd_int3 __tg_isnormal(simd_float3 x); | ||
| 1175 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1176 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1177 | static inline SIMD_CFUNC simd_int4 __tg_isnormal(simd_float4 x); | ||
| 1178 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1179 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1180 | static inline SIMD_CFUNC simd_int8 __tg_isnormal(simd_float8 x); | ||
| 1181 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1182 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1183 | static inline SIMD_CFUNC simd_int16 __tg_isnormal(simd_float16 x); | ||
| 1184 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1185 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1186 | static inline SIMD_CFUNC simd_long2 __tg_isnormal(simd_double2 x); | ||
| 1187 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1188 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1189 | static inline SIMD_CFUNC simd_long3 __tg_isnormal(simd_double3 x); | ||
| 1190 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1191 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1192 | static inline SIMD_CFUNC simd_long4 __tg_isnormal(simd_double4 x); | ||
| 1193 | /*! @abstract Do not call this function; instead use `isnormal` in C and | ||
| 1194 | * Objective-C, and `simd::isnormal` in C++. */ | ||
| 1195 | static inline SIMD_CFUNC simd_long8 __tg_isnormal(simd_double8 x); | ||
| 1196 | |||
| 1197 | |||
| 1198 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1199 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1200 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x); | ||
| 1201 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1202 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1203 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x); | ||
| 1204 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1205 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1206 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x); | ||
| 1207 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1208 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1209 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x); | ||
| 1210 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1211 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1212 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x); | ||
| 1213 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1214 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1215 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x); | ||
| 1216 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1217 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1218 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x); | ||
| 1219 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1220 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1221 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x); | ||
| 1222 | /*! @abstract Do not call this function; instead use `atan2` in C and | ||
| 1223 | * Objective-C, and `simd::atan2` in C++. */ | ||
| 1224 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x); | ||
| 1225 | |||
| 1226 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1227 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1228 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y); | ||
| 1229 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1230 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1231 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y); | ||
| 1232 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1233 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1234 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y); | ||
| 1235 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1236 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1237 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y); | ||
| 1238 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1239 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1240 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y); | ||
| 1241 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1242 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1243 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y); | ||
| 1244 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1245 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1246 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y); | ||
| 1247 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1248 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1249 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y); | ||
| 1250 | /*! @abstract Do not call this function; instead use `hypot` in C and | ||
| 1251 | * Objective-C, and `simd::hypot` in C++. */ | ||
| 1252 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y); | ||
| 1253 | |||
| 1254 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1255 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1256 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y); | ||
| 1257 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1258 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1259 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y); | ||
| 1260 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1261 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1262 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y); | ||
| 1263 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1264 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1265 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y); | ||
| 1266 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1267 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1268 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y); | ||
| 1269 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1270 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1271 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y); | ||
| 1272 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1273 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1274 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y); | ||
| 1275 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1276 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1277 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y); | ||
| 1278 | /*! @abstract Do not call this function; instead use `pow` in C and | ||
| 1279 | * Objective-C, and `simd::pow` in C++. */ | ||
| 1280 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y); | ||
| 1281 | |||
| 1282 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1283 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1284 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y); | ||
| 1285 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1286 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1287 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y); | ||
| 1288 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1289 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1290 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y); | ||
| 1291 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1292 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1293 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y); | ||
| 1294 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1295 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1296 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y); | ||
| 1297 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1298 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1299 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y); | ||
| 1300 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1301 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1302 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y); | ||
| 1303 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1304 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1305 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y); | ||
| 1306 | /*! @abstract Do not call this function; instead use `fmod` in C and | ||
| 1307 | * Objective-C, and `simd::fmod` in C++. */ | ||
| 1308 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y); | ||
| 1309 | |||
| 1310 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1311 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1312 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y); | ||
| 1313 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1314 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1315 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y); | ||
| 1316 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1317 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1318 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y); | ||
| 1319 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1320 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1321 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y); | ||
| 1322 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1323 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1324 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y); | ||
| 1325 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1326 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1327 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y); | ||
| 1328 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1329 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1330 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y); | ||
| 1331 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1332 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1333 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y); | ||
| 1334 | /*! @abstract Do not call this function; instead use `remainder` in C and | ||
| 1335 | * Objective-C, and `simd::remainder` in C++. */ | ||
| 1336 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y); | ||
| 1337 | |||
| 1338 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1339 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1340 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y); | ||
| 1341 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1342 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1343 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y); | ||
| 1344 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1345 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1346 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y); | ||
| 1347 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1348 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1349 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y); | ||
| 1350 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1351 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1352 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y); | ||
| 1353 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1354 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1355 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y); | ||
| 1356 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1357 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1358 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y); | ||
| 1359 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1360 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1361 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y); | ||
| 1362 | /*! @abstract Do not call this function; instead use `copysign` in C and | ||
| 1363 | * Objective-C, and `simd::copysign` in C++. */ | ||
| 1364 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y); | ||
| 1365 | |||
| 1366 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1367 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1368 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y); | ||
| 1369 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1370 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1371 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y); | ||
| 1372 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1373 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1374 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y); | ||
| 1375 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1376 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1377 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y); | ||
| 1378 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1379 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1380 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y); | ||
| 1381 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1382 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1383 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y); | ||
| 1384 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1385 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1386 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y); | ||
| 1387 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1388 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1389 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y); | ||
| 1390 | /*! @abstract Do not call this function; instead use `nextafter` in C and | ||
| 1391 | * Objective-C, and `simd::nextafter` in C++. */ | ||
| 1392 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y); | ||
| 1393 | |||
| 1394 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1395 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1396 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y); | ||
| 1397 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1398 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1399 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y); | ||
| 1400 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1401 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1402 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y); | ||
| 1403 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1404 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1405 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y); | ||
| 1406 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1407 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1408 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y); | ||
| 1409 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1410 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1411 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y); | ||
| 1412 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1413 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1414 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y); | ||
| 1415 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1416 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1417 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y); | ||
| 1418 | /*! @abstract Do not call this function; instead use `fdim` in C and | ||
| 1419 | * Objective-C, and `simd::fdim` in C++. */ | ||
| 1420 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y); | ||
| 1421 | |||
| 1422 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1423 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1424 | static inline SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y); | ||
| 1425 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1426 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1427 | static inline SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y); | ||
| 1428 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1429 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1430 | static inline SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y); | ||
| 1431 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1432 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1433 | static inline SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y); | ||
| 1434 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1435 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1436 | static inline SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y); | ||
| 1437 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1438 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1439 | static inline SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y); | ||
| 1440 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1441 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1442 | static inline SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y); | ||
| 1443 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1444 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1445 | static inline SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y); | ||
| 1446 | /*! @abstract Do not call this function; instead use `fmax` in C and | ||
| 1447 | * Objective-C, and `simd::fmax` in C++. */ | ||
| 1448 | static inline SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y); | ||
| 1449 | |||
| 1450 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1451 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1452 | static inline SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y); | ||
| 1453 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1454 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1455 | static inline SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y); | ||
| 1456 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1457 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1458 | static inline SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y); | ||
| 1459 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1460 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1461 | static inline SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y); | ||
| 1462 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1463 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1464 | static inline SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y); | ||
| 1465 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1466 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1467 | static inline SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y); | ||
| 1468 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1469 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1470 | static inline SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y); | ||
| 1471 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1472 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1473 | static inline SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y); | ||
| 1474 | /*! @abstract Do not call this function; instead use `fmin` in C and | ||
| 1475 | * Objective-C, and `simd::fmin` in C++. */ | ||
| 1476 | static inline SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y); | ||
| 1477 | |||
| 1478 | |||
| 1479 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1480 | * and `simd::fma` in C++. */ | ||
| 1481 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1482 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1483 | * and `simd::fma` in C++. */ | ||
| 1484 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1485 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1486 | * and `simd::fma` in C++. */ | ||
| 1487 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1488 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1489 | * and `simd::fma` in C++. */ | ||
| 1490 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1491 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1492 | * and `simd::fma` in C++. */ | ||
| 1493 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1494 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1495 | * and `simd::fma` in C++. */ | ||
| 1496 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1497 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1498 | * and `simd::fma` in C++. */ | ||
| 1499 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1500 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1501 | * and `simd::fma` in C++. */ | ||
| 1502 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1503 | /*! @abstract Do not call this function; instead use `fma` in C and Objective-C, | ||
| 1504 | * and `simd::fma` in C++. */ | ||
| 1505 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1506 | |||
| 1507 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1508 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1509 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z); | ||
| 1510 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1511 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1512 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z); | ||
| 1513 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1514 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1515 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z); | ||
| 1516 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1517 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1518 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 1519 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1520 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1521 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z); | ||
| 1522 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1523 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1524 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z); | ||
| 1525 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1526 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1527 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z); | ||
| 1528 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1529 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1530 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 1531 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1532 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1533 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z); | ||
| 1534 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1535 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1536 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z); | ||
| 1537 | /*! @abstract Computes accum + x*y by the most efficient means available; | ||
| 1538 | * either a fused multiply add or separate multiply and add instructions. */ | ||
| 1539 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z); | ||
| 1540 | |||
| 1541 | #ifdef __cplusplus | ||
| 1542 | } /* extern "C" */ | ||
| 1543 | |||
| 1544 | #include <cmath> | ||
| 1545 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1546 | static SIMD_CPPFUNC float __tg_acos(float x) { return ::acos(x); } | ||
| 1547 | /*! @abstract Do not call this function directly; use simd::acos instead. */ | ||
| 1548 | static SIMD_CPPFUNC double __tg_acos(double x) { return ::acos(x); } | ||
| 1549 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1550 | static SIMD_CPPFUNC float __tg_asin(float x) { return ::asin(x); } | ||
| 1551 | /*! @abstract Do not call this function directly; use simd::asin instead. */ | ||
| 1552 | static SIMD_CPPFUNC double __tg_asin(double x) { return ::asin(x); } | ||
| 1553 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1554 | static SIMD_CPPFUNC float __tg_atan(float x) { return ::atan(x); } | ||
| 1555 | /*! @abstract Do not call this function directly; use simd::atan instead. */ | ||
| 1556 | static SIMD_CPPFUNC double __tg_atan(double x) { return ::atan(x); } | ||
| 1557 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1558 | static SIMD_CPPFUNC float __tg_cos(float x) { return ::cos(x); } | ||
| 1559 | /*! @abstract Do not call this function directly; use simd::cos instead. */ | ||
| 1560 | static SIMD_CPPFUNC double __tg_cos(double x) { return ::cos(x); } | ||
| 1561 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1562 | static SIMD_CPPFUNC float __tg_sin(float x) { return ::sin(x); } | ||
| 1563 | /*! @abstract Do not call this function directly; use simd::sin instead. */ | ||
| 1564 | static SIMD_CPPFUNC double __tg_sin(double x) { return ::sin(x); } | ||
| 1565 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1566 | static SIMD_CPPFUNC float __tg_tan(float x) { return ::tan(x); } | ||
| 1567 | /*! @abstract Do not call this function directly; use simd::tan instead. */ | ||
| 1568 | static SIMD_CPPFUNC double __tg_tan(double x) { return ::tan(x); } | ||
| 1569 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1570 | static SIMD_CPPFUNC float __tg_cospi(float x) { return ::__cospi(x); } | ||
| 1571 | /*! @abstract Do not call this function directly; use simd::cospi instead. */ | ||
| 1572 | static SIMD_CPPFUNC double __tg_cospi(double x) { return ::__cospi(x); } | ||
| 1573 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1574 | static SIMD_CPPFUNC float __tg_sinpi(float x) { return ::__sinpi(x); } | ||
| 1575 | /*! @abstract Do not call this function directly; use simd::sinpi instead. */ | ||
| 1576 | static SIMD_CPPFUNC double __tg_sinpi(double x) { return ::__sinpi(x); } | ||
| 1577 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1578 | static SIMD_CPPFUNC float __tg_tanpi(float x) { return ::__tanpi(x); } | ||
| 1579 | /*! @abstract Do not call this function directly; use simd::tanpi instead. */ | ||
| 1580 | static SIMD_CPPFUNC double __tg_tanpi(double x) { return ::__tanpi(x); } | ||
| 1581 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1582 | static SIMD_CPPFUNC float __tg_acosh(float x) { return ::acosh(x); } | ||
| 1583 | /*! @abstract Do not call this function directly; use simd::acosh instead. */ | ||
| 1584 | static SIMD_CPPFUNC double __tg_acosh(double x) { return ::acosh(x); } | ||
| 1585 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1586 | static SIMD_CPPFUNC float __tg_asinh(float x) { return ::asinh(x); } | ||
| 1587 | /*! @abstract Do not call this function directly; use simd::asinh instead. */ | ||
| 1588 | static SIMD_CPPFUNC double __tg_asinh(double x) { return ::asinh(x); } | ||
| 1589 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1590 | static SIMD_CPPFUNC float __tg_atanh(float x) { return ::atanh(x); } | ||
| 1591 | /*! @abstract Do not call this function directly; use simd::atanh instead. */ | ||
| 1592 | static SIMD_CPPFUNC double __tg_atanh(double x) { return ::atanh(x); } | ||
| 1593 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1594 | static SIMD_CPPFUNC float __tg_cosh(float x) { return ::cosh(x); } | ||
| 1595 | /*! @abstract Do not call this function directly; use simd::cosh instead. */ | ||
| 1596 | static SIMD_CPPFUNC double __tg_cosh(double x) { return ::cosh(x); } | ||
| 1597 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1598 | static SIMD_CPPFUNC float __tg_sinh(float x) { return ::sinh(x); } | ||
| 1599 | /*! @abstract Do not call this function directly; use simd::sinh instead. */ | ||
| 1600 | static SIMD_CPPFUNC double __tg_sinh(double x) { return ::sinh(x); } | ||
| 1601 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1602 | static SIMD_CPPFUNC float __tg_tanh(float x) { return ::tanh(x); } | ||
| 1603 | /*! @abstract Do not call this function directly; use simd::tanh instead. */ | ||
| 1604 | static SIMD_CPPFUNC double __tg_tanh(double x) { return ::tanh(x); } | ||
| 1605 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1606 | static SIMD_CPPFUNC float __tg_exp(float x) { return ::exp(x); } | ||
| 1607 | /*! @abstract Do not call this function directly; use simd::exp instead. */ | ||
| 1608 | static SIMD_CPPFUNC double __tg_exp(double x) { return ::exp(x); } | ||
| 1609 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1610 | static SIMD_CPPFUNC float __tg_exp2(float x) { return ::exp2(x); } | ||
| 1611 | /*! @abstract Do not call this function directly; use simd::exp2 instead. */ | ||
| 1612 | static SIMD_CPPFUNC double __tg_exp2(double x) { return ::exp2(x); } | ||
| 1613 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1614 | static SIMD_CPPFUNC float __tg_exp10(float x) { return ::__exp10(x); } | ||
| 1615 | /*! @abstract Do not call this function directly; use simd::exp10 instead. */ | ||
| 1616 | static SIMD_CPPFUNC double __tg_exp10(double x) { return ::__exp10(x); } | ||
| 1617 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1618 | static SIMD_CPPFUNC float __tg_expm1(float x) { return ::expm1(x); } | ||
| 1619 | /*! @abstract Do not call this function directly; use simd::expm1 instead. */ | ||
| 1620 | static SIMD_CPPFUNC double __tg_expm1(double x) { return ::expm1(x); } | ||
| 1621 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1622 | static SIMD_CPPFUNC float __tg_log(float x) { return ::log(x); } | ||
| 1623 | /*! @abstract Do not call this function directly; use simd::log instead. */ | ||
| 1624 | static SIMD_CPPFUNC double __tg_log(double x) { return ::log(x); } | ||
| 1625 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1626 | static SIMD_CPPFUNC float __tg_log2(float x) { return ::log2(x); } | ||
| 1627 | /*! @abstract Do not call this function directly; use simd::log2 instead. */ | ||
| 1628 | static SIMD_CPPFUNC double __tg_log2(double x) { return ::log2(x); } | ||
| 1629 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1630 | static SIMD_CPPFUNC float __tg_log10(float x) { return ::log10(x); } | ||
| 1631 | /*! @abstract Do not call this function directly; use simd::log10 instead. */ | ||
| 1632 | static SIMD_CPPFUNC double __tg_log10(double x) { return ::log10(x); } | ||
| 1633 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1634 | static SIMD_CPPFUNC float __tg_log1p(float x) { return ::log1p(x); } | ||
| 1635 | /*! @abstract Do not call this function directly; use simd::log1p instead. */ | ||
| 1636 | static SIMD_CPPFUNC double __tg_log1p(double x) { return ::log1p(x); } | ||
| 1637 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1638 | static SIMD_CPPFUNC float __tg_fabs(float x) { return ::fabs(x); } | ||
| 1639 | /*! @abstract Do not call this function directly; use simd::fabs instead. */ | ||
| 1640 | static SIMD_CPPFUNC double __tg_fabs(double x) { return ::fabs(x); } | ||
| 1641 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1642 | static SIMD_CPPFUNC float __tg_cbrt(float x) { return ::cbrt(x); } | ||
| 1643 | /*! @abstract Do not call this function directly; use simd::cbrt instead. */ | ||
| 1644 | static SIMD_CPPFUNC double __tg_cbrt(double x) { return ::cbrt(x); } | ||
| 1645 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1646 | static SIMD_CPPFUNC float __tg_sqrt(float x) { return ::sqrt(x); } | ||
| 1647 | /*! @abstract Do not call this function directly; use simd::sqrt instead. */ | ||
| 1648 | static SIMD_CPPFUNC double __tg_sqrt(double x) { return ::sqrt(x); } | ||
| 1649 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1650 | static SIMD_CPPFUNC float __tg_erf(float x) { return ::erf(x); } | ||
| 1651 | /*! @abstract Do not call this function directly; use simd::erf instead. */ | ||
| 1652 | static SIMD_CPPFUNC double __tg_erf(double x) { return ::erf(x); } | ||
| 1653 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1654 | static SIMD_CPPFUNC float __tg_erfc(float x) { return ::erfc(x); } | ||
| 1655 | /*! @abstract Do not call this function directly; use simd::erfc instead. */ | ||
| 1656 | static SIMD_CPPFUNC double __tg_erfc(double x) { return ::erfc(x); } | ||
| 1657 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1658 | static SIMD_CPPFUNC float __tg_tgamma(float x) { return ::tgamma(x); } | ||
| 1659 | /*! @abstract Do not call this function directly; use simd::tgamma instead. */ | ||
| 1660 | static SIMD_CPPFUNC double __tg_tgamma(double x) { return ::tgamma(x); } | ||
| 1661 | /*! @abstract Do not call this function directly; use simd::lgamma instead. */ | ||
| 1662 | static SIMD_CPPFUNC float __tg_lgamma(float x) { return ::lgamma(x); } | ||
| 1663 | /*! @abstract Do not call this function directly; use simd::lgamma instead. */ | ||
| 1664 | static SIMD_CPPFUNC double __tg_lgamma(double x) { return ::lgamma(x); } | ||
| 1665 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1666 | static SIMD_CPPFUNC float __tg_ceil(float x) { return ::ceil(x); } | ||
| 1667 | /*! @abstract Do not call this function directly; use simd::ceil instead. */ | ||
| 1668 | static SIMD_CPPFUNC double __tg_ceil(double x) { return ::ceil(x); } | ||
| 1669 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1670 | static SIMD_CPPFUNC float __tg_floor(float x) { return ::floor(x); } | ||
| 1671 | /*! @abstract Do not call this function directly; use simd::floor instead. */ | ||
| 1672 | static SIMD_CPPFUNC double __tg_floor(double x) { return ::floor(x); } | ||
| 1673 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1674 | static SIMD_CPPFUNC float __tg_rint(float x) { return ::rint(x); } | ||
| 1675 | /*! @abstract Do not call this function directly; use simd::rint instead. */ | ||
| 1676 | static SIMD_CPPFUNC double __tg_rint(double x) { return ::rint(x); } | ||
| 1677 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1678 | static SIMD_CPPFUNC float __tg_round(float x) { return ::round(x); } | ||
| 1679 | /*! @abstract Do not call this function directly; use simd::round instead. */ | ||
| 1680 | static SIMD_CPPFUNC double __tg_round(double x) { return ::round(x); } | ||
| 1681 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1682 | static SIMD_CPPFUNC float __tg_trunc(float x) { return ::trunc(x); } | ||
| 1683 | /*! @abstract Do not call this function directly; use simd::trunc instead. */ | ||
| 1684 | static SIMD_CPPFUNC double __tg_trunc(double x) { return ::trunc(x); } | ||
| 1685 | /*! @abstract Do not call this function directly; use simd::isfinite | ||
| 1686 | * instead. */ | ||
| 1687 | static SIMD_CPPFUNC float __tg_isfinite(float x) { return ::isfinite(x); } | ||
| 1688 | /*! @abstract Do not call this function directly; use simd::isfinite | ||
| 1689 | * instead. */ | ||
| 1690 | static SIMD_CPPFUNC double __tg_isfinite(double x) { return ::isfinite(x); } | ||
| 1691 | /*! @abstract Do not call this function directly; use simd::isinf instead. */ | ||
| 1692 | static SIMD_CPPFUNC float __tg_isinf(float x) { return ::isinf(x); } | ||
| 1693 | /*! @abstract Do not call this function directly; use simd::isinf instead. */ | ||
| 1694 | static SIMD_CPPFUNC double __tg_isinf(double x) { return ::isinf(x); } | ||
| 1695 | /*! @abstract Do not call this function directly; use simd::isnan instead. */ | ||
| 1696 | static SIMD_CPPFUNC float __tg_isnan(float x) { return ::isnan(x); } | ||
| 1697 | /*! @abstract Do not call this function directly; use simd::isnan instead. */ | ||
| 1698 | static SIMD_CPPFUNC double __tg_isnan(double x) { return ::isnan(x); } | ||
| 1699 | /*! @abstract Do not call this function directly; use simd::isnormal | ||
| 1700 | * instead. */ | ||
| 1701 | static SIMD_CPPFUNC float __tg_isnormal(float x) { return ::isnormal(x); } | ||
| 1702 | /*! @abstract Do not call this function directly; use simd::isnormal | ||
| 1703 | * instead. */ | ||
| 1704 | static SIMD_CPPFUNC double __tg_isnormal(double x) { return ::isnormal(x); } | ||
| 1705 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1706 | static SIMD_CPPFUNC float __tg_atan2(float x, float y) { return ::atan2(x, y); } | ||
| 1707 | /*! @abstract Do not call this function directly; use simd::atan2 instead. */ | ||
| 1708 | static SIMD_CPPFUNC double __tg_atan2(double x, double y) { return ::atan2(x, y); } | ||
| 1709 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1710 | static SIMD_CPPFUNC float __tg_hypot(float x, float y) { return ::hypot(x, y); } | ||
| 1711 | /*! @abstract Do not call this function directly; use simd::hypot instead. */ | ||
| 1712 | static SIMD_CPPFUNC double __tg_hypot(double x, double y) { return ::hypot(x, y); } | ||
| 1713 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1714 | static SIMD_CPPFUNC float __tg_pow(float x, float y) { return ::pow(x, y); } | ||
| 1715 | /*! @abstract Do not call this function directly; use simd::pow instead. */ | ||
| 1716 | static SIMD_CPPFUNC double __tg_pow(double x, double y) { return ::pow(x, y); } | ||
| 1717 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1718 | static SIMD_CPPFUNC float __tg_fmod(float x, float y) { return ::fmod(x, y); } | ||
| 1719 | /*! @abstract Do not call this function directly; use simd::fmod instead. */ | ||
| 1720 | static SIMD_CPPFUNC double __tg_fmod(double x, double y) { return ::fmod(x, y); } | ||
| 1721 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1722 | * instead. */ | ||
| 1723 | static SIMD_CPPFUNC float __tg_remainder(float x, float y) { return ::remainder(x, y); } | ||
| 1724 | /*! @abstract Do not call this function directly; use simd::remainder | ||
| 1725 | * instead. */ | ||
| 1726 | static SIMD_CPPFUNC double __tg_remainder(double x, double y) { return ::remainder(x, y); } | ||
| 1727 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1728 | * instead. */ | ||
| 1729 | static SIMD_CPPFUNC float __tg_copysign(float x, float y) { return ::copysign(x, y); } | ||
| 1730 | /*! @abstract Do not call this function directly; use simd::copysign | ||
| 1731 | * instead. */ | ||
| 1732 | static SIMD_CPPFUNC double __tg_copysign(double x, double y) { return ::copysign(x, y); } | ||
| 1733 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1734 | * instead. */ | ||
| 1735 | static SIMD_CPPFUNC float __tg_nextafter(float x, float y) { return ::nextafter(x, y); } | ||
| 1736 | /*! @abstract Do not call this function directly; use simd::nextafter | ||
| 1737 | * instead. */ | ||
| 1738 | static SIMD_CPPFUNC double __tg_nextafter(double x, double y) { return ::nextafter(x, y); } | ||
| 1739 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1740 | static SIMD_CPPFUNC float __tg_fdim(float x, float y) { return ::fdim(x, y); } | ||
| 1741 | /*! @abstract Do not call this function directly; use simd::fdim instead. */ | ||
| 1742 | static SIMD_CPPFUNC double __tg_fdim(double x, double y) { return ::fdim(x, y); } | ||
| 1743 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1744 | static SIMD_CPPFUNC float __tg_fmax(float x, float y) { return ::fmax(x, y); } | ||
| 1745 | /*! @abstract Do not call this function directly; use simd::fmax instead. */ | ||
| 1746 | static SIMD_CPPFUNC double __tg_fmax(double x, double y) { return ::fmax(x, y); } | ||
| 1747 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1748 | static SIMD_CPPFUNC float __tg_fmin(float x, float y) { return ::fmin(x, y); } | ||
| 1749 | /*! @abstract Do not call this function directly; use simd::fmin instead. */ | ||
| 1750 | static SIMD_CPPFUNC double __tg_fmin(double x, double y) { return ::fmin(x, y); } | ||
| 1751 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1752 | static SIMD_CPPFUNC float __tg_fma(float x, float y, float z) { return ::fma(x, y, z); } | ||
| 1753 | /*! @abstract Do not call this function directly; use simd::fma instead. */ | ||
| 1754 | static SIMD_CPPFUNC double __tg_fma(double x, double y, double z) { return ::fma(x, y, z); } | ||
| 1755 | |||
| 1756 | namespace simd { | ||
| 1757 | /*! @abstract Generalizes the <cmath> function acos to operate on vectors of | ||
| 1758 | * floats and doubles. */ | ||
| 1759 | template <typename fptypeN> | ||
| 1760 | static SIMD_CPPFUNC fptypeN acos(fptypeN x) { return ::__tg_acos(x); } | ||
| 1761 | |||
| 1762 | /*! @abstract Generalizes the <cmath> function asin to operate on vectors of | ||
| 1763 | * floats and doubles. */ | ||
| 1764 | template <typename fptypeN> | ||
| 1765 | static SIMD_CPPFUNC fptypeN asin(fptypeN x) { return ::__tg_asin(x); } | ||
| 1766 | |||
| 1767 | /*! @abstract Generalizes the <cmath> function atan to operate on vectors of | ||
| 1768 | * floats and doubles. */ | ||
| 1769 | template <typename fptypeN> | ||
| 1770 | static SIMD_CPPFUNC fptypeN atan(fptypeN x) { return ::__tg_atan(x); } | ||
| 1771 | |||
| 1772 | /*! @abstract Generalizes the <cmath> function cos to operate on vectors of | ||
| 1773 | * floats and doubles. */ | ||
| 1774 | template <typename fptypeN> | ||
| 1775 | static SIMD_CPPFUNC fptypeN cos(fptypeN x) { return ::__tg_cos(x); } | ||
| 1776 | |||
| 1777 | /*! @abstract Generalizes the <cmath> function sin to operate on vectors of | ||
| 1778 | * floats and doubles. */ | ||
| 1779 | template <typename fptypeN> | ||
| 1780 | static SIMD_CPPFUNC fptypeN sin(fptypeN x) { return ::__tg_sin(x); } | ||
| 1781 | |||
| 1782 | /*! @abstract Generalizes the <cmath> function tan to operate on vectors of | ||
| 1783 | * floats and doubles. */ | ||
| 1784 | template <typename fptypeN> | ||
| 1785 | static SIMD_CPPFUNC fptypeN tan(fptypeN x) { return ::__tg_tan(x); } | ||
| 1786 | |||
| 1787 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1788 | /*! @abstract Generalizes the <cmath> function cospi to operate on vectors | ||
| 1789 | * of floats and doubles. */ | ||
| 1790 | template <typename fptypeN> | ||
| 1791 | static SIMD_CPPFUNC fptypeN cospi(fptypeN x) { return ::__tg_cospi(x); } | ||
| 1792 | #endif | ||
| 1793 | |||
| 1794 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1795 | /*! @abstract Generalizes the <cmath> function sinpi to operate on vectors | ||
| 1796 | * of floats and doubles. */ | ||
| 1797 | template <typename fptypeN> | ||
| 1798 | static SIMD_CPPFUNC fptypeN sinpi(fptypeN x) { return ::__tg_sinpi(x); } | ||
| 1799 | #endif | ||
| 1800 | |||
| 1801 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1802 | /*! @abstract Generalizes the <cmath> function tanpi to operate on vectors | ||
| 1803 | * of floats and doubles. */ | ||
| 1804 | template <typename fptypeN> | ||
| 1805 | static SIMD_CPPFUNC fptypeN tanpi(fptypeN x) { return ::__tg_tanpi(x); } | ||
| 1806 | #endif | ||
| 1807 | |||
| 1808 | /*! @abstract Generalizes the <cmath> function acosh to operate on vectors | ||
| 1809 | * of floats and doubles. */ | ||
| 1810 | template <typename fptypeN> | ||
| 1811 | static SIMD_CPPFUNC fptypeN acosh(fptypeN x) { return ::__tg_acosh(x); } | ||
| 1812 | |||
| 1813 | /*! @abstract Generalizes the <cmath> function asinh to operate on vectors | ||
| 1814 | * of floats and doubles. */ | ||
| 1815 | template <typename fptypeN> | ||
| 1816 | static SIMD_CPPFUNC fptypeN asinh(fptypeN x) { return ::__tg_asinh(x); } | ||
| 1817 | |||
| 1818 | /*! @abstract Generalizes the <cmath> function atanh to operate on vectors | ||
| 1819 | * of floats and doubles. */ | ||
| 1820 | template <typename fptypeN> | ||
| 1821 | static SIMD_CPPFUNC fptypeN atanh(fptypeN x) { return ::__tg_atanh(x); } | ||
| 1822 | |||
| 1823 | /*! @abstract Generalizes the <cmath> function cosh to operate on vectors of | ||
| 1824 | * floats and doubles. */ | ||
| 1825 | template <typename fptypeN> | ||
| 1826 | static SIMD_CPPFUNC fptypeN cosh(fptypeN x) { return ::__tg_cosh(x); } | ||
| 1827 | |||
| 1828 | /*! @abstract Generalizes the <cmath> function sinh to operate on vectors of | ||
| 1829 | * floats and doubles. */ | ||
| 1830 | template <typename fptypeN> | ||
| 1831 | static SIMD_CPPFUNC fptypeN sinh(fptypeN x) { return ::__tg_sinh(x); } | ||
| 1832 | |||
| 1833 | /*! @abstract Generalizes the <cmath> function tanh to operate on vectors of | ||
| 1834 | * floats and doubles. */ | ||
| 1835 | template <typename fptypeN> | ||
| 1836 | static SIMD_CPPFUNC fptypeN tanh(fptypeN x) { return ::__tg_tanh(x); } | ||
| 1837 | |||
| 1838 | /*! @abstract Generalizes the <cmath> function exp to operate on vectors of | ||
| 1839 | * floats and doubles. */ | ||
| 1840 | template <typename fptypeN> | ||
| 1841 | static SIMD_CPPFUNC fptypeN exp(fptypeN x) { return ::__tg_exp(x); } | ||
| 1842 | |||
| 1843 | /*! @abstract Generalizes the <cmath> function exp2 to operate on vectors of | ||
| 1844 | * floats and doubles. */ | ||
| 1845 | template <typename fptypeN> | ||
| 1846 | static SIMD_CPPFUNC fptypeN exp2(fptypeN x) { return ::__tg_exp2(x); } | ||
| 1847 | |||
| 1848 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 1849 | /*! @abstract Generalizes the <cmath> function exp10 to operate on vectors | ||
| 1850 | * of floats and doubles. */ | ||
| 1851 | template <typename fptypeN> | ||
| 1852 | static SIMD_CPPFUNC fptypeN exp10(fptypeN x) { return ::__tg_exp10(x); } | ||
| 1853 | #endif | ||
| 1854 | |||
| 1855 | /*! @abstract Generalizes the <cmath> function expm1 to operate on vectors | ||
| 1856 | * of floats and doubles. */ | ||
| 1857 | template <typename fptypeN> | ||
| 1858 | static SIMD_CPPFUNC fptypeN expm1(fptypeN x) { return ::__tg_expm1(x); } | ||
| 1859 | |||
| 1860 | /*! @abstract Generalizes the <cmath> function log to operate on vectors of | ||
| 1861 | * floats and doubles. */ | ||
| 1862 | template <typename fptypeN> | ||
| 1863 | static SIMD_CPPFUNC fptypeN log(fptypeN x) { return ::__tg_log(x); } | ||
| 1864 | |||
| 1865 | /*! @abstract Generalizes the <cmath> function log2 to operate on vectors of | ||
| 1866 | * floats and doubles. */ | ||
| 1867 | template <typename fptypeN> | ||
| 1868 | static SIMD_CPPFUNC fptypeN log2(fptypeN x) { return ::__tg_log2(x); } | ||
| 1869 | |||
| 1870 | /*! @abstract Generalizes the <cmath> function log10 to operate on vectors | ||
| 1871 | * of floats and doubles. */ | ||
| 1872 | template <typename fptypeN> | ||
| 1873 | static SIMD_CPPFUNC fptypeN log10(fptypeN x) { return ::__tg_log10(x); } | ||
| 1874 | |||
| 1875 | /*! @abstract Generalizes the <cmath> function log1p to operate on vectors | ||
| 1876 | * of floats and doubles. */ | ||
| 1877 | template <typename fptypeN> | ||
| 1878 | static SIMD_CPPFUNC fptypeN log1p(fptypeN x) { return ::__tg_log1p(x); } | ||
| 1879 | |||
| 1880 | /*! @abstract Generalizes the <cmath> function fabs to operate on vectors of | ||
| 1881 | * floats and doubles. */ | ||
| 1882 | template <typename fptypeN> | ||
| 1883 | static SIMD_CPPFUNC fptypeN fabs(fptypeN x) { return ::__tg_fabs(x); } | ||
| 1884 | |||
| 1885 | /*! @abstract Generalizes the <cmath> function cbrt to operate on vectors of | ||
| 1886 | * floats and doubles. */ | ||
| 1887 | template <typename fptypeN> | ||
| 1888 | static SIMD_CPPFUNC fptypeN cbrt(fptypeN x) { return ::__tg_cbrt(x); } | ||
| 1889 | |||
| 1890 | /*! @abstract Generalizes the <cmath> function sqrt to operate on vectors of | ||
| 1891 | * floats and doubles. */ | ||
| 1892 | template <typename fptypeN> | ||
| 1893 | static SIMD_CPPFUNC fptypeN sqrt(fptypeN x) { return ::__tg_sqrt(x); } | ||
| 1894 | |||
| 1895 | /*! @abstract Generalizes the <cmath> function erf to operate on vectors of | ||
| 1896 | * floats and doubles. */ | ||
| 1897 | template <typename fptypeN> | ||
| 1898 | static SIMD_CPPFUNC fptypeN erf(fptypeN x) { return ::__tg_erf(x); } | ||
| 1899 | |||
| 1900 | /*! @abstract Generalizes the <cmath> function erfc to operate on vectors of | ||
| 1901 | * floats and doubles. */ | ||
| 1902 | template <typename fptypeN> | ||
| 1903 | static SIMD_CPPFUNC fptypeN erfc(fptypeN x) { return ::__tg_erfc(x); } | ||
| 1904 | |||
| 1905 | /*! @abstract Generalizes the <cmath> function tgamma to operate on vectors | ||
| 1906 | * of floats and doubles. */ | ||
| 1907 | template <typename fptypeN> | ||
| 1908 | static SIMD_CPPFUNC fptypeN tgamma(fptypeN x) { return ::__tg_tgamma(x); } | ||
| 1909 | |||
| 1910 | /*! @abstract Generalizes the <cmath> function lgamma to operate on vectors | ||
| 1911 | * of floats and doubles. */ | ||
| 1912 | template <typename fptypeN> | ||
| 1913 | static SIMD_CPPFUNC fptypeN lgamma(fptypeN x) { return ::__tg_lgamma(x); } | ||
| 1914 | |||
| 1915 | /*! @abstract Generalizes the <cmath> function ceil to operate on vectors of | ||
| 1916 | * floats and doubles. */ | ||
| 1917 | template <typename fptypeN> | ||
| 1918 | static SIMD_CPPFUNC fptypeN ceil(fptypeN x) { return ::__tg_ceil(x); } | ||
| 1919 | |||
| 1920 | /*! @abstract Generalizes the <cmath> function floor to operate on vectors | ||
| 1921 | * of floats and doubles. */ | ||
| 1922 | template <typename fptypeN> | ||
| 1923 | static SIMD_CPPFUNC fptypeN floor(fptypeN x) { return ::__tg_floor(x); } | ||
| 1924 | |||
| 1925 | /*! @abstract Generalizes the <cmath> function rint to operate on vectors of | ||
| 1926 | * floats and doubles. */ | ||
| 1927 | template <typename fptypeN> | ||
| 1928 | static SIMD_CPPFUNC fptypeN rint(fptypeN x) { return ::__tg_rint(x); } | ||
| 1929 | |||
| 1930 | /*! @abstract Generalizes the <cmath> function round to operate on vectors | ||
| 1931 | * of floats and doubles. */ | ||
| 1932 | template <typename fptypeN> | ||
| 1933 | static SIMD_CPPFUNC fptypeN round(fptypeN x) { return ::__tg_round(x); } | ||
| 1934 | |||
| 1935 | /*! @abstract Generalizes the <cmath> function trunc to operate on vectors | ||
| 1936 | * of floats and doubles. */ | ||
| 1937 | template <typename fptypeN> | ||
| 1938 | static SIMD_CPPFUNC fptypeN trunc(fptypeN x) { return ::__tg_trunc(x); } | ||
| 1939 | |||
| 1940 | /*! @abstract Generalizes the <cmath> function isfinite to operate on | ||
| 1941 | * vectors of floats and doubles. */ | ||
| 1942 | template <typename fptypeN> | ||
| 1943 | static SIMD_CPPFUNC | ||
| 1944 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1945 | isfinite(fptypeN x) { return ::__tg_isfinite(x); } | ||
| 1946 | |||
| 1947 | /*! @abstract Generalizes the <cmath> function isinf to operate on vectors | ||
| 1948 | * of floats and doubles. */ | ||
| 1949 | template <typename fptypeN> | ||
| 1950 | static SIMD_CPPFUNC | ||
| 1951 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1952 | isinf(fptypeN x) { return ::__tg_isinf(x); } | ||
| 1953 | |||
| 1954 | /*! @abstract Generalizes the <cmath> function isnan to operate on vectors | ||
| 1955 | * of floats and doubles. */ | ||
| 1956 | template <typename fptypeN> | ||
| 1957 | static SIMD_CPPFUNC | ||
| 1958 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1959 | isnan(fptypeN x) { return ::__tg_isnan(x); } | ||
| 1960 | |||
| 1961 | /*! @abstract Generalizes the <cmath> function isnormal to operate on | ||
| 1962 | * vectors of floats and doubles. */ | ||
| 1963 | template <typename fptypeN> | ||
| 1964 | static SIMD_CPPFUNC | ||
| 1965 | typename std::enable_if<std::is_floating_point<typename traits<fptypeN>::scalar_t>::value, typename traits<fptypeN>::mask_t>::type | ||
| 1966 | isnormal(fptypeN x) { return ::__tg_isnormal(x); } | ||
| 1967 | |||
| 1968 | /*! @abstract Generalizes the <cmath> function atan2 to operate on vectors | ||
| 1969 | * of floats and doubles. */ | ||
| 1970 | template <typename fptypeN> | ||
| 1971 | static SIMD_CPPFUNC fptypeN atan2(fptypeN y, fptypeN x) { return ::__tg_atan2(y, x); } | ||
| 1972 | |||
| 1973 | /*! @abstract Generalizes the <cmath> function hypot to operate on vectors | ||
| 1974 | * of floats and doubles. */ | ||
| 1975 | template <typename fptypeN> | ||
| 1976 | static SIMD_CPPFUNC fptypeN hypot(fptypeN x, fptypeN y) { return ::__tg_hypot(x, y); } | ||
| 1977 | |||
| 1978 | /*! @abstract Generalizes the <cmath> function pow to operate on vectors of | ||
| 1979 | * floats and doubles. */ | ||
| 1980 | template <typename fptypeN> | ||
| 1981 | static SIMD_CPPFUNC fptypeN pow(fptypeN x, fptypeN y) { return ::__tg_pow(x, y); } | ||
| 1982 | |||
| 1983 | /*! @abstract Generalizes the <cmath> function fmod to operate on vectors of | ||
| 1984 | * floats and doubles. */ | ||
| 1985 | template <typename fptypeN> | ||
| 1986 | static SIMD_CPPFUNC fptypeN fmod(fptypeN x, fptypeN y) { return ::__tg_fmod(x, y); } | ||
| 1987 | |||
| 1988 | /*! @abstract Generalizes the <cmath> function remainder to operate on | ||
| 1989 | * vectors of floats and doubles. */ | ||
| 1990 | template <typename fptypeN> | ||
| 1991 | static SIMD_CPPFUNC fptypeN remainder(fptypeN x, fptypeN y) { return ::__tg_remainder(x, y); } | ||
| 1992 | |||
| 1993 | /*! @abstract Generalizes the <cmath> function copysign to operate on | ||
| 1994 | * vectors of floats and doubles. */ | ||
| 1995 | template <typename fptypeN> | ||
| 1996 | static SIMD_CPPFUNC fptypeN copysign(fptypeN x, fptypeN y) { return ::__tg_copysign(x, y); } | ||
| 1997 | |||
| 1998 | /*! @abstract Generalizes the <cmath> function nextafter to operate on | ||
| 1999 | * vectors of floats and doubles. */ | ||
| 2000 | template <typename fptypeN> | ||
| 2001 | static SIMD_CPPFUNC fptypeN nextafter(fptypeN x, fptypeN y) { return ::__tg_nextafter(x, y); } | ||
| 2002 | |||
| 2003 | /*! @abstract Generalizes the <cmath> function fdim to operate on vectors of | ||
| 2004 | * floats and doubles. */ | ||
| 2005 | template <typename fptypeN> | ||
| 2006 | static SIMD_CPPFUNC fptypeN fdim(fptypeN x, fptypeN y) { return ::__tg_fdim(x, y); } | ||
| 2007 | |||
| 2008 | /*! @abstract Generalizes the <cmath> function fmax to operate on vectors of | ||
| 2009 | * floats and doubles. */ | ||
| 2010 | template <typename fptypeN> | ||
| 2011 | static SIMD_CPPFUNC fptypeN fmax(fptypeN x, fptypeN y) { return ::__tg_fmax(x, y); } | ||
| 2012 | |||
| 2013 | /*! @abstract Generalizes the <cmath> function fmin to operate on vectors of | ||
| 2014 | * floats and doubles. */ | ||
| 2015 | template <typename fptypeN> | ||
| 2016 | static SIMD_CPPFUNC fptypeN fmin(fptypeN x, fptypeN y) { return ::__tg_fmin(x, y); } | ||
| 2017 | |||
| 2018 | /*! @abstract Generalizes the <cmath> function fma to operate on vectors of | ||
| 2019 | * floats and doubles. */ | ||
| 2020 | template <typename fptypeN> | ||
| 2021 | static SIMD_CPPFUNC fptypeN fma(fptypeN x, fptypeN y, fptypeN z) { return ::__tg_fma(x, y, z); } | ||
| 2022 | |||
| 2023 | /*! @abstract Computes x*y + z by the most efficient means available; either | ||
| 2024 | * a fused multiply add or separate multiply and add. */ | ||
| 2025 | template <typename fptypeN> | ||
| 2026 | static SIMD_CPPFUNC fptypeN muladd(fptypeN x, fptypeN y, fptypeN z) { return ::simd_muladd(x, y, z); } | ||
| 2027 | }; | ||
| 2028 | |||
| 2029 | extern "C" { | ||
| 2030 | #else | ||
| 2031 | #include <tgmath.h> | ||
| 2032 | /* C and Objective-C, we need some infrastructure to piggyback on tgmath.h */ | ||
| 2033 | static SIMD_OVERLOAD simd_float2 __tg_promote(simd_float2); | ||
| 2034 | static SIMD_OVERLOAD simd_float3 __tg_promote(simd_float3); | ||
| 2035 | static SIMD_OVERLOAD simd_float4 __tg_promote(simd_float4); | ||
| 2036 | static SIMD_OVERLOAD simd_float8 __tg_promote(simd_float8); | ||
| 2037 | static SIMD_OVERLOAD simd_float16 __tg_promote(simd_float16); | ||
| 2038 | static SIMD_OVERLOAD simd_double2 __tg_promote(simd_double2); | ||
| 2039 | static SIMD_OVERLOAD simd_double3 __tg_promote(simd_double3); | ||
| 2040 | static SIMD_OVERLOAD simd_double4 __tg_promote(simd_double4); | ||
| 2041 | static SIMD_OVERLOAD simd_double8 __tg_promote(simd_double8); | ||
| 2042 | |||
| 2043 | /* Apple extensions to <math.h>, added in macOS 10.9 and iOS 7.0 */ | ||
| 2044 | #if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_9 || \ | ||
| 2045 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_7_0 || \ | ||
| 2046 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 | ||
| 2047 | static inline SIMD_CFUNC float __tg_cospi(float x) { return __cospif(x); } | ||
| 2048 | static inline SIMD_CFUNC double __tg_cospi(double x) { return __cospi(x); } | ||
| 2049 | #undef cospi | ||
| 2050 | /*! @abstract `cospi(x)` computes `cos(pi * x)` without intermediate rounding. | ||
| 2051 | * | ||
| 2052 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2053 | * calling `cos`. Defined for `float` and `double` as well as vectors of | ||
| 2054 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2055 | #define cospi(__x) __tg_cospi(__tg_promote1((__x))(__x)) | ||
| 2056 | |||
| 2057 | static inline SIMD_CFUNC float __tg_sinpi(float x) { return __sinpif(x); } | ||
| 2058 | static inline SIMD_CFUNC double __tg_sinpi(double x) { return __sinpi(x); } | ||
| 2059 | #undef sinpi | ||
| 2060 | /*! @abstract `sinpi(x)` computes `sin(pi * x)` without intermediate rounding. | ||
| 2061 | * | ||
| 2062 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2063 | * calling `sin`. Defined for `float` and `double` as well as vectors | ||
| 2064 | * of floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2065 | #define sinpi(__x) __tg_sinpi(__tg_promote1((__x))(__x)) | ||
| 2066 | |||
| 2067 | static inline SIMD_CFUNC float __tg_tanpi(float x) { return __tanpif(x); } | ||
| 2068 | static inline SIMD_CFUNC double __tg_tanpi(double x) { return __tanpi(x); } | ||
| 2069 | #undef tanpi | ||
| 2070 | /*! @abstract `tanpi(x)` computes `tan(pi * x)` without intermediate rounding. | ||
| 2071 | * | ||
| 2072 | * @discussion Both faster and more accurate than multiplying by `pi` and then | ||
| 2073 | * calling `tan`. Defined for `float` and `double` as well as vectors of | ||
| 2074 | * floats and doubles as provided by `<simd/simd.h>`. */ | ||
| 2075 | #define tanpi(__x) __tg_tanpi(__tg_promote1((__x))(__x)) | ||
| 2076 | |||
| 2077 | static inline SIMD_CFUNC float __tg_exp10(float x) { return __exp10f(x); } | ||
| 2078 | static inline SIMD_CFUNC double __tg_exp10(double x) { return __exp10(x); } | ||
| 2079 | #undef exp10 | ||
| 2080 | /*! @abstract `exp10(x)` computes `10**x` more efficiently and accurately | ||
| 2081 | * than `pow(10, x)`. | ||
| 2082 | * | ||
| 2083 | * @discussion Defined for `float` and `double` as well as vectors of floats | ||
| 2084 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2085 | #define exp10(__x) __tg_exp10(__tg_promote1((__x))(__x)) | ||
| 2086 | #endif | ||
| 2087 | |||
| 2088 | #if (defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__) | ||
| 2089 | static inline SIMD_CFUNC int __tg_isfinite(float x) { return __inline_isfinitef(x); } | ||
| 2090 | static inline SIMD_CFUNC int __tg_isfinite(double x) { return __inline_isfinited(x); } | ||
| 2091 | static inline SIMD_CFUNC int __tg_isfinite(long double x) { return __inline_isfinitel(x); } | ||
| 2092 | #undef isfinite | ||
| 2093 | /*! @abstract `__tg_isfinite(x)` determines if x is a finite value. | ||
| 2094 | * | ||
| 2095 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2096 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2097 | #define isfinite(__x) __tg_isfinite(__tg_promote1((__x))(__x)) | ||
| 2098 | |||
| 2099 | static inline SIMD_CFUNC int __tg_isinf(float x) { return __inline_isinff(x); } | ||
| 2100 | static inline SIMD_CFUNC int __tg_isinf(double x) { return __inline_isinfd(x); } | ||
| 2101 | static inline SIMD_CFUNC int __tg_isinf(long double x) { return __inline_isinfl(x); } | ||
| 2102 | #undef isinf | ||
| 2103 | /*! @abstract `__tg_isinf(x)` determines if x is positive or negative infinity. | ||
| 2104 | * | ||
| 2105 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2106 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2107 | #define isinf(__x) __tg_isinf(__tg_promote1((__x))(__x)) | ||
| 2108 | |||
| 2109 | static inline SIMD_CFUNC int __tg_isnan(float x) { return __inline_isnanf(x); } | ||
| 2110 | static inline SIMD_CFUNC int __tg_isnan(double x) { return __inline_isnand(x); } | ||
| 2111 | static inline SIMD_CFUNC int __tg_isnan(long double x) { return __inline_isnanl(x); } | ||
| 2112 | #undef isnan | ||
| 2113 | /*! @abstract `__tg_isnan(x)` determines if x is a not-a-number (NaN) value. | ||
| 2114 | * | ||
| 2115 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2116 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2117 | #define isnan(__x) __tg_isnan(__tg_promote1((__x))(__x)) | ||
| 2118 | |||
| 2119 | static inline SIMD_CFUNC int __tg_isnormal(float x) { return __inline_isnormalf(x); } | ||
| 2120 | static inline SIMD_CFUNC int __tg_isnormal(double x) { return __inline_isnormald(x); } | ||
| 2121 | static inline SIMD_CFUNC int __tg_isnormal(long double x) { return __inline_isnormall(x); } | ||
| 2122 | #undef isnormal | ||
| 2123 | /*! @abstract `__tg_isnormal(x)` determines if x is a normal value. | ||
| 2124 | * | ||
| 2125 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2126 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2127 | #define isnormal(__x) __tg_isnormal(__tg_promote1((__x))(__x)) | ||
| 2128 | |||
| 2129 | #else /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */ | ||
| 2130 | |||
| 2131 | static inline SIMD_CFUNC int __tg_isfinite(float x) { return __isfinitef(x); } | ||
| 2132 | static inline SIMD_CFUNC int __tg_isfinite(double x) { return __isfinited(x); } | ||
| 2133 | static inline SIMD_CFUNC int __tg_isfinite(long double x) { return __isfinitel(x); } | ||
| 2134 | #undef isfinite | ||
| 2135 | /*! @abstract `__tg_isfinite(x)` determines if x is a finite value. | ||
| 2136 | * | ||
| 2137 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2138 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2139 | #define isfinite(__x) __tg_isfinite(__tg_promote1((__x))(__x)) | ||
| 2140 | |||
| 2141 | static inline SIMD_CFUNC int __tg_isinf(float x) { return __isinff(x); } | ||
| 2142 | static inline SIMD_CFUNC int __tg_isinf(double x) { return __isinfd(x); } | ||
| 2143 | static inline SIMD_CFUNC int __tg_isinf(long double x) { return __isinfl(x); } | ||
| 2144 | #undef isinf | ||
| 2145 | /*! @abstract `__tg_isinf(x)` determines if x is positive or negative infinity. | ||
| 2146 | * | ||
| 2147 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2148 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2149 | #define isinf(__x) __tg_isinf(__tg_promote1((__x))(__x)) | ||
| 2150 | |||
| 2151 | static inline SIMD_CFUNC int __tg_isnan(float x) { return __isnanf(x); } | ||
| 2152 | static inline SIMD_CFUNC int __tg_isnan(double x) { return __isnand(x); } | ||
| 2153 | static inline SIMD_CFUNC int __tg_isnan(long double x) { return __isnanl(x); } | ||
| 2154 | #undef isnan | ||
| 2155 | /*! @abstract `__tg_isnan(x)` determines if x is a not-a-number (NaN) value. | ||
| 2156 | * | ||
| 2157 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2158 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2159 | #define isnan(__x) __tg_isnan(__tg_promote1((__x))(__x)) | ||
| 2160 | |||
| 2161 | static inline SIMD_CFUNC int __tg_isnormal(float x) { return __isnormalf(x); } | ||
| 2162 | static inline SIMD_CFUNC int __tg_isnormal(double x) { return __isnormald(x); } | ||
| 2163 | static inline SIMD_CFUNC int __tg_isnormal(long double x) { return __isnormall(x); } | ||
| 2164 | #undef isnormal | ||
| 2165 | /*! @abstract `__tg_isnormal(x)` determines if x is a normal value. | ||
| 2166 | * | ||
| 2167 | * @discussion Defined for `float`, `double` and `long double` as well as vectors of floats | ||
| 2168 | * and doubles as provided by `<simd/simd.h>`. */ | ||
| 2169 | #define isnormal(__x) __tg_isnormal(__tg_promote1((__x))(__x)) | ||
| 2170 | #endif /* defined(__GNUC__) && 0 == __FINITE_MATH_ONLY__ */ | ||
| 2171 | #endif /* !__cplusplus */ | ||
| 2172 | |||
| 2173 | #pragma mark - fabs implementation | ||
| 2174 | static inline SIMD_CFUNC simd_float2 __tg_fabs(simd_float2 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2175 | static inline SIMD_CFUNC simd_float3 __tg_fabs(simd_float3 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2176 | static inline SIMD_CFUNC simd_float4 __tg_fabs(simd_float4 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2177 | static inline SIMD_CFUNC simd_float8 __tg_fabs(simd_float8 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2178 | static inline SIMD_CFUNC simd_float16 __tg_fabs(simd_float16 x) { return simd_bitselect(0.0, x, 0x7fffffff); } | ||
| 2179 | static inline SIMD_CFUNC simd_double2 __tg_fabs(simd_double2 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2180 | static inline SIMD_CFUNC simd_double3 __tg_fabs(simd_double3 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2181 | static inline SIMD_CFUNC simd_double4 __tg_fabs(simd_double4 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2182 | static inline SIMD_CFUNC simd_double8 __tg_fabs(simd_double8 x) { return simd_bitselect(0.0, x, 0x7fffffffffffffffL); } | ||
| 2183 | |||
| 2184 | #pragma mark - isfinite implementation | ||
| 2185 | static inline SIMD_CFUNC simd_int2 __tg_isfinite(simd_float2 x) { return x == x && __tg_fabs(x) != (simd_float2)INFINITY; } | ||
| 2186 | static inline SIMD_CFUNC simd_int3 __tg_isfinite(simd_float3 x) { return x == x && __tg_fabs(x) != (simd_float3)INFINITY; } | ||
| 2187 | static inline SIMD_CFUNC simd_int4 __tg_isfinite(simd_float4 x) { return x == x && __tg_fabs(x) != (simd_float4)INFINITY; } | ||
| 2188 | static inline SIMD_CFUNC simd_int8 __tg_isfinite(simd_float8 x) { return x == x && __tg_fabs(x) != (simd_float8)INFINITY; } | ||
| 2189 | static inline SIMD_CFUNC simd_int16 __tg_isfinite(simd_float16 x) { return x == x && __tg_fabs(x) != (simd_float16)INFINITY; } | ||
| 2190 | static inline SIMD_CFUNC simd_long2 __tg_isfinite(simd_double2 x) { return x == x && __tg_fabs(x) != (simd_double2)INFINITY; } | ||
| 2191 | static inline SIMD_CFUNC simd_long3 __tg_isfinite(simd_double3 x) { return x == x && __tg_fabs(x) != (simd_double3)INFINITY; } | ||
| 2192 | static inline SIMD_CFUNC simd_long4 __tg_isfinite(simd_double4 x) { return x == x && __tg_fabs(x) != (simd_double4)INFINITY; } | ||
| 2193 | static inline SIMD_CFUNC simd_long8 __tg_isfinite(simd_double8 x) { return x == x && __tg_fabs(x) != (simd_double8)INFINITY; } | ||
| 2194 | |||
| 2195 | #pragma mark - isinf implementation | ||
| 2196 | static inline SIMD_CFUNC simd_int2 __tg_isinf(simd_float2 x) { return __tg_fabs(x) == (simd_float2)INFINITY; } | ||
| 2197 | static inline SIMD_CFUNC simd_int3 __tg_isinf(simd_float3 x) { return __tg_fabs(x) == (simd_float3)INFINITY; } | ||
| 2198 | static inline SIMD_CFUNC simd_int4 __tg_isinf(simd_float4 x) { return __tg_fabs(x) == (simd_float4)INFINITY; } | ||
| 2199 | static inline SIMD_CFUNC simd_int8 __tg_isinf(simd_float8 x) { return __tg_fabs(x) == (simd_float8)INFINITY; } | ||
| 2200 | static inline SIMD_CFUNC simd_int16 __tg_isinf(simd_float16 x) { return __tg_fabs(x) == (simd_float16)INFINITY; } | ||
| 2201 | static inline SIMD_CFUNC simd_long2 __tg_isinf(simd_double2 x) { return __tg_fabs(x) == (simd_double2)INFINITY; } | ||
| 2202 | static inline SIMD_CFUNC simd_long3 __tg_isinf(simd_double3 x) { return __tg_fabs(x) == (simd_double3)INFINITY; } | ||
| 2203 | static inline SIMD_CFUNC simd_long4 __tg_isinf(simd_double4 x) { return __tg_fabs(x) == (simd_double4)INFINITY; } | ||
| 2204 | static inline SIMD_CFUNC simd_long8 __tg_isinf(simd_double8 x) { return __tg_fabs(x) == (simd_double8)INFINITY; } | ||
| 2205 | |||
| 2206 | #pragma mark - isnan implementation | ||
| 2207 | static inline SIMD_CFUNC simd_int2 __tg_isnan(simd_float2 x) { return x != x; } | ||
| 2208 | static inline SIMD_CFUNC simd_int3 __tg_isnan(simd_float3 x) { return x != x; } | ||
| 2209 | static inline SIMD_CFUNC simd_int4 __tg_isnan(simd_float4 x) { return x != x; } | ||
| 2210 | static inline SIMD_CFUNC simd_int8 __tg_isnan(simd_float8 x) { return x != x; } | ||
| 2211 | static inline SIMD_CFUNC simd_int16 __tg_isnan(simd_float16 x) { return x != x; } | ||
| 2212 | static inline SIMD_CFUNC simd_long2 __tg_isnan(simd_double2 x) { return x != x; } | ||
| 2213 | static inline SIMD_CFUNC simd_long3 __tg_isnan(simd_double3 x) { return x != x; } | ||
| 2214 | static inline SIMD_CFUNC simd_long4 __tg_isnan(simd_double4 x) { return x != x; } | ||
| 2215 | static inline SIMD_CFUNC simd_long8 __tg_isnan(simd_double8 x) { return x != x; } | ||
| 2216 | |||
| 2217 | #pragma mark - isnormal implementation | ||
| 2218 | static inline SIMD_CFUNC simd_int2 __tg_isnormal(simd_float2 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float2)__FLT_MIN__; } | ||
| 2219 | static inline SIMD_CFUNC simd_int3 __tg_isnormal(simd_float3 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float3)__FLT_MIN__; } | ||
| 2220 | static inline SIMD_CFUNC simd_int4 __tg_isnormal(simd_float4 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float4)__FLT_MIN__; } | ||
| 2221 | static inline SIMD_CFUNC simd_int8 __tg_isnormal(simd_float8 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float8)__FLT_MIN__; } | ||
| 2222 | static inline SIMD_CFUNC simd_int16 __tg_isnormal(simd_float16 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_float16)__FLT_MIN__; } | ||
| 2223 | static inline SIMD_CFUNC simd_long2 __tg_isnormal(simd_double2 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double2)__DBL_MIN__; } | ||
| 2224 | static inline SIMD_CFUNC simd_long3 __tg_isnormal(simd_double3 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double3)__DBL_MIN__; } | ||
| 2225 | static inline SIMD_CFUNC simd_long4 __tg_isnormal(simd_double4 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double4)__DBL_MIN__; } | ||
| 2226 | static inline SIMD_CFUNC simd_long8 __tg_isnormal(simd_double8 x) { return __tg_isfinite(x) && __tg_fabs(x) >= (simd_double8)__DBL_MIN__; } | ||
| 2227 | |||
| 2228 | #pragma mark - fmin, fmax implementation | ||
| 2229 | static SIMD_CFUNC simd_float2 __tg_fmin(simd_float2 x, simd_float2 y) { | ||
| 2230 | #if defined __SSE2__ | ||
| 2231 | return simd_make_float2(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2232 | #elif defined __arm64__ | ||
| 2233 | return vminnm_f32(x, y); | ||
| 2234 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2235 | return vmin_f32(x, y); | ||
| 2236 | #else | ||
| 2237 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2238 | #endif | ||
| 2239 | } | ||
| 2240 | |||
| 2241 | static SIMD_CFUNC simd_float3 __tg_fmin(simd_float3 x, simd_float3 y) { | ||
| 2242 | return simd_make_float3(__tg_fmin(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2243 | } | ||
| 2244 | |||
| 2245 | static SIMD_CFUNC simd_float4 __tg_fmin(simd_float4 x, simd_float4 y) { | ||
| 2246 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2247 | return _mm_range_ps(x, y, 4); | ||
| 2248 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2249 | return _mm_min_ps(x, y); | ||
| 2250 | #elif defined __SSE2__ | ||
| 2251 | return simd_bitselect(_mm_min_ps(x, y), x, y != y); | ||
| 2252 | #elif defined __arm64__ | ||
| 2253 | return vminnmq_f32(x, y); | ||
| 2254 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2255 | return vminq_f32(x, y); | ||
| 2256 | #else | ||
| 2257 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2258 | #endif | ||
| 2259 | } | ||
| 2260 | |||
| 2261 | static SIMD_CFUNC simd_float8 __tg_fmin(simd_float8 x, simd_float8 y) { | ||
| 2262 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2263 | return _mm256_range_ps(x, y, 4); | ||
| 2264 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2265 | return _mm256_min_ps(x, y); | ||
| 2266 | #elif defined __AVX__ | ||
| 2267 | return simd_bitselect(_mm256_min_ps(x, y), x, y != y); | ||
| 2268 | #else | ||
| 2269 | return simd_make_float8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2270 | #endif | ||
| 2271 | } | ||
| 2272 | |||
| 2273 | static SIMD_CFUNC simd_float16 __tg_fmin(simd_float16 x, simd_float16 y) { | ||
| 2274 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 2275 | return _mm512_range_ps(x, y, 4); | ||
| 2276 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2277 | return _mm512_min_ps(x, y); | ||
| 2278 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2279 | return simd_bitselect(_mm512_min_ps(x, y), x, y != y); | ||
| 2280 | #else | ||
| 2281 | return simd_make_float16(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2282 | #endif | ||
| 2283 | } | ||
| 2284 | |||
| 2285 | static SIMD_CFUNC simd_double2 __tg_fmin(simd_double2 x, simd_double2 y) { | ||
| 2286 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2287 | return _mm_range_pd(x, y, 4); | ||
| 2288 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2289 | return _mm_min_pd(x, y); | ||
| 2290 | #elif defined __SSE2__ | ||
| 2291 | return simd_bitselect(_mm_min_pd(x, y), x, y != y); | ||
| 2292 | #elif defined __arm64__ | ||
| 2293 | return vminnmq_f64(x, y); | ||
| 2294 | #else | ||
| 2295 | return simd_bitselect(y, x, (x <= y) | (y != y)); | ||
| 2296 | #endif | ||
| 2297 | } | ||
| 2298 | |||
| 2299 | static SIMD_CFUNC simd_double3 __tg_fmin(simd_double3 x, simd_double3 y) { | ||
| 2300 | return simd_make_double3(__tg_fmin(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 2301 | } | ||
| 2302 | |||
| 2303 | static SIMD_CFUNC simd_double4 __tg_fmin(simd_double4 x, simd_double4 y) { | ||
| 2304 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2305 | return _mm256_range_pd(x, y, 4); | ||
| 2306 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2307 | return _mm256_min_pd(x, y); | ||
| 2308 | #elif defined __AVX__ | ||
| 2309 | return simd_bitselect(_mm256_min_pd(x, y), x, y != y); | ||
| 2310 | #else | ||
| 2311 | return simd_make_double4(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2312 | #endif | ||
| 2313 | } | ||
| 2314 | |||
| 2315 | static SIMD_CFUNC simd_double8 __tg_fmin(simd_double8 x, simd_double8 y) { | ||
| 2316 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 2317 | return _mm512_range_pd(x, y, 4); | ||
| 2318 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2319 | return _mm512_min_pd(x, y); | ||
| 2320 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2321 | return simd_bitselect(_mm512_min_pd(x, y), x, y != y); | ||
| 2322 | #else | ||
| 2323 | return simd_make_double8(__tg_fmin(x.lo, y.lo), __tg_fmin(x.hi, y.hi)); | ||
| 2324 | #endif | ||
| 2325 | } | ||
| 2326 | |||
| 2327 | static SIMD_CFUNC simd_float2 __tg_fmax(simd_float2 x, simd_float2 y) { | ||
| 2328 | #if defined __SSE2__ | ||
| 2329 | return simd_make_float2(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2330 | #elif defined __arm64__ | ||
| 2331 | return vmaxnm_f32(x, y); | ||
| 2332 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2333 | return vmax_f32(x, y); | ||
| 2334 | #else | ||
| 2335 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2336 | #endif | ||
| 2337 | } | ||
| 2338 | |||
| 2339 | static SIMD_CFUNC simd_float3 __tg_fmax(simd_float3 x, simd_float3 y) { | ||
| 2340 | return simd_make_float3(__tg_fmax(simd_make_float4_undef(x), simd_make_float4_undef(y))); | ||
| 2341 | } | ||
| 2342 | |||
| 2343 | static SIMD_CFUNC simd_float4 __tg_fmax(simd_float4 x, simd_float4 y) { | ||
| 2344 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2345 | return _mm_range_ps(x, y, 5); | ||
| 2346 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2347 | return _mm_max_ps(x, y); | ||
| 2348 | #elif defined __SSE2__ | ||
| 2349 | return simd_bitselect(_mm_max_ps(x, y), x, y != y); | ||
| 2350 | #elif defined __arm64__ | ||
| 2351 | return vmaxnmq_f32(x, y); | ||
| 2352 | #elif defined __arm__ && __FINITE_MATH_ONLY__ | ||
| 2353 | return vmaxq_f32(x, y); | ||
| 2354 | #else | ||
| 2355 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2356 | #endif | ||
| 2357 | } | ||
| 2358 | |||
| 2359 | static SIMD_CFUNC simd_float8 __tg_fmax(simd_float8 x, simd_float8 y) { | ||
| 2360 | #if defined __AVX512DQ__ && defined __AVX512VL__ && !__FINITE_MATH_ONLY__ | ||
| 2361 | return _mm256_range_ps(x, y, 5); | ||
| 2362 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2363 | return _mm256_max_ps(x, y); | ||
| 2364 | #elif defined __AVX__ | ||
| 2365 | return simd_bitselect(_mm256_max_ps(x, y), x, y != y); | ||
| 2366 | #else | ||
| 2367 | return simd_make_float8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2368 | #endif | ||
| 2369 | } | ||
| 2370 | |||
| 2371 | static SIMD_CFUNC simd_float16 __tg_fmax(simd_float16 x, simd_float16 y) { | ||
| 2372 | #if defined __x86_64__ && defined __AVX512DQ__ && !__FINITE_MATH_ONLY__ | ||
| 2373 | return _mm512_range_ps(x, y, 5); | ||
| 2374 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2375 | return _mm512_max_ps(x, y); | ||
| 2376 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2377 | return simd_bitselect(_mm512_max_ps(x, y), x, y != y); | ||
| 2378 | #else | ||
| 2379 | return simd_make_float16(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2380 | #endif | ||
| 2381 | } | ||
| 2382 | |||
| 2383 | static SIMD_CFUNC simd_double2 __tg_fmax(simd_double2 x, simd_double2 y) { | ||
| 2384 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2385 | return _mm_range_pd(x, y, 5); | ||
| 2386 | #elif defined __SSE2__ && __FINITE_MATH_ONLY__ | ||
| 2387 | return _mm_max_pd(x, y); | ||
| 2388 | #elif defined __SSE2__ | ||
| 2389 | return simd_bitselect(_mm_max_pd(x, y), x, y != y); | ||
| 2390 | #elif defined __arm64__ | ||
| 2391 | return vmaxnmq_f64(x, y); | ||
| 2392 | #else | ||
| 2393 | return simd_bitselect(y, x, (x >= y) | (y != y)); | ||
| 2394 | #endif | ||
| 2395 | } | ||
| 2396 | |||
| 2397 | static SIMD_CFUNC simd_double3 __tg_fmax(simd_double3 x, simd_double3 y) { | ||
| 2398 | return simd_make_double3(__tg_fmax(simd_make_double4_undef(x), simd_make_double4_undef(y))); | ||
| 2399 | } | ||
| 2400 | |||
| 2401 | static SIMD_CFUNC simd_double4 __tg_fmax(simd_double4 x, simd_double4 y) { | ||
| 2402 | #if defined __AVX512DQ__ && defined __AVX512VL__ | ||
| 2403 | return _mm256_range_pd(x, y, 5); | ||
| 2404 | #elif defined __AVX__ && __FINITE_MATH_ONLY__ | ||
| 2405 | return _mm256_max_pd(x, y); | ||
| 2406 | #elif defined __AVX__ | ||
| 2407 | return simd_bitselect(_mm256_max_pd(x, y), x, y != y); | ||
| 2408 | #else | ||
| 2409 | return simd_make_double4(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2410 | #endif | ||
| 2411 | } | ||
| 2412 | |||
| 2413 | static SIMD_CFUNC simd_double8 __tg_fmax(simd_double8 x, simd_double8 y) { | ||
| 2414 | #if defined __x86_64__ && defined __AVX512DQ__ | ||
| 2415 | return _mm512_range_pd(x, y, 5); | ||
| 2416 | #elif defined __x86_64__ && defined __AVX512F__ && __FINITE_MATH_ONLY__ | ||
| 2417 | return _mm512_max_pd(x, y); | ||
| 2418 | #elif defined __x86_64__ && defined __AVX512F__ | ||
| 2419 | return simd_bitselect(_mm512_max_pd(x, y), x, y != y); | ||
| 2420 | #else | ||
| 2421 | return simd_make_double8(__tg_fmax(x.lo, y.lo), __tg_fmax(x.hi, y.hi)); | ||
| 2422 | #endif | ||
| 2423 | } | ||
| 2424 | |||
| 2425 | #pragma mark - copysign implementation | ||
| 2426 | static inline SIMD_CFUNC simd_float2 __tg_copysign(simd_float2 x, simd_float2 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2427 | static inline SIMD_CFUNC simd_float3 __tg_copysign(simd_float3 x, simd_float3 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2428 | static inline SIMD_CFUNC simd_float4 __tg_copysign(simd_float4 x, simd_float4 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2429 | static inline SIMD_CFUNC simd_float8 __tg_copysign(simd_float8 x, simd_float8 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2430 | static inline SIMD_CFUNC simd_float16 __tg_copysign(simd_float16 x, simd_float16 y) { return simd_bitselect(y, x, 0x7fffffff); } | ||
| 2431 | static inline SIMD_CFUNC simd_double2 __tg_copysign(simd_double2 x, simd_double2 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2432 | static inline SIMD_CFUNC simd_double3 __tg_copysign(simd_double3 x, simd_double3 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2433 | static inline SIMD_CFUNC simd_double4 __tg_copysign(simd_double4 x, simd_double4 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2434 | static inline SIMD_CFUNC simd_double8 __tg_copysign(simd_double8 x, simd_double8 y) { return simd_bitselect(y, x, 0x7fffffffffffffffL); } | ||
| 2435 | |||
| 2436 | #pragma mark - sqrt implementation | ||
| 2437 | static SIMD_CFUNC simd_float2 __tg_sqrt(simd_float2 x) { | ||
| 2438 | #if defined __SSE2__ | ||
| 2439 | return simd_make_float2(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2440 | #elif defined __arm64__ | ||
| 2441 | return vsqrt_f32(x); | ||
| 2442 | #else | ||
| 2443 | return simd_make_float2(sqrt(x.x), sqrt(x.y)); | ||
| 2444 | #endif | ||
| 2445 | } | ||
| 2446 | |||
| 2447 | static SIMD_CFUNC simd_float3 __tg_sqrt(simd_float3 x) { | ||
| 2448 | return simd_make_float3(__tg_sqrt(simd_make_float4_undef(x))); | ||
| 2449 | } | ||
| 2450 | |||
| 2451 | static SIMD_CFUNC simd_float4 __tg_sqrt(simd_float4 x) { | ||
| 2452 | #if defined __SSE2__ | ||
| 2453 | return _mm_sqrt_ps(x); | ||
| 2454 | #elif defined __arm64__ | ||
| 2455 | return vsqrtq_f32(x); | ||
| 2456 | #else | ||
| 2457 | return simd_make_float4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2458 | #endif | ||
| 2459 | } | ||
| 2460 | |||
| 2461 | static SIMD_CFUNC simd_float8 __tg_sqrt(simd_float8 x) { | ||
| 2462 | #if defined __AVX__ | ||
| 2463 | return _mm256_sqrt_ps(x); | ||
| 2464 | #else | ||
| 2465 | return simd_make_float8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2466 | #endif | ||
| 2467 | } | ||
| 2468 | |||
| 2469 | static SIMD_CFUNC simd_float16 __tg_sqrt(simd_float16 x) { | ||
| 2470 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2471 | return _mm512_sqrt_ps(x); | ||
| 2472 | #else | ||
| 2473 | return simd_make_float16(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2474 | #endif | ||
| 2475 | } | ||
| 2476 | |||
| 2477 | static SIMD_CFUNC simd_double2 __tg_sqrt(simd_double2 x) { | ||
| 2478 | #if defined __SSE2__ | ||
| 2479 | return _mm_sqrt_pd(x); | ||
| 2480 | #elif defined __arm64__ | ||
| 2481 | return vsqrtq_f64(x); | ||
| 2482 | #else | ||
| 2483 | return simd_make_double2(sqrt(x.x), sqrt(x.y)); | ||
| 2484 | #endif | ||
| 2485 | } | ||
| 2486 | |||
| 2487 | static SIMD_CFUNC simd_double3 __tg_sqrt(simd_double3 x) { | ||
| 2488 | return simd_make_double3(__tg_sqrt(simd_make_double4_undef(x))); | ||
| 2489 | } | ||
| 2490 | |||
| 2491 | static SIMD_CFUNC simd_double4 __tg_sqrt(simd_double4 x) { | ||
| 2492 | #if defined __AVX__ | ||
| 2493 | return _mm256_sqrt_pd(x); | ||
| 2494 | #else | ||
| 2495 | return simd_make_double4(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2496 | #endif | ||
| 2497 | } | ||
| 2498 | |||
| 2499 | static SIMD_CFUNC simd_double8 __tg_sqrt(simd_double8 x) { | ||
| 2500 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2501 | return _mm512_sqrt_pd(x); | ||
| 2502 | #else | ||
| 2503 | return simd_make_double8(__tg_sqrt(x.lo), __tg_sqrt(x.hi)); | ||
| 2504 | #endif | ||
| 2505 | } | ||
| 2506 | |||
| 2507 | #pragma mark - ceil, floor, rint, trunc implementation | ||
| 2508 | static SIMD_CFUNC simd_float2 __tg_ceil(simd_float2 x) { | ||
| 2509 | #if defined __arm64__ | ||
| 2510 | return vrndp_f32(x); | ||
| 2511 | #else | ||
| 2512 | return simd_make_float2(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2513 | #endif | ||
| 2514 | } | ||
| 2515 | |||
| 2516 | static SIMD_CFUNC simd_float3 __tg_ceil(simd_float3 x) { | ||
| 2517 | return simd_make_float3(__tg_ceil(simd_make_float4_undef(x))); | ||
| 2518 | } | ||
| 2519 | |||
| 2520 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2521 | extern simd_float4 _simd_ceil_f4(simd_float4 x); | ||
| 2522 | #endif | ||
| 2523 | |||
| 2524 | static SIMD_CFUNC simd_float4 __tg_ceil(simd_float4 x) { | ||
| 2525 | #if defined __SSE4_1__ | ||
| 2526 | return _mm_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2527 | #elif defined __arm64__ | ||
| 2528 | return vrndpq_f32(x); | ||
| 2529 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2530 | return _simd_ceil_f4(x); | ||
| 2531 | #else | ||
| 2532 | simd_float4 truncated = __tg_trunc(x); | ||
| 2533 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated < x); | ||
| 2534 | return __tg_copysign(truncated + adjust, x); | ||
| 2535 | #endif | ||
| 2536 | } | ||
| 2537 | |||
| 2538 | static SIMD_CFUNC simd_float8 __tg_ceil(simd_float8 x) { | ||
| 2539 | #if defined __AVX__ | ||
| 2540 | return _mm256_round_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2541 | #else | ||
| 2542 | return simd_make_float8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2543 | #endif | ||
| 2544 | } | ||
| 2545 | |||
| 2546 | static SIMD_CFUNC simd_float16 __tg_ceil(simd_float16 x) { | ||
| 2547 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2548 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2549 | #else | ||
| 2550 | return simd_make_float16(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2551 | #endif | ||
| 2552 | } | ||
| 2553 | |||
| 2554 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2555 | extern simd_double2 _simd_ceil_d2(simd_double2 x); | ||
| 2556 | #endif | ||
| 2557 | |||
| 2558 | static SIMD_CFUNC simd_double2 __tg_ceil(simd_double2 x) { | ||
| 2559 | #if defined __SSE4_1__ | ||
| 2560 | return _mm_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2561 | #elif defined __arm64__ | ||
| 2562 | return vrndpq_f64(x); | ||
| 2563 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2564 | return _simd_ceil_d2(x); | ||
| 2565 | #else | ||
| 2566 | simd_double2 truncated = __tg_trunc(x); | ||
| 2567 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated < x); | ||
| 2568 | return __tg_copysign(truncated + adjust, x); | ||
| 2569 | #endif | ||
| 2570 | } | ||
| 2571 | |||
| 2572 | static SIMD_CFUNC simd_double3 __tg_ceil(simd_double3 x) { | ||
| 2573 | return simd_make_double3(__tg_ceil(simd_make_double4_undef(x))); | ||
| 2574 | } | ||
| 2575 | |||
| 2576 | static SIMD_CFUNC simd_double4 __tg_ceil(simd_double4 x) { | ||
| 2577 | #if defined __AVX__ | ||
| 2578 | return _mm256_round_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2579 | #else | ||
| 2580 | return simd_make_double4(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2581 | #endif | ||
| 2582 | } | ||
| 2583 | |||
| 2584 | static SIMD_CFUNC simd_double8 __tg_ceil(simd_double8 x) { | ||
| 2585 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2586 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC); | ||
| 2587 | #else | ||
| 2588 | return simd_make_double8(__tg_ceil(x.lo), __tg_ceil(x.hi)); | ||
| 2589 | #endif | ||
| 2590 | } | ||
| 2591 | |||
| 2592 | static SIMD_CFUNC simd_float2 __tg_floor(simd_float2 x) { | ||
| 2593 | #if defined __arm64__ | ||
| 2594 | return vrndm_f32(x); | ||
| 2595 | #else | ||
| 2596 | return simd_make_float2(__tg_floor(simd_make_float4_undef(x))); | ||
| 2597 | #endif | ||
| 2598 | } | ||
| 2599 | |||
| 2600 | static SIMD_CFUNC simd_float3 __tg_floor(simd_float3 x) { | ||
| 2601 | return simd_make_float3(__tg_floor(simd_make_float4_undef(x))); | ||
| 2602 | } | ||
| 2603 | |||
| 2604 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2605 | extern simd_float4 _simd_floor_f4(simd_float4 x); | ||
| 2606 | #endif | ||
| 2607 | |||
| 2608 | static SIMD_CFUNC simd_float4 __tg_floor(simd_float4 x) { | ||
| 2609 | #if defined __SSE4_1__ | ||
| 2610 | return _mm_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2611 | #elif defined __arm64__ | ||
| 2612 | return vrndmq_f32(x); | ||
| 2613 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2614 | return _simd_floor_f4(x); | ||
| 2615 | #else | ||
| 2616 | simd_float4 truncated = __tg_trunc(x); | ||
| 2617 | simd_float4 adjust = simd_bitselect((simd_float4)0, 1, truncated > x); | ||
| 2618 | return truncated - adjust; | ||
| 2619 | #endif | ||
| 2620 | } | ||
| 2621 | |||
| 2622 | static SIMD_CFUNC simd_float8 __tg_floor(simd_float8 x) { | ||
| 2623 | #if defined __AVX__ | ||
| 2624 | return _mm256_round_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2625 | #else | ||
| 2626 | return simd_make_float8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2627 | #endif | ||
| 2628 | } | ||
| 2629 | |||
| 2630 | static SIMD_CFUNC simd_float16 __tg_floor(simd_float16 x) { | ||
| 2631 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2632 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2633 | #else | ||
| 2634 | return simd_make_float16(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2635 | #endif | ||
| 2636 | } | ||
| 2637 | |||
| 2638 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2639 | extern simd_double2 _simd_floor_d2(simd_double2 x); | ||
| 2640 | #endif | ||
| 2641 | |||
| 2642 | static SIMD_CFUNC simd_double2 __tg_floor(simd_double2 x) { | ||
| 2643 | #if defined __SSE4_1__ | ||
| 2644 | return _mm_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2645 | #elif defined __arm64__ | ||
| 2646 | return vrndmq_f64(x); | ||
| 2647 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2648 | return _simd_floor_d2(x); | ||
| 2649 | #else | ||
| 2650 | simd_double2 truncated = __tg_trunc(x); | ||
| 2651 | simd_double2 adjust = simd_bitselect((simd_double2)0, 1, truncated > x); | ||
| 2652 | return truncated - adjust; | ||
| 2653 | #endif | ||
| 2654 | } | ||
| 2655 | |||
| 2656 | static SIMD_CFUNC simd_double3 __tg_floor(simd_double3 x) { | ||
| 2657 | return simd_make_double3(__tg_floor(simd_make_double4_undef(x))); | ||
| 2658 | } | ||
| 2659 | |||
| 2660 | static SIMD_CFUNC simd_double4 __tg_floor(simd_double4 x) { | ||
| 2661 | #if defined __AVX__ | ||
| 2662 | return _mm256_round_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2663 | #else | ||
| 2664 | return simd_make_double4(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2665 | #endif | ||
| 2666 | } | ||
| 2667 | |||
| 2668 | static SIMD_CFUNC simd_double8 __tg_floor(simd_double8 x) { | ||
| 2669 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2670 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC); | ||
| 2671 | #else | ||
| 2672 | return simd_make_double8(__tg_floor(x.lo), __tg_floor(x.hi)); | ||
| 2673 | #endif | ||
| 2674 | } | ||
| 2675 | |||
| 2676 | static SIMD_CFUNC simd_float2 __tg_rint(simd_float2 x) { | ||
| 2677 | #if defined __arm64__ | ||
| 2678 | return vrndx_f32(x); | ||
| 2679 | #else | ||
| 2680 | return simd_make_float2(__tg_rint(simd_make_float4_undef(x))); | ||
| 2681 | #endif | ||
| 2682 | } | ||
| 2683 | |||
| 2684 | static SIMD_CFUNC simd_float3 __tg_rint(simd_float3 x) { | ||
| 2685 | return simd_make_float3(__tg_rint(simd_make_float4_undef(x))); | ||
| 2686 | } | ||
| 2687 | |||
| 2688 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2689 | extern simd_float4 _simd_rint_f4(simd_float4 x); | ||
| 2690 | #endif | ||
| 2691 | |||
| 2692 | static SIMD_CFUNC simd_float4 __tg_rint(simd_float4 x) { | ||
| 2693 | #if defined __SSE4_1__ | ||
| 2694 | return _mm_round_ps(x, _MM_FROUND_RINT); | ||
| 2695 | #elif defined __arm64__ | ||
| 2696 | return vrndxq_f32(x); | ||
| 2697 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2698 | return _simd_rint_f4(x); | ||
| 2699 | #else | ||
| 2700 | simd_float4 magic = __tg_copysign(0x1.0p23, x); | ||
| 2701 | simd_int4 x_is_small = __tg_fabs(x) < 0x1.0p23; | ||
| 2702 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffff); | ||
| 2703 | #endif | ||
| 2704 | } | ||
| 2705 | |||
| 2706 | static SIMD_CFUNC simd_float8 __tg_rint(simd_float8 x) { | ||
| 2707 | #if defined __AVX__ | ||
| 2708 | return _mm256_round_ps(x, _MM_FROUND_RINT); | ||
| 2709 | #else | ||
| 2710 | return simd_make_float8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2711 | #endif | ||
| 2712 | } | ||
| 2713 | |||
| 2714 | static SIMD_CFUNC simd_float16 __tg_rint(simd_float16 x) { | ||
| 2715 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2716 | return _mm512_roundscale_ps(x, _MM_FROUND_RINT); | ||
| 2717 | #else | ||
| 2718 | return simd_make_float16(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2719 | #endif | ||
| 2720 | } | ||
| 2721 | |||
| 2722 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2723 | extern simd_double2 _simd_rint_d2(simd_double2 x); | ||
| 2724 | #endif | ||
| 2725 | |||
| 2726 | static SIMD_CFUNC simd_double2 __tg_rint(simd_double2 x) { | ||
| 2727 | #if defined __SSE4_1__ | ||
| 2728 | return _mm_round_pd(x, _MM_FROUND_RINT); | ||
| 2729 | #elif defined __arm64__ | ||
| 2730 | return vrndxq_f64(x); | ||
| 2731 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2732 | return _simd_rint_d2(x); | ||
| 2733 | #else | ||
| 2734 | simd_double2 magic = __tg_copysign(0x1.0p52, x); | ||
| 2735 | simd_long2 x_is_small = __tg_fabs(x) < 0x1.0p52; | ||
| 2736 | return simd_bitselect(x, (x + magic) - magic, x_is_small & 0x7fffffffffffffff); | ||
| 2737 | #endif | ||
| 2738 | } | ||
| 2739 | |||
| 2740 | static SIMD_CFUNC simd_double3 __tg_rint(simd_double3 x) { | ||
| 2741 | return simd_make_double3(__tg_rint(simd_make_double4_undef(x))); | ||
| 2742 | } | ||
| 2743 | |||
| 2744 | static SIMD_CFUNC simd_double4 __tg_rint(simd_double4 x) { | ||
| 2745 | #if defined __AVX__ | ||
| 2746 | return _mm256_round_pd(x, _MM_FROUND_RINT); | ||
| 2747 | #else | ||
| 2748 | return simd_make_double4(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2749 | #endif | ||
| 2750 | } | ||
| 2751 | |||
| 2752 | static SIMD_CFUNC simd_double8 __tg_rint(simd_double8 x) { | ||
| 2753 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2754 | return _mm512_roundscale_pd(x, _MM_FROUND_RINT); | ||
| 2755 | #else | ||
| 2756 | return simd_make_double8(__tg_rint(x.lo), __tg_rint(x.hi)); | ||
| 2757 | #endif | ||
| 2758 | } | ||
| 2759 | |||
| 2760 | static SIMD_CFUNC simd_float2 __tg_trunc(simd_float2 x) { | ||
| 2761 | #if defined __arm64__ | ||
| 2762 | return vrnd_f32(x); | ||
| 2763 | #else | ||
| 2764 | return simd_make_float2(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2765 | #endif | ||
| 2766 | } | ||
| 2767 | |||
| 2768 | static SIMD_CFUNC simd_float3 __tg_trunc(simd_float3 x) { | ||
| 2769 | return simd_make_float3(__tg_trunc(simd_make_float4_undef(x))); | ||
| 2770 | } | ||
| 2771 | |||
| 2772 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2773 | extern simd_float4 _simd_trunc_f4(simd_float4 x); | ||
| 2774 | #endif | ||
| 2775 | |||
| 2776 | static SIMD_CFUNC simd_float4 __tg_trunc(simd_float4 x) { | ||
| 2777 | #if defined __SSE4_1__ | ||
| 2778 | return _mm_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2779 | #elif defined __arm64__ | ||
| 2780 | return vrndq_f32(x); | ||
| 2781 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2782 | return _simd_trunc_f4(x); | ||
| 2783 | #else | ||
| 2784 | simd_float4 binade = simd_bitselect(0, x, 0x7f800000); | ||
| 2785 | simd_int4 mask = (simd_int4)__tg_fmin(-2*binade + 1, -0); | ||
| 2786 | simd_float4 result = simd_bitselect(0, x, mask); | ||
| 2787 | return simd_bitselect(x, result, binade < 0x1.0p23); | ||
| 2788 | #endif | ||
| 2789 | } | ||
| 2790 | |||
| 2791 | static SIMD_CFUNC simd_float8 __tg_trunc(simd_float8 x) { | ||
| 2792 | #if defined __AVX__ | ||
| 2793 | return _mm256_round_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2794 | #else | ||
| 2795 | return simd_make_float8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2796 | #endif | ||
| 2797 | } | ||
| 2798 | |||
| 2799 | static SIMD_CFUNC simd_float16 __tg_trunc(simd_float16 x) { | ||
| 2800 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2801 | return _mm512_roundscale_ps(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2802 | #else | ||
| 2803 | return simd_make_float16(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2804 | #endif | ||
| 2805 | } | ||
| 2806 | |||
| 2807 | #if defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2808 | extern simd_double2 _simd_trunc_d2(simd_double2 x); | ||
| 2809 | #endif | ||
| 2810 | |||
| 2811 | static SIMD_CFUNC simd_double2 __tg_trunc(simd_double2 x) { | ||
| 2812 | #if defined __SSE4_1__ | ||
| 2813 | return _mm_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2814 | #elif defined __arm64__ | ||
| 2815 | return vrndq_f64(x); | ||
| 2816 | #elif defined __arm__ && SIMD_LIBRARY_VERSION >= 3 | ||
| 2817 | return _simd_trunc_d2(x); | ||
| 2818 | #else | ||
| 2819 | simd_double2 binade = simd_bitselect(0, x, 0x7ff0000000000000); | ||
| 2820 | simd_long2 mask = (simd_long2)__tg_fmin(-2*binade + 1, -0); | ||
| 2821 | simd_double2 result = simd_bitselect(0, x, mask); | ||
| 2822 | return simd_bitselect(x, result, binade < 0x1.0p52); | ||
| 2823 | #endif | ||
| 2824 | } | ||
| 2825 | |||
| 2826 | static SIMD_CFUNC simd_double3 __tg_trunc(simd_double3 x) { | ||
| 2827 | return simd_make_double3(__tg_trunc(simd_make_double4_undef(x))); | ||
| 2828 | } | ||
| 2829 | |||
| 2830 | static SIMD_CFUNC simd_double4 __tg_trunc(simd_double4 x) { | ||
| 2831 | #if defined __AVX__ | ||
| 2832 | return _mm256_round_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2833 | #else | ||
| 2834 | return simd_make_double4(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2835 | #endif | ||
| 2836 | } | ||
| 2837 | |||
| 2838 | static SIMD_CFUNC simd_double8 __tg_trunc(simd_double8 x) { | ||
| 2839 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 2840 | return _mm512_roundscale_pd(x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC); | ||
| 2841 | #else | ||
| 2842 | return simd_make_double8(__tg_trunc(x.lo), __tg_trunc(x.hi)); | ||
| 2843 | #endif | ||
| 2844 | } | ||
| 2845 | |||
| 2846 | #pragma mark - sine, cosine implementation | ||
| 2847 | static inline SIMD_CFUNC simd_float2 __tg_sin(simd_float2 x) { | ||
| 2848 | return simd_make_float2(__tg_sin(simd_make_float4(x))); | ||
| 2849 | } | ||
| 2850 | |||
| 2851 | static inline SIMD_CFUNC simd_float3 __tg_sin(simd_float3 x) { | ||
| 2852 | return simd_make_float3(__tg_sin(simd_make_float4(x))); | ||
| 2853 | } | ||
| 2854 | |||
| 2855 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2856 | extern simd_float4 _simd_sin_f4(simd_float4 x); | ||
| 2857 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2858 | return _simd_sin_f4(x); | ||
| 2859 | } | ||
| 2860 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2861 | extern simd_float4 __sin_f4(simd_float4 x); | ||
| 2862 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2863 | return __sin_f4(x); | ||
| 2864 | } | ||
| 2865 | #else | ||
| 2866 | static inline SIMD_CFUNC simd_float4 __tg_sin(simd_float4 x) { | ||
| 2867 | return simd_make_float4(sin(x.x), sin(x.y), sin(x.z), sin(x.w)); | ||
| 2868 | } | ||
| 2869 | #endif | ||
| 2870 | |||
| 2871 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2872 | extern simd_float8 _simd_sin_f8(simd_float8 x); | ||
| 2873 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2874 | return _simd_sin_f8(x); | ||
| 2875 | } | ||
| 2876 | #else | ||
| 2877 | static inline SIMD_CFUNC simd_float8 __tg_sin(simd_float8 x) { | ||
| 2878 | return simd_make_float8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2879 | } | ||
| 2880 | #endif | ||
| 2881 | |||
| 2882 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2883 | extern simd_float16 _simd_sin_f16(simd_float16 x); | ||
| 2884 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2885 | return _simd_sin_f16(x); | ||
| 2886 | } | ||
| 2887 | #else | ||
| 2888 | static inline SIMD_CFUNC simd_float16 __tg_sin(simd_float16 x) { | ||
| 2889 | return simd_make_float16(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2890 | } | ||
| 2891 | #endif | ||
| 2892 | |||
| 2893 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2894 | extern simd_double2 _simd_sin_d2(simd_double2 x); | ||
| 2895 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2896 | return _simd_sin_d2(x); | ||
| 2897 | } | ||
| 2898 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2899 | extern simd_double2 __sin_d2(simd_double2 x); | ||
| 2900 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2901 | return __sin_d2(x); | ||
| 2902 | } | ||
| 2903 | #else | ||
| 2904 | static inline SIMD_CFUNC simd_double2 __tg_sin(simd_double2 x) { | ||
| 2905 | return simd_make_double2(sin(x.x), sin(x.y)); | ||
| 2906 | } | ||
| 2907 | #endif | ||
| 2908 | |||
| 2909 | static inline SIMD_CFUNC simd_double3 __tg_sin(simd_double3 x) { | ||
| 2910 | return simd_make_double3(__tg_sin(simd_make_double4(x))); | ||
| 2911 | } | ||
| 2912 | |||
| 2913 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2914 | extern simd_double4 _simd_sin_d4(simd_double4 x); | ||
| 2915 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2916 | return _simd_sin_d4(x); | ||
| 2917 | } | ||
| 2918 | #else | ||
| 2919 | static inline SIMD_CFUNC simd_double4 __tg_sin(simd_double4 x) { | ||
| 2920 | return simd_make_double4(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2921 | } | ||
| 2922 | #endif | ||
| 2923 | |||
| 2924 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2925 | extern simd_double8 _simd_sin_d8(simd_double8 x); | ||
| 2926 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2927 | return _simd_sin_d8(x); | ||
| 2928 | } | ||
| 2929 | #else | ||
| 2930 | static inline SIMD_CFUNC simd_double8 __tg_sin(simd_double8 x) { | ||
| 2931 | return simd_make_double8(__tg_sin(x.lo), __tg_sin(x.hi)); | ||
| 2932 | } | ||
| 2933 | #endif | ||
| 2934 | |||
| 2935 | static inline SIMD_CFUNC simd_float2 __tg_cos(simd_float2 x) { | ||
| 2936 | return simd_make_float2(__tg_cos(simd_make_float4(x))); | ||
| 2937 | } | ||
| 2938 | |||
| 2939 | static inline SIMD_CFUNC simd_float3 __tg_cos(simd_float3 x) { | ||
| 2940 | return simd_make_float3(__tg_cos(simd_make_float4(x))); | ||
| 2941 | } | ||
| 2942 | |||
| 2943 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2944 | extern simd_float4 _simd_cos_f4(simd_float4 x); | ||
| 2945 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2946 | return _simd_cos_f4(x); | ||
| 2947 | } | ||
| 2948 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2949 | extern simd_float4 __cos_f4(simd_float4 x); | ||
| 2950 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2951 | return __cos_f4(x); | ||
| 2952 | } | ||
| 2953 | #else | ||
| 2954 | static inline SIMD_CFUNC simd_float4 __tg_cos(simd_float4 x) { | ||
| 2955 | return simd_make_float4(cos(x.x), cos(x.y), cos(x.z), cos(x.w)); | ||
| 2956 | } | ||
| 2957 | #endif | ||
| 2958 | |||
| 2959 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 2960 | extern simd_float8 _simd_cos_f8(simd_float8 x); | ||
| 2961 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2962 | return _simd_cos_f8(x); | ||
| 2963 | } | ||
| 2964 | #else | ||
| 2965 | static inline SIMD_CFUNC simd_float8 __tg_cos(simd_float8 x) { | ||
| 2966 | return simd_make_float8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2967 | } | ||
| 2968 | #endif | ||
| 2969 | |||
| 2970 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 2971 | extern simd_float16 _simd_cos_f16(simd_float16 x); | ||
| 2972 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2973 | return _simd_cos_f16(x); | ||
| 2974 | } | ||
| 2975 | #else | ||
| 2976 | static inline SIMD_CFUNC simd_float16 __tg_cos(simd_float16 x) { | ||
| 2977 | return simd_make_float16(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 2978 | } | ||
| 2979 | #endif | ||
| 2980 | |||
| 2981 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 2982 | extern simd_double2 _simd_cos_d2(simd_double2 x); | ||
| 2983 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2984 | return _simd_cos_d2(x); | ||
| 2985 | } | ||
| 2986 | #elif SIMD_LIBRARY_VERSION == 1 | ||
| 2987 | extern simd_double2 __cos_d2(simd_double2 x); | ||
| 2988 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2989 | return __cos_d2(x); | ||
| 2990 | } | ||
| 2991 | #else | ||
| 2992 | static inline SIMD_CFUNC simd_double2 __tg_cos(simd_double2 x) { | ||
| 2993 | return simd_make_double2(cos(x.x), cos(x.y)); | ||
| 2994 | } | ||
| 2995 | #endif | ||
| 2996 | |||
| 2997 | static inline SIMD_CFUNC simd_double3 __tg_cos(simd_double3 x) { | ||
| 2998 | return simd_make_double3(__tg_cos(simd_make_double4(x))); | ||
| 2999 | } | ||
| 3000 | |||
| 3001 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3002 | extern simd_double4 _simd_cos_d4(simd_double4 x); | ||
| 3003 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 3004 | return _simd_cos_d4(x); | ||
| 3005 | } | ||
| 3006 | #else | ||
| 3007 | static inline SIMD_CFUNC simd_double4 __tg_cos(simd_double4 x) { | ||
| 3008 | return simd_make_double4(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 3009 | } | ||
| 3010 | #endif | ||
| 3011 | |||
| 3012 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3013 | extern simd_double8 _simd_cos_d8(simd_double8 x); | ||
| 3014 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 3015 | return _simd_cos_d8(x); | ||
| 3016 | } | ||
| 3017 | #else | ||
| 3018 | static inline SIMD_CFUNC simd_double8 __tg_cos(simd_double8 x) { | ||
| 3019 | return simd_make_double8(__tg_cos(x.lo), __tg_cos(x.hi)); | ||
| 3020 | } | ||
| 3021 | #endif | ||
| 3022 | |||
| 3023 | |||
| 3024 | #pragma mark - acos implementation | ||
| 3025 | static inline SIMD_CFUNC simd_float2 __tg_acos(simd_float2 x) { | ||
| 3026 | return simd_make_float2(__tg_acos(simd_make_float4(x))); | ||
| 3027 | } | ||
| 3028 | |||
| 3029 | static inline SIMD_CFUNC simd_float3 __tg_acos(simd_float3 x) { | ||
| 3030 | return simd_make_float3(__tg_acos(simd_make_float4(x))); | ||
| 3031 | } | ||
| 3032 | |||
| 3033 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3034 | extern simd_float4 _simd_acos_f4(simd_float4 x); | ||
| 3035 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 3036 | return _simd_acos_f4(x); | ||
| 3037 | } | ||
| 3038 | #else | ||
| 3039 | static inline SIMD_CFUNC simd_float4 __tg_acos(simd_float4 x) { | ||
| 3040 | return simd_make_float4(acos(x.x), acos(x.y), acos(x.z), acos(x.w)); | ||
| 3041 | } | ||
| 3042 | #endif | ||
| 3043 | |||
| 3044 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3045 | extern simd_float8 _simd_acos_f8(simd_float8 x); | ||
| 3046 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 3047 | return _simd_acos_f8(x); | ||
| 3048 | } | ||
| 3049 | #else | ||
| 3050 | static inline SIMD_CFUNC simd_float8 __tg_acos(simd_float8 x) { | ||
| 3051 | return simd_make_float8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3052 | } | ||
| 3053 | #endif | ||
| 3054 | |||
| 3055 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3056 | extern simd_float16 _simd_acos_f16(simd_float16 x); | ||
| 3057 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 3058 | return _simd_acos_f16(x); | ||
| 3059 | } | ||
| 3060 | #else | ||
| 3061 | static inline SIMD_CFUNC simd_float16 __tg_acos(simd_float16 x) { | ||
| 3062 | return simd_make_float16(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3063 | } | ||
| 3064 | #endif | ||
| 3065 | |||
| 3066 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3067 | extern simd_double2 _simd_acos_d2(simd_double2 x); | ||
| 3068 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 3069 | return _simd_acos_d2(x); | ||
| 3070 | } | ||
| 3071 | #else | ||
| 3072 | static inline SIMD_CFUNC simd_double2 __tg_acos(simd_double2 x) { | ||
| 3073 | return simd_make_double2(acos(x.x), acos(x.y)); | ||
| 3074 | } | ||
| 3075 | #endif | ||
| 3076 | |||
| 3077 | static inline SIMD_CFUNC simd_double3 __tg_acos(simd_double3 x) { | ||
| 3078 | return simd_make_double3(__tg_acos(simd_make_double4(x))); | ||
| 3079 | } | ||
| 3080 | |||
| 3081 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3082 | extern simd_double4 _simd_acos_d4(simd_double4 x); | ||
| 3083 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 3084 | return _simd_acos_d4(x); | ||
| 3085 | } | ||
| 3086 | #else | ||
| 3087 | static inline SIMD_CFUNC simd_double4 __tg_acos(simd_double4 x) { | ||
| 3088 | return simd_make_double4(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3089 | } | ||
| 3090 | #endif | ||
| 3091 | |||
| 3092 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3093 | extern simd_double8 _simd_acos_d8(simd_double8 x); | ||
| 3094 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 3095 | return _simd_acos_d8(x); | ||
| 3096 | } | ||
| 3097 | #else | ||
| 3098 | static inline SIMD_CFUNC simd_double8 __tg_acos(simd_double8 x) { | ||
| 3099 | return simd_make_double8(__tg_acos(x.lo), __tg_acos(x.hi)); | ||
| 3100 | } | ||
| 3101 | #endif | ||
| 3102 | |||
| 3103 | #pragma mark - asin implementation | ||
| 3104 | static inline SIMD_CFUNC simd_float2 __tg_asin(simd_float2 x) { | ||
| 3105 | return simd_make_float2(__tg_asin(simd_make_float4(x))); | ||
| 3106 | } | ||
| 3107 | |||
| 3108 | static inline SIMD_CFUNC simd_float3 __tg_asin(simd_float3 x) { | ||
| 3109 | return simd_make_float3(__tg_asin(simd_make_float4(x))); | ||
| 3110 | } | ||
| 3111 | |||
| 3112 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3113 | extern simd_float4 _simd_asin_f4(simd_float4 x); | ||
| 3114 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 3115 | return _simd_asin_f4(x); | ||
| 3116 | } | ||
| 3117 | #else | ||
| 3118 | static inline SIMD_CFUNC simd_float4 __tg_asin(simd_float4 x) { | ||
| 3119 | return simd_make_float4(asin(x.x), asin(x.y), asin(x.z), asin(x.w)); | ||
| 3120 | } | ||
| 3121 | #endif | ||
| 3122 | |||
| 3123 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3124 | extern simd_float8 _simd_asin_f8(simd_float8 x); | ||
| 3125 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 3126 | return _simd_asin_f8(x); | ||
| 3127 | } | ||
| 3128 | #else | ||
| 3129 | static inline SIMD_CFUNC simd_float8 __tg_asin(simd_float8 x) { | ||
| 3130 | return simd_make_float8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3131 | } | ||
| 3132 | #endif | ||
| 3133 | |||
| 3134 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3135 | extern simd_float16 _simd_asin_f16(simd_float16 x); | ||
| 3136 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 3137 | return _simd_asin_f16(x); | ||
| 3138 | } | ||
| 3139 | #else | ||
| 3140 | static inline SIMD_CFUNC simd_float16 __tg_asin(simd_float16 x) { | ||
| 3141 | return simd_make_float16(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3142 | } | ||
| 3143 | #endif | ||
| 3144 | |||
| 3145 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3146 | extern simd_double2 _simd_asin_d2(simd_double2 x); | ||
| 3147 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 3148 | return _simd_asin_d2(x); | ||
| 3149 | } | ||
| 3150 | #else | ||
| 3151 | static inline SIMD_CFUNC simd_double2 __tg_asin(simd_double2 x) { | ||
| 3152 | return simd_make_double2(asin(x.x), asin(x.y)); | ||
| 3153 | } | ||
| 3154 | #endif | ||
| 3155 | |||
| 3156 | static inline SIMD_CFUNC simd_double3 __tg_asin(simd_double3 x) { | ||
| 3157 | return simd_make_double3(__tg_asin(simd_make_double4(x))); | ||
| 3158 | } | ||
| 3159 | |||
| 3160 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3161 | extern simd_double4 _simd_asin_d4(simd_double4 x); | ||
| 3162 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 3163 | return _simd_asin_d4(x); | ||
| 3164 | } | ||
| 3165 | #else | ||
| 3166 | static inline SIMD_CFUNC simd_double4 __tg_asin(simd_double4 x) { | ||
| 3167 | return simd_make_double4(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3168 | } | ||
| 3169 | #endif | ||
| 3170 | |||
| 3171 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3172 | extern simd_double8 _simd_asin_d8(simd_double8 x); | ||
| 3173 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 3174 | return _simd_asin_d8(x); | ||
| 3175 | } | ||
| 3176 | #else | ||
| 3177 | static inline SIMD_CFUNC simd_double8 __tg_asin(simd_double8 x) { | ||
| 3178 | return simd_make_double8(__tg_asin(x.lo), __tg_asin(x.hi)); | ||
| 3179 | } | ||
| 3180 | #endif | ||
| 3181 | |||
| 3182 | #pragma mark - atan implementation | ||
| 3183 | static inline SIMD_CFUNC simd_float2 __tg_atan(simd_float2 x) { | ||
| 3184 | return simd_make_float2(__tg_atan(simd_make_float4(x))); | ||
| 3185 | } | ||
| 3186 | |||
| 3187 | static inline SIMD_CFUNC simd_float3 __tg_atan(simd_float3 x) { | ||
| 3188 | return simd_make_float3(__tg_atan(simd_make_float4(x))); | ||
| 3189 | } | ||
| 3190 | |||
| 3191 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3192 | extern simd_float4 _simd_atan_f4(simd_float4 x); | ||
| 3193 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 3194 | return _simd_atan_f4(x); | ||
| 3195 | } | ||
| 3196 | #else | ||
| 3197 | static inline SIMD_CFUNC simd_float4 __tg_atan(simd_float4 x) { | ||
| 3198 | return simd_make_float4(atan(x.x), atan(x.y), atan(x.z), atan(x.w)); | ||
| 3199 | } | ||
| 3200 | #endif | ||
| 3201 | |||
| 3202 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3203 | extern simd_float8 _simd_atan_f8(simd_float8 x); | ||
| 3204 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 3205 | return _simd_atan_f8(x); | ||
| 3206 | } | ||
| 3207 | #else | ||
| 3208 | static inline SIMD_CFUNC simd_float8 __tg_atan(simd_float8 x) { | ||
| 3209 | return simd_make_float8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3210 | } | ||
| 3211 | #endif | ||
| 3212 | |||
| 3213 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3214 | extern simd_float16 _simd_atan_f16(simd_float16 x); | ||
| 3215 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 3216 | return _simd_atan_f16(x); | ||
| 3217 | } | ||
| 3218 | #else | ||
| 3219 | static inline SIMD_CFUNC simd_float16 __tg_atan(simd_float16 x) { | ||
| 3220 | return simd_make_float16(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3221 | } | ||
| 3222 | #endif | ||
| 3223 | |||
| 3224 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3225 | extern simd_double2 _simd_atan_d2(simd_double2 x); | ||
| 3226 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 3227 | return _simd_atan_d2(x); | ||
| 3228 | } | ||
| 3229 | #else | ||
| 3230 | static inline SIMD_CFUNC simd_double2 __tg_atan(simd_double2 x) { | ||
| 3231 | return simd_make_double2(atan(x.x), atan(x.y)); | ||
| 3232 | } | ||
| 3233 | #endif | ||
| 3234 | |||
| 3235 | static inline SIMD_CFUNC simd_double3 __tg_atan(simd_double3 x) { | ||
| 3236 | return simd_make_double3(__tg_atan(simd_make_double4(x))); | ||
| 3237 | } | ||
| 3238 | |||
| 3239 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3240 | extern simd_double4 _simd_atan_d4(simd_double4 x); | ||
| 3241 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 3242 | return _simd_atan_d4(x); | ||
| 3243 | } | ||
| 3244 | #else | ||
| 3245 | static inline SIMD_CFUNC simd_double4 __tg_atan(simd_double4 x) { | ||
| 3246 | return simd_make_double4(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3247 | } | ||
| 3248 | #endif | ||
| 3249 | |||
| 3250 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3251 | extern simd_double8 _simd_atan_d8(simd_double8 x); | ||
| 3252 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 3253 | return _simd_atan_d8(x); | ||
| 3254 | } | ||
| 3255 | #else | ||
| 3256 | static inline SIMD_CFUNC simd_double8 __tg_atan(simd_double8 x) { | ||
| 3257 | return simd_make_double8(__tg_atan(x.lo), __tg_atan(x.hi)); | ||
| 3258 | } | ||
| 3259 | #endif | ||
| 3260 | |||
| 3261 | #pragma mark - tan implementation | ||
| 3262 | static inline SIMD_CFUNC simd_float2 __tg_tan(simd_float2 x) { | ||
| 3263 | return simd_make_float2(__tg_tan(simd_make_float4(x))); | ||
| 3264 | } | ||
| 3265 | |||
| 3266 | static inline SIMD_CFUNC simd_float3 __tg_tan(simd_float3 x) { | ||
| 3267 | return simd_make_float3(__tg_tan(simd_make_float4(x))); | ||
| 3268 | } | ||
| 3269 | |||
| 3270 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3271 | extern simd_float4 _simd_tan_f4(simd_float4 x); | ||
| 3272 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 3273 | return _simd_tan_f4(x); | ||
| 3274 | } | ||
| 3275 | #else | ||
| 3276 | static inline SIMD_CFUNC simd_float4 __tg_tan(simd_float4 x) { | ||
| 3277 | return simd_make_float4(tan(x.x), tan(x.y), tan(x.z), tan(x.w)); | ||
| 3278 | } | ||
| 3279 | #endif | ||
| 3280 | |||
| 3281 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3282 | extern simd_float8 _simd_tan_f8(simd_float8 x); | ||
| 3283 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 3284 | return _simd_tan_f8(x); | ||
| 3285 | } | ||
| 3286 | #else | ||
| 3287 | static inline SIMD_CFUNC simd_float8 __tg_tan(simd_float8 x) { | ||
| 3288 | return simd_make_float8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3289 | } | ||
| 3290 | #endif | ||
| 3291 | |||
| 3292 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3293 | extern simd_float16 _simd_tan_f16(simd_float16 x); | ||
| 3294 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 3295 | return _simd_tan_f16(x); | ||
| 3296 | } | ||
| 3297 | #else | ||
| 3298 | static inline SIMD_CFUNC simd_float16 __tg_tan(simd_float16 x) { | ||
| 3299 | return simd_make_float16(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3300 | } | ||
| 3301 | #endif | ||
| 3302 | |||
| 3303 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3304 | extern simd_double2 _simd_tan_d2(simd_double2 x); | ||
| 3305 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 3306 | return _simd_tan_d2(x); | ||
| 3307 | } | ||
| 3308 | #else | ||
| 3309 | static inline SIMD_CFUNC simd_double2 __tg_tan(simd_double2 x) { | ||
| 3310 | return simd_make_double2(tan(x.x), tan(x.y)); | ||
| 3311 | } | ||
| 3312 | #endif | ||
| 3313 | |||
| 3314 | static inline SIMD_CFUNC simd_double3 __tg_tan(simd_double3 x) { | ||
| 3315 | return simd_make_double3(__tg_tan(simd_make_double4(x))); | ||
| 3316 | } | ||
| 3317 | |||
| 3318 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3319 | extern simd_double4 _simd_tan_d4(simd_double4 x); | ||
| 3320 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 3321 | return _simd_tan_d4(x); | ||
| 3322 | } | ||
| 3323 | #else | ||
| 3324 | static inline SIMD_CFUNC simd_double4 __tg_tan(simd_double4 x) { | ||
| 3325 | return simd_make_double4(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3326 | } | ||
| 3327 | #endif | ||
| 3328 | |||
| 3329 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3330 | extern simd_double8 _simd_tan_d8(simd_double8 x); | ||
| 3331 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3332 | return _simd_tan_d8(x); | ||
| 3333 | } | ||
| 3334 | #else | ||
| 3335 | static inline SIMD_CFUNC simd_double8 __tg_tan(simd_double8 x) { | ||
| 3336 | return simd_make_double8(__tg_tan(x.lo), __tg_tan(x.hi)); | ||
| 3337 | } | ||
| 3338 | #endif | ||
| 3339 | |||
| 3340 | #pragma mark - cospi implementation | ||
| 3341 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3342 | static inline SIMD_CFUNC simd_float2 __tg_cospi(simd_float2 x) { | ||
| 3343 | return simd_make_float2(__tg_cospi(simd_make_float4(x))); | ||
| 3344 | } | ||
| 3345 | |||
| 3346 | static inline SIMD_CFUNC simd_float3 __tg_cospi(simd_float3 x) { | ||
| 3347 | return simd_make_float3(__tg_cospi(simd_make_float4(x))); | ||
| 3348 | } | ||
| 3349 | |||
| 3350 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3351 | extern simd_float4 _simd_cospi_f4(simd_float4 x); | ||
| 3352 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3353 | return _simd_cospi_f4(x); | ||
| 3354 | } | ||
| 3355 | #else | ||
| 3356 | static inline SIMD_CFUNC simd_float4 __tg_cospi(simd_float4 x) { | ||
| 3357 | return simd_make_float4(__cospi(x.x), __cospi(x.y), __cospi(x.z), __cospi(x.w)); | ||
| 3358 | } | ||
| 3359 | #endif | ||
| 3360 | |||
| 3361 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3362 | extern simd_float8 _simd_cospi_f8(simd_float8 x); | ||
| 3363 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3364 | return _simd_cospi_f8(x); | ||
| 3365 | } | ||
| 3366 | #else | ||
| 3367 | static inline SIMD_CFUNC simd_float8 __tg_cospi(simd_float8 x) { | ||
| 3368 | return simd_make_float8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3369 | } | ||
| 3370 | #endif | ||
| 3371 | |||
| 3372 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3373 | extern simd_float16 _simd_cospi_f16(simd_float16 x); | ||
| 3374 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3375 | return _simd_cospi_f16(x); | ||
| 3376 | } | ||
| 3377 | #else | ||
| 3378 | static inline SIMD_CFUNC simd_float16 __tg_cospi(simd_float16 x) { | ||
| 3379 | return simd_make_float16(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3380 | } | ||
| 3381 | #endif | ||
| 3382 | |||
| 3383 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3384 | extern simd_double2 _simd_cospi_d2(simd_double2 x); | ||
| 3385 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3386 | return _simd_cospi_d2(x); | ||
| 3387 | } | ||
| 3388 | #else | ||
| 3389 | static inline SIMD_CFUNC simd_double2 __tg_cospi(simd_double2 x) { | ||
| 3390 | return simd_make_double2(__cospi(x.x), __cospi(x.y)); | ||
| 3391 | } | ||
| 3392 | #endif | ||
| 3393 | |||
| 3394 | static inline SIMD_CFUNC simd_double3 __tg_cospi(simd_double3 x) { | ||
| 3395 | return simd_make_double3(__tg_cospi(simd_make_double4(x))); | ||
| 3396 | } | ||
| 3397 | |||
| 3398 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3399 | extern simd_double4 _simd_cospi_d4(simd_double4 x); | ||
| 3400 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3401 | return _simd_cospi_d4(x); | ||
| 3402 | } | ||
| 3403 | #else | ||
| 3404 | static inline SIMD_CFUNC simd_double4 __tg_cospi(simd_double4 x) { | ||
| 3405 | return simd_make_double4(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3406 | } | ||
| 3407 | #endif | ||
| 3408 | |||
| 3409 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3410 | extern simd_double8 _simd_cospi_d8(simd_double8 x); | ||
| 3411 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3412 | return _simd_cospi_d8(x); | ||
| 3413 | } | ||
| 3414 | #else | ||
| 3415 | static inline SIMD_CFUNC simd_double8 __tg_cospi(simd_double8 x) { | ||
| 3416 | return simd_make_double8(__tg_cospi(x.lo), __tg_cospi(x.hi)); | ||
| 3417 | } | ||
| 3418 | #endif | ||
| 3419 | |||
| 3420 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3421 | #pragma mark - sinpi implementation | ||
| 3422 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3423 | static inline SIMD_CFUNC simd_float2 __tg_sinpi(simd_float2 x) { | ||
| 3424 | return simd_make_float2(__tg_sinpi(simd_make_float4(x))); | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | static inline SIMD_CFUNC simd_float3 __tg_sinpi(simd_float3 x) { | ||
| 3428 | return simd_make_float3(__tg_sinpi(simd_make_float4(x))); | ||
| 3429 | } | ||
| 3430 | |||
| 3431 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3432 | extern simd_float4 _simd_sinpi_f4(simd_float4 x); | ||
| 3433 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3434 | return _simd_sinpi_f4(x); | ||
| 3435 | } | ||
| 3436 | #else | ||
| 3437 | static inline SIMD_CFUNC simd_float4 __tg_sinpi(simd_float4 x) { | ||
| 3438 | return simd_make_float4(__sinpi(x.x), __sinpi(x.y), __sinpi(x.z), __sinpi(x.w)); | ||
| 3439 | } | ||
| 3440 | #endif | ||
| 3441 | |||
| 3442 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3443 | extern simd_float8 _simd_sinpi_f8(simd_float8 x); | ||
| 3444 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3445 | return _simd_sinpi_f8(x); | ||
| 3446 | } | ||
| 3447 | #else | ||
| 3448 | static inline SIMD_CFUNC simd_float8 __tg_sinpi(simd_float8 x) { | ||
| 3449 | return simd_make_float8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3450 | } | ||
| 3451 | #endif | ||
| 3452 | |||
| 3453 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3454 | extern simd_float16 _simd_sinpi_f16(simd_float16 x); | ||
| 3455 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3456 | return _simd_sinpi_f16(x); | ||
| 3457 | } | ||
| 3458 | #else | ||
| 3459 | static inline SIMD_CFUNC simd_float16 __tg_sinpi(simd_float16 x) { | ||
| 3460 | return simd_make_float16(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3461 | } | ||
| 3462 | #endif | ||
| 3463 | |||
| 3464 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3465 | extern simd_double2 _simd_sinpi_d2(simd_double2 x); | ||
| 3466 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3467 | return _simd_sinpi_d2(x); | ||
| 3468 | } | ||
| 3469 | #else | ||
| 3470 | static inline SIMD_CFUNC simd_double2 __tg_sinpi(simd_double2 x) { | ||
| 3471 | return simd_make_double2(__sinpi(x.x), __sinpi(x.y)); | ||
| 3472 | } | ||
| 3473 | #endif | ||
| 3474 | |||
| 3475 | static inline SIMD_CFUNC simd_double3 __tg_sinpi(simd_double3 x) { | ||
| 3476 | return simd_make_double3(__tg_sinpi(simd_make_double4(x))); | ||
| 3477 | } | ||
| 3478 | |||
| 3479 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3480 | extern simd_double4 _simd_sinpi_d4(simd_double4 x); | ||
| 3481 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3482 | return _simd_sinpi_d4(x); | ||
| 3483 | } | ||
| 3484 | #else | ||
| 3485 | static inline SIMD_CFUNC simd_double4 __tg_sinpi(simd_double4 x) { | ||
| 3486 | return simd_make_double4(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3487 | } | ||
| 3488 | #endif | ||
| 3489 | |||
| 3490 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3491 | extern simd_double8 _simd_sinpi_d8(simd_double8 x); | ||
| 3492 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3493 | return _simd_sinpi_d8(x); | ||
| 3494 | } | ||
| 3495 | #else | ||
| 3496 | static inline SIMD_CFUNC simd_double8 __tg_sinpi(simd_double8 x) { | ||
| 3497 | return simd_make_double8(__tg_sinpi(x.lo), __tg_sinpi(x.hi)); | ||
| 3498 | } | ||
| 3499 | #endif | ||
| 3500 | |||
| 3501 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3502 | #pragma mark - tanpi implementation | ||
| 3503 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 3504 | static inline SIMD_CFUNC simd_float2 __tg_tanpi(simd_float2 x) { | ||
| 3505 | return simd_make_float2(__tg_tanpi(simd_make_float4(x))); | ||
| 3506 | } | ||
| 3507 | |||
| 3508 | static inline SIMD_CFUNC simd_float3 __tg_tanpi(simd_float3 x) { | ||
| 3509 | return simd_make_float3(__tg_tanpi(simd_make_float4(x))); | ||
| 3510 | } | ||
| 3511 | |||
| 3512 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3513 | extern simd_float4 _simd_tanpi_f4(simd_float4 x); | ||
| 3514 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3515 | return _simd_tanpi_f4(x); | ||
| 3516 | } | ||
| 3517 | #else | ||
| 3518 | static inline SIMD_CFUNC simd_float4 __tg_tanpi(simd_float4 x) { | ||
| 3519 | return simd_make_float4(__tanpi(x.x), __tanpi(x.y), __tanpi(x.z), __tanpi(x.w)); | ||
| 3520 | } | ||
| 3521 | #endif | ||
| 3522 | |||
| 3523 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3524 | extern simd_float8 _simd_tanpi_f8(simd_float8 x); | ||
| 3525 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3526 | return _simd_tanpi_f8(x); | ||
| 3527 | } | ||
| 3528 | #else | ||
| 3529 | static inline SIMD_CFUNC simd_float8 __tg_tanpi(simd_float8 x) { | ||
| 3530 | return simd_make_float8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3531 | } | ||
| 3532 | #endif | ||
| 3533 | |||
| 3534 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3535 | extern simd_float16 _simd_tanpi_f16(simd_float16 x); | ||
| 3536 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3537 | return _simd_tanpi_f16(x); | ||
| 3538 | } | ||
| 3539 | #else | ||
| 3540 | static inline SIMD_CFUNC simd_float16 __tg_tanpi(simd_float16 x) { | ||
| 3541 | return simd_make_float16(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3542 | } | ||
| 3543 | #endif | ||
| 3544 | |||
| 3545 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3546 | extern simd_double2 _simd_tanpi_d2(simd_double2 x); | ||
| 3547 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3548 | return _simd_tanpi_d2(x); | ||
| 3549 | } | ||
| 3550 | #else | ||
| 3551 | static inline SIMD_CFUNC simd_double2 __tg_tanpi(simd_double2 x) { | ||
| 3552 | return simd_make_double2(__tanpi(x.x), __tanpi(x.y)); | ||
| 3553 | } | ||
| 3554 | #endif | ||
| 3555 | |||
| 3556 | static inline SIMD_CFUNC simd_double3 __tg_tanpi(simd_double3 x) { | ||
| 3557 | return simd_make_double3(__tg_tanpi(simd_make_double4(x))); | ||
| 3558 | } | ||
| 3559 | |||
| 3560 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3561 | extern simd_double4 _simd_tanpi_d4(simd_double4 x); | ||
| 3562 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3563 | return _simd_tanpi_d4(x); | ||
| 3564 | } | ||
| 3565 | #else | ||
| 3566 | static inline SIMD_CFUNC simd_double4 __tg_tanpi(simd_double4 x) { | ||
| 3567 | return simd_make_double4(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3568 | } | ||
| 3569 | #endif | ||
| 3570 | |||
| 3571 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3572 | extern simd_double8 _simd_tanpi_d8(simd_double8 x); | ||
| 3573 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3574 | return _simd_tanpi_d8(x); | ||
| 3575 | } | ||
| 3576 | #else | ||
| 3577 | static inline SIMD_CFUNC simd_double8 __tg_tanpi(simd_double8 x) { | ||
| 3578 | return simd_make_double8(__tg_tanpi(x.lo), __tg_tanpi(x.hi)); | ||
| 3579 | } | ||
| 3580 | #endif | ||
| 3581 | |||
| 3582 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 3583 | #pragma mark - acosh implementation | ||
| 3584 | static inline SIMD_CFUNC simd_float2 __tg_acosh(simd_float2 x) { | ||
| 3585 | return simd_make_float2(__tg_acosh(simd_make_float4(x))); | ||
| 3586 | } | ||
| 3587 | |||
| 3588 | static inline SIMD_CFUNC simd_float3 __tg_acosh(simd_float3 x) { | ||
| 3589 | return simd_make_float3(__tg_acosh(simd_make_float4(x))); | ||
| 3590 | } | ||
| 3591 | |||
| 3592 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3593 | extern simd_float4 _simd_acosh_f4(simd_float4 x); | ||
| 3594 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3595 | return _simd_acosh_f4(x); | ||
| 3596 | } | ||
| 3597 | #else | ||
| 3598 | static inline SIMD_CFUNC simd_float4 __tg_acosh(simd_float4 x) { | ||
| 3599 | return simd_make_float4(acosh(x.x), acosh(x.y), acosh(x.z), acosh(x.w)); | ||
| 3600 | } | ||
| 3601 | #endif | ||
| 3602 | |||
| 3603 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3604 | extern simd_float8 _simd_acosh_f8(simd_float8 x); | ||
| 3605 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3606 | return _simd_acosh_f8(x); | ||
| 3607 | } | ||
| 3608 | #else | ||
| 3609 | static inline SIMD_CFUNC simd_float8 __tg_acosh(simd_float8 x) { | ||
| 3610 | return simd_make_float8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3611 | } | ||
| 3612 | #endif | ||
| 3613 | |||
| 3614 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3615 | extern simd_float16 _simd_acosh_f16(simd_float16 x); | ||
| 3616 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3617 | return _simd_acosh_f16(x); | ||
| 3618 | } | ||
| 3619 | #else | ||
| 3620 | static inline SIMD_CFUNC simd_float16 __tg_acosh(simd_float16 x) { | ||
| 3621 | return simd_make_float16(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3622 | } | ||
| 3623 | #endif | ||
| 3624 | |||
| 3625 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3626 | extern simd_double2 _simd_acosh_d2(simd_double2 x); | ||
| 3627 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3628 | return _simd_acosh_d2(x); | ||
| 3629 | } | ||
| 3630 | #else | ||
| 3631 | static inline SIMD_CFUNC simd_double2 __tg_acosh(simd_double2 x) { | ||
| 3632 | return simd_make_double2(acosh(x.x), acosh(x.y)); | ||
| 3633 | } | ||
| 3634 | #endif | ||
| 3635 | |||
| 3636 | static inline SIMD_CFUNC simd_double3 __tg_acosh(simd_double3 x) { | ||
| 3637 | return simd_make_double3(__tg_acosh(simd_make_double4(x))); | ||
| 3638 | } | ||
| 3639 | |||
| 3640 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3641 | extern simd_double4 _simd_acosh_d4(simd_double4 x); | ||
| 3642 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3643 | return _simd_acosh_d4(x); | ||
| 3644 | } | ||
| 3645 | #else | ||
| 3646 | static inline SIMD_CFUNC simd_double4 __tg_acosh(simd_double4 x) { | ||
| 3647 | return simd_make_double4(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3648 | } | ||
| 3649 | #endif | ||
| 3650 | |||
| 3651 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3652 | extern simd_double8 _simd_acosh_d8(simd_double8 x); | ||
| 3653 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3654 | return _simd_acosh_d8(x); | ||
| 3655 | } | ||
| 3656 | #else | ||
| 3657 | static inline SIMD_CFUNC simd_double8 __tg_acosh(simd_double8 x) { | ||
| 3658 | return simd_make_double8(__tg_acosh(x.lo), __tg_acosh(x.hi)); | ||
| 3659 | } | ||
| 3660 | #endif | ||
| 3661 | |||
| 3662 | #pragma mark - asinh implementation | ||
| 3663 | static inline SIMD_CFUNC simd_float2 __tg_asinh(simd_float2 x) { | ||
| 3664 | return simd_make_float2(__tg_asinh(simd_make_float4(x))); | ||
| 3665 | } | ||
| 3666 | |||
| 3667 | static inline SIMD_CFUNC simd_float3 __tg_asinh(simd_float3 x) { | ||
| 3668 | return simd_make_float3(__tg_asinh(simd_make_float4(x))); | ||
| 3669 | } | ||
| 3670 | |||
| 3671 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3672 | extern simd_float4 _simd_asinh_f4(simd_float4 x); | ||
| 3673 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3674 | return _simd_asinh_f4(x); | ||
| 3675 | } | ||
| 3676 | #else | ||
| 3677 | static inline SIMD_CFUNC simd_float4 __tg_asinh(simd_float4 x) { | ||
| 3678 | return simd_make_float4(asinh(x.x), asinh(x.y), asinh(x.z), asinh(x.w)); | ||
| 3679 | } | ||
| 3680 | #endif | ||
| 3681 | |||
| 3682 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3683 | extern simd_float8 _simd_asinh_f8(simd_float8 x); | ||
| 3684 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3685 | return _simd_asinh_f8(x); | ||
| 3686 | } | ||
| 3687 | #else | ||
| 3688 | static inline SIMD_CFUNC simd_float8 __tg_asinh(simd_float8 x) { | ||
| 3689 | return simd_make_float8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3690 | } | ||
| 3691 | #endif | ||
| 3692 | |||
| 3693 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3694 | extern simd_float16 _simd_asinh_f16(simd_float16 x); | ||
| 3695 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3696 | return _simd_asinh_f16(x); | ||
| 3697 | } | ||
| 3698 | #else | ||
| 3699 | static inline SIMD_CFUNC simd_float16 __tg_asinh(simd_float16 x) { | ||
| 3700 | return simd_make_float16(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3701 | } | ||
| 3702 | #endif | ||
| 3703 | |||
| 3704 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3705 | extern simd_double2 _simd_asinh_d2(simd_double2 x); | ||
| 3706 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3707 | return _simd_asinh_d2(x); | ||
| 3708 | } | ||
| 3709 | #else | ||
| 3710 | static inline SIMD_CFUNC simd_double2 __tg_asinh(simd_double2 x) { | ||
| 3711 | return simd_make_double2(asinh(x.x), asinh(x.y)); | ||
| 3712 | } | ||
| 3713 | #endif | ||
| 3714 | |||
| 3715 | static inline SIMD_CFUNC simd_double3 __tg_asinh(simd_double3 x) { | ||
| 3716 | return simd_make_double3(__tg_asinh(simd_make_double4(x))); | ||
| 3717 | } | ||
| 3718 | |||
| 3719 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3720 | extern simd_double4 _simd_asinh_d4(simd_double4 x); | ||
| 3721 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3722 | return _simd_asinh_d4(x); | ||
| 3723 | } | ||
| 3724 | #else | ||
| 3725 | static inline SIMD_CFUNC simd_double4 __tg_asinh(simd_double4 x) { | ||
| 3726 | return simd_make_double4(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3727 | } | ||
| 3728 | #endif | ||
| 3729 | |||
| 3730 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3731 | extern simd_double8 _simd_asinh_d8(simd_double8 x); | ||
| 3732 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3733 | return _simd_asinh_d8(x); | ||
| 3734 | } | ||
| 3735 | #else | ||
| 3736 | static inline SIMD_CFUNC simd_double8 __tg_asinh(simd_double8 x) { | ||
| 3737 | return simd_make_double8(__tg_asinh(x.lo), __tg_asinh(x.hi)); | ||
| 3738 | } | ||
| 3739 | #endif | ||
| 3740 | |||
| 3741 | #pragma mark - atanh implementation | ||
| 3742 | static inline SIMD_CFUNC simd_float2 __tg_atanh(simd_float2 x) { | ||
| 3743 | return simd_make_float2(__tg_atanh(simd_make_float4(x))); | ||
| 3744 | } | ||
| 3745 | |||
| 3746 | static inline SIMD_CFUNC simd_float3 __tg_atanh(simd_float3 x) { | ||
| 3747 | return simd_make_float3(__tg_atanh(simd_make_float4(x))); | ||
| 3748 | } | ||
| 3749 | |||
| 3750 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3751 | extern simd_float4 _simd_atanh_f4(simd_float4 x); | ||
| 3752 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3753 | return _simd_atanh_f4(x); | ||
| 3754 | } | ||
| 3755 | #else | ||
| 3756 | static inline SIMD_CFUNC simd_float4 __tg_atanh(simd_float4 x) { | ||
| 3757 | return simd_make_float4(atanh(x.x), atanh(x.y), atanh(x.z), atanh(x.w)); | ||
| 3758 | } | ||
| 3759 | #endif | ||
| 3760 | |||
| 3761 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3762 | extern simd_float8 _simd_atanh_f8(simd_float8 x); | ||
| 3763 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3764 | return _simd_atanh_f8(x); | ||
| 3765 | } | ||
| 3766 | #else | ||
| 3767 | static inline SIMD_CFUNC simd_float8 __tg_atanh(simd_float8 x) { | ||
| 3768 | return simd_make_float8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3769 | } | ||
| 3770 | #endif | ||
| 3771 | |||
| 3772 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3773 | extern simd_float16 _simd_atanh_f16(simd_float16 x); | ||
| 3774 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3775 | return _simd_atanh_f16(x); | ||
| 3776 | } | ||
| 3777 | #else | ||
| 3778 | static inline SIMD_CFUNC simd_float16 __tg_atanh(simd_float16 x) { | ||
| 3779 | return simd_make_float16(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3780 | } | ||
| 3781 | #endif | ||
| 3782 | |||
| 3783 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3784 | extern simd_double2 _simd_atanh_d2(simd_double2 x); | ||
| 3785 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3786 | return _simd_atanh_d2(x); | ||
| 3787 | } | ||
| 3788 | #else | ||
| 3789 | static inline SIMD_CFUNC simd_double2 __tg_atanh(simd_double2 x) { | ||
| 3790 | return simd_make_double2(atanh(x.x), atanh(x.y)); | ||
| 3791 | } | ||
| 3792 | #endif | ||
| 3793 | |||
| 3794 | static inline SIMD_CFUNC simd_double3 __tg_atanh(simd_double3 x) { | ||
| 3795 | return simd_make_double3(__tg_atanh(simd_make_double4(x))); | ||
| 3796 | } | ||
| 3797 | |||
| 3798 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3799 | extern simd_double4 _simd_atanh_d4(simd_double4 x); | ||
| 3800 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3801 | return _simd_atanh_d4(x); | ||
| 3802 | } | ||
| 3803 | #else | ||
| 3804 | static inline SIMD_CFUNC simd_double4 __tg_atanh(simd_double4 x) { | ||
| 3805 | return simd_make_double4(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3806 | } | ||
| 3807 | #endif | ||
| 3808 | |||
| 3809 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3810 | extern simd_double8 _simd_atanh_d8(simd_double8 x); | ||
| 3811 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3812 | return _simd_atanh_d8(x); | ||
| 3813 | } | ||
| 3814 | #else | ||
| 3815 | static inline SIMD_CFUNC simd_double8 __tg_atanh(simd_double8 x) { | ||
| 3816 | return simd_make_double8(__tg_atanh(x.lo), __tg_atanh(x.hi)); | ||
| 3817 | } | ||
| 3818 | #endif | ||
| 3819 | |||
| 3820 | #pragma mark - cosh implementation | ||
| 3821 | static inline SIMD_CFUNC simd_float2 __tg_cosh(simd_float2 x) { | ||
| 3822 | return simd_make_float2(__tg_cosh(simd_make_float4(x))); | ||
| 3823 | } | ||
| 3824 | |||
| 3825 | static inline SIMD_CFUNC simd_float3 __tg_cosh(simd_float3 x) { | ||
| 3826 | return simd_make_float3(__tg_cosh(simd_make_float4(x))); | ||
| 3827 | } | ||
| 3828 | |||
| 3829 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3830 | extern simd_float4 _simd_cosh_f4(simd_float4 x); | ||
| 3831 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3832 | return _simd_cosh_f4(x); | ||
| 3833 | } | ||
| 3834 | #else | ||
| 3835 | static inline SIMD_CFUNC simd_float4 __tg_cosh(simd_float4 x) { | ||
| 3836 | return simd_make_float4(cosh(x.x), cosh(x.y), cosh(x.z), cosh(x.w)); | ||
| 3837 | } | ||
| 3838 | #endif | ||
| 3839 | |||
| 3840 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3841 | extern simd_float8 _simd_cosh_f8(simd_float8 x); | ||
| 3842 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3843 | return _simd_cosh_f8(x); | ||
| 3844 | } | ||
| 3845 | #else | ||
| 3846 | static inline SIMD_CFUNC simd_float8 __tg_cosh(simd_float8 x) { | ||
| 3847 | return simd_make_float8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3848 | } | ||
| 3849 | #endif | ||
| 3850 | |||
| 3851 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3852 | extern simd_float16 _simd_cosh_f16(simd_float16 x); | ||
| 3853 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3854 | return _simd_cosh_f16(x); | ||
| 3855 | } | ||
| 3856 | #else | ||
| 3857 | static inline SIMD_CFUNC simd_float16 __tg_cosh(simd_float16 x) { | ||
| 3858 | return simd_make_float16(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3859 | } | ||
| 3860 | #endif | ||
| 3861 | |||
| 3862 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3863 | extern simd_double2 _simd_cosh_d2(simd_double2 x); | ||
| 3864 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3865 | return _simd_cosh_d2(x); | ||
| 3866 | } | ||
| 3867 | #else | ||
| 3868 | static inline SIMD_CFUNC simd_double2 __tg_cosh(simd_double2 x) { | ||
| 3869 | return simd_make_double2(cosh(x.x), cosh(x.y)); | ||
| 3870 | } | ||
| 3871 | #endif | ||
| 3872 | |||
| 3873 | static inline SIMD_CFUNC simd_double3 __tg_cosh(simd_double3 x) { | ||
| 3874 | return simd_make_double3(__tg_cosh(simd_make_double4(x))); | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3878 | extern simd_double4 _simd_cosh_d4(simd_double4 x); | ||
| 3879 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3880 | return _simd_cosh_d4(x); | ||
| 3881 | } | ||
| 3882 | #else | ||
| 3883 | static inline SIMD_CFUNC simd_double4 __tg_cosh(simd_double4 x) { | ||
| 3884 | return simd_make_double4(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3885 | } | ||
| 3886 | #endif | ||
| 3887 | |||
| 3888 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3889 | extern simd_double8 _simd_cosh_d8(simd_double8 x); | ||
| 3890 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3891 | return _simd_cosh_d8(x); | ||
| 3892 | } | ||
| 3893 | #else | ||
| 3894 | static inline SIMD_CFUNC simd_double8 __tg_cosh(simd_double8 x) { | ||
| 3895 | return simd_make_double8(__tg_cosh(x.lo), __tg_cosh(x.hi)); | ||
| 3896 | } | ||
| 3897 | #endif | ||
| 3898 | |||
| 3899 | #pragma mark - sinh implementation | ||
| 3900 | static inline SIMD_CFUNC simd_float2 __tg_sinh(simd_float2 x) { | ||
| 3901 | return simd_make_float2(__tg_sinh(simd_make_float4(x))); | ||
| 3902 | } | ||
| 3903 | |||
| 3904 | static inline SIMD_CFUNC simd_float3 __tg_sinh(simd_float3 x) { | ||
| 3905 | return simd_make_float3(__tg_sinh(simd_make_float4(x))); | ||
| 3906 | } | ||
| 3907 | |||
| 3908 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3909 | extern simd_float4 _simd_sinh_f4(simd_float4 x); | ||
| 3910 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3911 | return _simd_sinh_f4(x); | ||
| 3912 | } | ||
| 3913 | #else | ||
| 3914 | static inline SIMD_CFUNC simd_float4 __tg_sinh(simd_float4 x) { | ||
| 3915 | return simd_make_float4(sinh(x.x), sinh(x.y), sinh(x.z), sinh(x.w)); | ||
| 3916 | } | ||
| 3917 | #endif | ||
| 3918 | |||
| 3919 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3920 | extern simd_float8 _simd_sinh_f8(simd_float8 x); | ||
| 3921 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3922 | return _simd_sinh_f8(x); | ||
| 3923 | } | ||
| 3924 | #else | ||
| 3925 | static inline SIMD_CFUNC simd_float8 __tg_sinh(simd_float8 x) { | ||
| 3926 | return simd_make_float8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3927 | } | ||
| 3928 | #endif | ||
| 3929 | |||
| 3930 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3931 | extern simd_float16 _simd_sinh_f16(simd_float16 x); | ||
| 3932 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3933 | return _simd_sinh_f16(x); | ||
| 3934 | } | ||
| 3935 | #else | ||
| 3936 | static inline SIMD_CFUNC simd_float16 __tg_sinh(simd_float16 x) { | ||
| 3937 | return simd_make_float16(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3938 | } | ||
| 3939 | #endif | ||
| 3940 | |||
| 3941 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3942 | extern simd_double2 _simd_sinh_d2(simd_double2 x); | ||
| 3943 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3944 | return _simd_sinh_d2(x); | ||
| 3945 | } | ||
| 3946 | #else | ||
| 3947 | static inline SIMD_CFUNC simd_double2 __tg_sinh(simd_double2 x) { | ||
| 3948 | return simd_make_double2(sinh(x.x), sinh(x.y)); | ||
| 3949 | } | ||
| 3950 | #endif | ||
| 3951 | |||
| 3952 | static inline SIMD_CFUNC simd_double3 __tg_sinh(simd_double3 x) { | ||
| 3953 | return simd_make_double3(__tg_sinh(simd_make_double4(x))); | ||
| 3954 | } | ||
| 3955 | |||
| 3956 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3957 | extern simd_double4 _simd_sinh_d4(simd_double4 x); | ||
| 3958 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3959 | return _simd_sinh_d4(x); | ||
| 3960 | } | ||
| 3961 | #else | ||
| 3962 | static inline SIMD_CFUNC simd_double4 __tg_sinh(simd_double4 x) { | ||
| 3963 | return simd_make_double4(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3964 | } | ||
| 3965 | #endif | ||
| 3966 | |||
| 3967 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 3968 | extern simd_double8 _simd_sinh_d8(simd_double8 x); | ||
| 3969 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3970 | return _simd_sinh_d8(x); | ||
| 3971 | } | ||
| 3972 | #else | ||
| 3973 | static inline SIMD_CFUNC simd_double8 __tg_sinh(simd_double8 x) { | ||
| 3974 | return simd_make_double8(__tg_sinh(x.lo), __tg_sinh(x.hi)); | ||
| 3975 | } | ||
| 3976 | #endif | ||
| 3977 | |||
| 3978 | #pragma mark - tanh implementation | ||
| 3979 | static inline SIMD_CFUNC simd_float2 __tg_tanh(simd_float2 x) { | ||
| 3980 | return simd_make_float2(__tg_tanh(simd_make_float4(x))); | ||
| 3981 | } | ||
| 3982 | |||
| 3983 | static inline SIMD_CFUNC simd_float3 __tg_tanh(simd_float3 x) { | ||
| 3984 | return simd_make_float3(__tg_tanh(simd_make_float4(x))); | ||
| 3985 | } | ||
| 3986 | |||
| 3987 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 3988 | extern simd_float4 _simd_tanh_f4(simd_float4 x); | ||
| 3989 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3990 | return _simd_tanh_f4(x); | ||
| 3991 | } | ||
| 3992 | #else | ||
| 3993 | static inline SIMD_CFUNC simd_float4 __tg_tanh(simd_float4 x) { | ||
| 3994 | return simd_make_float4(tanh(x.x), tanh(x.y), tanh(x.z), tanh(x.w)); | ||
| 3995 | } | ||
| 3996 | #endif | ||
| 3997 | |||
| 3998 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 3999 | extern simd_float8 _simd_tanh_f8(simd_float8 x); | ||
| 4000 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 4001 | return _simd_tanh_f8(x); | ||
| 4002 | } | ||
| 4003 | #else | ||
| 4004 | static inline SIMD_CFUNC simd_float8 __tg_tanh(simd_float8 x) { | ||
| 4005 | return simd_make_float8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4006 | } | ||
| 4007 | #endif | ||
| 4008 | |||
| 4009 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4010 | extern simd_float16 _simd_tanh_f16(simd_float16 x); | ||
| 4011 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 4012 | return _simd_tanh_f16(x); | ||
| 4013 | } | ||
| 4014 | #else | ||
| 4015 | static inline SIMD_CFUNC simd_float16 __tg_tanh(simd_float16 x) { | ||
| 4016 | return simd_make_float16(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4017 | } | ||
| 4018 | #endif | ||
| 4019 | |||
| 4020 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4021 | extern simd_double2 _simd_tanh_d2(simd_double2 x); | ||
| 4022 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 4023 | return _simd_tanh_d2(x); | ||
| 4024 | } | ||
| 4025 | #else | ||
| 4026 | static inline SIMD_CFUNC simd_double2 __tg_tanh(simd_double2 x) { | ||
| 4027 | return simd_make_double2(tanh(x.x), tanh(x.y)); | ||
| 4028 | } | ||
| 4029 | #endif | ||
| 4030 | |||
| 4031 | static inline SIMD_CFUNC simd_double3 __tg_tanh(simd_double3 x) { | ||
| 4032 | return simd_make_double3(__tg_tanh(simd_make_double4(x))); | ||
| 4033 | } | ||
| 4034 | |||
| 4035 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4036 | extern simd_double4 _simd_tanh_d4(simd_double4 x); | ||
| 4037 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 4038 | return _simd_tanh_d4(x); | ||
| 4039 | } | ||
| 4040 | #else | ||
| 4041 | static inline SIMD_CFUNC simd_double4 __tg_tanh(simd_double4 x) { | ||
| 4042 | return simd_make_double4(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4043 | } | ||
| 4044 | #endif | ||
| 4045 | |||
| 4046 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4047 | extern simd_double8 _simd_tanh_d8(simd_double8 x); | ||
| 4048 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 4049 | return _simd_tanh_d8(x); | ||
| 4050 | } | ||
| 4051 | #else | ||
| 4052 | static inline SIMD_CFUNC simd_double8 __tg_tanh(simd_double8 x) { | ||
| 4053 | return simd_make_double8(__tg_tanh(x.lo), __tg_tanh(x.hi)); | ||
| 4054 | } | ||
| 4055 | #endif | ||
| 4056 | |||
| 4057 | #pragma mark - exp implementation | ||
| 4058 | static inline SIMD_CFUNC simd_float2 __tg_exp(simd_float2 x) { | ||
| 4059 | return simd_make_float2(__tg_exp(simd_make_float4(x))); | ||
| 4060 | } | ||
| 4061 | |||
| 4062 | static inline SIMD_CFUNC simd_float3 __tg_exp(simd_float3 x) { | ||
| 4063 | return simd_make_float3(__tg_exp(simd_make_float4(x))); | ||
| 4064 | } | ||
| 4065 | |||
| 4066 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4067 | extern simd_float4 _simd_exp_f4(simd_float4 x); | ||
| 4068 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 4069 | return _simd_exp_f4(x); | ||
| 4070 | } | ||
| 4071 | #else | ||
| 4072 | static inline SIMD_CFUNC simd_float4 __tg_exp(simd_float4 x) { | ||
| 4073 | return simd_make_float4(exp(x.x), exp(x.y), exp(x.z), exp(x.w)); | ||
| 4074 | } | ||
| 4075 | #endif | ||
| 4076 | |||
| 4077 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4078 | extern simd_float8 _simd_exp_f8(simd_float8 x); | ||
| 4079 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 4080 | return _simd_exp_f8(x); | ||
| 4081 | } | ||
| 4082 | #else | ||
| 4083 | static inline SIMD_CFUNC simd_float8 __tg_exp(simd_float8 x) { | ||
| 4084 | return simd_make_float8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4085 | } | ||
| 4086 | #endif | ||
| 4087 | |||
| 4088 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4089 | extern simd_float16 _simd_exp_f16(simd_float16 x); | ||
| 4090 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 4091 | return _simd_exp_f16(x); | ||
| 4092 | } | ||
| 4093 | #else | ||
| 4094 | static inline SIMD_CFUNC simd_float16 __tg_exp(simd_float16 x) { | ||
| 4095 | return simd_make_float16(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4096 | } | ||
| 4097 | #endif | ||
| 4098 | |||
| 4099 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4100 | extern simd_double2 _simd_exp_d2(simd_double2 x); | ||
| 4101 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 4102 | return _simd_exp_d2(x); | ||
| 4103 | } | ||
| 4104 | #else | ||
| 4105 | static inline SIMD_CFUNC simd_double2 __tg_exp(simd_double2 x) { | ||
| 4106 | return simd_make_double2(exp(x.x), exp(x.y)); | ||
| 4107 | } | ||
| 4108 | #endif | ||
| 4109 | |||
| 4110 | static inline SIMD_CFUNC simd_double3 __tg_exp(simd_double3 x) { | ||
| 4111 | return simd_make_double3(__tg_exp(simd_make_double4(x))); | ||
| 4112 | } | ||
| 4113 | |||
| 4114 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4115 | extern simd_double4 _simd_exp_d4(simd_double4 x); | ||
| 4116 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 4117 | return _simd_exp_d4(x); | ||
| 4118 | } | ||
| 4119 | #else | ||
| 4120 | static inline SIMD_CFUNC simd_double4 __tg_exp(simd_double4 x) { | ||
| 4121 | return simd_make_double4(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4122 | } | ||
| 4123 | #endif | ||
| 4124 | |||
| 4125 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4126 | extern simd_double8 _simd_exp_d8(simd_double8 x); | ||
| 4127 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 4128 | return _simd_exp_d8(x); | ||
| 4129 | } | ||
| 4130 | #else | ||
| 4131 | static inline SIMD_CFUNC simd_double8 __tg_exp(simd_double8 x) { | ||
| 4132 | return simd_make_double8(__tg_exp(x.lo), __tg_exp(x.hi)); | ||
| 4133 | } | ||
| 4134 | #endif | ||
| 4135 | |||
| 4136 | #pragma mark - exp2 implementation | ||
| 4137 | static inline SIMD_CFUNC simd_float2 __tg_exp2(simd_float2 x) { | ||
| 4138 | return simd_make_float2(__tg_exp2(simd_make_float4(x))); | ||
| 4139 | } | ||
| 4140 | |||
| 4141 | static inline SIMD_CFUNC simd_float3 __tg_exp2(simd_float3 x) { | ||
| 4142 | return simd_make_float3(__tg_exp2(simd_make_float4(x))); | ||
| 4143 | } | ||
| 4144 | |||
| 4145 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4146 | extern simd_float4 _simd_exp2_f4(simd_float4 x); | ||
| 4147 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 4148 | return _simd_exp2_f4(x); | ||
| 4149 | } | ||
| 4150 | #else | ||
| 4151 | static inline SIMD_CFUNC simd_float4 __tg_exp2(simd_float4 x) { | ||
| 4152 | return simd_make_float4(exp2(x.x), exp2(x.y), exp2(x.z), exp2(x.w)); | ||
| 4153 | } | ||
| 4154 | #endif | ||
| 4155 | |||
| 4156 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4157 | extern simd_float8 _simd_exp2_f8(simd_float8 x); | ||
| 4158 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 4159 | return _simd_exp2_f8(x); | ||
| 4160 | } | ||
| 4161 | #else | ||
| 4162 | static inline SIMD_CFUNC simd_float8 __tg_exp2(simd_float8 x) { | ||
| 4163 | return simd_make_float8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4164 | } | ||
| 4165 | #endif | ||
| 4166 | |||
| 4167 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4168 | extern simd_float16 _simd_exp2_f16(simd_float16 x); | ||
| 4169 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 4170 | return _simd_exp2_f16(x); | ||
| 4171 | } | ||
| 4172 | #else | ||
| 4173 | static inline SIMD_CFUNC simd_float16 __tg_exp2(simd_float16 x) { | ||
| 4174 | return simd_make_float16(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4175 | } | ||
| 4176 | #endif | ||
| 4177 | |||
| 4178 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4179 | extern simd_double2 _simd_exp2_d2(simd_double2 x); | ||
| 4180 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 4181 | return _simd_exp2_d2(x); | ||
| 4182 | } | ||
| 4183 | #else | ||
| 4184 | static inline SIMD_CFUNC simd_double2 __tg_exp2(simd_double2 x) { | ||
| 4185 | return simd_make_double2(exp2(x.x), exp2(x.y)); | ||
| 4186 | } | ||
| 4187 | #endif | ||
| 4188 | |||
| 4189 | static inline SIMD_CFUNC simd_double3 __tg_exp2(simd_double3 x) { | ||
| 4190 | return simd_make_double3(__tg_exp2(simd_make_double4(x))); | ||
| 4191 | } | ||
| 4192 | |||
| 4193 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4194 | extern simd_double4 _simd_exp2_d4(simd_double4 x); | ||
| 4195 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 4196 | return _simd_exp2_d4(x); | ||
| 4197 | } | ||
| 4198 | #else | ||
| 4199 | static inline SIMD_CFUNC simd_double4 __tg_exp2(simd_double4 x) { | ||
| 4200 | return simd_make_double4(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4201 | } | ||
| 4202 | #endif | ||
| 4203 | |||
| 4204 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4205 | extern simd_double8 _simd_exp2_d8(simd_double8 x); | ||
| 4206 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 4207 | return _simd_exp2_d8(x); | ||
| 4208 | } | ||
| 4209 | #else | ||
| 4210 | static inline SIMD_CFUNC simd_double8 __tg_exp2(simd_double8 x) { | ||
| 4211 | return simd_make_double8(__tg_exp2(x.lo), __tg_exp2(x.hi)); | ||
| 4212 | } | ||
| 4213 | #endif | ||
| 4214 | |||
| 4215 | #pragma mark - exp10 implementation | ||
| 4216 | #if SIMD_LIBRARY_VERSION >= 1 | ||
| 4217 | static inline SIMD_CFUNC simd_float2 __tg_exp10(simd_float2 x) { | ||
| 4218 | return simd_make_float2(__tg_exp10(simd_make_float4(x))); | ||
| 4219 | } | ||
| 4220 | |||
| 4221 | static inline SIMD_CFUNC simd_float3 __tg_exp10(simd_float3 x) { | ||
| 4222 | return simd_make_float3(__tg_exp10(simd_make_float4(x))); | ||
| 4223 | } | ||
| 4224 | |||
| 4225 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4226 | extern simd_float4 _simd_exp10_f4(simd_float4 x); | ||
| 4227 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 4228 | return _simd_exp10_f4(x); | ||
| 4229 | } | ||
| 4230 | #else | ||
| 4231 | static inline SIMD_CFUNC simd_float4 __tg_exp10(simd_float4 x) { | ||
| 4232 | return simd_make_float4(__exp10(x.x), __exp10(x.y), __exp10(x.z), __exp10(x.w)); | ||
| 4233 | } | ||
| 4234 | #endif | ||
| 4235 | |||
| 4236 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4237 | extern simd_float8 _simd_exp10_f8(simd_float8 x); | ||
| 4238 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 4239 | return _simd_exp10_f8(x); | ||
| 4240 | } | ||
| 4241 | #else | ||
| 4242 | static inline SIMD_CFUNC simd_float8 __tg_exp10(simd_float8 x) { | ||
| 4243 | return simd_make_float8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4244 | } | ||
| 4245 | #endif | ||
| 4246 | |||
| 4247 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4248 | extern simd_float16 _simd_exp10_f16(simd_float16 x); | ||
| 4249 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 4250 | return _simd_exp10_f16(x); | ||
| 4251 | } | ||
| 4252 | #else | ||
| 4253 | static inline SIMD_CFUNC simd_float16 __tg_exp10(simd_float16 x) { | ||
| 4254 | return simd_make_float16(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4255 | } | ||
| 4256 | #endif | ||
| 4257 | |||
| 4258 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4259 | extern simd_double2 _simd_exp10_d2(simd_double2 x); | ||
| 4260 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 4261 | return _simd_exp10_d2(x); | ||
| 4262 | } | ||
| 4263 | #else | ||
| 4264 | static inline SIMD_CFUNC simd_double2 __tg_exp10(simd_double2 x) { | ||
| 4265 | return simd_make_double2(__exp10(x.x), __exp10(x.y)); | ||
| 4266 | } | ||
| 4267 | #endif | ||
| 4268 | |||
| 4269 | static inline SIMD_CFUNC simd_double3 __tg_exp10(simd_double3 x) { | ||
| 4270 | return simd_make_double3(__tg_exp10(simd_make_double4(x))); | ||
| 4271 | } | ||
| 4272 | |||
| 4273 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4274 | extern simd_double4 _simd_exp10_d4(simd_double4 x); | ||
| 4275 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 4276 | return _simd_exp10_d4(x); | ||
| 4277 | } | ||
| 4278 | #else | ||
| 4279 | static inline SIMD_CFUNC simd_double4 __tg_exp10(simd_double4 x) { | ||
| 4280 | return simd_make_double4(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4281 | } | ||
| 4282 | #endif | ||
| 4283 | |||
| 4284 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4285 | extern simd_double8 _simd_exp10_d8(simd_double8 x); | ||
| 4286 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 4287 | return _simd_exp10_d8(x); | ||
| 4288 | } | ||
| 4289 | #else | ||
| 4290 | static inline SIMD_CFUNC simd_double8 __tg_exp10(simd_double8 x) { | ||
| 4291 | return simd_make_double8(__tg_exp10(x.lo), __tg_exp10(x.hi)); | ||
| 4292 | } | ||
| 4293 | #endif | ||
| 4294 | |||
| 4295 | #endif /* SIMD_LIBRARY_VERSION */ | ||
| 4296 | #pragma mark - expm1 implementation | ||
| 4297 | static inline SIMD_CFUNC simd_float2 __tg_expm1(simd_float2 x) { | ||
| 4298 | return simd_make_float2(__tg_expm1(simd_make_float4(x))); | ||
| 4299 | } | ||
| 4300 | |||
| 4301 | static inline SIMD_CFUNC simd_float3 __tg_expm1(simd_float3 x) { | ||
| 4302 | return simd_make_float3(__tg_expm1(simd_make_float4(x))); | ||
| 4303 | } | ||
| 4304 | |||
| 4305 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4306 | extern simd_float4 _simd_expm1_f4(simd_float4 x); | ||
| 4307 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 4308 | return _simd_expm1_f4(x); | ||
| 4309 | } | ||
| 4310 | #else | ||
| 4311 | static inline SIMD_CFUNC simd_float4 __tg_expm1(simd_float4 x) { | ||
| 4312 | return simd_make_float4(expm1(x.x), expm1(x.y), expm1(x.z), expm1(x.w)); | ||
| 4313 | } | ||
| 4314 | #endif | ||
| 4315 | |||
| 4316 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4317 | extern simd_float8 _simd_expm1_f8(simd_float8 x); | ||
| 4318 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 4319 | return _simd_expm1_f8(x); | ||
| 4320 | } | ||
| 4321 | #else | ||
| 4322 | static inline SIMD_CFUNC simd_float8 __tg_expm1(simd_float8 x) { | ||
| 4323 | return simd_make_float8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4324 | } | ||
| 4325 | #endif | ||
| 4326 | |||
| 4327 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4328 | extern simd_float16 _simd_expm1_f16(simd_float16 x); | ||
| 4329 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4330 | return _simd_expm1_f16(x); | ||
| 4331 | } | ||
| 4332 | #else | ||
| 4333 | static inline SIMD_CFUNC simd_float16 __tg_expm1(simd_float16 x) { | ||
| 4334 | return simd_make_float16(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4335 | } | ||
| 4336 | #endif | ||
| 4337 | |||
| 4338 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4339 | extern simd_double2 _simd_expm1_d2(simd_double2 x); | ||
| 4340 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4341 | return _simd_expm1_d2(x); | ||
| 4342 | } | ||
| 4343 | #else | ||
| 4344 | static inline SIMD_CFUNC simd_double2 __tg_expm1(simd_double2 x) { | ||
| 4345 | return simd_make_double2(expm1(x.x), expm1(x.y)); | ||
| 4346 | } | ||
| 4347 | #endif | ||
| 4348 | |||
| 4349 | static inline SIMD_CFUNC simd_double3 __tg_expm1(simd_double3 x) { | ||
| 4350 | return simd_make_double3(__tg_expm1(simd_make_double4(x))); | ||
| 4351 | } | ||
| 4352 | |||
| 4353 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4354 | extern simd_double4 _simd_expm1_d4(simd_double4 x); | ||
| 4355 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4356 | return _simd_expm1_d4(x); | ||
| 4357 | } | ||
| 4358 | #else | ||
| 4359 | static inline SIMD_CFUNC simd_double4 __tg_expm1(simd_double4 x) { | ||
| 4360 | return simd_make_double4(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4361 | } | ||
| 4362 | #endif | ||
| 4363 | |||
| 4364 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4365 | extern simd_double8 _simd_expm1_d8(simd_double8 x); | ||
| 4366 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4367 | return _simd_expm1_d8(x); | ||
| 4368 | } | ||
| 4369 | #else | ||
| 4370 | static inline SIMD_CFUNC simd_double8 __tg_expm1(simd_double8 x) { | ||
| 4371 | return simd_make_double8(__tg_expm1(x.lo), __tg_expm1(x.hi)); | ||
| 4372 | } | ||
| 4373 | #endif | ||
| 4374 | |||
| 4375 | #pragma mark - log implementation | ||
| 4376 | static inline SIMD_CFUNC simd_float2 __tg_log(simd_float2 x) { | ||
| 4377 | return simd_make_float2(__tg_log(simd_make_float4(x))); | ||
| 4378 | } | ||
| 4379 | |||
| 4380 | static inline SIMD_CFUNC simd_float3 __tg_log(simd_float3 x) { | ||
| 4381 | return simd_make_float3(__tg_log(simd_make_float4(x))); | ||
| 4382 | } | ||
| 4383 | |||
| 4384 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4385 | extern simd_float4 _simd_log_f4(simd_float4 x); | ||
| 4386 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4387 | return _simd_log_f4(x); | ||
| 4388 | } | ||
| 4389 | #else | ||
| 4390 | static inline SIMD_CFUNC simd_float4 __tg_log(simd_float4 x) { | ||
| 4391 | return simd_make_float4(log(x.x), log(x.y), log(x.z), log(x.w)); | ||
| 4392 | } | ||
| 4393 | #endif | ||
| 4394 | |||
| 4395 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4396 | extern simd_float8 _simd_log_f8(simd_float8 x); | ||
| 4397 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4398 | return _simd_log_f8(x); | ||
| 4399 | } | ||
| 4400 | #else | ||
| 4401 | static inline SIMD_CFUNC simd_float8 __tg_log(simd_float8 x) { | ||
| 4402 | return simd_make_float8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4403 | } | ||
| 4404 | #endif | ||
| 4405 | |||
| 4406 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4407 | extern simd_float16 _simd_log_f16(simd_float16 x); | ||
| 4408 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4409 | return _simd_log_f16(x); | ||
| 4410 | } | ||
| 4411 | #else | ||
| 4412 | static inline SIMD_CFUNC simd_float16 __tg_log(simd_float16 x) { | ||
| 4413 | return simd_make_float16(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4414 | } | ||
| 4415 | #endif | ||
| 4416 | |||
| 4417 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4418 | extern simd_double2 _simd_log_d2(simd_double2 x); | ||
| 4419 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4420 | return _simd_log_d2(x); | ||
| 4421 | } | ||
| 4422 | #else | ||
| 4423 | static inline SIMD_CFUNC simd_double2 __tg_log(simd_double2 x) { | ||
| 4424 | return simd_make_double2(log(x.x), log(x.y)); | ||
| 4425 | } | ||
| 4426 | #endif | ||
| 4427 | |||
| 4428 | static inline SIMD_CFUNC simd_double3 __tg_log(simd_double3 x) { | ||
| 4429 | return simd_make_double3(__tg_log(simd_make_double4(x))); | ||
| 4430 | } | ||
| 4431 | |||
| 4432 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4433 | extern simd_double4 _simd_log_d4(simd_double4 x); | ||
| 4434 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4435 | return _simd_log_d4(x); | ||
| 4436 | } | ||
| 4437 | #else | ||
| 4438 | static inline SIMD_CFUNC simd_double4 __tg_log(simd_double4 x) { | ||
| 4439 | return simd_make_double4(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4440 | } | ||
| 4441 | #endif | ||
| 4442 | |||
| 4443 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4444 | extern simd_double8 _simd_log_d8(simd_double8 x); | ||
| 4445 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4446 | return _simd_log_d8(x); | ||
| 4447 | } | ||
| 4448 | #else | ||
| 4449 | static inline SIMD_CFUNC simd_double8 __tg_log(simd_double8 x) { | ||
| 4450 | return simd_make_double8(__tg_log(x.lo), __tg_log(x.hi)); | ||
| 4451 | } | ||
| 4452 | #endif | ||
| 4453 | |||
| 4454 | #pragma mark - log2 implementation | ||
| 4455 | static inline SIMD_CFUNC simd_float2 __tg_log2(simd_float2 x) { | ||
| 4456 | return simd_make_float2(__tg_log2(simd_make_float4(x))); | ||
| 4457 | } | ||
| 4458 | |||
| 4459 | static inline SIMD_CFUNC simd_float3 __tg_log2(simd_float3 x) { | ||
| 4460 | return simd_make_float3(__tg_log2(simd_make_float4(x))); | ||
| 4461 | } | ||
| 4462 | |||
| 4463 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4464 | extern simd_float4 _simd_log2_f4(simd_float4 x); | ||
| 4465 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4466 | return _simd_log2_f4(x); | ||
| 4467 | } | ||
| 4468 | #else | ||
| 4469 | static inline SIMD_CFUNC simd_float4 __tg_log2(simd_float4 x) { | ||
| 4470 | return simd_make_float4(log2(x.x), log2(x.y), log2(x.z), log2(x.w)); | ||
| 4471 | } | ||
| 4472 | #endif | ||
| 4473 | |||
| 4474 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4475 | extern simd_float8 _simd_log2_f8(simd_float8 x); | ||
| 4476 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4477 | return _simd_log2_f8(x); | ||
| 4478 | } | ||
| 4479 | #else | ||
| 4480 | static inline SIMD_CFUNC simd_float8 __tg_log2(simd_float8 x) { | ||
| 4481 | return simd_make_float8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4482 | } | ||
| 4483 | #endif | ||
| 4484 | |||
| 4485 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4486 | extern simd_float16 _simd_log2_f16(simd_float16 x); | ||
| 4487 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4488 | return _simd_log2_f16(x); | ||
| 4489 | } | ||
| 4490 | #else | ||
| 4491 | static inline SIMD_CFUNC simd_float16 __tg_log2(simd_float16 x) { | ||
| 4492 | return simd_make_float16(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4493 | } | ||
| 4494 | #endif | ||
| 4495 | |||
| 4496 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4497 | extern simd_double2 _simd_log2_d2(simd_double2 x); | ||
| 4498 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4499 | return _simd_log2_d2(x); | ||
| 4500 | } | ||
| 4501 | #else | ||
| 4502 | static inline SIMD_CFUNC simd_double2 __tg_log2(simd_double2 x) { | ||
| 4503 | return simd_make_double2(log2(x.x), log2(x.y)); | ||
| 4504 | } | ||
| 4505 | #endif | ||
| 4506 | |||
| 4507 | static inline SIMD_CFUNC simd_double3 __tg_log2(simd_double3 x) { | ||
| 4508 | return simd_make_double3(__tg_log2(simd_make_double4(x))); | ||
| 4509 | } | ||
| 4510 | |||
| 4511 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4512 | extern simd_double4 _simd_log2_d4(simd_double4 x); | ||
| 4513 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4514 | return _simd_log2_d4(x); | ||
| 4515 | } | ||
| 4516 | #else | ||
| 4517 | static inline SIMD_CFUNC simd_double4 __tg_log2(simd_double4 x) { | ||
| 4518 | return simd_make_double4(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4519 | } | ||
| 4520 | #endif | ||
| 4521 | |||
| 4522 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4523 | extern simd_double8 _simd_log2_d8(simd_double8 x); | ||
| 4524 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4525 | return _simd_log2_d8(x); | ||
| 4526 | } | ||
| 4527 | #else | ||
| 4528 | static inline SIMD_CFUNC simd_double8 __tg_log2(simd_double8 x) { | ||
| 4529 | return simd_make_double8(__tg_log2(x.lo), __tg_log2(x.hi)); | ||
| 4530 | } | ||
| 4531 | #endif | ||
| 4532 | |||
| 4533 | #pragma mark - log10 implementation | ||
| 4534 | static inline SIMD_CFUNC simd_float2 __tg_log10(simd_float2 x) { | ||
| 4535 | return simd_make_float2(__tg_log10(simd_make_float4(x))); | ||
| 4536 | } | ||
| 4537 | |||
| 4538 | static inline SIMD_CFUNC simd_float3 __tg_log10(simd_float3 x) { | ||
| 4539 | return simd_make_float3(__tg_log10(simd_make_float4(x))); | ||
| 4540 | } | ||
| 4541 | |||
| 4542 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4543 | extern simd_float4 _simd_log10_f4(simd_float4 x); | ||
| 4544 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4545 | return _simd_log10_f4(x); | ||
| 4546 | } | ||
| 4547 | #else | ||
| 4548 | static inline SIMD_CFUNC simd_float4 __tg_log10(simd_float4 x) { | ||
| 4549 | return simd_make_float4(log10(x.x), log10(x.y), log10(x.z), log10(x.w)); | ||
| 4550 | } | ||
| 4551 | #endif | ||
| 4552 | |||
| 4553 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4554 | extern simd_float8 _simd_log10_f8(simd_float8 x); | ||
| 4555 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4556 | return _simd_log10_f8(x); | ||
| 4557 | } | ||
| 4558 | #else | ||
| 4559 | static inline SIMD_CFUNC simd_float8 __tg_log10(simd_float8 x) { | ||
| 4560 | return simd_make_float8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4561 | } | ||
| 4562 | #endif | ||
| 4563 | |||
| 4564 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4565 | extern simd_float16 _simd_log10_f16(simd_float16 x); | ||
| 4566 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4567 | return _simd_log10_f16(x); | ||
| 4568 | } | ||
| 4569 | #else | ||
| 4570 | static inline SIMD_CFUNC simd_float16 __tg_log10(simd_float16 x) { | ||
| 4571 | return simd_make_float16(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4572 | } | ||
| 4573 | #endif | ||
| 4574 | |||
| 4575 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4576 | extern simd_double2 _simd_log10_d2(simd_double2 x); | ||
| 4577 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4578 | return _simd_log10_d2(x); | ||
| 4579 | } | ||
| 4580 | #else | ||
| 4581 | static inline SIMD_CFUNC simd_double2 __tg_log10(simd_double2 x) { | ||
| 4582 | return simd_make_double2(log10(x.x), log10(x.y)); | ||
| 4583 | } | ||
| 4584 | #endif | ||
| 4585 | |||
| 4586 | static inline SIMD_CFUNC simd_double3 __tg_log10(simd_double3 x) { | ||
| 4587 | return simd_make_double3(__tg_log10(simd_make_double4(x))); | ||
| 4588 | } | ||
| 4589 | |||
| 4590 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4591 | extern simd_double4 _simd_log10_d4(simd_double4 x); | ||
| 4592 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4593 | return _simd_log10_d4(x); | ||
| 4594 | } | ||
| 4595 | #else | ||
| 4596 | static inline SIMD_CFUNC simd_double4 __tg_log10(simd_double4 x) { | ||
| 4597 | return simd_make_double4(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4598 | } | ||
| 4599 | #endif | ||
| 4600 | |||
| 4601 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4602 | extern simd_double8 _simd_log10_d8(simd_double8 x); | ||
| 4603 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4604 | return _simd_log10_d8(x); | ||
| 4605 | } | ||
| 4606 | #else | ||
| 4607 | static inline SIMD_CFUNC simd_double8 __tg_log10(simd_double8 x) { | ||
| 4608 | return simd_make_double8(__tg_log10(x.lo), __tg_log10(x.hi)); | ||
| 4609 | } | ||
| 4610 | #endif | ||
| 4611 | |||
| 4612 | #pragma mark - log1p implementation | ||
| 4613 | static inline SIMD_CFUNC simd_float2 __tg_log1p(simd_float2 x) { | ||
| 4614 | return simd_make_float2(__tg_log1p(simd_make_float4(x))); | ||
| 4615 | } | ||
| 4616 | |||
| 4617 | static inline SIMD_CFUNC simd_float3 __tg_log1p(simd_float3 x) { | ||
| 4618 | return simd_make_float3(__tg_log1p(simd_make_float4(x))); | ||
| 4619 | } | ||
| 4620 | |||
| 4621 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4622 | extern simd_float4 _simd_log1p_f4(simd_float4 x); | ||
| 4623 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4624 | return _simd_log1p_f4(x); | ||
| 4625 | } | ||
| 4626 | #else | ||
| 4627 | static inline SIMD_CFUNC simd_float4 __tg_log1p(simd_float4 x) { | ||
| 4628 | return simd_make_float4(log1p(x.x), log1p(x.y), log1p(x.z), log1p(x.w)); | ||
| 4629 | } | ||
| 4630 | #endif | ||
| 4631 | |||
| 4632 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4633 | extern simd_float8 _simd_log1p_f8(simd_float8 x); | ||
| 4634 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4635 | return _simd_log1p_f8(x); | ||
| 4636 | } | ||
| 4637 | #else | ||
| 4638 | static inline SIMD_CFUNC simd_float8 __tg_log1p(simd_float8 x) { | ||
| 4639 | return simd_make_float8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4640 | } | ||
| 4641 | #endif | ||
| 4642 | |||
| 4643 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4644 | extern simd_float16 _simd_log1p_f16(simd_float16 x); | ||
| 4645 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4646 | return _simd_log1p_f16(x); | ||
| 4647 | } | ||
| 4648 | #else | ||
| 4649 | static inline SIMD_CFUNC simd_float16 __tg_log1p(simd_float16 x) { | ||
| 4650 | return simd_make_float16(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4651 | } | ||
| 4652 | #endif | ||
| 4653 | |||
| 4654 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4655 | extern simd_double2 _simd_log1p_d2(simd_double2 x); | ||
| 4656 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4657 | return _simd_log1p_d2(x); | ||
| 4658 | } | ||
| 4659 | #else | ||
| 4660 | static inline SIMD_CFUNC simd_double2 __tg_log1p(simd_double2 x) { | ||
| 4661 | return simd_make_double2(log1p(x.x), log1p(x.y)); | ||
| 4662 | } | ||
| 4663 | #endif | ||
| 4664 | |||
| 4665 | static inline SIMD_CFUNC simd_double3 __tg_log1p(simd_double3 x) { | ||
| 4666 | return simd_make_double3(__tg_log1p(simd_make_double4(x))); | ||
| 4667 | } | ||
| 4668 | |||
| 4669 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4670 | extern simd_double4 _simd_log1p_d4(simd_double4 x); | ||
| 4671 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4672 | return _simd_log1p_d4(x); | ||
| 4673 | } | ||
| 4674 | #else | ||
| 4675 | static inline SIMD_CFUNC simd_double4 __tg_log1p(simd_double4 x) { | ||
| 4676 | return simd_make_double4(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4677 | } | ||
| 4678 | #endif | ||
| 4679 | |||
| 4680 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4681 | extern simd_double8 _simd_log1p_d8(simd_double8 x); | ||
| 4682 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4683 | return _simd_log1p_d8(x); | ||
| 4684 | } | ||
| 4685 | #else | ||
| 4686 | static inline SIMD_CFUNC simd_double8 __tg_log1p(simd_double8 x) { | ||
| 4687 | return simd_make_double8(__tg_log1p(x.lo), __tg_log1p(x.hi)); | ||
| 4688 | } | ||
| 4689 | #endif | ||
| 4690 | |||
| 4691 | #pragma mark - cbrt implementation | ||
| 4692 | static inline SIMD_CFUNC simd_float2 __tg_cbrt(simd_float2 x) { | ||
| 4693 | return simd_make_float2(__tg_cbrt(simd_make_float4(x))); | ||
| 4694 | } | ||
| 4695 | |||
| 4696 | static inline SIMD_CFUNC simd_float3 __tg_cbrt(simd_float3 x) { | ||
| 4697 | return simd_make_float3(__tg_cbrt(simd_make_float4(x))); | ||
| 4698 | } | ||
| 4699 | |||
| 4700 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4701 | extern simd_float4 _simd_cbrt_f4(simd_float4 x); | ||
| 4702 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4703 | return _simd_cbrt_f4(x); | ||
| 4704 | } | ||
| 4705 | #else | ||
| 4706 | static inline SIMD_CFUNC simd_float4 __tg_cbrt(simd_float4 x) { | ||
| 4707 | return simd_make_float4(cbrt(x.x), cbrt(x.y), cbrt(x.z), cbrt(x.w)); | ||
| 4708 | } | ||
| 4709 | #endif | ||
| 4710 | |||
| 4711 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4712 | extern simd_float8 _simd_cbrt_f8(simd_float8 x); | ||
| 4713 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4714 | return _simd_cbrt_f8(x); | ||
| 4715 | } | ||
| 4716 | #else | ||
| 4717 | static inline SIMD_CFUNC simd_float8 __tg_cbrt(simd_float8 x) { | ||
| 4718 | return simd_make_float8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4719 | } | ||
| 4720 | #endif | ||
| 4721 | |||
| 4722 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4723 | extern simd_float16 _simd_cbrt_f16(simd_float16 x); | ||
| 4724 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4725 | return _simd_cbrt_f16(x); | ||
| 4726 | } | ||
| 4727 | #else | ||
| 4728 | static inline SIMD_CFUNC simd_float16 __tg_cbrt(simd_float16 x) { | ||
| 4729 | return simd_make_float16(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4730 | } | ||
| 4731 | #endif | ||
| 4732 | |||
| 4733 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4734 | extern simd_double2 _simd_cbrt_d2(simd_double2 x); | ||
| 4735 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4736 | return _simd_cbrt_d2(x); | ||
| 4737 | } | ||
| 4738 | #else | ||
| 4739 | static inline SIMD_CFUNC simd_double2 __tg_cbrt(simd_double2 x) { | ||
| 4740 | return simd_make_double2(cbrt(x.x), cbrt(x.y)); | ||
| 4741 | } | ||
| 4742 | #endif | ||
| 4743 | |||
| 4744 | static inline SIMD_CFUNC simd_double3 __tg_cbrt(simd_double3 x) { | ||
| 4745 | return simd_make_double3(__tg_cbrt(simd_make_double4(x))); | ||
| 4746 | } | ||
| 4747 | |||
| 4748 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4749 | extern simd_double4 _simd_cbrt_d4(simd_double4 x); | ||
| 4750 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4751 | return _simd_cbrt_d4(x); | ||
| 4752 | } | ||
| 4753 | #else | ||
| 4754 | static inline SIMD_CFUNC simd_double4 __tg_cbrt(simd_double4 x) { | ||
| 4755 | return simd_make_double4(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4756 | } | ||
| 4757 | #endif | ||
| 4758 | |||
| 4759 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4760 | extern simd_double8 _simd_cbrt_d8(simd_double8 x); | ||
| 4761 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4762 | return _simd_cbrt_d8(x); | ||
| 4763 | } | ||
| 4764 | #else | ||
| 4765 | static inline SIMD_CFUNC simd_double8 __tg_cbrt(simd_double8 x) { | ||
| 4766 | return simd_make_double8(__tg_cbrt(x.lo), __tg_cbrt(x.hi)); | ||
| 4767 | } | ||
| 4768 | #endif | ||
| 4769 | |||
| 4770 | #pragma mark - erf implementation | ||
| 4771 | static inline SIMD_CFUNC simd_float2 __tg_erf(simd_float2 x) { | ||
| 4772 | return simd_make_float2(__tg_erf(simd_make_float4(x))); | ||
| 4773 | } | ||
| 4774 | |||
| 4775 | static inline SIMD_CFUNC simd_float3 __tg_erf(simd_float3 x) { | ||
| 4776 | return simd_make_float3(__tg_erf(simd_make_float4(x))); | ||
| 4777 | } | ||
| 4778 | |||
| 4779 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4780 | extern simd_float4 _simd_erf_f4(simd_float4 x); | ||
| 4781 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4782 | return _simd_erf_f4(x); | ||
| 4783 | } | ||
| 4784 | #else | ||
| 4785 | static inline SIMD_CFUNC simd_float4 __tg_erf(simd_float4 x) { | ||
| 4786 | return simd_make_float4(erf(x.x), erf(x.y), erf(x.z), erf(x.w)); | ||
| 4787 | } | ||
| 4788 | #endif | ||
| 4789 | |||
| 4790 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4791 | extern simd_float8 _simd_erf_f8(simd_float8 x); | ||
| 4792 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4793 | return _simd_erf_f8(x); | ||
| 4794 | } | ||
| 4795 | #else | ||
| 4796 | static inline SIMD_CFUNC simd_float8 __tg_erf(simd_float8 x) { | ||
| 4797 | return simd_make_float8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4798 | } | ||
| 4799 | #endif | ||
| 4800 | |||
| 4801 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4802 | extern simd_float16 _simd_erf_f16(simd_float16 x); | ||
| 4803 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4804 | return _simd_erf_f16(x); | ||
| 4805 | } | ||
| 4806 | #else | ||
| 4807 | static inline SIMD_CFUNC simd_float16 __tg_erf(simd_float16 x) { | ||
| 4808 | return simd_make_float16(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4809 | } | ||
| 4810 | #endif | ||
| 4811 | |||
| 4812 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4813 | extern simd_double2 _simd_erf_d2(simd_double2 x); | ||
| 4814 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4815 | return _simd_erf_d2(x); | ||
| 4816 | } | ||
| 4817 | #else | ||
| 4818 | static inline SIMD_CFUNC simd_double2 __tg_erf(simd_double2 x) { | ||
| 4819 | return simd_make_double2(erf(x.x), erf(x.y)); | ||
| 4820 | } | ||
| 4821 | #endif | ||
| 4822 | |||
| 4823 | static inline SIMD_CFUNC simd_double3 __tg_erf(simd_double3 x) { | ||
| 4824 | return simd_make_double3(__tg_erf(simd_make_double4(x))); | ||
| 4825 | } | ||
| 4826 | |||
| 4827 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4828 | extern simd_double4 _simd_erf_d4(simd_double4 x); | ||
| 4829 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4830 | return _simd_erf_d4(x); | ||
| 4831 | } | ||
| 4832 | #else | ||
| 4833 | static inline SIMD_CFUNC simd_double4 __tg_erf(simd_double4 x) { | ||
| 4834 | return simd_make_double4(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4835 | } | ||
| 4836 | #endif | ||
| 4837 | |||
| 4838 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4839 | extern simd_double8 _simd_erf_d8(simd_double8 x); | ||
| 4840 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4841 | return _simd_erf_d8(x); | ||
| 4842 | } | ||
| 4843 | #else | ||
| 4844 | static inline SIMD_CFUNC simd_double8 __tg_erf(simd_double8 x) { | ||
| 4845 | return simd_make_double8(__tg_erf(x.lo), __tg_erf(x.hi)); | ||
| 4846 | } | ||
| 4847 | #endif | ||
| 4848 | |||
| 4849 | #pragma mark - erfc implementation | ||
| 4850 | static inline SIMD_CFUNC simd_float2 __tg_erfc(simd_float2 x) { | ||
| 4851 | return simd_make_float2(__tg_erfc(simd_make_float4(x))); | ||
| 4852 | } | ||
| 4853 | |||
| 4854 | static inline SIMD_CFUNC simd_float3 __tg_erfc(simd_float3 x) { | ||
| 4855 | return simd_make_float3(__tg_erfc(simd_make_float4(x))); | ||
| 4856 | } | ||
| 4857 | |||
| 4858 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4859 | extern simd_float4 _simd_erfc_f4(simd_float4 x); | ||
| 4860 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4861 | return _simd_erfc_f4(x); | ||
| 4862 | } | ||
| 4863 | #else | ||
| 4864 | static inline SIMD_CFUNC simd_float4 __tg_erfc(simd_float4 x) { | ||
| 4865 | return simd_make_float4(erfc(x.x), erfc(x.y), erfc(x.z), erfc(x.w)); | ||
| 4866 | } | ||
| 4867 | #endif | ||
| 4868 | |||
| 4869 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4870 | extern simd_float8 _simd_erfc_f8(simd_float8 x); | ||
| 4871 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4872 | return _simd_erfc_f8(x); | ||
| 4873 | } | ||
| 4874 | #else | ||
| 4875 | static inline SIMD_CFUNC simd_float8 __tg_erfc(simd_float8 x) { | ||
| 4876 | return simd_make_float8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4877 | } | ||
| 4878 | #endif | ||
| 4879 | |||
| 4880 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4881 | extern simd_float16 _simd_erfc_f16(simd_float16 x); | ||
| 4882 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4883 | return _simd_erfc_f16(x); | ||
| 4884 | } | ||
| 4885 | #else | ||
| 4886 | static inline SIMD_CFUNC simd_float16 __tg_erfc(simd_float16 x) { | ||
| 4887 | return simd_make_float16(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4888 | } | ||
| 4889 | #endif | ||
| 4890 | |||
| 4891 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4892 | extern simd_double2 _simd_erfc_d2(simd_double2 x); | ||
| 4893 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4894 | return _simd_erfc_d2(x); | ||
| 4895 | } | ||
| 4896 | #else | ||
| 4897 | static inline SIMD_CFUNC simd_double2 __tg_erfc(simd_double2 x) { | ||
| 4898 | return simd_make_double2(erfc(x.x), erfc(x.y)); | ||
| 4899 | } | ||
| 4900 | #endif | ||
| 4901 | |||
| 4902 | static inline SIMD_CFUNC simd_double3 __tg_erfc(simd_double3 x) { | ||
| 4903 | return simd_make_double3(__tg_erfc(simd_make_double4(x))); | ||
| 4904 | } | ||
| 4905 | |||
| 4906 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4907 | extern simd_double4 _simd_erfc_d4(simd_double4 x); | ||
| 4908 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4909 | return _simd_erfc_d4(x); | ||
| 4910 | } | ||
| 4911 | #else | ||
| 4912 | static inline SIMD_CFUNC simd_double4 __tg_erfc(simd_double4 x) { | ||
| 4913 | return simd_make_double4(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4914 | } | ||
| 4915 | #endif | ||
| 4916 | |||
| 4917 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4918 | extern simd_double8 _simd_erfc_d8(simd_double8 x); | ||
| 4919 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4920 | return _simd_erfc_d8(x); | ||
| 4921 | } | ||
| 4922 | #else | ||
| 4923 | static inline SIMD_CFUNC simd_double8 __tg_erfc(simd_double8 x) { | ||
| 4924 | return simd_make_double8(__tg_erfc(x.lo), __tg_erfc(x.hi)); | ||
| 4925 | } | ||
| 4926 | #endif | ||
| 4927 | |||
| 4928 | #pragma mark - tgamma implementation | ||
| 4929 | static inline SIMD_CFUNC simd_float2 __tg_tgamma(simd_float2 x) { | ||
| 4930 | return simd_make_float2(__tg_tgamma(simd_make_float4(x))); | ||
| 4931 | } | ||
| 4932 | |||
| 4933 | static inline SIMD_CFUNC simd_float3 __tg_tgamma(simd_float3 x) { | ||
| 4934 | return simd_make_float3(__tg_tgamma(simd_make_float4(x))); | ||
| 4935 | } | ||
| 4936 | |||
| 4937 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4938 | extern simd_float4 _simd_tgamma_f4(simd_float4 x); | ||
| 4939 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4940 | return _simd_tgamma_f4(x); | ||
| 4941 | } | ||
| 4942 | #else | ||
| 4943 | static inline SIMD_CFUNC simd_float4 __tg_tgamma(simd_float4 x) { | ||
| 4944 | return simd_make_float4(tgamma(x.x), tgamma(x.y), tgamma(x.z), tgamma(x.w)); | ||
| 4945 | } | ||
| 4946 | #endif | ||
| 4947 | |||
| 4948 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4949 | extern simd_float8 _simd_tgamma_f8(simd_float8 x); | ||
| 4950 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4951 | return _simd_tgamma_f8(x); | ||
| 4952 | } | ||
| 4953 | #else | ||
| 4954 | static inline SIMD_CFUNC simd_float8 __tg_tgamma(simd_float8 x) { | ||
| 4955 | return simd_make_float8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4956 | } | ||
| 4957 | #endif | ||
| 4958 | |||
| 4959 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4960 | extern simd_float16 _simd_tgamma_f16(simd_float16 x); | ||
| 4961 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4962 | return _simd_tgamma_f16(x); | ||
| 4963 | } | ||
| 4964 | #else | ||
| 4965 | static inline SIMD_CFUNC simd_float16 __tg_tgamma(simd_float16 x) { | ||
| 4966 | return simd_make_float16(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4967 | } | ||
| 4968 | #endif | ||
| 4969 | |||
| 4970 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 4971 | extern simd_double2 _simd_tgamma_d2(simd_double2 x); | ||
| 4972 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4973 | return _simd_tgamma_d2(x); | ||
| 4974 | } | ||
| 4975 | #else | ||
| 4976 | static inline SIMD_CFUNC simd_double2 __tg_tgamma(simd_double2 x) { | ||
| 4977 | return simd_make_double2(tgamma(x.x), tgamma(x.y)); | ||
| 4978 | } | ||
| 4979 | #endif | ||
| 4980 | |||
| 4981 | static inline SIMD_CFUNC simd_double3 __tg_tgamma(simd_double3 x) { | ||
| 4982 | return simd_make_double3(__tg_tgamma(simd_make_double4(x))); | ||
| 4983 | } | ||
| 4984 | |||
| 4985 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 4986 | extern simd_double4 _simd_tgamma_d4(simd_double4 x); | ||
| 4987 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4988 | return _simd_tgamma_d4(x); | ||
| 4989 | } | ||
| 4990 | #else | ||
| 4991 | static inline SIMD_CFUNC simd_double4 __tg_tgamma(simd_double4 x) { | ||
| 4992 | return simd_make_double4(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 4993 | } | ||
| 4994 | #endif | ||
| 4995 | |||
| 4996 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 4997 | extern simd_double8 _simd_tgamma_d8(simd_double8 x); | ||
| 4998 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 4999 | return _simd_tgamma_d8(x); | ||
| 5000 | } | ||
| 5001 | #else | ||
| 5002 | static inline SIMD_CFUNC simd_double8 __tg_tgamma(simd_double8 x) { | ||
| 5003 | return simd_make_double8(__tg_tgamma(x.lo), __tg_tgamma(x.hi)); | ||
| 5004 | } | ||
| 5005 | #endif | ||
| 5006 | |||
| 5007 | #pragma mark - round implementation | ||
| 5008 | static inline SIMD_CFUNC simd_float2 __tg_round(simd_float2 x) { | ||
| 5009 | return simd_make_float2(__tg_round(simd_make_float4(x))); | ||
| 5010 | } | ||
| 5011 | |||
| 5012 | static inline SIMD_CFUNC simd_float3 __tg_round(simd_float3 x) { | ||
| 5013 | return simd_make_float3(__tg_round(simd_make_float4(x))); | ||
| 5014 | } | ||
| 5015 | |||
| 5016 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5017 | extern simd_float4 _simd_round_f4(simd_float4 x); | ||
| 5018 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 5019 | #if defined __arm64__ | ||
| 5020 | return vrndaq_f32(x); | ||
| 5021 | #else | ||
| 5022 | return _simd_round_f4(x); | ||
| 5023 | #endif | ||
| 5024 | } | ||
| 5025 | #else | ||
| 5026 | static inline SIMD_CFUNC simd_float4 __tg_round(simd_float4 x) { | ||
| 5027 | return simd_make_float4(round(x.x), round(x.y), round(x.z), round(x.w)); | ||
| 5028 | } | ||
| 5029 | #endif | ||
| 5030 | |||
| 5031 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5032 | extern simd_float8 _simd_round_f8(simd_float8 x); | ||
| 5033 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 5034 | return _simd_round_f8(x); | ||
| 5035 | } | ||
| 5036 | #else | ||
| 5037 | static inline SIMD_CFUNC simd_float8 __tg_round(simd_float8 x) { | ||
| 5038 | return simd_make_float8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5039 | } | ||
| 5040 | #endif | ||
| 5041 | |||
| 5042 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5043 | extern simd_float16 _simd_round_f16(simd_float16 x); | ||
| 5044 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 5045 | return _simd_round_f16(x); | ||
| 5046 | } | ||
| 5047 | #else | ||
| 5048 | static inline SIMD_CFUNC simd_float16 __tg_round(simd_float16 x) { | ||
| 5049 | return simd_make_float16(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5050 | } | ||
| 5051 | #endif | ||
| 5052 | |||
| 5053 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5054 | extern simd_double2 _simd_round_d2(simd_double2 x); | ||
| 5055 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 5056 | #if defined __arm64__ | ||
| 5057 | return vrndaq_f64(x); | ||
| 5058 | #else | ||
| 5059 | return _simd_round_d2(x); | ||
| 5060 | #endif | ||
| 5061 | } | ||
| 5062 | #else | ||
| 5063 | static inline SIMD_CFUNC simd_double2 __tg_round(simd_double2 x) { | ||
| 5064 | return simd_make_double2(round(x.x), round(x.y)); | ||
| 5065 | } | ||
| 5066 | #endif | ||
| 5067 | |||
| 5068 | static inline SIMD_CFUNC simd_double3 __tg_round(simd_double3 x) { | ||
| 5069 | return simd_make_double3(__tg_round(simd_make_double4(x))); | ||
| 5070 | } | ||
| 5071 | |||
| 5072 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5073 | extern simd_double4 _simd_round_d4(simd_double4 x); | ||
| 5074 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 5075 | return _simd_round_d4(x); | ||
| 5076 | } | ||
| 5077 | #else | ||
| 5078 | static inline SIMD_CFUNC simd_double4 __tg_round(simd_double4 x) { | ||
| 5079 | return simd_make_double4(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5080 | } | ||
| 5081 | #endif | ||
| 5082 | |||
| 5083 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5084 | extern simd_double8 _simd_round_d8(simd_double8 x); | ||
| 5085 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 5086 | return _simd_round_d8(x); | ||
| 5087 | } | ||
| 5088 | #else | ||
| 5089 | static inline SIMD_CFUNC simd_double8 __tg_round(simd_double8 x) { | ||
| 5090 | return simd_make_double8(__tg_round(x.lo), __tg_round(x.hi)); | ||
| 5091 | } | ||
| 5092 | #endif | ||
| 5093 | |||
| 5094 | #pragma mark - atan2 implementation | ||
| 5095 | static inline SIMD_CFUNC simd_float2 __tg_atan2(simd_float2 y, simd_float2 x) { | ||
| 5096 | return simd_make_float2(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 5097 | } | ||
| 5098 | |||
| 5099 | static inline SIMD_CFUNC simd_float3 __tg_atan2(simd_float3 y, simd_float3 x) { | ||
| 5100 | return simd_make_float3(__tg_atan2(simd_make_float4(y), simd_make_float4(x))); | ||
| 5101 | } | ||
| 5102 | |||
| 5103 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5104 | extern simd_float4 _simd_atan2_f4(simd_float4 y, simd_float4 x); | ||
| 5105 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 5106 | return _simd_atan2_f4(y, x); | ||
| 5107 | } | ||
| 5108 | #else | ||
| 5109 | static inline SIMD_CFUNC simd_float4 __tg_atan2(simd_float4 y, simd_float4 x) { | ||
| 5110 | return simd_make_float4(atan2(y.x, x.x), atan2(y.y, x.y), atan2(y.z, x.z), atan2(y.w, x.w)); | ||
| 5111 | } | ||
| 5112 | #endif | ||
| 5113 | |||
| 5114 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5115 | extern simd_float8 _simd_atan2_f8(simd_float8 y, simd_float8 x); | ||
| 5116 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 5117 | return _simd_atan2_f8(y, x); | ||
| 5118 | } | ||
| 5119 | #else | ||
| 5120 | static inline SIMD_CFUNC simd_float8 __tg_atan2(simd_float8 y, simd_float8 x) { | ||
| 5121 | return simd_make_float8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5122 | } | ||
| 5123 | #endif | ||
| 5124 | |||
| 5125 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5126 | extern simd_float16 _simd_atan2_f16(simd_float16 y, simd_float16 x); | ||
| 5127 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 5128 | return _simd_atan2_f16(y, x); | ||
| 5129 | } | ||
| 5130 | #else | ||
| 5131 | static inline SIMD_CFUNC simd_float16 __tg_atan2(simd_float16 y, simd_float16 x) { | ||
| 5132 | return simd_make_float16(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5133 | } | ||
| 5134 | #endif | ||
| 5135 | |||
| 5136 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5137 | extern simd_double2 _simd_atan2_d2(simd_double2 y, simd_double2 x); | ||
| 5138 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 5139 | return _simd_atan2_d2(y, x); | ||
| 5140 | } | ||
| 5141 | #else | ||
| 5142 | static inline SIMD_CFUNC simd_double2 __tg_atan2(simd_double2 y, simd_double2 x) { | ||
| 5143 | return simd_make_double2(atan2(y.x, x.x), atan2(y.y, x.y)); | ||
| 5144 | } | ||
| 5145 | #endif | ||
| 5146 | |||
| 5147 | static inline SIMD_CFUNC simd_double3 __tg_atan2(simd_double3 y, simd_double3 x) { | ||
| 5148 | return simd_make_double3(__tg_atan2(simd_make_double4(y), simd_make_double4(x))); | ||
| 5149 | } | ||
| 5150 | |||
| 5151 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5152 | extern simd_double4 _simd_atan2_d4(simd_double4 y, simd_double4 x); | ||
| 5153 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 5154 | return _simd_atan2_d4(y, x); | ||
| 5155 | } | ||
| 5156 | #else | ||
| 5157 | static inline SIMD_CFUNC simd_double4 __tg_atan2(simd_double4 y, simd_double4 x) { | ||
| 5158 | return simd_make_double4(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5159 | } | ||
| 5160 | #endif | ||
| 5161 | |||
| 5162 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5163 | extern simd_double8 _simd_atan2_d8(simd_double8 y, simd_double8 x); | ||
| 5164 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 5165 | return _simd_atan2_d8(y, x); | ||
| 5166 | } | ||
| 5167 | #else | ||
| 5168 | static inline SIMD_CFUNC simd_double8 __tg_atan2(simd_double8 y, simd_double8 x) { | ||
| 5169 | return simd_make_double8(__tg_atan2(y.lo, x.lo), __tg_atan2(y.hi, x.hi)); | ||
| 5170 | } | ||
| 5171 | #endif | ||
| 5172 | |||
| 5173 | #pragma mark - hypot implementation | ||
| 5174 | static inline SIMD_CFUNC simd_float2 __tg_hypot(simd_float2 x, simd_float2 y) { | ||
| 5175 | return simd_make_float2(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 5176 | } | ||
| 5177 | |||
| 5178 | static inline SIMD_CFUNC simd_float3 __tg_hypot(simd_float3 x, simd_float3 y) { | ||
| 5179 | return simd_make_float3(__tg_hypot(simd_make_float4(x), simd_make_float4(y))); | ||
| 5180 | } | ||
| 5181 | |||
| 5182 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5183 | extern simd_float4 _simd_hypot_f4(simd_float4 x, simd_float4 y); | ||
| 5184 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 5185 | return _simd_hypot_f4(x, y); | ||
| 5186 | } | ||
| 5187 | #else | ||
| 5188 | static inline SIMD_CFUNC simd_float4 __tg_hypot(simd_float4 x, simd_float4 y) { | ||
| 5189 | return simd_make_float4(hypot(x.x, y.x), hypot(x.y, y.y), hypot(x.z, y.z), hypot(x.w, y.w)); | ||
| 5190 | } | ||
| 5191 | #endif | ||
| 5192 | |||
| 5193 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5194 | extern simd_float8 _simd_hypot_f8(simd_float8 x, simd_float8 y); | ||
| 5195 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 5196 | return _simd_hypot_f8(x, y); | ||
| 5197 | } | ||
| 5198 | #else | ||
| 5199 | static inline SIMD_CFUNC simd_float8 __tg_hypot(simd_float8 x, simd_float8 y) { | ||
| 5200 | return simd_make_float8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5201 | } | ||
| 5202 | #endif | ||
| 5203 | |||
| 5204 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5205 | extern simd_float16 _simd_hypot_f16(simd_float16 x, simd_float16 y); | ||
| 5206 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 5207 | return _simd_hypot_f16(x, y); | ||
| 5208 | } | ||
| 5209 | #else | ||
| 5210 | static inline SIMD_CFUNC simd_float16 __tg_hypot(simd_float16 x, simd_float16 y) { | ||
| 5211 | return simd_make_float16(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5212 | } | ||
| 5213 | #endif | ||
| 5214 | |||
| 5215 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5216 | extern simd_double2 _simd_hypot_d2(simd_double2 x, simd_double2 y); | ||
| 5217 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 5218 | return _simd_hypot_d2(x, y); | ||
| 5219 | } | ||
| 5220 | #else | ||
| 5221 | static inline SIMD_CFUNC simd_double2 __tg_hypot(simd_double2 x, simd_double2 y) { | ||
| 5222 | return simd_make_double2(hypot(x.x, y.x), hypot(x.y, y.y)); | ||
| 5223 | } | ||
| 5224 | #endif | ||
| 5225 | |||
| 5226 | static inline SIMD_CFUNC simd_double3 __tg_hypot(simd_double3 x, simd_double3 y) { | ||
| 5227 | return simd_make_double3(__tg_hypot(simd_make_double4(x), simd_make_double4(y))); | ||
| 5228 | } | ||
| 5229 | |||
| 5230 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5231 | extern simd_double4 _simd_hypot_d4(simd_double4 x, simd_double4 y); | ||
| 5232 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 5233 | return _simd_hypot_d4(x, y); | ||
| 5234 | } | ||
| 5235 | #else | ||
| 5236 | static inline SIMD_CFUNC simd_double4 __tg_hypot(simd_double4 x, simd_double4 y) { | ||
| 5237 | return simd_make_double4(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5238 | } | ||
| 5239 | #endif | ||
| 5240 | |||
| 5241 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5242 | extern simd_double8 _simd_hypot_d8(simd_double8 x, simd_double8 y); | ||
| 5243 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 5244 | return _simd_hypot_d8(x, y); | ||
| 5245 | } | ||
| 5246 | #else | ||
| 5247 | static inline SIMD_CFUNC simd_double8 __tg_hypot(simd_double8 x, simd_double8 y) { | ||
| 5248 | return simd_make_double8(__tg_hypot(x.lo, y.lo), __tg_hypot(x.hi, y.hi)); | ||
| 5249 | } | ||
| 5250 | #endif | ||
| 5251 | |||
| 5252 | #pragma mark - pow implementation | ||
| 5253 | static inline SIMD_CFUNC simd_float2 __tg_pow(simd_float2 x, simd_float2 y) { | ||
| 5254 | return simd_make_float2(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 5255 | } | ||
| 5256 | |||
| 5257 | static inline SIMD_CFUNC simd_float3 __tg_pow(simd_float3 x, simd_float3 y) { | ||
| 5258 | return simd_make_float3(__tg_pow(simd_make_float4(x), simd_make_float4(y))); | ||
| 5259 | } | ||
| 5260 | |||
| 5261 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5262 | extern simd_float4 _simd_pow_f4(simd_float4 x, simd_float4 y); | ||
| 5263 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 5264 | return _simd_pow_f4(x, y); | ||
| 5265 | } | ||
| 5266 | #else | ||
| 5267 | static inline SIMD_CFUNC simd_float4 __tg_pow(simd_float4 x, simd_float4 y) { | ||
| 5268 | return simd_make_float4(pow(x.x, y.x), pow(x.y, y.y), pow(x.z, y.z), pow(x.w, y.w)); | ||
| 5269 | } | ||
| 5270 | #endif | ||
| 5271 | |||
| 5272 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5273 | extern simd_float8 _simd_pow_f8(simd_float8 x, simd_float8 y); | ||
| 5274 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 5275 | return _simd_pow_f8(x, y); | ||
| 5276 | } | ||
| 5277 | #else | ||
| 5278 | static inline SIMD_CFUNC simd_float8 __tg_pow(simd_float8 x, simd_float8 y) { | ||
| 5279 | return simd_make_float8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5280 | } | ||
| 5281 | #endif | ||
| 5282 | |||
| 5283 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5284 | extern simd_float16 _simd_pow_f16(simd_float16 x, simd_float16 y); | ||
| 5285 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 5286 | return _simd_pow_f16(x, y); | ||
| 5287 | } | ||
| 5288 | #else | ||
| 5289 | static inline SIMD_CFUNC simd_float16 __tg_pow(simd_float16 x, simd_float16 y) { | ||
| 5290 | return simd_make_float16(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5291 | } | ||
| 5292 | #endif | ||
| 5293 | |||
| 5294 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5295 | extern simd_double2 _simd_pow_d2(simd_double2 x, simd_double2 y); | ||
| 5296 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 5297 | return _simd_pow_d2(x, y); | ||
| 5298 | } | ||
| 5299 | #else | ||
| 5300 | static inline SIMD_CFUNC simd_double2 __tg_pow(simd_double2 x, simd_double2 y) { | ||
| 5301 | return simd_make_double2(pow(x.x, y.x), pow(x.y, y.y)); | ||
| 5302 | } | ||
| 5303 | #endif | ||
| 5304 | |||
| 5305 | static inline SIMD_CFUNC simd_double3 __tg_pow(simd_double3 x, simd_double3 y) { | ||
| 5306 | return simd_make_double3(__tg_pow(simd_make_double4(x), simd_make_double4(y))); | ||
| 5307 | } | ||
| 5308 | |||
| 5309 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5310 | extern simd_double4 _simd_pow_d4(simd_double4 x, simd_double4 y); | ||
| 5311 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 5312 | return _simd_pow_d4(x, y); | ||
| 5313 | } | ||
| 5314 | #else | ||
| 5315 | static inline SIMD_CFUNC simd_double4 __tg_pow(simd_double4 x, simd_double4 y) { | ||
| 5316 | return simd_make_double4(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5317 | } | ||
| 5318 | #endif | ||
| 5319 | |||
| 5320 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5321 | extern simd_double8 _simd_pow_d8(simd_double8 x, simd_double8 y); | ||
| 5322 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 5323 | return _simd_pow_d8(x, y); | ||
| 5324 | } | ||
| 5325 | #else | ||
| 5326 | static inline SIMD_CFUNC simd_double8 __tg_pow(simd_double8 x, simd_double8 y) { | ||
| 5327 | return simd_make_double8(__tg_pow(x.lo, y.lo), __tg_pow(x.hi, y.hi)); | ||
| 5328 | } | ||
| 5329 | #endif | ||
| 5330 | |||
| 5331 | #pragma mark - fmod implementation | ||
| 5332 | static inline SIMD_CFUNC simd_float2 __tg_fmod(simd_float2 x, simd_float2 y) { | ||
| 5333 | return simd_make_float2(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5334 | } | ||
| 5335 | |||
| 5336 | static inline SIMD_CFUNC simd_float3 __tg_fmod(simd_float3 x, simd_float3 y) { | ||
| 5337 | return simd_make_float3(__tg_fmod(simd_make_float4(x), simd_make_float4(y))); | ||
| 5338 | } | ||
| 5339 | |||
| 5340 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5341 | extern simd_float4 _simd_fmod_f4(simd_float4 x, simd_float4 y); | ||
| 5342 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5343 | return _simd_fmod_f4(x, y); | ||
| 5344 | } | ||
| 5345 | #else | ||
| 5346 | static inline SIMD_CFUNC simd_float4 __tg_fmod(simd_float4 x, simd_float4 y) { | ||
| 5347 | return simd_make_float4(fmod(x.x, y.x), fmod(x.y, y.y), fmod(x.z, y.z), fmod(x.w, y.w)); | ||
| 5348 | } | ||
| 5349 | #endif | ||
| 5350 | |||
| 5351 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5352 | extern simd_float8 _simd_fmod_f8(simd_float8 x, simd_float8 y); | ||
| 5353 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5354 | return _simd_fmod_f8(x, y); | ||
| 5355 | } | ||
| 5356 | #else | ||
| 5357 | static inline SIMD_CFUNC simd_float8 __tg_fmod(simd_float8 x, simd_float8 y) { | ||
| 5358 | return simd_make_float8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5359 | } | ||
| 5360 | #endif | ||
| 5361 | |||
| 5362 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5363 | extern simd_float16 _simd_fmod_f16(simd_float16 x, simd_float16 y); | ||
| 5364 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5365 | return _simd_fmod_f16(x, y); | ||
| 5366 | } | ||
| 5367 | #else | ||
| 5368 | static inline SIMD_CFUNC simd_float16 __tg_fmod(simd_float16 x, simd_float16 y) { | ||
| 5369 | return simd_make_float16(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5370 | } | ||
| 5371 | #endif | ||
| 5372 | |||
| 5373 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5374 | extern simd_double2 _simd_fmod_d2(simd_double2 x, simd_double2 y); | ||
| 5375 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5376 | return _simd_fmod_d2(x, y); | ||
| 5377 | } | ||
| 5378 | #else | ||
| 5379 | static inline SIMD_CFUNC simd_double2 __tg_fmod(simd_double2 x, simd_double2 y) { | ||
| 5380 | return simd_make_double2(fmod(x.x, y.x), fmod(x.y, y.y)); | ||
| 5381 | } | ||
| 5382 | #endif | ||
| 5383 | |||
| 5384 | static inline SIMD_CFUNC simd_double3 __tg_fmod(simd_double3 x, simd_double3 y) { | ||
| 5385 | return simd_make_double3(__tg_fmod(simd_make_double4(x), simd_make_double4(y))); | ||
| 5386 | } | ||
| 5387 | |||
| 5388 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5389 | extern simd_double4 _simd_fmod_d4(simd_double4 x, simd_double4 y); | ||
| 5390 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5391 | return _simd_fmod_d4(x, y); | ||
| 5392 | } | ||
| 5393 | #else | ||
| 5394 | static inline SIMD_CFUNC simd_double4 __tg_fmod(simd_double4 x, simd_double4 y) { | ||
| 5395 | return simd_make_double4(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5396 | } | ||
| 5397 | #endif | ||
| 5398 | |||
| 5399 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5400 | extern simd_double8 _simd_fmod_d8(simd_double8 x, simd_double8 y); | ||
| 5401 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5402 | return _simd_fmod_d8(x, y); | ||
| 5403 | } | ||
| 5404 | #else | ||
| 5405 | static inline SIMD_CFUNC simd_double8 __tg_fmod(simd_double8 x, simd_double8 y) { | ||
| 5406 | return simd_make_double8(__tg_fmod(x.lo, y.lo), __tg_fmod(x.hi, y.hi)); | ||
| 5407 | } | ||
| 5408 | #endif | ||
| 5409 | |||
| 5410 | #pragma mark - remainder implementation | ||
| 5411 | static inline SIMD_CFUNC simd_float2 __tg_remainder(simd_float2 x, simd_float2 y) { | ||
| 5412 | return simd_make_float2(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5413 | } | ||
| 5414 | |||
| 5415 | static inline SIMD_CFUNC simd_float3 __tg_remainder(simd_float3 x, simd_float3 y) { | ||
| 5416 | return simd_make_float3(__tg_remainder(simd_make_float4(x), simd_make_float4(y))); | ||
| 5417 | } | ||
| 5418 | |||
| 5419 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5420 | extern simd_float4 _simd_remainder_f4(simd_float4 x, simd_float4 y); | ||
| 5421 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5422 | return _simd_remainder_f4(x, y); | ||
| 5423 | } | ||
| 5424 | #else | ||
| 5425 | static inline SIMD_CFUNC simd_float4 __tg_remainder(simd_float4 x, simd_float4 y) { | ||
| 5426 | return simd_make_float4(remainder(x.x, y.x), remainder(x.y, y.y), remainder(x.z, y.z), remainder(x.w, y.w)); | ||
| 5427 | } | ||
| 5428 | #endif | ||
| 5429 | |||
| 5430 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5431 | extern simd_float8 _simd_remainder_f8(simd_float8 x, simd_float8 y); | ||
| 5432 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5433 | return _simd_remainder_f8(x, y); | ||
| 5434 | } | ||
| 5435 | #else | ||
| 5436 | static inline SIMD_CFUNC simd_float8 __tg_remainder(simd_float8 x, simd_float8 y) { | ||
| 5437 | return simd_make_float8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5438 | } | ||
| 5439 | #endif | ||
| 5440 | |||
| 5441 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5442 | extern simd_float16 _simd_remainder_f16(simd_float16 x, simd_float16 y); | ||
| 5443 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5444 | return _simd_remainder_f16(x, y); | ||
| 5445 | } | ||
| 5446 | #else | ||
| 5447 | static inline SIMD_CFUNC simd_float16 __tg_remainder(simd_float16 x, simd_float16 y) { | ||
| 5448 | return simd_make_float16(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5449 | } | ||
| 5450 | #endif | ||
| 5451 | |||
| 5452 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5453 | extern simd_double2 _simd_remainder_d2(simd_double2 x, simd_double2 y); | ||
| 5454 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5455 | return _simd_remainder_d2(x, y); | ||
| 5456 | } | ||
| 5457 | #else | ||
| 5458 | static inline SIMD_CFUNC simd_double2 __tg_remainder(simd_double2 x, simd_double2 y) { | ||
| 5459 | return simd_make_double2(remainder(x.x, y.x), remainder(x.y, y.y)); | ||
| 5460 | } | ||
| 5461 | #endif | ||
| 5462 | |||
| 5463 | static inline SIMD_CFUNC simd_double3 __tg_remainder(simd_double3 x, simd_double3 y) { | ||
| 5464 | return simd_make_double3(__tg_remainder(simd_make_double4(x), simd_make_double4(y))); | ||
| 5465 | } | ||
| 5466 | |||
| 5467 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5468 | extern simd_double4 _simd_remainder_d4(simd_double4 x, simd_double4 y); | ||
| 5469 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5470 | return _simd_remainder_d4(x, y); | ||
| 5471 | } | ||
| 5472 | #else | ||
| 5473 | static inline SIMD_CFUNC simd_double4 __tg_remainder(simd_double4 x, simd_double4 y) { | ||
| 5474 | return simd_make_double4(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5475 | } | ||
| 5476 | #endif | ||
| 5477 | |||
| 5478 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5479 | extern simd_double8 _simd_remainder_d8(simd_double8 x, simd_double8 y); | ||
| 5480 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5481 | return _simd_remainder_d8(x, y); | ||
| 5482 | } | ||
| 5483 | #else | ||
| 5484 | static inline SIMD_CFUNC simd_double8 __tg_remainder(simd_double8 x, simd_double8 y) { | ||
| 5485 | return simd_make_double8(__tg_remainder(x.lo, y.lo), __tg_remainder(x.hi, y.hi)); | ||
| 5486 | } | ||
| 5487 | #endif | ||
| 5488 | |||
| 5489 | #pragma mark - nextafter implementation | ||
| 5490 | static inline SIMD_CFUNC simd_float2 __tg_nextafter(simd_float2 x, simd_float2 y) { | ||
| 5491 | return simd_make_float2(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5492 | } | ||
| 5493 | |||
| 5494 | static inline SIMD_CFUNC simd_float3 __tg_nextafter(simd_float3 x, simd_float3 y) { | ||
| 5495 | return simd_make_float3(__tg_nextafter(simd_make_float4(x), simd_make_float4(y))); | ||
| 5496 | } | ||
| 5497 | |||
| 5498 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5499 | extern simd_float4 _simd_nextafter_f4(simd_float4 x, simd_float4 y); | ||
| 5500 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5501 | return _simd_nextafter_f4(x, y); | ||
| 5502 | } | ||
| 5503 | #else | ||
| 5504 | static inline SIMD_CFUNC simd_float4 __tg_nextafter(simd_float4 x, simd_float4 y) { | ||
| 5505 | return simd_make_float4(nextafter(x.x, y.x), nextafter(x.y, y.y), nextafter(x.z, y.z), nextafter(x.w, y.w)); | ||
| 5506 | } | ||
| 5507 | #endif | ||
| 5508 | |||
| 5509 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5510 | extern simd_float8 _simd_nextafter_f8(simd_float8 x, simd_float8 y); | ||
| 5511 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5512 | return _simd_nextafter_f8(x, y); | ||
| 5513 | } | ||
| 5514 | #else | ||
| 5515 | static inline SIMD_CFUNC simd_float8 __tg_nextafter(simd_float8 x, simd_float8 y) { | ||
| 5516 | return simd_make_float8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5517 | } | ||
| 5518 | #endif | ||
| 5519 | |||
| 5520 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5521 | extern simd_float16 _simd_nextafter_f16(simd_float16 x, simd_float16 y); | ||
| 5522 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5523 | return _simd_nextafter_f16(x, y); | ||
| 5524 | } | ||
| 5525 | #else | ||
| 5526 | static inline SIMD_CFUNC simd_float16 __tg_nextafter(simd_float16 x, simd_float16 y) { | ||
| 5527 | return simd_make_float16(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5528 | } | ||
| 5529 | #endif | ||
| 5530 | |||
| 5531 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5532 | extern simd_double2 _simd_nextafter_d2(simd_double2 x, simd_double2 y); | ||
| 5533 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5534 | return _simd_nextafter_d2(x, y); | ||
| 5535 | } | ||
| 5536 | #else | ||
| 5537 | static inline SIMD_CFUNC simd_double2 __tg_nextafter(simd_double2 x, simd_double2 y) { | ||
| 5538 | return simd_make_double2(nextafter(x.x, y.x), nextafter(x.y, y.y)); | ||
| 5539 | } | ||
| 5540 | #endif | ||
| 5541 | |||
| 5542 | static inline SIMD_CFUNC simd_double3 __tg_nextafter(simd_double3 x, simd_double3 y) { | ||
| 5543 | return simd_make_double3(__tg_nextafter(simd_make_double4(x), simd_make_double4(y))); | ||
| 5544 | } | ||
| 5545 | |||
| 5546 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX2__ | ||
| 5547 | extern simd_double4 _simd_nextafter_d4(simd_double4 x, simd_double4 y); | ||
| 5548 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5549 | return _simd_nextafter_d4(x, y); | ||
| 5550 | } | ||
| 5551 | #else | ||
| 5552 | static inline SIMD_CFUNC simd_double4 __tg_nextafter(simd_double4 x, simd_double4 y) { | ||
| 5553 | return simd_make_double4(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5554 | } | ||
| 5555 | #endif | ||
| 5556 | |||
| 5557 | #if SIMD_LIBRARY_VERSION >= 3 && defined __x86_64__ && defined __AVX512F__ | ||
| 5558 | extern simd_double8 _simd_nextafter_d8(simd_double8 x, simd_double8 y); | ||
| 5559 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5560 | return _simd_nextafter_d8(x, y); | ||
| 5561 | } | ||
| 5562 | #else | ||
| 5563 | static inline SIMD_CFUNC simd_double8 __tg_nextafter(simd_double8 x, simd_double8 y) { | ||
| 5564 | return simd_make_double8(__tg_nextafter(x.lo, y.lo), __tg_nextafter(x.hi, y.hi)); | ||
| 5565 | } | ||
| 5566 | #endif | ||
| 5567 | |||
| 5568 | #pragma mark - lgamma implementation | ||
| 5569 | static inline SIMD_CFUNC simd_float2 __tg_lgamma(simd_float2 x) { | ||
| 5570 | return simd_make_float2(__tg_lgamma(simd_make_float4(x))); | ||
| 5571 | } | ||
| 5572 | |||
| 5573 | static inline SIMD_CFUNC simd_float3 __tg_lgamma(simd_float3 x) { | ||
| 5574 | return simd_make_float3(__tg_lgamma(simd_make_float4(x))); | ||
| 5575 | } | ||
| 5576 | |||
| 5577 | #if SIMD_LIBRARY_VERSION >= 4 | ||
| 5578 | extern simd_float4 _simd_lgamma_f4(simd_float4 x); | ||
| 5579 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x) { | ||
| 5580 | return _simd_lgamma_f4(x); | ||
| 5581 | } | ||
| 5582 | #else | ||
| 5583 | static inline SIMD_CFUNC simd_float4 __tg_lgamma(simd_float4 x) { | ||
| 5584 | return simd_make_float4(lgamma(x.x), lgamma(x.y), lgamma(x.z), lgamma(x.w)); | ||
| 5585 | } | ||
| 5586 | #endif | ||
| 5587 | |||
| 5588 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX2__ | ||
| 5589 | extern simd_float8 _simd_lgamma_f8(simd_float8 x); | ||
| 5590 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x) { | ||
| 5591 | return _simd_lgamma_f8(x); | ||
| 5592 | } | ||
| 5593 | #else | ||
| 5594 | static inline SIMD_CFUNC simd_float8 __tg_lgamma(simd_float8 x) { | ||
| 5595 | return simd_make_float8(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5596 | } | ||
| 5597 | #endif | ||
| 5598 | |||
| 5599 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX512F__ | ||
| 5600 | extern simd_float16 _simd_lgamma_f16(simd_float16 x); | ||
| 5601 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x) { | ||
| 5602 | return _simd_lgamma_f16(x); | ||
| 5603 | } | ||
| 5604 | #else | ||
| 5605 | static inline SIMD_CFUNC simd_float16 __tg_lgamma(simd_float16 x) { | ||
| 5606 | return simd_make_float16(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5607 | } | ||
| 5608 | #endif | ||
| 5609 | |||
| 5610 | #if SIMD_LIBRARY_VERSION >= 4 | ||
| 5611 | extern simd_double2 _simd_lgamma_d2(simd_double2 x); | ||
| 5612 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x) { | ||
| 5613 | return _simd_lgamma_d2(x); | ||
| 5614 | } | ||
| 5615 | #else | ||
| 5616 | static inline SIMD_CFUNC simd_double2 __tg_lgamma(simd_double2 x) { | ||
| 5617 | return simd_make_double2(lgamma(x.x), lgamma(x.y)); | ||
| 5618 | } | ||
| 5619 | #endif | ||
| 5620 | |||
| 5621 | static inline SIMD_CFUNC simd_double3 __tg_lgamma(simd_double3 x) { | ||
| 5622 | return simd_make_double3(__tg_lgamma(simd_make_double4(x))); | ||
| 5623 | } | ||
| 5624 | |||
| 5625 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX2__ | ||
| 5626 | extern simd_double4 _simd_lgamma_d4(simd_double4 x); | ||
| 5627 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x) { | ||
| 5628 | return _simd_lgamma_d4(x); | ||
| 5629 | } | ||
| 5630 | #else | ||
| 5631 | static inline SIMD_CFUNC simd_double4 __tg_lgamma(simd_double4 x) { | ||
| 5632 | return simd_make_double4(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5633 | } | ||
| 5634 | #endif | ||
| 5635 | |||
| 5636 | #if SIMD_LIBRARY_VERSION >= 4 && defined __x86_64__ && defined __AVX512F__ | ||
| 5637 | extern simd_double8 _simd_lgamma_d8(simd_double8 x); | ||
| 5638 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x) { | ||
| 5639 | return _simd_lgamma_d8(x); | ||
| 5640 | } | ||
| 5641 | #else | ||
| 5642 | static inline SIMD_CFUNC simd_double8 __tg_lgamma(simd_double8 x) { | ||
| 5643 | return simd_make_double8(__tg_lgamma(x.lo), __tg_lgamma(x.hi)); | ||
| 5644 | } | ||
| 5645 | #endif | ||
| 5646 | |||
| 5647 | static inline SIMD_CFUNC simd_float2 __tg_fdim(simd_float2 x, simd_float2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5648 | static inline SIMD_CFUNC simd_float3 __tg_fdim(simd_float3 x, simd_float3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5649 | static inline SIMD_CFUNC simd_float4 __tg_fdim(simd_float4 x, simd_float4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5650 | static inline SIMD_CFUNC simd_float8 __tg_fdim(simd_float8 x, simd_float8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5651 | static inline SIMD_CFUNC simd_float16 __tg_fdim(simd_float16 x, simd_float16 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5652 | static inline SIMD_CFUNC simd_double2 __tg_fdim(simd_double2 x, simd_double2 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5653 | static inline SIMD_CFUNC simd_double3 __tg_fdim(simd_double3 x, simd_double3 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5654 | static inline SIMD_CFUNC simd_double4 __tg_fdim(simd_double4 x, simd_double4 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5655 | static inline SIMD_CFUNC simd_double8 __tg_fdim(simd_double8 x, simd_double8 y) { return simd_bitselect(x-y, 0, x<y); } | ||
| 5656 | |||
| 5657 | static inline SIMD_CFUNC simd_float2 __tg_fma(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5658 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5659 | return vfma_f32(z, x, y); | ||
| 5660 | #else | ||
| 5661 | return simd_make_float2(__tg_fma(simd_make_float4_undef(x), simd_make_float4_undef(y), simd_make_float4_undef(z))); | ||
| 5662 | #endif | ||
| 5663 | } | ||
| 5664 | |||
| 5665 | static inline SIMD_CFUNC simd_float3 __tg_fma(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5666 | return simd_make_float3(__tg_fma(simd_make_float4(x), simd_make_float4(y), simd_make_float4(z))); | ||
| 5667 | } | ||
| 5668 | |||
| 5669 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5670 | extern simd_float4 _simd_fma_f4(simd_float4 x, simd_float4 y, simd_float4 z); | ||
| 5671 | #endif | ||
| 5672 | static inline SIMD_CFUNC simd_float4 __tg_fma(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5673 | #if defined __arm64__ || defined __ARM_VFPV4__ | ||
| 5674 | return vfmaq_f32(z, x, y); | ||
| 5675 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5676 | return _mm_fmadd_ps(x, y, z); | ||
| 5677 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5678 | return _simd_fma_f4(x, y, z); | ||
| 5679 | #else | ||
| 5680 | return simd_make_float4(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y), fma(x.z, y.z, z.z), fma(x.w, y.w, z.w)); | ||
| 5681 | #endif | ||
| 5682 | } | ||
| 5683 | |||
| 5684 | static inline SIMD_CFUNC simd_float8 __tg_fma(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5685 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5686 | return _mm256_fmadd_ps(x, y, z); | ||
| 5687 | #else | ||
| 5688 | return simd_make_float8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5689 | #endif | ||
| 5690 | } | ||
| 5691 | |||
| 5692 | static inline SIMD_CFUNC simd_float16 __tg_fma(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5693 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5694 | return _mm512_fmadd_ps(x, y, z); | ||
| 5695 | #else | ||
| 5696 | return simd_make_float16(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5697 | #endif | ||
| 5698 | } | ||
| 5699 | |||
| 5700 | #if SIMD_LIBRARY_VERSION >= 3 | ||
| 5701 | extern simd_double2 _simd_fma_d2(simd_double2 x, simd_double2 y, simd_double2 z); | ||
| 5702 | #endif | ||
| 5703 | static inline SIMD_CFUNC simd_double2 __tg_fma(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5704 | #if defined __arm64__ | ||
| 5705 | return vfmaq_f64(z, x, y); | ||
| 5706 | #elif (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5707 | return _mm_fmadd_pd(x, y, z); | ||
| 5708 | #elif SIMD_LIBRARY_VERSION >= 3 | ||
| 5709 | return _simd_fma_d2(x, y, z); | ||
| 5710 | #else | ||
| 5711 | return simd_make_double2(fma(x.x, y.x, z.x), fma(x.y, y.y, z.y)); | ||
| 5712 | #endif | ||
| 5713 | } | ||
| 5714 | |||
| 5715 | static inline SIMD_CFUNC simd_double3 __tg_fma(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5716 | return simd_make_double3(__tg_fma(simd_make_double4(x), simd_make_double4(y), simd_make_double4(z))); | ||
| 5717 | } | ||
| 5718 | |||
| 5719 | static inline SIMD_CFUNC simd_double4 __tg_fma(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5720 | #if (defined __i386__ || defined __x86_64__) && defined __FMA__ | ||
| 5721 | return _mm256_fmadd_pd(x, y, z); | ||
| 5722 | #else | ||
| 5723 | return simd_make_double4(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5724 | #endif | ||
| 5725 | } | ||
| 5726 | |||
| 5727 | static inline SIMD_CFUNC simd_double8 __tg_fma(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5728 | #if defined __x86_64__ && defined __AVX512F__ | ||
| 5729 | return _mm512_fmadd_pd(x, y, z); | ||
| 5730 | #else | ||
| 5731 | return simd_make_double8(__tg_fma(x.lo, y.lo, z.lo), __tg_fma(x.hi, y.hi, z.hi)); | ||
| 5732 | #endif | ||
| 5733 | } | ||
| 5734 | |||
| 5735 | static inline SIMD_CFUNC float simd_muladd(float x, float y, float z) { | ||
| 5736 | #pragma STDC FP_CONTRACT ON | ||
| 5737 | return x*y + z; | ||
| 5738 | } | ||
| 5739 | static inline SIMD_CFUNC simd_float2 simd_muladd(simd_float2 x, simd_float2 y, simd_float2 z) { | ||
| 5740 | #pragma STDC FP_CONTRACT ON | ||
| 5741 | return x*y + z; | ||
| 5742 | } | ||
| 5743 | static inline SIMD_CFUNC simd_float3 simd_muladd(simd_float3 x, simd_float3 y, simd_float3 z) { | ||
| 5744 | #pragma STDC FP_CONTRACT ON | ||
| 5745 | return x*y + z; | ||
| 5746 | } | ||
| 5747 | static inline SIMD_CFUNC simd_float4 simd_muladd(simd_float4 x, simd_float4 y, simd_float4 z) { | ||
| 5748 | #pragma STDC FP_CONTRACT ON | ||
| 5749 | return x*y + z; | ||
| 5750 | } | ||
| 5751 | static inline SIMD_CFUNC simd_float8 simd_muladd(simd_float8 x, simd_float8 y, simd_float8 z) { | ||
| 5752 | #pragma STDC FP_CONTRACT ON | ||
| 5753 | return x*y + z; | ||
| 5754 | } | ||
| 5755 | static inline SIMD_CFUNC simd_float16 simd_muladd(simd_float16 x, simd_float16 y, simd_float16 z) { | ||
| 5756 | #pragma STDC FP_CONTRACT ON | ||
| 5757 | return x*y + z; | ||
| 5758 | } | ||
| 5759 | static inline SIMD_CFUNC double simd_muladd(double x, double y, double z) { | ||
| 5760 | #pragma STDC FP_CONTRACT ON | ||
| 5761 | return x*y + z; | ||
| 5762 | } | ||
| 5763 | static inline SIMD_CFUNC simd_double2 simd_muladd(simd_double2 x, simd_double2 y, simd_double2 z) { | ||
| 5764 | #pragma STDC FP_CONTRACT ON | ||
| 5765 | return x*y + z; | ||
| 5766 | } | ||
| 5767 | static inline SIMD_CFUNC simd_double3 simd_muladd(simd_double3 x, simd_double3 y, simd_double3 z) { | ||
| 5768 | #pragma STDC FP_CONTRACT ON | ||
| 5769 | return x*y + z; | ||
| 5770 | } | ||
| 5771 | static inline SIMD_CFUNC simd_double4 simd_muladd(simd_double4 x, simd_double4 y, simd_double4 z) { | ||
| 5772 | #pragma STDC FP_CONTRACT ON | ||
| 5773 | return x*y + z; | ||
| 5774 | } | ||
| 5775 | static inline SIMD_CFUNC simd_double8 simd_muladd(simd_double8 x, simd_double8 y, simd_double8 z) { | ||
| 5776 | #pragma STDC FP_CONTRACT ON | ||
| 5777 | return x*y + z; | ||
| 5778 | } | ||
| 5779 | #ifdef __cplusplus | ||
| 5780 | } /* extern "C" */ | ||
| 5781 | #endif | ||
| 5782 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 5783 | #endif /* SIMD_MATH_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/matrix.h deleted-1813| ... | @@ -1,1813 +0,0 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * Function Result | ||
| 4 | * ------------------------------------------------------------------ | ||
| 5 | * | ||
| 6 | * simd_diagonal_matrix(x) A square matrix with the vector x | ||
| 7 | * as its diagonal. | ||
| 8 | * | ||
| 9 | * simd_matrix(c0, c1, ... ) A matrix with the specified vectors | ||
| 10 | * as columns. | ||
| 11 | * | ||
| 12 | * simd_matrix_from_rows(r0, r1, ... ) A matrix with the specified vectors | ||
| 13 | * as rows. | ||
| 14 | * | ||
| 15 | * simd_mul(a,x) Scalar product a*x. | ||
| 16 | * | ||
| 17 | * simd_linear_combination(a,x,b,y) a*x + b*y. | ||
| 18 | * | ||
| 19 | * simd_add(x,y) Macro wrapping linear_combination | ||
| 20 | * to compute x + y. | ||
| 21 | * | ||
| 22 | * simd_sub(x,y) Macro wrapping linear_combination | ||
| 23 | * to compute x - y. | ||
| 24 | * | ||
| 25 | * simd_transpose(x) Transpose of the matrix x. | ||
| 26 | * | ||
| 27 | * simd_trace(x) Trace of the matrix x. | ||
| 28 | * | ||
| 29 | * simd_determinant(x) Determinant of the matrix x. | ||
| 30 | * | ||
| 31 | * simd_inverse(x) Inverse of x if x is non-singular. If | ||
| 32 | * x is singular, the result is undefined. | ||
| 33 | * | ||
| 34 | * simd_mul(x,y) If x is a matrix, returns the matrix | ||
| 35 | * product x*y, where y is either a matrix | ||
| 36 | * or a column vector. If x is a vector, | ||
| 37 | * returns the product x*y where x is | ||
| 38 | * interpreted as a row vector. | ||
| 39 | * | ||
| 40 | * simd_equal(x,y) Returns true if and only if every | ||
| 41 | * element of x is exactly equal to the | ||
| 42 | * corresponding element of y. | ||
| 43 | * | ||
| 44 | * simd_almost_equal_elements(x,y,tol) | ||
| 45 | * Returns true if and only if for each | ||
| 46 | * entry xij in x, the corresponding | ||
| 47 | * element yij in y satisfies | ||
| 48 | * |xij - yij| <= tol. | ||
| 49 | * | ||
| 50 | * simd_almost_equal_elements_relative(x,y,tol) | ||
| 51 | * Returns true if and only if for each | ||
| 52 | * entry xij in x, the corresponding | ||
| 53 | * element yij in y satisfies | ||
| 54 | * |xij - yij| <= tol*|xij|. | ||
| 55 | * | ||
| 56 | * The header also defines a few useful global matrix objects: | ||
| 57 | * matrix_identity_floatNxM and matrix_identity_doubleNxM, may be used to get | ||
| 58 | * an identity matrix of the specified size. | ||
| 59 | * | ||
| 60 | * In C++, we are able to use namespacing to make the functions more concise; | ||
| 61 | * we also overload some common arithmetic operators to work with the matrix | ||
| 62 | * types: | ||
| 63 | * | ||
| 64 | * C++ Function Equivalent C Function | ||
| 65 | * -------------------------------------------------------------------- | ||
| 66 | * simd::inverse simd_inverse | ||
| 67 | * simd::transpose simd_transpose | ||
| 68 | * operator+ simd_add | ||
| 69 | * operator- simd_sub | ||
| 70 | * operator+= N/A | ||
| 71 | * operator-= N/A | ||
| 72 | * operator* simd_mul or simd_mul | ||
| 73 | * operator*= simd_mul or simd_mul | ||
| 74 | * operator== simd_equal | ||
| 75 | * operator!= !simd_equal | ||
| 76 | * simd::almost_equal_elements simd_almost_equal_elements | ||
| 77 | * simd::almost_equal_elements_relative simd_almost_equal_elements_relative | ||
| 78 | * | ||
| 79 | * <simd/matrix_types.h> provides constructors for C++ matrix types. | ||
| 80 | */ | ||
| 81 | |||
| 82 | #ifndef SIMD_MATRIX_HEADER | ||
| 83 | #define SIMD_MATRIX_HEADER | ||
| 84 | |||
| 85 | #include <simd/base.h> | ||
| 86 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 87 | #include <simd/matrix_types.h> | ||
| 88 | #include <simd/geometry.h> | ||
| 89 | #include <simd/extern.h> | ||
| 90 | #include <simd/logic.h> | ||
| 91 | |||
| 92 | #ifdef __cplusplus | ||
| 93 | extern "C" { | ||
| 94 | #endif | ||
| 95 | |||
| 96 | extern const simd_float2x2 matrix_identity_float2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 97 | extern const simd_float3x3 matrix_identity_float3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 98 | extern const simd_float4x4 matrix_identity_float4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 99 | extern const simd_double2x2 matrix_identity_double2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 100 | extern const simd_double3x3 matrix_identity_double3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 101 | extern const simd_double4x4 matrix_identity_double4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 102 | |||
| 103 | static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x); | ||
| 104 | static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x); | ||
| 105 | static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x); | ||
| 106 | static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x); | ||
| 107 | static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x); | ||
| 108 | static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x); | ||
| 109 | #define matrix_from_diagonal simd_diagonal_matrix | ||
| 110 | |||
| 111 | static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1); | ||
| 112 | static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2); | ||
| 113 | static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3); | ||
| 114 | static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1); | ||
| 115 | static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2); | ||
| 116 | static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3); | ||
| 117 | static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1); | ||
| 118 | static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2); | ||
| 119 | static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3); | ||
| 120 | static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1); | ||
| 121 | static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2); | ||
| 122 | static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3); | ||
| 123 | static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1); | ||
| 124 | static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2); | ||
| 125 | static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3); | ||
| 126 | static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1); | ||
| 127 | static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2); | ||
| 128 | static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3); | ||
| 129 | #define matrix_from_columns simd_matrix | ||
| 130 | |||
| 131 | static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1); | ||
| 132 | static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2); | ||
| 133 | static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3); | ||
| 134 | static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1); | ||
| 135 | static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2); | ||
| 136 | static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3); | ||
| 137 | static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1); | ||
| 138 | static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2); | ||
| 139 | static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3); | ||
| 140 | static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1); | ||
| 141 | static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2); | ||
| 142 | static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3); | ||
| 143 | static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1); | ||
| 144 | static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2); | ||
| 145 | static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3); | ||
| 146 | static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1); | ||
| 147 | static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2); | ||
| 148 | static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3); | ||
| 149 | #define matrix_from_rows simd_matrix_from_rows | ||
| 150 | |||
| 151 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); | ||
| 152 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); | ||
| 153 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); | ||
| 154 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); | ||
| 155 | |||
| 156 | static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x); | ||
| 157 | static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x); | ||
| 158 | static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x); | ||
| 159 | static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x); | ||
| 160 | static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x); | ||
| 161 | static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x); | ||
| 162 | static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x); | ||
| 163 | static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x); | ||
| 164 | static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x); | ||
| 165 | static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x); | ||
| 166 | static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x); | ||
| 167 | static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x); | ||
| 168 | static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x); | ||
| 169 | static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x); | ||
| 170 | static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x); | ||
| 171 | static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x); | ||
| 172 | static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x); | ||
| 173 | static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x); | ||
| 174 | |||
| 175 | static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y); | ||
| 176 | static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y); | ||
| 177 | static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y); | ||
| 178 | static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y); | ||
| 179 | static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y); | ||
| 180 | static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y); | ||
| 181 | static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y); | ||
| 182 | static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y); | ||
| 183 | static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y); | ||
| 184 | static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y); | ||
| 185 | static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y); | ||
| 186 | static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y); | ||
| 187 | static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y); | ||
| 188 | static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y); | ||
| 189 | static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y); | ||
| 190 | static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y); | ||
| 191 | static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y); | ||
| 192 | static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y); | ||
| 193 | #define matrix_linear_combination simd_linear_combination | ||
| 194 | |||
| 195 | static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y); | ||
| 196 | static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y); | ||
| 197 | static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y); | ||
| 198 | static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y); | ||
| 199 | static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y); | ||
| 200 | static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y); | ||
| 201 | static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y); | ||
| 202 | static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y); | ||
| 203 | static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y); | ||
| 204 | static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y); | ||
| 205 | static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y); | ||
| 206 | static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y); | ||
| 207 | static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y); | ||
| 208 | static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y); | ||
| 209 | static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y); | ||
| 210 | static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y); | ||
| 211 | static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y); | ||
| 212 | static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y); | ||
| 213 | #define matrix_add simd_add | ||
| 214 | |||
| 215 | static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y); | ||
| 216 | static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y); | ||
| 217 | static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y); | ||
| 218 | static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y); | ||
| 219 | static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y); | ||
| 220 | static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y); | ||
| 221 | static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y); | ||
| 222 | static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y); | ||
| 223 | static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y); | ||
| 224 | static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y); | ||
| 225 | static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y); | ||
| 226 | static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y); | ||
| 227 | static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y); | ||
| 228 | static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y); | ||
| 229 | static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y); | ||
| 230 | static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y); | ||
| 231 | static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y); | ||
| 232 | static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y); | ||
| 233 | #define matrix_sub simd_sub | ||
| 234 | |||
| 235 | static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x); | ||
| 236 | static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x); | ||
| 237 | static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x); | ||
| 238 | static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x); | ||
| 239 | static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x); | ||
| 240 | static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x); | ||
| 241 | static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x); | ||
| 242 | static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x); | ||
| 243 | static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x); | ||
| 244 | static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x); | ||
| 245 | static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x); | ||
| 246 | static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x); | ||
| 247 | static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x); | ||
| 248 | static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x); | ||
| 249 | static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x); | ||
| 250 | static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x); | ||
| 251 | static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x); | ||
| 252 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x); | ||
| 253 | #define matrix_transpose simd_transpose | ||
| 254 | |||
| 255 | static float SIMD_CFUNC simd_trace(simd_float2x2 __x); | ||
| 256 | static float SIMD_CFUNC simd_trace(simd_float3x3 __x); | ||
| 257 | static float SIMD_CFUNC simd_trace(simd_float4x4 __x); | ||
| 258 | static double SIMD_CFUNC simd_trace(simd_double2x2 __x); | ||
| 259 | static double SIMD_CFUNC simd_trace(simd_double3x3 __x); | ||
| 260 | static double SIMD_CFUNC simd_trace(simd_double4x4 __x); | ||
| 261 | #define matrix_trace simd_trace | ||
| 262 | |||
| 263 | static float SIMD_CFUNC simd_determinant(simd_float2x2 __x); | ||
| 264 | static float SIMD_CFUNC simd_determinant(simd_float3x3 __x); | ||
| 265 | static float SIMD_CFUNC simd_determinant(simd_float4x4 __x); | ||
| 266 | static double SIMD_CFUNC simd_determinant(simd_double2x2 __x); | ||
| 267 | static double SIMD_CFUNC simd_determinant(simd_double3x3 __x); | ||
| 268 | static double SIMD_CFUNC simd_determinant(simd_double4x4 __x); | ||
| 269 | #define matrix_determinant simd_determinant | ||
| 270 | |||
| 271 | static simd_float2x2 SIMD_CFUNC simd_inverse(simd_float2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 272 | static simd_float3x3 SIMD_CFUNC simd_inverse(simd_float3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 273 | static simd_float4x4 SIMD_CFUNC simd_inverse(simd_float4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 274 | static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 275 | static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 276 | static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 277 | #define matrix_invert simd_inverse | ||
| 278 | |||
| 279 | static simd_float2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2 __y); | ||
| 280 | static simd_float2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3 __y); | ||
| 281 | static simd_float2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4 __y); | ||
| 282 | static simd_float3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2 __y); | ||
| 283 | static simd_float3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3 __y); | ||
| 284 | static simd_float3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4 __y); | ||
| 285 | static simd_float4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2 __y); | ||
| 286 | static simd_float4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3 __y); | ||
| 287 | static simd_float4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4 __y); | ||
| 288 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y); | ||
| 289 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y); | ||
| 290 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y); | ||
| 291 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y); | ||
| 292 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y); | ||
| 293 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y); | ||
| 294 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y); | ||
| 295 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y); | ||
| 296 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y); | ||
| 297 | static simd_float2 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float2x2 __y); | ||
| 298 | static simd_float3 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float3x2 __y); | ||
| 299 | static simd_float4 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float4x2 __y); | ||
| 300 | static simd_float2 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float2x3 __y); | ||
| 301 | static simd_float3 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float3x3 __y); | ||
| 302 | static simd_float4 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float4x3 __y); | ||
| 303 | static simd_float2 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float2x4 __y); | ||
| 304 | static simd_float3 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float3x4 __y); | ||
| 305 | static simd_float4 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float4x4 __y); | ||
| 306 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y); | ||
| 307 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y); | ||
| 308 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y); | ||
| 309 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y); | ||
| 310 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y); | ||
| 311 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y); | ||
| 312 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y); | ||
| 313 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y); | ||
| 314 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y); | ||
| 315 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2x2 __y); | ||
| 316 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float3x2 __y); | ||
| 317 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float4x2 __y); | ||
| 318 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2x2 __y); | ||
| 319 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float3x2 __y); | ||
| 320 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float4x2 __y); | ||
| 321 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2x2 __y); | ||
| 322 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float3x2 __y); | ||
| 323 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float4x2 __y); | ||
| 324 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y); | ||
| 325 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y); | ||
| 326 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y); | ||
| 327 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y); | ||
| 328 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y); | ||
| 329 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y); | ||
| 330 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y); | ||
| 331 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y); | ||
| 332 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y); | ||
| 333 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float2x3 __y); | ||
| 334 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3x3 __y); | ||
| 335 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float4x3 __y); | ||
| 336 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float2x3 __y); | ||
| 337 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3x3 __y); | ||
| 338 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float4x3 __y); | ||
| 339 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float2x3 __y); | ||
| 340 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3x3 __y); | ||
| 341 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float4x3 __y); | ||
| 342 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y); | ||
| 343 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y); | ||
| 344 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y); | ||
| 345 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y); | ||
| 346 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y); | ||
| 347 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y); | ||
| 348 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y); | ||
| 349 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y); | ||
| 350 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y); | ||
| 351 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float2x4 __y); | ||
| 352 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float3x4 __y); | ||
| 353 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4x4 __y); | ||
| 354 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float2x4 __y); | ||
| 355 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float3x4 __y); | ||
| 356 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4x4 __y); | ||
| 357 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float2x4 __y); | ||
| 358 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float3x4 __y); | ||
| 359 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4x4 __y); | ||
| 360 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y); | ||
| 361 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y); | ||
| 362 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y); | ||
| 363 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y); | ||
| 364 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y); | ||
| 365 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y); | ||
| 366 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y); | ||
| 367 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y); | ||
| 368 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y); | ||
| 369 | |||
| 370 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y); | ||
| 371 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y); | ||
| 372 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y); | ||
| 373 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y); | ||
| 374 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y); | ||
| 375 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y); | ||
| 376 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y); | ||
| 377 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y); | ||
| 378 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y); | ||
| 379 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y); | ||
| 380 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y); | ||
| 381 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y); | ||
| 382 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y); | ||
| 383 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y); | ||
| 384 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y); | ||
| 385 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y); | ||
| 386 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y); | ||
| 387 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y); | ||
| 388 | #define matrix_equal simd_equal | ||
| 389 | |||
| 390 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol); | ||
| 391 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol); | ||
| 392 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol); | ||
| 393 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol); | ||
| 394 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol); | ||
| 395 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol); | ||
| 396 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol); | ||
| 397 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol); | ||
| 398 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol); | ||
| 399 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol); | ||
| 400 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol); | ||
| 401 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol); | ||
| 402 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol); | ||
| 403 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol); | ||
| 404 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol); | ||
| 405 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol); | ||
| 406 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol); | ||
| 407 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol); | ||
| 408 | #define matrix_almost_equal_elements simd_almost_equal_elements | ||
| 409 | |||
| 410 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol); | ||
| 411 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol); | ||
| 412 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol); | ||
| 413 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol); | ||
| 414 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol); | ||
| 415 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol); | ||
| 416 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol); | ||
| 417 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol); | ||
| 418 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol); | ||
| 419 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol); | ||
| 420 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol); | ||
| 421 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol); | ||
| 422 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol); | ||
| 423 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol); | ||
| 424 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol); | ||
| 425 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol); | ||
| 426 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol); | ||
| 427 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol); | ||
| 428 | #define matrix_almost_equal_elements_relative simd_almost_equal_elements_relative | ||
| 429 | |||
| 430 | #ifdef __cplusplus | ||
| 431 | } /* extern "C" */ | ||
| 432 | |||
| 433 | namespace simd { | ||
| 434 | static SIMD_CPPFUNC float2x2 operator+(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 435 | static SIMD_CPPFUNC float2x3 operator+(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 436 | static SIMD_CPPFUNC float2x4 operator+(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 437 | static SIMD_CPPFUNC float3x2 operator+(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 438 | static SIMD_CPPFUNC float3x3 operator+(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 439 | static SIMD_CPPFUNC float3x4 operator+(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 440 | static SIMD_CPPFUNC float4x2 operator+(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 441 | static SIMD_CPPFUNC float4x3 operator+(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 442 | static SIMD_CPPFUNC float4x4 operator+(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 443 | |||
| 444 | static SIMD_CPPFUNC float2x2 operator-(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 445 | static SIMD_CPPFUNC float2x3 operator-(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 446 | static SIMD_CPPFUNC float2x4 operator-(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 447 | static SIMD_CPPFUNC float3x2 operator-(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 448 | static SIMD_CPPFUNC float3x3 operator-(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 449 | static SIMD_CPPFUNC float3x4 operator-(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 450 | static SIMD_CPPFUNC float4x2 operator-(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 451 | static SIMD_CPPFUNC float4x3 operator-(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 452 | static SIMD_CPPFUNC float4x4 operator-(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 453 | |||
| 454 | static SIMD_CPPFUNC float2x2& operator+=(float2x2& x, const float2x2 y) { x = x + y; return x; } | ||
| 455 | static SIMD_CPPFUNC float2x3& operator+=(float2x3& x, const float2x3 y) { x = x + y; return x; } | ||
| 456 | static SIMD_CPPFUNC float2x4& operator+=(float2x4& x, const float2x4 y) { x = x + y; return x; } | ||
| 457 | static SIMD_CPPFUNC float3x2& operator+=(float3x2& x, const float3x2 y) { x = x + y; return x; } | ||
| 458 | static SIMD_CPPFUNC float3x3& operator+=(float3x3& x, const float3x3 y) { x = x + y; return x; } | ||
| 459 | static SIMD_CPPFUNC float3x4& operator+=(float3x4& x, const float3x4 y) { x = x + y; return x; } | ||
| 460 | static SIMD_CPPFUNC float4x2& operator+=(float4x2& x, const float4x2 y) { x = x + y; return x; } | ||
| 461 | static SIMD_CPPFUNC float4x3& operator+=(float4x3& x, const float4x3 y) { x = x + y; return x; } | ||
| 462 | static SIMD_CPPFUNC float4x4& operator+=(float4x4& x, const float4x4 y) { x = x + y; return x; } | ||
| 463 | |||
| 464 | static SIMD_CPPFUNC float2x2& operator-=(float2x2& x, const float2x2 y) { x = x - y; return x; } | ||
| 465 | static SIMD_CPPFUNC float2x3& operator-=(float2x3& x, const float2x3 y) { x = x - y; return x; } | ||
| 466 | static SIMD_CPPFUNC float2x4& operator-=(float2x4& x, const float2x4 y) { x = x - y; return x; } | ||
| 467 | static SIMD_CPPFUNC float3x2& operator-=(float3x2& x, const float3x2 y) { x = x - y; return x; } | ||
| 468 | static SIMD_CPPFUNC float3x3& operator-=(float3x3& x, const float3x3 y) { x = x - y; return x; } | ||
| 469 | static SIMD_CPPFUNC float3x4& operator-=(float3x4& x, const float3x4 y) { x = x - y; return x; } | ||
| 470 | static SIMD_CPPFUNC float4x2& operator-=(float4x2& x, const float4x2 y) { x = x - y; return x; } | ||
| 471 | static SIMD_CPPFUNC float4x3& operator-=(float4x3& x, const float4x3 y) { x = x - y; return x; } | ||
| 472 | static SIMD_CPPFUNC float4x4& operator-=(float4x4& x, const float4x4 y) { x = x - y; return x; } | ||
| 473 | |||
| 474 | static SIMD_CPPFUNC float2x2 transpose(const float2x2 x) { return ::simd_transpose(x); } | ||
| 475 | static SIMD_CPPFUNC float2x3 transpose(const float3x2 x) { return ::simd_transpose(x); } | ||
| 476 | static SIMD_CPPFUNC float2x4 transpose(const float4x2 x) { return ::simd_transpose(x); } | ||
| 477 | static SIMD_CPPFUNC float3x2 transpose(const float2x3 x) { return ::simd_transpose(x); } | ||
| 478 | static SIMD_CPPFUNC float3x3 transpose(const float3x3 x) { return ::simd_transpose(x); } | ||
| 479 | static SIMD_CPPFUNC float3x4 transpose(const float4x3 x) { return ::simd_transpose(x); } | ||
| 480 | static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); } | ||
| 481 | static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); } | ||
| 482 | static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); } | ||
| 483 | |||
| 484 | static SIMD_CPPFUNC float trace(const float2x2 x) { return ::simd_trace(x); } | ||
| 485 | static SIMD_CPPFUNC float trace(const float3x3 x) { return ::simd_trace(x); } | ||
| 486 | static SIMD_CPPFUNC float trace(const float4x4 x) { return ::simd_trace(x); } | ||
| 487 | |||
| 488 | static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); } | ||
| 489 | static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); } | ||
| 490 | static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); } | ||
| 491 | |||
| 492 | #pragma clang diagnostic push | ||
| 493 | #pragma clang diagnostic ignored "-Wgcc-compat" | ||
| 494 | static SIMD_CPPFUNC float2x2 inverse(const float2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 495 | static SIMD_CPPFUNC float3x3 inverse(const float3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 496 | static SIMD_CPPFUNC float4x4 inverse(const float4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 497 | #pragma clang diagnostic pop | ||
| 498 | |||
| 499 | static SIMD_CPPFUNC float2x2 operator*(const float a, const float2x2 x) { return ::simd_mul(a, x); } | ||
| 500 | static SIMD_CPPFUNC float2x3 operator*(const float a, const float2x3 x) { return ::simd_mul(a, x); } | ||
| 501 | static SIMD_CPPFUNC float2x4 operator*(const float a, const float2x4 x) { return ::simd_mul(a, x); } | ||
| 502 | static SIMD_CPPFUNC float3x2 operator*(const float a, const float3x2 x) { return ::simd_mul(a, x); } | ||
| 503 | static SIMD_CPPFUNC float3x3 operator*(const float a, const float3x3 x) { return ::simd_mul(a, x); } | ||
| 504 | static SIMD_CPPFUNC float3x4 operator*(const float a, const float3x4 x) { return ::simd_mul(a, x); } | ||
| 505 | static SIMD_CPPFUNC float4x2 operator*(const float a, const float4x2 x) { return ::simd_mul(a, x); } | ||
| 506 | static SIMD_CPPFUNC float4x3 operator*(const float a, const float4x3 x) { return ::simd_mul(a, x); } | ||
| 507 | static SIMD_CPPFUNC float4x4 operator*(const float a, const float4x4 x) { return ::simd_mul(a, x); } | ||
| 508 | static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 509 | static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 510 | static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 511 | static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 512 | static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 513 | static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 514 | static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 515 | static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 516 | static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 517 | static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 518 | static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 519 | static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 520 | static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 521 | static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 522 | static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 523 | static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 524 | static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 525 | static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 526 | |||
| 527 | static SIMD_CPPFUNC float2 operator*(const float2 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 528 | static SIMD_CPPFUNC float3 operator*(const float2 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 529 | static SIMD_CPPFUNC float4 operator*(const float2 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 530 | static SIMD_CPPFUNC float2 operator*(const float3 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 531 | static SIMD_CPPFUNC float3 operator*(const float3 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 532 | static SIMD_CPPFUNC float4 operator*(const float3 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 533 | static SIMD_CPPFUNC float2 operator*(const float4 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 534 | static SIMD_CPPFUNC float3 operator*(const float4 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 535 | static SIMD_CPPFUNC float4 operator*(const float4 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 536 | static SIMD_CPPFUNC float2 operator*(const float2x2 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 537 | static SIMD_CPPFUNC float2 operator*(const float3x2 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 538 | static SIMD_CPPFUNC float2 operator*(const float4x2 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 539 | static SIMD_CPPFUNC float3 operator*(const float2x3 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 540 | static SIMD_CPPFUNC float3 operator*(const float3x3 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 541 | static SIMD_CPPFUNC float3 operator*(const float4x3 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 542 | static SIMD_CPPFUNC float4 operator*(const float2x4 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 543 | static SIMD_CPPFUNC float4 operator*(const float3x4 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 544 | static SIMD_CPPFUNC float4 operator*(const float4x4 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 545 | static SIMD_CPPFUNC float2& operator*=(float2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 546 | static SIMD_CPPFUNC float3& operator*=(float3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 547 | static SIMD_CPPFUNC float4& operator*=(float4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 548 | |||
| 549 | static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 550 | static SIMD_CPPFUNC float3x2 operator*(const float2x2 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 551 | static SIMD_CPPFUNC float4x2 operator*(const float2x2 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 552 | static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 553 | static SIMD_CPPFUNC float3x3 operator*(const float2x3 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 554 | static SIMD_CPPFUNC float4x3 operator*(const float2x3 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 555 | static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 556 | static SIMD_CPPFUNC float3x4 operator*(const float2x4 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 557 | static SIMD_CPPFUNC float4x4 operator*(const float2x4 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 558 | static SIMD_CPPFUNC float2x2 operator*(const float3x2 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 559 | static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 560 | static SIMD_CPPFUNC float4x2 operator*(const float3x2 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 561 | static SIMD_CPPFUNC float2x3 operator*(const float3x3 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 562 | static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 563 | static SIMD_CPPFUNC float4x3 operator*(const float3x3 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 564 | static SIMD_CPPFUNC float2x4 operator*(const float3x4 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 565 | static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 566 | static SIMD_CPPFUNC float4x4 operator*(const float3x4 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 567 | static SIMD_CPPFUNC float2x2 operator*(const float4x2 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 568 | static SIMD_CPPFUNC float3x2 operator*(const float4x2 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 569 | static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 570 | static SIMD_CPPFUNC float2x3 operator*(const float4x3 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 571 | static SIMD_CPPFUNC float3x3 operator*(const float4x3 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 572 | static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 573 | static SIMD_CPPFUNC float2x4 operator*(const float4x4 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 574 | static SIMD_CPPFUNC float3x4 operator*(const float4x4 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 575 | static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 576 | static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 577 | static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 578 | static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 579 | static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 580 | static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 581 | static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 582 | static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 583 | static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 584 | static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 585 | |||
| 586 | static SIMD_CPPFUNC bool operator==(const float2x2& x, const float2x2& y) { return ::simd_equal(x, y); } | ||
| 587 | static SIMD_CPPFUNC bool operator==(const float2x3& x, const float2x3& y) { return ::simd_equal(x, y); } | ||
| 588 | static SIMD_CPPFUNC bool operator==(const float2x4& x, const float2x4& y) { return ::simd_equal(x, y); } | ||
| 589 | static SIMD_CPPFUNC bool operator==(const float3x2& x, const float3x2& y) { return ::simd_equal(x, y); } | ||
| 590 | static SIMD_CPPFUNC bool operator==(const float3x3& x, const float3x3& y) { return ::simd_equal(x, y); } | ||
| 591 | static SIMD_CPPFUNC bool operator==(const float3x4& x, const float3x4& y) { return ::simd_equal(x, y); } | ||
| 592 | static SIMD_CPPFUNC bool operator==(const float4x2& x, const float4x2& y) { return ::simd_equal(x, y); } | ||
| 593 | static SIMD_CPPFUNC bool operator==(const float4x3& x, const float4x3& y) { return ::simd_equal(x, y); } | ||
| 594 | static SIMD_CPPFUNC bool operator==(const float4x4& x, const float4x4& y) { return ::simd_equal(x, y); } | ||
| 595 | |||
| 596 | static SIMD_CPPFUNC bool operator!=(const float2x2& x, const float2x2& y) { return !(x == y); } | ||
| 597 | static SIMD_CPPFUNC bool operator!=(const float2x3& x, const float2x3& y) { return !(x == y); } | ||
| 598 | static SIMD_CPPFUNC bool operator!=(const float2x4& x, const float2x4& y) { return !(x == y); } | ||
| 599 | static SIMD_CPPFUNC bool operator!=(const float3x2& x, const float3x2& y) { return !(x == y); } | ||
| 600 | static SIMD_CPPFUNC bool operator!=(const float3x3& x, const float3x3& y) { return !(x == y); } | ||
| 601 | static SIMD_CPPFUNC bool operator!=(const float3x4& x, const float3x4& y) { return !(x == y); } | ||
| 602 | static SIMD_CPPFUNC bool operator!=(const float4x2& x, const float4x2& y) { return !(x == y); } | ||
| 603 | static SIMD_CPPFUNC bool operator!=(const float4x3& x, const float4x3& y) { return !(x == y); } | ||
| 604 | static SIMD_CPPFUNC bool operator!=(const float4x4& x, const float4x4& y) { return !(x == y); } | ||
| 605 | |||
| 606 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 607 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 608 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 609 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 610 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 611 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 612 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 613 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 614 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 615 | |||
| 616 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 617 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 618 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 619 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 620 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 621 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 622 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 623 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 624 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 625 | |||
| 626 | static SIMD_CPPFUNC double2x2 operator+(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 627 | static SIMD_CPPFUNC double2x3 operator+(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 628 | static SIMD_CPPFUNC double2x4 operator+(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 629 | static SIMD_CPPFUNC double3x2 operator+(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 630 | static SIMD_CPPFUNC double3x3 operator+(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 631 | static SIMD_CPPFUNC double3x4 operator+(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 632 | static SIMD_CPPFUNC double4x2 operator+(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 633 | static SIMD_CPPFUNC double4x3 operator+(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 634 | static SIMD_CPPFUNC double4x4 operator+(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 635 | |||
| 636 | static SIMD_CPPFUNC double2x2 operator-(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 637 | static SIMD_CPPFUNC double2x3 operator-(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 638 | static SIMD_CPPFUNC double2x4 operator-(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 639 | static SIMD_CPPFUNC double3x2 operator-(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 640 | static SIMD_CPPFUNC double3x3 operator-(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 641 | static SIMD_CPPFUNC double3x4 operator-(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 642 | static SIMD_CPPFUNC double4x2 operator-(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 643 | static SIMD_CPPFUNC double4x3 operator-(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 644 | static SIMD_CPPFUNC double4x4 operator-(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 645 | |||
| 646 | static SIMD_CPPFUNC double2x2& operator+=(double2x2& x, const double2x2 y) { x = x + y; return x; } | ||
| 647 | static SIMD_CPPFUNC double2x3& operator+=(double2x3& x, const double2x3 y) { x = x + y; return x; } | ||
| 648 | static SIMD_CPPFUNC double2x4& operator+=(double2x4& x, const double2x4 y) { x = x + y; return x; } | ||
| 649 | static SIMD_CPPFUNC double3x2& operator+=(double3x2& x, const double3x2 y) { x = x + y; return x; } | ||
| 650 | static SIMD_CPPFUNC double3x3& operator+=(double3x3& x, const double3x3 y) { x = x + y; return x; } | ||
| 651 | static SIMD_CPPFUNC double3x4& operator+=(double3x4& x, const double3x4 y) { x = x + y; return x; } | ||
| 652 | static SIMD_CPPFUNC double4x2& operator+=(double4x2& x, const double4x2 y) { x = x + y; return x; } | ||
| 653 | static SIMD_CPPFUNC double4x3& operator+=(double4x3& x, const double4x3 y) { x = x + y; return x; } | ||
| 654 | static SIMD_CPPFUNC double4x4& operator+=(double4x4& x, const double4x4 y) { x = x + y; return x; } | ||
| 655 | |||
| 656 | static SIMD_CPPFUNC double2x2& operator-=(double2x2& x, const double2x2 y) { x = x - y; return x; } | ||
| 657 | static SIMD_CPPFUNC double2x3& operator-=(double2x3& x, const double2x3 y) { x = x - y; return x; } | ||
| 658 | static SIMD_CPPFUNC double2x4& operator-=(double2x4& x, const double2x4 y) { x = x - y; return x; } | ||
| 659 | static SIMD_CPPFUNC double3x2& operator-=(double3x2& x, const double3x2 y) { x = x - y; return x; } | ||
| 660 | static SIMD_CPPFUNC double3x3& operator-=(double3x3& x, const double3x3 y) { x = x - y; return x; } | ||
| 661 | static SIMD_CPPFUNC double3x4& operator-=(double3x4& x, const double3x4 y) { x = x - y; return x; } | ||
| 662 | static SIMD_CPPFUNC double4x2& operator-=(double4x2& x, const double4x2 y) { x = x - y; return x; } | ||
| 663 | static SIMD_CPPFUNC double4x3& operator-=(double4x3& x, const double4x3 y) { x = x - y; return x; } | ||
| 664 | static SIMD_CPPFUNC double4x4& operator-=(double4x4& x, const double4x4 y) { x = x - y; return x; } | ||
| 665 | |||
| 666 | static SIMD_CPPFUNC double2x2 transpose(const double2x2 x) { return ::simd_transpose(x); } | ||
| 667 | static SIMD_CPPFUNC double2x3 transpose(const double3x2 x) { return ::simd_transpose(x); } | ||
| 668 | static SIMD_CPPFUNC double2x4 transpose(const double4x2 x) { return ::simd_transpose(x); } | ||
| 669 | static SIMD_CPPFUNC double3x2 transpose(const double2x3 x) { return ::simd_transpose(x); } | ||
| 670 | static SIMD_CPPFUNC double3x3 transpose(const double3x3 x) { return ::simd_transpose(x); } | ||
| 671 | static SIMD_CPPFUNC double3x4 transpose(const double4x3 x) { return ::simd_transpose(x); } | ||
| 672 | static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); } | ||
| 673 | static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); } | ||
| 674 | static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); } | ||
| 675 | |||
| 676 | static SIMD_CPPFUNC double trace(const double2x2 x) { return ::simd_trace(x); } | ||
| 677 | static SIMD_CPPFUNC double trace(const double3x3 x) { return ::simd_trace(x); } | ||
| 678 | static SIMD_CPPFUNC double trace(const double4x4 x) { return ::simd_trace(x); } | ||
| 679 | |||
| 680 | static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); } | ||
| 681 | static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); } | ||
| 682 | static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); } | ||
| 683 | |||
| 684 | #pragma clang diagnostic push | ||
| 685 | #pragma clang diagnostic ignored "-Wgcc-compat" | ||
| 686 | static SIMD_CPPFUNC double2x2 inverse(const double2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 687 | static SIMD_CPPFUNC double3x3 inverse(const double3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 688 | static SIMD_CPPFUNC double4x4 inverse(const double4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 689 | #pragma clang diagnostic pop | ||
| 690 | |||
| 691 | static SIMD_CPPFUNC double2x2 operator*(const double a, const double2x2 x) { return ::simd_mul(a, x); } | ||
| 692 | static SIMD_CPPFUNC double2x3 operator*(const double a, const double2x3 x) { return ::simd_mul(a, x); } | ||
| 693 | static SIMD_CPPFUNC double2x4 operator*(const double a, const double2x4 x) { return ::simd_mul(a, x); } | ||
| 694 | static SIMD_CPPFUNC double3x2 operator*(const double a, const double3x2 x) { return ::simd_mul(a, x); } | ||
| 695 | static SIMD_CPPFUNC double3x3 operator*(const double a, const double3x3 x) { return ::simd_mul(a, x); } | ||
| 696 | static SIMD_CPPFUNC double3x4 operator*(const double a, const double3x4 x) { return ::simd_mul(a, x); } | ||
| 697 | static SIMD_CPPFUNC double4x2 operator*(const double a, const double4x2 x) { return ::simd_mul(a, x); } | ||
| 698 | static SIMD_CPPFUNC double4x3 operator*(const double a, const double4x3 x) { return ::simd_mul(a, x); } | ||
| 699 | static SIMD_CPPFUNC double4x4 operator*(const double a, const double4x4 x) { return ::simd_mul(a, x); } | ||
| 700 | static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 701 | static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 702 | static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 703 | static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 704 | static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 705 | static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 706 | static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 707 | static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 708 | static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 709 | static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 710 | static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 711 | static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 712 | static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 713 | static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 714 | static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 715 | static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 716 | static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 717 | static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 718 | |||
| 719 | static SIMD_CPPFUNC double2 operator*(const double2 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 720 | static SIMD_CPPFUNC double3 operator*(const double2 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 721 | static SIMD_CPPFUNC double4 operator*(const double2 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 722 | static SIMD_CPPFUNC double2 operator*(const double3 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 723 | static SIMD_CPPFUNC double3 operator*(const double3 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 724 | static SIMD_CPPFUNC double4 operator*(const double3 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 725 | static SIMD_CPPFUNC double2 operator*(const double4 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 726 | static SIMD_CPPFUNC double3 operator*(const double4 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 727 | static SIMD_CPPFUNC double4 operator*(const double4 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 728 | static SIMD_CPPFUNC double2 operator*(const double2x2 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 729 | static SIMD_CPPFUNC double2 operator*(const double3x2 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 730 | static SIMD_CPPFUNC double2 operator*(const double4x2 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 731 | static SIMD_CPPFUNC double3 operator*(const double2x3 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 732 | static SIMD_CPPFUNC double3 operator*(const double3x3 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 733 | static SIMD_CPPFUNC double3 operator*(const double4x3 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 734 | static SIMD_CPPFUNC double4 operator*(const double2x4 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 735 | static SIMD_CPPFUNC double4 operator*(const double3x4 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 736 | static SIMD_CPPFUNC double4 operator*(const double4x4 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 737 | static SIMD_CPPFUNC double2& operator*=(double2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 738 | static SIMD_CPPFUNC double3& operator*=(double3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 739 | static SIMD_CPPFUNC double4& operator*=(double4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 740 | |||
| 741 | static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 742 | static SIMD_CPPFUNC double3x2 operator*(const double2x2 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 743 | static SIMD_CPPFUNC double4x2 operator*(const double2x2 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 744 | static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 745 | static SIMD_CPPFUNC double3x3 operator*(const double2x3 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 746 | static SIMD_CPPFUNC double4x3 operator*(const double2x3 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 747 | static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 748 | static SIMD_CPPFUNC double3x4 operator*(const double2x4 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 749 | static SIMD_CPPFUNC double4x4 operator*(const double2x4 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 750 | static SIMD_CPPFUNC double2x2 operator*(const double3x2 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 751 | static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 752 | static SIMD_CPPFUNC double4x2 operator*(const double3x2 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 753 | static SIMD_CPPFUNC double2x3 operator*(const double3x3 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 754 | static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 755 | static SIMD_CPPFUNC double4x3 operator*(const double3x3 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 756 | static SIMD_CPPFUNC double2x4 operator*(const double3x4 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 757 | static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 758 | static SIMD_CPPFUNC double4x4 operator*(const double3x4 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 759 | static SIMD_CPPFUNC double2x2 operator*(const double4x2 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 760 | static SIMD_CPPFUNC double3x2 operator*(const double4x2 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 761 | static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 762 | static SIMD_CPPFUNC double2x3 operator*(const double4x3 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 763 | static SIMD_CPPFUNC double3x3 operator*(const double4x3 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 764 | static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 765 | static SIMD_CPPFUNC double2x4 operator*(const double4x4 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 766 | static SIMD_CPPFUNC double3x4 operator*(const double4x4 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 767 | static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 768 | static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 769 | static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 770 | static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 771 | static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 772 | static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 773 | static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 774 | static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 775 | static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 776 | static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 777 | |||
| 778 | static SIMD_CPPFUNC bool operator==(const double2x2& x, const double2x2& y) { return ::simd_equal(x, y); } | ||
| 779 | static SIMD_CPPFUNC bool operator==(const double2x3& x, const double2x3& y) { return ::simd_equal(x, y); } | ||
| 780 | static SIMD_CPPFUNC bool operator==(const double2x4& x, const double2x4& y) { return ::simd_equal(x, y); } | ||
| 781 | static SIMD_CPPFUNC bool operator==(const double3x2& x, const double3x2& y) { return ::simd_equal(x, y); } | ||
| 782 | static SIMD_CPPFUNC bool operator==(const double3x3& x, const double3x3& y) { return ::simd_equal(x, y); } | ||
| 783 | static SIMD_CPPFUNC bool operator==(const double3x4& x, const double3x4& y) { return ::simd_equal(x, y); } | ||
| 784 | static SIMD_CPPFUNC bool operator==(const double4x2& x, const double4x2& y) { return ::simd_equal(x, y); } | ||
| 785 | static SIMD_CPPFUNC bool operator==(const double4x3& x, const double4x3& y) { return ::simd_equal(x, y); } | ||
| 786 | static SIMD_CPPFUNC bool operator==(const double4x4& x, const double4x4& y) { return ::simd_equal(x, y); } | ||
| 787 | |||
| 788 | static SIMD_CPPFUNC bool operator!=(const double2x2& x, const double2x2& y) { return !(x == y); } | ||
| 789 | static SIMD_CPPFUNC bool operator!=(const double2x3& x, const double2x3& y) { return !(x == y); } | ||
| 790 | static SIMD_CPPFUNC bool operator!=(const double2x4& x, const double2x4& y) { return !(x == y); } | ||
| 791 | static SIMD_CPPFUNC bool operator!=(const double3x2& x, const double3x2& y) { return !(x == y); } | ||
| 792 | static SIMD_CPPFUNC bool operator!=(const double3x3& x, const double3x3& y) { return !(x == y); } | ||
| 793 | static SIMD_CPPFUNC bool operator!=(const double3x4& x, const double3x4& y) { return !(x == y); } | ||
| 794 | static SIMD_CPPFUNC bool operator!=(const double4x2& x, const double4x2& y) { return !(x == y); } | ||
| 795 | static SIMD_CPPFUNC bool operator!=(const double4x3& x, const double4x3& y) { return !(x == y); } | ||
| 796 | static SIMD_CPPFUNC bool operator!=(const double4x4& x, const double4x4& y) { return !(x == y); } | ||
| 797 | |||
| 798 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 799 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 800 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 801 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 802 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 803 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 804 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 805 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 806 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 807 | |||
| 808 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 809 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 810 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 811 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 812 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 813 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 814 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 815 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 816 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 817 | } | ||
| 818 | |||
| 819 | extern "C" { | ||
| 820 | #endif /* __cplusplus */ | ||
| 821 | |||
| 822 | #pragma mark - Implementation | ||
| 823 | |||
| 824 | static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x) { simd_float2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } | ||
| 825 | static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x) { simd_double2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } | ||
| 826 | static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x) { simd_float3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } | ||
| 827 | static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x) { simd_double3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } | ||
| 828 | static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x) { simd_float4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } | ||
| 829 | static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x) { simd_double4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } | ||
| 830 | |||
| 831 | static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1) { simd_float2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 832 | static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1) { simd_float2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 833 | static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1) { simd_float2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 834 | static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1) { simd_double2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 835 | static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1) { simd_double2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 836 | static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1) { simd_double2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 837 | static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2) { simd_float3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 838 | static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2) { simd_float3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 839 | static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2) { simd_float3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 840 | static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2) { simd_double3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 841 | static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2) { simd_double3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 842 | static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2) { simd_double3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 843 | static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3) { simd_float4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 844 | static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3) { simd_float4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 845 | static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3) { simd_float4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 846 | static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3) { simd_double4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 847 | static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3) { simd_double4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 848 | static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3) { simd_double4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 849 | |||
| 850 | static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 851 | static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 852 | static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 853 | static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 854 | static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 855 | static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 856 | static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 857 | static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 858 | static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 859 | static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 860 | static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 861 | static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 862 | static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 863 | static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 864 | static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 865 | static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 866 | static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 867 | static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 868 | |||
| 869 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q) { | ||
| 870 | simd_float4x4 r = simd_matrix4x4(q); | ||
| 871 | return (simd_float3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; | ||
| 872 | } | ||
| 873 | |||
| 874 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q) { | ||
| 875 | simd_float4 v = q.vector; | ||
| 876 | simd_float4x4 r = { | ||
| 877 | .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), | ||
| 878 | 2*(v.x*v.y + v.z*v.w), | ||
| 879 | 2*(v.x*v.z - v.y*v.w), 0 }, | ||
| 880 | .columns[1] = { 2*(v.x*v.y - v.z*v.w), | ||
| 881 | 1 - 2*(v.z*v.z + v.x*v.x), | ||
| 882 | 2*(v.y*v.z + v.x*v.w), 0 }, | ||
| 883 | .columns[2] = { 2*(v.z*v.x + v.y*v.w), | ||
| 884 | 2*(v.y*v.z - v.x*v.w), | ||
| 885 | 1 - 2*(v.y*v.y + v.x*v.x), 0 }, | ||
| 886 | .columns[3] = { 0, 0, 0, 1 } | ||
| 887 | }; | ||
| 888 | return r; | ||
| 889 | } | ||
| 890 | |||
| 891 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q) { | ||
| 892 | simd_double4x4 r = simd_matrix4x4(q); | ||
| 893 | return (simd_double3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; | ||
| 894 | } | ||
| 895 | |||
| 896 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q) { | ||
| 897 | simd_double4 v = q.vector; | ||
| 898 | simd_double4x4 r = { | ||
| 899 | .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), | ||
| 900 | 2*(v.x*v.y + v.z*v.w), | ||
| 901 | 2*(v.x*v.z - v.y*v.w), 0 }, | ||
| 902 | .columns[1] = { 2*(v.x*v.y - v.z*v.w), | ||
| 903 | 1 - 2*(v.z*v.z + v.x*v.x), | ||
| 904 | 2*(v.y*v.z + v.x*v.w), 0 }, | ||
| 905 | .columns[2] = { 2*(v.z*v.x + v.y*v.w), | ||
| 906 | 2*(v.y*v.z - v.x*v.w), | ||
| 907 | 1 - 2*(v.y*v.y + v.x*v.x), 0 }, | ||
| 908 | .columns[3] = { 0, 0, 0, 1 } | ||
| 909 | }; | ||
| 910 | return r; | ||
| 911 | } | ||
| 912 | |||
| 913 | static simd_float2x2 SIMD_CFUNC matrix_scale(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 914 | static simd_float3x2 SIMD_CFUNC matrix_scale(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 915 | static simd_float4x2 SIMD_CFUNC matrix_scale(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 916 | static simd_float2x3 SIMD_CFUNC matrix_scale(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 917 | static simd_float3x3 SIMD_CFUNC matrix_scale(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 918 | static simd_float4x3 SIMD_CFUNC matrix_scale(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 919 | static simd_float2x4 SIMD_CFUNC matrix_scale(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 920 | static simd_float3x4 SIMD_CFUNC matrix_scale(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 921 | static simd_float4x4 SIMD_CFUNC matrix_scale(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 922 | static simd_double2x2 SIMD_CFUNC matrix_scale(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 923 | static simd_double3x2 SIMD_CFUNC matrix_scale(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 924 | static simd_double4x2 SIMD_CFUNC matrix_scale(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 925 | static simd_double2x3 SIMD_CFUNC matrix_scale(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 926 | static simd_double3x3 SIMD_CFUNC matrix_scale(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 927 | static simd_double4x3 SIMD_CFUNC matrix_scale(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 928 | static simd_double2x4 SIMD_CFUNC matrix_scale(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 929 | static simd_double3x4 SIMD_CFUNC matrix_scale(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 930 | static simd_double4x4 SIMD_CFUNC matrix_scale(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 931 | |||
| 932 | static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 933 | static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 934 | static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 935 | static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 936 | static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 937 | static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 938 | static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 939 | static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 940 | static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 941 | static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 942 | static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 943 | static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 944 | static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 945 | static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 946 | static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 947 | static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 948 | static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 949 | static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 950 | |||
| 951 | static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y) { | ||
| 952 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 953 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 954 | return __x; | ||
| 955 | } | ||
| 956 | static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y) { | ||
| 957 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 958 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 959 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 960 | return __x; | ||
| 961 | } | ||
| 962 | static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y) { | ||
| 963 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 964 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 965 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 966 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 967 | return __x; | ||
| 968 | } | ||
| 969 | static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y) { | ||
| 970 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 971 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 972 | return __x; | ||
| 973 | } | ||
| 974 | static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y) { | ||
| 975 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 976 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 977 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 978 | return __x; | ||
| 979 | } | ||
| 980 | static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y) { | ||
| 981 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 982 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 983 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 984 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 985 | return __x; | ||
| 986 | } | ||
| 987 | static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y) { | ||
| 988 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 989 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 990 | return __x; | ||
| 991 | } | ||
| 992 | static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y) { | ||
| 993 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 994 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 995 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 996 | return __x; | ||
| 997 | } | ||
| 998 | static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y) { | ||
| 999 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1000 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1001 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1002 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1003 | return __x; | ||
| 1004 | } | ||
| 1005 | static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y) { | ||
| 1006 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1007 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1008 | return __x; | ||
| 1009 | } | ||
| 1010 | static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y) { | ||
| 1011 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1012 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1013 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1014 | return __x; | ||
| 1015 | } | ||
| 1016 | static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y) { | ||
| 1017 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1018 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1019 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1020 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1021 | return __x; | ||
| 1022 | } | ||
| 1023 | static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y) { | ||
| 1024 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1025 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1026 | return __x; | ||
| 1027 | } | ||
| 1028 | static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y) { | ||
| 1029 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1030 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1031 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1032 | return __x; | ||
| 1033 | } | ||
| 1034 | static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y) { | ||
| 1035 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1036 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1037 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1038 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1039 | return __x; | ||
| 1040 | } | ||
| 1041 | static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y) { | ||
| 1042 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1043 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1044 | return __x; | ||
| 1045 | } | ||
| 1046 | static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y) { | ||
| 1047 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1048 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1049 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1050 | return __x; | ||
| 1051 | } | ||
| 1052 | static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y) { | ||
| 1053 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1054 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1055 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1056 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1057 | return __x; | ||
| 1058 | } | ||
| 1059 | |||
| 1060 | static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1061 | static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1062 | static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1063 | static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1064 | static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1065 | static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1066 | static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1067 | static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1068 | static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1069 | static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1070 | static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1071 | static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1072 | static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1073 | static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1074 | static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1075 | static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1076 | static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1077 | static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1078 | |||
| 1079 | static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1080 | static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1081 | static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1082 | static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1083 | static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1084 | static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1085 | static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1086 | static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1087 | static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1088 | static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1089 | static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1090 | static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1091 | static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1092 | static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1093 | static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1094 | static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1095 | static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1096 | static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1097 | |||
| 1098 | static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x) { | ||
| 1099 | #if defined __SSE__ | ||
| 1100 | simd_float4 __x0, __x1; | ||
| 1101 | __x0.xy = __x.columns[0]; | ||
| 1102 | __x1.xy = __x.columns[1]; | ||
| 1103 | simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1104 | return simd_matrix(__r01.lo, __r01.hi); | ||
| 1105 | #else | ||
| 1106 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1107 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}); | ||
| 1108 | #endif | ||
| 1109 | } | ||
| 1110 | |||
| 1111 | static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x) { | ||
| 1112 | #if defined __SSE__ | ||
| 1113 | simd_float4 __x0, __x1; | ||
| 1114 | __x0.xyz = __x.columns[0]; | ||
| 1115 | __x1.xyz = __x.columns[1]; | ||
| 1116 | simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1117 | simd_float4 __r2x = _mm_unpackhi_ps(__x0, __x1); | ||
| 1118 | return simd_matrix(__r01.lo, __r01.hi, __r2x.lo); | ||
| 1119 | #else | ||
| 1120 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1121 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1122 | (simd_float2){__x.columns[0][2], __x.columns[1][2]}); | ||
| 1123 | #endif | ||
| 1124 | } | ||
| 1125 | |||
| 1126 | static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x) { | ||
| 1127 | #if defined __SSE__ | ||
| 1128 | simd_float4 __r01 = _mm_unpacklo_ps(__x.columns[0], __x.columns[1]); | ||
| 1129 | simd_float4 __r23 = _mm_unpackhi_ps(__x.columns[0], __x.columns[1]); | ||
| 1130 | return simd_matrix(__r01.lo, __r01.hi, __r23.lo, __r23.hi); | ||
| 1131 | #else | ||
| 1132 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1133 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1134 | (simd_float2){__x.columns[0][2], __x.columns[1][2]}, | ||
| 1135 | (simd_float2){__x.columns[0][3], __x.columns[1][3]}); | ||
| 1136 | #endif | ||
| 1137 | } | ||
| 1138 | |||
| 1139 | static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x) { | ||
| 1140 | #if defined __SSE__ | ||
| 1141 | simd_float4 __x0, __x1, __x2; | ||
| 1142 | __x0.xy = __x.columns[0]; | ||
| 1143 | __x1.xy = __x.columns[1]; | ||
| 1144 | __x2.xy = __x.columns[2]; | ||
| 1145 | simd_float4 __t = _mm_unpacklo_ps(__x0, __x1); | ||
| 1146 | simd_float4 __r0 = _mm_shuffle_ps(__t,__x2,0xc4); | ||
| 1147 | simd_float4 __r1 = _mm_shuffle_ps(__t,__x2,0xde); | ||
| 1148 | return simd_matrix(__r0.xyz, __r1.xyz); | ||
| 1149 | #else | ||
| 1150 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1151 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); | ||
| 1152 | #endif | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x) { | ||
| 1156 | #if defined __SSE__ | ||
| 1157 | simd_float4 __x0, __x1, __x2; | ||
| 1158 | __x0.xyz = __x.columns[0]; | ||
| 1159 | __x1.xyz = __x.columns[1]; | ||
| 1160 | __x2.xyz = __x.columns[2]; | ||
| 1161 | simd_float4 __t0 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1162 | simd_float4 __t1 = _mm_unpackhi_ps(__x0, __x1); | ||
| 1163 | simd_float4 __r0 = __t0; __r0.hi = __x2.lo; | ||
| 1164 | simd_float4 __r1 = _mm_shuffle_ps(__t0, __x2, 0xde); | ||
| 1165 | simd_float4 __r2 = __x2; __r2.lo = __t1.lo; | ||
| 1166 | return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz); | ||
| 1167 | #else | ||
| 1168 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1169 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1170 | (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); | ||
| 1171 | #endif | ||
| 1172 | } | ||
| 1173 | |||
| 1174 | static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x) { | ||
| 1175 | #if defined __SSE__ | ||
| 1176 | simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[1]); /* 00 10 01 11 */ | ||
| 1177 | simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[1]); /* 02 12 03 13 */ | ||
| 1178 | simd_float4 __r0 = __t0; __r0.hi = __x.columns[2].lo; | ||
| 1179 | simd_float4 __r1 = _mm_shuffle_ps(__t0, __x.columns[2], 0xde); | ||
| 1180 | simd_float4 __r2 = __x.columns[2]; __r2.lo = __t1.lo; | ||
| 1181 | simd_float4 __r3 = _mm_shuffle_ps(__t1, __x.columns[2], 0xfe); | ||
| 1182 | return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz, __r3.xyz); | ||
| 1183 | #else | ||
| 1184 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1185 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1186 | (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, | ||
| 1187 | (simd_float3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); | ||
| 1188 | #endif | ||
| 1189 | } | ||
| 1190 | |||
| 1191 | static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x) { | ||
| 1192 | #if defined __SSE__ | ||
| 1193 | simd_float4 __x0, __x1, __x2, __x3; | ||
| 1194 | __x0.xy = __x.columns[0]; | ||
| 1195 | __x1.xy = __x.columns[1]; | ||
| 1196 | __x2.xy = __x.columns[2]; | ||
| 1197 | __x3.xy = __x.columns[3]; | ||
| 1198 | simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); | ||
| 1199 | simd_float4 __t1 = _mm_unpacklo_ps(__x1,__x3); | ||
| 1200 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t1); | ||
| 1201 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t1); | ||
| 1202 | return simd_matrix(__r0,__r1); | ||
| 1203 | #else | ||
| 1204 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1205 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); | ||
| 1206 | #endif | ||
| 1207 | } | ||
| 1208 | |||
| 1209 | static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x) { | ||
| 1210 | #if defined __SSE__ | ||
| 1211 | simd_float4 __x0, __x1, __x2, __x3; | ||
| 1212 | __x0.xyz = __x.columns[0]; | ||
| 1213 | __x1.xyz = __x.columns[1]; | ||
| 1214 | __x2.xyz = __x.columns[2]; | ||
| 1215 | __x3.xyz = __x.columns[3]; | ||
| 1216 | simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); | ||
| 1217 | simd_float4 __t1 = _mm_unpackhi_ps(__x0,__x2); | ||
| 1218 | simd_float4 __t2 = _mm_unpacklo_ps(__x1,__x3); | ||
| 1219 | simd_float4 __t3 = _mm_unpackhi_ps(__x1,__x3); | ||
| 1220 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); | ||
| 1221 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); | ||
| 1222 | simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); | ||
| 1223 | return simd_matrix(__r0,__r1,__r2); | ||
| 1224 | #else | ||
| 1225 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1226 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1227 | (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); | ||
| 1228 | #endif | ||
| 1229 | } | ||
| 1230 | |||
| 1231 | static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x) { | ||
| 1232 | #if defined __SSE__ | ||
| 1233 | simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[2]); | ||
| 1234 | simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[2]); | ||
| 1235 | simd_float4 __t2 = _mm_unpacklo_ps(__x.columns[1],__x.columns[3]); | ||
| 1236 | simd_float4 __t3 = _mm_unpackhi_ps(__x.columns[1],__x.columns[3]); | ||
| 1237 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); | ||
| 1238 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); | ||
| 1239 | simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); | ||
| 1240 | simd_float4 __r3 = _mm_unpackhi_ps(__t1,__t3); | ||
| 1241 | return simd_matrix(__r0,__r1,__r2,__r3); | ||
| 1242 | #else | ||
| 1243 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1244 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1245 | (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, | ||
| 1246 | (simd_float4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); | ||
| 1247 | #endif | ||
| 1248 | } | ||
| 1249 | |||
| 1250 | static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x) { | ||
| 1251 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1252 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}); | ||
| 1253 | } | ||
| 1254 | |||
| 1255 | static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x) { | ||
| 1256 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1257 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1258 | (simd_double2){__x.columns[0][2], __x.columns[1][2]}); | ||
| 1259 | } | ||
| 1260 | |||
| 1261 | static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x) { | ||
| 1262 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1263 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1264 | (simd_double2){__x.columns[0][2], __x.columns[1][2]}, | ||
| 1265 | (simd_double2){__x.columns[0][3], __x.columns[1][3]}); | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x) { | ||
| 1269 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1270 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); | ||
| 1271 | } | ||
| 1272 | |||
| 1273 | static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x) { | ||
| 1274 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1275 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1276 | (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); | ||
| 1277 | } | ||
| 1278 | |||
| 1279 | static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x) { | ||
| 1280 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1281 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1282 | (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, | ||
| 1283 | (simd_double3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); | ||
| 1284 | } | ||
| 1285 | |||
| 1286 | static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x) { | ||
| 1287 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1288 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); | ||
| 1289 | } | ||
| 1290 | |||
| 1291 | static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x) { | ||
| 1292 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1293 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1294 | (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); | ||
| 1295 | } | ||
| 1296 | |||
| 1297 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x) { | ||
| 1298 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1299 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1300 | (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, | ||
| 1301 | (simd_double4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); | ||
| 1302 | } | ||
| 1303 | |||
| 1304 | static simd_float3 SIMD_CFUNC __rotate1( simd_float3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } | ||
| 1305 | static simd_float3 SIMD_CFUNC __rotate2( simd_float3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } | ||
| 1306 | static simd_float4 SIMD_CFUNC __rotate1( simd_float4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } | ||
| 1307 | static simd_float4 SIMD_CFUNC __rotate2( simd_float4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } | ||
| 1308 | static simd_float4 SIMD_CFUNC __rotate3( simd_float4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } | ||
| 1309 | static simd_double3 SIMD_CFUNC __rotate1(simd_double3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } | ||
| 1310 | static simd_double3 SIMD_CFUNC __rotate2(simd_double3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } | ||
| 1311 | static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } | ||
| 1312 | static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } | ||
| 1313 | static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } | ||
| 1314 | |||
| 1315 | static float SIMD_CFUNC simd_trace( simd_float2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; } | ||
| 1316 | static double SIMD_CFUNC simd_trace(simd_double2x2 __x) { return __x.columns[0][0] + __x.columns[1][1]; } | ||
| 1317 | static float SIMD_CFUNC simd_trace( simd_float3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; } | ||
| 1318 | static double SIMD_CFUNC simd_trace(simd_double3x3 __x) { return __x.columns[0][0] + __x.columns[1][1] + __x.columns[2][2]; } | ||
| 1319 | 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]; } | ||
| 1320 | 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]; } | ||
| 1321 | |||
| 1322 | 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]; } | ||
| 1323 | 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]; } | ||
| 1324 | 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]))); } | ||
| 1325 | static double SIMD_CFUNC simd_determinant(simd_double3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); } | ||
| 1326 | static float SIMD_CFUNC simd_determinant( simd_float4x4 __x) { | ||
| 1327 | simd_float4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + | ||
| 1328 | __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + | ||
| 1329 | __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); | ||
| 1330 | return simd_reduce_add(codet.even - codet.odd); | ||
| 1331 | } | ||
| 1332 | static double SIMD_CFUNC simd_determinant(simd_double4x4 __x) { | ||
| 1333 | simd_double4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + | ||
| 1334 | __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + | ||
| 1335 | __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); | ||
| 1336 | return simd_reduce_add(codet.even - codet.odd); | ||
| 1337 | } | ||
| 1338 | |||
| 1339 | static simd_float2x2 SIMD_CFUNC simd_inverse( simd_float2x2 __x) { return __invert_f2(__x); } | ||
| 1340 | static simd_float3x3 SIMD_CFUNC simd_inverse( simd_float3x3 __x) { return __invert_f3(__x); } | ||
| 1341 | static simd_float4x4 SIMD_CFUNC simd_inverse( simd_float4x4 __x) { return __invert_f4(__x); } | ||
| 1342 | static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) { return __invert_d2(__x); } | ||
| 1343 | static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) { return __invert_d3(__x); } | ||
| 1344 | static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) { return __invert_d4(__x); } | ||
| 1345 | |||
| 1346 | static simd_float2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1347 | static simd_float3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1348 | static simd_float4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1349 | static simd_float2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1350 | static simd_float3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1351 | static simd_float4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1352 | static simd_float2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1353 | static simd_float3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1354 | static simd_float4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1355 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1356 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1357 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1358 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1359 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1360 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1361 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1362 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1363 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1364 | |||
| 1365 | static simd_float2 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float2x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1366 | static simd_float3 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float3x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1367 | static simd_float4 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float4x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1368 | static simd_float2 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float2x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1369 | static simd_float3 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float3x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1370 | static simd_float4 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float4x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1371 | static simd_float2 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float2x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1372 | static simd_float3 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float3x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1373 | static simd_float4 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float4x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1374 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1375 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1376 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1377 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1378 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1379 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1380 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1381 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1382 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1383 | |||
| 1384 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2x2 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1385 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1386 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2x2 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1387 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1388 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2x2 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1389 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1390 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float2x3 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1391 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1392 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float2x3 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1393 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1394 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float2x3 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1395 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1396 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float2x4 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1397 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1398 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float2x4 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1399 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1400 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float2x4 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1401 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1402 | |||
| 1403 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float3x2 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1404 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1405 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float3x2 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1406 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1407 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float3x2 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1408 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1409 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3x3 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1410 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1411 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3x3 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1412 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1413 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3x3 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1414 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1415 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float3x4 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1416 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1417 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float3x4 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1418 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1419 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float3x4 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1420 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1421 | |||
| 1422 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float4x2 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1423 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1424 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float4x2 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1425 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1426 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float4x2 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1427 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1428 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float4x3 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1429 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1430 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float4x3 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1431 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1432 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float4x3 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1433 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1434 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4x4 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1435 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1436 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4x4 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1437 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1438 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4x4 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1439 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1440 | |||
| 1441 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1442 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1443 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1444 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1445 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1446 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1447 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1448 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1449 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1450 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1451 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1452 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1453 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1454 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1455 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1456 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1457 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1458 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1459 | |||
| 1460 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1461 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1462 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1463 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1464 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1465 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1466 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1467 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1468 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1469 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1470 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1471 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1472 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1473 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1474 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1475 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1476 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1477 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1478 | |||
| 1479 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1480 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1481 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1482 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1483 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1484 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1485 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1486 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1487 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1488 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1489 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1490 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1491 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1492 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1493 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1494 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1495 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1496 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1497 | |||
| 1498 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1499 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1500 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1501 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1502 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1503 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1504 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1505 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1506 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1507 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1508 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1509 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1510 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1511 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1512 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1513 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1514 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1515 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1516 | |||
| 1517 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1518 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1519 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1520 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1521 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1522 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1523 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1524 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1525 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1526 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1527 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1528 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1529 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1530 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1531 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1532 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1533 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1534 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1535 | |||
| 1536 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y) { | ||
| 1537 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1538 | (__x.columns[1] == __y.columns[1])); | ||
| 1539 | } | ||
| 1540 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y) { | ||
| 1541 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1542 | (__x.columns[1] == __y.columns[1])); | ||
| 1543 | } | ||
| 1544 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y) { | ||
| 1545 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1546 | (__x.columns[1] == __y.columns[1])); | ||
| 1547 | } | ||
| 1548 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y) { | ||
| 1549 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1550 | (__x.columns[1] == __y.columns[1]) & | ||
| 1551 | (__x.columns[2] == __y.columns[2])); | ||
| 1552 | } | ||
| 1553 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y) { | ||
| 1554 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1555 | (__x.columns[1] == __y.columns[1]) & | ||
| 1556 | (__x.columns[2] == __y.columns[2])); | ||
| 1557 | } | ||
| 1558 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y) { | ||
| 1559 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1560 | (__x.columns[1] == __y.columns[1]) & | ||
| 1561 | (__x.columns[2] == __y.columns[2])); | ||
| 1562 | } | ||
| 1563 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y) { | ||
| 1564 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1565 | (__x.columns[1] == __y.columns[1]) & | ||
| 1566 | (__x.columns[2] == __y.columns[2]) & | ||
| 1567 | (__x.columns[3] == __y.columns[3])); | ||
| 1568 | } | ||
| 1569 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y) { | ||
| 1570 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1571 | (__x.columns[1] == __y.columns[1]) & | ||
| 1572 | (__x.columns[2] == __y.columns[2]) & | ||
| 1573 | (__x.columns[3] == __y.columns[3])); | ||
| 1574 | } | ||
| 1575 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y) { | ||
| 1576 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1577 | (__x.columns[1] == __y.columns[1]) & | ||
| 1578 | (__x.columns[2] == __y.columns[2]) & | ||
| 1579 | (__x.columns[3] == __y.columns[3])); | ||
| 1580 | } | ||
| 1581 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y) { | ||
| 1582 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1583 | (__x.columns[1] == __y.columns[1])); | ||
| 1584 | } | ||
| 1585 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y) { | ||
| 1586 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1587 | (__x.columns[1] == __y.columns[1])); | ||
| 1588 | } | ||
| 1589 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y) { | ||
| 1590 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1591 | (__x.columns[1] == __y.columns[1])); | ||
| 1592 | } | ||
| 1593 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y) { | ||
| 1594 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1595 | (__x.columns[1] == __y.columns[1]) & | ||
| 1596 | (__x.columns[2] == __y.columns[2])); | ||
| 1597 | } | ||
| 1598 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y) { | ||
| 1599 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1600 | (__x.columns[1] == __y.columns[1]) & | ||
| 1601 | (__x.columns[2] == __y.columns[2])); | ||
| 1602 | } | ||
| 1603 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y) { | ||
| 1604 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1605 | (__x.columns[1] == __y.columns[1]) & | ||
| 1606 | (__x.columns[2] == __y.columns[2])); | ||
| 1607 | } | ||
| 1608 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y) { | ||
| 1609 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1610 | (__x.columns[1] == __y.columns[1]) & | ||
| 1611 | (__x.columns[2] == __y.columns[2]) & | ||
| 1612 | (__x.columns[3] == __y.columns[3])); | ||
| 1613 | } | ||
| 1614 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y) { | ||
| 1615 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1616 | (__x.columns[1] == __y.columns[1]) & | ||
| 1617 | (__x.columns[2] == __y.columns[2]) & | ||
| 1618 | (__x.columns[3] == __y.columns[3])); | ||
| 1619 | } | ||
| 1620 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y) { | ||
| 1621 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1622 | (__x.columns[1] == __y.columns[1]) & | ||
| 1623 | (__x.columns[2] == __y.columns[2]) & | ||
| 1624 | (__x.columns[3] == __y.columns[3])); | ||
| 1625 | } | ||
| 1626 | |||
| 1627 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol) { | ||
| 1628 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1629 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1630 | } | ||
| 1631 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol) { | ||
| 1632 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1633 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1634 | } | ||
| 1635 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol) { | ||
| 1636 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1637 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1638 | } | ||
| 1639 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol) { | ||
| 1640 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1641 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1642 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1643 | } | ||
| 1644 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol) { | ||
| 1645 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1646 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1647 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1648 | } | ||
| 1649 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol) { | ||
| 1650 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1651 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1652 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1653 | } | ||
| 1654 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol) { | ||
| 1655 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1656 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1657 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1658 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1659 | } | ||
| 1660 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol) { | ||
| 1661 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1662 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1663 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1664 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1665 | } | ||
| 1666 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol) { | ||
| 1667 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1668 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1669 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1670 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1671 | } | ||
| 1672 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol) { | ||
| 1673 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1674 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1675 | } | ||
| 1676 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol) { | ||
| 1677 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1678 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1679 | } | ||
| 1680 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol) { | ||
| 1681 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1682 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1683 | } | ||
| 1684 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol) { | ||
| 1685 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1686 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1687 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1688 | } | ||
| 1689 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol) { | ||
| 1690 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1691 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1692 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1693 | } | ||
| 1694 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol) { | ||
| 1695 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1696 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1697 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1698 | } | ||
| 1699 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol) { | ||
| 1700 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1701 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1702 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1703 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1704 | } | ||
| 1705 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol) { | ||
| 1706 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1707 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1708 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1709 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1710 | } | ||
| 1711 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol) { | ||
| 1712 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1713 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1714 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1715 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1716 | } | ||
| 1717 | |||
| 1718 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol) { | ||
| 1719 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1720 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1721 | } | ||
| 1722 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol) { | ||
| 1723 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1724 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1725 | } | ||
| 1726 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol) { | ||
| 1727 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1728 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1729 | } | ||
| 1730 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol) { | ||
| 1731 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1732 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1733 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1734 | } | ||
| 1735 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol) { | ||
| 1736 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1737 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1738 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1739 | } | ||
| 1740 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol) { | ||
| 1741 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1742 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1743 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1744 | } | ||
| 1745 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol) { | ||
| 1746 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1747 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1748 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1749 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1750 | } | ||
| 1751 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol) { | ||
| 1752 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1753 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1754 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1755 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1756 | } | ||
| 1757 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol) { | ||
| 1758 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1759 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1760 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1761 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1762 | } | ||
| 1763 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol) { | ||
| 1764 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1765 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1766 | } | ||
| 1767 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol) { | ||
| 1768 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1769 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1770 | } | ||
| 1771 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol) { | ||
| 1772 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1773 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1774 | } | ||
| 1775 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol) { | ||
| 1776 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1777 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1778 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1779 | } | ||
| 1780 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol) { | ||
| 1781 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1782 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1783 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1784 | } | ||
| 1785 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol) { | ||
| 1786 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1787 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1788 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1789 | } | ||
| 1790 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol) { | ||
| 1791 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1792 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1793 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1794 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1795 | } | ||
| 1796 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol) { | ||
| 1797 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1798 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1799 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1800 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1801 | } | ||
| 1802 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol) { | ||
| 1803 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1804 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1805 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1806 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1807 | } | ||
| 1808 | |||
| 1809 | #ifdef __cplusplus | ||
| 1810 | } | ||
| 1811 | #endif | ||
| 1812 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 1813 | #endif /* __SIMD_HEADER__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/matrix_types.h deleted-493| ... | @@ -1,493 +0,0 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * This header defines nine matrix types for each of float and double, which | ||
| 4 | * are intended for use together with the vector types defined in | ||
| 5 | * <simd/vector_types.h>. | ||
| 6 | * | ||
| 7 | * For compatibility with common graphics libraries, these matrices are stored | ||
| 8 | * in column-major order, and implemented as arrays of column vectors. | ||
| 9 | * Column-major storage order may seem a little strange if you aren't used to | ||
| 10 | * it, but for most usage the memory layout of the matrices shouldn't matter | ||
| 11 | * at all; instead you should think of matrices as abstract mathematical | ||
| 12 | * objects that you use to perform arithmetic without worrying about the | ||
| 13 | * details of the underlying representation. | ||
| 14 | * | ||
| 15 | * WARNING: vectors of length three are internally represented as length four | ||
| 16 | * vectors with one element of padding (for alignment purposes). This means | ||
| 17 | * that when a floatNx3 or doubleNx3 is viewed as a vector, it appears to | ||
| 18 | * have 4*N elements instead of the expected 3*N (with one padding element | ||
| 19 | * at the end of each column). The matrix elements are laid out in memory | ||
| 20 | * as follows: | ||
| 21 | * | ||
| 22 | * { 0, 1, 2, x, 3, 4, 5, x, ... } | ||
| 23 | * | ||
| 24 | * (where the scalar indices used above indicate the conceptual column- | ||
| 25 | * major storage order). If you aren't monkeying around with the internal | ||
| 26 | * storage details of matrices, you don't need to worry about this at all. | ||
| 27 | * Consider this yet another good reason to avoid doing so. */ | ||
| 28 | |||
| 29 | #ifndef SIMD_MATRIX_TYPES_HEADER | ||
| 30 | #define SIMD_MATRIX_TYPES_HEADER | ||
| 31 | |||
| 32 | #include <simd/types.h> | ||
| 33 | #include <simd/vector_make.h> | ||
| 34 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 35 | |||
| 36 | /* Matrix types available in C, Objective-C, and C++ */ | ||
| 37 | typedef simd_float2x2 matrix_float2x2; | ||
| 38 | typedef simd_float3x2 matrix_float3x2; | ||
| 39 | typedef simd_float4x2 matrix_float4x2; | ||
| 40 | |||
| 41 | typedef simd_float2x3 matrix_float2x3; | ||
| 42 | typedef simd_float3x3 matrix_float3x3; | ||
| 43 | typedef simd_float4x3 matrix_float4x3; | ||
| 44 | |||
| 45 | typedef simd_float2x4 matrix_float2x4; | ||
| 46 | typedef simd_float3x4 matrix_float3x4; | ||
| 47 | typedef simd_float4x4 matrix_float4x4; | ||
| 48 | |||
| 49 | typedef simd_double2x2 matrix_double2x2; | ||
| 50 | typedef simd_double3x2 matrix_double3x2; | ||
| 51 | typedef simd_double4x2 matrix_double4x2; | ||
| 52 | |||
| 53 | typedef simd_double2x3 matrix_double2x3; | ||
| 54 | typedef simd_double3x3 matrix_double3x3; | ||
| 55 | typedef simd_double4x3 matrix_double4x3; | ||
| 56 | |||
| 57 | typedef simd_double2x4 matrix_double2x4; | ||
| 58 | typedef simd_double3x4 matrix_double3x4; | ||
| 59 | typedef simd_double4x4 matrix_double4x4; | ||
| 60 | |||
| 61 | #ifdef __cplusplus | ||
| 62 | #if defined SIMD_MATRIX_HEADER | ||
| 63 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); | ||
| 64 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); | ||
| 65 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); | ||
| 66 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); | ||
| 67 | #endif | ||
| 68 | |||
| 69 | namespace simd { | ||
| 70 | |||
| 71 | struct float2x2 : ::simd_float2x2 { | ||
| 72 | float2x2() { columns[0] = 0; columns[1] = 0; } | ||
| 73 | #if __has_feature(cxx_delegating_constructors) | ||
| 74 | float2x2(float diagonal) : float2x2((float2)diagonal) { } | ||
| 75 | #endif | ||
| 76 | float2x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; } | ||
| 77 | float2x2(float2 c0, float2 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 78 | float2x2(::simd_float2x2 m) : ::simd_float2x2(m) { } | ||
| 79 | }; | ||
| 80 | |||
| 81 | struct float3x2 : ::simd_float3x2 { | ||
| 82 | float3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 83 | #if __has_feature(cxx_delegating_constructors) | ||
| 84 | float3x2(float diagonal) : float3x2((float2)diagonal) { } | ||
| 85 | #endif | ||
| 86 | float3x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; } | ||
| 87 | float3x2(float2 c0, float2 c1, float2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 88 | float3x2(::simd_float3x2 m) : ::simd_float3x2(m) { } | ||
| 89 | }; | ||
| 90 | |||
| 91 | struct float4x2 : ::simd_float4x2 { | ||
| 92 | float4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 93 | #if __has_feature(cxx_delegating_constructors) | ||
| 94 | float4x2(float diagonal) : float4x2((float2)diagonal) { } | ||
| 95 | #endif | ||
| 96 | float4x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; columns[3] = 0; } | ||
| 97 | float4x2(float2 c0, float2 c1, float2 c2, float2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 98 | float4x2(::simd_float4x2 m) : ::simd_float4x2(m) { } | ||
| 99 | }; | ||
| 100 | |||
| 101 | struct float2x3 : ::simd_float2x3 { | ||
| 102 | float2x3() { columns[0] = 0; columns[1] = 0; } | ||
| 103 | #if __has_feature(cxx_delegating_constructors) | ||
| 104 | float2x3(float diagonal) : float2x3((float2)diagonal) { } | ||
| 105 | #endif | ||
| 106 | float2x3(float2 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; } | ||
| 107 | float2x3(float3 c0, float3 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 108 | float2x3(::simd_float2x3 m) : ::simd_float2x3(m) { } | ||
| 109 | }; | ||
| 110 | |||
| 111 | struct float3x3 : ::simd_float3x3 { | ||
| 112 | float3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 113 | #if __has_feature(cxx_delegating_constructors) | ||
| 114 | float3x3(float diagonal) : float3x3((float3)diagonal) { } | ||
| 115 | #endif | ||
| 116 | float3x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; } | ||
| 117 | float3x3(float3 c0, float3 c1, float3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 118 | float3x3(::simd_float3x3 m) : ::simd_float3x3(m) { } | ||
| 119 | #if defined SIMD_MATRIX_HEADER | ||
| 120 | float3x3(::simd_quatf q) : ::simd_float3x3(::simd_matrix3x3(q)) { } | ||
| 121 | #endif | ||
| 122 | }; | ||
| 123 | |||
| 124 | struct float4x3 : ::simd_float4x3 { | ||
| 125 | float4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 126 | #if __has_feature(cxx_delegating_constructors) | ||
| 127 | float4x3(float diagonal) : float4x3((float3)diagonal) { } | ||
| 128 | #endif | ||
| 129 | float4x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; columns[3] = 0; } | ||
| 130 | float4x3(float3 c0, float3 c1, float3 c2, float3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 131 | float4x3(::simd_float4x3 m) : ::simd_float4x3(m) { } | ||
| 132 | }; | ||
| 133 | |||
| 134 | struct float2x4 : ::simd_float2x4 { | ||
| 135 | float2x4() { columns[0] = 0; columns[1] = 0; } | ||
| 136 | #if __has_feature(cxx_delegating_constructors) | ||
| 137 | float2x4(float diagonal) : float2x4((float2)diagonal) { } | ||
| 138 | #endif | ||
| 139 | float2x4(float2 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; } | ||
| 140 | float2x4(float4 c0, float4 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 141 | float2x4(::simd_float2x4 m) : ::simd_float2x4(m) { } | ||
| 142 | }; | ||
| 143 | |||
| 144 | struct float3x4 : ::simd_float3x4 { | ||
| 145 | float3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 146 | #if __has_feature(cxx_delegating_constructors) | ||
| 147 | float3x4(float diagonal) : float3x4((float3)diagonal) { } | ||
| 148 | #endif | ||
| 149 | float3x4(float3 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; } | ||
| 150 | float3x4(float4 c0, float4 c1, float4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 151 | float3x4(::simd_float3x4 m) : ::simd_float3x4(m) { } | ||
| 152 | }; | ||
| 153 | |||
| 154 | struct float4x4 : ::simd_float4x4 { | ||
| 155 | float4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 156 | #if __has_feature(cxx_delegating_constructors) | ||
| 157 | float4x4(float diagonal) : float4x4((float4)diagonal) { } | ||
| 158 | #endif | ||
| 159 | float4x4(float4 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; columns[3] = (float4){0,0,0,v.w}; } | ||
| 160 | float4x4(float4 c0, float4 c1, float4 c2, float4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 161 | float4x4(::simd_float4x4 m) : ::simd_float4x4(m) { } | ||
| 162 | #if defined SIMD_MATRIX_HEADER | ||
| 163 | float4x4(::simd_quatf q) : ::simd_float4x4(::simd_matrix4x4(q)) { } | ||
| 164 | #endif | ||
| 165 | }; | ||
| 166 | |||
| 167 | struct double2x2 : ::simd_double2x2 { | ||
| 168 | double2x2() { columns[0] = 0; columns[1] = 0; } | ||
| 169 | #if __has_feature(cxx_delegating_constructors) | ||
| 170 | double2x2(double diagonal) : double2x2((double2)diagonal) { } | ||
| 171 | #endif | ||
| 172 | double2x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; } | ||
| 173 | double2x2(double2 c0, double2 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 174 | double2x2(::simd_double2x2 m) : ::simd_double2x2(m) { } | ||
| 175 | }; | ||
| 176 | |||
| 177 | struct double3x2 : ::simd_double3x2 { | ||
| 178 | double3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 179 | #if __has_feature(cxx_delegating_constructors) | ||
| 180 | double3x2(double diagonal) : double3x2((double2)diagonal) { } | ||
| 181 | #endif | ||
| 182 | double3x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; } | ||
| 183 | double3x2(double2 c0, double2 c1, double2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 184 | double3x2(::simd_double3x2 m) : ::simd_double3x2(m) { } | ||
| 185 | }; | ||
| 186 | |||
| 187 | struct double4x2 : ::simd_double4x2 { | ||
| 188 | double4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 189 | #if __has_feature(cxx_delegating_constructors) | ||
| 190 | double4x2(double diagonal) : double4x2((double2)diagonal) { } | ||
| 191 | #endif | ||
| 192 | double4x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; columns[3] = 0; } | ||
| 193 | double4x2(double2 c0, double2 c1, double2 c2, double2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 194 | double4x2(::simd_double4x2 m) : ::simd_double4x2(m) { } | ||
| 195 | }; | ||
| 196 | |||
| 197 | struct double2x3 : ::simd_double2x3 { | ||
| 198 | double2x3() { columns[0] = 0; columns[1] = 0; } | ||
| 199 | #if __has_feature(cxx_delegating_constructors) | ||
| 200 | double2x3(double diagonal) : double2x3((double2)diagonal) { } | ||
| 201 | #endif | ||
| 202 | double2x3(double2 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; } | ||
| 203 | double2x3(double3 c0, double3 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 204 | double2x3(::simd_double2x3 m) : ::simd_double2x3(m) { } | ||
| 205 | }; | ||
| 206 | |||
| 207 | struct double3x3 : ::simd_double3x3 { | ||
| 208 | double3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 209 | #if __has_feature(cxx_delegating_constructors) | ||
| 210 | double3x3(double diagonal) : double3x3((double3)diagonal) { } | ||
| 211 | #endif | ||
| 212 | double3x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; } | ||
| 213 | double3x3(double3 c0, double3 c1, double3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 214 | double3x3(::simd_double3x3 m) : ::simd_double3x3(m) { } | ||
| 215 | #if defined SIMD_MATRIX_HEADER | ||
| 216 | double3x3(::simd_quatd q) : ::simd_double3x3(::simd_matrix3x3(q)) { } | ||
| 217 | #endif | ||
| 218 | }; | ||
| 219 | |||
| 220 | struct double4x3 : ::simd_double4x3 { | ||
| 221 | double4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 222 | #if __has_feature(cxx_delegating_constructors) | ||
| 223 | double4x3(double diagonal) : double4x3((double3)diagonal) { } | ||
| 224 | #endif | ||
| 225 | double4x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; columns[3] = 0; } | ||
| 226 | double4x3(double3 c0, double3 c1, double3 c2, double3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 227 | double4x3(::simd_double4x3 m) : ::simd_double4x3(m) { } | ||
| 228 | }; | ||
| 229 | |||
| 230 | struct double2x4 : ::simd_double2x4 { | ||
| 231 | double2x4() { columns[0] = 0; columns[1] = 0; } | ||
| 232 | #if __has_feature(cxx_delegating_constructors) | ||
| 233 | double2x4(double diagonal) : double2x4((double2)diagonal) { } | ||
| 234 | #endif | ||
| 235 | double2x4(double2 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; } | ||
| 236 | double2x4(double4 c0, double4 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 237 | double2x4(::simd_double2x4 m) : ::simd_double2x4(m) { } | ||
| 238 | }; | ||
| 239 | |||
| 240 | struct double3x4 : ::simd_double3x4 { | ||
| 241 | double3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 242 | #if __has_feature(cxx_delegating_constructors) | ||
| 243 | double3x4(double diagonal) : double3x4((double3)diagonal) { } | ||
| 244 | #endif | ||
| 245 | double3x4(double3 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; } | ||
| 246 | double3x4(double4 c0, double4 c1, double4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 247 | double3x4(::simd_double3x4 m) : ::simd_double3x4(m) { } | ||
| 248 | }; | ||
| 249 | |||
| 250 | struct double4x4 : ::simd_double4x4 { | ||
| 251 | double4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 252 | #if __has_feature(cxx_delegating_constructors) | ||
| 253 | double4x4(double diagonal) : double4x4((double4)diagonal) { } | ||
| 254 | #endif | ||
| 255 | double4x4(double4 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; columns[3] = (double4){0,0,0,v.w}; } | ||
| 256 | double4x4(double4 c0, double4 c1, double4 c2, double4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 257 | double4x4(::simd_double4x4 m) : ::simd_double4x4(m) { } | ||
| 258 | #if defined SIMD_MATRIX_HEADER | ||
| 259 | double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { } | ||
| 260 | #endif | ||
| 261 | }; | ||
| 262 | |||
| 263 | /*! @abstract Templated Matrix struct based on scalar type and number of columns and rows. */ | ||
| 264 | template <typename ScalarType, size_t col, size_t row> struct Matrix { | ||
| 265 | // static const size_t col | ||
| 266 | // static const size_t row | ||
| 267 | // typedef scalar_t | ||
| 268 | // typedef type | ||
| 269 | }; | ||
| 270 | /*! @abstract Helper type to access the simd type easily. */ | ||
| 271 | template <typename ScalarType, size_t col, size_t row> | ||
| 272 | using Matrix_t = typename Matrix<ScalarType, col, row>::type; | ||
| 273 | |||
| 274 | template<> struct Matrix<float, 2, 2> { | ||
| 275 | static const size_t col = 2; | ||
| 276 | static const size_t row = 2; | ||
| 277 | typedef float scalar_t; | ||
| 278 | typedef float2x2 type; | ||
| 279 | }; | ||
| 280 | |||
| 281 | template<> struct Matrix<float, 3, 2> { | ||
| 282 | static const size_t col = 3; | ||
| 283 | static const size_t row = 2; | ||
| 284 | typedef float scalar_t; | ||
| 285 | typedef float3x2 type; | ||
| 286 | }; | ||
| 287 | |||
| 288 | template<> struct Matrix<float, 4, 2> { | ||
| 289 | static const size_t col = 4; | ||
| 290 | static const size_t row = 2; | ||
| 291 | typedef float scalar_t; | ||
| 292 | typedef float4x2 type; | ||
| 293 | }; | ||
| 294 | |||
| 295 | template<> struct Matrix<float, 2, 3> { | ||
| 296 | static const size_t col = 2; | ||
| 297 | static const size_t row = 3; | ||
| 298 | typedef float scalar_t; | ||
| 299 | typedef float2x3 type; | ||
| 300 | }; | ||
| 301 | |||
| 302 | template<> struct Matrix<float, 3, 3> { | ||
| 303 | static const size_t col = 3; | ||
| 304 | static const size_t row = 3; | ||
| 305 | typedef float scalar_t; | ||
| 306 | typedef float3x3 type; | ||
| 307 | }; | ||
| 308 | |||
| 309 | template<> struct Matrix<float, 4, 3> { | ||
| 310 | static const size_t col = 4; | ||
| 311 | static const size_t row = 3; | ||
| 312 | typedef float scalar_t; | ||
| 313 | typedef float4x3 type; | ||
| 314 | }; | ||
| 315 | |||
| 316 | template<> struct Matrix<float, 2, 4> { | ||
| 317 | static const size_t col = 2; | ||
| 318 | static const size_t row = 4; | ||
| 319 | typedef float scalar_t; | ||
| 320 | typedef float2x4 type; | ||
| 321 | }; | ||
| 322 | |||
| 323 | template<> struct Matrix<float, 3, 4> { | ||
| 324 | static const size_t col = 3; | ||
| 325 | static const size_t row = 4; | ||
| 326 | typedef float scalar_t; | ||
| 327 | typedef float3x4 type; | ||
| 328 | }; | ||
| 329 | |||
| 330 | template<> struct Matrix<float, 4, 4> { | ||
| 331 | static const size_t col = 4; | ||
| 332 | static const size_t row = 4; | ||
| 333 | typedef float scalar_t; | ||
| 334 | typedef float4x4 type; | ||
| 335 | }; | ||
| 336 | |||
| 337 | template<> struct Matrix<double, 2, 2> { | ||
| 338 | static const size_t col = 2; | ||
| 339 | static const size_t row = 2; | ||
| 340 | typedef double scalar_t; | ||
| 341 | typedef double2x2 type; | ||
| 342 | }; | ||
| 343 | |||
| 344 | template<> struct Matrix<double, 3, 2> { | ||
| 345 | static const size_t col = 3; | ||
| 346 | static const size_t row = 2; | ||
| 347 | typedef double scalar_t; | ||
| 348 | typedef double3x2 type; | ||
| 349 | }; | ||
| 350 | |||
| 351 | template<> struct Matrix<double, 4, 2> { | ||
| 352 | static const size_t col = 4; | ||
| 353 | static const size_t row = 2; | ||
| 354 | typedef double scalar_t; | ||
| 355 | typedef double4x2 type; | ||
| 356 | }; | ||
| 357 | |||
| 358 | template<> struct Matrix<double, 2, 3> { | ||
| 359 | static const size_t col = 2; | ||
| 360 | static const size_t row = 3; | ||
| 361 | typedef double scalar_t; | ||
| 362 | typedef double2x3 type; | ||
| 363 | }; | ||
| 364 | |||
| 365 | template<> struct Matrix<double, 3, 3> { | ||
| 366 | static const size_t col = 3; | ||
| 367 | static const size_t row = 3; | ||
| 368 | typedef double scalar_t; | ||
| 369 | typedef double3x3 type; | ||
| 370 | }; | ||
| 371 | |||
| 372 | template<> struct Matrix<double, 4, 3> { | ||
| 373 | static const size_t col = 4; | ||
| 374 | static const size_t row = 3; | ||
| 375 | typedef double scalar_t; | ||
| 376 | typedef double4x3 type; | ||
| 377 | }; | ||
| 378 | |||
| 379 | template<> struct Matrix<double, 2, 4> { | ||
| 380 | static const size_t col = 2; | ||
| 381 | static const size_t row = 4; | ||
| 382 | typedef double scalar_t; | ||
| 383 | typedef double2x4 type; | ||
| 384 | }; | ||
| 385 | |||
| 386 | template<> struct Matrix<double, 3, 4> { | ||
| 387 | static const size_t col = 3; | ||
| 388 | static const size_t row = 4; | ||
| 389 | typedef double scalar_t; | ||
| 390 | typedef double3x4 type; | ||
| 391 | }; | ||
| 392 | |||
| 393 | template<> struct Matrix<double, 4, 4> { | ||
| 394 | static const size_t col = 4; | ||
| 395 | static const size_t row = 4; | ||
| 396 | typedef double scalar_t; | ||
| 397 | typedef double4x4 type; | ||
| 398 | }; | ||
| 399 | |||
| 400 | template <> struct get_traits<float2x2> | ||
| 401 | { | ||
| 402 | using type = Matrix<float, 2, 2>; | ||
| 403 | }; | ||
| 404 | |||
| 405 | template <> struct get_traits<float3x2> | ||
| 406 | { | ||
| 407 | using type = Matrix<float, 3, 2>; | ||
| 408 | }; | ||
| 409 | |||
| 410 | template <> struct get_traits<float4x2> | ||
| 411 | { | ||
| 412 | using type = Matrix<float, 4, 2>; | ||
| 413 | }; | ||
| 414 | |||
| 415 | template <> struct get_traits<float2x3> | ||
| 416 | { | ||
| 417 | using type = Matrix<float, 2, 3>; | ||
| 418 | }; | ||
| 419 | |||
| 420 | template <> struct get_traits<float3x3> | ||
| 421 | { | ||
| 422 | using type = Matrix<float, 3, 3>; | ||
| 423 | }; | ||
| 424 | |||
| 425 | template <> struct get_traits<float4x3> | ||
| 426 | { | ||
| 427 | using type = Matrix<float, 4, 3>; | ||
| 428 | }; | ||
| 429 | |||
| 430 | template <> struct get_traits<float2x4> | ||
| 431 | { | ||
| 432 | using type = Matrix<float, 2, 4>; | ||
| 433 | }; | ||
| 434 | |||
| 435 | template <> struct get_traits<float3x4> | ||
| 436 | { | ||
| 437 | using type = Matrix<float, 3, 4>; | ||
| 438 | }; | ||
| 439 | |||
| 440 | template <> struct get_traits<float4x4> | ||
| 441 | { | ||
| 442 | using type = Matrix<float, 4, 4>; | ||
| 443 | }; | ||
| 444 | |||
| 445 | template <> struct get_traits<double2x2> | ||
| 446 | { | ||
| 447 | using type = Matrix<double, 2, 2>; | ||
| 448 | }; | ||
| 449 | |||
| 450 | template <> struct get_traits<double3x2> | ||
| 451 | { | ||
| 452 | using type = Matrix<double, 3, 2>; | ||
| 453 | }; | ||
| 454 | |||
| 455 | template <> struct get_traits<double4x2> | ||
| 456 | { | ||
| 457 | using type = Matrix<double, 4, 2>; | ||
| 458 | }; | ||
| 459 | |||
| 460 | template <> struct get_traits<double2x3> | ||
| 461 | { | ||
| 462 | using type = Matrix<double, 2, 3>; | ||
| 463 | }; | ||
| 464 | |||
| 465 | template <> struct get_traits<double3x3> | ||
| 466 | { | ||
| 467 | using type = Matrix<double, 3, 3>; | ||
| 468 | }; | ||
| 469 | |||
| 470 | template <> struct get_traits<double4x3> | ||
| 471 | { | ||
| 472 | using type = Matrix<double, 4, 3>; | ||
| 473 | }; | ||
| 474 | |||
| 475 | template <> struct get_traits<double2x4> | ||
| 476 | { | ||
| 477 | using type = Matrix<double, 2, 4>; | ||
| 478 | }; | ||
| 479 | |||
| 480 | template <> struct get_traits<double3x4> | ||
| 481 | { | ||
| 482 | using type = Matrix<double, 3, 4>; | ||
| 483 | }; | ||
| 484 | |||
| 485 | template <> struct get_traits<double4x4> | ||
| 486 | { | ||
| 487 | using type = Matrix<double, 4, 4>; | ||
| 488 | }; | ||
| 489 | |||
| 490 | } | ||
| 491 | #endif /* __cplusplus */ | ||
| 492 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 493 | #endif /* SIMD_MATRIX_TYPES_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/quaternion.h deleted-1194| ... | @@ -1,1194 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines functions for constructing and using quaternions. | ||
| 3 | * @copyright 2015-2016 Apple, Inc. All rights reserved. | ||
| 4 | * @unsorted */ | ||
| 5 | |||
| 6 | #ifndef SIMD_QUATERNIONS | ||
| 7 | #define SIMD_QUATERNIONS | ||
| 8 | |||
| 9 | #include <simd/base.h> | ||
| 10 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 11 | #include <simd/vector.h> | ||
| 12 | #include <simd/types.h> | ||
| 13 | |||
| 14 | #ifdef __cplusplus | ||
| 15 | extern "C" { | ||
| 16 | #endif | ||
| 17 | |||
| 18 | /* MARK: - C and Objective-C float interfaces */ | ||
| 19 | |||
| 20 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 21 | * | ||
| 22 | * @param ix The first component of the imaginary (vector) part. | ||
| 23 | * @param iy The second component of the imaginary (vector) part. | ||
| 24 | * @param iz The third component of the imaginary (vector) part. | ||
| 25 | * | ||
| 26 | * @param r The real (scalar) part. */ | ||
| 27 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float ix, float iy, float iz, float r) { | ||
| 28 | return (simd_quatf){ { ix, iy, iz, r } }; | ||
| 29 | } | ||
| 30 | |||
| 31 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 32 | * | ||
| 33 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 34 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 35 | static inline SIMD_NONCONST simd_quatf simd_quaternion(const float xyzr[4]) { | ||
| 36 | return (simd_quatf){ *(const simd_packed_float4 *)xyzr }; | ||
| 37 | } | ||
| 38 | |||
| 39 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 40 | * | ||
| 41 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 42 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 43 | * lane 3. */ | ||
| 44 | static inline SIMD_CFUNC simd_quatf simd_quaternion(simd_float4 xyzr) { | ||
| 45 | return (simd_quatf){ xyzr }; | ||
| 46 | } | ||
| 47 | |||
| 48 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 49 | * `axis`. */ | ||
| 50 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis); | ||
| 51 | |||
| 52 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 53 | * | ||
| 54 | * @param from A normalized three-element vector. | ||
| 55 | * @param to A normalized three-element vector. | ||
| 56 | * | ||
| 57 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 58 | * `to` point in opposite directions (to within machine precision), an | ||
| 59 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 60 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to); | ||
| 61 | |||
| 62 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 63 | * | ||
| 64 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 65 | * is undefined. */ | ||
| 66 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix); | ||
| 67 | |||
| 68 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 69 | * | ||
| 70 | * @discussion The last row and column of the matrix are ignored. This | ||
| 71 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 72 | * submatrix . */ | ||
| 73 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix); | ||
| 74 | |||
| 75 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 76 | static inline SIMD_CFUNC float simd_real(simd_quatf q) { | ||
| 77 | return q.vector.w; | ||
| 78 | } | ||
| 79 | |||
| 80 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 81 | static inline SIMD_CFUNC simd_float3 simd_imag(simd_quatf q) { | ||
| 82 | return q.vector.xyz; | ||
| 83 | } | ||
| 84 | |||
| 85 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 86 | static inline SIMD_CFUNC float simd_angle(simd_quatf q); | ||
| 87 | |||
| 88 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 89 | * action of the quaternion `q` rotates. */ | ||
| 90 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q); | ||
| 91 | |||
| 92 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 93 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q); | ||
| 94 | |||
| 95 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 96 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q); | ||
| 97 | |||
| 98 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 99 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q); | ||
| 100 | |||
| 101 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 102 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a); | ||
| 103 | |||
| 104 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 105 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q); | ||
| 106 | |||
| 107 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 108 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q); | ||
| 109 | |||
| 110 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 111 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q); | ||
| 112 | |||
| 113 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 114 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q); | ||
| 115 | |||
| 116 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 117 | * four-dimensional vectors. */ | ||
| 118 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q); | ||
| 119 | |||
| 120 | /*! @abstract The length of the quaternion `q`. */ | ||
| 121 | static inline SIMD_CFUNC float simd_length(simd_quatf q); | ||
| 122 | |||
| 123 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 124 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q); | ||
| 125 | |||
| 126 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 127 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v); | ||
| 128 | |||
| 129 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 130 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 131 | * | ||
| 132 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 133 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 134 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 135 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 136 | * | ||
| 137 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 138 | * quaternions, because it is primarily used for spline interpolation of | ||
| 139 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 140 | * quaternions, you can use the following approach: | ||
| 141 | * | ||
| 142 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 143 | * logq = log(simd_recip(scale)*q); | ||
| 144 | * logq.real += log(scale); | ||
| 145 | * return logq; */ | ||
| 146 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q); | ||
| 147 | |||
| 148 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 149 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 150 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q); | ||
| 151 | |||
| 152 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 153 | * quaternions `q0` and `q1`. */ | ||
| 154 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t); | ||
| 155 | |||
| 156 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 157 | * quaternions `q0` and `q1`. */ | ||
| 158 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t); | ||
| 159 | |||
| 160 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 161 | * | ||
| 162 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 163 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 164 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 165 | * rotations. */ | ||
| 166 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 167 | |||
| 168 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 169 | * | ||
| 170 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 171 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 172 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 173 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 174 | * curve does not hold on the sphere. */ | ||
| 175 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t); | ||
| 176 | |||
| 177 | #ifdef __cplusplus | ||
| 178 | } /* extern "C" */ | ||
| 179 | /* MARK: - C++ float interfaces */ | ||
| 180 | |||
| 181 | namespace simd { | ||
| 182 | struct quatf : ::simd_quatf { | ||
| 183 | /*! @abstract The identity quaternion. */ | ||
| 184 | quatf( ) : ::simd_quatf(::simd_quaternion((float4){0,0,0,1})) { } | ||
| 185 | |||
| 186 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 187 | quatf(::simd_quatf q) : ::simd_quatf(q) { } | ||
| 188 | |||
| 189 | /*! @abstract Constructs a quaternion from components. */ | ||
| 190 | quatf(float ix, float iy, float iz, float r) : ::simd_quatf(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 191 | |||
| 192 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 193 | quatf(const float xyzr[4]) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 194 | |||
| 195 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 196 | quatf(float4 xyzr) : ::simd_quatf(::simd_quaternion(xyzr)) { } | ||
| 197 | |||
| 198 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 199 | * radians. */ | ||
| 200 | quatf(float angle, float3 axis) : ::simd_quatf(::simd_quaternion(angle, axis)) { } | ||
| 201 | |||
| 202 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 203 | quatf(float3 from, float3 to) : ::simd_quatf(::simd_quaternion(from, to)) { } | ||
| 204 | |||
| 205 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 206 | quatf(::simd_float3x3 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 207 | |||
| 208 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 209 | quatf(::simd_float4x4 matrix) : ::simd_quatf(::simd_quaternion(matrix)) { } | ||
| 210 | |||
| 211 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 212 | float real(void) const { return ::simd_real(*this); } | ||
| 213 | |||
| 214 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 215 | float3 imag(void) const { return ::simd_imag(*this); } | ||
| 216 | |||
| 217 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 218 | float angle(void) const { return ::simd_angle(*this); } | ||
| 219 | |||
| 220 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 221 | float3 axis(void) const { return ::simd_axis(*this); } | ||
| 222 | |||
| 223 | /*! @abstract The length of the quaternion. */ | ||
| 224 | float length(void) const { return ::simd_length(*this); } | ||
| 225 | |||
| 226 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 227 | float3 operator()(const ::simd_float3 v) const { return ::simd_act(*this, v); } | ||
| 228 | }; | ||
| 229 | |||
| 230 | static SIMD_CPPFUNC quatf operator+(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_add(p, q); } | ||
| 231 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_sub(p, q); } | ||
| 232 | static SIMD_CPPFUNC quatf operator-(const ::simd_quatf p) { return ::simd_negate(p); } | ||
| 233 | static SIMD_CPPFUNC quatf operator*(const float r, const ::simd_quatf p) { return ::simd_mul(r, p); } | ||
| 234 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const float r) { return ::simd_mul(p, r); } | ||
| 235 | static SIMD_CPPFUNC quatf operator*(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, q); } | ||
| 236 | static SIMD_CPPFUNC quatf operator/(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 237 | static SIMD_CPPFUNC quatf operator+=(quatf &p, const ::simd_quatf q) { return p = p+q; } | ||
| 238 | static SIMD_CPPFUNC quatf operator-=(quatf &p, const ::simd_quatf q) { return p = p-q; } | ||
| 239 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const float r) { return p = p*r; } | ||
| 240 | static SIMD_CPPFUNC quatf operator*=(quatf &p, const ::simd_quatf q) { return p = p*q; } | ||
| 241 | static SIMD_CPPFUNC quatf operator/=(quatf &p, const ::simd_quatf q) { return p = p/q; } | ||
| 242 | |||
| 243 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 244 | static SIMD_CPPFUNC quatf conjugate(const ::simd_quatf p) { return ::simd_conjugate(p); } | ||
| 245 | |||
| 246 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 247 | static SIMD_CPPFUNC quatf inverse(const ::simd_quatf p) { return ::simd_inverse(p); } | ||
| 248 | |||
| 249 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 250 | * four-dimensional vectors. */ | ||
| 251 | static SIMD_CPPFUNC float dot(const ::simd_quatf p, const ::simd_quatf q) { return ::simd_dot(p, q); } | ||
| 252 | |||
| 253 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 254 | static SIMD_CPPFUNC quatf normalize(const ::simd_quatf p) { return ::simd_normalize(p); } | ||
| 255 | |||
| 256 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 257 | static SIMD_CPPFUNC quatf log(const ::simd_quatf q) { return ::__tg_log(q); } | ||
| 258 | |||
| 259 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 260 | static SIMD_CPPFUNC quatf exp(const ::simd_quatf q) { return ::__tg_exp(q); } | ||
| 261 | |||
| 262 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 263 | * quaternions `q0` and `q1`. */ | ||
| 264 | static SIMD_CPPFUNC quatf slerp(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp(p0, p1, t); } | ||
| 265 | |||
| 266 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 267 | * quaternions `q0` and `q1`. */ | ||
| 268 | static SIMD_CPPFUNC quatf slerp_longest(const ::simd_quatf p0, const ::simd_quatf p1, float t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 269 | |||
| 270 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 271 | * | ||
| 272 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 273 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 274 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 275 | * rotations. */ | ||
| 276 | static SIMD_CPPFUNC quatf spline(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 277 | |||
| 278 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 279 | * | ||
| 280 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 281 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 282 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 283 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 284 | * curve does not hold on the sphere. */ | ||
| 285 | static SIMD_CPPFUNC quatf bezier(const ::simd_quatf p0, const ::simd_quatf p1, const ::simd_quatf p2, const ::simd_quatf p3, float t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 286 | } | ||
| 287 | |||
| 288 | extern "C" { | ||
| 289 | #endif /* __cplusplus */ | ||
| 290 | |||
| 291 | /* MARK: - float implementations */ | ||
| 292 | |||
| 293 | #include <simd/math.h> | ||
| 294 | #include <simd/geometry.h> | ||
| 295 | |||
| 296 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 297 | * dispatching in tgmath.h to work its magic. */ | ||
| 298 | static simd_quatf __attribute__((__overloadable__)) __tg_promote(simd_quatf); | ||
| 299 | |||
| 300 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 301 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 302 | * with the angle-axis constructor. */ | ||
| 303 | static inline SIMD_CFUNC simd_quatf _simd_quaternion(simd_float3 imag, float real) { | ||
| 304 | return simd_quaternion(simd_make_float4(imag, real)); | ||
| 305 | } | ||
| 306 | |||
| 307 | static inline SIMD_CFUNC simd_quatf simd_quaternion(float angle, simd_float3 axis) { | ||
| 308 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 309 | } | ||
| 310 | |||
| 311 | static inline SIMD_CFUNC float simd_angle(simd_quatf q) { | ||
| 312 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 313 | } | ||
| 314 | |||
| 315 | static inline SIMD_CFUNC simd_float3 simd_axis(simd_quatf q) { | ||
| 316 | return simd_normalize(q.vector.xyz); | ||
| 317 | } | ||
| 318 | |||
| 319 | static inline SIMD_CFUNC simd_quatf simd_add(simd_quatf p, simd_quatf q) { | ||
| 320 | return simd_quaternion(p.vector + q.vector); | ||
| 321 | } | ||
| 322 | |||
| 323 | static inline SIMD_CFUNC simd_quatf simd_sub(simd_quatf p, simd_quatf q) { | ||
| 324 | return simd_quaternion(p.vector - q.vector); | ||
| 325 | } | ||
| 326 | |||
| 327 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf p, simd_quatf q) { | ||
| 328 | #pragma STDC FP_CONTRACT ON | ||
| 329 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 330 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 331 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 332 | p.vector.w * q.vector)); | ||
| 333 | } | ||
| 334 | |||
| 335 | static inline SIMD_CFUNC simd_quatf simd_mul(simd_quatf q, float a) { | ||
| 336 | return simd_quaternion(a * q.vector); | ||
| 337 | } | ||
| 338 | |||
| 339 | static inline SIMD_CFUNC simd_quatf simd_mul(float a, simd_quatf q) { | ||
| 340 | return simd_mul(q,a); | ||
| 341 | } | ||
| 342 | |||
| 343 | static inline SIMD_CFUNC simd_quatf simd_conjugate(simd_quatf q) { | ||
| 344 | return simd_quaternion(q.vector * (simd_float4){-1,-1,-1, 1}); | ||
| 345 | } | ||
| 346 | |||
| 347 | static inline SIMD_CFUNC simd_quatf simd_inverse(simd_quatf q) { | ||
| 348 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 349 | } | ||
| 350 | |||
| 351 | static inline SIMD_CFUNC simd_quatf simd_negate(simd_quatf q) { | ||
| 352 | return simd_quaternion(-q.vector); | ||
| 353 | } | ||
| 354 | |||
| 355 | static inline SIMD_CFUNC float simd_dot(simd_quatf p, simd_quatf q) { | ||
| 356 | return simd_dot(p.vector, q.vector); | ||
| 357 | } | ||
| 358 | |||
| 359 | static inline SIMD_CFUNC float simd_length(simd_quatf q) { | ||
| 360 | return simd_length(q.vector); | ||
| 361 | } | ||
| 362 | |||
| 363 | static inline SIMD_CFUNC simd_quatf simd_normalize(simd_quatf q) { | ||
| 364 | float length_squared = simd_length_squared(q.vector); | ||
| 365 | if (length_squared == 0) { | ||
| 366 | return simd_quaternion((simd_float4){0,0,0,1}); | ||
| 367 | } | ||
| 368 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 369 | } | ||
| 370 | |||
| 371 | #if defined __arm__ || defined __arm64__ | ||
| 372 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 373 | * | ||
| 374 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 375 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 376 | * implementation detail and you should not call it directly. It may be | ||
| 377 | * removed or modified in future versions of the simd module. */ | ||
| 378 | static inline SIMD_CFUNC simd_quatf _simd_mul_vq(simd_float3 v, simd_quatf q) { | ||
| 379 | #pragma STDC FP_CONTRACT ON | ||
| 380 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 381 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 382 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 383 | } | ||
| 384 | #endif | ||
| 385 | |||
| 386 | static inline SIMD_CFUNC simd_float3 simd_act(simd_quatf q, simd_float3 v) { | ||
| 387 | #if defined __arm__ || defined __arm64__ | ||
| 388 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 389 | #else | ||
| 390 | #pragma STDC FP_CONTRACT ON | ||
| 391 | simd_float3 t = 2*simd_cross(simd_imag(q),v); | ||
| 392 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 393 | #endif | ||
| 394 | } | ||
| 395 | |||
| 396 | static SIMD_NOINLINE simd_quatf __tg_log(simd_quatf q) { | ||
| 397 | float real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 398 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 399 | simd_float3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 400 | return _simd_quaternion(imag, real); | ||
| 401 | } | ||
| 402 | |||
| 403 | static SIMD_NOINLINE simd_quatf __tg_exp(simd_quatf q) { | ||
| 404 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 405 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 406 | // axis) constructor to generate `unit`. | ||
| 407 | float angle = simd_length(simd_imag(q)); | ||
| 408 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 409 | simd_float3 axis = simd_normalize(simd_imag(q)); | ||
| 410 | simd_quatf unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 411 | return simd_mul(exp(simd_real(q)), unit); | ||
| 412 | } | ||
| 413 | |||
| 414 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 415 | * initializer. | ||
| 416 | * | ||
| 417 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 418 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 419 | * angles. This function is an implementation detail and you should not | ||
| 420 | * call it directly. It may be removed or modified in future versions of the | ||
| 421 | * simd module. */ | ||
| 422 | static inline SIMD_CFUNC simd_quatf _simd_quaternion_reduced(simd_float3 from, simd_float3 to) { | ||
| 423 | simd_float3 half = simd_normalize(from + to); | ||
| 424 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 425 | } | ||
| 426 | |||
| 427 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3 from, simd_float3 to) { | ||
| 428 | |||
| 429 | // If the angle between from and to is not too big, we can compute the | ||
| 430 | // rotation accurately using a simple implementation. | ||
| 431 | if (simd_dot(from, to) >= 0) { | ||
| 432 | return _simd_quaternion_reduced(from, to); | ||
| 433 | } | ||
| 434 | |||
| 435 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 436 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 437 | // accuracy. | ||
| 438 | simd_float3 half = simd_normalize(from) + simd_normalize(to); | ||
| 439 | |||
| 440 | if (simd_length_squared(half) <= 0x1p-46f) { | ||
| 441 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 442 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 443 | // to the vectors, and use an angle of pi radians. | ||
| 444 | simd_float3 abs_from = simd_abs(from); | ||
| 445 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 446 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){1,0,0})), 0.f); | ||
| 447 | else if (abs_from.y <= abs_from.z) | ||
| 448 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,1,0})), 0.f); | ||
| 449 | else | ||
| 450 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_float3){0,0,1})), 0.f); | ||
| 451 | } | ||
| 452 | |||
| 453 | // Compute the two-step rotation. */ | ||
| 454 | half = simd_normalize(half); | ||
| 455 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 456 | _simd_quaternion_reduced(half, to)); | ||
| 457 | } | ||
| 458 | |||
| 459 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float3x3 matrix) { | ||
| 460 | const simd_float3 *mat = matrix.columns; | ||
| 461 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 462 | if (trace >= 0.0) { | ||
| 463 | float r = 2*sqrt(1 + trace); | ||
| 464 | float rinv = simd_recip(r); | ||
| 465 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 466 | rinv*(mat[2][0] - mat[0][2]), | ||
| 467 | rinv*(mat[0][1] - mat[1][0]), | ||
| 468 | r/4); | ||
| 469 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 470 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 471 | float rinv = simd_recip(r); | ||
| 472 | return simd_quaternion(r/4, | ||
| 473 | rinv*(mat[0][1] + mat[1][0]), | ||
| 474 | rinv*(mat[0][2] + mat[2][0]), | ||
| 475 | rinv*(mat[1][2] - mat[2][1])); | ||
| 476 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 477 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 478 | float rinv = simd_recip(r); | ||
| 479 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 480 | r/4, | ||
| 481 | rinv*(mat[1][2] + mat[2][1]), | ||
| 482 | rinv*(mat[2][0] - mat[0][2])); | ||
| 483 | } else { | ||
| 484 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 485 | float rinv = simd_recip(r); | ||
| 486 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 487 | rinv*(mat[1][2] + mat[2][1]), | ||
| 488 | r/4, | ||
| 489 | rinv*(mat[0][1] - mat[1][0])); | ||
| 490 | } | ||
| 491 | } | ||
| 492 | |||
| 493 | static SIMD_NOINLINE simd_quatf simd_quaternion(simd_float4x4 matrix) { | ||
| 494 | const simd_float4 *mat = matrix.columns; | ||
| 495 | float trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 496 | if (trace >= 0.0) { | ||
| 497 | float r = 2*sqrt(1 + trace); | ||
| 498 | float rinv = simd_recip(r); | ||
| 499 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 500 | rinv*(mat[2][0] - mat[0][2]), | ||
| 501 | rinv*(mat[0][1] - mat[1][0]), | ||
| 502 | r/4); | ||
| 503 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 504 | float r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 505 | float rinv = simd_recip(r); | ||
| 506 | return simd_quaternion(r/4, | ||
| 507 | rinv*(mat[0][1] + mat[1][0]), | ||
| 508 | rinv*(mat[0][2] + mat[2][0]), | ||
| 509 | rinv*(mat[1][2] - mat[2][1])); | ||
| 510 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 511 | float r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 512 | float rinv = simd_recip(r); | ||
| 513 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 514 | r/4, | ||
| 515 | rinv*(mat[1][2] + mat[2][1]), | ||
| 516 | rinv*(mat[2][0] - mat[0][2])); | ||
| 517 | } else { | ||
| 518 | float r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 519 | float rinv = simd_recip(r); | ||
| 520 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 521 | rinv*(mat[1][2] + mat[2][1]), | ||
| 522 | r/4, | ||
| 523 | rinv*(mat[0][1] - mat[1][0])); | ||
| 524 | } | ||
| 525 | } | ||
| 526 | |||
| 527 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 528 | * | ||
| 529 | * @discussion This function is an implementation detail and you should not | ||
| 530 | * call it directly. It may be removed or modified in future versions of the | ||
| 531 | * simd module. */ | ||
| 532 | static SIMD_NOINLINE float _simd_angle(simd_quatf p, simd_quatf q) { | ||
| 533 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 534 | } | ||
| 535 | |||
| 536 | /*! @abstract sin(x)/x. | ||
| 537 | * | ||
| 538 | * @discussion This function is an implementation detail and you should not | ||
| 539 | * call it directly. It may be removed or modified in future versions of the | ||
| 540 | * simd module. */ | ||
| 541 | static SIMD_CFUNC float _simd_sinc(float x) { | ||
| 542 | if (x == 0) return 1; | ||
| 543 | return sin(x)/x; | ||
| 544 | } | ||
| 545 | |||
| 546 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 547 | * | ||
| 548 | * @discussion This function may interpolate along either the longer or | ||
| 549 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 550 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 551 | * instead of calling this directly. */ | ||
| 552 | static SIMD_NOINLINE simd_quatf _simd_slerp_internal(simd_quatf q0, simd_quatf q1, float t) { | ||
| 553 | float s = 1 - t; | ||
| 554 | float a = _simd_angle(q0, q1); | ||
| 555 | float r = simd_recip(_simd_sinc(a)); | ||
| 556 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 557 | } | ||
| 558 | |||
| 559 | static SIMD_NOINLINE simd_quatf simd_slerp(simd_quatf q0, simd_quatf q1, float t) { | ||
| 560 | if (simd_dot(q0, q1) >= 0) | ||
| 561 | return _simd_slerp_internal(q0, q1, t); | ||
| 562 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 563 | } | ||
| 564 | |||
| 565 | static SIMD_NOINLINE simd_quatf simd_slerp_longest(simd_quatf q0, simd_quatf q1, float t) { | ||
| 566 | if (simd_dot(q0, q1) >= 0) | ||
| 567 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 568 | return _simd_slerp_internal(q0, q1, t); | ||
| 569 | } | ||
| 570 | |||
| 571 | /*! @discussion This function is an implementation detail and you should not | ||
| 572 | * call it directly. It may be removed or modified in future versions of the | ||
| 573 | * simd module. */ | ||
| 574 | static SIMD_NOINLINE simd_quatf _simd_intermediate(simd_quatf q0, simd_quatf q1, simd_quatf q2) { | ||
| 575 | simd_quatf p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 576 | simd_quatf p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 577 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 578 | } | ||
| 579 | |||
| 580 | /*! @discussion This function is an implementation detail and you should not | ||
| 581 | * call it directly. It may be removed or modified in future versions of the | ||
| 582 | * simd module. */ | ||
| 583 | static SIMD_NOINLINE simd_quatf _simd_squad(simd_quatf q0, simd_quatf qa, simd_quatf qb, simd_quatf q1, float t) { | ||
| 584 | simd_quatf r0 = _simd_slerp_internal(q0, q1, t); | ||
| 585 | simd_quatf r1 = _simd_slerp_internal(qa, qb, t); | ||
| 586 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 587 | } | ||
| 588 | |||
| 589 | static SIMD_NOINLINE simd_quatf simd_spline(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 590 | simd_quatf qa = _simd_intermediate(q0, q1, q2); | ||
| 591 | simd_quatf qb = _simd_intermediate(q1, q2, q3); | ||
| 592 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 593 | } | ||
| 594 | |||
| 595 | static SIMD_NOINLINE simd_quatf simd_bezier(simd_quatf q0, simd_quatf q1, simd_quatf q2, simd_quatf q3, float t) { | ||
| 596 | simd_quatf q01 = _simd_slerp_internal(q0, q1, t); | ||
| 597 | simd_quatf q12 = _simd_slerp_internal(q1, q2, t); | ||
| 598 | simd_quatf q23 = _simd_slerp_internal(q2, q3, t); | ||
| 599 | simd_quatf q012 = _simd_slerp_internal(q01, q12, t); | ||
| 600 | simd_quatf q123 = _simd_slerp_internal(q12, q23, t); | ||
| 601 | return _simd_slerp_internal(q012, q123, t); | ||
| 602 | } | ||
| 603 | |||
| 604 | /* MARK: - C and Objective-C double interfaces */ | ||
| 605 | |||
| 606 | /*! @abstract Constructs a quaternion from four scalar values. | ||
| 607 | * | ||
| 608 | * @param ix The first component of the imaginary (vector) part. | ||
| 609 | * @param iy The second component of the imaginary (vector) part. | ||
| 610 | * @param iz The third component of the imaginary (vector) part. | ||
| 611 | * | ||
| 612 | * @param r The real (scalar) part. */ | ||
| 613 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double ix, double iy, double iz, double r) { | ||
| 614 | return (simd_quatd){ { ix, iy, iz, r } }; | ||
| 615 | } | ||
| 616 | |||
| 617 | /*! @abstract Constructs a quaternion from an array of four scalars. | ||
| 618 | * | ||
| 619 | * @discussion Note that the imaginary part of the quaternion comes from | ||
| 620 | * array elements 0, 1, and 2, and the real part comes from element 3. */ | ||
| 621 | static inline SIMD_NONCONST simd_quatd simd_quaternion(const double xyzr[4]) { | ||
| 622 | return (simd_quatd){ *(const simd_packed_double4 *)xyzr }; | ||
| 623 | } | ||
| 624 | |||
| 625 | /*! @abstract Constructs a quaternion from a four-element vector. | ||
| 626 | * | ||
| 627 | * @discussion Note that the imaginary (vector) part of the quaternion comes | ||
| 628 | * from lanes 0, 1, and 2 of the vector, and the real (scalar) part comes from | ||
| 629 | * lane 3. */ | ||
| 630 | static inline SIMD_CFUNC simd_quatd simd_quaternion(simd_double4 xyzr) { | ||
| 631 | return (simd_quatd){ xyzr }; | ||
| 632 | } | ||
| 633 | |||
| 634 | /*! @abstract Constructs a quaternion that rotates by `angle` radians about | ||
| 635 | * `axis`. */ | ||
| 636 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis); | ||
| 637 | |||
| 638 | /*! @abstract Construct a quaternion that rotates from one vector to another. | ||
| 639 | * | ||
| 640 | * @param from A normalized three-element vector. | ||
| 641 | * @param to A normalized three-element vector. | ||
| 642 | * | ||
| 643 | * @discussion The rotation axis is `simd_cross(from, to)`. If `from` and | ||
| 644 | * `to` point in opposite directions (to within machine precision), an | ||
| 645 | * arbitrary rotation axis is chosen, and the angle is pi radians. */ | ||
| 646 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to); | ||
| 647 | |||
| 648 | /*! @abstract Construct a quaternion from a 3x3 rotation `matrix`. | ||
| 649 | * | ||
| 650 | * @discussion If `matrix` is not orthogonal with determinant 1, the result | ||
| 651 | * is undefined. */ | ||
| 652 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix); | ||
| 653 | |||
| 654 | /*! @abstract Construct a quaternion from a 4x4 rotation `matrix`. | ||
| 655 | * | ||
| 656 | * @discussion The last row and column of the matrix are ignored. This | ||
| 657 | * function is equivalent to calling simd_quaternion with the upper-left 3x3 | ||
| 658 | * submatrix . */ | ||
| 659 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix); | ||
| 660 | |||
| 661 | /*! @abstract The real (scalar) part of the quaternion `q`. */ | ||
| 662 | static inline SIMD_CFUNC double simd_real(simd_quatd q) { | ||
| 663 | return q.vector.w; | ||
| 664 | } | ||
| 665 | |||
| 666 | /*! @abstract The imaginary (vector) part of the quaternion `q`. */ | ||
| 667 | static inline SIMD_CFUNC simd_double3 simd_imag(simd_quatd q) { | ||
| 668 | return q.vector.xyz; | ||
| 669 | } | ||
| 670 | |||
| 671 | /*! @abstract The angle (in radians) of rotation represented by `q`. */ | ||
| 672 | static inline SIMD_CFUNC double simd_angle(simd_quatd q); | ||
| 673 | |||
| 674 | /*! @abstract The normalized axis (a 3-element vector) around which the | ||
| 675 | * action of the quaternion `q` rotates. */ | ||
| 676 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q); | ||
| 677 | |||
| 678 | /*! @abstract The sum of the quaternions `p` and `q`. */ | ||
| 679 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q); | ||
| 680 | |||
| 681 | /*! @abstract The difference of the quaternions `p` and `q`. */ | ||
| 682 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q); | ||
| 683 | |||
| 684 | /*! @abstract The product of the quaternions `p` and `q`. */ | ||
| 685 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q); | ||
| 686 | |||
| 687 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 688 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a); | ||
| 689 | |||
| 690 | /*! @abstract The quaternion `q` scaled by the real value `a`. */ | ||
| 691 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q); | ||
| 692 | |||
| 693 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 694 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q); | ||
| 695 | |||
| 696 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 697 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q); | ||
| 698 | |||
| 699 | /*! @abstract The negation (additive inverse) of the quaternion `q`. */ | ||
| 700 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q); | ||
| 701 | |||
| 702 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 703 | * four-dimensional vectors. */ | ||
| 704 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q); | ||
| 705 | |||
| 706 | /*! @abstract The length of the quaternion `q`. */ | ||
| 707 | static inline SIMD_CFUNC double simd_length(simd_quatd q); | ||
| 708 | |||
| 709 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 710 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q); | ||
| 711 | |||
| 712 | /*! @abstract Rotates the vector `v` by the quaternion `q`. */ | ||
| 713 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v); | ||
| 714 | |||
| 715 | /*! @abstract Logarithm of the quaternion `q`. | ||
| 716 | * @discussion Do not call this function directly; use `log(q)` instead. | ||
| 717 | * | ||
| 718 | * We can write a quaternion `q` in the form: `r(cos(t) + sin(t)v)` where | ||
| 719 | * `r` is the length of `q`, `t` is an angle, and `v` is a unit 3-vector. | ||
| 720 | * The logarithm of `q` is `log(r) + tv`, just like the logarithm of the | ||
| 721 | * complex number `r*(cos(t) + i sin(t))` is `log(r) + it`. | ||
| 722 | * | ||
| 723 | * Note that this function is not robust against poorly-scaled non-unit | ||
| 724 | * quaternions, because it is primarily used for spline interpolation of | ||
| 725 | * unit quaternions. If you need to compute a robust logarithm of general | ||
| 726 | * quaternions, you can use the following approach: | ||
| 727 | * | ||
| 728 | * scale = simd_reduce_max(simd_abs(q.vector)); | ||
| 729 | * logq = log(simd_recip(scale)*q); | ||
| 730 | * logq.real += log(scale); | ||
| 731 | * return logq; */ | ||
| 732 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q); | ||
| 733 | |||
| 734 | /*! @abstract Inverse of `log( )`; the exponential map on quaternions. | ||
| 735 | * @discussion Do not call this function directly; use `exp(q)` instead. */ | ||
| 736 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q); | ||
| 737 | |||
| 738 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 739 | * quaternions `q0` and `q1`. */ | ||
| 740 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t); | ||
| 741 | |||
| 742 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 743 | * quaternions `q0` and `q1`. */ | ||
| 744 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t); | ||
| 745 | |||
| 746 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 747 | * | ||
| 748 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 749 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 750 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 751 | * rotations. */ | ||
| 752 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 753 | |||
| 754 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 755 | * | ||
| 756 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 757 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 758 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 759 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 760 | * curve does not hold on the sphere. */ | ||
| 761 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t); | ||
| 762 | |||
| 763 | #ifdef __cplusplus | ||
| 764 | } /* extern "C" */ | ||
| 765 | /* MARK: - C++ double interfaces */ | ||
| 766 | |||
| 767 | namespace simd { | ||
| 768 | struct quatd : ::simd_quatd { | ||
| 769 | /*! @abstract The identity quaternion. */ | ||
| 770 | quatd( ) : ::simd_quatd(::simd_quaternion((double4){0,0,0,1})) { } | ||
| 771 | |||
| 772 | /*! @abstract Constructs a C++ quaternion from a C quaternion. */ | ||
| 773 | quatd(::simd_quatd q) : ::simd_quatd(q) { } | ||
| 774 | |||
| 775 | /*! @abstract Constructs a quaternion from components. */ | ||
| 776 | quatd(double ix, double iy, double iz, double r) : ::simd_quatd(::simd_quaternion(ix, iy, iz, r)) { } | ||
| 777 | |||
| 778 | /*! @abstract Constructs a quaternion from an array of scalars. */ | ||
| 779 | quatd(const double xyzr[4]) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 780 | |||
| 781 | /*! @abstract Constructs a quaternion from a vector. */ | ||
| 782 | quatd(double4 xyzr) : ::simd_quatd(::simd_quaternion(xyzr)) { } | ||
| 783 | |||
| 784 | /*! @abstract Quaternion representing rotation about `axis` by `angle` | ||
| 785 | * radians. */ | ||
| 786 | quatd(double angle, double3 axis) : ::simd_quatd(::simd_quaternion(angle, axis)) { } | ||
| 787 | |||
| 788 | /*! @abstract Quaternion that rotates `from` into `to`. */ | ||
| 789 | quatd(double3 from, double3 to) : ::simd_quatd(::simd_quaternion(from, to)) { } | ||
| 790 | |||
| 791 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 792 | quatd(::simd_double3x3 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 793 | |||
| 794 | /*! @abstract Constructs a quaternion from a rotation matrix. */ | ||
| 795 | quatd(::simd_double4x4 matrix) : ::simd_quatd(::simd_quaternion(matrix)) { } | ||
| 796 | |||
| 797 | /*! @abstract The real (scalar) part of the quaternion. */ | ||
| 798 | double real(void) const { return ::simd_real(*this); } | ||
| 799 | |||
| 800 | /*! @abstract The imaginary (vector) part of the quaternion. */ | ||
| 801 | double3 imag(void) const { return ::simd_imag(*this); } | ||
| 802 | |||
| 803 | /*! @abstract The angle the quaternion rotates by. */ | ||
| 804 | double angle(void) const { return ::simd_angle(*this); } | ||
| 805 | |||
| 806 | /*! @abstract The axis the quaternion rotates about. */ | ||
| 807 | double3 axis(void) const { return ::simd_axis(*this); } | ||
| 808 | |||
| 809 | /*! @abstract The length of the quaternion. */ | ||
| 810 | double length(void) const { return ::simd_length(*this); } | ||
| 811 | |||
| 812 | /*! @abstract Act on the vector `v` by rotation. */ | ||
| 813 | double3 operator()(const ::simd_double3 v) const { return ::simd_act(*this, v); } | ||
| 814 | }; | ||
| 815 | |||
| 816 | static SIMD_CPPFUNC quatd operator+(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_add(p, q); } | ||
| 817 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_sub(p, q); } | ||
| 818 | static SIMD_CPPFUNC quatd operator-(const ::simd_quatd p) { return ::simd_negate(p); } | ||
| 819 | static SIMD_CPPFUNC quatd operator*(const double r, const ::simd_quatd p) { return ::simd_mul(r, p); } | ||
| 820 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const double r) { return ::simd_mul(p, r); } | ||
| 821 | static SIMD_CPPFUNC quatd operator*(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, q); } | ||
| 822 | static SIMD_CPPFUNC quatd operator/(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_mul(p, ::simd_inverse(q)); } | ||
| 823 | static SIMD_CPPFUNC quatd operator+=(quatd &p, const ::simd_quatd q) { return p = p+q; } | ||
| 824 | static SIMD_CPPFUNC quatd operator-=(quatd &p, const ::simd_quatd q) { return p = p-q; } | ||
| 825 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const double r) { return p = p*r; } | ||
| 826 | static SIMD_CPPFUNC quatd operator*=(quatd &p, const ::simd_quatd q) { return p = p*q; } | ||
| 827 | static SIMD_CPPFUNC quatd operator/=(quatd &p, const ::simd_quatd q) { return p = p/q; } | ||
| 828 | |||
| 829 | /*! @abstract The conjugate of the quaternion `q`. */ | ||
| 830 | static SIMD_CPPFUNC quatd conjugate(const ::simd_quatd p) { return ::simd_conjugate(p); } | ||
| 831 | |||
| 832 | /*! @abstract The (multiplicative) inverse of the quaternion `q`. */ | ||
| 833 | static SIMD_CPPFUNC quatd inverse(const ::simd_quatd p) { return ::simd_inverse(p); } | ||
| 834 | |||
| 835 | /*! @abstract The dot product of the quaternions `p` and `q` interpreted as | ||
| 836 | * four-dimensional vectors. */ | ||
| 837 | static SIMD_CPPFUNC double dot(const ::simd_quatd p, const ::simd_quatd q) { return ::simd_dot(p, q); } | ||
| 838 | |||
| 839 | /*! @abstract The unit quaternion obtained by normalizing `q`. */ | ||
| 840 | static SIMD_CPPFUNC quatd normalize(const ::simd_quatd p) { return ::simd_normalize(p); } | ||
| 841 | |||
| 842 | /*! @abstract logarithm of the quaternion `q`. */ | ||
| 843 | static SIMD_CPPFUNC quatd log(const ::simd_quatd q) { return ::__tg_log(q); } | ||
| 844 | |||
| 845 | /*! @abstract exponential map of quaterion `q`. */ | ||
| 846 | static SIMD_CPPFUNC quatd exp(const ::simd_quatd q) { return ::__tg_exp(q); } | ||
| 847 | |||
| 848 | /*! @abstract Spherical linear interpolation along the shortest arc between | ||
| 849 | * quaternions `q0` and `q1`. */ | ||
| 850 | static SIMD_CPPFUNC quatd slerp(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp(p0, p1, t); } | ||
| 851 | |||
| 852 | /*! @abstract Spherical linear interpolation along the longest arc between | ||
| 853 | * quaternions `q0` and `q1`. */ | ||
| 854 | static SIMD_CPPFUNC quatd slerp_longest(const ::simd_quatd p0, const ::simd_quatd p1, double t) { return ::simd_slerp_longest(p0, p1, t); } | ||
| 855 | |||
| 856 | /*! @abstract Interpolate between quaternions along a spherical cubic spline. | ||
| 857 | * | ||
| 858 | * @discussion The function interpolates between q1 and q2. q0 is the left | ||
| 859 | * endpoint of the previous interval, and q3 is the right endpoint of the next | ||
| 860 | * interval. Use this function to smoothly interpolate between a sequence of | ||
| 861 | * rotations. */ | ||
| 862 | static SIMD_CPPFUNC quatd spline(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_spline(p0, p1, p2, p3, t); } | ||
| 863 | |||
| 864 | /*! @abstract Spherical cubic Bezier interpolation between quaternions. | ||
| 865 | * | ||
| 866 | * @discussion The function treats q0 ... q3 as control points and uses slerp | ||
| 867 | * in place of lerp in the De Castlejeau algorithm. The endpoints of | ||
| 868 | * interpolation are thus q0 and q3, and the curve will not generally pass | ||
| 869 | * through q1 or q2. Note that the convex hull property of "standard" Bezier | ||
| 870 | * curve does not hold on the sphere. */ | ||
| 871 | static SIMD_CPPFUNC quatd bezier(const ::simd_quatd p0, const ::simd_quatd p1, const ::simd_quatd p2, const ::simd_quatd p3, double t) { return ::simd_bezier(p0, p1, p2, p3, t); } | ||
| 872 | } | ||
| 873 | |||
| 874 | extern "C" { | ||
| 875 | #endif /* __cplusplus */ | ||
| 876 | |||
| 877 | /* MARK: - double implementations */ | ||
| 878 | |||
| 879 | #include <simd/math.h> | ||
| 880 | #include <simd/geometry.h> | ||
| 881 | |||
| 882 | /* tg_promote is implementation gobbledygook that enables the compile-time | ||
| 883 | * dispatching in tgmath.h to work its magic. */ | ||
| 884 | static simd_quatd __attribute__((__overloadable__)) __tg_promote(simd_quatd); | ||
| 885 | |||
| 886 | /*! @abstract Constructs a quaternion from imaginary and real parts. | ||
| 887 | * @discussion This function is hidden behind an underscore to avoid confusion | ||
| 888 | * with the angle-axis constructor. */ | ||
| 889 | static inline SIMD_CFUNC simd_quatd _simd_quaternion(simd_double3 imag, double real) { | ||
| 890 | return simd_quaternion(simd_make_double4(imag, real)); | ||
| 891 | } | ||
| 892 | |||
| 893 | static inline SIMD_CFUNC simd_quatd simd_quaternion(double angle, simd_double3 axis) { | ||
| 894 | return _simd_quaternion(sin(angle/2) * axis, cos(angle/2)); | ||
| 895 | } | ||
| 896 | |||
| 897 | static inline SIMD_CFUNC double simd_angle(simd_quatd q) { | ||
| 898 | return 2*atan2(simd_length(q.vector.xyz), q.vector.w); | ||
| 899 | } | ||
| 900 | |||
| 901 | static inline SIMD_CFUNC simd_double3 simd_axis(simd_quatd q) { | ||
| 902 | return simd_normalize(q.vector.xyz); | ||
| 903 | } | ||
| 904 | |||
| 905 | static inline SIMD_CFUNC simd_quatd simd_add(simd_quatd p, simd_quatd q) { | ||
| 906 | return simd_quaternion(p.vector + q.vector); | ||
| 907 | } | ||
| 908 | |||
| 909 | static inline SIMD_CFUNC simd_quatd simd_sub(simd_quatd p, simd_quatd q) { | ||
| 910 | return simd_quaternion(p.vector - q.vector); | ||
| 911 | } | ||
| 912 | |||
| 913 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd p, simd_quatd q) { | ||
| 914 | #pragma STDC FP_CONTRACT ON | ||
| 915 | return simd_quaternion((p.vector.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 916 | p.vector.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5)) + | ||
| 917 | (p.vector.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6) + | ||
| 918 | p.vector.w * q.vector)); | ||
| 919 | } | ||
| 920 | |||
| 921 | static inline SIMD_CFUNC simd_quatd simd_mul(simd_quatd q, double a) { | ||
| 922 | return simd_quaternion(a * q.vector); | ||
| 923 | } | ||
| 924 | |||
| 925 | static inline SIMD_CFUNC simd_quatd simd_mul(double a, simd_quatd q) { | ||
| 926 | return simd_mul(q,a); | ||
| 927 | } | ||
| 928 | |||
| 929 | static inline SIMD_CFUNC simd_quatd simd_conjugate(simd_quatd q) { | ||
| 930 | return simd_quaternion(q.vector * (simd_double4){-1,-1,-1, 1}); | ||
| 931 | } | ||
| 932 | |||
| 933 | static inline SIMD_CFUNC simd_quatd simd_inverse(simd_quatd q) { | ||
| 934 | return simd_quaternion(simd_conjugate(q).vector * simd_recip(simd_length_squared(q.vector))); | ||
| 935 | } | ||
| 936 | |||
| 937 | static inline SIMD_CFUNC simd_quatd simd_negate(simd_quatd q) { | ||
| 938 | return simd_quaternion(-q.vector); | ||
| 939 | } | ||
| 940 | |||
| 941 | static inline SIMD_CFUNC double simd_dot(simd_quatd p, simd_quatd q) { | ||
| 942 | return simd_dot(p.vector, q.vector); | ||
| 943 | } | ||
| 944 | |||
| 945 | static inline SIMD_CFUNC double simd_length(simd_quatd q) { | ||
| 946 | return simd_length(q.vector); | ||
| 947 | } | ||
| 948 | |||
| 949 | static inline SIMD_CFUNC simd_quatd simd_normalize(simd_quatd q) { | ||
| 950 | double length_squared = simd_length_squared(q.vector); | ||
| 951 | if (length_squared == 0) { | ||
| 952 | return simd_quaternion((simd_double4){0,0,0,1}); | ||
| 953 | } | ||
| 954 | return simd_quaternion(q.vector * simd_rsqrt(length_squared)); | ||
| 955 | } | ||
| 956 | |||
| 957 | #if defined __arm__ || defined __arm64__ | ||
| 958 | /*! @abstract Multiplies the vector `v` by the quaternion `q`. | ||
| 959 | * | ||
| 960 | * @discussion This IS NOT the action of `q` on `v` (i.e. this is not rotation | ||
| 961 | * by `q`. That operation is provided by `simd_act(q, v)`. This function is an | ||
| 962 | * implementation detail and you should not call it directly. It may be | ||
| 963 | * removed or modified in future versions of the simd module. */ | ||
| 964 | static inline SIMD_CFUNC simd_quatd _simd_mul_vq(simd_double3 v, simd_quatd q) { | ||
| 965 | #pragma STDC FP_CONTRACT ON | ||
| 966 | return simd_quaternion(v.x * __builtin_shufflevector(q.vector, -q.vector, 3,6,1,4) + | ||
| 967 | v.y * __builtin_shufflevector(q.vector, -q.vector, 2,3,4,5) + | ||
| 968 | v.z * __builtin_shufflevector(q.vector, -q.vector, 5,0,3,6)); | ||
| 969 | } | ||
| 970 | #endif | ||
| 971 | |||
| 972 | static inline SIMD_CFUNC simd_double3 simd_act(simd_quatd q, simd_double3 v) { | ||
| 973 | #if defined __arm__ || defined __arm64__ | ||
| 974 | return simd_mul(q, _simd_mul_vq(v, simd_conjugate(q))).vector.xyz; | ||
| 975 | #else | ||
| 976 | #pragma STDC FP_CONTRACT ON | ||
| 977 | simd_double3 t = 2*simd_cross(simd_imag(q),v); | ||
| 978 | return v + simd_real(q)*t + simd_cross(simd_imag(q), t); | ||
| 979 | #endif | ||
| 980 | } | ||
| 981 | |||
| 982 | static SIMD_NOINLINE simd_quatd __tg_log(simd_quatd q) { | ||
| 983 | double real = __tg_log(simd_length_squared(q.vector))/2; | ||
| 984 | if (simd_equal(simd_imag(q), 0)) return _simd_quaternion(0, real); | ||
| 985 | simd_double3 imag = __tg_acos(simd_real(q)/simd_length(q)) * simd_normalize(simd_imag(q)); | ||
| 986 | return _simd_quaternion(imag, real); | ||
| 987 | } | ||
| 988 | |||
| 989 | static SIMD_NOINLINE simd_quatd __tg_exp(simd_quatd q) { | ||
| 990 | // angle is actually *twice* the angle of the rotation corresponding to | ||
| 991 | // the resulting quaternion, which is why we don't simply use the (angle, | ||
| 992 | // axis) constructor to generate `unit`. | ||
| 993 | double angle = simd_length(simd_imag(q)); | ||
| 994 | if (angle == 0) return _simd_quaternion(0, exp(simd_real(q))); | ||
| 995 | simd_double3 axis = simd_normalize(simd_imag(q)); | ||
| 996 | simd_quatd unit = _simd_quaternion(sin(angle)*axis, cosf(angle)); | ||
| 997 | return simd_mul(exp(simd_real(q)), unit); | ||
| 998 | } | ||
| 999 | |||
| 1000 | /*! @abstract Implementation detail of the `simd_quaternion(from, to)` | ||
| 1001 | * initializer. | ||
| 1002 | * | ||
| 1003 | * @discussion Computes the quaternion rotation `from` to `to` if they are | ||
| 1004 | * separated by less than 90 degrees. Not numerically stable for larger | ||
| 1005 | * angles. This function is an implementation detail and you should not | ||
| 1006 | * call it directly. It may be removed or modified in future versions of the | ||
| 1007 | * simd module. */ | ||
| 1008 | static inline SIMD_CFUNC simd_quatd _simd_quaternion_reduced(simd_double3 from, simd_double3 to) { | ||
| 1009 | simd_double3 half = simd_normalize(from + to); | ||
| 1010 | return _simd_quaternion(simd_cross(from, half), simd_dot(from, half)); | ||
| 1011 | } | ||
| 1012 | |||
| 1013 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3 from, simd_double3 to) { | ||
| 1014 | |||
| 1015 | // If the angle between from and to is not too big, we can compute the | ||
| 1016 | // rotation accurately using a simple implementation. | ||
| 1017 | if (simd_dot(from, to) >= 0) { | ||
| 1018 | return _simd_quaternion_reduced(from, to); | ||
| 1019 | } | ||
| 1020 | |||
| 1021 | // Because from and to are more than 90 degrees apart, we compute the | ||
| 1022 | // rotation in two stages (from -> half), (half -> to) to preserve numerical | ||
| 1023 | // accuracy. | ||
| 1024 | simd_double3 half = simd_normalize(from) + simd_normalize(to); | ||
| 1025 | |||
| 1026 | if (simd_length_squared(half) <= 0x1p-104) { | ||
| 1027 | // half is nearly zero, so from and to point in nearly opposite directions | ||
| 1028 | // and the rotation is numerically underspecified. Pick an axis orthogonal | ||
| 1029 | // to the vectors, and use an angle of pi radians. | ||
| 1030 | simd_double3 abs_from = simd_abs(from); | ||
| 1031 | if (abs_from.x <= abs_from.y && abs_from.x <= abs_from.z) | ||
| 1032 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){1,0,0})), 0.f); | ||
| 1033 | else if (abs_from.y <= abs_from.z) | ||
| 1034 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,1,0})), 0.f); | ||
| 1035 | else | ||
| 1036 | return _simd_quaternion(simd_normalize(simd_cross(from, (simd_double3){0,0,1})), 0.f); | ||
| 1037 | } | ||
| 1038 | |||
| 1039 | // Compute the two-step rotation. */ | ||
| 1040 | half = simd_normalize(half); | ||
| 1041 | return simd_mul(_simd_quaternion_reduced(from, half), | ||
| 1042 | _simd_quaternion_reduced(half, to)); | ||
| 1043 | } | ||
| 1044 | |||
| 1045 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double3x3 matrix) { | ||
| 1046 | const simd_double3 *mat = matrix.columns; | ||
| 1047 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1048 | if (trace >= 0.0) { | ||
| 1049 | double r = 2*sqrt(1 + trace); | ||
| 1050 | double rinv = simd_recip(r); | ||
| 1051 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1052 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1053 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1054 | r/4); | ||
| 1055 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1056 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1057 | double rinv = simd_recip(r); | ||
| 1058 | return simd_quaternion(r/4, | ||
| 1059 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1060 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1061 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1062 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1063 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1064 | double rinv = simd_recip(r); | ||
| 1065 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1066 | r/4, | ||
| 1067 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1068 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1069 | } else { | ||
| 1070 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1071 | double rinv = simd_recip(r); | ||
| 1072 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1073 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1074 | r/4, | ||
| 1075 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1076 | } | ||
| 1077 | } | ||
| 1078 | |||
| 1079 | static SIMD_NOINLINE simd_quatd simd_quaternion(simd_double4x4 matrix) { | ||
| 1080 | const simd_double4 *mat = matrix.columns; | ||
| 1081 | double trace = mat[0][0] + mat[1][1] + mat[2][2]; | ||
| 1082 | if (trace >= 0.0) { | ||
| 1083 | double r = 2*sqrt(1 + trace); | ||
| 1084 | double rinv = simd_recip(r); | ||
| 1085 | return simd_quaternion(rinv*(mat[1][2] - mat[2][1]), | ||
| 1086 | rinv*(mat[2][0] - mat[0][2]), | ||
| 1087 | rinv*(mat[0][1] - mat[1][0]), | ||
| 1088 | r/4); | ||
| 1089 | } else if (mat[0][0] >= mat[1][1] && mat[0][0] >= mat[2][2]) { | ||
| 1090 | double r = 2*sqrt(1 - mat[1][1] - mat[2][2] + mat[0][0]); | ||
| 1091 | double rinv = simd_recip(r); | ||
| 1092 | return simd_quaternion(r/4, | ||
| 1093 | rinv*(mat[0][1] + mat[1][0]), | ||
| 1094 | rinv*(mat[0][2] + mat[2][0]), | ||
| 1095 | rinv*(mat[1][2] - mat[2][1])); | ||
| 1096 | } else if (mat[1][1] >= mat[2][2]) { | ||
| 1097 | double r = 2*sqrt(1 - mat[0][0] - mat[2][2] + mat[1][1]); | ||
| 1098 | double rinv = simd_recip(r); | ||
| 1099 | return simd_quaternion(rinv*(mat[0][1] + mat[1][0]), | ||
| 1100 | r/4, | ||
| 1101 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1102 | rinv*(mat[2][0] - mat[0][2])); | ||
| 1103 | } else { | ||
| 1104 | double r = 2*sqrt(1 - mat[0][0] - mat[1][1] + mat[2][2]); | ||
| 1105 | double rinv = simd_recip(r); | ||
| 1106 | return simd_quaternion(rinv*(mat[0][2] + mat[2][0]), | ||
| 1107 | rinv*(mat[1][2] + mat[2][1]), | ||
| 1108 | r/4, | ||
| 1109 | rinv*(mat[0][1] - mat[1][0])); | ||
| 1110 | } | ||
| 1111 | } | ||
| 1112 | |||
| 1113 | /*! @abstract The angle between p and q interpreted as 4-dimensional vectors. | ||
| 1114 | * | ||
| 1115 | * @discussion This function is an implementation detail and you should not | ||
| 1116 | * call it directly. It may be removed or modified in future versions of the | ||
| 1117 | * simd module. */ | ||
| 1118 | static SIMD_NOINLINE double _simd_angle(simd_quatd p, simd_quatd q) { | ||
| 1119 | return 2*atan2(simd_length(p.vector - q.vector), simd_length(p.vector + q.vector)); | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | /*! @abstract sin(x)/x. | ||
| 1123 | * | ||
| 1124 | * @discussion This function is an implementation detail and you should not | ||
| 1125 | * call it directly. It may be removed or modified in future versions of the | ||
| 1126 | * simd module. */ | ||
| 1127 | static SIMD_CFUNC double _simd_sinc(double x) { | ||
| 1128 | if (x == 0) return 1; | ||
| 1129 | return sin(x)/x; | ||
| 1130 | } | ||
| 1131 | |||
| 1132 | /*! @abstract Spherical lerp between q0 and q1. | ||
| 1133 | * | ||
| 1134 | * @discussion This function may interpolate along either the longer or | ||
| 1135 | * shorter path between q0 and q1; it is used as an implementation detail | ||
| 1136 | * in `simd_slerp` and `simd_slerp_longest`; you should use those functions | ||
| 1137 | * instead of calling this directly. */ | ||
| 1138 | static SIMD_NOINLINE simd_quatd _simd_slerp_internal(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1139 | double s = 1 - t; | ||
| 1140 | double a = _simd_angle(q0, q1); | ||
| 1141 | double r = simd_recip(_simd_sinc(a)); | ||
| 1142 | return simd_normalize(simd_quaternion(_simd_sinc(s*a)*r*s*q0.vector + _simd_sinc(t*a)*r*t*q1.vector)); | ||
| 1143 | } | ||
| 1144 | |||
| 1145 | static SIMD_NOINLINE simd_quatd simd_slerp(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1146 | if (simd_dot(q0, q1) >= 0) | ||
| 1147 | return _simd_slerp_internal(q0, q1, t); | ||
| 1148 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1149 | } | ||
| 1150 | |||
| 1151 | static SIMD_NOINLINE simd_quatd simd_slerp_longest(simd_quatd q0, simd_quatd q1, double t) { | ||
| 1152 | if (simd_dot(q0, q1) >= 0) | ||
| 1153 | return _simd_slerp_internal(q0, simd_negate(q1), t); | ||
| 1154 | return _simd_slerp_internal(q0, q1, t); | ||
| 1155 | } | ||
| 1156 | |||
| 1157 | /*! @discussion This function is an implementation detail and you should not | ||
| 1158 | * call it directly. It may be removed or modified in future versions of the | ||
| 1159 | * simd module. */ | ||
| 1160 | static SIMD_NOINLINE simd_quatd _simd_intermediate(simd_quatd q0, simd_quatd q1, simd_quatd q2) { | ||
| 1161 | simd_quatd p0 = __tg_log(simd_mul(q0, simd_inverse(q1))); | ||
| 1162 | simd_quatd p2 = __tg_log(simd_mul(q2, simd_inverse(q1))); | ||
| 1163 | return simd_normalize(simd_mul(q1, __tg_exp(simd_mul(-0.25, simd_add(p0,p2))))); | ||
| 1164 | } | ||
| 1165 | |||
| 1166 | /*! @discussion This function is an implementation detail and you should not | ||
| 1167 | * call it directly. It may be removed or modified in future versions of the | ||
| 1168 | * simd module. */ | ||
| 1169 | static SIMD_NOINLINE simd_quatd _simd_squad(simd_quatd q0, simd_quatd qa, simd_quatd qb, simd_quatd q1, double t) { | ||
| 1170 | simd_quatd r0 = _simd_slerp_internal(q0, q1, t); | ||
| 1171 | simd_quatd r1 = _simd_slerp_internal(qa, qb, t); | ||
| 1172 | return _simd_slerp_internal(r0, r1, 2*t*(1 - t)); | ||
| 1173 | } | ||
| 1174 | |||
| 1175 | static SIMD_NOINLINE simd_quatd simd_spline(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1176 | simd_quatd qa = _simd_intermediate(q0, q1, q2); | ||
| 1177 | simd_quatd qb = _simd_intermediate(q1, q2, q3); | ||
| 1178 | return _simd_squad(q1, qa, qb, q2, t); | ||
| 1179 | } | ||
| 1180 | |||
| 1181 | static SIMD_NOINLINE simd_quatd simd_bezier(simd_quatd q0, simd_quatd q1, simd_quatd q2, simd_quatd q3, double t) { | ||
| 1182 | simd_quatd q01 = _simd_slerp_internal(q0, q1, t); | ||
| 1183 | simd_quatd q12 = _simd_slerp_internal(q1, q2, t); | ||
| 1184 | simd_quatd q23 = _simd_slerp_internal(q2, q3, t); | ||
| 1185 | simd_quatd q012 = _simd_slerp_internal(q01, q12, t); | ||
| 1186 | simd_quatd q123 = _simd_slerp_internal(q12, q23, t); | ||
| 1187 | return _simd_slerp_internal(q012, q123, t); | ||
| 1188 | } | ||
| 1189 | |||
| 1190 | #ifdef __cplusplus | ||
| 1191 | } /* extern "C" */ | ||
| 1192 | #endif /* __cplusplus */ | ||
| 1193 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 1194 | #endif /* SIMD_QUATERNIONS */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/simd/vector_make.h deleted-7874| ... | @@ -1,7874 +0,0 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines functions for constructing, extending, and truncating | ||
| 3 | * simd vector types. | ||
| 4 | * | ||
| 5 | * For each vector type `simd_typeN` supported by <simd/simd.h>, the following | ||
| 6 | * constructors are provided: | ||
| 7 | * | ||
| 8 | * ~~~ | ||
| 9 | * simd_typeN simd_make_typeN(type other); | ||
| 10 | * simd_typeN simd_make_typeN(simd_typeM other); | ||
| 11 | * ~~~ | ||
| 12 | * For the scalar-input version, or if M < N, these functions zero-extend | ||
| 13 | * `other` to produce a wider vector. If M == N, `other` is passed through | ||
| 14 | * unmodified. If `M > N`, `other` is truncated to form the result. | ||
| 15 | * | ||
| 16 | * ~~~ | ||
| 17 | * simd_typeN simd_make_typeN_undef(type other); | ||
| 18 | * simd_typeN simd_make_typeN_undef(simd_typeM other); | ||
| 19 | * ~~~ | ||
| 20 | * These functions are only available for M < N and for scalar inputs. They | ||
| 21 | * extend `other` to produce a wider vector where the contents of the newly- | ||
| 22 | * formed lanes are undefined. | ||
| 23 | * | ||
| 24 | * In addition, if N is 2, 3, or 4, the following constructors are available: | ||
| 25 | * ~~~ | ||
| 26 | * simd_make_typeN(parts ...) | ||
| 27 | * ~~~ | ||
| 28 | * where parts is a list of scalars and smaller vectors such that the sum of | ||
| 29 | * the number of lanes in the arguments is equal to N. For example, a | ||
| 30 | * `simd_float3` can be constructed from three `floats`, or a `float` and a | ||
| 31 | * `simd_float2` in any order: | ||
| 32 | * ~~~ | ||
| 33 | * simd_float2 ab = { 1, 2 }; | ||
| 34 | * simd_float3 vector = simd_make_float3(ab, 3); | ||
| 35 | * ~~~ | ||
| 36 | * | ||
| 37 | * In C++ the above functions are templated in the simd:: namespace. | ||
| 38 | * | ||
| 39 | * C++ Function Equivalent C Function | ||
| 40 | * ------------------------------------------------------------------- | ||
| 41 | * simd::make<simd::typeN>(x ...) simd_make_typeN(x ...) | ||
| 42 | * simd::make_undef<simd::typeN>(x ...) simd_make_typeN_undef(x ...) | ||
| 43 | * | ||
| 44 | * | ||
| 45 | * In addition, templated Vector<ScalarType, count> struct is available for | ||
| 46 | * templated code based on the scalar type. | ||
| 47 | * | ||
| 48 | * template <typename ScalarType, size_t count> struct simd::Vector { | ||
| 49 | * // static const size_t count | ||
| 50 | * // typedef scalar_t | ||
| 51 | * // typedef type | ||
| 52 | * // typedef packed_t | ||
| 53 | * }; | ||
| 54 | * | ||
| 55 | * Lookup the equivalent Vector struct according to typeN: | ||
| 56 | * template <typename typeN> struct simd::get_traits | ||
| 57 | * { | ||
| 58 | * // using type = Vector<ScalarType, count>; | ||
| 59 | * }; | ||
| 60 | * | ||
| 61 | * This is commonly used to get the type traits of typeN, so a helper type, | ||
| 62 | * namely traits, is available to query the type traits easily. | ||
| 63 | * simd::traits<typeN>::count | ||
| 64 | * simd::traits<typeN>::scalar_t | ||
| 65 | * | ||
| 66 | * @copyright 2014-2016 Apple, Inc. All rights reserved. | ||
| 67 | * @unsorted */ | ||
| 68 | |||
| 69 | #ifndef SIMD_VECTOR_CONSTRUCTORS | ||
| 70 | #define SIMD_VECTOR_CONSTRUCTORS | ||
| 71 | |||
| 72 | #include <simd/vector_types.h> | ||
| 73 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 74 | |||
| 75 | #ifdef __cplusplus | ||
| 76 | extern "C" { | ||
| 77 | #endif | ||
| 78 | |||
| 79 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed | ||
| 80 | * (twos-complement) integers. */ | ||
| 81 | static inline SIMD_CFUNC simd_char2 simd_make_char2(char x, char y) { | ||
| 82 | simd_char2 result; | ||
| 83 | result.x = x; | ||
| 84 | result.y = y; | ||
| 85 | return result; | ||
| 86 | } | ||
| 87 | |||
| 88 | /*! @abstract Zero-extends `other` to form a vector of two 8-bit signed | ||
| 89 | * (twos-complement) integers. */ | ||
| 90 | static inline SIMD_CFUNC simd_char2 simd_make_char2(char other) { | ||
| 91 | simd_char2 result = 0; | ||
| 92 | result.x = other; | ||
| 93 | return result; | ||
| 94 | } | ||
| 95 | |||
| 96 | /*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- | ||
| 97 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 98 | * unspecified. */ | ||
| 99 | static inline SIMD_CFUNC simd_char2 simd_make_char2_undef(char other) { | ||
| 100 | simd_char2 result; | ||
| 101 | result.x = other; | ||
| 102 | return result; | ||
| 103 | } | ||
| 104 | |||
| 105 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 106 | * templated and autogenerated code. */ | ||
| 107 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char2 other) { | ||
| 108 | return other; | ||
| 109 | } | ||
| 110 | |||
| 111 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 112 | * complement) integers. */ | ||
| 113 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char3 other) { | ||
| 114 | return other.xy; | ||
| 115 | } | ||
| 116 | |||
| 117 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 118 | * complement) integers. */ | ||
| 119 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char4 other) { | ||
| 120 | return other.xy; | ||
| 121 | } | ||
| 122 | |||
| 123 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 124 | * complement) integers. */ | ||
| 125 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char8 other) { | ||
| 126 | return other.xy; | ||
| 127 | } | ||
| 128 | |||
| 129 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 130 | * complement) integers. */ | ||
| 131 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char16 other) { | ||
| 132 | return other.xy; | ||
| 133 | } | ||
| 134 | |||
| 135 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 136 | * complement) integers. */ | ||
| 137 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char32 other) { | ||
| 138 | return other.xy; | ||
| 139 | } | ||
| 140 | |||
| 141 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 142 | * complement) integers. */ | ||
| 143 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char64 other) { | ||
| 144 | return other.xy; | ||
| 145 | } | ||
| 146 | |||
| 147 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 148 | * signed (twos-complement) integers. */ | ||
| 149 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, char y, char z) { | ||
| 150 | simd_char3 result; | ||
| 151 | result.x = x; | ||
| 152 | result.y = y; | ||
| 153 | result.z = z; | ||
| 154 | return result; | ||
| 155 | } | ||
| 156 | |||
| 157 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 158 | * signed (twos-complement) integers. */ | ||
| 159 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, simd_char2 yz) { | ||
| 160 | simd_char3 result; | ||
| 161 | result.x = x; | ||
| 162 | result.yz = yz; | ||
| 163 | return result; | ||
| 164 | } | ||
| 165 | |||
| 166 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 167 | * signed (twos-complement) integers. */ | ||
| 168 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 xy, char z) { | ||
| 169 | simd_char3 result; | ||
| 170 | result.xy = xy; | ||
| 171 | result.z = z; | ||
| 172 | return result; | ||
| 173 | } | ||
| 174 | |||
| 175 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit signed | ||
| 176 | * (twos-complement) integers. */ | ||
| 177 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char other) { | ||
| 178 | simd_char3 result = 0; | ||
| 179 | result.x = other; | ||
| 180 | return result; | ||
| 181 | } | ||
| 182 | |||
| 183 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 184 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 185 | * unspecified. */ | ||
| 186 | static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(char other) { | ||
| 187 | simd_char3 result; | ||
| 188 | result.x = other; | ||
| 189 | return result; | ||
| 190 | } | ||
| 191 | |||
| 192 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit signed | ||
| 193 | * (twos-complement) integers. */ | ||
| 194 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 other) { | ||
| 195 | simd_char3 result = 0; | ||
| 196 | result.xy = other; | ||
| 197 | return result; | ||
| 198 | } | ||
| 199 | |||
| 200 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 201 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 202 | * unspecified. */ | ||
| 203 | static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(simd_char2 other) { | ||
| 204 | simd_char3 result; | ||
| 205 | result.xy = other; | ||
| 206 | return result; | ||
| 207 | } | ||
| 208 | |||
| 209 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 210 | * templated and autogenerated code. */ | ||
| 211 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char3 other) { | ||
| 212 | return other; | ||
| 213 | } | ||
| 214 | |||
| 215 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 216 | * (twos-complement) integers. */ | ||
| 217 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char4 other) { | ||
| 218 | return other.xyz; | ||
| 219 | } | ||
| 220 | |||
| 221 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 222 | * (twos-complement) integers. */ | ||
| 223 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char8 other) { | ||
| 224 | return other.xyz; | ||
| 225 | } | ||
| 226 | |||
| 227 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 228 | * (twos-complement) integers. */ | ||
| 229 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char16 other) { | ||
| 230 | return other.xyz; | ||
| 231 | } | ||
| 232 | |||
| 233 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 234 | * (twos-complement) integers. */ | ||
| 235 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char32 other) { | ||
| 236 | return other.xyz; | ||
| 237 | } | ||
| 238 | |||
| 239 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 240 | * (twos-complement) integers. */ | ||
| 241 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char64 other) { | ||
| 242 | return other.xyz; | ||
| 243 | } | ||
| 244 | |||
| 245 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 246 | * 8-bit signed (twos-complement) integers. */ | ||
| 247 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, char z, char w) { | ||
| 248 | simd_char4 result; | ||
| 249 | result.x = x; | ||
| 250 | result.y = y; | ||
| 251 | result.z = z; | ||
| 252 | result.w = w; | ||
| 253 | return result; | ||
| 254 | } | ||
| 255 | |||
| 256 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 257 | * signed (twos-complement) integers. */ | ||
| 258 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, simd_char2 zw) { | ||
| 259 | simd_char4 result; | ||
| 260 | result.x = x; | ||
| 261 | result.y = y; | ||
| 262 | result.zw = zw; | ||
| 263 | return result; | ||
| 264 | } | ||
| 265 | |||
| 266 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 267 | * signed (twos-complement) integers. */ | ||
| 268 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char2 yz, char w) { | ||
| 269 | simd_char4 result; | ||
| 270 | result.x = x; | ||
| 271 | result.yz = yz; | ||
| 272 | result.w = w; | ||
| 273 | return result; | ||
| 274 | } | ||
| 275 | |||
| 276 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 277 | * signed (twos-complement) integers. */ | ||
| 278 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, char z, char w) { | ||
| 279 | simd_char4 result; | ||
| 280 | result.xy = xy; | ||
| 281 | result.z = z; | ||
| 282 | result.w = w; | ||
| 283 | return result; | ||
| 284 | } | ||
| 285 | |||
| 286 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 287 | * signed (twos-complement) integers. */ | ||
| 288 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char3 yzw) { | ||
| 289 | simd_char4 result; | ||
| 290 | result.x = x; | ||
| 291 | result.yzw = yzw; | ||
| 292 | return result; | ||
| 293 | } | ||
| 294 | |||
| 295 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 296 | * signed (twos-complement) integers. */ | ||
| 297 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, simd_char2 zw) { | ||
| 298 | simd_char4 result; | ||
| 299 | result.xy = xy; | ||
| 300 | result.zw = zw; | ||
| 301 | return result; | ||
| 302 | } | ||
| 303 | |||
| 304 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 305 | * signed (twos-complement) integers. */ | ||
| 306 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 xyz, char w) { | ||
| 307 | simd_char4 result; | ||
| 308 | result.xyz = xyz; | ||
| 309 | result.w = w; | ||
| 310 | return result; | ||
| 311 | } | ||
| 312 | |||
| 313 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 314 | * (twos-complement) integers. */ | ||
| 315 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char other) { | ||
| 316 | simd_char4 result = 0; | ||
| 317 | result.x = other; | ||
| 318 | return result; | ||
| 319 | } | ||
| 320 | |||
| 321 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 322 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 323 | * unspecified. */ | ||
| 324 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(char other) { | ||
| 325 | simd_char4 result; | ||
| 326 | result.x = other; | ||
| 327 | return result; | ||
| 328 | } | ||
| 329 | |||
| 330 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 331 | * (twos-complement) integers. */ | ||
| 332 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 other) { | ||
| 333 | simd_char4 result = 0; | ||
| 334 | result.xy = other; | ||
| 335 | return result; | ||
| 336 | } | ||
| 337 | |||
| 338 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 339 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 340 | * unspecified. */ | ||
| 341 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char2 other) { | ||
| 342 | simd_char4 result; | ||
| 343 | result.xy = other; | ||
| 344 | return result; | ||
| 345 | } | ||
| 346 | |||
| 347 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 348 | * (twos-complement) integers. */ | ||
| 349 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 other) { | ||
| 350 | simd_char4 result = 0; | ||
| 351 | result.xyz = other; | ||
| 352 | return result; | ||
| 353 | } | ||
| 354 | |||
| 355 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 356 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 357 | * unspecified. */ | ||
| 358 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char3 other) { | ||
| 359 | simd_char4 result; | ||
| 360 | result.xyz = other; | ||
| 361 | return result; | ||
| 362 | } | ||
| 363 | |||
| 364 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 365 | * templated and autogenerated code. */ | ||
| 366 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char4 other) { | ||
| 367 | return other; | ||
| 368 | } | ||
| 369 | |||
| 370 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 371 | * complement) integers. */ | ||
| 372 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char8 other) { | ||
| 373 | return other.xyzw; | ||
| 374 | } | ||
| 375 | |||
| 376 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 377 | * complement) integers. */ | ||
| 378 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char16 other) { | ||
| 379 | return other.xyzw; | ||
| 380 | } | ||
| 381 | |||
| 382 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 383 | * complement) integers. */ | ||
| 384 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char32 other) { | ||
| 385 | return other.xyzw; | ||
| 386 | } | ||
| 387 | |||
| 388 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 389 | * complement) integers. */ | ||
| 390 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char64 other) { | ||
| 391 | return other.xyzw; | ||
| 392 | } | ||
| 393 | |||
| 394 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 395 | * signed (twos-complement) integers. */ | ||
| 396 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 lo, simd_char4 hi) { | ||
| 397 | simd_char8 result; | ||
| 398 | result.lo = lo; | ||
| 399 | result.hi = hi; | ||
| 400 | return result; | ||
| 401 | } | ||
| 402 | |||
| 403 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 404 | * (twos-complement) integers. */ | ||
| 405 | static inline SIMD_CFUNC simd_char8 simd_make_char8(char other) { | ||
| 406 | simd_char8 result = 0; | ||
| 407 | result.x = other; | ||
| 408 | return result; | ||
| 409 | } | ||
| 410 | |||
| 411 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 412 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 413 | * unspecified. */ | ||
| 414 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(char other) { | ||
| 415 | simd_char8 result; | ||
| 416 | result.x = other; | ||
| 417 | return result; | ||
| 418 | } | ||
| 419 | |||
| 420 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 421 | * (twos-complement) integers. */ | ||
| 422 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char2 other) { | ||
| 423 | simd_char8 result = 0; | ||
| 424 | result.xy = other; | ||
| 425 | return result; | ||
| 426 | } | ||
| 427 | |||
| 428 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 429 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 430 | * unspecified. */ | ||
| 431 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char2 other) { | ||
| 432 | simd_char8 result; | ||
| 433 | result.xy = other; | ||
| 434 | return result; | ||
| 435 | } | ||
| 436 | |||
| 437 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 438 | * (twos-complement) integers. */ | ||
| 439 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char3 other) { | ||
| 440 | simd_char8 result = 0; | ||
| 441 | result.xyz = other; | ||
| 442 | return result; | ||
| 443 | } | ||
| 444 | |||
| 445 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 446 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 447 | * unspecified. */ | ||
| 448 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char3 other) { | ||
| 449 | simd_char8 result; | ||
| 450 | result.xyz = other; | ||
| 451 | return result; | ||
| 452 | } | ||
| 453 | |||
| 454 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 455 | * (twos-complement) integers. */ | ||
| 456 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 other) { | ||
| 457 | simd_char8 result = 0; | ||
| 458 | result.xyzw = other; | ||
| 459 | return result; | ||
| 460 | } | ||
| 461 | |||
| 462 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 463 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 464 | * unspecified. */ | ||
| 465 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char4 other) { | ||
| 466 | simd_char8 result; | ||
| 467 | result.xyzw = other; | ||
| 468 | return result; | ||
| 469 | } | ||
| 470 | |||
| 471 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 472 | * templated and autogenerated code. */ | ||
| 473 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char8 other) { | ||
| 474 | return other; | ||
| 475 | } | ||
| 476 | |||
| 477 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 478 | * (twos-complement) integers. */ | ||
| 479 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char16 other) { | ||
| 480 | return simd_make_char8(other.lo); | ||
| 481 | } | ||
| 482 | |||
| 483 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 484 | * (twos-complement) integers. */ | ||
| 485 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char32 other) { | ||
| 486 | return simd_make_char8(other.lo); | ||
| 487 | } | ||
| 488 | |||
| 489 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 490 | * (twos-complement) integers. */ | ||
| 491 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char64 other) { | ||
| 492 | return simd_make_char8(other.lo); | ||
| 493 | } | ||
| 494 | |||
| 495 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 496 | * signed (twos-complement) integers. */ | ||
| 497 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 lo, simd_char8 hi) { | ||
| 498 | simd_char16 result; | ||
| 499 | result.lo = lo; | ||
| 500 | result.hi = hi; | ||
| 501 | return result; | ||
| 502 | } | ||
| 503 | |||
| 504 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 505 | * (twos-complement) integers. */ | ||
| 506 | static inline SIMD_CFUNC simd_char16 simd_make_char16(char other) { | ||
| 507 | simd_char16 result = 0; | ||
| 508 | result.x = other; | ||
| 509 | return result; | ||
| 510 | } | ||
| 511 | |||
| 512 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 513 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 514 | * lanes are unspecified. */ | ||
| 515 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(char other) { | ||
| 516 | simd_char16 result; | ||
| 517 | result.x = other; | ||
| 518 | return result; | ||
| 519 | } | ||
| 520 | |||
| 521 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 522 | * (twos-complement) integers. */ | ||
| 523 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char2 other) { | ||
| 524 | simd_char16 result = 0; | ||
| 525 | result.xy = other; | ||
| 526 | return result; | ||
| 527 | } | ||
| 528 | |||
| 529 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 530 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 531 | * lanes are unspecified. */ | ||
| 532 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char2 other) { | ||
| 533 | simd_char16 result; | ||
| 534 | result.xy = other; | ||
| 535 | return result; | ||
| 536 | } | ||
| 537 | |||
| 538 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 539 | * (twos-complement) integers. */ | ||
| 540 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char3 other) { | ||
| 541 | simd_char16 result = 0; | ||
| 542 | result.xyz = other; | ||
| 543 | return result; | ||
| 544 | } | ||
| 545 | |||
| 546 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 547 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 548 | * lanes are unspecified. */ | ||
| 549 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char3 other) { | ||
| 550 | simd_char16 result; | ||
| 551 | result.xyz = other; | ||
| 552 | return result; | ||
| 553 | } | ||
| 554 | |||
| 555 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 556 | * (twos-complement) integers. */ | ||
| 557 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char4 other) { | ||
| 558 | simd_char16 result = 0; | ||
| 559 | result.xyzw = other; | ||
| 560 | return result; | ||
| 561 | } | ||
| 562 | |||
| 563 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 564 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 565 | * lanes are unspecified. */ | ||
| 566 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char4 other) { | ||
| 567 | simd_char16 result; | ||
| 568 | result.xyzw = other; | ||
| 569 | return result; | ||
| 570 | } | ||
| 571 | |||
| 572 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 573 | * (twos-complement) integers. */ | ||
| 574 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 other) { | ||
| 575 | simd_char16 result = 0; | ||
| 576 | result.lo = simd_make_char8(other); | ||
| 577 | return result; | ||
| 578 | } | ||
| 579 | |||
| 580 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 581 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 582 | * lanes are unspecified. */ | ||
| 583 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char8 other) { | ||
| 584 | simd_char16 result; | ||
| 585 | result.lo = simd_make_char8(other); | ||
| 586 | return result; | ||
| 587 | } | ||
| 588 | |||
| 589 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 590 | * templated and autogenerated code. */ | ||
| 591 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char16 other) { | ||
| 592 | return other; | ||
| 593 | } | ||
| 594 | |||
| 595 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed | ||
| 596 | * (twos-complement) integers. */ | ||
| 597 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char32 other) { | ||
| 598 | return simd_make_char16(other.lo); | ||
| 599 | } | ||
| 600 | |||
| 601 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed | ||
| 602 | * (twos-complement) integers. */ | ||
| 603 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char64 other) { | ||
| 604 | return simd_make_char16(other.lo); | ||
| 605 | } | ||
| 606 | |||
| 607 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 608 | * 8-bit signed (twos-complement) integers. */ | ||
| 609 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 lo, simd_char16 hi) { | ||
| 610 | simd_char32 result; | ||
| 611 | result.lo = lo; | ||
| 612 | result.hi = hi; | ||
| 613 | return result; | ||
| 614 | } | ||
| 615 | |||
| 616 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 617 | * signed (twos-complement) integers. */ | ||
| 618 | static inline SIMD_CFUNC simd_char32 simd_make_char32(char other) { | ||
| 619 | simd_char32 result = 0; | ||
| 620 | result.x = other; | ||
| 621 | return result; | ||
| 622 | } | ||
| 623 | |||
| 624 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 625 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 626 | * lanes are unspecified. */ | ||
| 627 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(char other) { | ||
| 628 | simd_char32 result; | ||
| 629 | result.x = other; | ||
| 630 | return result; | ||
| 631 | } | ||
| 632 | |||
| 633 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 634 | * signed (twos-complement) integers. */ | ||
| 635 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char2 other) { | ||
| 636 | simd_char32 result = 0; | ||
| 637 | result.xy = other; | ||
| 638 | return result; | ||
| 639 | } | ||
| 640 | |||
| 641 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 642 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 643 | * lanes are unspecified. */ | ||
| 644 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char2 other) { | ||
| 645 | simd_char32 result; | ||
| 646 | result.xy = other; | ||
| 647 | return result; | ||
| 648 | } | ||
| 649 | |||
| 650 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 651 | * signed (twos-complement) integers. */ | ||
| 652 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char3 other) { | ||
| 653 | simd_char32 result = 0; | ||
| 654 | result.xyz = other; | ||
| 655 | return result; | ||
| 656 | } | ||
| 657 | |||
| 658 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 659 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 660 | * lanes are unspecified. */ | ||
| 661 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char3 other) { | ||
| 662 | simd_char32 result; | ||
| 663 | result.xyz = other; | ||
| 664 | return result; | ||
| 665 | } | ||
| 666 | |||
| 667 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 668 | * signed (twos-complement) integers. */ | ||
| 669 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char4 other) { | ||
| 670 | simd_char32 result = 0; | ||
| 671 | result.xyzw = other; | ||
| 672 | return result; | ||
| 673 | } | ||
| 674 | |||
| 675 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 676 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 677 | * lanes are unspecified. */ | ||
| 678 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char4 other) { | ||
| 679 | simd_char32 result; | ||
| 680 | result.xyzw = other; | ||
| 681 | return result; | ||
| 682 | } | ||
| 683 | |||
| 684 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 685 | * signed (twos-complement) integers. */ | ||
| 686 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char8 other) { | ||
| 687 | simd_char32 result = 0; | ||
| 688 | result.lo = simd_make_char16(other); | ||
| 689 | return result; | ||
| 690 | } | ||
| 691 | |||
| 692 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 693 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 694 | * lanes are unspecified. */ | ||
| 695 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char8 other) { | ||
| 696 | simd_char32 result; | ||
| 697 | result.lo = simd_make_char16(other); | ||
| 698 | return result; | ||
| 699 | } | ||
| 700 | |||
| 701 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 702 | * signed (twos-complement) integers. */ | ||
| 703 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 other) { | ||
| 704 | simd_char32 result = 0; | ||
| 705 | result.lo = simd_make_char16(other); | ||
| 706 | return result; | ||
| 707 | } | ||
| 708 | |||
| 709 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 710 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 711 | * lanes are unspecified. */ | ||
| 712 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char16 other) { | ||
| 713 | simd_char32 result; | ||
| 714 | result.lo = simd_make_char16(other); | ||
| 715 | return result; | ||
| 716 | } | ||
| 717 | |||
| 718 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 719 | * templated and autogenerated code. */ | ||
| 720 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char32 other) { | ||
| 721 | return other; | ||
| 722 | } | ||
| 723 | |||
| 724 | /*! @abstract Truncates `other` to form a vector of thirty-two 8-bit signed | ||
| 725 | * (twos-complement) integers. */ | ||
| 726 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char64 other) { | ||
| 727 | return simd_make_char32(other.lo); | ||
| 728 | } | ||
| 729 | |||
| 730 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 731 | * 8-bit signed (twos-complement) integers. */ | ||
| 732 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 lo, simd_char32 hi) { | ||
| 733 | simd_char64 result; | ||
| 734 | result.lo = lo; | ||
| 735 | result.hi = hi; | ||
| 736 | return result; | ||
| 737 | } | ||
| 738 | |||
| 739 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 740 | * signed (twos-complement) integers. */ | ||
| 741 | static inline SIMD_CFUNC simd_char64 simd_make_char64(char other) { | ||
| 742 | simd_char64 result = 0; | ||
| 743 | result.x = other; | ||
| 744 | return result; | ||
| 745 | } | ||
| 746 | |||
| 747 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 748 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 749 | * lanes are unspecified. */ | ||
| 750 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(char other) { | ||
| 751 | simd_char64 result; | ||
| 752 | result.x = other; | ||
| 753 | return result; | ||
| 754 | } | ||
| 755 | |||
| 756 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 757 | * signed (twos-complement) integers. */ | ||
| 758 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char2 other) { | ||
| 759 | simd_char64 result = 0; | ||
| 760 | result.xy = other; | ||
| 761 | return result; | ||
| 762 | } | ||
| 763 | |||
| 764 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 765 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 766 | * lanes are unspecified. */ | ||
| 767 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char2 other) { | ||
| 768 | simd_char64 result; | ||
| 769 | result.xy = other; | ||
| 770 | return result; | ||
| 771 | } | ||
| 772 | |||
| 773 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 774 | * signed (twos-complement) integers. */ | ||
| 775 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char3 other) { | ||
| 776 | simd_char64 result = 0; | ||
| 777 | result.xyz = other; | ||
| 778 | return result; | ||
| 779 | } | ||
| 780 | |||
| 781 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 782 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 783 | * lanes are unspecified. */ | ||
| 784 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char3 other) { | ||
| 785 | simd_char64 result; | ||
| 786 | result.xyz = other; | ||
| 787 | return result; | ||
| 788 | } | ||
| 789 | |||
| 790 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 791 | * signed (twos-complement) integers. */ | ||
| 792 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char4 other) { | ||
| 793 | simd_char64 result = 0; | ||
| 794 | result.xyzw = other; | ||
| 795 | return result; | ||
| 796 | } | ||
| 797 | |||
| 798 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 799 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 800 | * lanes are unspecified. */ | ||
| 801 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char4 other) { | ||
| 802 | simd_char64 result; | ||
| 803 | result.xyzw = other; | ||
| 804 | return result; | ||
| 805 | } | ||
| 806 | |||
| 807 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 808 | * signed (twos-complement) integers. */ | ||
| 809 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char8 other) { | ||
| 810 | simd_char64 result = 0; | ||
| 811 | result.lo = simd_make_char32(other); | ||
| 812 | return result; | ||
| 813 | } | ||
| 814 | |||
| 815 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 816 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 817 | * lanes are unspecified. */ | ||
| 818 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char8 other) { | ||
| 819 | simd_char64 result; | ||
| 820 | result.lo = simd_make_char32(other); | ||
| 821 | return result; | ||
| 822 | } | ||
| 823 | |||
| 824 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 825 | * signed (twos-complement) integers. */ | ||
| 826 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char16 other) { | ||
| 827 | simd_char64 result = 0; | ||
| 828 | result.lo = simd_make_char32(other); | ||
| 829 | return result; | ||
| 830 | } | ||
| 831 | |||
| 832 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 833 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 834 | * lanes are unspecified. */ | ||
| 835 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char16 other) { | ||
| 836 | simd_char64 result; | ||
| 837 | result.lo = simd_make_char32(other); | ||
| 838 | return result; | ||
| 839 | } | ||
| 840 | |||
| 841 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 842 | * signed (twos-complement) integers. */ | ||
| 843 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 other) { | ||
| 844 | simd_char64 result = 0; | ||
| 845 | result.lo = simd_make_char32(other); | ||
| 846 | return result; | ||
| 847 | } | ||
| 848 | |||
| 849 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 850 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 851 | * lanes are unspecified. */ | ||
| 852 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char32 other) { | ||
| 853 | simd_char64 result; | ||
| 854 | result.lo = simd_make_char32(other); | ||
| 855 | return result; | ||
| 856 | } | ||
| 857 | |||
| 858 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 859 | * templated and autogenerated code. */ | ||
| 860 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char64 other) { | ||
| 861 | return other; | ||
| 862 | } | ||
| 863 | |||
| 864 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit | ||
| 865 | * unsigned integers. */ | ||
| 866 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char x, unsigned char y) { | ||
| 867 | simd_uchar2 result; | ||
| 868 | result.x = x; | ||
| 869 | result.y = y; | ||
| 870 | return result; | ||
| 871 | } | ||
| 872 | |||
| 873 | /*! @abstract Zero-extends `other` to form a vector of two 8-bit unsigned | ||
| 874 | * integers. */ | ||
| 875 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char other) { | ||
| 876 | simd_uchar2 result = 0; | ||
| 877 | result.x = other; | ||
| 878 | return result; | ||
| 879 | } | ||
| 880 | |||
| 881 | /*! @abstract Extends `other` to form a vector of two 8-bit unsigned | ||
| 882 | * integers. The contents of the newly-created vector lanes are | ||
| 883 | * unspecified. */ | ||
| 884 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2_undef(unsigned char other) { | ||
| 885 | simd_uchar2 result; | ||
| 886 | result.x = other; | ||
| 887 | return result; | ||
| 888 | } | ||
| 889 | |||
| 890 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 891 | * templated and autogenerated code. */ | ||
| 892 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar2 other) { | ||
| 893 | return other; | ||
| 894 | } | ||
| 895 | |||
| 896 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 897 | * integers. */ | ||
| 898 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar3 other) { | ||
| 899 | return other.xy; | ||
| 900 | } | ||
| 901 | |||
| 902 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 903 | * integers. */ | ||
| 904 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar4 other) { | ||
| 905 | return other.xy; | ||
| 906 | } | ||
| 907 | |||
| 908 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 909 | * integers. */ | ||
| 910 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar8 other) { | ||
| 911 | return other.xy; | ||
| 912 | } | ||
| 913 | |||
| 914 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 915 | * integers. */ | ||
| 916 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar16 other) { | ||
| 917 | return other.xy; | ||
| 918 | } | ||
| 919 | |||
| 920 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 921 | * integers. */ | ||
| 922 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar32 other) { | ||
| 923 | return other.xy; | ||
| 924 | } | ||
| 925 | |||
| 926 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 927 | * integers. */ | ||
| 928 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar64 other) { | ||
| 929 | return other.xy; | ||
| 930 | } | ||
| 931 | |||
| 932 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 933 | * unsigned integers. */ | ||
| 934 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, unsigned char y, unsigned char z) { | ||
| 935 | simd_uchar3 result; | ||
| 936 | result.x = x; | ||
| 937 | result.y = y; | ||
| 938 | result.z = z; | ||
| 939 | return result; | ||
| 940 | } | ||
| 941 | |||
| 942 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 943 | * unsigned integers. */ | ||
| 944 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, simd_uchar2 yz) { | ||
| 945 | simd_uchar3 result; | ||
| 946 | result.x = x; | ||
| 947 | result.yz = yz; | ||
| 948 | return result; | ||
| 949 | } | ||
| 950 | |||
| 951 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 952 | * unsigned integers. */ | ||
| 953 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 xy, unsigned char z) { | ||
| 954 | simd_uchar3 result; | ||
| 955 | result.xy = xy; | ||
| 956 | result.z = z; | ||
| 957 | return result; | ||
| 958 | } | ||
| 959 | |||
| 960 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned | ||
| 961 | * integers. */ | ||
| 962 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char other) { | ||
| 963 | simd_uchar3 result = 0; | ||
| 964 | result.x = other; | ||
| 965 | return result; | ||
| 966 | } | ||
| 967 | |||
| 968 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 969 | * integers. The contents of the newly-created vector lanes are | ||
| 970 | * unspecified. */ | ||
| 971 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(unsigned char other) { | ||
| 972 | simd_uchar3 result; | ||
| 973 | result.x = other; | ||
| 974 | return result; | ||
| 975 | } | ||
| 976 | |||
| 977 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned | ||
| 978 | * integers. */ | ||
| 979 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 other) { | ||
| 980 | simd_uchar3 result = 0; | ||
| 981 | result.xy = other; | ||
| 982 | return result; | ||
| 983 | } | ||
| 984 | |||
| 985 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 986 | * integers. The contents of the newly-created vector lanes are | ||
| 987 | * unspecified. */ | ||
| 988 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(simd_uchar2 other) { | ||
| 989 | simd_uchar3 result; | ||
| 990 | result.xy = other; | ||
| 991 | return result; | ||
| 992 | } | ||
| 993 | |||
| 994 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 995 | * templated and autogenerated code. */ | ||
| 996 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar3 other) { | ||
| 997 | return other; | ||
| 998 | } | ||
| 999 | |||
| 1000 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 1001 | * integers. */ | ||
| 1002 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar4 other) { | ||
| 1003 | return other.xyz; | ||
| 1004 | } | ||
| 1005 | |||
| 1006 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 1007 | * integers. */ | ||
| 1008 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar8 other) { | ||
| 1009 | return other.xyz; | ||
| 1010 | } | ||
| 1011 | |||
| 1012 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 1013 | * integers. */ | ||
| 1014 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar16 other) { | ||
| 1015 | return other.xyz; | ||
| 1016 | } | ||
| 1017 | |||
| 1018 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 1019 | * integers. */ | ||
| 1020 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar32 other) { | ||
| 1021 | return other.xyz; | ||
| 1022 | } | ||
| 1023 | |||
| 1024 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 1025 | * integers. */ | ||
| 1026 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar64 other) { | ||
| 1027 | return other.xyz; | ||
| 1028 | } | ||
| 1029 | |||
| 1030 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 1031 | * 8-bit unsigned integers. */ | ||
| 1032 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { | ||
| 1033 | simd_uchar4 result; | ||
| 1034 | result.x = x; | ||
| 1035 | result.y = y; | ||
| 1036 | result.z = z; | ||
| 1037 | result.w = w; | ||
| 1038 | return result; | ||
| 1039 | } | ||
| 1040 | |||
| 1041 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 1042 | * unsigned integers. */ | ||
| 1043 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, simd_uchar2 zw) { | ||
| 1044 | simd_uchar4 result; | ||
| 1045 | result.x = x; | ||
| 1046 | result.y = y; | ||
| 1047 | result.zw = zw; | ||
| 1048 | return result; | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 1052 | * unsigned integers. */ | ||
| 1053 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar2 yz, unsigned char w) { | ||
| 1054 | simd_uchar4 result; | ||
| 1055 | result.x = x; | ||
| 1056 | result.yz = yz; | ||
| 1057 | result.w = w; | ||
| 1058 | return result; | ||
| 1059 | } | ||
| 1060 | |||
| 1061 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 1062 | * unsigned integers. */ | ||
| 1063 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, unsigned char z, unsigned char w) { | ||
| 1064 | simd_uchar4 result; | ||
| 1065 | result.xy = xy; | ||
| 1066 | result.z = z; | ||
| 1067 | result.w = w; | ||
| 1068 | return result; | ||
| 1069 | } | ||
| 1070 | |||
| 1071 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 1072 | * unsigned integers. */ | ||
| 1073 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar3 yzw) { | ||
| 1074 | simd_uchar4 result; | ||
| 1075 | result.x = x; | ||
| 1076 | result.yzw = yzw; | ||
| 1077 | return result; | ||
| 1078 | } | ||
| 1079 | |||
| 1080 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 1081 | * unsigned integers. */ | ||
| 1082 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, simd_uchar2 zw) { | ||
| 1083 | simd_uchar4 result; | ||
| 1084 | result.xy = xy; | ||
| 1085 | result.zw = zw; | ||
| 1086 | return result; | ||
| 1087 | } | ||
| 1088 | |||
| 1089 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 1090 | * unsigned integers. */ | ||
| 1091 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 xyz, unsigned char w) { | ||
| 1092 | simd_uchar4 result; | ||
| 1093 | result.xyz = xyz; | ||
| 1094 | result.w = w; | ||
| 1095 | return result; | ||
| 1096 | } | ||
| 1097 | |||
| 1098 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1099 | * integers. */ | ||
| 1100 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char other) { | ||
| 1101 | simd_uchar4 result = 0; | ||
| 1102 | result.x = other; | ||
| 1103 | return result; | ||
| 1104 | } | ||
| 1105 | |||
| 1106 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1107 | * integers. The contents of the newly-created vector lanes are | ||
| 1108 | * unspecified. */ | ||
| 1109 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(unsigned char other) { | ||
| 1110 | simd_uchar4 result; | ||
| 1111 | result.x = other; | ||
| 1112 | return result; | ||
| 1113 | } | ||
| 1114 | |||
| 1115 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1116 | * integers. */ | ||
| 1117 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 other) { | ||
| 1118 | simd_uchar4 result = 0; | ||
| 1119 | result.xy = other; | ||
| 1120 | return result; | ||
| 1121 | } | ||
| 1122 | |||
| 1123 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1124 | * integers. The contents of the newly-created vector lanes are | ||
| 1125 | * unspecified. */ | ||
| 1126 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar2 other) { | ||
| 1127 | simd_uchar4 result; | ||
| 1128 | result.xy = other; | ||
| 1129 | return result; | ||
| 1130 | } | ||
| 1131 | |||
| 1132 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1133 | * integers. */ | ||
| 1134 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 other) { | ||
| 1135 | simd_uchar4 result = 0; | ||
| 1136 | result.xyz = other; | ||
| 1137 | return result; | ||
| 1138 | } | ||
| 1139 | |||
| 1140 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1141 | * integers. The contents of the newly-created vector lanes are | ||
| 1142 | * unspecified. */ | ||
| 1143 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar3 other) { | ||
| 1144 | simd_uchar4 result; | ||
| 1145 | result.xyz = other; | ||
| 1146 | return result; | ||
| 1147 | } | ||
| 1148 | |||
| 1149 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1150 | * templated and autogenerated code. */ | ||
| 1151 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar4 other) { | ||
| 1152 | return other; | ||
| 1153 | } | ||
| 1154 | |||
| 1155 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1156 | * integers. */ | ||
| 1157 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar8 other) { | ||
| 1158 | return other.xyzw; | ||
| 1159 | } | ||
| 1160 | |||
| 1161 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1162 | * integers. */ | ||
| 1163 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar16 other) { | ||
| 1164 | return other.xyzw; | ||
| 1165 | } | ||
| 1166 | |||
| 1167 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1168 | * integers. */ | ||
| 1169 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar32 other) { | ||
| 1170 | return other.xyzw; | ||
| 1171 | } | ||
| 1172 | |||
| 1173 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1174 | * integers. */ | ||
| 1175 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar64 other) { | ||
| 1176 | return other.xyzw; | ||
| 1177 | } | ||
| 1178 | |||
| 1179 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 1180 | * unsigned integers. */ | ||
| 1181 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 lo, simd_uchar4 hi) { | ||
| 1182 | simd_uchar8 result; | ||
| 1183 | result.lo = lo; | ||
| 1184 | result.hi = hi; | ||
| 1185 | return result; | ||
| 1186 | } | ||
| 1187 | |||
| 1188 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1189 | * integers. */ | ||
| 1190 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(unsigned char other) { | ||
| 1191 | simd_uchar8 result = 0; | ||
| 1192 | result.x = other; | ||
| 1193 | return result; | ||
| 1194 | } | ||
| 1195 | |||
| 1196 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1197 | * integers. The contents of the newly-created vector lanes are | ||
| 1198 | * unspecified. */ | ||
| 1199 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(unsigned char other) { | ||
| 1200 | simd_uchar8 result; | ||
| 1201 | result.x = other; | ||
| 1202 | return result; | ||
| 1203 | } | ||
| 1204 | |||
| 1205 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1206 | * integers. */ | ||
| 1207 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar2 other) { | ||
| 1208 | simd_uchar8 result = 0; | ||
| 1209 | result.xy = other; | ||
| 1210 | return result; | ||
| 1211 | } | ||
| 1212 | |||
| 1213 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1214 | * integers. The contents of the newly-created vector lanes are | ||
| 1215 | * unspecified. */ | ||
| 1216 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar2 other) { | ||
| 1217 | simd_uchar8 result; | ||
| 1218 | result.xy = other; | ||
| 1219 | return result; | ||
| 1220 | } | ||
| 1221 | |||
| 1222 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1223 | * integers. */ | ||
| 1224 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar3 other) { | ||
| 1225 | simd_uchar8 result = 0; | ||
| 1226 | result.xyz = other; | ||
| 1227 | return result; | ||
| 1228 | } | ||
| 1229 | |||
| 1230 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1231 | * integers. The contents of the newly-created vector lanes are | ||
| 1232 | * unspecified. */ | ||
| 1233 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar3 other) { | ||
| 1234 | simd_uchar8 result; | ||
| 1235 | result.xyz = other; | ||
| 1236 | return result; | ||
| 1237 | } | ||
| 1238 | |||
| 1239 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1240 | * integers. */ | ||
| 1241 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 other) { | ||
| 1242 | simd_uchar8 result = 0; | ||
| 1243 | result.xyzw = other; | ||
| 1244 | return result; | ||
| 1245 | } | ||
| 1246 | |||
| 1247 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1248 | * integers. The contents of the newly-created vector lanes are | ||
| 1249 | * unspecified. */ | ||
| 1250 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar4 other) { | ||
| 1251 | simd_uchar8 result; | ||
| 1252 | result.xyzw = other; | ||
| 1253 | return result; | ||
| 1254 | } | ||
| 1255 | |||
| 1256 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1257 | * templated and autogenerated code. */ | ||
| 1258 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar8 other) { | ||
| 1259 | return other; | ||
| 1260 | } | ||
| 1261 | |||
| 1262 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1263 | * integers. */ | ||
| 1264 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar16 other) { | ||
| 1265 | return simd_make_uchar8(other.lo); | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1269 | * integers. */ | ||
| 1270 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar32 other) { | ||
| 1271 | return simd_make_uchar8(other.lo); | ||
| 1272 | } | ||
| 1273 | |||
| 1274 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1275 | * integers. */ | ||
| 1276 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar64 other) { | ||
| 1277 | return simd_make_uchar8(other.lo); | ||
| 1278 | } | ||
| 1279 | |||
| 1280 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 1281 | * unsigned integers. */ | ||
| 1282 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 lo, simd_uchar8 hi) { | ||
| 1283 | simd_uchar16 result; | ||
| 1284 | result.lo = lo; | ||
| 1285 | result.hi = hi; | ||
| 1286 | return result; | ||
| 1287 | } | ||
| 1288 | |||
| 1289 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1290 | * unsigned integers. */ | ||
| 1291 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(unsigned char other) { | ||
| 1292 | simd_uchar16 result = 0; | ||
| 1293 | result.x = other; | ||
| 1294 | return result; | ||
| 1295 | } | ||
| 1296 | |||
| 1297 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1298 | * integers. The contents of the newly-created vector lanes are | ||
| 1299 | * unspecified. */ | ||
| 1300 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(unsigned char other) { | ||
| 1301 | simd_uchar16 result; | ||
| 1302 | result.x = other; | ||
| 1303 | return result; | ||
| 1304 | } | ||
| 1305 | |||
| 1306 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1307 | * unsigned integers. */ | ||
| 1308 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar2 other) { | ||
| 1309 | simd_uchar16 result = 0; | ||
| 1310 | result.xy = other; | ||
| 1311 | return result; | ||
| 1312 | } | ||
| 1313 | |||
| 1314 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1315 | * integers. The contents of the newly-created vector lanes are | ||
| 1316 | * unspecified. */ | ||
| 1317 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar2 other) { | ||
| 1318 | simd_uchar16 result; | ||
| 1319 | result.xy = other; | ||
| 1320 | return result; | ||
| 1321 | } | ||
| 1322 | |||
| 1323 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1324 | * unsigned integers. */ | ||
| 1325 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar3 other) { | ||
| 1326 | simd_uchar16 result = 0; | ||
| 1327 | result.xyz = other; | ||
| 1328 | return result; | ||
| 1329 | } | ||
| 1330 | |||
| 1331 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1332 | * integers. The contents of the newly-created vector lanes are | ||
| 1333 | * unspecified. */ | ||
| 1334 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar3 other) { | ||
| 1335 | simd_uchar16 result; | ||
| 1336 | result.xyz = other; | ||
| 1337 | return result; | ||
| 1338 | } | ||
| 1339 | |||
| 1340 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1341 | * unsigned integers. */ | ||
| 1342 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar4 other) { | ||
| 1343 | simd_uchar16 result = 0; | ||
| 1344 | result.xyzw = other; | ||
| 1345 | return result; | ||
| 1346 | } | ||
| 1347 | |||
| 1348 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1349 | * integers. The contents of the newly-created vector lanes are | ||
| 1350 | * unspecified. */ | ||
| 1351 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar4 other) { | ||
| 1352 | simd_uchar16 result; | ||
| 1353 | result.xyzw = other; | ||
| 1354 | return result; | ||
| 1355 | } | ||
| 1356 | |||
| 1357 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1358 | * unsigned integers. */ | ||
| 1359 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 other) { | ||
| 1360 | simd_uchar16 result = 0; | ||
| 1361 | result.lo = simd_make_uchar8(other); | ||
| 1362 | return result; | ||
| 1363 | } | ||
| 1364 | |||
| 1365 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1366 | * integers. The contents of the newly-created vector lanes are | ||
| 1367 | * unspecified. */ | ||
| 1368 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar8 other) { | ||
| 1369 | simd_uchar16 result; | ||
| 1370 | result.lo = simd_make_uchar8(other); | ||
| 1371 | return result; | ||
| 1372 | } | ||
| 1373 | |||
| 1374 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1375 | * templated and autogenerated code. */ | ||
| 1376 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar16 other) { | ||
| 1377 | return other; | ||
| 1378 | } | ||
| 1379 | |||
| 1380 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned | ||
| 1381 | * integers. */ | ||
| 1382 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar32 other) { | ||
| 1383 | return simd_make_uchar16(other.lo); | ||
| 1384 | } | ||
| 1385 | |||
| 1386 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned | ||
| 1387 | * integers. */ | ||
| 1388 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar64 other) { | ||
| 1389 | return simd_make_uchar16(other.lo); | ||
| 1390 | } | ||
| 1391 | |||
| 1392 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 1393 | * 8-bit unsigned integers. */ | ||
| 1394 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 lo, simd_uchar16 hi) { | ||
| 1395 | simd_uchar32 result; | ||
| 1396 | result.lo = lo; | ||
| 1397 | result.hi = hi; | ||
| 1398 | return result; | ||
| 1399 | } | ||
| 1400 | |||
| 1401 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1402 | * unsigned integers. */ | ||
| 1403 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(unsigned char other) { | ||
| 1404 | simd_uchar32 result = 0; | ||
| 1405 | result.x = other; | ||
| 1406 | return result; | ||
| 1407 | } | ||
| 1408 | |||
| 1409 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1410 | * integers. The contents of the newly-created vector lanes are | ||
| 1411 | * unspecified. */ | ||
| 1412 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(unsigned char other) { | ||
| 1413 | simd_uchar32 result; | ||
| 1414 | result.x = other; | ||
| 1415 | return result; | ||
| 1416 | } | ||
| 1417 | |||
| 1418 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1419 | * unsigned integers. */ | ||
| 1420 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar2 other) { | ||
| 1421 | simd_uchar32 result = 0; | ||
| 1422 | result.xy = other; | ||
| 1423 | return result; | ||
| 1424 | } | ||
| 1425 | |||
| 1426 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1427 | * integers. The contents of the newly-created vector lanes are | ||
| 1428 | * unspecified. */ | ||
| 1429 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar2 other) { | ||
| 1430 | simd_uchar32 result; | ||
| 1431 | result.xy = other; | ||
| 1432 | return result; | ||
| 1433 | } | ||
| 1434 | |||
| 1435 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1436 | * unsigned integers. */ | ||
| 1437 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar3 other) { | ||
| 1438 | simd_uchar32 result = 0; | ||
| 1439 | result.xyz = other; | ||
| 1440 | return result; | ||
| 1441 | } | ||
| 1442 | |||
| 1443 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1444 | * integers. The contents of the newly-created vector lanes are | ||
| 1445 | * unspecified. */ | ||
| 1446 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar3 other) { | ||
| 1447 | simd_uchar32 result; | ||
| 1448 | result.xyz = other; | ||
| 1449 | return result; | ||
| 1450 | } | ||
| 1451 | |||
| 1452 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1453 | * unsigned integers. */ | ||
| 1454 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar4 other) { | ||
| 1455 | simd_uchar32 result = 0; | ||
| 1456 | result.xyzw = other; | ||
| 1457 | return result; | ||
| 1458 | } | ||
| 1459 | |||
| 1460 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1461 | * integers. The contents of the newly-created vector lanes are | ||
| 1462 | * unspecified. */ | ||
| 1463 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar4 other) { | ||
| 1464 | simd_uchar32 result; | ||
| 1465 | result.xyzw = other; | ||
| 1466 | return result; | ||
| 1467 | } | ||
| 1468 | |||
| 1469 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1470 | * unsigned integers. */ | ||
| 1471 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar8 other) { | ||
| 1472 | simd_uchar32 result = 0; | ||
| 1473 | result.lo = simd_make_uchar16(other); | ||
| 1474 | return result; | ||
| 1475 | } | ||
| 1476 | |||
| 1477 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1478 | * integers. The contents of the newly-created vector lanes are | ||
| 1479 | * unspecified. */ | ||
| 1480 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar8 other) { | ||
| 1481 | simd_uchar32 result; | ||
| 1482 | result.lo = simd_make_uchar16(other); | ||
| 1483 | return result; | ||
| 1484 | } | ||
| 1485 | |||
| 1486 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1487 | * unsigned integers. */ | ||
| 1488 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 other) { | ||
| 1489 | simd_uchar32 result = 0; | ||
| 1490 | result.lo = simd_make_uchar16(other); | ||
| 1491 | return result; | ||
| 1492 | } | ||
| 1493 | |||
| 1494 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1495 | * integers. The contents of the newly-created vector lanes are | ||
| 1496 | * unspecified. */ | ||
| 1497 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar16 other) { | ||
| 1498 | simd_uchar32 result; | ||
| 1499 | result.lo = simd_make_uchar16(other); | ||
| 1500 | return result; | ||
| 1501 | } | ||
| 1502 | |||
| 1503 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1504 | * templated and autogenerated code. */ | ||
| 1505 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar32 other) { | ||
| 1506 | return other; | ||
| 1507 | } | ||
| 1508 | |||
| 1509 | /*! @abstract Truncates `other` to form a vector of thirty-two 8-bit | ||
| 1510 | * unsigned integers. */ | ||
| 1511 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar64 other) { | ||
| 1512 | return simd_make_uchar32(other.lo); | ||
| 1513 | } | ||
| 1514 | |||
| 1515 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 1516 | * 8-bit unsigned integers. */ | ||
| 1517 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 lo, simd_uchar32 hi) { | ||
| 1518 | simd_uchar64 result; | ||
| 1519 | result.lo = lo; | ||
| 1520 | result.hi = hi; | ||
| 1521 | return result; | ||
| 1522 | } | ||
| 1523 | |||
| 1524 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1525 | * unsigned integers. */ | ||
| 1526 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(unsigned char other) { | ||
| 1527 | simd_uchar64 result = 0; | ||
| 1528 | result.x = other; | ||
| 1529 | return result; | ||
| 1530 | } | ||
| 1531 | |||
| 1532 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1533 | * integers. The contents of the newly-created vector lanes are | ||
| 1534 | * unspecified. */ | ||
| 1535 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(unsigned char other) { | ||
| 1536 | simd_uchar64 result; | ||
| 1537 | result.x = other; | ||
| 1538 | return result; | ||
| 1539 | } | ||
| 1540 | |||
| 1541 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1542 | * unsigned integers. */ | ||
| 1543 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar2 other) { | ||
| 1544 | simd_uchar64 result = 0; | ||
| 1545 | result.xy = other; | ||
| 1546 | return result; | ||
| 1547 | } | ||
| 1548 | |||
| 1549 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1550 | * integers. The contents of the newly-created vector lanes are | ||
| 1551 | * unspecified. */ | ||
| 1552 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar2 other) { | ||
| 1553 | simd_uchar64 result; | ||
| 1554 | result.xy = other; | ||
| 1555 | return result; | ||
| 1556 | } | ||
| 1557 | |||
| 1558 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1559 | * unsigned integers. */ | ||
| 1560 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar3 other) { | ||
| 1561 | simd_uchar64 result = 0; | ||
| 1562 | result.xyz = other; | ||
| 1563 | return result; | ||
| 1564 | } | ||
| 1565 | |||
| 1566 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1567 | * integers. The contents of the newly-created vector lanes are | ||
| 1568 | * unspecified. */ | ||
| 1569 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar3 other) { | ||
| 1570 | simd_uchar64 result; | ||
| 1571 | result.xyz = other; | ||
| 1572 | return result; | ||
| 1573 | } | ||
| 1574 | |||
| 1575 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1576 | * unsigned integers. */ | ||
| 1577 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar4 other) { | ||
| 1578 | simd_uchar64 result = 0; | ||
| 1579 | result.xyzw = other; | ||
| 1580 | return result; | ||
| 1581 | } | ||
| 1582 | |||
| 1583 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1584 | * integers. The contents of the newly-created vector lanes are | ||
| 1585 | * unspecified. */ | ||
| 1586 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar4 other) { | ||
| 1587 | simd_uchar64 result; | ||
| 1588 | result.xyzw = other; | ||
| 1589 | return result; | ||
| 1590 | } | ||
| 1591 | |||
| 1592 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1593 | * unsigned integers. */ | ||
| 1594 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar8 other) { | ||
| 1595 | simd_uchar64 result = 0; | ||
| 1596 | result.lo = simd_make_uchar32(other); | ||
| 1597 | return result; | ||
| 1598 | } | ||
| 1599 | |||
| 1600 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1601 | * integers. The contents of the newly-created vector lanes are | ||
| 1602 | * unspecified. */ | ||
| 1603 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar8 other) { | ||
| 1604 | simd_uchar64 result; | ||
| 1605 | result.lo = simd_make_uchar32(other); | ||
| 1606 | return result; | ||
| 1607 | } | ||
| 1608 | |||
| 1609 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1610 | * unsigned integers. */ | ||
| 1611 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar16 other) { | ||
| 1612 | simd_uchar64 result = 0; | ||
| 1613 | result.lo = simd_make_uchar32(other); | ||
| 1614 | return result; | ||
| 1615 | } | ||
| 1616 | |||
| 1617 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1618 | * integers. The contents of the newly-created vector lanes are | ||
| 1619 | * unspecified. */ | ||
| 1620 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar16 other) { | ||
| 1621 | simd_uchar64 result; | ||
| 1622 | result.lo = simd_make_uchar32(other); | ||
| 1623 | return result; | ||
| 1624 | } | ||
| 1625 | |||
| 1626 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1627 | * unsigned integers. */ | ||
| 1628 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 other) { | ||
| 1629 | simd_uchar64 result = 0; | ||
| 1630 | result.lo = simd_make_uchar32(other); | ||
| 1631 | return result; | ||
| 1632 | } | ||
| 1633 | |||
| 1634 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1635 | * integers. The contents of the newly-created vector lanes are | ||
| 1636 | * unspecified. */ | ||
| 1637 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar32 other) { | ||
| 1638 | simd_uchar64 result; | ||
| 1639 | result.lo = simd_make_uchar32(other); | ||
| 1640 | return result; | ||
| 1641 | } | ||
| 1642 | |||
| 1643 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1644 | * templated and autogenerated code. */ | ||
| 1645 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar64 other) { | ||
| 1646 | return other; | ||
| 1647 | } | ||
| 1648 | |||
| 1649 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed | ||
| 1650 | * (twos-complement) integers. */ | ||
| 1651 | static inline SIMD_CFUNC simd_short2 simd_make_short2(short x, short y) { | ||
| 1652 | simd_short2 result; | ||
| 1653 | result.x = x; | ||
| 1654 | result.y = y; | ||
| 1655 | return result; | ||
| 1656 | } | ||
| 1657 | |||
| 1658 | /*! @abstract Zero-extends `other` to form a vector of two 16-bit signed | ||
| 1659 | * (twos-complement) integers. */ | ||
| 1660 | static inline SIMD_CFUNC simd_short2 simd_make_short2(short other) { | ||
| 1661 | simd_short2 result = 0; | ||
| 1662 | result.x = other; | ||
| 1663 | return result; | ||
| 1664 | } | ||
| 1665 | |||
| 1666 | /*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- | ||
| 1667 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1668 | * unspecified. */ | ||
| 1669 | static inline SIMD_CFUNC simd_short2 simd_make_short2_undef(short other) { | ||
| 1670 | simd_short2 result; | ||
| 1671 | result.x = other; | ||
| 1672 | return result; | ||
| 1673 | } | ||
| 1674 | |||
| 1675 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1676 | * templated and autogenerated code. */ | ||
| 1677 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short2 other) { | ||
| 1678 | return other; | ||
| 1679 | } | ||
| 1680 | |||
| 1681 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1682 | * complement) integers. */ | ||
| 1683 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short3 other) { | ||
| 1684 | return other.xy; | ||
| 1685 | } | ||
| 1686 | |||
| 1687 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1688 | * complement) integers. */ | ||
| 1689 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short4 other) { | ||
| 1690 | return other.xy; | ||
| 1691 | } | ||
| 1692 | |||
| 1693 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1694 | * complement) integers. */ | ||
| 1695 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short8 other) { | ||
| 1696 | return other.xy; | ||
| 1697 | } | ||
| 1698 | |||
| 1699 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1700 | * complement) integers. */ | ||
| 1701 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short16 other) { | ||
| 1702 | return other.xy; | ||
| 1703 | } | ||
| 1704 | |||
| 1705 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1706 | * complement) integers. */ | ||
| 1707 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short32 other) { | ||
| 1708 | return other.xy; | ||
| 1709 | } | ||
| 1710 | |||
| 1711 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 1712 | * signed (twos-complement) integers. */ | ||
| 1713 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, short y, short z) { | ||
| 1714 | simd_short3 result; | ||
| 1715 | result.x = x; | ||
| 1716 | result.y = y; | ||
| 1717 | result.z = z; | ||
| 1718 | return result; | ||
| 1719 | } | ||
| 1720 | |||
| 1721 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 1722 | * signed (twos-complement) integers. */ | ||
| 1723 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, simd_short2 yz) { | ||
| 1724 | simd_short3 result; | ||
| 1725 | result.x = x; | ||
| 1726 | result.yz = yz; | ||
| 1727 | return result; | ||
| 1728 | } | ||
| 1729 | |||
| 1730 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 1731 | * signed (twos-complement) integers. */ | ||
| 1732 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 xy, short z) { | ||
| 1733 | simd_short3 result; | ||
| 1734 | result.xy = xy; | ||
| 1735 | result.z = z; | ||
| 1736 | return result; | ||
| 1737 | } | ||
| 1738 | |||
| 1739 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit signed | ||
| 1740 | * (twos-complement) integers. */ | ||
| 1741 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short other) { | ||
| 1742 | simd_short3 result = 0; | ||
| 1743 | result.x = other; | ||
| 1744 | return result; | ||
| 1745 | } | ||
| 1746 | |||
| 1747 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 1748 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1749 | * unspecified. */ | ||
| 1750 | static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(short other) { | ||
| 1751 | simd_short3 result; | ||
| 1752 | result.x = other; | ||
| 1753 | return result; | ||
| 1754 | } | ||
| 1755 | |||
| 1756 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit signed | ||
| 1757 | * (twos-complement) integers. */ | ||
| 1758 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 other) { | ||
| 1759 | simd_short3 result = 0; | ||
| 1760 | result.xy = other; | ||
| 1761 | return result; | ||
| 1762 | } | ||
| 1763 | |||
| 1764 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 1765 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1766 | * unspecified. */ | ||
| 1767 | static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(simd_short2 other) { | ||
| 1768 | simd_short3 result; | ||
| 1769 | result.xy = other; | ||
| 1770 | return result; | ||
| 1771 | } | ||
| 1772 | |||
| 1773 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1774 | * templated and autogenerated code. */ | ||
| 1775 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short3 other) { | ||
| 1776 | return other; | ||
| 1777 | } | ||
| 1778 | |||
| 1779 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1780 | * (twos-complement) integers. */ | ||
| 1781 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short4 other) { | ||
| 1782 | return other.xyz; | ||
| 1783 | } | ||
| 1784 | |||
| 1785 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1786 | * (twos-complement) integers. */ | ||
| 1787 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short8 other) { | ||
| 1788 | return other.xyz; | ||
| 1789 | } | ||
| 1790 | |||
| 1791 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1792 | * (twos-complement) integers. */ | ||
| 1793 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short16 other) { | ||
| 1794 | return other.xyz; | ||
| 1795 | } | ||
| 1796 | |||
| 1797 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1798 | * (twos-complement) integers. */ | ||
| 1799 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short32 other) { | ||
| 1800 | return other.xyz; | ||
| 1801 | } | ||
| 1802 | |||
| 1803 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 1804 | * 16-bit signed (twos-complement) integers. */ | ||
| 1805 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, short z, short w) { | ||
| 1806 | simd_short4 result; | ||
| 1807 | result.x = x; | ||
| 1808 | result.y = y; | ||
| 1809 | result.z = z; | ||
| 1810 | result.w = w; | ||
| 1811 | return result; | ||
| 1812 | } | ||
| 1813 | |||
| 1814 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 1815 | * signed (twos-complement) integers. */ | ||
| 1816 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, simd_short2 zw) { | ||
| 1817 | simd_short4 result; | ||
| 1818 | result.x = x; | ||
| 1819 | result.y = y; | ||
| 1820 | result.zw = zw; | ||
| 1821 | return result; | ||
| 1822 | } | ||
| 1823 | |||
| 1824 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 1825 | * signed (twos-complement) integers. */ | ||
| 1826 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short2 yz, short w) { | ||
| 1827 | simd_short4 result; | ||
| 1828 | result.x = x; | ||
| 1829 | result.yz = yz; | ||
| 1830 | result.w = w; | ||
| 1831 | return result; | ||
| 1832 | } | ||
| 1833 | |||
| 1834 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 1835 | * signed (twos-complement) integers. */ | ||
| 1836 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, short z, short w) { | ||
| 1837 | simd_short4 result; | ||
| 1838 | result.xy = xy; | ||
| 1839 | result.z = z; | ||
| 1840 | result.w = w; | ||
| 1841 | return result; | ||
| 1842 | } | ||
| 1843 | |||
| 1844 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 1845 | * signed (twos-complement) integers. */ | ||
| 1846 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short3 yzw) { | ||
| 1847 | simd_short4 result; | ||
| 1848 | result.x = x; | ||
| 1849 | result.yzw = yzw; | ||
| 1850 | return result; | ||
| 1851 | } | ||
| 1852 | |||
| 1853 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 1854 | * signed (twos-complement) integers. */ | ||
| 1855 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, simd_short2 zw) { | ||
| 1856 | simd_short4 result; | ||
| 1857 | result.xy = xy; | ||
| 1858 | result.zw = zw; | ||
| 1859 | return result; | ||
| 1860 | } | ||
| 1861 | |||
| 1862 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 1863 | * signed (twos-complement) integers. */ | ||
| 1864 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 xyz, short w) { | ||
| 1865 | simd_short4 result; | ||
| 1866 | result.xyz = xyz; | ||
| 1867 | result.w = w; | ||
| 1868 | return result; | ||
| 1869 | } | ||
| 1870 | |||
| 1871 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1872 | * (twos-complement) integers. */ | ||
| 1873 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short other) { | ||
| 1874 | simd_short4 result = 0; | ||
| 1875 | result.x = other; | ||
| 1876 | return result; | ||
| 1877 | } | ||
| 1878 | |||
| 1879 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1880 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1881 | * unspecified. */ | ||
| 1882 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(short other) { | ||
| 1883 | simd_short4 result; | ||
| 1884 | result.x = other; | ||
| 1885 | return result; | ||
| 1886 | } | ||
| 1887 | |||
| 1888 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1889 | * (twos-complement) integers. */ | ||
| 1890 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 other) { | ||
| 1891 | simd_short4 result = 0; | ||
| 1892 | result.xy = other; | ||
| 1893 | return result; | ||
| 1894 | } | ||
| 1895 | |||
| 1896 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1897 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1898 | * unspecified. */ | ||
| 1899 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short2 other) { | ||
| 1900 | simd_short4 result; | ||
| 1901 | result.xy = other; | ||
| 1902 | return result; | ||
| 1903 | } | ||
| 1904 | |||
| 1905 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1906 | * (twos-complement) integers. */ | ||
| 1907 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 other) { | ||
| 1908 | simd_short4 result = 0; | ||
| 1909 | result.xyz = other; | ||
| 1910 | return result; | ||
| 1911 | } | ||
| 1912 | |||
| 1913 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1914 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1915 | * unspecified. */ | ||
| 1916 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short3 other) { | ||
| 1917 | simd_short4 result; | ||
| 1918 | result.xyz = other; | ||
| 1919 | return result; | ||
| 1920 | } | ||
| 1921 | |||
| 1922 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1923 | * templated and autogenerated code. */ | ||
| 1924 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short4 other) { | ||
| 1925 | return other; | ||
| 1926 | } | ||
| 1927 | |||
| 1928 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1929 | * (twos-complement) integers. */ | ||
| 1930 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short8 other) { | ||
| 1931 | return other.xyzw; | ||
| 1932 | } | ||
| 1933 | |||
| 1934 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1935 | * (twos-complement) integers. */ | ||
| 1936 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short16 other) { | ||
| 1937 | return other.xyzw; | ||
| 1938 | } | ||
| 1939 | |||
| 1940 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1941 | * (twos-complement) integers. */ | ||
| 1942 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short32 other) { | ||
| 1943 | return other.xyzw; | ||
| 1944 | } | ||
| 1945 | |||
| 1946 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 1947 | * signed (twos-complement) integers. */ | ||
| 1948 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 lo, simd_short4 hi) { | ||
| 1949 | simd_short8 result; | ||
| 1950 | result.lo = lo; | ||
| 1951 | result.hi = hi; | ||
| 1952 | return result; | ||
| 1953 | } | ||
| 1954 | |||
| 1955 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1956 | * (twos-complement) integers. */ | ||
| 1957 | static inline SIMD_CFUNC simd_short8 simd_make_short8(short other) { | ||
| 1958 | simd_short8 result = 0; | ||
| 1959 | result.x = other; | ||
| 1960 | return result; | ||
| 1961 | } | ||
| 1962 | |||
| 1963 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1964 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1965 | * unspecified. */ | ||
| 1966 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(short other) { | ||
| 1967 | simd_short8 result; | ||
| 1968 | result.x = other; | ||
| 1969 | return result; | ||
| 1970 | } | ||
| 1971 | |||
| 1972 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1973 | * (twos-complement) integers. */ | ||
| 1974 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short2 other) { | ||
| 1975 | simd_short8 result = 0; | ||
| 1976 | result.xy = other; | ||
| 1977 | return result; | ||
| 1978 | } | ||
| 1979 | |||
| 1980 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1981 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1982 | * unspecified. */ | ||
| 1983 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short2 other) { | ||
| 1984 | simd_short8 result; | ||
| 1985 | result.xy = other; | ||
| 1986 | return result; | ||
| 1987 | } | ||
| 1988 | |||
| 1989 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1990 | * (twos-complement) integers. */ | ||
| 1991 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short3 other) { | ||
| 1992 | simd_short8 result = 0; | ||
| 1993 | result.xyz = other; | ||
| 1994 | return result; | ||
| 1995 | } | ||
| 1996 | |||
| 1997 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1998 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1999 | * unspecified. */ | ||
| 2000 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short3 other) { | ||
| 2001 | simd_short8 result; | ||
| 2002 | result.xyz = other; | ||
| 2003 | return result; | ||
| 2004 | } | ||
| 2005 | |||
| 2006 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 2007 | * (twos-complement) integers. */ | ||
| 2008 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 other) { | ||
| 2009 | simd_short8 result = 0; | ||
| 2010 | result.xyzw = other; | ||
| 2011 | return result; | ||
| 2012 | } | ||
| 2013 | |||
| 2014 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 2015 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2016 | * unspecified. */ | ||
| 2017 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short4 other) { | ||
| 2018 | simd_short8 result; | ||
| 2019 | result.xyzw = other; | ||
| 2020 | return result; | ||
| 2021 | } | ||
| 2022 | |||
| 2023 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2024 | * templated and autogenerated code. */ | ||
| 2025 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short8 other) { | ||
| 2026 | return other; | ||
| 2027 | } | ||
| 2028 | |||
| 2029 | /*! @abstract Truncates `other` to form a vector of eight 16-bit signed | ||
| 2030 | * (twos-complement) integers. */ | ||
| 2031 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short16 other) { | ||
| 2032 | return simd_make_short8(other.lo); | ||
| 2033 | } | ||
| 2034 | |||
| 2035 | /*! @abstract Truncates `other` to form a vector of eight 16-bit signed | ||
| 2036 | * (twos-complement) integers. */ | ||
| 2037 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short32 other) { | ||
| 2038 | return simd_make_short8(other.lo); | ||
| 2039 | } | ||
| 2040 | |||
| 2041 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 2042 | * signed (twos-complement) integers. */ | ||
| 2043 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 lo, simd_short8 hi) { | ||
| 2044 | simd_short16 result; | ||
| 2045 | result.lo = lo; | ||
| 2046 | result.hi = hi; | ||
| 2047 | return result; | ||
| 2048 | } | ||
| 2049 | |||
| 2050 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2051 | * (twos-complement) integers. */ | ||
| 2052 | static inline SIMD_CFUNC simd_short16 simd_make_short16(short other) { | ||
| 2053 | simd_short16 result = 0; | ||
| 2054 | result.x = other; | ||
| 2055 | return result; | ||
| 2056 | } | ||
| 2057 | |||
| 2058 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2059 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2060 | * lanes are unspecified. */ | ||
| 2061 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(short other) { | ||
| 2062 | simd_short16 result; | ||
| 2063 | result.x = other; | ||
| 2064 | return result; | ||
| 2065 | } | ||
| 2066 | |||
| 2067 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2068 | * (twos-complement) integers. */ | ||
| 2069 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short2 other) { | ||
| 2070 | simd_short16 result = 0; | ||
| 2071 | result.xy = other; | ||
| 2072 | return result; | ||
| 2073 | } | ||
| 2074 | |||
| 2075 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2076 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2077 | * lanes are unspecified. */ | ||
| 2078 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short2 other) { | ||
| 2079 | simd_short16 result; | ||
| 2080 | result.xy = other; | ||
| 2081 | return result; | ||
| 2082 | } | ||
| 2083 | |||
| 2084 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2085 | * (twos-complement) integers. */ | ||
| 2086 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short3 other) { | ||
| 2087 | simd_short16 result = 0; | ||
| 2088 | result.xyz = other; | ||
| 2089 | return result; | ||
| 2090 | } | ||
| 2091 | |||
| 2092 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2093 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2094 | * lanes are unspecified. */ | ||
| 2095 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short3 other) { | ||
| 2096 | simd_short16 result; | ||
| 2097 | result.xyz = other; | ||
| 2098 | return result; | ||
| 2099 | } | ||
| 2100 | |||
| 2101 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2102 | * (twos-complement) integers. */ | ||
| 2103 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short4 other) { | ||
| 2104 | simd_short16 result = 0; | ||
| 2105 | result.xyzw = other; | ||
| 2106 | return result; | ||
| 2107 | } | ||
| 2108 | |||
| 2109 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2110 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2111 | * lanes are unspecified. */ | ||
| 2112 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short4 other) { | ||
| 2113 | simd_short16 result; | ||
| 2114 | result.xyzw = other; | ||
| 2115 | return result; | ||
| 2116 | } | ||
| 2117 | |||
| 2118 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2119 | * (twos-complement) integers. */ | ||
| 2120 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 other) { | ||
| 2121 | simd_short16 result = 0; | ||
| 2122 | result.lo = simd_make_short8(other); | ||
| 2123 | return result; | ||
| 2124 | } | ||
| 2125 | |||
| 2126 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2127 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2128 | * lanes are unspecified. */ | ||
| 2129 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short8 other) { | ||
| 2130 | simd_short16 result; | ||
| 2131 | result.lo = simd_make_short8(other); | ||
| 2132 | return result; | ||
| 2133 | } | ||
| 2134 | |||
| 2135 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2136 | * templated and autogenerated code. */ | ||
| 2137 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short16 other) { | ||
| 2138 | return other; | ||
| 2139 | } | ||
| 2140 | |||
| 2141 | /*! @abstract Truncates `other` to form a vector of sixteen 16-bit signed | ||
| 2142 | * (twos-complement) integers. */ | ||
| 2143 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short32 other) { | ||
| 2144 | return simd_make_short16(other.lo); | ||
| 2145 | } | ||
| 2146 | |||
| 2147 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 2148 | * 16-bit signed (twos-complement) integers. */ | ||
| 2149 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 lo, simd_short16 hi) { | ||
| 2150 | simd_short32 result; | ||
| 2151 | result.lo = lo; | ||
| 2152 | result.hi = hi; | ||
| 2153 | return result; | ||
| 2154 | } | ||
| 2155 | |||
| 2156 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2157 | * signed (twos-complement) integers. */ | ||
| 2158 | static inline SIMD_CFUNC simd_short32 simd_make_short32(short other) { | ||
| 2159 | simd_short32 result = 0; | ||
| 2160 | result.x = other; | ||
| 2161 | return result; | ||
| 2162 | } | ||
| 2163 | |||
| 2164 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2165 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2166 | * lanes are unspecified. */ | ||
| 2167 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(short other) { | ||
| 2168 | simd_short32 result; | ||
| 2169 | result.x = other; | ||
| 2170 | return result; | ||
| 2171 | } | ||
| 2172 | |||
| 2173 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2174 | * signed (twos-complement) integers. */ | ||
| 2175 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short2 other) { | ||
| 2176 | simd_short32 result = 0; | ||
| 2177 | result.xy = other; | ||
| 2178 | return result; | ||
| 2179 | } | ||
| 2180 | |||
| 2181 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2182 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2183 | * lanes are unspecified. */ | ||
| 2184 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short2 other) { | ||
| 2185 | simd_short32 result; | ||
| 2186 | result.xy = other; | ||
| 2187 | return result; | ||
| 2188 | } | ||
| 2189 | |||
| 2190 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2191 | * signed (twos-complement) integers. */ | ||
| 2192 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short3 other) { | ||
| 2193 | simd_short32 result = 0; | ||
| 2194 | result.xyz = other; | ||
| 2195 | return result; | ||
| 2196 | } | ||
| 2197 | |||
| 2198 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2199 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2200 | * lanes are unspecified. */ | ||
| 2201 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short3 other) { | ||
| 2202 | simd_short32 result; | ||
| 2203 | result.xyz = other; | ||
| 2204 | return result; | ||
| 2205 | } | ||
| 2206 | |||
| 2207 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2208 | * signed (twos-complement) integers. */ | ||
| 2209 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short4 other) { | ||
| 2210 | simd_short32 result = 0; | ||
| 2211 | result.xyzw = other; | ||
| 2212 | return result; | ||
| 2213 | } | ||
| 2214 | |||
| 2215 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2216 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2217 | * lanes are unspecified. */ | ||
| 2218 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short4 other) { | ||
| 2219 | simd_short32 result; | ||
| 2220 | result.xyzw = other; | ||
| 2221 | return result; | ||
| 2222 | } | ||
| 2223 | |||
| 2224 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2225 | * signed (twos-complement) integers. */ | ||
| 2226 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short8 other) { | ||
| 2227 | simd_short32 result = 0; | ||
| 2228 | result.lo = simd_make_short16(other); | ||
| 2229 | return result; | ||
| 2230 | } | ||
| 2231 | |||
| 2232 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2233 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2234 | * lanes are unspecified. */ | ||
| 2235 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short8 other) { | ||
| 2236 | simd_short32 result; | ||
| 2237 | result.lo = simd_make_short16(other); | ||
| 2238 | return result; | ||
| 2239 | } | ||
| 2240 | |||
| 2241 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2242 | * signed (twos-complement) integers. */ | ||
| 2243 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 other) { | ||
| 2244 | simd_short32 result = 0; | ||
| 2245 | result.lo = simd_make_short16(other); | ||
| 2246 | return result; | ||
| 2247 | } | ||
| 2248 | |||
| 2249 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2250 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2251 | * lanes are unspecified. */ | ||
| 2252 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short16 other) { | ||
| 2253 | simd_short32 result; | ||
| 2254 | result.lo = simd_make_short16(other); | ||
| 2255 | return result; | ||
| 2256 | } | ||
| 2257 | |||
| 2258 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2259 | * templated and autogenerated code. */ | ||
| 2260 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short32 other) { | ||
| 2261 | return other; | ||
| 2262 | } | ||
| 2263 | |||
| 2264 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit | ||
| 2265 | * unsigned integers. */ | ||
| 2266 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short x, unsigned short y) { | ||
| 2267 | simd_ushort2 result; | ||
| 2268 | result.x = x; | ||
| 2269 | result.y = y; | ||
| 2270 | return result; | ||
| 2271 | } | ||
| 2272 | |||
| 2273 | /*! @abstract Zero-extends `other` to form a vector of two 16-bit unsigned | ||
| 2274 | * integers. */ | ||
| 2275 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short other) { | ||
| 2276 | simd_ushort2 result = 0; | ||
| 2277 | result.x = other; | ||
| 2278 | return result; | ||
| 2279 | } | ||
| 2280 | |||
| 2281 | /*! @abstract Extends `other` to form a vector of two 16-bit unsigned | ||
| 2282 | * integers. The contents of the newly-created vector lanes are | ||
| 2283 | * unspecified. */ | ||
| 2284 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2_undef(unsigned short other) { | ||
| 2285 | simd_ushort2 result; | ||
| 2286 | result.x = other; | ||
| 2287 | return result; | ||
| 2288 | } | ||
| 2289 | |||
| 2290 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2291 | * templated and autogenerated code. */ | ||
| 2292 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort2 other) { | ||
| 2293 | return other; | ||
| 2294 | } | ||
| 2295 | |||
| 2296 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2297 | * integers. */ | ||
| 2298 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort3 other) { | ||
| 2299 | return other.xy; | ||
| 2300 | } | ||
| 2301 | |||
| 2302 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2303 | * integers. */ | ||
| 2304 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort4 other) { | ||
| 2305 | return other.xy; | ||
| 2306 | } | ||
| 2307 | |||
| 2308 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2309 | * integers. */ | ||
| 2310 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort8 other) { | ||
| 2311 | return other.xy; | ||
| 2312 | } | ||
| 2313 | |||
| 2314 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2315 | * integers. */ | ||
| 2316 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort16 other) { | ||
| 2317 | return other.xy; | ||
| 2318 | } | ||
| 2319 | |||
| 2320 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2321 | * integers. */ | ||
| 2322 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort32 other) { | ||
| 2323 | return other.xy; | ||
| 2324 | } | ||
| 2325 | |||
| 2326 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 2327 | * unsigned integers. */ | ||
| 2328 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, unsigned short y, unsigned short z) { | ||
| 2329 | simd_ushort3 result; | ||
| 2330 | result.x = x; | ||
| 2331 | result.y = y; | ||
| 2332 | result.z = z; | ||
| 2333 | return result; | ||
| 2334 | } | ||
| 2335 | |||
| 2336 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 2337 | * unsigned integers. */ | ||
| 2338 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, simd_ushort2 yz) { | ||
| 2339 | simd_ushort3 result; | ||
| 2340 | result.x = x; | ||
| 2341 | result.yz = yz; | ||
| 2342 | return result; | ||
| 2343 | } | ||
| 2344 | |||
| 2345 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 2346 | * unsigned integers. */ | ||
| 2347 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 xy, unsigned short z) { | ||
| 2348 | simd_ushort3 result; | ||
| 2349 | result.xy = xy; | ||
| 2350 | result.z = z; | ||
| 2351 | return result; | ||
| 2352 | } | ||
| 2353 | |||
| 2354 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned | ||
| 2355 | * integers. */ | ||
| 2356 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short other) { | ||
| 2357 | simd_ushort3 result = 0; | ||
| 2358 | result.x = other; | ||
| 2359 | return result; | ||
| 2360 | } | ||
| 2361 | |||
| 2362 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 2363 | * integers. The contents of the newly-created vector lanes are | ||
| 2364 | * unspecified. */ | ||
| 2365 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(unsigned short other) { | ||
| 2366 | simd_ushort3 result; | ||
| 2367 | result.x = other; | ||
| 2368 | return result; | ||
| 2369 | } | ||
| 2370 | |||
| 2371 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned | ||
| 2372 | * integers. */ | ||
| 2373 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 other) { | ||
| 2374 | simd_ushort3 result = 0; | ||
| 2375 | result.xy = other; | ||
| 2376 | return result; | ||
| 2377 | } | ||
| 2378 | |||
| 2379 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 2380 | * integers. The contents of the newly-created vector lanes are | ||
| 2381 | * unspecified. */ | ||
| 2382 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(simd_ushort2 other) { | ||
| 2383 | simd_ushort3 result; | ||
| 2384 | result.xy = other; | ||
| 2385 | return result; | ||
| 2386 | } | ||
| 2387 | |||
| 2388 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2389 | * templated and autogenerated code. */ | ||
| 2390 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort3 other) { | ||
| 2391 | return other; | ||
| 2392 | } | ||
| 2393 | |||
| 2394 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2395 | * integers. */ | ||
| 2396 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort4 other) { | ||
| 2397 | return other.xyz; | ||
| 2398 | } | ||
| 2399 | |||
| 2400 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2401 | * integers. */ | ||
| 2402 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort8 other) { | ||
| 2403 | return other.xyz; | ||
| 2404 | } | ||
| 2405 | |||
| 2406 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2407 | * integers. */ | ||
| 2408 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort16 other) { | ||
| 2409 | return other.xyz; | ||
| 2410 | } | ||
| 2411 | |||
| 2412 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2413 | * integers. */ | ||
| 2414 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort32 other) { | ||
| 2415 | return other.xyz; | ||
| 2416 | } | ||
| 2417 | |||
| 2418 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 2419 | * 16-bit unsigned integers. */ | ||
| 2420 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { | ||
| 2421 | simd_ushort4 result; | ||
| 2422 | result.x = x; | ||
| 2423 | result.y = y; | ||
| 2424 | result.z = z; | ||
| 2425 | result.w = w; | ||
| 2426 | return result; | ||
| 2427 | } | ||
| 2428 | |||
| 2429 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 2430 | * unsigned integers. */ | ||
| 2431 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, simd_ushort2 zw) { | ||
| 2432 | simd_ushort4 result; | ||
| 2433 | result.x = x; | ||
| 2434 | result.y = y; | ||
| 2435 | result.zw = zw; | ||
| 2436 | return result; | ||
| 2437 | } | ||
| 2438 | |||
| 2439 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 2440 | * unsigned integers. */ | ||
| 2441 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort2 yz, unsigned short w) { | ||
| 2442 | simd_ushort4 result; | ||
| 2443 | result.x = x; | ||
| 2444 | result.yz = yz; | ||
| 2445 | result.w = w; | ||
| 2446 | return result; | ||
| 2447 | } | ||
| 2448 | |||
| 2449 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 2450 | * unsigned integers. */ | ||
| 2451 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, unsigned short z, unsigned short w) { | ||
| 2452 | simd_ushort4 result; | ||
| 2453 | result.xy = xy; | ||
| 2454 | result.z = z; | ||
| 2455 | result.w = w; | ||
| 2456 | return result; | ||
| 2457 | } | ||
| 2458 | |||
| 2459 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 2460 | * unsigned integers. */ | ||
| 2461 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort3 yzw) { | ||
| 2462 | simd_ushort4 result; | ||
| 2463 | result.x = x; | ||
| 2464 | result.yzw = yzw; | ||
| 2465 | return result; | ||
| 2466 | } | ||
| 2467 | |||
| 2468 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 2469 | * unsigned integers. */ | ||
| 2470 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, simd_ushort2 zw) { | ||
| 2471 | simd_ushort4 result; | ||
| 2472 | result.xy = xy; | ||
| 2473 | result.zw = zw; | ||
| 2474 | return result; | ||
| 2475 | } | ||
| 2476 | |||
| 2477 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 2478 | * unsigned integers. */ | ||
| 2479 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 xyz, unsigned short w) { | ||
| 2480 | simd_ushort4 result; | ||
| 2481 | result.xyz = xyz; | ||
| 2482 | result.w = w; | ||
| 2483 | return result; | ||
| 2484 | } | ||
| 2485 | |||
| 2486 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2487 | * integers. */ | ||
| 2488 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short other) { | ||
| 2489 | simd_ushort4 result = 0; | ||
| 2490 | result.x = other; | ||
| 2491 | return result; | ||
| 2492 | } | ||
| 2493 | |||
| 2494 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2495 | * integers. The contents of the newly-created vector lanes are | ||
| 2496 | * unspecified. */ | ||
| 2497 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(unsigned short other) { | ||
| 2498 | simd_ushort4 result; | ||
| 2499 | result.x = other; | ||
| 2500 | return result; | ||
| 2501 | } | ||
| 2502 | |||
| 2503 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2504 | * integers. */ | ||
| 2505 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 other) { | ||
| 2506 | simd_ushort4 result = 0; | ||
| 2507 | result.xy = other; | ||
| 2508 | return result; | ||
| 2509 | } | ||
| 2510 | |||
| 2511 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2512 | * integers. The contents of the newly-created vector lanes are | ||
| 2513 | * unspecified. */ | ||
| 2514 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort2 other) { | ||
| 2515 | simd_ushort4 result; | ||
| 2516 | result.xy = other; | ||
| 2517 | return result; | ||
| 2518 | } | ||
| 2519 | |||
| 2520 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2521 | * integers. */ | ||
| 2522 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 other) { | ||
| 2523 | simd_ushort4 result = 0; | ||
| 2524 | result.xyz = other; | ||
| 2525 | return result; | ||
| 2526 | } | ||
| 2527 | |||
| 2528 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2529 | * integers. The contents of the newly-created vector lanes are | ||
| 2530 | * unspecified. */ | ||
| 2531 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort3 other) { | ||
| 2532 | simd_ushort4 result; | ||
| 2533 | result.xyz = other; | ||
| 2534 | return result; | ||
| 2535 | } | ||
| 2536 | |||
| 2537 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2538 | * templated and autogenerated code. */ | ||
| 2539 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort4 other) { | ||
| 2540 | return other; | ||
| 2541 | } | ||
| 2542 | |||
| 2543 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2544 | * integers. */ | ||
| 2545 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort8 other) { | ||
| 2546 | return other.xyzw; | ||
| 2547 | } | ||
| 2548 | |||
| 2549 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2550 | * integers. */ | ||
| 2551 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort16 other) { | ||
| 2552 | return other.xyzw; | ||
| 2553 | } | ||
| 2554 | |||
| 2555 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2556 | * integers. */ | ||
| 2557 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort32 other) { | ||
| 2558 | return other.xyzw; | ||
| 2559 | } | ||
| 2560 | |||
| 2561 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 2562 | * unsigned integers. */ | ||
| 2563 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 lo, simd_ushort4 hi) { | ||
| 2564 | simd_ushort8 result; | ||
| 2565 | result.lo = lo; | ||
| 2566 | result.hi = hi; | ||
| 2567 | return result; | ||
| 2568 | } | ||
| 2569 | |||
| 2570 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2571 | * integers. */ | ||
| 2572 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(unsigned short other) { | ||
| 2573 | simd_ushort8 result = 0; | ||
| 2574 | result.x = other; | ||
| 2575 | return result; | ||
| 2576 | } | ||
| 2577 | |||
| 2578 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2579 | * integers. The contents of the newly-created vector lanes are | ||
| 2580 | * unspecified. */ | ||
| 2581 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(unsigned short other) { | ||
| 2582 | simd_ushort8 result; | ||
| 2583 | result.x = other; | ||
| 2584 | return result; | ||
| 2585 | } | ||
| 2586 | |||
| 2587 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2588 | * integers. */ | ||
| 2589 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort2 other) { | ||
| 2590 | simd_ushort8 result = 0; | ||
| 2591 | result.xy = other; | ||
| 2592 | return result; | ||
| 2593 | } | ||
| 2594 | |||
| 2595 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2596 | * integers. The contents of the newly-created vector lanes are | ||
| 2597 | * unspecified. */ | ||
| 2598 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort2 other) { | ||
| 2599 | simd_ushort8 result; | ||
| 2600 | result.xy = other; | ||
| 2601 | return result; | ||
| 2602 | } | ||
| 2603 | |||
| 2604 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2605 | * integers. */ | ||
| 2606 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort3 other) { | ||
| 2607 | simd_ushort8 result = 0; | ||
| 2608 | result.xyz = other; | ||
| 2609 | return result; | ||
| 2610 | } | ||
| 2611 | |||
| 2612 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2613 | * integers. The contents of the newly-created vector lanes are | ||
| 2614 | * unspecified. */ | ||
| 2615 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort3 other) { | ||
| 2616 | simd_ushort8 result; | ||
| 2617 | result.xyz = other; | ||
| 2618 | return result; | ||
| 2619 | } | ||
| 2620 | |||
| 2621 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2622 | * integers. */ | ||
| 2623 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 other) { | ||
| 2624 | simd_ushort8 result = 0; | ||
| 2625 | result.xyzw = other; | ||
| 2626 | return result; | ||
| 2627 | } | ||
| 2628 | |||
| 2629 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2630 | * integers. The contents of the newly-created vector lanes are | ||
| 2631 | * unspecified. */ | ||
| 2632 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort4 other) { | ||
| 2633 | simd_ushort8 result; | ||
| 2634 | result.xyzw = other; | ||
| 2635 | return result; | ||
| 2636 | } | ||
| 2637 | |||
| 2638 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2639 | * templated and autogenerated code. */ | ||
| 2640 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort8 other) { | ||
| 2641 | return other; | ||
| 2642 | } | ||
| 2643 | |||
| 2644 | /*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned | ||
| 2645 | * integers. */ | ||
| 2646 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort16 other) { | ||
| 2647 | return simd_make_ushort8(other.lo); | ||
| 2648 | } | ||
| 2649 | |||
| 2650 | /*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned | ||
| 2651 | * integers. */ | ||
| 2652 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort32 other) { | ||
| 2653 | return simd_make_ushort8(other.lo); | ||
| 2654 | } | ||
| 2655 | |||
| 2656 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 2657 | * unsigned integers. */ | ||
| 2658 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 lo, simd_ushort8 hi) { | ||
| 2659 | simd_ushort16 result; | ||
| 2660 | result.lo = lo; | ||
| 2661 | result.hi = hi; | ||
| 2662 | return result; | ||
| 2663 | } | ||
| 2664 | |||
| 2665 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2666 | * unsigned integers. */ | ||
| 2667 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(unsigned short other) { | ||
| 2668 | simd_ushort16 result = 0; | ||
| 2669 | result.x = other; | ||
| 2670 | return result; | ||
| 2671 | } | ||
| 2672 | |||
| 2673 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2674 | * integers. The contents of the newly-created vector lanes are | ||
| 2675 | * unspecified. */ | ||
| 2676 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(unsigned short other) { | ||
| 2677 | simd_ushort16 result; | ||
| 2678 | result.x = other; | ||
| 2679 | return result; | ||
| 2680 | } | ||
| 2681 | |||
| 2682 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2683 | * unsigned integers. */ | ||
| 2684 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort2 other) { | ||
| 2685 | simd_ushort16 result = 0; | ||
| 2686 | result.xy = other; | ||
| 2687 | return result; | ||
| 2688 | } | ||
| 2689 | |||
| 2690 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2691 | * integers. The contents of the newly-created vector lanes are | ||
| 2692 | * unspecified. */ | ||
| 2693 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort2 other) { | ||
| 2694 | simd_ushort16 result; | ||
| 2695 | result.xy = other; | ||
| 2696 | return result; | ||
| 2697 | } | ||
| 2698 | |||
| 2699 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2700 | * unsigned integers. */ | ||
| 2701 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort3 other) { | ||
| 2702 | simd_ushort16 result = 0; | ||
| 2703 | result.xyz = other; | ||
| 2704 | return result; | ||
| 2705 | } | ||
| 2706 | |||
| 2707 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2708 | * integers. The contents of the newly-created vector lanes are | ||
| 2709 | * unspecified. */ | ||
| 2710 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort3 other) { | ||
| 2711 | simd_ushort16 result; | ||
| 2712 | result.xyz = other; | ||
| 2713 | return result; | ||
| 2714 | } | ||
| 2715 | |||
| 2716 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2717 | * unsigned integers. */ | ||
| 2718 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort4 other) { | ||
| 2719 | simd_ushort16 result = 0; | ||
| 2720 | result.xyzw = other; | ||
| 2721 | return result; | ||
| 2722 | } | ||
| 2723 | |||
| 2724 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2725 | * integers. The contents of the newly-created vector lanes are | ||
| 2726 | * unspecified. */ | ||
| 2727 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort4 other) { | ||
| 2728 | simd_ushort16 result; | ||
| 2729 | result.xyzw = other; | ||
| 2730 | return result; | ||
| 2731 | } | ||
| 2732 | |||
| 2733 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2734 | * unsigned integers. */ | ||
| 2735 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 other) { | ||
| 2736 | simd_ushort16 result = 0; | ||
| 2737 | result.lo = simd_make_ushort8(other); | ||
| 2738 | return result; | ||
| 2739 | } | ||
| 2740 | |||
| 2741 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2742 | * integers. The contents of the newly-created vector lanes are | ||
| 2743 | * unspecified. */ | ||
| 2744 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort8 other) { | ||
| 2745 | simd_ushort16 result; | ||
| 2746 | result.lo = simd_make_ushort8(other); | ||
| 2747 | return result; | ||
| 2748 | } | ||
| 2749 | |||
| 2750 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2751 | * templated and autogenerated code. */ | ||
| 2752 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort16 other) { | ||
| 2753 | return other; | ||
| 2754 | } | ||
| 2755 | |||
| 2756 | /*! @abstract Truncates `other` to form a vector of sixteen 16-bit unsigned | ||
| 2757 | * integers. */ | ||
| 2758 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort32 other) { | ||
| 2759 | return simd_make_ushort16(other.lo); | ||
| 2760 | } | ||
| 2761 | |||
| 2762 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 2763 | * 16-bit unsigned integers. */ | ||
| 2764 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 lo, simd_ushort16 hi) { | ||
| 2765 | simd_ushort32 result; | ||
| 2766 | result.lo = lo; | ||
| 2767 | result.hi = hi; | ||
| 2768 | return result; | ||
| 2769 | } | ||
| 2770 | |||
| 2771 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2772 | * unsigned integers. */ | ||
| 2773 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(unsigned short other) { | ||
| 2774 | simd_ushort32 result = 0; | ||
| 2775 | result.x = other; | ||
| 2776 | return result; | ||
| 2777 | } | ||
| 2778 | |||
| 2779 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2780 | * integers. The contents of the newly-created vector lanes are | ||
| 2781 | * unspecified. */ | ||
| 2782 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(unsigned short other) { | ||
| 2783 | simd_ushort32 result; | ||
| 2784 | result.x = other; | ||
| 2785 | return result; | ||
| 2786 | } | ||
| 2787 | |||
| 2788 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2789 | * unsigned integers. */ | ||
| 2790 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort2 other) { | ||
| 2791 | simd_ushort32 result = 0; | ||
| 2792 | result.xy = other; | ||
| 2793 | return result; | ||
| 2794 | } | ||
| 2795 | |||
| 2796 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2797 | * integers. The contents of the newly-created vector lanes are | ||
| 2798 | * unspecified. */ | ||
| 2799 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort2 other) { | ||
| 2800 | simd_ushort32 result; | ||
| 2801 | result.xy = other; | ||
| 2802 | return result; | ||
| 2803 | } | ||
| 2804 | |||
| 2805 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2806 | * unsigned integers. */ | ||
| 2807 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort3 other) { | ||
| 2808 | simd_ushort32 result = 0; | ||
| 2809 | result.xyz = other; | ||
| 2810 | return result; | ||
| 2811 | } | ||
| 2812 | |||
| 2813 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2814 | * integers. The contents of the newly-created vector lanes are | ||
| 2815 | * unspecified. */ | ||
| 2816 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort3 other) { | ||
| 2817 | simd_ushort32 result; | ||
| 2818 | result.xyz = other; | ||
| 2819 | return result; | ||
| 2820 | } | ||
| 2821 | |||
| 2822 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2823 | * unsigned integers. */ | ||
| 2824 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort4 other) { | ||
| 2825 | simd_ushort32 result = 0; | ||
| 2826 | result.xyzw = other; | ||
| 2827 | return result; | ||
| 2828 | } | ||
| 2829 | |||
| 2830 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2831 | * integers. The contents of the newly-created vector lanes are | ||
| 2832 | * unspecified. */ | ||
| 2833 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort4 other) { | ||
| 2834 | simd_ushort32 result; | ||
| 2835 | result.xyzw = other; | ||
| 2836 | return result; | ||
| 2837 | } | ||
| 2838 | |||
| 2839 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2840 | * unsigned integers. */ | ||
| 2841 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort8 other) { | ||
| 2842 | simd_ushort32 result = 0; | ||
| 2843 | result.lo = simd_make_ushort16(other); | ||
| 2844 | return result; | ||
| 2845 | } | ||
| 2846 | |||
| 2847 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2848 | * integers. The contents of the newly-created vector lanes are | ||
| 2849 | * unspecified. */ | ||
| 2850 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort8 other) { | ||
| 2851 | simd_ushort32 result; | ||
| 2852 | result.lo = simd_make_ushort16(other); | ||
| 2853 | return result; | ||
| 2854 | } | ||
| 2855 | |||
| 2856 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2857 | * unsigned integers. */ | ||
| 2858 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 other) { | ||
| 2859 | simd_ushort32 result = 0; | ||
| 2860 | result.lo = simd_make_ushort16(other); | ||
| 2861 | return result; | ||
| 2862 | } | ||
| 2863 | |||
| 2864 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2865 | * integers. The contents of the newly-created vector lanes are | ||
| 2866 | * unspecified. */ | ||
| 2867 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort16 other) { | ||
| 2868 | simd_ushort32 result; | ||
| 2869 | result.lo = simd_make_ushort16(other); | ||
| 2870 | return result; | ||
| 2871 | } | ||
| 2872 | |||
| 2873 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2874 | * templated and autogenerated code. */ | ||
| 2875 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort32 other) { | ||
| 2876 | return other; | ||
| 2877 | } | ||
| 2878 | |||
| 2879 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed | ||
| 2880 | * (twos-complement) integers. */ | ||
| 2881 | static inline SIMD_CFUNC simd_int2 simd_make_int2(int x, int y) { | ||
| 2882 | simd_int2 result; | ||
| 2883 | result.x = x; | ||
| 2884 | result.y = y; | ||
| 2885 | return result; | ||
| 2886 | } | ||
| 2887 | |||
| 2888 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit signed | ||
| 2889 | * (twos-complement) integers. */ | ||
| 2890 | static inline SIMD_CFUNC simd_int2 simd_make_int2(int other) { | ||
| 2891 | simd_int2 result = 0; | ||
| 2892 | result.x = other; | ||
| 2893 | return result; | ||
| 2894 | } | ||
| 2895 | |||
| 2896 | /*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- | ||
| 2897 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2898 | * unspecified. */ | ||
| 2899 | static inline SIMD_CFUNC simd_int2 simd_make_int2_undef(int other) { | ||
| 2900 | simd_int2 result; | ||
| 2901 | result.x = other; | ||
| 2902 | return result; | ||
| 2903 | } | ||
| 2904 | |||
| 2905 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2906 | * templated and autogenerated code. */ | ||
| 2907 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int2 other) { | ||
| 2908 | return other; | ||
| 2909 | } | ||
| 2910 | |||
| 2911 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2912 | * complement) integers. */ | ||
| 2913 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int3 other) { | ||
| 2914 | return other.xy; | ||
| 2915 | } | ||
| 2916 | |||
| 2917 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2918 | * complement) integers. */ | ||
| 2919 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int4 other) { | ||
| 2920 | return other.xy; | ||
| 2921 | } | ||
| 2922 | |||
| 2923 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2924 | * complement) integers. */ | ||
| 2925 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int8 other) { | ||
| 2926 | return other.xy; | ||
| 2927 | } | ||
| 2928 | |||
| 2929 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2930 | * complement) integers. */ | ||
| 2931 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int16 other) { | ||
| 2932 | return other.xy; | ||
| 2933 | } | ||
| 2934 | |||
| 2935 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 2936 | * signed (twos-complement) integers. */ | ||
| 2937 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, int y, int z) { | ||
| 2938 | simd_int3 result; | ||
| 2939 | result.x = x; | ||
| 2940 | result.y = y; | ||
| 2941 | result.z = z; | ||
| 2942 | return result; | ||
| 2943 | } | ||
| 2944 | |||
| 2945 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 2946 | * signed (twos-complement) integers. */ | ||
| 2947 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, simd_int2 yz) { | ||
| 2948 | simd_int3 result; | ||
| 2949 | result.x = x; | ||
| 2950 | result.yz = yz; | ||
| 2951 | return result; | ||
| 2952 | } | ||
| 2953 | |||
| 2954 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 2955 | * signed (twos-complement) integers. */ | ||
| 2956 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 xy, int z) { | ||
| 2957 | simd_int3 result; | ||
| 2958 | result.xy = xy; | ||
| 2959 | result.z = z; | ||
| 2960 | return result; | ||
| 2961 | } | ||
| 2962 | |||
| 2963 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit signed | ||
| 2964 | * (twos-complement) integers. */ | ||
| 2965 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int other) { | ||
| 2966 | simd_int3 result = 0; | ||
| 2967 | result.x = other; | ||
| 2968 | return result; | ||
| 2969 | } | ||
| 2970 | |||
| 2971 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 2972 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2973 | * unspecified. */ | ||
| 2974 | static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(int other) { | ||
| 2975 | simd_int3 result; | ||
| 2976 | result.x = other; | ||
| 2977 | return result; | ||
| 2978 | } | ||
| 2979 | |||
| 2980 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit signed | ||
| 2981 | * (twos-complement) integers. */ | ||
| 2982 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 other) { | ||
| 2983 | simd_int3 result = 0; | ||
| 2984 | result.xy = other; | ||
| 2985 | return result; | ||
| 2986 | } | ||
| 2987 | |||
| 2988 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 2989 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2990 | * unspecified. */ | ||
| 2991 | static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(simd_int2 other) { | ||
| 2992 | simd_int3 result; | ||
| 2993 | result.xy = other; | ||
| 2994 | return result; | ||
| 2995 | } | ||
| 2996 | |||
| 2997 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2998 | * templated and autogenerated code. */ | ||
| 2999 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int3 other) { | ||
| 3000 | return other; | ||
| 3001 | } | ||
| 3002 | |||
| 3003 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 3004 | * (twos-complement) integers. */ | ||
| 3005 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int4 other) { | ||
| 3006 | return other.xyz; | ||
| 3007 | } | ||
| 3008 | |||
| 3009 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 3010 | * (twos-complement) integers. */ | ||
| 3011 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int8 other) { | ||
| 3012 | return other.xyz; | ||
| 3013 | } | ||
| 3014 | |||
| 3015 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 3016 | * (twos-complement) integers. */ | ||
| 3017 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int16 other) { | ||
| 3018 | return other.xyz; | ||
| 3019 | } | ||
| 3020 | |||
| 3021 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 3022 | * 32-bit signed (twos-complement) integers. */ | ||
| 3023 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, int z, int w) { | ||
| 3024 | simd_int4 result; | ||
| 3025 | result.x = x; | ||
| 3026 | result.y = y; | ||
| 3027 | result.z = z; | ||
| 3028 | result.w = w; | ||
| 3029 | return result; | ||
| 3030 | } | ||
| 3031 | |||
| 3032 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3033 | * signed (twos-complement) integers. */ | ||
| 3034 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, simd_int2 zw) { | ||
| 3035 | simd_int4 result; | ||
| 3036 | result.x = x; | ||
| 3037 | result.y = y; | ||
| 3038 | result.zw = zw; | ||
| 3039 | return result; | ||
| 3040 | } | ||
| 3041 | |||
| 3042 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3043 | * signed (twos-complement) integers. */ | ||
| 3044 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int2 yz, int w) { | ||
| 3045 | simd_int4 result; | ||
| 3046 | result.x = x; | ||
| 3047 | result.yz = yz; | ||
| 3048 | result.w = w; | ||
| 3049 | return result; | ||
| 3050 | } | ||
| 3051 | |||
| 3052 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3053 | * signed (twos-complement) integers. */ | ||
| 3054 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, int z, int w) { | ||
| 3055 | simd_int4 result; | ||
| 3056 | result.xy = xy; | ||
| 3057 | result.z = z; | ||
| 3058 | result.w = w; | ||
| 3059 | return result; | ||
| 3060 | } | ||
| 3061 | |||
| 3062 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3063 | * signed (twos-complement) integers. */ | ||
| 3064 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int3 yzw) { | ||
| 3065 | simd_int4 result; | ||
| 3066 | result.x = x; | ||
| 3067 | result.yzw = yzw; | ||
| 3068 | return result; | ||
| 3069 | } | ||
| 3070 | |||
| 3071 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 3072 | * signed (twos-complement) integers. */ | ||
| 3073 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, simd_int2 zw) { | ||
| 3074 | simd_int4 result; | ||
| 3075 | result.xy = xy; | ||
| 3076 | result.zw = zw; | ||
| 3077 | return result; | ||
| 3078 | } | ||
| 3079 | |||
| 3080 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 3081 | * signed (twos-complement) integers. */ | ||
| 3082 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 xyz, int w) { | ||
| 3083 | simd_int4 result; | ||
| 3084 | result.xyz = xyz; | ||
| 3085 | result.w = w; | ||
| 3086 | return result; | ||
| 3087 | } | ||
| 3088 | |||
| 3089 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3090 | * (twos-complement) integers. */ | ||
| 3091 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int other) { | ||
| 3092 | simd_int4 result = 0; | ||
| 3093 | result.x = other; | ||
| 3094 | return result; | ||
| 3095 | } | ||
| 3096 | |||
| 3097 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3098 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3099 | * unspecified. */ | ||
| 3100 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(int other) { | ||
| 3101 | simd_int4 result; | ||
| 3102 | result.x = other; | ||
| 3103 | return result; | ||
| 3104 | } | ||
| 3105 | |||
| 3106 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3107 | * (twos-complement) integers. */ | ||
| 3108 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 other) { | ||
| 3109 | simd_int4 result = 0; | ||
| 3110 | result.xy = other; | ||
| 3111 | return result; | ||
| 3112 | } | ||
| 3113 | |||
| 3114 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3115 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3116 | * unspecified. */ | ||
| 3117 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int2 other) { | ||
| 3118 | simd_int4 result; | ||
| 3119 | result.xy = other; | ||
| 3120 | return result; | ||
| 3121 | } | ||
| 3122 | |||
| 3123 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3124 | * (twos-complement) integers. */ | ||
| 3125 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 other) { | ||
| 3126 | simd_int4 result = 0; | ||
| 3127 | result.xyz = other; | ||
| 3128 | return result; | ||
| 3129 | } | ||
| 3130 | |||
| 3131 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3132 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3133 | * unspecified. */ | ||
| 3134 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int3 other) { | ||
| 3135 | simd_int4 result; | ||
| 3136 | result.xyz = other; | ||
| 3137 | return result; | ||
| 3138 | } | ||
| 3139 | |||
| 3140 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3141 | * templated and autogenerated code. */ | ||
| 3142 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int4 other) { | ||
| 3143 | return other; | ||
| 3144 | } | ||
| 3145 | |||
| 3146 | /*! @abstract Truncates `other` to form a vector of four 32-bit signed | ||
| 3147 | * (twos-complement) integers. */ | ||
| 3148 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int8 other) { | ||
| 3149 | return other.xyzw; | ||
| 3150 | } | ||
| 3151 | |||
| 3152 | /*! @abstract Truncates `other` to form a vector of four 32-bit signed | ||
| 3153 | * (twos-complement) integers. */ | ||
| 3154 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int16 other) { | ||
| 3155 | return other.xyzw; | ||
| 3156 | } | ||
| 3157 | |||
| 3158 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 3159 | * signed (twos-complement) integers. */ | ||
| 3160 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 lo, simd_int4 hi) { | ||
| 3161 | simd_int8 result; | ||
| 3162 | result.lo = lo; | ||
| 3163 | result.hi = hi; | ||
| 3164 | return result; | ||
| 3165 | } | ||
| 3166 | |||
| 3167 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3168 | * (twos-complement) integers. */ | ||
| 3169 | static inline SIMD_CFUNC simd_int8 simd_make_int8(int other) { | ||
| 3170 | simd_int8 result = 0; | ||
| 3171 | result.x = other; | ||
| 3172 | return result; | ||
| 3173 | } | ||
| 3174 | |||
| 3175 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3176 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3177 | * unspecified. */ | ||
| 3178 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(int other) { | ||
| 3179 | simd_int8 result; | ||
| 3180 | result.x = other; | ||
| 3181 | return result; | ||
| 3182 | } | ||
| 3183 | |||
| 3184 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3185 | * (twos-complement) integers. */ | ||
| 3186 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int2 other) { | ||
| 3187 | simd_int8 result = 0; | ||
| 3188 | result.xy = other; | ||
| 3189 | return result; | ||
| 3190 | } | ||
| 3191 | |||
| 3192 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3193 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3194 | * unspecified. */ | ||
| 3195 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int2 other) { | ||
| 3196 | simd_int8 result; | ||
| 3197 | result.xy = other; | ||
| 3198 | return result; | ||
| 3199 | } | ||
| 3200 | |||
| 3201 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3202 | * (twos-complement) integers. */ | ||
| 3203 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int3 other) { | ||
| 3204 | simd_int8 result = 0; | ||
| 3205 | result.xyz = other; | ||
| 3206 | return result; | ||
| 3207 | } | ||
| 3208 | |||
| 3209 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3210 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3211 | * unspecified. */ | ||
| 3212 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int3 other) { | ||
| 3213 | simd_int8 result; | ||
| 3214 | result.xyz = other; | ||
| 3215 | return result; | ||
| 3216 | } | ||
| 3217 | |||
| 3218 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3219 | * (twos-complement) integers. */ | ||
| 3220 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 other) { | ||
| 3221 | simd_int8 result = 0; | ||
| 3222 | result.xyzw = other; | ||
| 3223 | return result; | ||
| 3224 | } | ||
| 3225 | |||
| 3226 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3227 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3228 | * unspecified. */ | ||
| 3229 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int4 other) { | ||
| 3230 | simd_int8 result; | ||
| 3231 | result.xyzw = other; | ||
| 3232 | return result; | ||
| 3233 | } | ||
| 3234 | |||
| 3235 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3236 | * templated and autogenerated code. */ | ||
| 3237 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int8 other) { | ||
| 3238 | return other; | ||
| 3239 | } | ||
| 3240 | |||
| 3241 | /*! @abstract Truncates `other` to form a vector of eight 32-bit signed | ||
| 3242 | * (twos-complement) integers. */ | ||
| 3243 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int16 other) { | ||
| 3244 | return simd_make_int8(other.lo); | ||
| 3245 | } | ||
| 3246 | |||
| 3247 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 3248 | * signed (twos-complement) integers. */ | ||
| 3249 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 lo, simd_int8 hi) { | ||
| 3250 | simd_int16 result; | ||
| 3251 | result.lo = lo; | ||
| 3252 | result.hi = hi; | ||
| 3253 | return result; | ||
| 3254 | } | ||
| 3255 | |||
| 3256 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3257 | * (twos-complement) integers. */ | ||
| 3258 | static inline SIMD_CFUNC simd_int16 simd_make_int16(int other) { | ||
| 3259 | simd_int16 result = 0; | ||
| 3260 | result.x = other; | ||
| 3261 | return result; | ||
| 3262 | } | ||
| 3263 | |||
| 3264 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3265 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3266 | * lanes are unspecified. */ | ||
| 3267 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(int other) { | ||
| 3268 | simd_int16 result; | ||
| 3269 | result.x = other; | ||
| 3270 | return result; | ||
| 3271 | } | ||
| 3272 | |||
| 3273 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3274 | * (twos-complement) integers. */ | ||
| 3275 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int2 other) { | ||
| 3276 | simd_int16 result = 0; | ||
| 3277 | result.xy = other; | ||
| 3278 | return result; | ||
| 3279 | } | ||
| 3280 | |||
| 3281 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3282 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3283 | * lanes are unspecified. */ | ||
| 3284 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int2 other) { | ||
| 3285 | simd_int16 result; | ||
| 3286 | result.xy = other; | ||
| 3287 | return result; | ||
| 3288 | } | ||
| 3289 | |||
| 3290 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3291 | * (twos-complement) integers. */ | ||
| 3292 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int3 other) { | ||
| 3293 | simd_int16 result = 0; | ||
| 3294 | result.xyz = other; | ||
| 3295 | return result; | ||
| 3296 | } | ||
| 3297 | |||
| 3298 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3299 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3300 | * lanes are unspecified. */ | ||
| 3301 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int3 other) { | ||
| 3302 | simd_int16 result; | ||
| 3303 | result.xyz = other; | ||
| 3304 | return result; | ||
| 3305 | } | ||
| 3306 | |||
| 3307 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3308 | * (twos-complement) integers. */ | ||
| 3309 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int4 other) { | ||
| 3310 | simd_int16 result = 0; | ||
| 3311 | result.xyzw = other; | ||
| 3312 | return result; | ||
| 3313 | } | ||
| 3314 | |||
| 3315 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3316 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3317 | * lanes are unspecified. */ | ||
| 3318 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int4 other) { | ||
| 3319 | simd_int16 result; | ||
| 3320 | result.xyzw = other; | ||
| 3321 | return result; | ||
| 3322 | } | ||
| 3323 | |||
| 3324 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3325 | * (twos-complement) integers. */ | ||
| 3326 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 other) { | ||
| 3327 | simd_int16 result = 0; | ||
| 3328 | result.lo = simd_make_int8(other); | ||
| 3329 | return result; | ||
| 3330 | } | ||
| 3331 | |||
| 3332 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3333 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3334 | * lanes are unspecified. */ | ||
| 3335 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int8 other) { | ||
| 3336 | simd_int16 result; | ||
| 3337 | result.lo = simd_make_int8(other); | ||
| 3338 | return result; | ||
| 3339 | } | ||
| 3340 | |||
| 3341 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3342 | * templated and autogenerated code. */ | ||
| 3343 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int16 other) { | ||
| 3344 | return other; | ||
| 3345 | } | ||
| 3346 | |||
| 3347 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 3348 | * unsigned integers. */ | ||
| 3349 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) { | ||
| 3350 | simd_uint2 result; | ||
| 3351 | result.x = x; | ||
| 3352 | result.y = y; | ||
| 3353 | return result; | ||
| 3354 | } | ||
| 3355 | |||
| 3356 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit unsigned | ||
| 3357 | * integers. */ | ||
| 3358 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int other) { | ||
| 3359 | simd_uint2 result = 0; | ||
| 3360 | result.x = other; | ||
| 3361 | return result; | ||
| 3362 | } | ||
| 3363 | |||
| 3364 | /*! @abstract Extends `other` to form a vector of two 32-bit unsigned | ||
| 3365 | * integers. The contents of the newly-created vector lanes are | ||
| 3366 | * unspecified. */ | ||
| 3367 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2_undef(unsigned int other) { | ||
| 3368 | simd_uint2 result; | ||
| 3369 | result.x = other; | ||
| 3370 | return result; | ||
| 3371 | } | ||
| 3372 | |||
| 3373 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3374 | * templated and autogenerated code. */ | ||
| 3375 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint2 other) { | ||
| 3376 | return other; | ||
| 3377 | } | ||
| 3378 | |||
| 3379 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3380 | * integers. */ | ||
| 3381 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint3 other) { | ||
| 3382 | return other.xy; | ||
| 3383 | } | ||
| 3384 | |||
| 3385 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3386 | * integers. */ | ||
| 3387 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint4 other) { | ||
| 3388 | return other.xy; | ||
| 3389 | } | ||
| 3390 | |||
| 3391 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3392 | * integers. */ | ||
| 3393 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint8 other) { | ||
| 3394 | return other.xy; | ||
| 3395 | } | ||
| 3396 | |||
| 3397 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3398 | * integers. */ | ||
| 3399 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint16 other) { | ||
| 3400 | return other.xy; | ||
| 3401 | } | ||
| 3402 | |||
| 3403 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 3404 | * unsigned integers. */ | ||
| 3405 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, unsigned int y, unsigned int z) { | ||
| 3406 | simd_uint3 result; | ||
| 3407 | result.x = x; | ||
| 3408 | result.y = y; | ||
| 3409 | result.z = z; | ||
| 3410 | return result; | ||
| 3411 | } | ||
| 3412 | |||
| 3413 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 3414 | * unsigned integers. */ | ||
| 3415 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, simd_uint2 yz) { | ||
| 3416 | simd_uint3 result; | ||
| 3417 | result.x = x; | ||
| 3418 | result.yz = yz; | ||
| 3419 | return result; | ||
| 3420 | } | ||
| 3421 | |||
| 3422 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 3423 | * unsigned integers. */ | ||
| 3424 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 xy, unsigned int z) { | ||
| 3425 | simd_uint3 result; | ||
| 3426 | result.xy = xy; | ||
| 3427 | result.z = z; | ||
| 3428 | return result; | ||
| 3429 | } | ||
| 3430 | |||
| 3431 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned | ||
| 3432 | * integers. */ | ||
| 3433 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int other) { | ||
| 3434 | simd_uint3 result = 0; | ||
| 3435 | result.x = other; | ||
| 3436 | return result; | ||
| 3437 | } | ||
| 3438 | |||
| 3439 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 3440 | * integers. The contents of the newly-created vector lanes are | ||
| 3441 | * unspecified. */ | ||
| 3442 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(unsigned int other) { | ||
| 3443 | simd_uint3 result; | ||
| 3444 | result.x = other; | ||
| 3445 | return result; | ||
| 3446 | } | ||
| 3447 | |||
| 3448 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned | ||
| 3449 | * integers. */ | ||
| 3450 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 other) { | ||
| 3451 | simd_uint3 result = 0; | ||
| 3452 | result.xy = other; | ||
| 3453 | return result; | ||
| 3454 | } | ||
| 3455 | |||
| 3456 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 3457 | * integers. The contents of the newly-created vector lanes are | ||
| 3458 | * unspecified. */ | ||
| 3459 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(simd_uint2 other) { | ||
| 3460 | simd_uint3 result; | ||
| 3461 | result.xy = other; | ||
| 3462 | return result; | ||
| 3463 | } | ||
| 3464 | |||
| 3465 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3466 | * templated and autogenerated code. */ | ||
| 3467 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint3 other) { | ||
| 3468 | return other; | ||
| 3469 | } | ||
| 3470 | |||
| 3471 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3472 | * integers. */ | ||
| 3473 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint4 other) { | ||
| 3474 | return other.xyz; | ||
| 3475 | } | ||
| 3476 | |||
| 3477 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3478 | * integers. */ | ||
| 3479 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint8 other) { | ||
| 3480 | return other.xyz; | ||
| 3481 | } | ||
| 3482 | |||
| 3483 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3484 | * integers. */ | ||
| 3485 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint16 other) { | ||
| 3486 | return other.xyz; | ||
| 3487 | } | ||
| 3488 | |||
| 3489 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 3490 | * 32-bit unsigned integers. */ | ||
| 3491 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { | ||
| 3492 | simd_uint4 result; | ||
| 3493 | result.x = x; | ||
| 3494 | result.y = y; | ||
| 3495 | result.z = z; | ||
| 3496 | result.w = w; | ||
| 3497 | return result; | ||
| 3498 | } | ||
| 3499 | |||
| 3500 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3501 | * unsigned integers. */ | ||
| 3502 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, simd_uint2 zw) { | ||
| 3503 | simd_uint4 result; | ||
| 3504 | result.x = x; | ||
| 3505 | result.y = y; | ||
| 3506 | result.zw = zw; | ||
| 3507 | return result; | ||
| 3508 | } | ||
| 3509 | |||
| 3510 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3511 | * unsigned integers. */ | ||
| 3512 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint2 yz, unsigned int w) { | ||
| 3513 | simd_uint4 result; | ||
| 3514 | result.x = x; | ||
| 3515 | result.yz = yz; | ||
| 3516 | result.w = w; | ||
| 3517 | return result; | ||
| 3518 | } | ||
| 3519 | |||
| 3520 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3521 | * unsigned integers. */ | ||
| 3522 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, unsigned int z, unsigned int w) { | ||
| 3523 | simd_uint4 result; | ||
| 3524 | result.xy = xy; | ||
| 3525 | result.z = z; | ||
| 3526 | result.w = w; | ||
| 3527 | return result; | ||
| 3528 | } | ||
| 3529 | |||
| 3530 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3531 | * unsigned integers. */ | ||
| 3532 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint3 yzw) { | ||
| 3533 | simd_uint4 result; | ||
| 3534 | result.x = x; | ||
| 3535 | result.yzw = yzw; | ||
| 3536 | return result; | ||
| 3537 | } | ||
| 3538 | |||
| 3539 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 3540 | * unsigned integers. */ | ||
| 3541 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, simd_uint2 zw) { | ||
| 3542 | simd_uint4 result; | ||
| 3543 | result.xy = xy; | ||
| 3544 | result.zw = zw; | ||
| 3545 | return result; | ||
| 3546 | } | ||
| 3547 | |||
| 3548 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 3549 | * unsigned integers. */ | ||
| 3550 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 xyz, unsigned int w) { | ||
| 3551 | simd_uint4 result; | ||
| 3552 | result.xyz = xyz; | ||
| 3553 | result.w = w; | ||
| 3554 | return result; | ||
| 3555 | } | ||
| 3556 | |||
| 3557 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3558 | * integers. */ | ||
| 3559 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int other) { | ||
| 3560 | simd_uint4 result = 0; | ||
| 3561 | result.x = other; | ||
| 3562 | return result; | ||
| 3563 | } | ||
| 3564 | |||
| 3565 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3566 | * integers. The contents of the newly-created vector lanes are | ||
| 3567 | * unspecified. */ | ||
| 3568 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(unsigned int other) { | ||
| 3569 | simd_uint4 result; | ||
| 3570 | result.x = other; | ||
| 3571 | return result; | ||
| 3572 | } | ||
| 3573 | |||
| 3574 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3575 | * integers. */ | ||
| 3576 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 other) { | ||
| 3577 | simd_uint4 result = 0; | ||
| 3578 | result.xy = other; | ||
| 3579 | return result; | ||
| 3580 | } | ||
| 3581 | |||
| 3582 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3583 | * integers. The contents of the newly-created vector lanes are | ||
| 3584 | * unspecified. */ | ||
| 3585 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint2 other) { | ||
| 3586 | simd_uint4 result; | ||
| 3587 | result.xy = other; | ||
| 3588 | return result; | ||
| 3589 | } | ||
| 3590 | |||
| 3591 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3592 | * integers. */ | ||
| 3593 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 other) { | ||
| 3594 | simd_uint4 result = 0; | ||
| 3595 | result.xyz = other; | ||
| 3596 | return result; | ||
| 3597 | } | ||
| 3598 | |||
| 3599 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3600 | * integers. The contents of the newly-created vector lanes are | ||
| 3601 | * unspecified. */ | ||
| 3602 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint3 other) { | ||
| 3603 | simd_uint4 result; | ||
| 3604 | result.xyz = other; | ||
| 3605 | return result; | ||
| 3606 | } | ||
| 3607 | |||
| 3608 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3609 | * templated and autogenerated code. */ | ||
| 3610 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint4 other) { | ||
| 3611 | return other; | ||
| 3612 | } | ||
| 3613 | |||
| 3614 | /*! @abstract Truncates `other` to form a vector of four 32-bit unsigned | ||
| 3615 | * integers. */ | ||
| 3616 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint8 other) { | ||
| 3617 | return other.xyzw; | ||
| 3618 | } | ||
| 3619 | |||
| 3620 | /*! @abstract Truncates `other` to form a vector of four 32-bit unsigned | ||
| 3621 | * integers. */ | ||
| 3622 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint16 other) { | ||
| 3623 | return other.xyzw; | ||
| 3624 | } | ||
| 3625 | |||
| 3626 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 3627 | * unsigned integers. */ | ||
| 3628 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 lo, simd_uint4 hi) { | ||
| 3629 | simd_uint8 result; | ||
| 3630 | result.lo = lo; | ||
| 3631 | result.hi = hi; | ||
| 3632 | return result; | ||
| 3633 | } | ||
| 3634 | |||
| 3635 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3636 | * integers. */ | ||
| 3637 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(unsigned int other) { | ||
| 3638 | simd_uint8 result = 0; | ||
| 3639 | result.x = other; | ||
| 3640 | return result; | ||
| 3641 | } | ||
| 3642 | |||
| 3643 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3644 | * integers. The contents of the newly-created vector lanes are | ||
| 3645 | * unspecified. */ | ||
| 3646 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(unsigned int other) { | ||
| 3647 | simd_uint8 result; | ||
| 3648 | result.x = other; | ||
| 3649 | return result; | ||
| 3650 | } | ||
| 3651 | |||
| 3652 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3653 | * integers. */ | ||
| 3654 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint2 other) { | ||
| 3655 | simd_uint8 result = 0; | ||
| 3656 | result.xy = other; | ||
| 3657 | return result; | ||
| 3658 | } | ||
| 3659 | |||
| 3660 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3661 | * integers. The contents of the newly-created vector lanes are | ||
| 3662 | * unspecified. */ | ||
| 3663 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint2 other) { | ||
| 3664 | simd_uint8 result; | ||
| 3665 | result.xy = other; | ||
| 3666 | return result; | ||
| 3667 | } | ||
| 3668 | |||
| 3669 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3670 | * integers. */ | ||
| 3671 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint3 other) { | ||
| 3672 | simd_uint8 result = 0; | ||
| 3673 | result.xyz = other; | ||
| 3674 | return result; | ||
| 3675 | } | ||
| 3676 | |||
| 3677 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3678 | * integers. The contents of the newly-created vector lanes are | ||
| 3679 | * unspecified. */ | ||
| 3680 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint3 other) { | ||
| 3681 | simd_uint8 result; | ||
| 3682 | result.xyz = other; | ||
| 3683 | return result; | ||
| 3684 | } | ||
| 3685 | |||
| 3686 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3687 | * integers. */ | ||
| 3688 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 other) { | ||
| 3689 | simd_uint8 result = 0; | ||
| 3690 | result.xyzw = other; | ||
| 3691 | return result; | ||
| 3692 | } | ||
| 3693 | |||
| 3694 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3695 | * integers. The contents of the newly-created vector lanes are | ||
| 3696 | * unspecified. */ | ||
| 3697 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint4 other) { | ||
| 3698 | simd_uint8 result; | ||
| 3699 | result.xyzw = other; | ||
| 3700 | return result; | ||
| 3701 | } | ||
| 3702 | |||
| 3703 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3704 | * templated and autogenerated code. */ | ||
| 3705 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint8 other) { | ||
| 3706 | return other; | ||
| 3707 | } | ||
| 3708 | |||
| 3709 | /*! @abstract Truncates `other` to form a vector of eight 32-bit unsigned | ||
| 3710 | * integers. */ | ||
| 3711 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint16 other) { | ||
| 3712 | return simd_make_uint8(other.lo); | ||
| 3713 | } | ||
| 3714 | |||
| 3715 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 3716 | * unsigned integers. */ | ||
| 3717 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 lo, simd_uint8 hi) { | ||
| 3718 | simd_uint16 result; | ||
| 3719 | result.lo = lo; | ||
| 3720 | result.hi = hi; | ||
| 3721 | return result; | ||
| 3722 | } | ||
| 3723 | |||
| 3724 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3725 | * unsigned integers. */ | ||
| 3726 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(unsigned int other) { | ||
| 3727 | simd_uint16 result = 0; | ||
| 3728 | result.x = other; | ||
| 3729 | return result; | ||
| 3730 | } | ||
| 3731 | |||
| 3732 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3733 | * integers. The contents of the newly-created vector lanes are | ||
| 3734 | * unspecified. */ | ||
| 3735 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(unsigned int other) { | ||
| 3736 | simd_uint16 result; | ||
| 3737 | result.x = other; | ||
| 3738 | return result; | ||
| 3739 | } | ||
| 3740 | |||
| 3741 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3742 | * unsigned integers. */ | ||
| 3743 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint2 other) { | ||
| 3744 | simd_uint16 result = 0; | ||
| 3745 | result.xy = other; | ||
| 3746 | return result; | ||
| 3747 | } | ||
| 3748 | |||
| 3749 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3750 | * integers. The contents of the newly-created vector lanes are | ||
| 3751 | * unspecified. */ | ||
| 3752 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint2 other) { | ||
| 3753 | simd_uint16 result; | ||
| 3754 | result.xy = other; | ||
| 3755 | return result; | ||
| 3756 | } | ||
| 3757 | |||
| 3758 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3759 | * unsigned integers. */ | ||
| 3760 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint3 other) { | ||
| 3761 | simd_uint16 result = 0; | ||
| 3762 | result.xyz = other; | ||
| 3763 | return result; | ||
| 3764 | } | ||
| 3765 | |||
| 3766 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3767 | * integers. The contents of the newly-created vector lanes are | ||
| 3768 | * unspecified. */ | ||
| 3769 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint3 other) { | ||
| 3770 | simd_uint16 result; | ||
| 3771 | result.xyz = other; | ||
| 3772 | return result; | ||
| 3773 | } | ||
| 3774 | |||
| 3775 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3776 | * unsigned integers. */ | ||
| 3777 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint4 other) { | ||
| 3778 | simd_uint16 result = 0; | ||
| 3779 | result.xyzw = other; | ||
| 3780 | return result; | ||
| 3781 | } | ||
| 3782 | |||
| 3783 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3784 | * integers. The contents of the newly-created vector lanes are | ||
| 3785 | * unspecified. */ | ||
| 3786 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint4 other) { | ||
| 3787 | simd_uint16 result; | ||
| 3788 | result.xyzw = other; | ||
| 3789 | return result; | ||
| 3790 | } | ||
| 3791 | |||
| 3792 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3793 | * unsigned integers. */ | ||
| 3794 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 other) { | ||
| 3795 | simd_uint16 result = 0; | ||
| 3796 | result.lo = simd_make_uint8(other); | ||
| 3797 | return result; | ||
| 3798 | } | ||
| 3799 | |||
| 3800 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3801 | * integers. The contents of the newly-created vector lanes are | ||
| 3802 | * unspecified. */ | ||
| 3803 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint8 other) { | ||
| 3804 | simd_uint16 result; | ||
| 3805 | result.lo = simd_make_uint8(other); | ||
| 3806 | return result; | ||
| 3807 | } | ||
| 3808 | |||
| 3809 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3810 | * templated and autogenerated code. */ | ||
| 3811 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint16 other) { | ||
| 3812 | return other; | ||
| 3813 | } | ||
| 3814 | |||
| 3815 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 3816 | * floating-point numbers. */ | ||
| 3817 | static inline SIMD_CFUNC simd_float2 simd_make_float2(float x, float y) { | ||
| 3818 | simd_float2 result; | ||
| 3819 | result.x = x; | ||
| 3820 | result.y = y; | ||
| 3821 | return result; | ||
| 3822 | } | ||
| 3823 | |||
| 3824 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit floating- | ||
| 3825 | * point numbers. */ | ||
| 3826 | static inline SIMD_CFUNC simd_float2 simd_make_float2(float other) { | ||
| 3827 | simd_float2 result = 0; | ||
| 3828 | result.x = other; | ||
| 3829 | return result; | ||
| 3830 | } | ||
| 3831 | |||
| 3832 | /*! @abstract Extends `other` to form a vector of two 32-bit floating-point | ||
| 3833 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 3834 | static inline SIMD_CFUNC simd_float2 simd_make_float2_undef(float other) { | ||
| 3835 | simd_float2 result; | ||
| 3836 | result.x = other; | ||
| 3837 | return result; | ||
| 3838 | } | ||
| 3839 | |||
| 3840 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3841 | * templated and autogenerated code. */ | ||
| 3842 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float2 other) { | ||
| 3843 | return other; | ||
| 3844 | } | ||
| 3845 | |||
| 3846 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3847 | * point numbers. */ | ||
| 3848 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float3 other) { | ||
| 3849 | return other.xy; | ||
| 3850 | } | ||
| 3851 | |||
| 3852 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3853 | * point numbers. */ | ||
| 3854 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float4 other) { | ||
| 3855 | return other.xy; | ||
| 3856 | } | ||
| 3857 | |||
| 3858 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3859 | * point numbers. */ | ||
| 3860 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float8 other) { | ||
| 3861 | return other.xy; | ||
| 3862 | } | ||
| 3863 | |||
| 3864 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3865 | * point numbers. */ | ||
| 3866 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float16 other) { | ||
| 3867 | return other.xy; | ||
| 3868 | } | ||
| 3869 | |||
| 3870 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 3871 | * floating-point numbers. */ | ||
| 3872 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, float y, float z) { | ||
| 3873 | simd_float3 result; | ||
| 3874 | result.x = x; | ||
| 3875 | result.y = y; | ||
| 3876 | result.z = z; | ||
| 3877 | return result; | ||
| 3878 | } | ||
| 3879 | |||
| 3880 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 3881 | * floating-point numbers. */ | ||
| 3882 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, simd_float2 yz) { | ||
| 3883 | simd_float3 result; | ||
| 3884 | result.x = x; | ||
| 3885 | result.yz = yz; | ||
| 3886 | return result; | ||
| 3887 | } | ||
| 3888 | |||
| 3889 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 3890 | * floating-point numbers. */ | ||
| 3891 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 xy, float z) { | ||
| 3892 | simd_float3 result; | ||
| 3893 | result.xy = xy; | ||
| 3894 | result.z = z; | ||
| 3895 | return result; | ||
| 3896 | } | ||
| 3897 | |||
| 3898 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit | ||
| 3899 | * floating-point numbers. */ | ||
| 3900 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float other) { | ||
| 3901 | simd_float3 result = 0; | ||
| 3902 | result.x = other; | ||
| 3903 | return result; | ||
| 3904 | } | ||
| 3905 | |||
| 3906 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 3907 | * point numbers. The contents of the newly-created vector lanes are | ||
| 3908 | * unspecified. */ | ||
| 3909 | static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(float other) { | ||
| 3910 | simd_float3 result; | ||
| 3911 | result.x = other; | ||
| 3912 | return result; | ||
| 3913 | } | ||
| 3914 | |||
| 3915 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit | ||
| 3916 | * floating-point numbers. */ | ||
| 3917 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 other) { | ||
| 3918 | simd_float3 result = 0; | ||
| 3919 | result.xy = other; | ||
| 3920 | return result; | ||
| 3921 | } | ||
| 3922 | |||
| 3923 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 3924 | * point numbers. The contents of the newly-created vector lanes are | ||
| 3925 | * unspecified. */ | ||
| 3926 | static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(simd_float2 other) { | ||
| 3927 | simd_float3 result; | ||
| 3928 | result.xy = other; | ||
| 3929 | return result; | ||
| 3930 | } | ||
| 3931 | |||
| 3932 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3933 | * templated and autogenerated code. */ | ||
| 3934 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float3 other) { | ||
| 3935 | return other; | ||
| 3936 | } | ||
| 3937 | |||
| 3938 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3939 | * point numbers. */ | ||
| 3940 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float4 other) { | ||
| 3941 | return other.xyz; | ||
| 3942 | } | ||
| 3943 | |||
| 3944 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3945 | * point numbers. */ | ||
| 3946 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float8 other) { | ||
| 3947 | return other.xyz; | ||
| 3948 | } | ||
| 3949 | |||
| 3950 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3951 | * point numbers. */ | ||
| 3952 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float16 other) { | ||
| 3953 | return other.xyz; | ||
| 3954 | } | ||
| 3955 | |||
| 3956 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 3957 | * 32-bit floating-point numbers. */ | ||
| 3958 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, float z, float w) { | ||
| 3959 | simd_float4 result; | ||
| 3960 | result.x = x; | ||
| 3961 | result.y = y; | ||
| 3962 | result.z = z; | ||
| 3963 | result.w = w; | ||
| 3964 | return result; | ||
| 3965 | } | ||
| 3966 | |||
| 3967 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3968 | * floating-point numbers. */ | ||
| 3969 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, simd_float2 zw) { | ||
| 3970 | simd_float4 result; | ||
| 3971 | result.x = x; | ||
| 3972 | result.y = y; | ||
| 3973 | result.zw = zw; | ||
| 3974 | return result; | ||
| 3975 | } | ||
| 3976 | |||
| 3977 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3978 | * floating-point numbers. */ | ||
| 3979 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float2 yz, float w) { | ||
| 3980 | simd_float4 result; | ||
| 3981 | result.x = x; | ||
| 3982 | result.yz = yz; | ||
| 3983 | result.w = w; | ||
| 3984 | return result; | ||
| 3985 | } | ||
| 3986 | |||
| 3987 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3988 | * floating-point numbers. */ | ||
| 3989 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, float z, float w) { | ||
| 3990 | simd_float4 result; | ||
| 3991 | result.xy = xy; | ||
| 3992 | result.z = z; | ||
| 3993 | result.w = w; | ||
| 3994 | return result; | ||
| 3995 | } | ||
| 3996 | |||
| 3997 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3998 | * floating-point numbers. */ | ||
| 3999 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float3 yzw) { | ||
| 4000 | simd_float4 result; | ||
| 4001 | result.x = x; | ||
| 4002 | result.yzw = yzw; | ||
| 4003 | return result; | ||
| 4004 | } | ||
| 4005 | |||
| 4006 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 4007 | * floating-point numbers. */ | ||
| 4008 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, simd_float2 zw) { | ||
| 4009 | simd_float4 result; | ||
| 4010 | result.xy = xy; | ||
| 4011 | result.zw = zw; | ||
| 4012 | return result; | ||
| 4013 | } | ||
| 4014 | |||
| 4015 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 4016 | * floating-point numbers. */ | ||
| 4017 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 xyz, float w) { | ||
| 4018 | simd_float4 result; | ||
| 4019 | result.xyz = xyz; | ||
| 4020 | result.w = w; | ||
| 4021 | return result; | ||
| 4022 | } | ||
| 4023 | |||
| 4024 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 4025 | * point numbers. */ | ||
| 4026 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float other) { | ||
| 4027 | simd_float4 result = 0; | ||
| 4028 | result.x = other; | ||
| 4029 | return result; | ||
| 4030 | } | ||
| 4031 | |||
| 4032 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4033 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4034 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(float other) { | ||
| 4035 | simd_float4 result; | ||
| 4036 | result.x = other; | ||
| 4037 | return result; | ||
| 4038 | } | ||
| 4039 | |||
| 4040 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 4041 | * point numbers. */ | ||
| 4042 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 other) { | ||
| 4043 | simd_float4 result = 0; | ||
| 4044 | result.xy = other; | ||
| 4045 | return result; | ||
| 4046 | } | ||
| 4047 | |||
| 4048 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4049 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4050 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float2 other) { | ||
| 4051 | simd_float4 result; | ||
| 4052 | result.xy = other; | ||
| 4053 | return result; | ||
| 4054 | } | ||
| 4055 | |||
| 4056 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 4057 | * point numbers. */ | ||
| 4058 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 other) { | ||
| 4059 | simd_float4 result = 0; | ||
| 4060 | result.xyz = other; | ||
| 4061 | return result; | ||
| 4062 | } | ||
| 4063 | |||
| 4064 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4065 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4066 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float3 other) { | ||
| 4067 | simd_float4 result; | ||
| 4068 | result.xyz = other; | ||
| 4069 | return result; | ||
| 4070 | } | ||
| 4071 | |||
| 4072 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4073 | * templated and autogenerated code. */ | ||
| 4074 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float4 other) { | ||
| 4075 | return other; | ||
| 4076 | } | ||
| 4077 | |||
| 4078 | /*! @abstract Truncates `other` to form a vector of four 32-bit floating- | ||
| 4079 | * point numbers. */ | ||
| 4080 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float8 other) { | ||
| 4081 | return other.xyzw; | ||
| 4082 | } | ||
| 4083 | |||
| 4084 | /*! @abstract Truncates `other` to form a vector of four 32-bit floating- | ||
| 4085 | * point numbers. */ | ||
| 4086 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float16 other) { | ||
| 4087 | return other.xyzw; | ||
| 4088 | } | ||
| 4089 | |||
| 4090 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 4091 | * floating-point numbers. */ | ||
| 4092 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 lo, simd_float4 hi) { | ||
| 4093 | simd_float8 result; | ||
| 4094 | result.lo = lo; | ||
| 4095 | result.hi = hi; | ||
| 4096 | return result; | ||
| 4097 | } | ||
| 4098 | |||
| 4099 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4100 | * floating-point numbers. */ | ||
| 4101 | static inline SIMD_CFUNC simd_float8 simd_make_float8(float other) { | ||
| 4102 | simd_float8 result = 0; | ||
| 4103 | result.x = other; | ||
| 4104 | return result; | ||
| 4105 | } | ||
| 4106 | |||
| 4107 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4108 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4109 | * unspecified. */ | ||
| 4110 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(float other) { | ||
| 4111 | simd_float8 result; | ||
| 4112 | result.x = other; | ||
| 4113 | return result; | ||
| 4114 | } | ||
| 4115 | |||
| 4116 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4117 | * floating-point numbers. */ | ||
| 4118 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float2 other) { | ||
| 4119 | simd_float8 result = 0; | ||
| 4120 | result.xy = other; | ||
| 4121 | return result; | ||
| 4122 | } | ||
| 4123 | |||
| 4124 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4125 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4126 | * unspecified. */ | ||
| 4127 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float2 other) { | ||
| 4128 | simd_float8 result; | ||
| 4129 | result.xy = other; | ||
| 4130 | return result; | ||
| 4131 | } | ||
| 4132 | |||
| 4133 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4134 | * floating-point numbers. */ | ||
| 4135 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float3 other) { | ||
| 4136 | simd_float8 result = 0; | ||
| 4137 | result.xyz = other; | ||
| 4138 | return result; | ||
| 4139 | } | ||
| 4140 | |||
| 4141 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4142 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4143 | * unspecified. */ | ||
| 4144 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float3 other) { | ||
| 4145 | simd_float8 result; | ||
| 4146 | result.xyz = other; | ||
| 4147 | return result; | ||
| 4148 | } | ||
| 4149 | |||
| 4150 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4151 | * floating-point numbers. */ | ||
| 4152 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 other) { | ||
| 4153 | simd_float8 result = 0; | ||
| 4154 | result.xyzw = other; | ||
| 4155 | return result; | ||
| 4156 | } | ||
| 4157 | |||
| 4158 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4159 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4160 | * unspecified. */ | ||
| 4161 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float4 other) { | ||
| 4162 | simd_float8 result; | ||
| 4163 | result.xyzw = other; | ||
| 4164 | return result; | ||
| 4165 | } | ||
| 4166 | |||
| 4167 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4168 | * templated and autogenerated code. */ | ||
| 4169 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float8 other) { | ||
| 4170 | return other; | ||
| 4171 | } | ||
| 4172 | |||
| 4173 | /*! @abstract Truncates `other` to form a vector of eight 32-bit floating- | ||
| 4174 | * point numbers. */ | ||
| 4175 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float16 other) { | ||
| 4176 | return simd_make_float8(other.lo); | ||
| 4177 | } | ||
| 4178 | |||
| 4179 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 4180 | * floating-point numbers. */ | ||
| 4181 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 lo, simd_float8 hi) { | ||
| 4182 | simd_float16 result; | ||
| 4183 | result.lo = lo; | ||
| 4184 | result.hi = hi; | ||
| 4185 | return result; | ||
| 4186 | } | ||
| 4187 | |||
| 4188 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4189 | * floating-point numbers. */ | ||
| 4190 | static inline SIMD_CFUNC simd_float16 simd_make_float16(float other) { | ||
| 4191 | simd_float16 result = 0; | ||
| 4192 | result.x = other; | ||
| 4193 | return result; | ||
| 4194 | } | ||
| 4195 | |||
| 4196 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4197 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4198 | * unspecified. */ | ||
| 4199 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(float other) { | ||
| 4200 | simd_float16 result; | ||
| 4201 | result.x = other; | ||
| 4202 | return result; | ||
| 4203 | } | ||
| 4204 | |||
| 4205 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4206 | * floating-point numbers. */ | ||
| 4207 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float2 other) { | ||
| 4208 | simd_float16 result = 0; | ||
| 4209 | result.xy = other; | ||
| 4210 | return result; | ||
| 4211 | } | ||
| 4212 | |||
| 4213 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4214 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4215 | * unspecified. */ | ||
| 4216 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float2 other) { | ||
| 4217 | simd_float16 result; | ||
| 4218 | result.xy = other; | ||
| 4219 | return result; | ||
| 4220 | } | ||
| 4221 | |||
| 4222 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4223 | * floating-point numbers. */ | ||
| 4224 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float3 other) { | ||
| 4225 | simd_float16 result = 0; | ||
| 4226 | result.xyz = other; | ||
| 4227 | return result; | ||
| 4228 | } | ||
| 4229 | |||
| 4230 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4231 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4232 | * unspecified. */ | ||
| 4233 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float3 other) { | ||
| 4234 | simd_float16 result; | ||
| 4235 | result.xyz = other; | ||
| 4236 | return result; | ||
| 4237 | } | ||
| 4238 | |||
| 4239 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4240 | * floating-point numbers. */ | ||
| 4241 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float4 other) { | ||
| 4242 | simd_float16 result = 0; | ||
| 4243 | result.xyzw = other; | ||
| 4244 | return result; | ||
| 4245 | } | ||
| 4246 | |||
| 4247 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4248 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4249 | * unspecified. */ | ||
| 4250 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float4 other) { | ||
| 4251 | simd_float16 result; | ||
| 4252 | result.xyzw = other; | ||
| 4253 | return result; | ||
| 4254 | } | ||
| 4255 | |||
| 4256 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4257 | * floating-point numbers. */ | ||
| 4258 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 other) { | ||
| 4259 | simd_float16 result = 0; | ||
| 4260 | result.lo = simd_make_float8(other); | ||
| 4261 | return result; | ||
| 4262 | } | ||
| 4263 | |||
| 4264 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4265 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4266 | * unspecified. */ | ||
| 4267 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float8 other) { | ||
| 4268 | simd_float16 result; | ||
| 4269 | result.lo = simd_make_float8(other); | ||
| 4270 | return result; | ||
| 4271 | } | ||
| 4272 | |||
| 4273 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4274 | * templated and autogenerated code. */ | ||
| 4275 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float16 other) { | ||
| 4276 | return other; | ||
| 4277 | } | ||
| 4278 | |||
| 4279 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed | ||
| 4280 | * (twos-complement) integers. */ | ||
| 4281 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 x, simd_long1 y) { | ||
| 4282 | simd_long2 result; | ||
| 4283 | result.x = x; | ||
| 4284 | result.y = y; | ||
| 4285 | return result; | ||
| 4286 | } | ||
| 4287 | |||
| 4288 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit signed | ||
| 4289 | * (twos-complement) integers. */ | ||
| 4290 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 other) { | ||
| 4291 | simd_long2 result = 0; | ||
| 4292 | result.x = other; | ||
| 4293 | return result; | ||
| 4294 | } | ||
| 4295 | |||
| 4296 | /*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- | ||
| 4297 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4298 | * unspecified. */ | ||
| 4299 | static inline SIMD_CFUNC simd_long2 simd_make_long2_undef(simd_long1 other) { | ||
| 4300 | simd_long2 result; | ||
| 4301 | result.x = other; | ||
| 4302 | return result; | ||
| 4303 | } | ||
| 4304 | |||
| 4305 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4306 | * templated and autogenerated code. */ | ||
| 4307 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long2 other) { | ||
| 4308 | return other; | ||
| 4309 | } | ||
| 4310 | |||
| 4311 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4312 | * complement) integers. */ | ||
| 4313 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long3 other) { | ||
| 4314 | return other.xy; | ||
| 4315 | } | ||
| 4316 | |||
| 4317 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4318 | * complement) integers. */ | ||
| 4319 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long4 other) { | ||
| 4320 | return other.xy; | ||
| 4321 | } | ||
| 4322 | |||
| 4323 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4324 | * complement) integers. */ | ||
| 4325 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long8 other) { | ||
| 4326 | return other.xy; | ||
| 4327 | } | ||
| 4328 | |||
| 4329 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 4330 | * signed (twos-complement) integers. */ | ||
| 4331 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long1 y, simd_long1 z) { | ||
| 4332 | simd_long3 result; | ||
| 4333 | result.x = x; | ||
| 4334 | result.y = y; | ||
| 4335 | result.z = z; | ||
| 4336 | return result; | ||
| 4337 | } | ||
| 4338 | |||
| 4339 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 4340 | * signed (twos-complement) integers. */ | ||
| 4341 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long2 yz) { | ||
| 4342 | simd_long3 result; | ||
| 4343 | result.x = x; | ||
| 4344 | result.yz = yz; | ||
| 4345 | return result; | ||
| 4346 | } | ||
| 4347 | |||
| 4348 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 4349 | * signed (twos-complement) integers. */ | ||
| 4350 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 xy, simd_long1 z) { | ||
| 4351 | simd_long3 result; | ||
| 4352 | result.xy = xy; | ||
| 4353 | result.z = z; | ||
| 4354 | return result; | ||
| 4355 | } | ||
| 4356 | |||
| 4357 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit signed | ||
| 4358 | * (twos-complement) integers. */ | ||
| 4359 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 other) { | ||
| 4360 | simd_long3 result = 0; | ||
| 4361 | result.x = other; | ||
| 4362 | return result; | ||
| 4363 | } | ||
| 4364 | |||
| 4365 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 4366 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4367 | * unspecified. */ | ||
| 4368 | static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long1 other) { | ||
| 4369 | simd_long3 result; | ||
| 4370 | result.x = other; | ||
| 4371 | return result; | ||
| 4372 | } | ||
| 4373 | |||
| 4374 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit signed | ||
| 4375 | * (twos-complement) integers. */ | ||
| 4376 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 other) { | ||
| 4377 | simd_long3 result = 0; | ||
| 4378 | result.xy = other; | ||
| 4379 | return result; | ||
| 4380 | } | ||
| 4381 | |||
| 4382 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 4383 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4384 | * unspecified. */ | ||
| 4385 | static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long2 other) { | ||
| 4386 | simd_long3 result; | ||
| 4387 | result.xy = other; | ||
| 4388 | return result; | ||
| 4389 | } | ||
| 4390 | |||
| 4391 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4392 | * templated and autogenerated code. */ | ||
| 4393 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long3 other) { | ||
| 4394 | return other; | ||
| 4395 | } | ||
| 4396 | |||
| 4397 | /*! @abstract Truncates `other` to form a vector of three 64-bit signed | ||
| 4398 | * (twos-complement) integers. */ | ||
| 4399 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long4 other) { | ||
| 4400 | return other.xyz; | ||
| 4401 | } | ||
| 4402 | |||
| 4403 | /*! @abstract Truncates `other` to form a vector of three 64-bit signed | ||
| 4404 | * (twos-complement) integers. */ | ||
| 4405 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long8 other) { | ||
| 4406 | return other.xyz; | ||
| 4407 | } | ||
| 4408 | |||
| 4409 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 4410 | * 64-bit signed (twos-complement) integers. */ | ||
| 4411 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long1 z, simd_long1 w) { | ||
| 4412 | simd_long4 result; | ||
| 4413 | result.x = x; | ||
| 4414 | result.y = y; | ||
| 4415 | result.z = z; | ||
| 4416 | result.w = w; | ||
| 4417 | return result; | ||
| 4418 | } | ||
| 4419 | |||
| 4420 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 4421 | * signed (twos-complement) integers. */ | ||
| 4422 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long2 zw) { | ||
| 4423 | simd_long4 result; | ||
| 4424 | result.x = x; | ||
| 4425 | result.y = y; | ||
| 4426 | result.zw = zw; | ||
| 4427 | return result; | ||
| 4428 | } | ||
| 4429 | |||
| 4430 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 4431 | * signed (twos-complement) integers. */ | ||
| 4432 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long2 yz, simd_long1 w) { | ||
| 4433 | simd_long4 result; | ||
| 4434 | result.x = x; | ||
| 4435 | result.yz = yz; | ||
| 4436 | result.w = w; | ||
| 4437 | return result; | ||
| 4438 | } | ||
| 4439 | |||
| 4440 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 4441 | * signed (twos-complement) integers. */ | ||
| 4442 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long1 z, simd_long1 w) { | ||
| 4443 | simd_long4 result; | ||
| 4444 | result.xy = xy; | ||
| 4445 | result.z = z; | ||
| 4446 | result.w = w; | ||
| 4447 | return result; | ||
| 4448 | } | ||
| 4449 | |||
| 4450 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 4451 | * signed (twos-complement) integers. */ | ||
| 4452 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long3 yzw) { | ||
| 4453 | simd_long4 result; | ||
| 4454 | result.x = x; | ||
| 4455 | result.yzw = yzw; | ||
| 4456 | return result; | ||
| 4457 | } | ||
| 4458 | |||
| 4459 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 4460 | * signed (twos-complement) integers. */ | ||
| 4461 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long2 zw) { | ||
| 4462 | simd_long4 result; | ||
| 4463 | result.xy = xy; | ||
| 4464 | result.zw = zw; | ||
| 4465 | return result; | ||
| 4466 | } | ||
| 4467 | |||
| 4468 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 4469 | * signed (twos-complement) integers. */ | ||
| 4470 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 xyz, simd_long1 w) { | ||
| 4471 | simd_long4 result; | ||
| 4472 | result.xyz = xyz; | ||
| 4473 | result.w = w; | ||
| 4474 | return result; | ||
| 4475 | } | ||
| 4476 | |||
| 4477 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4478 | * (twos-complement) integers. */ | ||
| 4479 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 other) { | ||
| 4480 | simd_long4 result = 0; | ||
| 4481 | result.x = other; | ||
| 4482 | return result; | ||
| 4483 | } | ||
| 4484 | |||
| 4485 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4486 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4487 | * unspecified. */ | ||
| 4488 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long1 other) { | ||
| 4489 | simd_long4 result; | ||
| 4490 | result.x = other; | ||
| 4491 | return result; | ||
| 4492 | } | ||
| 4493 | |||
| 4494 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4495 | * (twos-complement) integers. */ | ||
| 4496 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 other) { | ||
| 4497 | simd_long4 result = 0; | ||
| 4498 | result.xy = other; | ||
| 4499 | return result; | ||
| 4500 | } | ||
| 4501 | |||
| 4502 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4503 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4504 | * unspecified. */ | ||
| 4505 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long2 other) { | ||
| 4506 | simd_long4 result; | ||
| 4507 | result.xy = other; | ||
| 4508 | return result; | ||
| 4509 | } | ||
| 4510 | |||
| 4511 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4512 | * (twos-complement) integers. */ | ||
| 4513 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 other) { | ||
| 4514 | simd_long4 result = 0; | ||
| 4515 | result.xyz = other; | ||
| 4516 | return result; | ||
| 4517 | } | ||
| 4518 | |||
| 4519 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4520 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4521 | * unspecified. */ | ||
| 4522 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long3 other) { | ||
| 4523 | simd_long4 result; | ||
| 4524 | result.xyz = other; | ||
| 4525 | return result; | ||
| 4526 | } | ||
| 4527 | |||
| 4528 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4529 | * templated and autogenerated code. */ | ||
| 4530 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long4 other) { | ||
| 4531 | return other; | ||
| 4532 | } | ||
| 4533 | |||
| 4534 | /*! @abstract Truncates `other` to form a vector of four 64-bit signed | ||
| 4535 | * (twos-complement) integers. */ | ||
| 4536 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long8 other) { | ||
| 4537 | return other.xyzw; | ||
| 4538 | } | ||
| 4539 | |||
| 4540 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 4541 | * signed (twos-complement) integers. */ | ||
| 4542 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 lo, simd_long4 hi) { | ||
| 4543 | simd_long8 result; | ||
| 4544 | result.lo = lo; | ||
| 4545 | result.hi = hi; | ||
| 4546 | return result; | ||
| 4547 | } | ||
| 4548 | |||
| 4549 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4550 | * (twos-complement) integers. */ | ||
| 4551 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long1 other) { | ||
| 4552 | simd_long8 result = 0; | ||
| 4553 | result.x = other; | ||
| 4554 | return result; | ||
| 4555 | } | ||
| 4556 | |||
| 4557 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4558 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4559 | * unspecified. */ | ||
| 4560 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long1 other) { | ||
| 4561 | simd_long8 result; | ||
| 4562 | result.x = other; | ||
| 4563 | return result; | ||
| 4564 | } | ||
| 4565 | |||
| 4566 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4567 | * (twos-complement) integers. */ | ||
| 4568 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long2 other) { | ||
| 4569 | simd_long8 result = 0; | ||
| 4570 | result.xy = other; | ||
| 4571 | return result; | ||
| 4572 | } | ||
| 4573 | |||
| 4574 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4575 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4576 | * unspecified. */ | ||
| 4577 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long2 other) { | ||
| 4578 | simd_long8 result; | ||
| 4579 | result.xy = other; | ||
| 4580 | return result; | ||
| 4581 | } | ||
| 4582 | |||
| 4583 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4584 | * (twos-complement) integers. */ | ||
| 4585 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long3 other) { | ||
| 4586 | simd_long8 result = 0; | ||
| 4587 | result.xyz = other; | ||
| 4588 | return result; | ||
| 4589 | } | ||
| 4590 | |||
| 4591 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4592 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4593 | * unspecified. */ | ||
| 4594 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long3 other) { | ||
| 4595 | simd_long8 result; | ||
| 4596 | result.xyz = other; | ||
| 4597 | return result; | ||
| 4598 | } | ||
| 4599 | |||
| 4600 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4601 | * (twos-complement) integers. */ | ||
| 4602 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 other) { | ||
| 4603 | simd_long8 result = 0; | ||
| 4604 | result.xyzw = other; | ||
| 4605 | return result; | ||
| 4606 | } | ||
| 4607 | |||
| 4608 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4609 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4610 | * unspecified. */ | ||
| 4611 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long4 other) { | ||
| 4612 | simd_long8 result; | ||
| 4613 | result.xyzw = other; | ||
| 4614 | return result; | ||
| 4615 | } | ||
| 4616 | |||
| 4617 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4618 | * templated and autogenerated code. */ | ||
| 4619 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long8 other) { | ||
| 4620 | return other; | ||
| 4621 | } | ||
| 4622 | |||
| 4623 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 4624 | * unsigned integers. */ | ||
| 4625 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 x, simd_ulong1 y) { | ||
| 4626 | simd_ulong2 result; | ||
| 4627 | result.x = x; | ||
| 4628 | result.y = y; | ||
| 4629 | return result; | ||
| 4630 | } | ||
| 4631 | |||
| 4632 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit unsigned | ||
| 4633 | * integers. */ | ||
| 4634 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 other) { | ||
| 4635 | simd_ulong2 result = 0; | ||
| 4636 | result.x = other; | ||
| 4637 | return result; | ||
| 4638 | } | ||
| 4639 | |||
| 4640 | /*! @abstract Extends `other` to form a vector of two 64-bit unsigned | ||
| 4641 | * integers. The contents of the newly-created vector lanes are | ||
| 4642 | * unspecified. */ | ||
| 4643 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2_undef(simd_ulong1 other) { | ||
| 4644 | simd_ulong2 result; | ||
| 4645 | result.x = other; | ||
| 4646 | return result; | ||
| 4647 | } | ||
| 4648 | |||
| 4649 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4650 | * templated and autogenerated code. */ | ||
| 4651 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong2 other) { | ||
| 4652 | return other; | ||
| 4653 | } | ||
| 4654 | |||
| 4655 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4656 | * integers. */ | ||
| 4657 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong3 other) { | ||
| 4658 | return other.xy; | ||
| 4659 | } | ||
| 4660 | |||
| 4661 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4662 | * integers. */ | ||
| 4663 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong4 other) { | ||
| 4664 | return other.xy; | ||
| 4665 | } | ||
| 4666 | |||
| 4667 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4668 | * integers. */ | ||
| 4669 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong8 other) { | ||
| 4670 | return other.xy; | ||
| 4671 | } | ||
| 4672 | |||
| 4673 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 4674 | * unsigned integers. */ | ||
| 4675 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z) { | ||
| 4676 | simd_ulong3 result; | ||
| 4677 | result.x = x; | ||
| 4678 | result.y = y; | ||
| 4679 | result.z = z; | ||
| 4680 | return result; | ||
| 4681 | } | ||
| 4682 | |||
| 4683 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 4684 | * unsigned integers. */ | ||
| 4685 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong2 yz) { | ||
| 4686 | simd_ulong3 result; | ||
| 4687 | result.x = x; | ||
| 4688 | result.yz = yz; | ||
| 4689 | return result; | ||
| 4690 | } | ||
| 4691 | |||
| 4692 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 4693 | * unsigned integers. */ | ||
| 4694 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 xy, simd_ulong1 z) { | ||
| 4695 | simd_ulong3 result; | ||
| 4696 | result.xy = xy; | ||
| 4697 | result.z = z; | ||
| 4698 | return result; | ||
| 4699 | } | ||
| 4700 | |||
| 4701 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned | ||
| 4702 | * integers. */ | ||
| 4703 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 other) { | ||
| 4704 | simd_ulong3 result = 0; | ||
| 4705 | result.x = other; | ||
| 4706 | return result; | ||
| 4707 | } | ||
| 4708 | |||
| 4709 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 4710 | * integers. The contents of the newly-created vector lanes are | ||
| 4711 | * unspecified. */ | ||
| 4712 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong1 other) { | ||
| 4713 | simd_ulong3 result; | ||
| 4714 | result.x = other; | ||
| 4715 | return result; | ||
| 4716 | } | ||
| 4717 | |||
| 4718 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned | ||
| 4719 | * integers. */ | ||
| 4720 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 other) { | ||
| 4721 | simd_ulong3 result = 0; | ||
| 4722 | result.xy = other; | ||
| 4723 | return result; | ||
| 4724 | } | ||
| 4725 | |||
| 4726 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 4727 | * integers. The contents of the newly-created vector lanes are | ||
| 4728 | * unspecified. */ | ||
| 4729 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong2 other) { | ||
| 4730 | simd_ulong3 result; | ||
| 4731 | result.xy = other; | ||
| 4732 | return result; | ||
| 4733 | } | ||
| 4734 | |||
| 4735 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4736 | * templated and autogenerated code. */ | ||
| 4737 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong3 other) { | ||
| 4738 | return other; | ||
| 4739 | } | ||
| 4740 | |||
| 4741 | /*! @abstract Truncates `other` to form a vector of three 64-bit unsigned | ||
| 4742 | * integers. */ | ||
| 4743 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong4 other) { | ||
| 4744 | return other.xyz; | ||
| 4745 | } | ||
| 4746 | |||
| 4747 | /*! @abstract Truncates `other` to form a vector of three 64-bit unsigned | ||
| 4748 | * integers. */ | ||
| 4749 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong8 other) { | ||
| 4750 | return other.xyz; | ||
| 4751 | } | ||
| 4752 | |||
| 4753 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 4754 | * 64-bit unsigned integers. */ | ||
| 4755 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z, simd_ulong1 w) { | ||
| 4756 | simd_ulong4 result; | ||
| 4757 | result.x = x; | ||
| 4758 | result.y = y; | ||
| 4759 | result.z = z; | ||
| 4760 | result.w = w; | ||
| 4761 | return result; | ||
| 4762 | } | ||
| 4763 | |||
| 4764 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 4765 | * unsigned integers. */ | ||
| 4766 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong2 zw) { | ||
| 4767 | simd_ulong4 result; | ||
| 4768 | result.x = x; | ||
| 4769 | result.y = y; | ||
| 4770 | result.zw = zw; | ||
| 4771 | return result; | ||
| 4772 | } | ||
| 4773 | |||
| 4774 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 4775 | * unsigned integers. */ | ||
| 4776 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong2 yz, simd_ulong1 w) { | ||
| 4777 | simd_ulong4 result; | ||
| 4778 | result.x = x; | ||
| 4779 | result.yz = yz; | ||
| 4780 | result.w = w; | ||
| 4781 | return result; | ||
| 4782 | } | ||
| 4783 | |||
| 4784 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 4785 | * unsigned integers. */ | ||
| 4786 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong1 z, simd_ulong1 w) { | ||
| 4787 | simd_ulong4 result; | ||
| 4788 | result.xy = xy; | ||
| 4789 | result.z = z; | ||
| 4790 | result.w = w; | ||
| 4791 | return result; | ||
| 4792 | } | ||
| 4793 | |||
| 4794 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 4795 | * unsigned integers. */ | ||
| 4796 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong3 yzw) { | ||
| 4797 | simd_ulong4 result; | ||
| 4798 | result.x = x; | ||
| 4799 | result.yzw = yzw; | ||
| 4800 | return result; | ||
| 4801 | } | ||
| 4802 | |||
| 4803 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 4804 | * unsigned integers. */ | ||
| 4805 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong2 zw) { | ||
| 4806 | simd_ulong4 result; | ||
| 4807 | result.xy = xy; | ||
| 4808 | result.zw = zw; | ||
| 4809 | return result; | ||
| 4810 | } | ||
| 4811 | |||
| 4812 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 4813 | * unsigned integers. */ | ||
| 4814 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 xyz, simd_ulong1 w) { | ||
| 4815 | simd_ulong4 result; | ||
| 4816 | result.xyz = xyz; | ||
| 4817 | result.w = w; | ||
| 4818 | return result; | ||
| 4819 | } | ||
| 4820 | |||
| 4821 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4822 | * integers. */ | ||
| 4823 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 other) { | ||
| 4824 | simd_ulong4 result = 0; | ||
| 4825 | result.x = other; | ||
| 4826 | return result; | ||
| 4827 | } | ||
| 4828 | |||
| 4829 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4830 | * integers. The contents of the newly-created vector lanes are | ||
| 4831 | * unspecified. */ | ||
| 4832 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong1 other) { | ||
| 4833 | simd_ulong4 result; | ||
| 4834 | result.x = other; | ||
| 4835 | return result; | ||
| 4836 | } | ||
| 4837 | |||
| 4838 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4839 | * integers. */ | ||
| 4840 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 other) { | ||
| 4841 | simd_ulong4 result = 0; | ||
| 4842 | result.xy = other; | ||
| 4843 | return result; | ||
| 4844 | } | ||
| 4845 | |||
| 4846 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4847 | * integers. The contents of the newly-created vector lanes are | ||
| 4848 | * unspecified. */ | ||
| 4849 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong2 other) { | ||
| 4850 | simd_ulong4 result; | ||
| 4851 | result.xy = other; | ||
| 4852 | return result; | ||
| 4853 | } | ||
| 4854 | |||
| 4855 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4856 | * integers. */ | ||
| 4857 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 other) { | ||
| 4858 | simd_ulong4 result = 0; | ||
| 4859 | result.xyz = other; | ||
| 4860 | return result; | ||
| 4861 | } | ||
| 4862 | |||
| 4863 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4864 | * integers. The contents of the newly-created vector lanes are | ||
| 4865 | * unspecified. */ | ||
| 4866 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong3 other) { | ||
| 4867 | simd_ulong4 result; | ||
| 4868 | result.xyz = other; | ||
| 4869 | return result; | ||
| 4870 | } | ||
| 4871 | |||
| 4872 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4873 | * templated and autogenerated code. */ | ||
| 4874 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong4 other) { | ||
| 4875 | return other; | ||
| 4876 | } | ||
| 4877 | |||
| 4878 | /*! @abstract Truncates `other` to form a vector of four 64-bit unsigned | ||
| 4879 | * integers. */ | ||
| 4880 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong8 other) { | ||
| 4881 | return other.xyzw; | ||
| 4882 | } | ||
| 4883 | |||
| 4884 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 4885 | * unsigned integers. */ | ||
| 4886 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 lo, simd_ulong4 hi) { | ||
| 4887 | simd_ulong8 result; | ||
| 4888 | result.lo = lo; | ||
| 4889 | result.hi = hi; | ||
| 4890 | return result; | ||
| 4891 | } | ||
| 4892 | |||
| 4893 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4894 | * integers. */ | ||
| 4895 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong1 other) { | ||
| 4896 | simd_ulong8 result = 0; | ||
| 4897 | result.x = other; | ||
| 4898 | return result; | ||
| 4899 | } | ||
| 4900 | |||
| 4901 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4902 | * integers. The contents of the newly-created vector lanes are | ||
| 4903 | * unspecified. */ | ||
| 4904 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong1 other) { | ||
| 4905 | simd_ulong8 result; | ||
| 4906 | result.x = other; | ||
| 4907 | return result; | ||
| 4908 | } | ||
| 4909 | |||
| 4910 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4911 | * integers. */ | ||
| 4912 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong2 other) { | ||
| 4913 | simd_ulong8 result = 0; | ||
| 4914 | result.xy = other; | ||
| 4915 | return result; | ||
| 4916 | } | ||
| 4917 | |||
| 4918 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4919 | * integers. The contents of the newly-created vector lanes are | ||
| 4920 | * unspecified. */ | ||
| 4921 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong2 other) { | ||
| 4922 | simd_ulong8 result; | ||
| 4923 | result.xy = other; | ||
| 4924 | return result; | ||
| 4925 | } | ||
| 4926 | |||
| 4927 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4928 | * integers. */ | ||
| 4929 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong3 other) { | ||
| 4930 | simd_ulong8 result = 0; | ||
| 4931 | result.xyz = other; | ||
| 4932 | return result; | ||
| 4933 | } | ||
| 4934 | |||
| 4935 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4936 | * integers. The contents of the newly-created vector lanes are | ||
| 4937 | * unspecified. */ | ||
| 4938 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong3 other) { | ||
| 4939 | simd_ulong8 result; | ||
| 4940 | result.xyz = other; | ||
| 4941 | return result; | ||
| 4942 | } | ||
| 4943 | |||
| 4944 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4945 | * integers. */ | ||
| 4946 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 other) { | ||
| 4947 | simd_ulong8 result = 0; | ||
| 4948 | result.xyzw = other; | ||
| 4949 | return result; | ||
| 4950 | } | ||
| 4951 | |||
| 4952 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4953 | * integers. The contents of the newly-created vector lanes are | ||
| 4954 | * unspecified. */ | ||
| 4955 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong4 other) { | ||
| 4956 | simd_ulong8 result; | ||
| 4957 | result.xyzw = other; | ||
| 4958 | return result; | ||
| 4959 | } | ||
| 4960 | |||
| 4961 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4962 | * templated and autogenerated code. */ | ||
| 4963 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong8 other) { | ||
| 4964 | return other; | ||
| 4965 | } | ||
| 4966 | |||
| 4967 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 4968 | * floating-point numbers. */ | ||
| 4969 | static inline SIMD_CFUNC simd_double2 simd_make_double2(double x, double y) { | ||
| 4970 | simd_double2 result; | ||
| 4971 | result.x = x; | ||
| 4972 | result.y = y; | ||
| 4973 | return result; | ||
| 4974 | } | ||
| 4975 | |||
| 4976 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit floating- | ||
| 4977 | * point numbers. */ | ||
| 4978 | static inline SIMD_CFUNC simd_double2 simd_make_double2(double other) { | ||
| 4979 | simd_double2 result = 0; | ||
| 4980 | result.x = other; | ||
| 4981 | return result; | ||
| 4982 | } | ||
| 4983 | |||
| 4984 | /*! @abstract Extends `other` to form a vector of two 64-bit floating-point | ||
| 4985 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4986 | static inline SIMD_CFUNC simd_double2 simd_make_double2_undef(double other) { | ||
| 4987 | simd_double2 result; | ||
| 4988 | result.x = other; | ||
| 4989 | return result; | ||
| 4990 | } | ||
| 4991 | |||
| 4992 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4993 | * templated and autogenerated code. */ | ||
| 4994 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double2 other) { | ||
| 4995 | return other; | ||
| 4996 | } | ||
| 4997 | |||
| 4998 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 4999 | * point numbers. */ | ||
| 5000 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double3 other) { | ||
| 5001 | return other.xy; | ||
| 5002 | } | ||
| 5003 | |||
| 5004 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 5005 | * point numbers. */ | ||
| 5006 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double4 other) { | ||
| 5007 | return other.xy; | ||
| 5008 | } | ||
| 5009 | |||
| 5010 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 5011 | * point numbers. */ | ||
| 5012 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double8 other) { | ||
| 5013 | return other.xy; | ||
| 5014 | } | ||
| 5015 | |||
| 5016 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 5017 | * floating-point numbers. */ | ||
| 5018 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, double y, double z) { | ||
| 5019 | simd_double3 result; | ||
| 5020 | result.x = x; | ||
| 5021 | result.y = y; | ||
| 5022 | result.z = z; | ||
| 5023 | return result; | ||
| 5024 | } | ||
| 5025 | |||
| 5026 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 5027 | * floating-point numbers. */ | ||
| 5028 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, simd_double2 yz) { | ||
| 5029 | simd_double3 result; | ||
| 5030 | result.x = x; | ||
| 5031 | result.yz = yz; | ||
| 5032 | return result; | ||
| 5033 | } | ||
| 5034 | |||
| 5035 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 5036 | * floating-point numbers. */ | ||
| 5037 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 xy, double z) { | ||
| 5038 | simd_double3 result; | ||
| 5039 | result.xy = xy; | ||
| 5040 | result.z = z; | ||
| 5041 | return result; | ||
| 5042 | } | ||
| 5043 | |||
| 5044 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit | ||
| 5045 | * floating-point numbers. */ | ||
| 5046 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double other) { | ||
| 5047 | simd_double3 result = 0; | ||
| 5048 | result.x = other; | ||
| 5049 | return result; | ||
| 5050 | } | ||
| 5051 | |||
| 5052 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 5053 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5054 | * unspecified. */ | ||
| 5055 | static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(double other) { | ||
| 5056 | simd_double3 result; | ||
| 5057 | result.x = other; | ||
| 5058 | return result; | ||
| 5059 | } | ||
| 5060 | |||
| 5061 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit | ||
| 5062 | * floating-point numbers. */ | ||
| 5063 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 other) { | ||
| 5064 | simd_double3 result = 0; | ||
| 5065 | result.xy = other; | ||
| 5066 | return result; | ||
| 5067 | } | ||
| 5068 | |||
| 5069 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 5070 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5071 | * unspecified. */ | ||
| 5072 | static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(simd_double2 other) { | ||
| 5073 | simd_double3 result; | ||
| 5074 | result.xy = other; | ||
| 5075 | return result; | ||
| 5076 | } | ||
| 5077 | |||
| 5078 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5079 | * templated and autogenerated code. */ | ||
| 5080 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double3 other) { | ||
| 5081 | return other; | ||
| 5082 | } | ||
| 5083 | |||
| 5084 | /*! @abstract Truncates `other` to form a vector of three 64-bit floating- | ||
| 5085 | * point numbers. */ | ||
| 5086 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double4 other) { | ||
| 5087 | return other.xyz; | ||
| 5088 | } | ||
| 5089 | |||
| 5090 | /*! @abstract Truncates `other` to form a vector of three 64-bit floating- | ||
| 5091 | * point numbers. */ | ||
| 5092 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double8 other) { | ||
| 5093 | return other.xyz; | ||
| 5094 | } | ||
| 5095 | |||
| 5096 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5097 | * 64-bit floating-point numbers. */ | ||
| 5098 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, double z, double w) { | ||
| 5099 | simd_double4 result; | ||
| 5100 | result.x = x; | ||
| 5101 | result.y = y; | ||
| 5102 | result.z = z; | ||
| 5103 | result.w = w; | ||
| 5104 | return result; | ||
| 5105 | } | ||
| 5106 | |||
| 5107 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 5108 | * floating-point numbers. */ | ||
| 5109 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, simd_double2 zw) { | ||
| 5110 | simd_double4 result; | ||
| 5111 | result.x = x; | ||
| 5112 | result.y = y; | ||
| 5113 | result.zw = zw; | ||
| 5114 | return result; | ||
| 5115 | } | ||
| 5116 | |||
| 5117 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 5118 | * floating-point numbers. */ | ||
| 5119 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double2 yz, double w) { | ||
| 5120 | simd_double4 result; | ||
| 5121 | result.x = x; | ||
| 5122 | result.yz = yz; | ||
| 5123 | result.w = w; | ||
| 5124 | return result; | ||
| 5125 | } | ||
| 5126 | |||
| 5127 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 5128 | * floating-point numbers. */ | ||
| 5129 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, double z, double w) { | ||
| 5130 | simd_double4 result; | ||
| 5131 | result.xy = xy; | ||
| 5132 | result.z = z; | ||
| 5133 | result.w = w; | ||
| 5134 | return result; | ||
| 5135 | } | ||
| 5136 | |||
| 5137 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 5138 | * floating-point numbers. */ | ||
| 5139 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double3 yzw) { | ||
| 5140 | simd_double4 result; | ||
| 5141 | result.x = x; | ||
| 5142 | result.yzw = yzw; | ||
| 5143 | return result; | ||
| 5144 | } | ||
| 5145 | |||
| 5146 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 5147 | * floating-point numbers. */ | ||
| 5148 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, simd_double2 zw) { | ||
| 5149 | simd_double4 result; | ||
| 5150 | result.xy = xy; | ||
| 5151 | result.zw = zw; | ||
| 5152 | return result; | ||
| 5153 | } | ||
| 5154 | |||
| 5155 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 5156 | * floating-point numbers. */ | ||
| 5157 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 xyz, double w) { | ||
| 5158 | simd_double4 result; | ||
| 5159 | result.xyz = xyz; | ||
| 5160 | result.w = w; | ||
| 5161 | return result; | ||
| 5162 | } | ||
| 5163 | |||
| 5164 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5165 | * point numbers. */ | ||
| 5166 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double other) { | ||
| 5167 | simd_double4 result = 0; | ||
| 5168 | result.x = other; | ||
| 5169 | return result; | ||
| 5170 | } | ||
| 5171 | |||
| 5172 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5173 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5174 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(double other) { | ||
| 5175 | simd_double4 result; | ||
| 5176 | result.x = other; | ||
| 5177 | return result; | ||
| 5178 | } | ||
| 5179 | |||
| 5180 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5181 | * point numbers. */ | ||
| 5182 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 other) { | ||
| 5183 | simd_double4 result = 0; | ||
| 5184 | result.xy = other; | ||
| 5185 | return result; | ||
| 5186 | } | ||
| 5187 | |||
| 5188 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5189 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5190 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double2 other) { | ||
| 5191 | simd_double4 result; | ||
| 5192 | result.xy = other; | ||
| 5193 | return result; | ||
| 5194 | } | ||
| 5195 | |||
| 5196 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5197 | * point numbers. */ | ||
| 5198 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 other) { | ||
| 5199 | simd_double4 result = 0; | ||
| 5200 | result.xyz = other; | ||
| 5201 | return result; | ||
| 5202 | } | ||
| 5203 | |||
| 5204 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5205 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5206 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double3 other) { | ||
| 5207 | simd_double4 result; | ||
| 5208 | result.xyz = other; | ||
| 5209 | return result; | ||
| 5210 | } | ||
| 5211 | |||
| 5212 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5213 | * templated and autogenerated code. */ | ||
| 5214 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double4 other) { | ||
| 5215 | return other; | ||
| 5216 | } | ||
| 5217 | |||
| 5218 | /*! @abstract Truncates `other` to form a vector of four 64-bit floating- | ||
| 5219 | * point numbers. */ | ||
| 5220 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double8 other) { | ||
| 5221 | return other.xyzw; | ||
| 5222 | } | ||
| 5223 | |||
| 5224 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 5225 | * floating-point numbers. */ | ||
| 5226 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 lo, simd_double4 hi) { | ||
| 5227 | simd_double8 result; | ||
| 5228 | result.lo = lo; | ||
| 5229 | result.hi = hi; | ||
| 5230 | return result; | ||
| 5231 | } | ||
| 5232 | |||
| 5233 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5234 | * floating-point numbers. */ | ||
| 5235 | static inline SIMD_CFUNC simd_double8 simd_make_double8(double other) { | ||
| 5236 | simd_double8 result = 0; | ||
| 5237 | result.x = other; | ||
| 5238 | return result; | ||
| 5239 | } | ||
| 5240 | |||
| 5241 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5242 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5243 | * unspecified. */ | ||
| 5244 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(double other) { | ||
| 5245 | simd_double8 result; | ||
| 5246 | result.x = other; | ||
| 5247 | return result; | ||
| 5248 | } | ||
| 5249 | |||
| 5250 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5251 | * floating-point numbers. */ | ||
| 5252 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double2 other) { | ||
| 5253 | simd_double8 result = 0; | ||
| 5254 | result.xy = other; | ||
| 5255 | return result; | ||
| 5256 | } | ||
| 5257 | |||
| 5258 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5259 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5260 | * unspecified. */ | ||
| 5261 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double2 other) { | ||
| 5262 | simd_double8 result; | ||
| 5263 | result.xy = other; | ||
| 5264 | return result; | ||
| 5265 | } | ||
| 5266 | |||
| 5267 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5268 | * floating-point numbers. */ | ||
| 5269 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double3 other) { | ||
| 5270 | simd_double8 result = 0; | ||
| 5271 | result.xyz = other; | ||
| 5272 | return result; | ||
| 5273 | } | ||
| 5274 | |||
| 5275 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5276 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5277 | * unspecified. */ | ||
| 5278 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double3 other) { | ||
| 5279 | simd_double8 result; | ||
| 5280 | result.xyz = other; | ||
| 5281 | return result; | ||
| 5282 | } | ||
| 5283 | |||
| 5284 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5285 | * floating-point numbers. */ | ||
| 5286 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 other) { | ||
| 5287 | simd_double8 result = 0; | ||
| 5288 | result.xyzw = other; | ||
| 5289 | return result; | ||
| 5290 | } | ||
| 5291 | |||
| 5292 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5293 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5294 | * unspecified. */ | ||
| 5295 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double4 other) { | ||
| 5296 | simd_double8 result; | ||
| 5297 | result.xyzw = other; | ||
| 5298 | return result; | ||
| 5299 | } | ||
| 5300 | |||
| 5301 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5302 | * templated and autogenerated code. */ | ||
| 5303 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) { | ||
| 5304 | return other; | ||
| 5305 | } | ||
| 5306 | |||
| 5307 | #ifdef __cplusplus | ||
| 5308 | } /* extern "C" */ | ||
| 5309 | |||
| 5310 | #include <tuple> | ||
| 5311 | #include <simd/packed.h> | ||
| 5312 | |||
| 5313 | namespace simd { | ||
| 5314 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed | ||
| 5315 | * (twos-complement) integers. */ | ||
| 5316 | static inline SIMD_CPPFUNC char2 make_char2(char x, char y) { | ||
| 5317 | return ::simd_make_char2(x, y); | ||
| 5318 | } | ||
| 5319 | |||
| 5320 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5321 | * 8-bit signed (twos-complement) integers. */ | ||
| 5322 | template <typename typeN> static SIMD_CPPFUNC char2 make_char2(typeN other) { | ||
| 5323 | return ::simd_make_char2(other); | ||
| 5324 | } | ||
| 5325 | |||
| 5326 | /*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- | ||
| 5327 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5328 | * unspecified. */ | ||
| 5329 | template <typename typeN> static SIMD_CPPFUNC char2 make_char2_undef(typeN other) { | ||
| 5330 | return ::simd_make_char2_undef(other); | ||
| 5331 | } | ||
| 5332 | |||
| 5333 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 5334 | * signed (twos-complement) integers. */ | ||
| 5335 | static inline SIMD_CPPFUNC char3 make_char3(char x, char y, char z) { | ||
| 5336 | return ::simd_make_char3(x, y, z); | ||
| 5337 | } | ||
| 5338 | |||
| 5339 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 5340 | * signed (twos-complement) integers. */ | ||
| 5341 | static inline SIMD_CPPFUNC char3 make_char3(char x, char2 yz) { | ||
| 5342 | return ::simd_make_char3(x, yz); | ||
| 5343 | } | ||
| 5344 | |||
| 5345 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 5346 | * signed (twos-complement) integers. */ | ||
| 5347 | static inline SIMD_CPPFUNC char3 make_char3(char2 xy, char z) { | ||
| 5348 | return ::simd_make_char3(xy, z); | ||
| 5349 | } | ||
| 5350 | |||
| 5351 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5352 | * 8-bit signed (twos-complement) integers. */ | ||
| 5353 | template <typename typeN> static SIMD_CPPFUNC char3 make_char3(typeN other) { | ||
| 5354 | return ::simd_make_char3(other); | ||
| 5355 | } | ||
| 5356 | |||
| 5357 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 5358 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5359 | * unspecified. */ | ||
| 5360 | template <typename typeN> static SIMD_CPPFUNC char3 make_char3_undef(typeN other) { | ||
| 5361 | return ::simd_make_char3_undef(other); | ||
| 5362 | } | ||
| 5363 | |||
| 5364 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5365 | * 8-bit signed (twos-complement) integers. */ | ||
| 5366 | static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char z, char w) { | ||
| 5367 | return ::simd_make_char4(x, y, z, w); | ||
| 5368 | } | ||
| 5369 | |||
| 5370 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 5371 | * signed (twos-complement) integers. */ | ||
| 5372 | static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char2 zw) { | ||
| 5373 | return ::simd_make_char4(x, y, zw); | ||
| 5374 | } | ||
| 5375 | |||
| 5376 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 5377 | * signed (twos-complement) integers. */ | ||
| 5378 | static inline SIMD_CPPFUNC char4 make_char4(char x, char2 yz, char w) { | ||
| 5379 | return ::simd_make_char4(x, yz, w); | ||
| 5380 | } | ||
| 5381 | |||
| 5382 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 5383 | * signed (twos-complement) integers. */ | ||
| 5384 | static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char z, char w) { | ||
| 5385 | return ::simd_make_char4(xy, z, w); | ||
| 5386 | } | ||
| 5387 | |||
| 5388 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 5389 | * signed (twos-complement) integers. */ | ||
| 5390 | static inline SIMD_CPPFUNC char4 make_char4(char x, char3 yzw) { | ||
| 5391 | return ::simd_make_char4(x, yzw); | ||
| 5392 | } | ||
| 5393 | |||
| 5394 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 5395 | * signed (twos-complement) integers. */ | ||
| 5396 | static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char2 zw) { | ||
| 5397 | return ::simd_make_char4(xy, zw); | ||
| 5398 | } | ||
| 5399 | |||
| 5400 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 5401 | * signed (twos-complement) integers. */ | ||
| 5402 | static inline SIMD_CPPFUNC char4 make_char4(char3 xyz, char w) { | ||
| 5403 | return ::simd_make_char4(xyz, w); | ||
| 5404 | } | ||
| 5405 | |||
| 5406 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5407 | * 8-bit signed (twos-complement) integers. */ | ||
| 5408 | template <typename typeN> static SIMD_CPPFUNC char4 make_char4(typeN other) { | ||
| 5409 | return ::simd_make_char4(other); | ||
| 5410 | } | ||
| 5411 | |||
| 5412 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 5413 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5414 | * unspecified. */ | ||
| 5415 | template <typename typeN> static SIMD_CPPFUNC char4 make_char4_undef(typeN other) { | ||
| 5416 | return ::simd_make_char4_undef(other); | ||
| 5417 | } | ||
| 5418 | |||
| 5419 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 5420 | * signed (twos-complement) integers. */ | ||
| 5421 | static inline SIMD_CPPFUNC char8 make_char8(char4 lo, char4 hi) { | ||
| 5422 | return ::simd_make_char8(lo, hi); | ||
| 5423 | } | ||
| 5424 | |||
| 5425 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5426 | * 8-bit signed (twos-complement) integers. */ | ||
| 5427 | template <typename typeN> static SIMD_CPPFUNC char8 make_char8(typeN other) { | ||
| 5428 | return ::simd_make_char8(other); | ||
| 5429 | } | ||
| 5430 | |||
| 5431 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 5432 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5433 | * unspecified. */ | ||
| 5434 | template <typename typeN> static SIMD_CPPFUNC char8 make_char8_undef(typeN other) { | ||
| 5435 | return ::simd_make_char8_undef(other); | ||
| 5436 | } | ||
| 5437 | |||
| 5438 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 5439 | * signed (twos-complement) integers. */ | ||
| 5440 | static inline SIMD_CPPFUNC char16 make_char16(char8 lo, char8 hi) { | ||
| 5441 | return ::simd_make_char16(lo, hi); | ||
| 5442 | } | ||
| 5443 | |||
| 5444 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5445 | * 8-bit signed (twos-complement) integers. */ | ||
| 5446 | template <typename typeN> static SIMD_CPPFUNC char16 make_char16(typeN other) { | ||
| 5447 | return ::simd_make_char16(other); | ||
| 5448 | } | ||
| 5449 | |||
| 5450 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 5451 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5452 | * lanes are unspecified. */ | ||
| 5453 | template <typename typeN> static SIMD_CPPFUNC char16 make_char16_undef(typeN other) { | ||
| 5454 | return ::simd_make_char16_undef(other); | ||
| 5455 | } | ||
| 5456 | |||
| 5457 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5458 | * 8-bit signed (twos-complement) integers. */ | ||
| 5459 | static inline SIMD_CPPFUNC char32 make_char32(char16 lo, char16 hi) { | ||
| 5460 | return ::simd_make_char32(lo, hi); | ||
| 5461 | } | ||
| 5462 | |||
| 5463 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5464 | * two 8-bit signed (twos-complement) integers. */ | ||
| 5465 | template <typename typeN> static SIMD_CPPFUNC char32 make_char32(typeN other) { | ||
| 5466 | return ::simd_make_char32(other); | ||
| 5467 | } | ||
| 5468 | |||
| 5469 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 5470 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5471 | * lanes are unspecified. */ | ||
| 5472 | template <typename typeN> static SIMD_CPPFUNC char32 make_char32_undef(typeN other) { | ||
| 5473 | return ::simd_make_char32_undef(other); | ||
| 5474 | } | ||
| 5475 | |||
| 5476 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 5477 | * 8-bit signed (twos-complement) integers. */ | ||
| 5478 | static inline SIMD_CPPFUNC char64 make_char64(char32 lo, char32 hi) { | ||
| 5479 | return ::simd_make_char64(lo, hi); | ||
| 5480 | } | ||
| 5481 | |||
| 5482 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixty- | ||
| 5483 | * four 8-bit signed (twos-complement) integers. */ | ||
| 5484 | template <typename typeN> static SIMD_CPPFUNC char64 make_char64(typeN other) { | ||
| 5485 | return ::simd_make_char64(other); | ||
| 5486 | } | ||
| 5487 | |||
| 5488 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 5489 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5490 | * lanes are unspecified. */ | ||
| 5491 | template <typename typeN> static SIMD_CPPFUNC char64 make_char64_undef(typeN other) { | ||
| 5492 | return ::simd_make_char64_undef(other); | ||
| 5493 | } | ||
| 5494 | |||
| 5495 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit | ||
| 5496 | * unsigned integers. */ | ||
| 5497 | static inline SIMD_CPPFUNC uchar2 make_uchar2(unsigned char x, unsigned char y) { | ||
| 5498 | return ::simd_make_uchar2(x, y); | ||
| 5499 | } | ||
| 5500 | |||
| 5501 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5502 | * 8-bit unsigned integers. */ | ||
| 5503 | template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2(typeN other) { | ||
| 5504 | return ::simd_make_uchar2(other); | ||
| 5505 | } | ||
| 5506 | |||
| 5507 | /*! @abstract Extends `other` to form a vector of two 8-bit unsigned | ||
| 5508 | * integers. The contents of the newly-created vector lanes are | ||
| 5509 | * unspecified. */ | ||
| 5510 | template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2_undef(typeN other) { | ||
| 5511 | return ::simd_make_uchar2_undef(other); | ||
| 5512 | } | ||
| 5513 | |||
| 5514 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 5515 | * unsigned integers. */ | ||
| 5516 | static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) { | ||
| 5517 | return ::simd_make_uchar3(x, y, z); | ||
| 5518 | } | ||
| 5519 | |||
| 5520 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 5521 | * unsigned integers. */ | ||
| 5522 | static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, uchar2 yz) { | ||
| 5523 | return ::simd_make_uchar3(x, yz); | ||
| 5524 | } | ||
| 5525 | |||
| 5526 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 5527 | * unsigned integers. */ | ||
| 5528 | static inline SIMD_CPPFUNC uchar3 make_uchar3(uchar2 xy, unsigned char z) { | ||
| 5529 | return ::simd_make_uchar3(xy, z); | ||
| 5530 | } | ||
| 5531 | |||
| 5532 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5533 | * 8-bit unsigned integers. */ | ||
| 5534 | template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3(typeN other) { | ||
| 5535 | return ::simd_make_uchar3(other); | ||
| 5536 | } | ||
| 5537 | |||
| 5538 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 5539 | * integers. The contents of the newly-created vector lanes are | ||
| 5540 | * unspecified. */ | ||
| 5541 | template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3_undef(typeN other) { | ||
| 5542 | return ::simd_make_uchar3_undef(other); | ||
| 5543 | } | ||
| 5544 | |||
| 5545 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5546 | * 8-bit unsigned integers. */ | ||
| 5547 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { | ||
| 5548 | return ::simd_make_uchar4(x, y, z, w); | ||
| 5549 | } | ||
| 5550 | |||
| 5551 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 5552 | * unsigned integers. */ | ||
| 5553 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, uchar2 zw) { | ||
| 5554 | return ::simd_make_uchar4(x, y, zw); | ||
| 5555 | } | ||
| 5556 | |||
| 5557 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 5558 | * unsigned integers. */ | ||
| 5559 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar2 yz, unsigned char w) { | ||
| 5560 | return ::simd_make_uchar4(x, yz, w); | ||
| 5561 | } | ||
| 5562 | |||
| 5563 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 5564 | * unsigned integers. */ | ||
| 5565 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, unsigned char z, unsigned char w) { | ||
| 5566 | return ::simd_make_uchar4(xy, z, w); | ||
| 5567 | } | ||
| 5568 | |||
| 5569 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 5570 | * unsigned integers. */ | ||
| 5571 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar3 yzw) { | ||
| 5572 | return ::simd_make_uchar4(x, yzw); | ||
| 5573 | } | ||
| 5574 | |||
| 5575 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 5576 | * unsigned integers. */ | ||
| 5577 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, uchar2 zw) { | ||
| 5578 | return ::simd_make_uchar4(xy, zw); | ||
| 5579 | } | ||
| 5580 | |||
| 5581 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 5582 | * unsigned integers. */ | ||
| 5583 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar3 xyz, unsigned char w) { | ||
| 5584 | return ::simd_make_uchar4(xyz, w); | ||
| 5585 | } | ||
| 5586 | |||
| 5587 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5588 | * 8-bit unsigned integers. */ | ||
| 5589 | template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4(typeN other) { | ||
| 5590 | return ::simd_make_uchar4(other); | ||
| 5591 | } | ||
| 5592 | |||
| 5593 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 5594 | * integers. The contents of the newly-created vector lanes are | ||
| 5595 | * unspecified. */ | ||
| 5596 | template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4_undef(typeN other) { | ||
| 5597 | return ::simd_make_uchar4_undef(other); | ||
| 5598 | } | ||
| 5599 | |||
| 5600 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 5601 | * unsigned integers. */ | ||
| 5602 | static inline SIMD_CPPFUNC uchar8 make_uchar8(uchar4 lo, uchar4 hi) { | ||
| 5603 | return ::simd_make_uchar8(lo, hi); | ||
| 5604 | } | ||
| 5605 | |||
| 5606 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5607 | * 8-bit unsigned integers. */ | ||
| 5608 | template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8(typeN other) { | ||
| 5609 | return ::simd_make_uchar8(other); | ||
| 5610 | } | ||
| 5611 | |||
| 5612 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 5613 | * integers. The contents of the newly-created vector lanes are | ||
| 5614 | * unspecified. */ | ||
| 5615 | template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8_undef(typeN other) { | ||
| 5616 | return ::simd_make_uchar8_undef(other); | ||
| 5617 | } | ||
| 5618 | |||
| 5619 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 5620 | * unsigned integers. */ | ||
| 5621 | static inline SIMD_CPPFUNC uchar16 make_uchar16(uchar8 lo, uchar8 hi) { | ||
| 5622 | return ::simd_make_uchar16(lo, hi); | ||
| 5623 | } | ||
| 5624 | |||
| 5625 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5626 | * 8-bit unsigned integers. */ | ||
| 5627 | template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16(typeN other) { | ||
| 5628 | return ::simd_make_uchar16(other); | ||
| 5629 | } | ||
| 5630 | |||
| 5631 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 5632 | * integers. The contents of the newly-created vector lanes are | ||
| 5633 | * unspecified. */ | ||
| 5634 | template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16_undef(typeN other) { | ||
| 5635 | return ::simd_make_uchar16_undef(other); | ||
| 5636 | } | ||
| 5637 | |||
| 5638 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5639 | * 8-bit unsigned integers. */ | ||
| 5640 | static inline SIMD_CPPFUNC uchar32 make_uchar32(uchar16 lo, uchar16 hi) { | ||
| 5641 | return ::simd_make_uchar32(lo, hi); | ||
| 5642 | } | ||
| 5643 | |||
| 5644 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5645 | * two 8-bit unsigned integers. */ | ||
| 5646 | template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32(typeN other) { | ||
| 5647 | return ::simd_make_uchar32(other); | ||
| 5648 | } | ||
| 5649 | |||
| 5650 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 5651 | * integers. The contents of the newly-created vector lanes are | ||
| 5652 | * unspecified. */ | ||
| 5653 | template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32_undef(typeN other) { | ||
| 5654 | return ::simd_make_uchar32_undef(other); | ||
| 5655 | } | ||
| 5656 | |||
| 5657 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 5658 | * 8-bit unsigned integers. */ | ||
| 5659 | static inline SIMD_CPPFUNC uchar64 make_uchar64(uchar32 lo, uchar32 hi) { | ||
| 5660 | return ::simd_make_uchar64(lo, hi); | ||
| 5661 | } | ||
| 5662 | |||
| 5663 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixty- | ||
| 5664 | * four 8-bit unsigned integers. */ | ||
| 5665 | template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64(typeN other) { | ||
| 5666 | return ::simd_make_uchar64(other); | ||
| 5667 | } | ||
| 5668 | |||
| 5669 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 5670 | * integers. The contents of the newly-created vector lanes are | ||
| 5671 | * unspecified. */ | ||
| 5672 | template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64_undef(typeN other) { | ||
| 5673 | return ::simd_make_uchar64_undef(other); | ||
| 5674 | } | ||
| 5675 | |||
| 5676 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed | ||
| 5677 | * (twos-complement) integers. */ | ||
| 5678 | static inline SIMD_CPPFUNC short2 make_short2(short x, short y) { | ||
| 5679 | return ::simd_make_short2(x, y); | ||
| 5680 | } | ||
| 5681 | |||
| 5682 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5683 | * 16-bit signed (twos-complement) integers. */ | ||
| 5684 | template <typename typeN> static SIMD_CPPFUNC short2 make_short2(typeN other) { | ||
| 5685 | return ::simd_make_short2(other); | ||
| 5686 | } | ||
| 5687 | |||
| 5688 | /*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- | ||
| 5689 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5690 | * unspecified. */ | ||
| 5691 | template <typename typeN> static SIMD_CPPFUNC short2 make_short2_undef(typeN other) { | ||
| 5692 | return ::simd_make_short2_undef(other); | ||
| 5693 | } | ||
| 5694 | |||
| 5695 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 5696 | * signed (twos-complement) integers. */ | ||
| 5697 | static inline SIMD_CPPFUNC short3 make_short3(short x, short y, short z) { | ||
| 5698 | return ::simd_make_short3(x, y, z); | ||
| 5699 | } | ||
| 5700 | |||
| 5701 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 5702 | * signed (twos-complement) integers. */ | ||
| 5703 | static inline SIMD_CPPFUNC short3 make_short3(short x, short2 yz) { | ||
| 5704 | return ::simd_make_short3(x, yz); | ||
| 5705 | } | ||
| 5706 | |||
| 5707 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 5708 | * signed (twos-complement) integers. */ | ||
| 5709 | static inline SIMD_CPPFUNC short3 make_short3(short2 xy, short z) { | ||
| 5710 | return ::simd_make_short3(xy, z); | ||
| 5711 | } | ||
| 5712 | |||
| 5713 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5714 | * 16-bit signed (twos-complement) integers. */ | ||
| 5715 | template <typename typeN> static SIMD_CPPFUNC short3 make_short3(typeN other) { | ||
| 5716 | return ::simd_make_short3(other); | ||
| 5717 | } | ||
| 5718 | |||
| 5719 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 5720 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5721 | * unspecified. */ | ||
| 5722 | template <typename typeN> static SIMD_CPPFUNC short3 make_short3_undef(typeN other) { | ||
| 5723 | return ::simd_make_short3_undef(other); | ||
| 5724 | } | ||
| 5725 | |||
| 5726 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5727 | * 16-bit signed (twos-complement) integers. */ | ||
| 5728 | static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short z, short w) { | ||
| 5729 | return ::simd_make_short4(x, y, z, w); | ||
| 5730 | } | ||
| 5731 | |||
| 5732 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 5733 | * signed (twos-complement) integers. */ | ||
| 5734 | static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short2 zw) { | ||
| 5735 | return ::simd_make_short4(x, y, zw); | ||
| 5736 | } | ||
| 5737 | |||
| 5738 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 5739 | * signed (twos-complement) integers. */ | ||
| 5740 | static inline SIMD_CPPFUNC short4 make_short4(short x, short2 yz, short w) { | ||
| 5741 | return ::simd_make_short4(x, yz, w); | ||
| 5742 | } | ||
| 5743 | |||
| 5744 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 5745 | * signed (twos-complement) integers. */ | ||
| 5746 | static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short z, short w) { | ||
| 5747 | return ::simd_make_short4(xy, z, w); | ||
| 5748 | } | ||
| 5749 | |||
| 5750 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 5751 | * signed (twos-complement) integers. */ | ||
| 5752 | static inline SIMD_CPPFUNC short4 make_short4(short x, short3 yzw) { | ||
| 5753 | return ::simd_make_short4(x, yzw); | ||
| 5754 | } | ||
| 5755 | |||
| 5756 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 5757 | * signed (twos-complement) integers. */ | ||
| 5758 | static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short2 zw) { | ||
| 5759 | return ::simd_make_short4(xy, zw); | ||
| 5760 | } | ||
| 5761 | |||
| 5762 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 5763 | * signed (twos-complement) integers. */ | ||
| 5764 | static inline SIMD_CPPFUNC short4 make_short4(short3 xyz, short w) { | ||
| 5765 | return ::simd_make_short4(xyz, w); | ||
| 5766 | } | ||
| 5767 | |||
| 5768 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5769 | * 16-bit signed (twos-complement) integers. */ | ||
| 5770 | template <typename typeN> static SIMD_CPPFUNC short4 make_short4(typeN other) { | ||
| 5771 | return ::simd_make_short4(other); | ||
| 5772 | } | ||
| 5773 | |||
| 5774 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 5775 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5776 | * unspecified. */ | ||
| 5777 | template <typename typeN> static SIMD_CPPFUNC short4 make_short4_undef(typeN other) { | ||
| 5778 | return ::simd_make_short4_undef(other); | ||
| 5779 | } | ||
| 5780 | |||
| 5781 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 5782 | * signed (twos-complement) integers. */ | ||
| 5783 | static inline SIMD_CPPFUNC short8 make_short8(short4 lo, short4 hi) { | ||
| 5784 | return ::simd_make_short8(lo, hi); | ||
| 5785 | } | ||
| 5786 | |||
| 5787 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5788 | * 16-bit signed (twos-complement) integers. */ | ||
| 5789 | template <typename typeN> static SIMD_CPPFUNC short8 make_short8(typeN other) { | ||
| 5790 | return ::simd_make_short8(other); | ||
| 5791 | } | ||
| 5792 | |||
| 5793 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 5794 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5795 | * unspecified. */ | ||
| 5796 | template <typename typeN> static SIMD_CPPFUNC short8 make_short8_undef(typeN other) { | ||
| 5797 | return ::simd_make_short8_undef(other); | ||
| 5798 | } | ||
| 5799 | |||
| 5800 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 5801 | * signed (twos-complement) integers. */ | ||
| 5802 | static inline SIMD_CPPFUNC short16 make_short16(short8 lo, short8 hi) { | ||
| 5803 | return ::simd_make_short16(lo, hi); | ||
| 5804 | } | ||
| 5805 | |||
| 5806 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5807 | * 16-bit signed (twos-complement) integers. */ | ||
| 5808 | template <typename typeN> static SIMD_CPPFUNC short16 make_short16(typeN other) { | ||
| 5809 | return ::simd_make_short16(other); | ||
| 5810 | } | ||
| 5811 | |||
| 5812 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 5813 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5814 | * lanes are unspecified. */ | ||
| 5815 | template <typename typeN> static SIMD_CPPFUNC short16 make_short16_undef(typeN other) { | ||
| 5816 | return ::simd_make_short16_undef(other); | ||
| 5817 | } | ||
| 5818 | |||
| 5819 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5820 | * 16-bit signed (twos-complement) integers. */ | ||
| 5821 | static inline SIMD_CPPFUNC short32 make_short32(short16 lo, short16 hi) { | ||
| 5822 | return ::simd_make_short32(lo, hi); | ||
| 5823 | } | ||
| 5824 | |||
| 5825 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5826 | * two 16-bit signed (twos-complement) integers. */ | ||
| 5827 | template <typename typeN> static SIMD_CPPFUNC short32 make_short32(typeN other) { | ||
| 5828 | return ::simd_make_short32(other); | ||
| 5829 | } | ||
| 5830 | |||
| 5831 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 5832 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5833 | * lanes are unspecified. */ | ||
| 5834 | template <typename typeN> static SIMD_CPPFUNC short32 make_short32_undef(typeN other) { | ||
| 5835 | return ::simd_make_short32_undef(other); | ||
| 5836 | } | ||
| 5837 | |||
| 5838 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit | ||
| 5839 | * unsigned integers. */ | ||
| 5840 | static inline SIMD_CPPFUNC ushort2 make_ushort2(unsigned short x, unsigned short y) { | ||
| 5841 | return ::simd_make_ushort2(x, y); | ||
| 5842 | } | ||
| 5843 | |||
| 5844 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5845 | * 16-bit unsigned integers. */ | ||
| 5846 | template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2(typeN other) { | ||
| 5847 | return ::simd_make_ushort2(other); | ||
| 5848 | } | ||
| 5849 | |||
| 5850 | /*! @abstract Extends `other` to form a vector of two 16-bit unsigned | ||
| 5851 | * integers. The contents of the newly-created vector lanes are | ||
| 5852 | * unspecified. */ | ||
| 5853 | template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2_undef(typeN other) { | ||
| 5854 | return ::simd_make_ushort2_undef(other); | ||
| 5855 | } | ||
| 5856 | |||
| 5857 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 5858 | * unsigned integers. */ | ||
| 5859 | static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) { | ||
| 5860 | return ::simd_make_ushort3(x, y, z); | ||
| 5861 | } | ||
| 5862 | |||
| 5863 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 5864 | * unsigned integers. */ | ||
| 5865 | static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, ushort2 yz) { | ||
| 5866 | return ::simd_make_ushort3(x, yz); | ||
| 5867 | } | ||
| 5868 | |||
| 5869 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 5870 | * unsigned integers. */ | ||
| 5871 | static inline SIMD_CPPFUNC ushort3 make_ushort3(ushort2 xy, unsigned short z) { | ||
| 5872 | return ::simd_make_ushort3(xy, z); | ||
| 5873 | } | ||
| 5874 | |||
| 5875 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5876 | * 16-bit unsigned integers. */ | ||
| 5877 | template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3(typeN other) { | ||
| 5878 | return ::simd_make_ushort3(other); | ||
| 5879 | } | ||
| 5880 | |||
| 5881 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 5882 | * integers. The contents of the newly-created vector lanes are | ||
| 5883 | * unspecified. */ | ||
| 5884 | template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3_undef(typeN other) { | ||
| 5885 | return ::simd_make_ushort3_undef(other); | ||
| 5886 | } | ||
| 5887 | |||
| 5888 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5889 | * 16-bit unsigned integers. */ | ||
| 5890 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { | ||
| 5891 | return ::simd_make_ushort4(x, y, z, w); | ||
| 5892 | } | ||
| 5893 | |||
| 5894 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 5895 | * unsigned integers. */ | ||
| 5896 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, ushort2 zw) { | ||
| 5897 | return ::simd_make_ushort4(x, y, zw); | ||
| 5898 | } | ||
| 5899 | |||
| 5900 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 5901 | * unsigned integers. */ | ||
| 5902 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort2 yz, unsigned short w) { | ||
| 5903 | return ::simd_make_ushort4(x, yz, w); | ||
| 5904 | } | ||
| 5905 | |||
| 5906 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 5907 | * unsigned integers. */ | ||
| 5908 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, unsigned short z, unsigned short w) { | ||
| 5909 | return ::simd_make_ushort4(xy, z, w); | ||
| 5910 | } | ||
| 5911 | |||
| 5912 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 5913 | * unsigned integers. */ | ||
| 5914 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort3 yzw) { | ||
| 5915 | return ::simd_make_ushort4(x, yzw); | ||
| 5916 | } | ||
| 5917 | |||
| 5918 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 5919 | * unsigned integers. */ | ||
| 5920 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, ushort2 zw) { | ||
| 5921 | return ::simd_make_ushort4(xy, zw); | ||
| 5922 | } | ||
| 5923 | |||
| 5924 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 5925 | * unsigned integers. */ | ||
| 5926 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort3 xyz, unsigned short w) { | ||
| 5927 | return ::simd_make_ushort4(xyz, w); | ||
| 5928 | } | ||
| 5929 | |||
| 5930 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5931 | * 16-bit unsigned integers. */ | ||
| 5932 | template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4(typeN other) { | ||
| 5933 | return ::simd_make_ushort4(other); | ||
| 5934 | } | ||
| 5935 | |||
| 5936 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 5937 | * integers. The contents of the newly-created vector lanes are | ||
| 5938 | * unspecified. */ | ||
| 5939 | template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4_undef(typeN other) { | ||
| 5940 | return ::simd_make_ushort4_undef(other); | ||
| 5941 | } | ||
| 5942 | |||
| 5943 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 5944 | * unsigned integers. */ | ||
| 5945 | static inline SIMD_CPPFUNC ushort8 make_ushort8(ushort4 lo, ushort4 hi) { | ||
| 5946 | return ::simd_make_ushort8(lo, hi); | ||
| 5947 | } | ||
| 5948 | |||
| 5949 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5950 | * 16-bit unsigned integers. */ | ||
| 5951 | template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8(typeN other) { | ||
| 5952 | return ::simd_make_ushort8(other); | ||
| 5953 | } | ||
| 5954 | |||
| 5955 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 5956 | * integers. The contents of the newly-created vector lanes are | ||
| 5957 | * unspecified. */ | ||
| 5958 | template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8_undef(typeN other) { | ||
| 5959 | return ::simd_make_ushort8_undef(other); | ||
| 5960 | } | ||
| 5961 | |||
| 5962 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 5963 | * unsigned integers. */ | ||
| 5964 | static inline SIMD_CPPFUNC ushort16 make_ushort16(ushort8 lo, ushort8 hi) { | ||
| 5965 | return ::simd_make_ushort16(lo, hi); | ||
| 5966 | } | ||
| 5967 | |||
| 5968 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5969 | * 16-bit unsigned integers. */ | ||
| 5970 | template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16(typeN other) { | ||
| 5971 | return ::simd_make_ushort16(other); | ||
| 5972 | } | ||
| 5973 | |||
| 5974 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 5975 | * integers. The contents of the newly-created vector lanes are | ||
| 5976 | * unspecified. */ | ||
| 5977 | template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16_undef(typeN other) { | ||
| 5978 | return ::simd_make_ushort16_undef(other); | ||
| 5979 | } | ||
| 5980 | |||
| 5981 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5982 | * 16-bit unsigned integers. */ | ||
| 5983 | static inline SIMD_CPPFUNC ushort32 make_ushort32(ushort16 lo, ushort16 hi) { | ||
| 5984 | return ::simd_make_ushort32(lo, hi); | ||
| 5985 | } | ||
| 5986 | |||
| 5987 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5988 | * two 16-bit unsigned integers. */ | ||
| 5989 | template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32(typeN other) { | ||
| 5990 | return ::simd_make_ushort32(other); | ||
| 5991 | } | ||
| 5992 | |||
| 5993 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 5994 | * integers. The contents of the newly-created vector lanes are | ||
| 5995 | * unspecified. */ | ||
| 5996 | template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32_undef(typeN other) { | ||
| 5997 | return ::simd_make_ushort32_undef(other); | ||
| 5998 | } | ||
| 5999 | |||
| 6000 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed | ||
| 6001 | * (twos-complement) integers. */ | ||
| 6002 | static inline SIMD_CPPFUNC int2 make_int2(int x, int y) { | ||
| 6003 | return ::simd_make_int2(x, y); | ||
| 6004 | } | ||
| 6005 | |||
| 6006 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6007 | * 32-bit signed (twos-complement) integers. */ | ||
| 6008 | template <typename typeN> static SIMD_CPPFUNC int2 make_int2(typeN other) { | ||
| 6009 | return ::simd_make_int2(other); | ||
| 6010 | } | ||
| 6011 | |||
| 6012 | /*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- | ||
| 6013 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6014 | * unspecified. */ | ||
| 6015 | template <typename typeN> static SIMD_CPPFUNC int2 make_int2_undef(typeN other) { | ||
| 6016 | return ::simd_make_int2_undef(other); | ||
| 6017 | } | ||
| 6018 | |||
| 6019 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 6020 | * signed (twos-complement) integers. */ | ||
| 6021 | static inline SIMD_CPPFUNC int3 make_int3(int x, int y, int z) { | ||
| 6022 | return ::simd_make_int3(x, y, z); | ||
| 6023 | } | ||
| 6024 | |||
| 6025 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 6026 | * signed (twos-complement) integers. */ | ||
| 6027 | static inline SIMD_CPPFUNC int3 make_int3(int x, int2 yz) { | ||
| 6028 | return ::simd_make_int3(x, yz); | ||
| 6029 | } | ||
| 6030 | |||
| 6031 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6032 | * signed (twos-complement) integers. */ | ||
| 6033 | static inline SIMD_CPPFUNC int3 make_int3(int2 xy, int z) { | ||
| 6034 | return ::simd_make_int3(xy, z); | ||
| 6035 | } | ||
| 6036 | |||
| 6037 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6038 | * 32-bit signed (twos-complement) integers. */ | ||
| 6039 | template <typename typeN> static SIMD_CPPFUNC int3 make_int3(typeN other) { | ||
| 6040 | return ::simd_make_int3(other); | ||
| 6041 | } | ||
| 6042 | |||
| 6043 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 6044 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6045 | * unspecified. */ | ||
| 6046 | template <typename typeN> static SIMD_CPPFUNC int3 make_int3_undef(typeN other) { | ||
| 6047 | return ::simd_make_int3_undef(other); | ||
| 6048 | } | ||
| 6049 | |||
| 6050 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6051 | * 32-bit signed (twos-complement) integers. */ | ||
| 6052 | static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int z, int w) { | ||
| 6053 | return ::simd_make_int4(x, y, z, w); | ||
| 6054 | } | ||
| 6055 | |||
| 6056 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6057 | * signed (twos-complement) integers. */ | ||
| 6058 | static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int2 zw) { | ||
| 6059 | return ::simd_make_int4(x, y, zw); | ||
| 6060 | } | ||
| 6061 | |||
| 6062 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6063 | * signed (twos-complement) integers. */ | ||
| 6064 | static inline SIMD_CPPFUNC int4 make_int4(int x, int2 yz, int w) { | ||
| 6065 | return ::simd_make_int4(x, yz, w); | ||
| 6066 | } | ||
| 6067 | |||
| 6068 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6069 | * signed (twos-complement) integers. */ | ||
| 6070 | static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int z, int w) { | ||
| 6071 | return ::simd_make_int4(xy, z, w); | ||
| 6072 | } | ||
| 6073 | |||
| 6074 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6075 | * signed (twos-complement) integers. */ | ||
| 6076 | static inline SIMD_CPPFUNC int4 make_int4(int x, int3 yzw) { | ||
| 6077 | return ::simd_make_int4(x, yzw); | ||
| 6078 | } | ||
| 6079 | |||
| 6080 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6081 | * signed (twos-complement) integers. */ | ||
| 6082 | static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int2 zw) { | ||
| 6083 | return ::simd_make_int4(xy, zw); | ||
| 6084 | } | ||
| 6085 | |||
| 6086 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6087 | * signed (twos-complement) integers. */ | ||
| 6088 | static inline SIMD_CPPFUNC int4 make_int4(int3 xyz, int w) { | ||
| 6089 | return ::simd_make_int4(xyz, w); | ||
| 6090 | } | ||
| 6091 | |||
| 6092 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6093 | * 32-bit signed (twos-complement) integers. */ | ||
| 6094 | template <typename typeN> static SIMD_CPPFUNC int4 make_int4(typeN other) { | ||
| 6095 | return ::simd_make_int4(other); | ||
| 6096 | } | ||
| 6097 | |||
| 6098 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 6099 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6100 | * unspecified. */ | ||
| 6101 | template <typename typeN> static SIMD_CPPFUNC int4 make_int4_undef(typeN other) { | ||
| 6102 | return ::simd_make_int4_undef(other); | ||
| 6103 | } | ||
| 6104 | |||
| 6105 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6106 | * signed (twos-complement) integers. */ | ||
| 6107 | static inline SIMD_CPPFUNC int8 make_int8(int4 lo, int4 hi) { | ||
| 6108 | return ::simd_make_int8(lo, hi); | ||
| 6109 | } | ||
| 6110 | |||
| 6111 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6112 | * 32-bit signed (twos-complement) integers. */ | ||
| 6113 | template <typename typeN> static SIMD_CPPFUNC int8 make_int8(typeN other) { | ||
| 6114 | return ::simd_make_int8(other); | ||
| 6115 | } | ||
| 6116 | |||
| 6117 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 6118 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6119 | * unspecified. */ | ||
| 6120 | template <typename typeN> static SIMD_CPPFUNC int8 make_int8_undef(typeN other) { | ||
| 6121 | return ::simd_make_int8_undef(other); | ||
| 6122 | } | ||
| 6123 | |||
| 6124 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6125 | * signed (twos-complement) integers. */ | ||
| 6126 | static inline SIMD_CPPFUNC int16 make_int16(int8 lo, int8 hi) { | ||
| 6127 | return ::simd_make_int16(lo, hi); | ||
| 6128 | } | ||
| 6129 | |||
| 6130 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6131 | * 32-bit signed (twos-complement) integers. */ | ||
| 6132 | template <typename typeN> static SIMD_CPPFUNC int16 make_int16(typeN other) { | ||
| 6133 | return ::simd_make_int16(other); | ||
| 6134 | } | ||
| 6135 | |||
| 6136 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 6137 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 6138 | * lanes are unspecified. */ | ||
| 6139 | template <typename typeN> static SIMD_CPPFUNC int16 make_int16_undef(typeN other) { | ||
| 6140 | return ::simd_make_int16_undef(other); | ||
| 6141 | } | ||
| 6142 | |||
| 6143 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 6144 | * unsigned integers. */ | ||
| 6145 | static inline SIMD_CPPFUNC uint2 make_uint2(unsigned int x, unsigned int y) { | ||
| 6146 | return ::simd_make_uint2(x, y); | ||
| 6147 | } | ||
| 6148 | |||
| 6149 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6150 | * 32-bit unsigned integers. */ | ||
| 6151 | template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2(typeN other) { | ||
| 6152 | return ::simd_make_uint2(other); | ||
| 6153 | } | ||
| 6154 | |||
| 6155 | /*! @abstract Extends `other` to form a vector of two 32-bit unsigned | ||
| 6156 | * integers. The contents of the newly-created vector lanes are | ||
| 6157 | * unspecified. */ | ||
| 6158 | template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2_undef(typeN other) { | ||
| 6159 | return ::simd_make_uint2_undef(other); | ||
| 6160 | } | ||
| 6161 | |||
| 6162 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 6163 | * unsigned integers. */ | ||
| 6164 | static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z) { | ||
| 6165 | return ::simd_make_uint3(x, y, z); | ||
| 6166 | } | ||
| 6167 | |||
| 6168 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 6169 | * unsigned integers. */ | ||
| 6170 | static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, uint2 yz) { | ||
| 6171 | return ::simd_make_uint3(x, yz); | ||
| 6172 | } | ||
| 6173 | |||
| 6174 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6175 | * unsigned integers. */ | ||
| 6176 | static inline SIMD_CPPFUNC uint3 make_uint3(uint2 xy, unsigned int z) { | ||
| 6177 | return ::simd_make_uint3(xy, z); | ||
| 6178 | } | ||
| 6179 | |||
| 6180 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6181 | * 32-bit unsigned integers. */ | ||
| 6182 | template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3(typeN other) { | ||
| 6183 | return ::simd_make_uint3(other); | ||
| 6184 | } | ||
| 6185 | |||
| 6186 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 6187 | * integers. The contents of the newly-created vector lanes are | ||
| 6188 | * unspecified. */ | ||
| 6189 | template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3_undef(typeN other) { | ||
| 6190 | return ::simd_make_uint3_undef(other); | ||
| 6191 | } | ||
| 6192 | |||
| 6193 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6194 | * 32-bit unsigned integers. */ | ||
| 6195 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { | ||
| 6196 | return ::simd_make_uint4(x, y, z, w); | ||
| 6197 | } | ||
| 6198 | |||
| 6199 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6200 | * unsigned integers. */ | ||
| 6201 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, uint2 zw) { | ||
| 6202 | return ::simd_make_uint4(x, y, zw); | ||
| 6203 | } | ||
| 6204 | |||
| 6205 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6206 | * unsigned integers. */ | ||
| 6207 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint2 yz, unsigned int w) { | ||
| 6208 | return ::simd_make_uint4(x, yz, w); | ||
| 6209 | } | ||
| 6210 | |||
| 6211 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6212 | * unsigned integers. */ | ||
| 6213 | static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, unsigned int z, unsigned int w) { | ||
| 6214 | return ::simd_make_uint4(xy, z, w); | ||
| 6215 | } | ||
| 6216 | |||
| 6217 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6218 | * unsigned integers. */ | ||
| 6219 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint3 yzw) { | ||
| 6220 | return ::simd_make_uint4(x, yzw); | ||
| 6221 | } | ||
| 6222 | |||
| 6223 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6224 | * unsigned integers. */ | ||
| 6225 | static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, uint2 zw) { | ||
| 6226 | return ::simd_make_uint4(xy, zw); | ||
| 6227 | } | ||
| 6228 | |||
| 6229 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6230 | * unsigned integers. */ | ||
| 6231 | static inline SIMD_CPPFUNC uint4 make_uint4(uint3 xyz, unsigned int w) { | ||
| 6232 | return ::simd_make_uint4(xyz, w); | ||
| 6233 | } | ||
| 6234 | |||
| 6235 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6236 | * 32-bit unsigned integers. */ | ||
| 6237 | template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4(typeN other) { | ||
| 6238 | return ::simd_make_uint4(other); | ||
| 6239 | } | ||
| 6240 | |||
| 6241 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 6242 | * integers. The contents of the newly-created vector lanes are | ||
| 6243 | * unspecified. */ | ||
| 6244 | template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4_undef(typeN other) { | ||
| 6245 | return ::simd_make_uint4_undef(other); | ||
| 6246 | } | ||
| 6247 | |||
| 6248 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6249 | * unsigned integers. */ | ||
| 6250 | static inline SIMD_CPPFUNC uint8 make_uint8(uint4 lo, uint4 hi) { | ||
| 6251 | return ::simd_make_uint8(lo, hi); | ||
| 6252 | } | ||
| 6253 | |||
| 6254 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6255 | * 32-bit unsigned integers. */ | ||
| 6256 | template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8(typeN other) { | ||
| 6257 | return ::simd_make_uint8(other); | ||
| 6258 | } | ||
| 6259 | |||
| 6260 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 6261 | * integers. The contents of the newly-created vector lanes are | ||
| 6262 | * unspecified. */ | ||
| 6263 | template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8_undef(typeN other) { | ||
| 6264 | return ::simd_make_uint8_undef(other); | ||
| 6265 | } | ||
| 6266 | |||
| 6267 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6268 | * unsigned integers. */ | ||
| 6269 | static inline SIMD_CPPFUNC uint16 make_uint16(uint8 lo, uint8 hi) { | ||
| 6270 | return ::simd_make_uint16(lo, hi); | ||
| 6271 | } | ||
| 6272 | |||
| 6273 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6274 | * 32-bit unsigned integers. */ | ||
| 6275 | template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16(typeN other) { | ||
| 6276 | return ::simd_make_uint16(other); | ||
| 6277 | } | ||
| 6278 | |||
| 6279 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 6280 | * integers. The contents of the newly-created vector lanes are | ||
| 6281 | * unspecified. */ | ||
| 6282 | template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16_undef(typeN other) { | ||
| 6283 | return ::simd_make_uint16_undef(other); | ||
| 6284 | } | ||
| 6285 | |||
| 6286 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 6287 | * floating-point numbers. */ | ||
| 6288 | static inline SIMD_CPPFUNC float2 make_float2(float x, float y) { | ||
| 6289 | return ::simd_make_float2(x, y); | ||
| 6290 | } | ||
| 6291 | |||
| 6292 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6293 | * 32-bit floating-point numbers. */ | ||
| 6294 | template <typename typeN> static SIMD_CPPFUNC float2 make_float2(typeN other) { | ||
| 6295 | return ::simd_make_float2(other); | ||
| 6296 | } | ||
| 6297 | |||
| 6298 | /*! @abstract Extends `other` to form a vector of two 32-bit floating-point | ||
| 6299 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6300 | template <typename typeN> static SIMD_CPPFUNC float2 make_float2_undef(typeN other) { | ||
| 6301 | return ::simd_make_float2_undef(other); | ||
| 6302 | } | ||
| 6303 | |||
| 6304 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 6305 | * floating-point numbers. */ | ||
| 6306 | static inline SIMD_CPPFUNC float3 make_float3(float x, float y, float z) { | ||
| 6307 | return ::simd_make_float3(x, y, z); | ||
| 6308 | } | ||
| 6309 | |||
| 6310 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 6311 | * floating-point numbers. */ | ||
| 6312 | static inline SIMD_CPPFUNC float3 make_float3(float x, float2 yz) { | ||
| 6313 | return ::simd_make_float3(x, yz); | ||
| 6314 | } | ||
| 6315 | |||
| 6316 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6317 | * floating-point numbers. */ | ||
| 6318 | static inline SIMD_CPPFUNC float3 make_float3(float2 xy, float z) { | ||
| 6319 | return ::simd_make_float3(xy, z); | ||
| 6320 | } | ||
| 6321 | |||
| 6322 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6323 | * 32-bit floating-point numbers. */ | ||
| 6324 | template <typename typeN> static SIMD_CPPFUNC float3 make_float3(typeN other) { | ||
| 6325 | return ::simd_make_float3(other); | ||
| 6326 | } | ||
| 6327 | |||
| 6328 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 6329 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6330 | * unspecified. */ | ||
| 6331 | template <typename typeN> static SIMD_CPPFUNC float3 make_float3_undef(typeN other) { | ||
| 6332 | return ::simd_make_float3_undef(other); | ||
| 6333 | } | ||
| 6334 | |||
| 6335 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6336 | * 32-bit floating-point numbers. */ | ||
| 6337 | static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float z, float w) { | ||
| 6338 | return ::simd_make_float4(x, y, z, w); | ||
| 6339 | } | ||
| 6340 | |||
| 6341 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6342 | * floating-point numbers. */ | ||
| 6343 | static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float2 zw) { | ||
| 6344 | return ::simd_make_float4(x, y, zw); | ||
| 6345 | } | ||
| 6346 | |||
| 6347 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6348 | * floating-point numbers. */ | ||
| 6349 | static inline SIMD_CPPFUNC float4 make_float4(float x, float2 yz, float w) { | ||
| 6350 | return ::simd_make_float4(x, yz, w); | ||
| 6351 | } | ||
| 6352 | |||
| 6353 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6354 | * floating-point numbers. */ | ||
| 6355 | static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float z, float w) { | ||
| 6356 | return ::simd_make_float4(xy, z, w); | ||
| 6357 | } | ||
| 6358 | |||
| 6359 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6360 | * floating-point numbers. */ | ||
| 6361 | static inline SIMD_CPPFUNC float4 make_float4(float x, float3 yzw) { | ||
| 6362 | return ::simd_make_float4(x, yzw); | ||
| 6363 | } | ||
| 6364 | |||
| 6365 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6366 | * floating-point numbers. */ | ||
| 6367 | static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float2 zw) { | ||
| 6368 | return ::simd_make_float4(xy, zw); | ||
| 6369 | } | ||
| 6370 | |||
| 6371 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6372 | * floating-point numbers. */ | ||
| 6373 | static inline SIMD_CPPFUNC float4 make_float4(float3 xyz, float w) { | ||
| 6374 | return ::simd_make_float4(xyz, w); | ||
| 6375 | } | ||
| 6376 | |||
| 6377 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6378 | * 32-bit floating-point numbers. */ | ||
| 6379 | template <typename typeN> static SIMD_CPPFUNC float4 make_float4(typeN other) { | ||
| 6380 | return ::simd_make_float4(other); | ||
| 6381 | } | ||
| 6382 | |||
| 6383 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 6384 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6385 | template <typename typeN> static SIMD_CPPFUNC float4 make_float4_undef(typeN other) { | ||
| 6386 | return ::simd_make_float4_undef(other); | ||
| 6387 | } | ||
| 6388 | |||
| 6389 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6390 | * floating-point numbers. */ | ||
| 6391 | static inline SIMD_CPPFUNC float8 make_float8(float4 lo, float4 hi) { | ||
| 6392 | return ::simd_make_float8(lo, hi); | ||
| 6393 | } | ||
| 6394 | |||
| 6395 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6396 | * 32-bit floating-point numbers. */ | ||
| 6397 | template <typename typeN> static SIMD_CPPFUNC float8 make_float8(typeN other) { | ||
| 6398 | return ::simd_make_float8(other); | ||
| 6399 | } | ||
| 6400 | |||
| 6401 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 6402 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6403 | * unspecified. */ | ||
| 6404 | template <typename typeN> static SIMD_CPPFUNC float8 make_float8_undef(typeN other) { | ||
| 6405 | return ::simd_make_float8_undef(other); | ||
| 6406 | } | ||
| 6407 | |||
| 6408 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6409 | * floating-point numbers. */ | ||
| 6410 | static inline SIMD_CPPFUNC float16 make_float16(float8 lo, float8 hi) { | ||
| 6411 | return ::simd_make_float16(lo, hi); | ||
| 6412 | } | ||
| 6413 | |||
| 6414 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6415 | * 32-bit floating-point numbers. */ | ||
| 6416 | template <typename typeN> static SIMD_CPPFUNC float16 make_float16(typeN other) { | ||
| 6417 | return ::simd_make_float16(other); | ||
| 6418 | } | ||
| 6419 | |||
| 6420 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 6421 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6422 | * unspecified. */ | ||
| 6423 | template <typename typeN> static SIMD_CPPFUNC float16 make_float16_undef(typeN other) { | ||
| 6424 | return ::simd_make_float16_undef(other); | ||
| 6425 | } | ||
| 6426 | |||
| 6427 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed | ||
| 6428 | * (twos-complement) integers. */ | ||
| 6429 | static inline SIMD_CPPFUNC long2 make_long2(long1 x, long1 y) { | ||
| 6430 | return ::simd_make_long2(x, y); | ||
| 6431 | } | ||
| 6432 | |||
| 6433 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6434 | * 64-bit signed (twos-complement) integers. */ | ||
| 6435 | template <typename typeN> static SIMD_CPPFUNC long2 make_long2(typeN other) { | ||
| 6436 | return ::simd_make_long2(other); | ||
| 6437 | } | ||
| 6438 | |||
| 6439 | /*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- | ||
| 6440 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6441 | * unspecified. */ | ||
| 6442 | template <typename typeN> static SIMD_CPPFUNC long2 make_long2_undef(typeN other) { | ||
| 6443 | return ::simd_make_long2_undef(other); | ||
| 6444 | } | ||
| 6445 | |||
| 6446 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6447 | * signed (twos-complement) integers. */ | ||
| 6448 | static inline SIMD_CPPFUNC long3 make_long3(long1 x, long1 y, long1 z) { | ||
| 6449 | return ::simd_make_long3(x, y, z); | ||
| 6450 | } | ||
| 6451 | |||
| 6452 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6453 | * signed (twos-complement) integers. */ | ||
| 6454 | static inline SIMD_CPPFUNC long3 make_long3(long1 x, long2 yz) { | ||
| 6455 | return ::simd_make_long3(x, yz); | ||
| 6456 | } | ||
| 6457 | |||
| 6458 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6459 | * signed (twos-complement) integers. */ | ||
| 6460 | static inline SIMD_CPPFUNC long3 make_long3(long2 xy, long1 z) { | ||
| 6461 | return ::simd_make_long3(xy, z); | ||
| 6462 | } | ||
| 6463 | |||
| 6464 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6465 | * 64-bit signed (twos-complement) integers. */ | ||
| 6466 | template <typename typeN> static SIMD_CPPFUNC long3 make_long3(typeN other) { | ||
| 6467 | return ::simd_make_long3(other); | ||
| 6468 | } | ||
| 6469 | |||
| 6470 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 6471 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6472 | * unspecified. */ | ||
| 6473 | template <typename typeN> static SIMD_CPPFUNC long3 make_long3_undef(typeN other) { | ||
| 6474 | return ::simd_make_long3_undef(other); | ||
| 6475 | } | ||
| 6476 | |||
| 6477 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6478 | * 64-bit signed (twos-complement) integers. */ | ||
| 6479 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long1 z, long1 w) { | ||
| 6480 | return ::simd_make_long4(x, y, z, w); | ||
| 6481 | } | ||
| 6482 | |||
| 6483 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6484 | * signed (twos-complement) integers. */ | ||
| 6485 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long2 zw) { | ||
| 6486 | return ::simd_make_long4(x, y, zw); | ||
| 6487 | } | ||
| 6488 | |||
| 6489 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6490 | * signed (twos-complement) integers. */ | ||
| 6491 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long2 yz, long1 w) { | ||
| 6492 | return ::simd_make_long4(x, yz, w); | ||
| 6493 | } | ||
| 6494 | |||
| 6495 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6496 | * signed (twos-complement) integers. */ | ||
| 6497 | static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long1 z, long1 w) { | ||
| 6498 | return ::simd_make_long4(xy, z, w); | ||
| 6499 | } | ||
| 6500 | |||
| 6501 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6502 | * signed (twos-complement) integers. */ | ||
| 6503 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long3 yzw) { | ||
| 6504 | return ::simd_make_long4(x, yzw); | ||
| 6505 | } | ||
| 6506 | |||
| 6507 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6508 | * signed (twos-complement) integers. */ | ||
| 6509 | static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long2 zw) { | ||
| 6510 | return ::simd_make_long4(xy, zw); | ||
| 6511 | } | ||
| 6512 | |||
| 6513 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6514 | * signed (twos-complement) integers. */ | ||
| 6515 | static inline SIMD_CPPFUNC long4 make_long4(long3 xyz, long1 w) { | ||
| 6516 | return ::simd_make_long4(xyz, w); | ||
| 6517 | } | ||
| 6518 | |||
| 6519 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6520 | * 64-bit signed (twos-complement) integers. */ | ||
| 6521 | template <typename typeN> static SIMD_CPPFUNC long4 make_long4(typeN other) { | ||
| 6522 | return ::simd_make_long4(other); | ||
| 6523 | } | ||
| 6524 | |||
| 6525 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 6526 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6527 | * unspecified. */ | ||
| 6528 | template <typename typeN> static SIMD_CPPFUNC long4 make_long4_undef(typeN other) { | ||
| 6529 | return ::simd_make_long4_undef(other); | ||
| 6530 | } | ||
| 6531 | |||
| 6532 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6533 | * signed (twos-complement) integers. */ | ||
| 6534 | static inline SIMD_CPPFUNC long8 make_long8(long4 lo, long4 hi) { | ||
| 6535 | return ::simd_make_long8(lo, hi); | ||
| 6536 | } | ||
| 6537 | |||
| 6538 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6539 | * 64-bit signed (twos-complement) integers. */ | ||
| 6540 | template <typename typeN> static SIMD_CPPFUNC long8 make_long8(typeN other) { | ||
| 6541 | return ::simd_make_long8(other); | ||
| 6542 | } | ||
| 6543 | |||
| 6544 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 6545 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6546 | * unspecified. */ | ||
| 6547 | template <typename typeN> static SIMD_CPPFUNC long8 make_long8_undef(typeN other) { | ||
| 6548 | return ::simd_make_long8_undef(other); | ||
| 6549 | } | ||
| 6550 | |||
| 6551 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 6552 | * unsigned integers. */ | ||
| 6553 | static inline SIMD_CPPFUNC ulong2 make_ulong2(ulong1 x, ulong1 y) { | ||
| 6554 | return ::simd_make_ulong2(x, y); | ||
| 6555 | } | ||
| 6556 | |||
| 6557 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6558 | * 64-bit unsigned integers. */ | ||
| 6559 | template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2(typeN other) { | ||
| 6560 | return ::simd_make_ulong2(other); | ||
| 6561 | } | ||
| 6562 | |||
| 6563 | /*! @abstract Extends `other` to form a vector of two 64-bit unsigned | ||
| 6564 | * integers. The contents of the newly-created vector lanes are | ||
| 6565 | * unspecified. */ | ||
| 6566 | template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2_undef(typeN other) { | ||
| 6567 | return ::simd_make_ulong2_undef(other); | ||
| 6568 | } | ||
| 6569 | |||
| 6570 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6571 | * unsigned integers. */ | ||
| 6572 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong1 y, ulong1 z) { | ||
| 6573 | return ::simd_make_ulong3(x, y, z); | ||
| 6574 | } | ||
| 6575 | |||
| 6576 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6577 | * unsigned integers. */ | ||
| 6578 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong2 yz) { | ||
| 6579 | return ::simd_make_ulong3(x, yz); | ||
| 6580 | } | ||
| 6581 | |||
| 6582 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6583 | * unsigned integers. */ | ||
| 6584 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong2 xy, ulong1 z) { | ||
| 6585 | return ::simd_make_ulong3(xy, z); | ||
| 6586 | } | ||
| 6587 | |||
| 6588 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6589 | * 64-bit unsigned integers. */ | ||
| 6590 | template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3(typeN other) { | ||
| 6591 | return ::simd_make_ulong3(other); | ||
| 6592 | } | ||
| 6593 | |||
| 6594 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 6595 | * integers. The contents of the newly-created vector lanes are | ||
| 6596 | * unspecified. */ | ||
| 6597 | template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3_undef(typeN other) { | ||
| 6598 | return ::simd_make_ulong3_undef(other); | ||
| 6599 | } | ||
| 6600 | |||
| 6601 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6602 | * 64-bit unsigned integers. */ | ||
| 6603 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong1 z, ulong1 w) { | ||
| 6604 | return ::simd_make_ulong4(x, y, z, w); | ||
| 6605 | } | ||
| 6606 | |||
| 6607 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6608 | * unsigned integers. */ | ||
| 6609 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong2 zw) { | ||
| 6610 | return ::simd_make_ulong4(x, y, zw); | ||
| 6611 | } | ||
| 6612 | |||
| 6613 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6614 | * unsigned integers. */ | ||
| 6615 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong2 yz, ulong1 w) { | ||
| 6616 | return ::simd_make_ulong4(x, yz, w); | ||
| 6617 | } | ||
| 6618 | |||
| 6619 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6620 | * unsigned integers. */ | ||
| 6621 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong1 z, ulong1 w) { | ||
| 6622 | return ::simd_make_ulong4(xy, z, w); | ||
| 6623 | } | ||
| 6624 | |||
| 6625 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6626 | * unsigned integers. */ | ||
| 6627 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong3 yzw) { | ||
| 6628 | return ::simd_make_ulong4(x, yzw); | ||
| 6629 | } | ||
| 6630 | |||
| 6631 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6632 | * unsigned integers. */ | ||
| 6633 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong2 zw) { | ||
| 6634 | return ::simd_make_ulong4(xy, zw); | ||
| 6635 | } | ||
| 6636 | |||
| 6637 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6638 | * unsigned integers. */ | ||
| 6639 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong3 xyz, ulong1 w) { | ||
| 6640 | return ::simd_make_ulong4(xyz, w); | ||
| 6641 | } | ||
| 6642 | |||
| 6643 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6644 | * 64-bit unsigned integers. */ | ||
| 6645 | template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4(typeN other) { | ||
| 6646 | return ::simd_make_ulong4(other); | ||
| 6647 | } | ||
| 6648 | |||
| 6649 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 6650 | * integers. The contents of the newly-created vector lanes are | ||
| 6651 | * unspecified. */ | ||
| 6652 | template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4_undef(typeN other) { | ||
| 6653 | return ::simd_make_ulong4_undef(other); | ||
| 6654 | } | ||
| 6655 | |||
| 6656 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6657 | * unsigned integers. */ | ||
| 6658 | static inline SIMD_CPPFUNC ulong8 make_ulong8(ulong4 lo, ulong4 hi) { | ||
| 6659 | return ::simd_make_ulong8(lo, hi); | ||
| 6660 | } | ||
| 6661 | |||
| 6662 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6663 | * 64-bit unsigned integers. */ | ||
| 6664 | template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8(typeN other) { | ||
| 6665 | return ::simd_make_ulong8(other); | ||
| 6666 | } | ||
| 6667 | |||
| 6668 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 6669 | * integers. The contents of the newly-created vector lanes are | ||
| 6670 | * unspecified. */ | ||
| 6671 | template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8_undef(typeN other) { | ||
| 6672 | return ::simd_make_ulong8_undef(other); | ||
| 6673 | } | ||
| 6674 | |||
| 6675 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 6676 | * floating-point numbers. */ | ||
| 6677 | static inline SIMD_CPPFUNC double2 make_double2(double x, double y) { | ||
| 6678 | return ::simd_make_double2(x, y); | ||
| 6679 | } | ||
| 6680 | |||
| 6681 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6682 | * 64-bit floating-point numbers. */ | ||
| 6683 | template <typename typeN> static SIMD_CPPFUNC double2 make_double2(typeN other) { | ||
| 6684 | return ::simd_make_double2(other); | ||
| 6685 | } | ||
| 6686 | |||
| 6687 | /*! @abstract Extends `other` to form a vector of two 64-bit floating-point | ||
| 6688 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6689 | template <typename typeN> static SIMD_CPPFUNC double2 make_double2_undef(typeN other) { | ||
| 6690 | return ::simd_make_double2_undef(other); | ||
| 6691 | } | ||
| 6692 | |||
| 6693 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6694 | * floating-point numbers. */ | ||
| 6695 | static inline SIMD_CPPFUNC double3 make_double3(double x, double y, double z) { | ||
| 6696 | return ::simd_make_double3(x, y, z); | ||
| 6697 | } | ||
| 6698 | |||
| 6699 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6700 | * floating-point numbers. */ | ||
| 6701 | static inline SIMD_CPPFUNC double3 make_double3(double x, double2 yz) { | ||
| 6702 | return ::simd_make_double3(x, yz); | ||
| 6703 | } | ||
| 6704 | |||
| 6705 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6706 | * floating-point numbers. */ | ||
| 6707 | static inline SIMD_CPPFUNC double3 make_double3(double2 xy, double z) { | ||
| 6708 | return ::simd_make_double3(xy, z); | ||
| 6709 | } | ||
| 6710 | |||
| 6711 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6712 | * 64-bit floating-point numbers. */ | ||
| 6713 | template <typename typeN> static SIMD_CPPFUNC double3 make_double3(typeN other) { | ||
| 6714 | return ::simd_make_double3(other); | ||
| 6715 | } | ||
| 6716 | |||
| 6717 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 6718 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6719 | * unspecified. */ | ||
| 6720 | template <typename typeN> static SIMD_CPPFUNC double3 make_double3_undef(typeN other) { | ||
| 6721 | return ::simd_make_double3_undef(other); | ||
| 6722 | } | ||
| 6723 | |||
| 6724 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6725 | * 64-bit floating-point numbers. */ | ||
| 6726 | static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double z, double w) { | ||
| 6727 | return ::simd_make_double4(x, y, z, w); | ||
| 6728 | } | ||
| 6729 | |||
| 6730 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6731 | * floating-point numbers. */ | ||
| 6732 | static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double2 zw) { | ||
| 6733 | return ::simd_make_double4(x, y, zw); | ||
| 6734 | } | ||
| 6735 | |||
| 6736 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6737 | * floating-point numbers. */ | ||
| 6738 | static inline SIMD_CPPFUNC double4 make_double4(double x, double2 yz, double w) { | ||
| 6739 | return ::simd_make_double4(x, yz, w); | ||
| 6740 | } | ||
| 6741 | |||
| 6742 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6743 | * floating-point numbers. */ | ||
| 6744 | static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double z, double w) { | ||
| 6745 | return ::simd_make_double4(xy, z, w); | ||
| 6746 | } | ||
| 6747 | |||
| 6748 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6749 | * floating-point numbers. */ | ||
| 6750 | static inline SIMD_CPPFUNC double4 make_double4(double x, double3 yzw) { | ||
| 6751 | return ::simd_make_double4(x, yzw); | ||
| 6752 | } | ||
| 6753 | |||
| 6754 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6755 | * floating-point numbers. */ | ||
| 6756 | static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double2 zw) { | ||
| 6757 | return ::simd_make_double4(xy, zw); | ||
| 6758 | } | ||
| 6759 | |||
| 6760 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6761 | * floating-point numbers. */ | ||
| 6762 | static inline SIMD_CPPFUNC double4 make_double4(double3 xyz, double w) { | ||
| 6763 | return ::simd_make_double4(xyz, w); | ||
| 6764 | } | ||
| 6765 | |||
| 6766 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6767 | * 64-bit floating-point numbers. */ | ||
| 6768 | template <typename typeN> static SIMD_CPPFUNC double4 make_double4(typeN other) { | ||
| 6769 | return ::simd_make_double4(other); | ||
| 6770 | } | ||
| 6771 | |||
| 6772 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 6773 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6774 | template <typename typeN> static SIMD_CPPFUNC double4 make_double4_undef(typeN other) { | ||
| 6775 | return ::simd_make_double4_undef(other); | ||
| 6776 | } | ||
| 6777 | |||
| 6778 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6779 | * floating-point numbers. */ | ||
| 6780 | static inline SIMD_CPPFUNC double8 make_double8(double4 lo, double4 hi) { | ||
| 6781 | return ::simd_make_double8(lo, hi); | ||
| 6782 | } | ||
| 6783 | |||
| 6784 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6785 | * 64-bit floating-point numbers. */ | ||
| 6786 | template <typename typeN> static SIMD_CPPFUNC double8 make_double8(typeN other) { | ||
| 6787 | return ::simd_make_double8(other); | ||
| 6788 | } | ||
| 6789 | |||
| 6790 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 6791 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6792 | * unspecified. */ | ||
| 6793 | template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN other) { | ||
| 6794 | return ::simd_make_double8_undef(other); | ||
| 6795 | } | ||
| 6796 | |||
| 6797 | /*! @struct Vector | ||
| 6798 | * @abstract Templated Vector struct based on scalar type and number of | ||
| 6799 | * elements | ||
| 6800 | * @field count Number of elements in the vector | ||
| 6801 | * @field scalar_t The scalar type of each element | ||
| 6802 | * @field type The inferred simd::typeN type | ||
| 6803 | * @field packed_t The inferred simd::packed::typeN type | ||
| 6804 | * @field mask_t The return type of comparison operations */ | ||
| 6805 | template <typename ScalarType, size_t count> struct Vector { | ||
| 6806 | // static const size_t count | ||
| 6807 | // typedef scalar_t | ||
| 6808 | // typedef type | ||
| 6809 | // typedef packed_t | ||
| 6810 | // typedef mask_t | ||
| 6811 | }; | ||
| 6812 | /*! @abstract Helper type to access the simd type easily. */ | ||
| 6813 | template <typename ScalarType, size_t count> | ||
| 6814 | using Vector_t = typename Vector<ScalarType, count>::type; | ||
| 6815 | |||
| 6816 | /*! @abstract Look up the equivalent Vector struct according to the simd | ||
| 6817 | * type. */ | ||
| 6818 | template <typename typeN> struct get_traits | ||
| 6819 | { | ||
| 6820 | // using type = Vector<ScalarType, count>; | ||
| 6821 | }; | ||
| 6822 | /*! @abstract Helper type to access the Vector struct easily. | ||
| 6823 | * @discussion This is commonly used to query the type traits of a simd | ||
| 6824 | * type. | ||
| 6825 | * For example, simd::traits<simd::float4>::count is 4. */ | ||
| 6826 | template<typename typeN> | ||
| 6827 | using traits = typename get_traits<typeN>::type; | ||
| 6828 | |||
| 6829 | template<> struct Vector<char1, 1> { | ||
| 6830 | static const size_t count = 1; | ||
| 6831 | typedef char1 scalar_t; | ||
| 6832 | typedef char1 type; | ||
| 6833 | typedef char1 mask_t; | ||
| 6834 | }; | ||
| 6835 | |||
| 6836 | template <> struct get_traits<char1> | ||
| 6837 | { | ||
| 6838 | using type = Vector<char1, 1>; | ||
| 6839 | }; | ||
| 6840 | |||
| 6841 | template<> struct Vector<char1, 2> { | ||
| 6842 | static const size_t count = 2; | ||
| 6843 | typedef char1 scalar_t; | ||
| 6844 | typedef char2 type; | ||
| 6845 | typedef packed::char2 packed_t; | ||
| 6846 | typedef char2 mask_t; | ||
| 6847 | }; | ||
| 6848 | |||
| 6849 | template <> struct get_traits<char2> | ||
| 6850 | { | ||
| 6851 | using type = Vector<char1, 2>; | ||
| 6852 | }; | ||
| 6853 | |||
| 6854 | template<> struct Vector<char1, 3> { | ||
| 6855 | static const size_t count = 3; | ||
| 6856 | typedef char1 scalar_t; | ||
| 6857 | typedef char3 type; | ||
| 6858 | typedef char3 mask_t; | ||
| 6859 | }; | ||
| 6860 | |||
| 6861 | template <> struct get_traits<char3> | ||
| 6862 | { | ||
| 6863 | using type = Vector<char1, 3>; | ||
| 6864 | }; | ||
| 6865 | |||
| 6866 | template<> struct Vector<char1, 4> { | ||
| 6867 | static const size_t count = 4; | ||
| 6868 | typedef char1 scalar_t; | ||
| 6869 | typedef char4 type; | ||
| 6870 | typedef packed::char4 packed_t; | ||
| 6871 | typedef char4 mask_t; | ||
| 6872 | }; | ||
| 6873 | |||
| 6874 | template <> struct get_traits<char4> | ||
| 6875 | { | ||
| 6876 | using type = Vector<char1, 4>; | ||
| 6877 | }; | ||
| 6878 | |||
| 6879 | template<> struct Vector<char1, 8> { | ||
| 6880 | static const size_t count = 8; | ||
| 6881 | typedef char1 scalar_t; | ||
| 6882 | typedef char8 type; | ||
| 6883 | typedef packed::char8 packed_t; | ||
| 6884 | typedef char8 mask_t; | ||
| 6885 | }; | ||
| 6886 | |||
| 6887 | template <> struct get_traits<char8> | ||
| 6888 | { | ||
| 6889 | using type = Vector<char1, 8>; | ||
| 6890 | }; | ||
| 6891 | |||
| 6892 | template<> struct Vector<char1, 16> { | ||
| 6893 | static const size_t count = 16; | ||
| 6894 | typedef char1 scalar_t; | ||
| 6895 | typedef char16 type; | ||
| 6896 | typedef packed::char16 packed_t; | ||
| 6897 | typedef char16 mask_t; | ||
| 6898 | }; | ||
| 6899 | |||
| 6900 | template <> struct get_traits<char16> | ||
| 6901 | { | ||
| 6902 | using type = Vector<char1, 16>; | ||
| 6903 | }; | ||
| 6904 | |||
| 6905 | template<> struct Vector<char1, 32> { | ||
| 6906 | static const size_t count = 32; | ||
| 6907 | typedef char1 scalar_t; | ||
| 6908 | typedef char32 type; | ||
| 6909 | typedef packed::char32 packed_t; | ||
| 6910 | typedef char32 mask_t; | ||
| 6911 | }; | ||
| 6912 | |||
| 6913 | template <> struct get_traits<char32> | ||
| 6914 | { | ||
| 6915 | using type = Vector<char1, 32>; | ||
| 6916 | }; | ||
| 6917 | |||
| 6918 | template<> struct Vector<char1, 64> { | ||
| 6919 | static const size_t count = 64; | ||
| 6920 | typedef char1 scalar_t; | ||
| 6921 | typedef char64 type; | ||
| 6922 | typedef packed::char64 packed_t; | ||
| 6923 | typedef char64 mask_t; | ||
| 6924 | }; | ||
| 6925 | |||
| 6926 | template <> struct get_traits<char64> | ||
| 6927 | { | ||
| 6928 | using type = Vector<char1, 64>; | ||
| 6929 | }; | ||
| 6930 | |||
| 6931 | template<> struct Vector<uchar1, 1> { | ||
| 6932 | static const size_t count = 1; | ||
| 6933 | typedef uchar1 scalar_t; | ||
| 6934 | typedef uchar1 type; | ||
| 6935 | typedef char1 mask_t; | ||
| 6936 | }; | ||
| 6937 | |||
| 6938 | template <> struct get_traits<uchar1> | ||
| 6939 | { | ||
| 6940 | using type = Vector<uchar1, 1>; | ||
| 6941 | }; | ||
| 6942 | |||
| 6943 | template<> struct Vector<uchar1, 2> { | ||
| 6944 | static const size_t count = 2; | ||
| 6945 | typedef uchar1 scalar_t; | ||
| 6946 | typedef uchar2 type; | ||
| 6947 | typedef packed::uchar2 packed_t; | ||
| 6948 | typedef char2 mask_t; | ||
| 6949 | }; | ||
| 6950 | |||
| 6951 | template <> struct get_traits<uchar2> | ||
| 6952 | { | ||
| 6953 | using type = Vector<uchar1, 2>; | ||
| 6954 | }; | ||
| 6955 | |||
| 6956 | template<> struct Vector<uchar1, 3> { | ||
| 6957 | static const size_t count = 3; | ||
| 6958 | typedef uchar1 scalar_t; | ||
| 6959 | typedef uchar3 type; | ||
| 6960 | typedef char3 mask_t; | ||
| 6961 | }; | ||
| 6962 | |||
| 6963 | template <> struct get_traits<uchar3> | ||
| 6964 | { | ||
| 6965 | using type = Vector<uchar1, 3>; | ||
| 6966 | }; | ||
| 6967 | |||
| 6968 | template<> struct Vector<uchar1, 4> { | ||
| 6969 | static const size_t count = 4; | ||
| 6970 | typedef uchar1 scalar_t; | ||
| 6971 | typedef uchar4 type; | ||
| 6972 | typedef packed::uchar4 packed_t; | ||
| 6973 | typedef char4 mask_t; | ||
| 6974 | }; | ||
| 6975 | |||
| 6976 | template <> struct get_traits<uchar4> | ||
| 6977 | { | ||
| 6978 | using type = Vector<uchar1, 4>; | ||
| 6979 | }; | ||
| 6980 | |||
| 6981 | template<> struct Vector<uchar1, 8> { | ||
| 6982 | static const size_t count = 8; | ||
| 6983 | typedef uchar1 scalar_t; | ||
| 6984 | typedef uchar8 type; | ||
| 6985 | typedef packed::uchar8 packed_t; | ||
| 6986 | typedef char8 mask_t; | ||
| 6987 | }; | ||
| 6988 | |||
| 6989 | template <> struct get_traits<uchar8> | ||
| 6990 | { | ||
| 6991 | using type = Vector<uchar1, 8>; | ||
| 6992 | }; | ||
| 6993 | |||
| 6994 | template<> struct Vector<uchar1, 16> { | ||
| 6995 | static const size_t count = 16; | ||
| 6996 | typedef uchar1 scalar_t; | ||
| 6997 | typedef uchar16 type; | ||
| 6998 | typedef packed::uchar16 packed_t; | ||
| 6999 | typedef char16 mask_t; | ||
| 7000 | }; | ||
| 7001 | |||
| 7002 | template <> struct get_traits<uchar16> | ||
| 7003 | { | ||
| 7004 | using type = Vector<uchar1, 16>; | ||
| 7005 | }; | ||
| 7006 | |||
| 7007 | template<> struct Vector<uchar1, 32> { | ||
| 7008 | static const size_t count = 32; | ||
| 7009 | typedef uchar1 scalar_t; | ||
| 7010 | typedef uchar32 type; | ||
| 7011 | typedef packed::uchar32 packed_t; | ||
| 7012 | typedef char32 mask_t; | ||
| 7013 | }; | ||
| 7014 | |||
| 7015 | template <> struct get_traits<uchar32> | ||
| 7016 | { | ||
| 7017 | using type = Vector<uchar1, 32>; | ||
| 7018 | }; | ||
| 7019 | |||
| 7020 | template<> struct Vector<uchar1, 64> { | ||
| 7021 | static const size_t count = 64; | ||
| 7022 | typedef uchar1 scalar_t; | ||
| 7023 | typedef uchar64 type; | ||
| 7024 | typedef packed::uchar64 packed_t; | ||
| 7025 | typedef char64 mask_t; | ||
| 7026 | }; | ||
| 7027 | |||
| 7028 | template <> struct get_traits<uchar64> | ||
| 7029 | { | ||
| 7030 | using type = Vector<uchar1, 64>; | ||
| 7031 | }; | ||
| 7032 | |||
| 7033 | template<> struct Vector<short1, 1> { | ||
| 7034 | static const size_t count = 1; | ||
| 7035 | typedef short1 scalar_t; | ||
| 7036 | typedef short1 type; | ||
| 7037 | typedef short1 mask_t; | ||
| 7038 | }; | ||
| 7039 | |||
| 7040 | template <> struct get_traits<short1> | ||
| 7041 | { | ||
| 7042 | using type = Vector<short1, 1>; | ||
| 7043 | }; | ||
| 7044 | |||
| 7045 | template<> struct Vector<short1, 2> { | ||
| 7046 | static const size_t count = 2; | ||
| 7047 | typedef short1 scalar_t; | ||
| 7048 | typedef short2 type; | ||
| 7049 | typedef packed::short2 packed_t; | ||
| 7050 | typedef short2 mask_t; | ||
| 7051 | }; | ||
| 7052 | |||
| 7053 | template <> struct get_traits<short2> | ||
| 7054 | { | ||
| 7055 | using type = Vector<short1, 2>; | ||
| 7056 | }; | ||
| 7057 | |||
| 7058 | template<> struct Vector<short1, 3> { | ||
| 7059 | static const size_t count = 3; | ||
| 7060 | typedef short1 scalar_t; | ||
| 7061 | typedef short3 type; | ||
| 7062 | typedef short3 mask_t; | ||
| 7063 | }; | ||
| 7064 | |||
| 7065 | template <> struct get_traits<short3> | ||
| 7066 | { | ||
| 7067 | using type = Vector<short1, 3>; | ||
| 7068 | }; | ||
| 7069 | |||
| 7070 | template<> struct Vector<short1, 4> { | ||
| 7071 | static const size_t count = 4; | ||
| 7072 | typedef short1 scalar_t; | ||
| 7073 | typedef short4 type; | ||
| 7074 | typedef packed::short4 packed_t; | ||
| 7075 | typedef short4 mask_t; | ||
| 7076 | }; | ||
| 7077 | |||
| 7078 | template <> struct get_traits<short4> | ||
| 7079 | { | ||
| 7080 | using type = Vector<short1, 4>; | ||
| 7081 | }; | ||
| 7082 | |||
| 7083 | template<> struct Vector<short1, 8> { | ||
| 7084 | static const size_t count = 8; | ||
| 7085 | typedef short1 scalar_t; | ||
| 7086 | typedef short8 type; | ||
| 7087 | typedef packed::short8 packed_t; | ||
| 7088 | typedef short8 mask_t; | ||
| 7089 | }; | ||
| 7090 | |||
| 7091 | template <> struct get_traits<short8> | ||
| 7092 | { | ||
| 7093 | using type = Vector<short1, 8>; | ||
| 7094 | }; | ||
| 7095 | |||
| 7096 | template<> struct Vector<short1, 16> { | ||
| 7097 | static const size_t count = 16; | ||
| 7098 | typedef short1 scalar_t; | ||
| 7099 | typedef short16 type; | ||
| 7100 | typedef packed::short16 packed_t; | ||
| 7101 | typedef short16 mask_t; | ||
| 7102 | }; | ||
| 7103 | |||
| 7104 | template <> struct get_traits<short16> | ||
| 7105 | { | ||
| 7106 | using type = Vector<short1, 16>; | ||
| 7107 | }; | ||
| 7108 | |||
| 7109 | template<> struct Vector<short1, 32> { | ||
| 7110 | static const size_t count = 32; | ||
| 7111 | typedef short1 scalar_t; | ||
| 7112 | typedef short32 type; | ||
| 7113 | typedef packed::short32 packed_t; | ||
| 7114 | typedef short32 mask_t; | ||
| 7115 | }; | ||
| 7116 | |||
| 7117 | template <> struct get_traits<short32> | ||
| 7118 | { | ||
| 7119 | using type = Vector<short1, 32>; | ||
| 7120 | }; | ||
| 7121 | |||
| 7122 | template<> struct Vector<ushort1, 1> { | ||
| 7123 | static const size_t count = 1; | ||
| 7124 | typedef ushort1 scalar_t; | ||
| 7125 | typedef ushort1 type; | ||
| 7126 | typedef short1 mask_t; | ||
| 7127 | }; | ||
| 7128 | |||
| 7129 | template <> struct get_traits<ushort1> | ||
| 7130 | { | ||
| 7131 | using type = Vector<ushort1, 1>; | ||
| 7132 | }; | ||
| 7133 | |||
| 7134 | template<> struct Vector<ushort1, 2> { | ||
| 7135 | static const size_t count = 2; | ||
| 7136 | typedef ushort1 scalar_t; | ||
| 7137 | typedef ushort2 type; | ||
| 7138 | typedef packed::ushort2 packed_t; | ||
| 7139 | typedef short2 mask_t; | ||
| 7140 | }; | ||
| 7141 | |||
| 7142 | template <> struct get_traits<ushort2> | ||
| 7143 | { | ||
| 7144 | using type = Vector<ushort1, 2>; | ||
| 7145 | }; | ||
| 7146 | |||
| 7147 | template<> struct Vector<ushort1, 3> { | ||
| 7148 | static const size_t count = 3; | ||
| 7149 | typedef ushort1 scalar_t; | ||
| 7150 | typedef ushort3 type; | ||
| 7151 | typedef short3 mask_t; | ||
| 7152 | }; | ||
| 7153 | |||
| 7154 | template <> struct get_traits<ushort3> | ||
| 7155 | { | ||
| 7156 | using type = Vector<ushort1, 3>; | ||
| 7157 | }; | ||
| 7158 | |||
| 7159 | template<> struct Vector<ushort1, 4> { | ||
| 7160 | static const size_t count = 4; | ||
| 7161 | typedef ushort1 scalar_t; | ||
| 7162 | typedef ushort4 type; | ||
| 7163 | typedef packed::ushort4 packed_t; | ||
| 7164 | typedef short4 mask_t; | ||
| 7165 | }; | ||
| 7166 | |||
| 7167 | template <> struct get_traits<ushort4> | ||
| 7168 | { | ||
| 7169 | using type = Vector<ushort1, 4>; | ||
| 7170 | }; | ||
| 7171 | |||
| 7172 | template<> struct Vector<ushort1, 8> { | ||
| 7173 | static const size_t count = 8; | ||
| 7174 | typedef ushort1 scalar_t; | ||
| 7175 | typedef ushort8 type; | ||
| 7176 | typedef packed::ushort8 packed_t; | ||
| 7177 | typedef short8 mask_t; | ||
| 7178 | }; | ||
| 7179 | |||
| 7180 | template <> struct get_traits<ushort8> | ||
| 7181 | { | ||
| 7182 | using type = Vector<ushort1, 8>; | ||
| 7183 | }; | ||
| 7184 | |||
| 7185 | template<> struct Vector<ushort1, 16> { | ||
| 7186 | static const size_t count = 16; | ||
| 7187 | typedef ushort1 scalar_t; | ||
| 7188 | typedef ushort16 type; | ||
| 7189 | typedef packed::ushort16 packed_t; | ||
| 7190 | typedef short16 mask_t; | ||
| 7191 | }; | ||
| 7192 | |||
| 7193 | template <> struct get_traits<ushort16> | ||
| 7194 | { | ||
| 7195 | using type = Vector<ushort1, 16>; | ||
| 7196 | }; | ||
| 7197 | |||
| 7198 | template<> struct Vector<ushort1, 32> { | ||
| 7199 | static const size_t count = 32; | ||
| 7200 | typedef ushort1 scalar_t; | ||
| 7201 | typedef ushort32 type; | ||
| 7202 | typedef packed::ushort32 packed_t; | ||
| 7203 | typedef short32 mask_t; | ||
| 7204 | }; | ||
| 7205 | |||
| 7206 | template <> struct get_traits<ushort32> | ||
| 7207 | { | ||
| 7208 | using type = Vector<ushort1, 32>; | ||
| 7209 | }; | ||
| 7210 | |||
| 7211 | template<> struct Vector<int1, 1> { | ||
| 7212 | static const size_t count = 1; | ||
| 7213 | typedef int1 scalar_t; | ||
| 7214 | typedef int1 type; | ||
| 7215 | typedef int1 mask_t; | ||
| 7216 | }; | ||
| 7217 | |||
| 7218 | template <> struct get_traits<int1> | ||
| 7219 | { | ||
| 7220 | using type = Vector<int1, 1>; | ||
| 7221 | }; | ||
| 7222 | |||
| 7223 | template<> struct Vector<int1, 2> { | ||
| 7224 | static const size_t count = 2; | ||
| 7225 | typedef int1 scalar_t; | ||
| 7226 | typedef int2 type; | ||
| 7227 | typedef packed::int2 packed_t; | ||
| 7228 | typedef int2 mask_t; | ||
| 7229 | }; | ||
| 7230 | |||
| 7231 | template <> struct get_traits<int2> | ||
| 7232 | { | ||
| 7233 | using type = Vector<int1, 2>; | ||
| 7234 | }; | ||
| 7235 | |||
| 7236 | template<> struct Vector<int1, 3> { | ||
| 7237 | static const size_t count = 3; | ||
| 7238 | typedef int1 scalar_t; | ||
| 7239 | typedef int3 type; | ||
| 7240 | typedef int3 mask_t; | ||
| 7241 | }; | ||
| 7242 | |||
| 7243 | template <> struct get_traits<int3> | ||
| 7244 | { | ||
| 7245 | using type = Vector<int1, 3>; | ||
| 7246 | }; | ||
| 7247 | |||
| 7248 | template<> struct Vector<int1, 4> { | ||
| 7249 | static const size_t count = 4; | ||
| 7250 | typedef int1 scalar_t; | ||
| 7251 | typedef int4 type; | ||
| 7252 | typedef packed::int4 packed_t; | ||
| 7253 | typedef int4 mask_t; | ||
| 7254 | }; | ||
| 7255 | |||
| 7256 | template <> struct get_traits<int4> | ||
| 7257 | { | ||
| 7258 | using type = Vector<int1, 4>; | ||
| 7259 | }; | ||
| 7260 | |||
| 7261 | template<> struct Vector<int1, 8> { | ||
| 7262 | static const size_t count = 8; | ||
| 7263 | typedef int1 scalar_t; | ||
| 7264 | typedef int8 type; | ||
| 7265 | typedef packed::int8 packed_t; | ||
| 7266 | typedef int8 mask_t; | ||
| 7267 | }; | ||
| 7268 | |||
| 7269 | template <> struct get_traits<int8> | ||
| 7270 | { | ||
| 7271 | using type = Vector<int1, 8>; | ||
| 7272 | }; | ||
| 7273 | |||
| 7274 | template<> struct Vector<int1, 16> { | ||
| 7275 | static const size_t count = 16; | ||
| 7276 | typedef int1 scalar_t; | ||
| 7277 | typedef int16 type; | ||
| 7278 | typedef packed::int16 packed_t; | ||
| 7279 | typedef int16 mask_t; | ||
| 7280 | }; | ||
| 7281 | |||
| 7282 | template <> struct get_traits<int16> | ||
| 7283 | { | ||
| 7284 | using type = Vector<int1, 16>; | ||
| 7285 | }; | ||
| 7286 | |||
| 7287 | template<> struct Vector<uint1, 1> { | ||
| 7288 | static const size_t count = 1; | ||
| 7289 | typedef uint1 scalar_t; | ||
| 7290 | typedef uint1 type; | ||
| 7291 | typedef int1 mask_t; | ||
| 7292 | }; | ||
| 7293 | |||
| 7294 | template <> struct get_traits<uint1> | ||
| 7295 | { | ||
| 7296 | using type = Vector<uint1, 1>; | ||
| 7297 | }; | ||
| 7298 | |||
| 7299 | template<> struct Vector<uint1, 2> { | ||
| 7300 | static const size_t count = 2; | ||
| 7301 | typedef uint1 scalar_t; | ||
| 7302 | typedef uint2 type; | ||
| 7303 | typedef packed::uint2 packed_t; | ||
| 7304 | typedef int2 mask_t; | ||
| 7305 | }; | ||
| 7306 | |||
| 7307 | template <> struct get_traits<uint2> | ||
| 7308 | { | ||
| 7309 | using type = Vector<uint1, 2>; | ||
| 7310 | }; | ||
| 7311 | |||
| 7312 | template<> struct Vector<uint1, 3> { | ||
| 7313 | static const size_t count = 3; | ||
| 7314 | typedef uint1 scalar_t; | ||
| 7315 | typedef uint3 type; | ||
| 7316 | typedef int3 mask_t; | ||
| 7317 | }; | ||
| 7318 | |||
| 7319 | template <> struct get_traits<uint3> | ||
| 7320 | { | ||
| 7321 | using type = Vector<uint1, 3>; | ||
| 7322 | }; | ||
| 7323 | |||
| 7324 | template<> struct Vector<uint1, 4> { | ||
| 7325 | static const size_t count = 4; | ||
| 7326 | typedef uint1 scalar_t; | ||
| 7327 | typedef uint4 type; | ||
| 7328 | typedef packed::uint4 packed_t; | ||
| 7329 | typedef int4 mask_t; | ||
| 7330 | }; | ||
| 7331 | |||
| 7332 | template <> struct get_traits<uint4> | ||
| 7333 | { | ||
| 7334 | using type = Vector<uint1, 4>; | ||
| 7335 | }; | ||
| 7336 | |||
| 7337 | template<> struct Vector<uint1, 8> { | ||
| 7338 | static const size_t count = 8; | ||
| 7339 | typedef uint1 scalar_t; | ||
| 7340 | typedef uint8 type; | ||
| 7341 | typedef packed::uint8 packed_t; | ||
| 7342 | typedef int8 mask_t; | ||
| 7343 | }; | ||
| 7344 | |||
| 7345 | template <> struct get_traits<uint8> | ||
| 7346 | { | ||
| 7347 | using type = Vector<uint1, 8>; | ||
| 7348 | }; | ||
| 7349 | |||
| 7350 | template<> struct Vector<uint1, 16> { | ||
| 7351 | static const size_t count = 16; | ||
| 7352 | typedef uint1 scalar_t; | ||
| 7353 | typedef uint16 type; | ||
| 7354 | typedef packed::uint16 packed_t; | ||
| 7355 | typedef int16 mask_t; | ||
| 7356 | }; | ||
| 7357 | |||
| 7358 | template <> struct get_traits<uint16> | ||
| 7359 | { | ||
| 7360 | using type = Vector<uint1, 16>; | ||
| 7361 | }; | ||
| 7362 | |||
| 7363 | template<> struct Vector<float1, 1> { | ||
| 7364 | static const size_t count = 1; | ||
| 7365 | typedef float1 scalar_t; | ||
| 7366 | typedef float1 type; | ||
| 7367 | typedef int1 mask_t; | ||
| 7368 | }; | ||
| 7369 | |||
| 7370 | template <> struct get_traits<float1> | ||
| 7371 | { | ||
| 7372 | using type = Vector<float1, 1>; | ||
| 7373 | }; | ||
| 7374 | |||
| 7375 | template<> struct Vector<float1, 2> { | ||
| 7376 | static const size_t count = 2; | ||
| 7377 | typedef float1 scalar_t; | ||
| 7378 | typedef float2 type; | ||
| 7379 | typedef packed::float2 packed_t; | ||
| 7380 | typedef int2 mask_t; | ||
| 7381 | }; | ||
| 7382 | |||
| 7383 | template <> struct get_traits<float2> | ||
| 7384 | { | ||
| 7385 | using type = Vector<float1, 2>; | ||
| 7386 | }; | ||
| 7387 | |||
| 7388 | template<> struct Vector<float1, 3> { | ||
| 7389 | static const size_t count = 3; | ||
| 7390 | typedef float1 scalar_t; | ||
| 7391 | typedef float3 type; | ||
| 7392 | typedef int3 mask_t; | ||
| 7393 | }; | ||
| 7394 | |||
| 7395 | template <> struct get_traits<float3> | ||
| 7396 | { | ||
| 7397 | using type = Vector<float1, 3>; | ||
| 7398 | }; | ||
| 7399 | |||
| 7400 | template<> struct Vector<float1, 4> { | ||
| 7401 | static const size_t count = 4; | ||
| 7402 | typedef float1 scalar_t; | ||
| 7403 | typedef float4 type; | ||
| 7404 | typedef packed::float4 packed_t; | ||
| 7405 | typedef int4 mask_t; | ||
| 7406 | }; | ||
| 7407 | |||
| 7408 | template <> struct get_traits<float4> | ||
| 7409 | { | ||
| 7410 | using type = Vector<float1, 4>; | ||
| 7411 | }; | ||
| 7412 | |||
| 7413 | template<> struct Vector<float1, 8> { | ||
| 7414 | static const size_t count = 8; | ||
| 7415 | typedef float1 scalar_t; | ||
| 7416 | typedef float8 type; | ||
| 7417 | typedef packed::float8 packed_t; | ||
| 7418 | typedef int8 mask_t; | ||
| 7419 | }; | ||
| 7420 | |||
| 7421 | template <> struct get_traits<float8> | ||
| 7422 | { | ||
| 7423 | using type = Vector<float1, 8>; | ||
| 7424 | }; | ||
| 7425 | |||
| 7426 | template<> struct Vector<float1, 16> { | ||
| 7427 | static const size_t count = 16; | ||
| 7428 | typedef float1 scalar_t; | ||
| 7429 | typedef float16 type; | ||
| 7430 | typedef packed::float16 packed_t; | ||
| 7431 | typedef int16 mask_t; | ||
| 7432 | }; | ||
| 7433 | |||
| 7434 | template <> struct get_traits<float16> | ||
| 7435 | { | ||
| 7436 | using type = Vector<float1, 16>; | ||
| 7437 | }; | ||
| 7438 | |||
| 7439 | template<> struct Vector<long1, 1> { | ||
| 7440 | static const size_t count = 1; | ||
| 7441 | typedef long1 scalar_t; | ||
| 7442 | typedef long1 type; | ||
| 7443 | typedef long1 mask_t; | ||
| 7444 | }; | ||
| 7445 | |||
| 7446 | template <> struct get_traits<long1> | ||
| 7447 | { | ||
| 7448 | using type = Vector<long1, 1>; | ||
| 7449 | }; | ||
| 7450 | |||
| 7451 | template<> struct Vector<long1, 2> { | ||
| 7452 | static const size_t count = 2; | ||
| 7453 | typedef long1 scalar_t; | ||
| 7454 | typedef long2 type; | ||
| 7455 | typedef packed::long2 packed_t; | ||
| 7456 | typedef long2 mask_t; | ||
| 7457 | }; | ||
| 7458 | |||
| 7459 | template <> struct get_traits<long2> | ||
| 7460 | { | ||
| 7461 | using type = Vector<long1, 2>; | ||
| 7462 | }; | ||
| 7463 | |||
| 7464 | template<> struct Vector<long1, 3> { | ||
| 7465 | static const size_t count = 3; | ||
| 7466 | typedef long1 scalar_t; | ||
| 7467 | typedef long3 type; | ||
| 7468 | typedef long3 mask_t; | ||
| 7469 | }; | ||
| 7470 | |||
| 7471 | template <> struct get_traits<long3> | ||
| 7472 | { | ||
| 7473 | using type = Vector<long1, 3>; | ||
| 7474 | }; | ||
| 7475 | |||
| 7476 | template<> struct Vector<long1, 4> { | ||
| 7477 | static const size_t count = 4; | ||
| 7478 | typedef long1 scalar_t; | ||
| 7479 | typedef long4 type; | ||
| 7480 | typedef packed::long4 packed_t; | ||
| 7481 | typedef long4 mask_t; | ||
| 7482 | }; | ||
| 7483 | |||
| 7484 | template <> struct get_traits<long4> | ||
| 7485 | { | ||
| 7486 | using type = Vector<long1, 4>; | ||
| 7487 | }; | ||
| 7488 | |||
| 7489 | template<> struct Vector<long1, 8> { | ||
| 7490 | static const size_t count = 8; | ||
| 7491 | typedef long1 scalar_t; | ||
| 7492 | typedef long8 type; | ||
| 7493 | typedef packed::long8 packed_t; | ||
| 7494 | typedef long8 mask_t; | ||
| 7495 | }; | ||
| 7496 | |||
| 7497 | template <> struct get_traits<long8> | ||
| 7498 | { | ||
| 7499 | using type = Vector<long1, 8>; | ||
| 7500 | }; | ||
| 7501 | |||
| 7502 | template<> struct Vector<ulong1, 1> { | ||
| 7503 | static const size_t count = 1; | ||
| 7504 | typedef ulong1 scalar_t; | ||
| 7505 | typedef ulong1 type; | ||
| 7506 | typedef long1 mask_t; | ||
| 7507 | }; | ||
| 7508 | |||
| 7509 | template <> struct get_traits<ulong1> | ||
| 7510 | { | ||
| 7511 | using type = Vector<ulong1, 1>; | ||
| 7512 | }; | ||
| 7513 | |||
| 7514 | template<> struct Vector<ulong1, 2> { | ||
| 7515 | static const size_t count = 2; | ||
| 7516 | typedef ulong1 scalar_t; | ||
| 7517 | typedef ulong2 type; | ||
| 7518 | typedef packed::ulong2 packed_t; | ||
| 7519 | typedef long2 mask_t; | ||
| 7520 | }; | ||
| 7521 | |||
| 7522 | template <> struct get_traits<ulong2> | ||
| 7523 | { | ||
| 7524 | using type = Vector<ulong1, 2>; | ||
| 7525 | }; | ||
| 7526 | |||
| 7527 | template<> struct Vector<ulong1, 3> { | ||
| 7528 | static const size_t count = 3; | ||
| 7529 | typedef ulong1 scalar_t; | ||
| 7530 | typedef ulong3 type; | ||
| 7531 | typedef long3 mask_t; | ||
| 7532 | }; | ||
| 7533 | |||
| 7534 | template <> struct get_traits<ulong3> | ||
| 7535 | { | ||
| 7536 | using type = Vector<ulong1, 3>; | ||
| 7537 | }; | ||
| 7538 | |||
| 7539 | template<> struct Vector<ulong1, 4> { | ||
| 7540 | static const size_t count = 4; | ||
| 7541 | typedef ulong1 scalar_t; | ||
| 7542 | typedef ulong4 type; | ||
| 7543 | typedef packed::ulong4 packed_t; | ||
| 7544 | typedef long4 mask_t; | ||
| 7545 | }; | ||
| 7546 | |||
| 7547 | template <> struct get_traits<ulong4> | ||
| 7548 | { | ||
| 7549 | using type = Vector<ulong1, 4>; | ||
| 7550 | }; | ||
| 7551 | |||
| 7552 | template<> struct Vector<ulong1, 8> { | ||
| 7553 | static const size_t count = 8; | ||
| 7554 | typedef ulong1 scalar_t; | ||
| 7555 | typedef ulong8 type; | ||
| 7556 | typedef packed::ulong8 packed_t; | ||
| 7557 | typedef long8 mask_t; | ||
| 7558 | }; | ||
| 7559 | |||
| 7560 | template <> struct get_traits<ulong8> | ||
| 7561 | { | ||
| 7562 | using type = Vector<ulong1, 8>; | ||
| 7563 | }; | ||
| 7564 | |||
| 7565 | template<> struct Vector<double1, 1> { | ||
| 7566 | static const size_t count = 1; | ||
| 7567 | typedef double1 scalar_t; | ||
| 7568 | typedef double1 type; | ||
| 7569 | typedef long1 mask_t; | ||
| 7570 | }; | ||
| 7571 | |||
| 7572 | template <> struct get_traits<double1> | ||
| 7573 | { | ||
| 7574 | using type = Vector<double1, 1>; | ||
| 7575 | }; | ||
| 7576 | |||
| 7577 | template<> struct Vector<double1, 2> { | ||
| 7578 | static const size_t count = 2; | ||
| 7579 | typedef double1 scalar_t; | ||
| 7580 | typedef double2 type; | ||
| 7581 | typedef packed::double2 packed_t; | ||
| 7582 | typedef long2 mask_t; | ||
| 7583 | }; | ||
| 7584 | |||
| 7585 | template <> struct get_traits<double2> | ||
| 7586 | { | ||
| 7587 | using type = Vector<double1, 2>; | ||
| 7588 | }; | ||
| 7589 | |||
| 7590 | template<> struct Vector<double1, 3> { | ||
| 7591 | static const size_t count = 3; | ||
| 7592 | typedef double1 scalar_t; | ||
| 7593 | typedef double3 type; | ||
| 7594 | typedef long3 mask_t; | ||
| 7595 | }; | ||
| 7596 | |||
| 7597 | template <> struct get_traits<double3> | ||
| 7598 | { | ||
| 7599 | using type = Vector<double1, 3>; | ||
| 7600 | }; | ||
| 7601 | |||
| 7602 | template<> struct Vector<double1, 4> { | ||
| 7603 | static const size_t count = 4; | ||
| 7604 | typedef double1 scalar_t; | ||
| 7605 | typedef double4 type; | ||
| 7606 | typedef packed::double4 packed_t; | ||
| 7607 | typedef long4 mask_t; | ||
| 7608 | }; | ||
| 7609 | |||
| 7610 | template <> struct get_traits<double4> | ||
| 7611 | { | ||
| 7612 | using type = Vector<double1, 4>; | ||
| 7613 | }; | ||
| 7614 | |||
| 7615 | template<> struct Vector<double1, 8> { | ||
| 7616 | static const size_t count = 8; | ||
| 7617 | typedef double1 scalar_t; | ||
| 7618 | typedef double8 type; | ||
| 7619 | typedef packed::double8 packed_t; | ||
| 7620 | typedef long8 mask_t; | ||
| 7621 | }; | ||
| 7622 | |||
| 7623 | template <> struct get_traits<double8> | ||
| 7624 | { | ||
| 7625 | using type = Vector<double1, 8>; | ||
| 7626 | }; | ||
| 7627 | |||
| 7628 | #if __has_feature(cxx_constexpr) | ||
| 7629 | /*! @abstract Templated make function based on return type and argument | ||
| 7630 | * type. */ | ||
| 7631 | template<typename typeN, typename... Args> | ||
| 7632 | static constexpr typeN make(Args... args) | ||
| 7633 | { | ||
| 7634 | if constexpr (traits<typeN>::count == 1) | ||
| 7635 | { | ||
| 7636 | using FirstArgType = typename std::tuple_element<0, std::tuple<Args...>>::type; | ||
| 7637 | if constexpr (std::is_same<FirstArgType, typename traits<FirstArgType>::scalar_t>::value) | ||
| 7638 | return typeN(std::get<0>(std::make_tuple(args...))); | ||
| 7639 | else | ||
| 7640 | return typeN(std::get<0>(std::make_tuple(args...))[0]); | ||
| 7641 | } | ||
| 7642 | else if constexpr (std::is_same<typeN, char2>::value) | ||
| 7643 | return make_char2(args...); | ||
| 7644 | else if constexpr (std::is_same<typeN, char3>::value) | ||
| 7645 | return make_char3(args...); | ||
| 7646 | else if constexpr (std::is_same<typeN, char4>::value) | ||
| 7647 | return make_char4(args...); | ||
| 7648 | else if constexpr (std::is_same<typeN, char8>::value) | ||
| 7649 | return make_char8(args...); | ||
| 7650 | else if constexpr (std::is_same<typeN, char16>::value) | ||
| 7651 | return make_char16(args...); | ||
| 7652 | else if constexpr (std::is_same<typeN, char32>::value) | ||
| 7653 | return make_char32(args...); | ||
| 7654 | else if constexpr (std::is_same<typeN, char64>::value) | ||
| 7655 | return make_char64(args...); | ||
| 7656 | else if constexpr (std::is_same<typeN, uchar2>::value) | ||
| 7657 | return make_uchar2(args...); | ||
| 7658 | else if constexpr (std::is_same<typeN, uchar3>::value) | ||
| 7659 | return make_uchar3(args...); | ||
| 7660 | else if constexpr (std::is_same<typeN, uchar4>::value) | ||
| 7661 | return make_uchar4(args...); | ||
| 7662 | else if constexpr (std::is_same<typeN, uchar8>::value) | ||
| 7663 | return make_uchar8(args...); | ||
| 7664 | else if constexpr (std::is_same<typeN, uchar16>::value) | ||
| 7665 | return make_uchar16(args...); | ||
| 7666 | else if constexpr (std::is_same<typeN, uchar32>::value) | ||
| 7667 | return make_uchar32(args...); | ||
| 7668 | else if constexpr (std::is_same<typeN, uchar64>::value) | ||
| 7669 | return make_uchar64(args...); | ||
| 7670 | else if constexpr (std::is_same<typeN, short2>::value) | ||
| 7671 | return make_short2(args...); | ||
| 7672 | else if constexpr (std::is_same<typeN, short3>::value) | ||
| 7673 | return make_short3(args...); | ||
| 7674 | else if constexpr (std::is_same<typeN, short4>::value) | ||
| 7675 | return make_short4(args...); | ||
| 7676 | else if constexpr (std::is_same<typeN, short8>::value) | ||
| 7677 | return make_short8(args...); | ||
| 7678 | else if constexpr (std::is_same<typeN, short16>::value) | ||
| 7679 | return make_short16(args...); | ||
| 7680 | else if constexpr (std::is_same<typeN, short32>::value) | ||
| 7681 | return make_short32(args...); | ||
| 7682 | else if constexpr (std::is_same<typeN, ushort2>::value) | ||
| 7683 | return make_ushort2(args...); | ||
| 7684 | else if constexpr (std::is_same<typeN, ushort3>::value) | ||
| 7685 | return make_ushort3(args...); | ||
| 7686 | else if constexpr (std::is_same<typeN, ushort4>::value) | ||
| 7687 | return make_ushort4(args...); | ||
| 7688 | else if constexpr (std::is_same<typeN, ushort8>::value) | ||
| 7689 | return make_ushort8(args...); | ||
| 7690 | else if constexpr (std::is_same<typeN, ushort16>::value) | ||
| 7691 | return make_ushort16(args...); | ||
| 7692 | else if constexpr (std::is_same<typeN, ushort32>::value) | ||
| 7693 | return make_ushort32(args...); | ||
| 7694 | else if constexpr (std::is_same<typeN, int2>::value) | ||
| 7695 | return make_int2(args...); | ||
| 7696 | else if constexpr (std::is_same<typeN, int3>::value) | ||
| 7697 | return make_int3(args...); | ||
| 7698 | else if constexpr (std::is_same<typeN, int4>::value) | ||
| 7699 | return make_int4(args...); | ||
| 7700 | else if constexpr (std::is_same<typeN, int8>::value) | ||
| 7701 | return make_int8(args...); | ||
| 7702 | else if constexpr (std::is_same<typeN, int16>::value) | ||
| 7703 | return make_int16(args...); | ||
| 7704 | else if constexpr (std::is_same<typeN, uint2>::value) | ||
| 7705 | return make_uint2(args...); | ||
| 7706 | else if constexpr (std::is_same<typeN, uint3>::value) | ||
| 7707 | return make_uint3(args...); | ||
| 7708 | else if constexpr (std::is_same<typeN, uint4>::value) | ||
| 7709 | return make_uint4(args...); | ||
| 7710 | else if constexpr (std::is_same<typeN, uint8>::value) | ||
| 7711 | return make_uint8(args...); | ||
| 7712 | else if constexpr (std::is_same<typeN, uint16>::value) | ||
| 7713 | return make_uint16(args...); | ||
| 7714 | else if constexpr (std::is_same<typeN, float2>::value) | ||
| 7715 | return make_float2(args...); | ||
| 7716 | else if constexpr (std::is_same<typeN, float3>::value) | ||
| 7717 | return make_float3(args...); | ||
| 7718 | else if constexpr (std::is_same<typeN, float4>::value) | ||
| 7719 | return make_float4(args...); | ||
| 7720 | else if constexpr (std::is_same<typeN, float8>::value) | ||
| 7721 | return make_float8(args...); | ||
| 7722 | else if constexpr (std::is_same<typeN, float16>::value) | ||
| 7723 | return make_float16(args...); | ||
| 7724 | else if constexpr (std::is_same<typeN, long2>::value) | ||
| 7725 | return make_long2(args...); | ||
| 7726 | else if constexpr (std::is_same<typeN, long3>::value) | ||
| 7727 | return make_long3(args...); | ||
| 7728 | else if constexpr (std::is_same<typeN, long4>::value) | ||
| 7729 | return make_long4(args...); | ||
| 7730 | else if constexpr (std::is_same<typeN, long8>::value) | ||
| 7731 | return make_long8(args...); | ||
| 7732 | else if constexpr (std::is_same<typeN, ulong2>::value) | ||
| 7733 | return make_ulong2(args...); | ||
| 7734 | else if constexpr (std::is_same<typeN, ulong3>::value) | ||
| 7735 | return make_ulong3(args...); | ||
| 7736 | else if constexpr (std::is_same<typeN, ulong4>::value) | ||
| 7737 | return make_ulong4(args...); | ||
| 7738 | else if constexpr (std::is_same<typeN, ulong8>::value) | ||
| 7739 | return make_ulong8(args...); | ||
| 7740 | else if constexpr (std::is_same<typeN, double2>::value) | ||
| 7741 | return make_double2(args...); | ||
| 7742 | else if constexpr (std::is_same<typeN, double3>::value) | ||
| 7743 | return make_double3(args...); | ||
| 7744 | else if constexpr (std::is_same<typeN, double4>::value) | ||
| 7745 | return make_double4(args...); | ||
| 7746 | else if constexpr (std::is_same<typeN, double8>::value) | ||
| 7747 | return make_double8(args...); | ||
| 7748 | } | ||
| 7749 | |||
| 7750 | /*! @abstract Templated make_undef function based on return type and | ||
| 7751 | * argument type. */ | ||
| 7752 | template<typename typeN, typename... Args> | ||
| 7753 | static constexpr typeN make_undef(Args... args) | ||
| 7754 | { | ||
| 7755 | if constexpr (traits<typeN>::count == 1) | ||
| 7756 | { | ||
| 7757 | using FirstArgType = typename std::tuple_element<0, std::tuple<Args...>>::type; | ||
| 7758 | if constexpr (std::is_same<FirstArgType, typename traits<FirstArgType>::scalar_t>::value) | ||
| 7759 | return typeN(std::get<0>(std::make_tuple(args...))); | ||
| 7760 | else | ||
| 7761 | return typeN(std::get<0>(std::make_tuple(args...))[0]); | ||
| 7762 | } | ||
| 7763 | else if constexpr (std::is_same<typeN, char2>::value) | ||
| 7764 | return make_char2_undef(args...); | ||
| 7765 | else if constexpr (std::is_same<typeN, char3>::value) | ||
| 7766 | return make_char3_undef(args...); | ||
| 7767 | else if constexpr (std::is_same<typeN, char4>::value) | ||
| 7768 | return make_char4_undef(args...); | ||
| 7769 | else if constexpr (std::is_same<typeN, char8>::value) | ||
| 7770 | return make_char8_undef(args...); | ||
| 7771 | else if constexpr (std::is_same<typeN, char16>::value) | ||
| 7772 | return make_char16_undef(args...); | ||
| 7773 | else if constexpr (std::is_same<typeN, char32>::value) | ||
| 7774 | return make_char32_undef(args...); | ||
| 7775 | else if constexpr (std::is_same<typeN, char64>::value) | ||
| 7776 | return make_char64_undef(args...); | ||
| 7777 | else if constexpr (std::is_same<typeN, uchar2>::value) | ||
| 7778 | return make_uchar2_undef(args...); | ||
| 7779 | else if constexpr (std::is_same<typeN, uchar3>::value) | ||
| 7780 | return make_uchar3_undef(args...); | ||
| 7781 | else if constexpr (std::is_same<typeN, uchar4>::value) | ||
| 7782 | return make_uchar4_undef(args...); | ||
| 7783 | else if constexpr (std::is_same<typeN, uchar8>::value) | ||
| 7784 | return make_uchar8_undef(args...); | ||
| 7785 | else if constexpr (std::is_same<typeN, uchar16>::value) | ||
| 7786 | return make_uchar16_undef(args...); | ||
| 7787 | else if constexpr (std::is_same<typeN, uchar32>::value) | ||
| 7788 | return make_uchar32_undef(args...); | ||
| 7789 | else if constexpr (std::is_same<typeN, uchar64>::value) | ||
| 7790 | return make_uchar64_undef(args...); | ||
| 7791 | else if constexpr (std::is_same<typeN, short2>::value) | ||
| 7792 | return make_short2_undef(args...); | ||
| 7793 | else if constexpr (std::is_same<typeN, short3>::value) | ||
| 7794 | return make_short3_undef(args...); | ||
| 7795 | else if constexpr (std::is_same<typeN, short4>::value) | ||
| 7796 | return make_short4_undef(args...); | ||
| 7797 | else if constexpr (std::is_same<typeN, short8>::value) | ||
| 7798 | return make_short8_undef(args...); | ||
| 7799 | else if constexpr (std::is_same<typeN, short16>::value) | ||
| 7800 | return make_short16_undef(args...); | ||
| 7801 | else if constexpr (std::is_same<typeN, short32>::value) | ||
| 7802 | return make_short32_undef(args...); | ||
| 7803 | else if constexpr (std::is_same<typeN, ushort2>::value) | ||
| 7804 | return make_ushort2_undef(args...); | ||
| 7805 | else if constexpr (std::is_same<typeN, ushort3>::value) | ||
| 7806 | return make_ushort3_undef(args...); | ||
| 7807 | else if constexpr (std::is_same<typeN, ushort4>::value) | ||
| 7808 | return make_ushort4_undef(args...); | ||
| 7809 | else if constexpr (std::is_same<typeN, ushort8>::value) | ||
| 7810 | return make_ushort8_undef(args...); | ||
| 7811 | else if constexpr (std::is_same<typeN, ushort16>::value) | ||
| 7812 | return make_ushort16_undef(args...); | ||
| 7813 | else if constexpr (std::is_same<typeN, ushort32>::value) | ||
| 7814 | return make_ushort32_undef(args...); | ||
| 7815 | else if constexpr (std::is_same<typeN, int2>::value) | ||
| 7816 | return make_int2_undef(args...); | ||
| 7817 | else if constexpr (std::is_same<typeN, int3>::value) | ||
| 7818 | return make_int3_undef(args...); | ||
| 7819 | else if constexpr (std::is_same<typeN, int4>::value) | ||
| 7820 | return make_int4_undef(args...); | ||
| 7821 | else if constexpr (std::is_same<typeN, int8>::value) | ||
| 7822 | return make_int8_undef(args...); | ||
| 7823 | else if constexpr (std::is_same<typeN, int16>::value) | ||
| 7824 | return make_int16_undef(args...); | ||
| 7825 | else if constexpr (std::is_same<typeN, uint2>::value) | ||
| 7826 | return make_uint2_undef(args...); | ||
| 7827 | else if constexpr (std::is_same<typeN, uint3>::value) | ||
| 7828 | return make_uint3_undef(args...); | ||
| 7829 | else if constexpr (std::is_same<typeN, uint4>::value) | ||
| 7830 | return make_uint4_undef(args...); | ||
| 7831 | else if constexpr (std::is_same<typeN, uint8>::value) | ||
| 7832 | return make_uint8_undef(args...); | ||
| 7833 | else if constexpr (std::is_same<typeN, uint16>::value) | ||
| 7834 | return make_uint16_undef(args...); | ||
| 7835 | else if constexpr (std::is_same<typeN, float2>::value) | ||
| 7836 | return make_float2_undef(args...); | ||
| 7837 | else if constexpr (std::is_same<typeN, float3>::value) | ||
| 7838 | return make_float3_undef(args...); | ||
| 7839 | else if constexpr (std::is_same<typeN, float4>::value) | ||
| 7840 | return make_float4_undef(args...); | ||
| 7841 | else if constexpr (std::is_same<typeN, float8>::value) | ||
| 7842 | return make_float8_undef(args...); | ||
| 7843 | else if constexpr (std::is_same<typeN, float16>::value) | ||
| 7844 | return make_float16_undef(args...); | ||
| 7845 | else if constexpr (std::is_same<typeN, long2>::value) | ||
| 7846 | return make_long2_undef(args...); | ||
| 7847 | else if constexpr (std::is_same<typeN, long3>::value) | ||
| 7848 | return make_long3_undef(args...); | ||
| 7849 | else if constexpr (std::is_same<typeN, long4>::value) | ||
| 7850 | return make_long4_undef(args...); | ||
| 7851 | else if constexpr (std::is_same<typeN, long8>::value) | ||
| 7852 | return make_long8_undef(args...); | ||
| 7853 | else if constexpr (std::is_same<typeN, ulong2>::value) | ||
| 7854 | return make_ulong2_undef(args...); | ||
| 7855 | else if constexpr (std::is_same<typeN, ulong3>::value) | ||
| 7856 | return make_ulong3_undef(args...); | ||
| 7857 | else if constexpr (std::is_same<typeN, ulong4>::value) | ||
| 7858 | return make_ulong4_undef(args...); | ||
| 7859 | else if constexpr (std::is_same<typeN, ulong8>::value) | ||
| 7860 | return make_ulong8_undef(args...); | ||
| 7861 | else if constexpr (std::is_same<typeN, double2>::value) | ||
| 7862 | return make_double2_undef(args...); | ||
| 7863 | else if constexpr (std::is_same<typeN, double3>::value) | ||
| 7864 | return make_double3_undef(args...); | ||
| 7865 | else if constexpr (std::is_same<typeN, double4>::value) | ||
| 7866 | return make_double4_undef(args...); | ||
| 7867 | else if constexpr (std::is_same<typeN, double8>::value) | ||
| 7868 | return make_double8_undef(args...); | ||
| 7869 | } | ||
| 7870 | #endif /* __has_feature(cxx_constexpr) */ | ||
| 7871 | } /* namespace simd */ | ||
| 7872 | #endif /* __cplusplus */ | ||
| 7873 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 7874 | #endif /* SIMD_VECTOR_CONSTRUCTORS */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/spawn.h created+185| ... | @@ -0,0 +1,185 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2006, 2010 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | |||
| 25 | #ifndef _SPAWN_H_ | ||
| 26 | #define _SPAWN_H_ | ||
| 27 | |||
| 28 | /* | ||
| 29 | * [SPN] Support for _POSIX_SPAWN | ||
| 30 | */ | ||
| 31 | |||
| 32 | #include <sys/cdefs.h> | ||
| 33 | #include <_types.h> | ||
| 34 | #include <sys/spawn.h> /* shared types */ | ||
| 35 | |||
| 36 | #include <Availability.h> | ||
| 37 | |||
| 38 | /* | ||
| 39 | * [SPN] Inclusion of the <spawn.h> header may make visible symbols defined | ||
| 40 | * in the <sched.h>, <signal.h>, and <sys/types.h> headers. | ||
| 41 | */ | ||
| 42 | #include <sys/_types/_pid_t.h> | ||
| 43 | #include <sys/_types/_sigset_t.h> | ||
| 44 | #include <sys/_types/_mode_t.h> | ||
| 45 | |||
| 46 | /* | ||
| 47 | * Opaque types for use with posix_spawn() family functions. Internals are | ||
| 48 | * not defined, and should not be accessed directly. Types are defined as | ||
| 49 | * mandated by POSIX. | ||
| 50 | */ | ||
| 51 | typedef void *posix_spawnattr_t; | ||
| 52 | typedef void *posix_spawn_file_actions_t; | ||
| 53 | |||
| 54 | __BEGIN_DECLS | ||
| 55 | /* | ||
| 56 | * gcc under c99 mode won't compile "[ __restrict]" by itself. As a workaround, | ||
| 57 | * a dummy argument name is added. | ||
| 58 | */ | ||
| 59 | |||
| 60 | int posix_spawn(pid_t * __restrict, const char * __restrict, | ||
| 61 | const posix_spawn_file_actions_t *, | ||
| 62 | const posix_spawnattr_t * __restrict, | ||
| 63 | char *const __argv[__restrict], | ||
| 64 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 65 | |||
| 66 | int posix_spawnp(pid_t * __restrict, const char * __restrict, | ||
| 67 | const posix_spawn_file_actions_t *, | ||
| 68 | const posix_spawnattr_t * __restrict, | ||
| 69 | char *const __argv[__restrict], | ||
| 70 | char *const __envp[__restrict]) __API_AVAILABLE(macos(10.5), ios(2.0)); | ||
| 71 | |||
| 72 | int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 73 | |||
| 74 | int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, | ||
| 75 | int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 76 | |||
| 77 | int posix_spawn_file_actions_addopen( | ||
| 78 | 	posix_spawn_file_actions_t * __restrict, int, | ||
| 79 | 	const char * __restrict, int, mode_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 80 | |||
| 81 | int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 82 | |||
| 83 | int posix_spawn_file_actions_init(posix_spawn_file_actions_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 84 | |||
| 85 | int posix_spawnattr_destroy(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 86 | |||
| 87 | int posix_spawnattr_getsigdefault(const posix_spawnattr_t * __restrict, | ||
| 88 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 89 | |||
| 90 | int posix_spawnattr_getflags(const posix_spawnattr_t * __restrict, | ||
| 91 | short * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 92 | |||
| 93 | int posix_spawnattr_getpgroup(const posix_spawnattr_t * __restrict, | ||
| 94 | pid_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 95 | |||
| 96 | int posix_spawnattr_getsigmask(const posix_spawnattr_t * __restrict, | ||
| 97 | sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 98 | |||
| 99 | int posix_spawnattr_init(posix_spawnattr_t *) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 100 | |||
| 101 | int posix_spawnattr_setsigdefault(posix_spawnattr_t * __restrict, | ||
| 102 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 103 | |||
| 104 | int posix_spawnattr_setflags(posix_spawnattr_t *, short) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 105 | |||
| 106 | int posix_spawnattr_setpgroup(posix_spawnattr_t *, pid_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 107 | |||
| 108 | int posix_spawnattr_setsigmask(posix_spawnattr_t * __restrict, | ||
| 109 | const sigset_t * __restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 110 | |||
| 111 | #if 0 /* _POSIX_PRIORITY_SCHEDULING [PS] : not supported */ | ||
| 112 | int posix_spawnattr_setschedparam(posix_spawnattr_t * __restrict, | ||
| 113 | const struct sched_param * __restrict); | ||
| 114 | int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int); | ||
| 115 | int posix_spawnattr_getschedparam(const posix_spawnattr_t * __restrict, | ||
| 116 | struct sched_param * __restrict); | ||
| 117 | int posix_spawnattr_getschedpolicy(const posix_spawnattr_t * __restrict, | ||
| 118 | int * __restrict); | ||
| 119 | #endif /* 0 */ | ||
| 120 | |||
| 121 | __END_DECLS | ||
| 122 | |||
| 123 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 124 | /* | ||
| 125 | * Darwin-specific extensions below | ||
| 126 | */ | ||
| 127 | #include <mach/exception_types.h> | ||
| 128 | #include <mach/machine.h> | ||
| 129 | #include <mach/port.h> | ||
| 130 | |||
| 131 | #include <sys/_types/_size_t.h> | ||
| 132 | |||
| 133 | __BEGIN_DECLS | ||
| 134 | |||
| 135 | int posix_spawnattr_getbinpref_np(const posix_spawnattr_t * __restrict, | ||
| 136 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 137 | |||
| 138 | int posix_spawnattr_getarchpref_np(const posix_spawnattr_t * __restrict, | ||
| 139 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 140 | |||
| 141 | int posix_spawnattr_setauditsessionport_np(posix_spawnattr_t * __restrict, | ||
| 142 | mach_port_t) __API_AVAILABLE(macos(10.6), ios(3.2)); | ||
| 143 | |||
| 144 | int posix_spawnattr_setbinpref_np(posix_spawnattr_t * __restrict, | ||
| 145 | size_t, cpu_type_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 146 | |||
| 147 | int posix_spawnattr_setarchpref_np(posix_spawnattr_t * __restrict, | ||
| 148 | size_t, cpu_type_t *__restrict, cpu_subtype_t *__restrict, size_t *__restrict) __API_AVAILABLE(macos(11.0), ios(14.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 149 | |||
| 150 | int posix_spawnattr_setexceptionports_np(posix_spawnattr_t * __restrict, | ||
| 151 | exception_mask_t, mach_port_t, | ||
| 152 | exception_behavior_t, thread_state_flavor_t) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 153 | |||
| 154 | int posix_spawnattr_setspecialport_np(posix_spawnattr_t * __restrict, | ||
| 155 | mach_port_t, int) __API_AVAILABLE(macos(10.5), ios(2.0)) __API_UNAVAILABLE(watchos, tvos); | ||
| 156 | |||
| 157 | int posix_spawnattr_setnosmt_np(const posix_spawnattr_t * __restrict attr) __API_AVAILABLE(macos(11.0)); | ||
| 158 | |||
| 159 | /* | ||
| 160 | * Set CPU Security Mitigation on the spawned process | ||
| 161 | * This attribute affects all threads and is inherited on fork and exec | ||
| 162 | */ | ||
| 163 | int posix_spawnattr_set_csm_np(const posix_spawnattr_t * __restrict attr, uint32_t flags) __API_AVAILABLE(macos(11.0)); | ||
| 164 | /* | ||
| 165 | * flags for CPU Security Mitigation attribute | ||
| 166 | * POSIX_SPAWN_NP_CSM_ALL should be used in most cases, | ||
| 167 | * the individual flags are provided only for performance evaluation etc | ||
| 168 | */ | ||
| 169 | #define POSIX_SPAWN_NP_CSM_ALL 0x0001 | ||
| 170 | #define POSIX_SPAWN_NP_CSM_NOSMT 0x0002 | ||
| 171 | #define POSIX_SPAWN_NP_CSM_TECS 0x0004 | ||
| 172 | |||
| 173 | int posix_spawn_file_actions_addinherit_np(posix_spawn_file_actions_t *, | ||
| 174 | int) __API_AVAILABLE(macos(10.7), ios(4.3)) __API_UNAVAILABLE(watchos, tvos); | ||
| 175 | |||
| 176 | int posix_spawn_file_actions_addchdir_np(posix_spawn_file_actions_t *, | ||
| 177 | const char * __restrict) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 178 | |||
| 179 | int posix_spawn_file_actions_addfchdir_np(posix_spawn_file_actions_t *, | ||
| 180 | int) __API_AVAILABLE(macos(10.15)) __API_UNAVAILABLE(ios, tvos, watchos); | ||
| 181 | |||
| 182 | __END_DECLS | ||
| 183 | |||
| 184 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 185 | #endif /* _SPAWN_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/stdio.h deleted-402| ... | @@ -1,402 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2005, 2007, 2009, 2010 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * This code is derived from software contributed to Berkeley by | ||
| 28 | * Chris Torek. | ||
| 29 | * | ||
| 30 | * Redistribution and use in source and binary forms, with or without | ||
| 31 | * modification, are permitted provided that the following conditions | ||
| 32 | * are met: | ||
| 33 | * 1. Redistributions of source code must retain the above copyright | ||
| 34 | * notice, this list of conditions and the following disclaimer. | ||
| 35 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 36 | * notice, this list of conditions and the following disclaimer in the | ||
| 37 | * documentation and/or other materials provided with the distribution. | ||
| 38 | * 3. All advertising materials mentioning features or use of this software | ||
| 39 | * must display the following acknowledgement: | ||
| 40 | *	This product includes software developed by the University of | ||
| 41 | *	California, Berkeley and its contributors. | ||
| 42 | * 4. Neither the name of the University nor the names of its contributors | ||
| 43 | * may be used to endorse or promote products derived from this software | ||
| 44 | * without specific prior written permission. | ||
| 45 | * | ||
| 46 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 47 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 48 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 49 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 50 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 51 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 52 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 53 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 54 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 55 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 56 | * SUCH DAMAGE. | ||
| 57 | * | ||
| 58 | *	@(#)stdio.h	8.5 (Berkeley) 4/29/95 | ||
| 59 | */ | ||
| 60 | |||
| 61 | #ifndef	_STDIO_H_ | ||
| 62 | #define	_STDIO_H_ | ||
| 63 | |||
| 64 | #include <_stdio.h> | ||
| 65 | |||
| 66 | __BEGIN_DECLS | ||
| 67 | extern FILE *__stdinp; | ||
| 68 | extern FILE *__stdoutp; | ||
| 69 | extern FILE *__stderrp; | ||
| 70 | __END_DECLS | ||
| 71 | |||
| 72 | #define	__SLBF	0x0001		/* line buffered */ | ||
| 73 | #define	__SNBF	0x0002		/* unbuffered */ | ||
| 74 | #define	__SRD	0x0004		/* OK to read */ | ||
| 75 | #define	__SWR	0x0008		/* OK to write */ | ||
| 76 | 	/* RD and WR are never simultaneously asserted */ | ||
| 77 | #define	__SRW	0x0010		/* open for reading & writing */ | ||
| 78 | #define	__SEOF	0x0020		/* found EOF */ | ||
| 79 | #define	__SERR	0x0040		/* found error */ | ||
| 80 | #define	__SMBF	0x0080		/* _buf is from malloc */ | ||
| 81 | #define	__SAPP	0x0100		/* fdopen()ed in append mode */ | ||
| 82 | #define	__SSTR	0x0200		/* this is an sprintf/snprintf string */ | ||
| 83 | #define	__SOPT	0x0400		/* do fseek() optimisation */ | ||
| 84 | #define	__SNPT	0x0800		/* do not do fseek() optimisation */ | ||
| 85 | #define	__SOFF	0x1000		/* set iff _offset is in fact correct */ | ||
| 86 | #define	__SMOD	0x2000		/* true => fgetln modified _p text */ | ||
| 87 | #define __SALC 0x4000		/* allocate string space dynamically */ | ||
| 88 | #define __SIGN 0x8000		/* ignore this file in _fwalk */ | ||
| 89 | |||
| 90 | /* | ||
| 91 | * The following three definitions are for ANSI C, which took them | ||
| 92 | * from System V, which brilliantly took internal interface macros and | ||
| 93 | * made them official arguments to setvbuf(), without renaming them. | ||
| 94 | * Hence, these ugly _IOxxx names are *supposed* to appear in user code. | ||
| 95 | * | ||
| 96 | * Although numbered as their counterparts above, the implementation | ||
| 97 | * does not rely on this. | ||
| 98 | */ | ||
| 99 | #define	_IOFBF	0		/* setvbuf should set fully buffered */ | ||
| 100 | #define	_IOLBF	1		/* setvbuf should set line buffered */ | ||
| 101 | #define	_IONBF	2		/* setvbuf should set unbuffered */ | ||
| 102 | |||
| 103 | #define	BUFSIZ	1024		/* size of buffer used by setbuf */ | ||
| 104 | #define	EOF	(-1) | ||
| 105 | |||
| 106 | 				/* must be == _POSIX_STREAM_MAX <limits.h> */ | ||
| 107 | #define	FOPEN_MAX	20	/* must be <= OPEN_MAX <sys/syslimits.h> */ | ||
| 108 | #define	FILENAME_MAX	1024	/* must be <= PATH_MAX <sys/syslimits.h> */ | ||
| 109 | |||
| 110 | /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ | ||
| 111 | #ifndef _ANSI_SOURCE | ||
| 112 | #define	P_tmpdir	"/var/tmp/" | ||
| 113 | #endif | ||
| 114 | #define	L_tmpnam	1024	/* XXX must be == PATH_MAX */ | ||
| 115 | #define	TMP_MAX		308915776 | ||
| 116 | |||
| 117 | #ifndef SEEK_SET | ||
| 118 | #define	SEEK_SET	0	/* set file offset to offset */ | ||
| 119 | #endif | ||
| 120 | #ifndef SEEK_CUR | ||
| 121 | #define	SEEK_CUR	1	/* set file offset to current plus offset */ | ||
| 122 | #endif | ||
| 123 | #ifndef SEEK_END | ||
| 124 | #define	SEEK_END	2	/* set file offset to EOF plus offset */ | ||
| 125 | #endif | ||
| 126 | |||
| 127 | #define	stdin	__stdinp | ||
| 128 | #define	stdout	__stdoutp | ||
| 129 | #define	stderr	__stderrp | ||
| 130 | |||
| 131 | #ifdef _DARWIN_UNLIMITED_STREAMS | ||
| 132 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 | ||
| 133 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -miphoneos-version-min version does not support it." | ||
| 134 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 | ||
| 135 | #error "_DARWIN_UNLIMITED_STREAMS specified, but -mmacosx-version-min version does not support it." | ||
| 136 | #endif | ||
| 137 | #endif | ||
| 138 | |||
| 139 | /* ANSI-C */ | ||
| 140 | |||
| 141 | __BEGIN_DECLS | ||
| 142 | void	 clearerr(FILE *); | ||
| 143 | int	 fclose(FILE *); | ||
| 144 | int	 feof(FILE *); | ||
| 145 | int	 ferror(FILE *); | ||
| 146 | int	 fflush(FILE *); | ||
| 147 | int	 fgetc(FILE *); | ||
| 148 | int	 fgetpos(FILE * __restrict, fpos_t *); | ||
| 149 | char	*fgets(char * __restrict, int, FILE *); | ||
| 150 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 151 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fopen)); | ||
| 152 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 153 | FILE	*fopen(const char * __restrict __filename, const char * __restrict __mode) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fopen)); | ||
| 154 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 155 | int	 fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 156 | int	 fputc(int, FILE *); | ||
| 157 | int	 fputs(const char * __restrict, FILE * __restrict) __DARWIN_ALIAS(fputs); | ||
| 158 | size_t	 fread(void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream); | ||
| 159 | FILE	*freopen(const char * __restrict, const char * __restrict, | ||
| 160 | FILE * __restrict) __DARWIN_ALIAS(freopen); | ||
| 161 | int	 fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 162 | int	 fseek(FILE *, long, int); | ||
| 163 | int	 fsetpos(FILE *, const fpos_t *); | ||
| 164 | long	 ftell(FILE *); | ||
| 165 | size_t	 fwrite(const void * __restrict __ptr, size_t __size, size_t __nitems, FILE * __restrict __stream) __DARWIN_ALIAS(fwrite); | ||
| 166 | int	 getc(FILE *); | ||
| 167 | int	 getchar(void); | ||
| 168 | char	*gets(char *); | ||
| 169 | void	 perror(const char *) __cold; | ||
| 170 | int	 printf(const char * __restrict, ...) __printflike(1, 2); | ||
| 171 | int	 putc(int, FILE *); | ||
| 172 | int	 putchar(int); | ||
| 173 | int	 puts(const char *); | ||
| 174 | int	 remove(const char *); | ||
| 175 | int	 rename (const char *__old, const char *__new); | ||
| 176 | void	 rewind(FILE *); | ||
| 177 | int	 scanf(const char * __restrict, ...) __scanflike(1, 2); | ||
| 178 | void	 setbuf(FILE * __restrict, char * __restrict); | ||
| 179 | int	 setvbuf(FILE * __restrict, char * __restrict, int, size_t); | ||
| 180 | int	 sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3) __swift_unavailable("Use snprintf instead."); | ||
| 181 | int	 sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3); | ||
| 182 | FILE	*tmpfile(void); | ||
| 183 | |||
| 184 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 185 | #if !defined(_POSIX_C_SOURCE) | ||
| 186 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tmpnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 187 | #endif | ||
| 188 | char	*tmpnam(char *); | ||
| 189 | int	 ungetc(int, FILE *); | ||
| 190 | int	 vfprintf(FILE * __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 191 | int	 vprintf(const char * __restrict, va_list) __printflike(1, 0); | ||
| 192 | int	 vsprintf(char * __restrict, const char * __restrict, va_list) __printflike(2, 0) __swift_unavailable("Use vsnprintf instead."); | ||
| 193 | __END_DECLS | ||
| 194 | |||
| 195 | |||
| 196 | |||
| 197 | /* Additional functionality provided by: | ||
| 198 | * POSIX.1-1988 | ||
| 199 | */ | ||
| 200 | |||
| 201 | #if __DARWIN_C_LEVEL >= 198808L | ||
| 202 | #define	L_ctermid	1024	/* size for ctermid(); PATH_MAX */ | ||
| 203 | |||
| 204 | __BEGIN_DECLS | ||
| 205 | #include <_ctermid.h> | ||
| 206 | |||
| 207 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 208 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(fdopen)); | ||
| 209 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 210 | FILE	*fdopen(int, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(fdopen)); | ||
| 211 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 212 | int	 fileno(FILE *); | ||
| 213 | __END_DECLS | ||
| 214 | #endif /* __DARWIN_C_LEVEL >= 198808L */ | ||
| 215 | |||
| 216 | |||
| 217 | /* Additional functionality provided by: | ||
| 218 | * POSIX.2-1992 C Language Binding Option | ||
| 219 | */ | ||
| 220 | |||
| 221 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 222 | __BEGIN_DECLS | ||
| 223 | int	 pclose(FILE *) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 224 | #if defined(_DARWIN_UNLIMITED_STREAMS) || defined(_DARWIN_C_SOURCE) | ||
| 225 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(popen)) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 226 | #else /* !_DARWIN_UNLIMITED_STREAMS && !_DARWIN_C_SOURCE */ | ||
| 227 | FILE	*popen(const char *, const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(popen)) __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)"); | ||
| 228 | #endif /* (DARWIN_UNLIMITED_STREAMS || _DARWIN_C_SOURCE) */ | ||
| 229 | __END_DECLS | ||
| 230 | #endif /* __DARWIN_C_LEVEL >= 199209L */ | ||
| 231 | |||
| 232 | /* Additional functionality provided by: | ||
| 233 | * POSIX.1c-1995, | ||
| 234 | * POSIX.1i-1995, | ||
| 235 | * and the omnibus ISO/IEC 9945-1: 1996 | ||
| 236 | */ | ||
| 237 | |||
| 238 | #if __DARWIN_C_LEVEL >= 199506L | ||
| 239 | |||
| 240 | /* Functions internal to the implementation. */ | ||
| 241 | __BEGIN_DECLS | ||
| 242 | int	__srget(FILE *); | ||
| 243 | int	__svfscanf(FILE *, const char *, va_list) __scanflike(2, 0); | ||
| 244 | int	__swbuf(int, FILE *); | ||
| 245 | __END_DECLS | ||
| 246 | |||
| 247 | /* | ||
| 248 | * The __sfoo macros are here so that we can | ||
| 249 | * define function versions in the C library. | ||
| 250 | */ | ||
| 251 | #define	__sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++)) | ||
| 252 | #if defined(__GNUC__) && defined(__STDC__) | ||
| 253 | __header_always_inline int __sputc(int _c, FILE *_p) { | ||
| 254 | 	if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n')) | ||
| 255 | 		return (*_p->_p++ = _c); | ||
| 256 | 	else | ||
| 257 | 		return (__swbuf(_c, _p)); | ||
| 258 | } | ||
| 259 | #else | ||
| 260 | /* | ||
| 261 | * This has been tuned to generate reasonable code on the vax using pcc. | ||
| 262 | */ | ||
| 263 | #define	__sputc(c, p) \ | ||
| 264 | 	(--(p)->_w < 0 ? \ | ||
| 265 | 		(p)->_w >= (p)->_lbfsize ? \ | ||
| 266 | 			(*(p)->_p = (c)), *(p)->_p != '\n' ? \ | ||
| 267 | 				(int)*(p)->_p++ : \ | ||
| 268 | 				__swbuf('\n', p) : \ | ||
| 269 | 			__swbuf((int)(c), p) : \ | ||
| 270 | 		(*(p)->_p = (c), (int)*(p)->_p++)) | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #define	__sfeof(p)	(((p)->_flags & __SEOF) != 0) | ||
| 274 | #define	__sferror(p)	(((p)->_flags & __SERR) != 0) | ||
| 275 | #define	__sclearerr(p)	((void)((p)->_flags &= ~(__SERR|__SEOF))) | ||
| 276 | #define	__sfileno(p)	((p)->_file) | ||
| 277 | |||
| 278 | __BEGIN_DECLS | ||
| 279 | void	 flockfile(FILE *); | ||
| 280 | int	 ftrylockfile(FILE *); | ||
| 281 | void	 funlockfile(FILE *); | ||
| 282 | int	 getc_unlocked(FILE *); | ||
| 283 | int	 getchar_unlocked(void); | ||
| 284 | int	 putc_unlocked(int, FILE *); | ||
| 285 | int	 putchar_unlocked(int); | ||
| 286 | |||
| 287 | /* Removed in Issue 6 */ | ||
| 288 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 289 | int	 getw(FILE *); | ||
| 290 | int	 putw(int, FILE *); | ||
| 291 | #endif | ||
| 292 | |||
| 293 | __swift_unavailable("Use mkstemp(3) instead.") | ||
| 294 | #if !defined(_POSIX_C_SOURCE) | ||
| 295 | __deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.") | ||
| 296 | #endif | ||
| 297 | char	*tempnam(const char *__dir, const char *__prefix) __DARWIN_ALIAS(tempnam); | ||
| 298 | __END_DECLS | ||
| 299 | |||
| 300 | #ifndef lint | ||
| 301 | #define	getc_unlocked(fp)	__sgetc(fp) | ||
| 302 | #define putc_unlocked(x, fp)	__sputc(x, fp) | ||
| 303 | #endif /* lint */ | ||
| 304 | |||
| 305 | #define	getchar_unlocked()	getc_unlocked(stdin) | ||
| 306 | #define	putchar_unlocked(x)	putc_unlocked(x, stdout) | ||
| 307 | #endif /* __DARWIN_C_LEVEL >= 199506L */ | ||
| 308 | |||
| 309 | |||
| 310 | |||
| 311 | /* Additional functionality provided by: | ||
| 312 | * POSIX.1-2001 | ||
| 313 | * ISO C99 | ||
| 314 | */ | ||
| 315 | |||
| 316 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 317 | #include <sys/_types/_off_t.h> | ||
| 318 | |||
| 319 | __BEGIN_DECLS | ||
| 320 | int	 fseeko(FILE * __stream, off_t __offset, int __whence); | ||
| 321 | off_t	 ftello(FILE * __stream); | ||
| 322 | __END_DECLS | ||
| 323 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 324 | |||
| 325 | #if __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) | ||
| 326 | __BEGIN_DECLS | ||
| 327 | int	 snprintf(char * __restrict __str, size_t __size, const char * __restrict __format, ...) __printflike(3, 4); | ||
| 328 | int	 vfscanf(FILE * __restrict __stream, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 329 | int	 vscanf(const char * __restrict __format, va_list) __scanflike(1, 0); | ||
| 330 | int	 vsnprintf(char * __restrict __str, size_t __size, const char * __restrict __format, va_list) __printflike(3, 0); | ||
| 331 | int	 vsscanf(const char * __restrict __str, const char * __restrict __format, va_list) __scanflike(2, 0); | ||
| 332 | __END_DECLS | ||
| 333 | #endif /* __DARWIN_C_LEVEL >= 200112L || defined(_C99_SOURCE) || defined(__cplusplus) */ | ||
| 334 | |||
| 335 | |||
| 336 | |||
| 337 | /* Additional functionality provided by: | ||
| 338 | * POSIX.1-2008 | ||
| 339 | */ | ||
| 340 | |||
| 341 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 342 | #include <sys/_types/_ssize_t.h> | ||
| 343 | |||
| 344 | __BEGIN_DECLS | ||
| 345 | int	dprintf(int, const char * __restrict, ...) __printflike(2, 3) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 346 | int	vdprintf(int, const char * __restrict, va_list) __printflike(2, 0) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 347 | ssize_t getdelim(char ** __restrict __linep, size_t * __restrict __linecapp, int __delimiter, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 348 | ssize_t getline(char ** __restrict __linep, size_t * __restrict __linecapp, FILE * __restrict __stream) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 349 | FILE *fmemopen(void * __restrict __buf, size_t __size, const char * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 350 | FILE *open_memstream(char **__bufp, size_t *__sizep) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); | ||
| 351 | __END_DECLS | ||
| 352 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 353 | |||
| 354 | |||
| 355 | |||
| 356 | /* Darwin extensions */ | ||
| 357 | |||
| 358 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 359 | __BEGIN_DECLS | ||
| 360 | extern __const int sys_nerr;		/* perror(3) external variables */ | ||
| 361 | extern __const char *__const sys_errlist[]; | ||
| 362 | |||
| 363 | int	 asprintf(char ** __restrict, const char * __restrict, ...) __printflike(2, 3); | ||
| 364 | char	*ctermid_r(char *); | ||
| 365 | char	*fgetln(FILE *, size_t *); | ||
| 366 | __const char *fmtcheck(const char *, const char *); | ||
| 367 | int	 fpurge(FILE *); | ||
| 368 | void	 setbuffer(FILE *, char *, int); | ||
| 369 | int	 setlinebuf(FILE *); | ||
| 370 | int	 vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0); | ||
| 371 | |||
| 372 | |||
| 373 | /* | ||
| 374 | * Stdio function-access interface. | ||
| 375 | */ | ||
| 376 | FILE	*funopen(const void *, | ||
| 377 | int (* _Nullable)(void *, char *, int), | ||
| 378 | int (* _Nullable)(void *, const char *, int), | ||
| 379 | fpos_t (* _Nullable)(void *, fpos_t, int), | ||
| 380 | int (* _Nullable)(void *)); | ||
| 381 | __END_DECLS | ||
| 382 | #define	fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0) | ||
| 383 | #define	fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) | ||
| 384 | |||
| 385 | #define	feof_unlocked(p)	__sfeof(p) | ||
| 386 | #define	ferror_unlocked(p)	__sferror(p) | ||
| 387 | #define	clearerr_unlocked(p)	__sclearerr(p) | ||
| 388 | #define	fileno_unlocked(p)	__sfileno(p) | ||
| 389 | |||
| 390 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 391 | |||
| 392 | |||
| 393 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 394 | #include <xlocale/_stdio.h> | ||
| 395 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 396 | |||
| 397 | #if defined (__GNUC__) && _FORTIFY_SOURCE > 0 && !defined (__cplusplus) | ||
| 398 | /* Security checking functions. */ | ||
| 399 | #include <secure/_stdio.h> | ||
| 400 | #endif | ||
| 401 | |||
| 402 | #endif /* _STDIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/stdlib.h deleted-375| ... | @@ -1,375 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2002 - 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) 1990, 1993 | ||
| 25 | *	The Regents of the University of California. All rights reserved. | ||
| 26 | * | ||
| 27 | * Redistribution and use in source and binary forms, with or without | ||
| 28 | * modification, are permitted provided that the following conditions | ||
| 29 | * are met: | ||
| 30 | * 1. Redistributions of source code must retain the above copyright | ||
| 31 | * notice, this list of conditions and the following disclaimer. | ||
| 32 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 33 | * notice, this list of conditions and the following disclaimer in the | ||
| 34 | * documentation and/or other materials provided with the distribution. | ||
| 35 | * 3. All advertising materials mentioning features or use of this software | ||
| 36 | * must display the following acknowledgement: | ||
| 37 | *	This product includes software developed by the University of | ||
| 38 | *	California, Berkeley and its contributors. | ||
| 39 | * 4. Neither the name of the University nor the names of its contributors | ||
| 40 | * may be used to endorse or promote products derived from this software | ||
| 41 | * without specific prior written permission. | ||
| 42 | * | ||
| 43 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 44 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 46 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 49 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 51 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 52 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 53 | * SUCH DAMAGE. | ||
| 54 | * | ||
| 55 | *	@(#)stdlib.h	8.5 (Berkeley) 5/19/95 | ||
| 56 | */ | ||
| 57 | |||
| 58 | #ifndef _STDLIB_H_ | ||
| 59 | #define _STDLIB_H_ | ||
| 60 | |||
| 61 | #include <Availability.h> | ||
| 62 | #include <sys/cdefs.h> | ||
| 63 | |||
| 64 | #include <_types.h> | ||
| 65 | #if !defined(_ANSI_SOURCE) | ||
| 66 | #include <sys/wait.h> | ||
| 67 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 68 | #include <alloca.h> | ||
| 69 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 70 | #endif /* !_ANSI_SOURCE */ | ||
| 71 | |||
| 72 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | ||
| 73 | * _GCC_SIZE_T */ | ||
| 74 | #include <sys/_types/_size_t.h> | ||
| 75 | |||
| 76 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 77 | #include <sys/_types/_ct_rune_t.h> | ||
| 78 | #include <sys/_types/_rune_t.h> | ||
| 79 | #endif	/* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 80 | |||
| 81 | #include <sys/_types/_wchar_t.h> | ||
| 82 | |||
| 83 | typedef struct { | ||
| 84 | 	int quot;		/* quotient */ | ||
| 85 | 	int rem;		/* remainder */ | ||
| 86 | } div_t; | ||
| 87 | |||
| 88 | typedef struct { | ||
| 89 | 	long quot;		/* quotient */ | ||
| 90 | 	long rem;		/* remainder */ | ||
| 91 | } ldiv_t; | ||
| 92 | |||
| 93 | #if !__DARWIN_NO_LONG_LONG | ||
| 94 | typedef struct { | ||
| 95 | 	long long quot; | ||
| 96 | 	long long rem; | ||
| 97 | } lldiv_t; | ||
| 98 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 99 | |||
| 100 | #include <sys/_types/_null.h> | ||
| 101 | |||
| 102 | #define	EXIT_FAILURE	1 | ||
| 103 | #define	EXIT_SUCCESS	0 | ||
| 104 | |||
| 105 | #define	RAND_MAX	0x7fffffff | ||
| 106 | |||
| 107 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 108 | #include <_xlocale.h> | ||
| 109 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 110 | |||
| 111 | #ifndef MB_CUR_MAX | ||
| 112 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 113 | #define	MB_CUR_MAX	(___mb_cur_max()) | ||
| 114 | #ifndef MB_CUR_MAX_L | ||
| 115 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 116 | #endif /* !MB_CUR_MAX_L */ | ||
| 117 | #else /* !_USE_EXTENDED_LOCALES_ */ | ||
| 118 | extern int __mb_cur_max; | ||
| 119 | #define	MB_CUR_MAX	__mb_cur_max | ||
| 120 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 121 | #endif /* MB_CUR_MAX */ | ||
| 122 | |||
| 123 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ | ||
| 124 | && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) | ||
| 125 | #define	MB_CUR_MAX_L(x)	(___mb_cur_max_l(x)) | ||
| 126 | #endif | ||
| 127 | |||
| 128 | #include <malloc/_malloc.h> | ||
| 129 | |||
| 130 | __BEGIN_DECLS | ||
| 131 | void	 abort(void) __cold __dead2; | ||
| 132 | int	 abs(int) __pure2; | ||
| 133 | int	 atexit(void (* _Nonnull)(void)); | ||
| 134 | double	 atof(const char *); | ||
| 135 | int	 atoi(const char *); | ||
| 136 | long	 atol(const char *); | ||
| 137 | #if !__DARWIN_NO_LONG_LONG | ||
| 138 | long long | ||
| 139 | 	 atoll(const char *); | ||
| 140 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 141 | void	*bsearch(const void *__key, const void *__base, size_t __nel, | ||
| 142 | 	 size_t __width, int (* _Nonnull __compar)(const void *, const void *)); | ||
| 143 | /* calloc is now declared in _malloc.h */ | ||
| 144 | div_t	 div(int, int) __pure2; | ||
| 145 | void	 exit(int) __dead2; | ||
| 146 | /* free is now declared in _malloc.h */ | ||
| 147 | char	*getenv(const char *); | ||
| 148 | long	 labs(long) __pure2; | ||
| 149 | ldiv_t	 ldiv(long, long) __pure2; | ||
| 150 | #if !__DARWIN_NO_LONG_LONG | ||
| 151 | long long | ||
| 152 | 	 llabs(long long); | ||
| 153 | lldiv_t	 lldiv(long long, long long); | ||
| 154 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 155 | /* malloc is now declared in _malloc.h */ | ||
| 156 | int	 mblen(const char *__s, size_t __n); | ||
| 157 | size_t	 mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); | ||
| 158 | int	 mbtowc(wchar_t * __restrict, const char * __restrict, size_t); | ||
| 159 | /* posix_memalign is now declared in _malloc.h */ | ||
| 160 | void	 qsort(void *__base, size_t __nel, size_t __width, | ||
| 161 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 162 | int	 rand(void) __swift_unavailable("Use arc4random instead."); | ||
| 163 | /* realloc is now declared in _malloc.h */ | ||
| 164 | void	 srand(unsigned) __swift_unavailable("Use arc4random instead."); | ||
| 165 | double	 strtod(const char *, char **) __DARWIN_ALIAS(strtod); | ||
| 166 | float	 strtof(const char *, char **) __DARWIN_ALIAS(strtof); | ||
| 167 | long	 strtol(const char *__str, char **__endptr, int __base); | ||
| 168 | long double | ||
| 169 | 	 strtold(const char *, char **); | ||
| 170 | #if !__DARWIN_NO_LONG_LONG | ||
| 171 | long long | ||
| 172 | 	 strtoll(const char *__str, char **__endptr, int __base); | ||
| 173 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 174 | unsigned long | ||
| 175 | 	 strtoul(const char *__str, char **__endptr, int __base); | ||
| 176 | #if !__DARWIN_NO_LONG_LONG | ||
| 177 | unsigned long long | ||
| 178 | 	 strtoull(const char *__str, char **__endptr, int __base); | ||
| 179 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 180 | |||
| 181 | __swift_unavailable("Use posix_spawn APIs or NSTask instead. (On iOS, process spawning is unavailable.)") | ||
| 182 | __API_AVAILABLE(macos(10.0)) __IOS_PROHIBITED | ||
| 183 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 184 | int	 system(const char *) __DARWIN_ALIAS_C(system); | ||
| 185 | |||
| 186 | |||
| 187 | size_t	 wcstombs(char * __restrict, const wchar_t * __restrict, size_t); | ||
| 188 | int	 wctomb(char *, wchar_t); | ||
| 189 | |||
| 190 | #ifndef _ANSI_SOURCE | ||
| 191 | void	_Exit(int) __dead2; | ||
| 192 | long	 a64l(const char *); | ||
| 193 | double	 drand48(void); | ||
| 194 | char	*ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 195 | double	 erand48(unsigned short[3]); | ||
| 196 | char	*fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ | ||
| 197 | char	*gcvt(double, int, char *); /* LEGACY */ | ||
| 198 | int	 getsubopt(char **, char * const *, char **); | ||
| 199 | int	 grantpt(int); | ||
| 200 | #if __DARWIN_UNIX03 | ||
| 201 | char	*initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ | ||
| 202 | #else /* !__DARWIN_UNIX03 */ | ||
| 203 | char	*initstate(unsigned long, char *, long); | ||
| 204 | #endif /* __DARWIN_UNIX03 */ | ||
| 205 | long	 jrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 206 | char	*l64a(long); | ||
| 207 | void	 lcong48(unsigned short[7]); | ||
| 208 | long	 lrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 209 | char	*mktemp(char *); | ||
| 210 | int	 mkstemp(char *); | ||
| 211 | long	 mrand48(void) __swift_unavailable("Use arc4random instead."); | ||
| 212 | long	 nrand48(unsigned short[3]) __swift_unavailable("Use arc4random instead."); | ||
| 213 | int	 posix_openpt(int); | ||
| 214 | char	*ptsname(int); | ||
| 215 | |||
| 216 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 217 | int ptsname_r(int fildes, char *buffer, size_t buflen) __API_AVAILABLE(macos(10.13.4), ios(11.3), tvos(11.3), watchos(4.3)); | ||
| 218 | #endif | ||
| 219 | |||
| 220 | int	 putenv(char *) __DARWIN_ALIAS(putenv); | ||
| 221 | long	 random(void) __swift_unavailable("Use arc4random instead."); | ||
| 222 | int	 rand_r(unsigned *) __swift_unavailable("Use arc4random instead."); | ||
| 223 | #if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) | ||
| 224 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); | ||
| 225 | #else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ | ||
| 226 | char	*realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); | ||
| 227 | #endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ | ||
| 228 | unsigned short | ||
| 229 | 	*seed48(unsigned short[3]); | ||
| 230 | int	 setenv(const char * __name, const char * __value, int __overwrite) __DARWIN_ALIAS(setenv); | ||
| 231 | #if __DARWIN_UNIX03 | ||
| 232 | void	 setkey(const char *) __DARWIN_ALIAS(setkey); | ||
| 233 | #else /* !__DARWIN_UNIX03 */ | ||
| 234 | int	 setkey(const char *); | ||
| 235 | #endif /* __DARWIN_UNIX03 */ | ||
| 236 | char	*setstate(const char *); | ||
| 237 | void	 srand48(long); | ||
| 238 | #if __DARWIN_UNIX03 | ||
| 239 | void	 srandom(unsigned); | ||
| 240 | #else /* !__DARWIN_UNIX03 */ | ||
| 241 | void	 srandom(unsigned long); | ||
| 242 | #endif /* __DARWIN_UNIX03 */ | ||
| 243 | int	 unlockpt(int); | ||
| 244 | #if __DARWIN_UNIX03 | ||
| 245 | int	 unsetenv(const char *) __DARWIN_ALIAS(unsetenv); | ||
| 246 | #else /* !__DARWIN_UNIX03 */ | ||
| 247 | void	 unsetenv(const char *); | ||
| 248 | #endif /* __DARWIN_UNIX03 */ | ||
| 249 | #endif	/* !_ANSI_SOURCE */ | ||
| 250 | |||
| 251 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 252 | #include <machine/types.h> | ||
| 253 | #include <sys/_types/_dev_t.h> | ||
| 254 | #include <sys/_types/_mode_t.h> | ||
| 255 | #include <_types/_uint32_t.h> | ||
| 256 | |||
| 257 | uint32_t arc4random(void); | ||
| 258 | void	 arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/) | ||
| 259 | __OSX_DEPRECATED(10.0, 10.12, "use arc4random_stir") | ||
| 260 | __IOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 261 | __TVOS_DEPRECATED(2.0, 10.0, "use arc4random_stir") | ||
| 262 | __WATCHOS_DEPRECATED(1.0, 3.0, "use arc4random_stir"); | ||
| 263 | void	 arc4random_buf(void * __buf, size_t __nbytes) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 264 | void	 arc4random_stir(void); | ||
| 265 | uint32_t | ||
| 266 | 	 arc4random_uniform(uint32_t __upper_bound) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
| 267 | #ifdef __BLOCKS__ | ||
| 268 | int	 atexit_b(void (^ _Nonnull)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 269 | |||
| 270 | #ifdef __BLOCKS__ | ||
| 271 | #if __has_attribute(noescape) | ||
| 272 | #define __bsearch_noescape __attribute__((__noescape__)) | ||
| 273 | #else | ||
| 274 | #define __bsearch_noescape | ||
| 275 | #endif | ||
| 276 | #endif /* __BLOCKS__ */ | ||
| 277 | void	*bsearch_b(const void *__key, const void *__base, size_t __nel, | ||
| 278 | 	 size_t __width, int (^ _Nonnull __compar)(const void *, const void *) __bsearch_noescape) | ||
| 279 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 280 | #endif /* __BLOCKS__ */ | ||
| 281 | |||
| 282 | 	 /* getcap(3) functions */ | ||
| 283 | char	*cgetcap(char *, const char *, int); | ||
| 284 | int	 cgetclose(void); | ||
| 285 | int	 cgetent(char **, char **, const char *); | ||
| 286 | int	 cgetfirst(char **, char **); | ||
| 287 | int	 cgetmatch(const char *, const char *); | ||
| 288 | int	 cgetnext(char **, char **); | ||
| 289 | int	 cgetnum(char *, const char *, long *); | ||
| 290 | int	 cgetset(const char *); | ||
| 291 | int	 cgetstr(char *, const char *, char **); | ||
| 292 | int	 cgetustr(char *, const char *, char **); | ||
| 293 | |||
| 294 | int	 daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 295 | char	*devname(dev_t, mode_t); | ||
| 296 | char	*devname_r(dev_t, mode_t, char *buf, int len); | ||
| 297 | char	*getbsize(int *, long *); | ||
| 298 | int	 getloadavg(double [], int); | ||
| 299 | const char | ||
| 300 | 	*getprogname(void); | ||
| 301 | void	 setprogname(const char *); | ||
| 302 | |||
| 303 | #ifdef __BLOCKS__ | ||
| 304 | #if __has_attribute(noescape) | ||
| 305 | #define __sort_noescape __attribute__((__noescape__)) | ||
| 306 | #else | ||
| 307 | #define __sort_noescape | ||
| 308 | #endif | ||
| 309 | #endif /* __BLOCKS__ */ | ||
| 310 | |||
| 311 | int	 heapsort(void *__base, size_t __nel, size_t __width, | ||
| 312 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 313 | #ifdef __BLOCKS__ | ||
| 314 | int	 heapsort_b(void *__base, size_t __nel, size_t __width, | ||
| 315 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 316 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 317 | #endif /* __BLOCKS__ */ | ||
| 318 | int	 mergesort(void *__base, size_t __nel, size_t __width, | ||
| 319 | 	 int (* _Nonnull __compar)(const void *, const void *)); | ||
| 320 | #ifdef __BLOCKS__ | ||
| 321 | int	 mergesort_b(void *__base, size_t __nel, size_t __width, | ||
| 322 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 323 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 324 | #endif /* __BLOCKS__ */ | ||
| 325 | void	 psort(void *__base, size_t __nel, size_t __width, | ||
| 326 | 	 int (* _Nonnull __compar)(const void *, const void *)) | ||
| 327 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 328 | #ifdef __BLOCKS__ | ||
| 329 | void	 psort_b(void *__base, size_t __nel, size_t __width, | ||
| 330 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 331 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 332 | #endif /* __BLOCKS__ */ | ||
| 333 | void	 psort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 334 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)) | ||
| 335 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 336 | #ifdef __BLOCKS__ | ||
| 337 | void	 qsort_b(void *__base, size_t __nel, size_t __width, | ||
| 338 | 	 int (^ _Nonnull __compar)(const void *, const void *) __sort_noescape) | ||
| 339 | 	 __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); | ||
| 340 | #endif /* __BLOCKS__ */ | ||
| 341 | void	 qsort_r(void *__base, size_t __nel, size_t __width, void *, | ||
| 342 | 	 int (* _Nonnull __compar)(void *, const void *, const void *)); | ||
| 343 | int	 radixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 344 | 	 unsigned __endbyte); | ||
| 345 | int	rpmatch(const char *) | ||
| 346 | 	__API_AVAILABLE(macos(10.15), ios(13.0), tvos(13.0), watchos(6.0)); | ||
| 347 | int	 sradixsort(const unsigned char **__base, int __nel, const unsigned char *__table, | ||
| 348 | 	 unsigned __endbyte); | ||
| 349 | void	 sranddev(void); | ||
| 350 | void	 srandomdev(void); | ||
| 351 | void	*reallocf(void *__ptr, size_t __size) __alloc_size(2); | ||
| 352 | long long | ||
| 353 | 	strtonum(const char *__numstr, long long __minval, long long __maxval, const char **__errstrp) | ||
| 354 | 	__API_AVAILABLE(macos(11.0), ios(14.0), tvos(14.0), watchos(7.0)); | ||
| 355 | #if !__DARWIN_NO_LONG_LONG | ||
| 356 | long long | ||
| 357 | 	 strtoq(const char *__str, char **__endptr, int __base); | ||
| 358 | unsigned long long | ||
| 359 | 	 strtouq(const char *__str, char **__endptr, int __base); | ||
| 360 | #endif /* !__DARWIN_NO_LONG_LONG */ | ||
| 361 | extern char *suboptarg;		/* getsubopt(3) external variable */ | ||
| 362 | /* valloc is now declared in _malloc.h */ | ||
| 363 | #endif	/* !_ANSI_SOURCE && !_POSIX_SOURCE */ | ||
| 364 | |||
| 365 | /* Poison the following routines if -fshort-wchar is set */ | ||
| 366 | #if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU | ||
| 367 | #pragma GCC poison mbstowcs mbtowc wcstombs wctomb | ||
| 368 | #endif | ||
| 369 | __END_DECLS | ||
| 370 | |||
| 371 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 372 | #include <xlocale/_stdlib.h> | ||
| 373 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 374 | |||
| 375 | #endif /* _STDLIB_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/_symbol_aliasing.h+42| ... | @@ -347,6 +347,30 @@ | ... | @@ -347,6 +347,30 @@ |
| 347 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) | 347 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_0(x) |
| 348 | #endif | 348 | #endif |
| 349 | 349 | ||
| 350 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150100 | ||
| 351 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x) x | ||
| 352 | #else | ||
| 353 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_1(x) | ||
| 354 | #endif | ||
| 355 | |||
| 356 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150200 | ||
| 357 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x) x | ||
| 358 | #else | ||
| 359 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_2(x) | ||
| 360 | #endif | ||
| 361 | |||
| 362 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150300 | ||
| 363 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_3(x) x | ||
| 364 | #else | ||
| 365 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_3(x) | ||
| 366 | #endif | ||
| 367 | |||
| 368 | #if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 150400 | ||
| 369 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_4(x) x | ||
| 370 | #else | ||
| 371 | #define __DARWIN_ALIAS_STARTING_IPHONE___IPHONE_15_4(x) | ||
| 372 | #endif | ||
| 373 | |||
| 350 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 | 374 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1000 |
| 351 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x | 375 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_10_0(x) x |
| 352 | #else | 376 | #else |
| ... | @@ -567,4 +591,22 @@ | ... | @@ -567,4 +591,22 @@ |
| 567 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) x | 591 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) x |
| 568 | #else | 592 | #else |
| 569 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) | 593 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_0(x) |
| 594 | #endif | ||
| 595 | |||
| 596 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120100 | ||
| 597 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x) x | ||
| 598 | #else | ||
| 599 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_1(x) | ||
| 600 | #endif | ||
| 601 | |||
| 602 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120200 | ||
| 603 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_2(x) x | ||
| 604 | #else | ||
| 605 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_2(x) | ||
| 606 | #endif | ||
| 607 | |||
| 608 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 120300 | ||
| 609 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_3(x) x | ||
| 610 | #else | ||
| 611 | #define __DARWIN_ALIAS_STARTING_MAC___MAC_12_3(x) | ||
| 570 | #endif | 612 | #endif |
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/_types/_uintptr_t.h deleted-37| ... | @@ -1,37 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2003-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _UINTPTR_T | ||
| 29 | #define _UINTPTR_T | ||
| 30 | |||
| 31 | #ifndef __has_attribute | ||
| 32 | typedef unsigned long uintptr_t; | ||
| 33 | #else | ||
| 34 | typedef unsigned long uintptr_t; | ||
| 35 | #endif /* __has_attribute */ | ||
| 36 | |||
| 37 | #endif /* _UINTPTR_T */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/attr.h+1| ... | @@ -52,6 +52,7 @@ | ... | @@ -52,6 +52,7 @@ |
| 52 | 52 | ||
| 53 | #define FSOPT_ATTR_CMN_EXTENDED 0x00000020 | 53 | #define FSOPT_ATTR_CMN_EXTENDED 0x00000020 |
| 54 | #define FSOPT_RETURN_REALDEV 0x00000200 | 54 | #define FSOPT_RETURN_REALDEV 0x00000200 |
| 55 | #define FSOPT_NOFOLLOW_ANY 0x00000800 | ||
| 55 | 56 | ||
| 56 | /* we currently aren't anywhere near this amount for a valid | 57 | /* we currently aren't anywhere near this amount for a valid |
| 57 | * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams2 | 58 | * fssearchblock.sizeofsearchparams1 or fssearchblock.sizeofsearchparams2 |
lib/libc/include/any-macos.12-any/sys/cdefs.h+49-3| ... | @@ -395,11 +395,13 @@ | ... | @@ -395,11 +395,13 @@ |
| 395 | * types. | 395 | * types. |
| 396 | */ | 396 | */ |
| 397 | #define __printflike(fmtarg, firstvararg) \ | 397 | #define __printflike(fmtarg, firstvararg) \ |
| 398 | 	 __attribute__((__format__ (__printf__, fmtarg, firstvararg))) | 398 | 	__attribute__((__format__ (__printf__, fmtarg, firstvararg))) |
| 399 | #define __printf0like(fmtarg, firstvararg) \ | 399 | #define __printf0like(fmtarg, firstvararg) \ |
| 400 | 	 __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) | 400 | 	__attribute__((__format__ (__printf0__, fmtarg, firstvararg))) |
| 401 | #define __scanflike(fmtarg, firstvararg) \ | 401 | #define __scanflike(fmtarg, firstvararg) \ |
| 402 | 	 __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) | 402 | 	__attribute__((__format__ (__scanf__, fmtarg, firstvararg))) |
| 403 | #define __osloglike(fmtarg, firstvararg) \ | ||
| 404 | 	__attribute__((__format__ (__os_log__, fmtarg, firstvararg))) | ||
| 403 | 405 | ||
| 404 | #define __IDSTRING(name, string) static const char name[] __used = string | 406 | #define __IDSTRING(name, string) static const char name[] __used = string |
| 405 | 407 | ||
| ... | @@ -825,6 +827,49 @@ | ... | @@ -825,6 +827,49 @@ |
| 825 | #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden"))) | 827 | #define __XNU_PRIVATE_EXTERN __attribute__((visibility("hidden"))) |
| 826 | #endif | 828 | #endif |
| 827 | 829 | ||
| 830 | #if __has_include(<ptrcheck.h>) | ||
| 831 | #include <ptrcheck.h> | ||
| 832 | #else | ||
| 833 | /* | ||
| 834 | * We intentionally define to nothing pointer attributes which do not have an | ||
| 835 | * impact on the ABI. __indexable and __bidi_indexable are not defined because | ||
| 836 | * of the ABI incompatibility that makes the diagnostic preferable. | ||
| 837 | */ | ||
| 838 | #define __has_ptrcheck 0 | ||
| 839 | #define __single | ||
| 840 | #define __unsafe_indexable | ||
| 841 | #define __counted_by(N) | ||
| 842 | #define __sized_by(N) | ||
| 843 | #define __ended_by(E) | ||
| 844 | |||
| 845 | /* | ||
| 846 | * Similarly, we intentionally define to nothing the | ||
| 847 | * __ptrcheck_abi_assume_single and __ptrcheck_abi_assume_unsafe_indexable | ||
| 848 | * macros because they do not lead to an ABI incompatibility. However, we do not | ||
| 849 | * define the indexable and unsafe_indexable ones because the diagnostic is | ||
| 850 | * better than the silent ABI break. | ||
| 851 | */ | ||
| 852 | #define __ptrcheck_abi_assume_single() | ||
| 853 | #define __ptrcheck_abi_assume_unsafe_indexable() | ||
| 854 | |||
| 855 | /* __unsafe_forge intrinsics are defined as regular C casts. */ | ||
| 856 | #define __unsafe_forge_bidi_indexable(T, P, S) ((T)(P)) | ||
| 857 | #define __unsafe_forge_single(T, P) ((T)(P)) | ||
| 858 | |||
| 859 | /* decay operates normally; attribute is meaningless without pointer checks. */ | ||
| 860 | #define __array_decay_dicards_count_in_parameters | ||
| 861 | #endif /* !__has_include(<ptrcheck.h>) */ | ||
| 862 | |||
| 863 | #define __ASSUME_PTR_ABI_SINGLE_BEGIN __ptrcheck_abi_assume_single() | ||
| 864 | #define __ASSUME_PTR_ABI_SINGLE_END __ptrcheck_abi_assume_unsafe_indexable() | ||
| 865 | |||
| 866 | #if __has_ptrcheck | ||
| 867 | #define __header_indexable __indexable | ||
| 868 | #define __header_bidi_indexable __bidi_indexable | ||
| 869 | #else | ||
| 870 | #define __header_indexable | ||
| 871 | #define __header_bidi_indexable | ||
| 872 | #endif | ||
| 828 | 873 | ||
| 829 | /* | 874 | /* |
| 830 | * Architecture validation for current SDK | 875 | * Architecture validation for current SDK |
| ... | @@ -883,6 +928,7 @@ | ... | @@ -883,6 +928,7 @@ |
| 883 | #endif | 928 | #endif |
| 884 | 929 | ||
| 885 | 930 | ||
| 931 | |||
| 886 | #define __kernel_ptr_semantics | 932 | #define __kernel_ptr_semantics |
| 887 | #define __kernel_data_semantics | 933 | #define __kernel_data_semantics |
| 888 | #define __kernel_dual_semantics | 934 | #define __kernel_dual_semantics |
lib/libc/include/any-macos.12-any/sys/event.h+1-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2003-2019 Apple Inc. All rights reserved. | 2 | * Copyright (c) 2003-2021 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
lib/libc/include/any-macos.12-any/sys/fcntl.h+2| ... | @@ -172,6 +172,7 @@ | ... | @@ -172,6 +172,7 @@ |
| 172 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | 172 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL |
| 173 | #define AT_REALDEV 0x0200 /* Return real device inodes resides on for fstatat(2) */ | 173 | #define AT_REALDEV 0x0200 /* Return real device inodes resides on for fstatat(2) */ |
| 174 | #define AT_FDONLY 0x0400 /* Use only the fd and Ignore the path for fstatat(2) */ | 174 | #define AT_FDONLY 0x0400 /* Use only the fd and Ignore the path for fstatat(2) */ |
| 175 | #define AT_SYMLINK_NOFOLLOW_ANY 0x0800 /* Path should not contain any symlinks */ | ||
| 175 | #endif | 176 | #endif |
| 176 | #endif | 177 | #endif |
| 177 | 178 | ||
| ... | @@ -308,6 +309,7 @@ | ... | @@ -308,6 +309,7 @@ |
| 308 | #define F_ADDFILESIGS_INFO 103 /* Add signature from same file, return information */ | 309 | #define F_ADDFILESIGS_INFO 103 /* Add signature from same file, return information */ |
| 309 | #define F_ADDFILESUPPL 104 /* Add supplemental signature from same file with fd reference to original */ | 310 | #define F_ADDFILESUPPL 104 /* Add supplemental signature from same file with fd reference to original */ |
| 310 | #define F_GETSIGSINFO 105 /* Look up code signature information attached to a file or slice */ | 311 | #define F_GETSIGSINFO 105 /* Look up code signature information attached to a file or slice */ |
| 312 | #define F_FSRESERVED 106 /* Placeholder for future usage */ | ||
| 311 | 313 | ||
| 312 | // FS-specific fcntl()'s numbers begin at 0x00010000 and go up | 314 | // FS-specific fcntl()'s numbers begin at 0x00010000 and go up |
| 313 | #define FCNTL_FS_SPECIFIC_BASE 0x00010000 | 315 | #define FCNTL_FS_SPECIFIC_BASE 0x00010000 |
lib/libc/include/any-macos.12-any/sys/ioctl.h deleted-110| ... | @@ -1,110 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * (c) UNIX System Laboratories, Inc. | ||
| 33 | * All or some portions of this file are derived from material licensed | ||
| 34 | * to the University of California by American Telephone and Telegraph | ||
| 35 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 36 | * the permission of UNIX System Laboratories, Inc. | ||
| 37 | * | ||
| 38 | * Redistribution and use in source and binary forms, with or without | ||
| 39 | * modification, are permitted provided that the following conditions | ||
| 40 | * are met: | ||
| 41 | * 1. Redistributions of source code must retain the above copyright | ||
| 42 | * notice, this list of conditions and the following disclaimer. | ||
| 43 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 44 | * notice, this list of conditions and the following disclaimer in the | ||
| 45 | * documentation and/or other materials provided with the distribution. | ||
| 46 | * 3. All advertising materials mentioning features or use of this software | ||
| 47 | * must display the following acknowledgement: | ||
| 48 | *	This product includes software developed by the University of | ||
| 49 | *	California, Berkeley and its contributors. | ||
| 50 | * 4. Neither the name of the University nor the names of its contributors | ||
| 51 | * may be used to endorse or promote products derived from this software | ||
| 52 | * without specific prior written permission. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 64 | * SUCH DAMAGE. | ||
| 65 | * | ||
| 66 | *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94 | ||
| 67 | */ | ||
| 68 | |||
| 69 | #ifndef _SYS_IOCTL_H_ | ||
| 70 | #define _SYS_IOCTL_H_ | ||
| 71 | |||
| 72 | #include <sys/ttycom.h> | ||
| 73 | |||
| 74 | /* | ||
| 75 | * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ | ||
| 76 | * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented | ||
| 77 | * nonwithstanding). | ||
| 78 | */ | ||
| 79 | struct ttysize { | ||
| 80 | 	unsigned short ts_lines; | ||
| 81 | 	unsigned short ts_cols; | ||
| 82 | 	unsigned short ts_xxx; | ||
| 83 | 	unsigned short ts_yyy; | ||
| 84 | }; | ||
| 85 | #define TIOCGSIZE TIOCGWINSZ | ||
| 86 | #define TIOCSSIZE TIOCSWINSZ | ||
| 87 | |||
| 88 | #include <sys/ioccom.h> | ||
| 89 | |||
| 90 | #include <sys/filio.h> | ||
| 91 | #include <sys/sockio.h> | ||
| 92 | |||
| 93 | |||
| 94 | #include <sys/cdefs.h> | ||
| 95 | |||
| 96 | __BEGIN_DECLS | ||
| 97 | int ioctl(int, unsigned long, ...); | ||
| 98 | __END_DECLS | ||
| 99 | #endif /* !_SYS_IOCTL_H_ */ | ||
| 100 | |||
| 101 | /* | ||
| 102 | * Keep outside _SYS_IOCTL_H_ | ||
| 103 | * Compatability with old terminal driver | ||
| 104 | * | ||
| 105 | * Source level -> #define USE_OLD_TTY | ||
| 106 | * Kernel level -> always on | ||
| 107 | */ | ||
| 108 | #if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) | ||
| 109 | #include <sys/ioctl_compat.h> | ||
| 110 | #endif /* defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/mount.h+3-1| ... | @@ -228,6 +228,7 @@ struct vfsstatfs { | ... | @@ -228,6 +228,7 @@ struct vfsstatfs { |
| 228 | #define MNT_NOUSERXATTR 0x01000000 /* Don't allow user extended attributes */ | 228 | #define MNT_NOUSERXATTR 0x01000000 /* Don't allow user extended attributes */ |
| 229 | #define MNT_DEFWRITE 0x02000000 /* filesystem should defer writes */ | 229 | #define MNT_DEFWRITE 0x02000000 /* filesystem should defer writes */ |
| 230 | #define MNT_MULTILABEL 0x04000000 /* MAC support for individual labels */ | 230 | #define MNT_MULTILABEL 0x04000000 /* MAC support for individual labels */ |
| 231 | #define MNT_NOFOLLOW 0x08000000 /* don't follow symlink when resolving mount point */ | ||
| 231 | #define MNT_NOATIME 0x10000000 /* disable update of file access time */ | 232 | #define MNT_NOATIME 0x10000000 /* disable update of file access time */ |
| 232 | #define MNT_SNAPSHOT 0x40000000 /* The mount is a snapshot */ | 233 | #define MNT_SNAPSHOT 0x40000000 /* The mount is a snapshot */ |
| 233 | #define MNT_STRICTATIME 0x80000000 /* enable strict update of file access time */ | 234 | #define MNT_STRICTATIME 0x80000000 /* enable strict update of file access time */ |
| ... | @@ -247,7 +248,8 @@ struct vfsstatfs { | ... | @@ -247,7 +248,8 @@ struct vfsstatfs { |
| 247 | 	 MNT_ROOTFS	| MNT_DOVOLFS	| MNT_DONTBROWSE | \ | 248 | 	 MNT_ROOTFS	| MNT_DOVOLFS	| MNT_DONTBROWSE | \ |
| 248 | 	 MNT_IGNORE_OWNERSHIP | MNT_AUTOMOUNTED | MNT_JOURNALED | \ | 249 | 	 MNT_IGNORE_OWNERSHIP | MNT_AUTOMOUNTED | MNT_JOURNALED | \ |
| 249 | 	 MNT_NOUSERXATTR | MNT_DEFWRITE	| MNT_MULTILABEL | \ | 250 | 	 MNT_NOUSERXATTR | MNT_DEFWRITE	| MNT_MULTILABEL | \ |
| 250 | 	 MNT_NOATIME | MNT_STRICTATIME | MNT_SNAPSHOT | MNT_CPROTECT) | 251 | 	 MNT_NOFOLLOW | MNT_NOATIME | MNT_STRICTATIME | \ |
| 252 | 	 MNT_SNAPSHOT | MNT_CPROTECT) | ||
| 251 | /* | 253 | /* |
| 252 | * External filesystem command modifier flags. | 254 | * External filesystem command modifier flags. |
| 253 | * Unmount can use the MNT_FORCE flag. | 255 | * Unmount can use the MNT_FORCE flag. |
lib/libc/include/any-macos.12-any/sys/proc_info.h+38-1| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2005-2020 Apple Computer, Inc. All rights reserved. | 2 | * Copyright (c) 2005-2021 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
| ... | @@ -652,6 +652,8 @@ typedef uint64_t proc_info_udata_t; | ... | @@ -652,6 +652,8 @@ typedef uint64_t proc_info_udata_t; |
| 652 | #define PROX_FDTYPE_PIPE 6 | 652 | #define PROX_FDTYPE_PIPE 6 |
| 653 | #define PROX_FDTYPE_FSEVENTS 7 | 653 | #define PROX_FDTYPE_FSEVENTS 7 |
| 654 | #define PROX_FDTYPE_NETPOLICY 9 | 654 | #define PROX_FDTYPE_NETPOLICY 9 |
| 655 | #define PROX_FDTYPE_CHANNEL 10 | ||
| 656 | #define PROX_FDTYPE_NEXUS 11 | ||
| 655 | 657 | ||
| 656 | struct proc_fdinfo { | 658 | struct proc_fdinfo { |
| 657 | 	int32_t proc_fd; | 659 | 	int32_t proc_fd; |
| ... | @@ -663,6 +665,39 @@ struct proc_fileportinfo { | ... | @@ -663,6 +665,39 @@ struct proc_fileportinfo { |
| 663 | 	uint32_t proc_fdtype; | 665 | 	uint32_t proc_fdtype; |
| 664 | }; | 666 | }; |
| 665 | 667 | ||
| 668 | /* | ||
| 669 | * Channel | ||
| 670 | */ | ||
| 671 | |||
| 672 | /* type */ | ||
| 673 | #define PROC_CHANNEL_TYPE_USER_PIPE 0 | ||
| 674 | #define PROC_CHANNEL_TYPE_KERNEL_PIPE 1 | ||
| 675 | #define PROC_CHANNEL_TYPE_NET_IF 2 | ||
| 676 | #define PROC_CHANNEL_TYPE_FLOW_SWITCH 3 | ||
| 677 | |||
| 678 | /* flags */ | ||
| 679 | #define PROC_CHANNEL_FLAGS_MONITOR_TX 0x1 | ||
| 680 | #define PROC_CHANNEL_FLAGS_MONITOR_RX 0x2 | ||
| 681 | #define PROC_CHANNEL_FLAGS_MONITOR_NO_COPY 0x4 | ||
| 682 | #define PROC_CHANNEL_FLAGS_EXCLUSIVE 0x10 | ||
| 683 | #define PROC_CHANNEL_FLAGS_USER_PACKET_POOL 0x20 | ||
| 684 | #define PROC_CHANNEL_FLAGS_DEFUNCT_OK 0x40 | ||
| 685 | #define PROC_CHANNEL_FLAGS_LOW_LATENCY 0x80 | ||
| 686 | #define PROC_CHANNEL_FLAGS_MONITOR \ | ||
| 687 | 	(PROC_CHANNEL_FLAGS_MONITOR_TX | PROC_CHANNEL_FLAGS_MONITOR_RX) | ||
| 688 | |||
| 689 | struct proc_channel_info { | ||
| 690 | 	uuid_t chi_instance; | ||
| 691 | 	uint32_t chi_port; | ||
| 692 | 	uint32_t chi_type; | ||
| 693 | 	uint32_t chi_flags; | ||
| 694 | 	uint32_t rfu_1;/* reserved */ | ||
| 695 | }; | ||
| 696 | |||
| 697 | struct channel_fdinfo { | ||
| 698 | 	struct proc_fileinfo pfi; | ||
| 699 | 	struct proc_channel_info channelinfo; | ||
| 700 | }; | ||
| 666 | 701 | ||
| 667 | /* Flavors for proc_pidinfo() */ | 702 | /* Flavors for proc_pidinfo() */ |
| 668 | #define PROC_PIDLISTFDS 1 | 703 | #define PROC_PIDLISTFDS 1 |
| ... | @@ -741,6 +776,8 @@ struct proc_fileportinfo { | ... | @@ -741,6 +776,8 @@ struct proc_fileportinfo { |
| 741 | #define PROC_PIDFDATALKINFO_SIZE (sizeof(struct appletalk_fdinfo)) | 776 | #define PROC_PIDFDATALKINFO_SIZE (sizeof(struct appletalk_fdinfo)) |
| 742 | 777 | ||
| 743 | 778 | ||
| 779 | #define PROC_PIDFDCHANNELINFO 10 | ||
| 780 | #define PROC_PIDFDCHANNELINFO_SIZE (sizeof(struct channel_fdinfo)) | ||
| 744 | 781 | ||
| 745 | /* Flavors for proc_pidfileportinfo */ | 782 | /* Flavors for proc_pidfileportinfo */ |
| 746 | 783 |
lib/libc/include/any-macos.12-any/sys/random.h deleted-41| ... | @@ -1,41 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999, 2000-2005 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef __SYS_RANDOM_H__ | ||
| 30 | #define __SYS_RANDOM_H__ | ||
| 31 | |||
| 32 | #include <Availability.h> | ||
| 33 | #include <stddef.h> | ||
| 34 | #include <sys/appleapiopts.h> | ||
| 35 | #include <sys/cdefs.h> | ||
| 36 | |||
| 37 | __BEGIN_DECLS | ||
| 38 | int getentropy(void* buffer, size_t size) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 39 | __END_DECLS | ||
| 40 | |||
| 41 | #endif /* __SYS_RANDOM_H__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/resource.h deleted-524| ... | @@ -1,524 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /* | ||
| 30 | * Copyright (c) 1982, 1986, 1993 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)resource.h	8.2 (Berkeley) 1/4/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_RESOURCE_H_ | ||
| 65 | #define _SYS_RESOURCE_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | #include <sys/cdefs.h> | ||
| 69 | #include <sys/_types.h> | ||
| 70 | |||
| 71 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 72 | #include <stdint.h> | ||
| 73 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 74 | |||
| 75 | #include <Availability.h> | ||
| 76 | |||
| 77 | /* [XSI] The timeval structure shall be defined as described in | ||
| 78 | * <sys/time.h> | ||
| 79 | */ | ||
| 80 | #include <sys/_types/_timeval.h> | ||
| 81 | |||
| 82 | /* The id_t type shall be defined as described in <sys/types.h> */ | ||
| 83 | #include <sys/_types/_id_t.h> | ||
| 84 | |||
| 85 | |||
| 86 | /* | ||
| 87 | * Resource limit type (low 63 bits, excluding the sign bit) | ||
| 88 | */ | ||
| 89 | typedef __uint64_t rlim_t; | ||
| 90 | |||
| 91 | |||
| 92 | /***** | ||
| 93 | * PRIORITY | ||
| 94 | */ | ||
| 95 | |||
| 96 | /* | ||
| 97 | * Possible values of the first parameter to getpriority()/setpriority(), | ||
| 98 | * used to indicate the type of the second parameter. | ||
| 99 | */ | ||
| 100 | #define PRIO_PROCESS 0 /* Second argument is a PID */ | ||
| 101 | #define PRIO_PGRP 1 /* Second argument is a GID */ | ||
| 102 | #define PRIO_USER 2 /* Second argument is a UID */ | ||
| 103 | |||
| 104 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 105 | #define PRIO_DARWIN_THREAD 3 /* Second argument is always 0 (current thread) */ | ||
| 106 | #define PRIO_DARWIN_PROCESS 4 /* Second argument is a PID */ | ||
| 107 | |||
| 108 | |||
| 109 | /* | ||
| 110 | * Range limitations for the value of the third parameter to setpriority(). | ||
| 111 | */ | ||
| 112 | #define PRIO_MIN -20 | ||
| 113 | #define PRIO_MAX 20 | ||
| 114 | |||
| 115 | /* | ||
| 116 | * use PRIO_DARWIN_BG to set the current thread into "background" state | ||
| 117 | * which lowers CPU, disk IO, and networking priorites until thread terminates | ||
| 118 | * or "background" state is revoked | ||
| 119 | */ | ||
| 120 | #define PRIO_DARWIN_BG 0x1000 | ||
| 121 | |||
| 122 | /* | ||
| 123 | * use PRIO_DARWIN_NONUI to restrict a process's ability to make calls to | ||
| 124 | * the GPU. (deprecated) | ||
| 125 | */ | ||
| 126 | #define PRIO_DARWIN_NONUI 0x1001 | ||
| 127 | |||
| 128 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | /***** | ||
| 133 | * RESOURCE USAGE | ||
| 134 | */ | ||
| 135 | |||
| 136 | /* | ||
| 137 | * Possible values of the first parameter to getrusage(), used to indicate | ||
| 138 | * the scope of the information to be returned. | ||
| 139 | */ | ||
| 140 | #define RUSAGE_SELF 0 /* Current process information */ | ||
| 141 | #define RUSAGE_CHILDREN -1 /* Current process' children */ | ||
| 142 | |||
| 143 | /* | ||
| 144 | * A structure representing an accounting of resource utilization. The | ||
| 145 | * address of an instance of this structure is the second parameter to | ||
| 146 | * getrusage(). | ||
| 147 | * | ||
| 148 | * Note: All values other than ru_utime and ru_stime are implementaiton | ||
| 149 | * defined and subject to change in a future release. Their use | ||
| 150 | * is discouraged for standards compliant programs. | ||
| 151 | */ | ||
| 152 | struct rusage { | ||
| 153 | 	struct timeval ru_utime; /* user time used (PL) */ | ||
| 154 | 	struct timeval ru_stime; /* system time used (PL) */ | ||
| 155 | #if __DARWIN_C_LEVEL < __DARWIN_C_FULL | ||
| 156 | 	long ru_opaque[14]; /* implementation defined */ | ||
| 157 | #else | ||
| 158 | 	/* | ||
| 159 | 	 * Informational aliases for source compatibility with programs | ||
| 160 | 	 * that need more information than that provided by standards, | ||
| 161 | 	 * and which do not mind being OS-dependent. | ||
| 162 | 	 */ | ||
| 163 | 	long ru_maxrss; /* max resident set size (PL) */ | ||
| 164 | #define ru_first ru_ixrss /* internal: ruadd() range start */ | ||
| 165 | 	long ru_ixrss; /* integral shared memory size (NU) */ | ||
| 166 | 	long ru_idrss; /* integral unshared data (NU) */ | ||
| 167 | 	long ru_isrss; /* integral unshared stack (NU) */ | ||
| 168 | 	long ru_minflt; /* page reclaims (NU) */ | ||
| 169 | 	long ru_majflt; /* page faults (NU) */ | ||
| 170 | 	long ru_nswap; /* swaps (NU) */ | ||
| 171 | 	long ru_inblock; /* block input operations (atomic) */ | ||
| 172 | 	long ru_oublock; /* block output operations (atomic) */ | ||
| 173 | 	long ru_msgsnd; /* messages sent (atomic) */ | ||
| 174 | 	long ru_msgrcv; /* messages received (atomic) */ | ||
| 175 | 	long ru_nsignals; /* signals received (atomic) */ | ||
| 176 | 	long ru_nvcsw; /* voluntary context switches (atomic) */ | ||
| 177 | 	long ru_nivcsw; /* involuntary " */ | ||
| 178 | #define ru_last ru_nivcsw /* internal: ruadd() range end */ | ||
| 179 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 180 | }; | ||
| 181 | |||
| 182 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 183 | /* | ||
| 184 | * Flavors for proc_pid_rusage(). | ||
| 185 | */ | ||
| 186 | #define RUSAGE_INFO_V0 0 | ||
| 187 | #define RUSAGE_INFO_V1 1 | ||
| 188 | #define RUSAGE_INFO_V2 2 | ||
| 189 | #define RUSAGE_INFO_V3 3 | ||
| 190 | #define RUSAGE_INFO_V4 4 | ||
| 191 | #define RUSAGE_INFO_V5 5 | ||
| 192 | #define RUSAGE_INFO_CURRENT RUSAGE_INFO_V5 | ||
| 193 | |||
| 194 | /* | ||
| 195 | * Flags for RUSAGE_INFO_V5 | ||
| 196 | */ | ||
| 197 | #define RU_PROC_RUNS_RESLIDE 0x00000001 /* proc has reslid shared cache */ | ||
| 198 | |||
| 199 | typedef void *rusage_info_t; | ||
| 200 | |||
| 201 | struct rusage_info_v0 { | ||
| 202 | 	uint8_t ri_uuid[16]; | ||
| 203 | 	uint64_t ri_user_time; | ||
| 204 | 	uint64_t ri_system_time; | ||
| 205 | 	uint64_t ri_pkg_idle_wkups; | ||
| 206 | 	uint64_t ri_interrupt_wkups; | ||
| 207 | 	uint64_t ri_pageins; | ||
| 208 | 	uint64_t ri_wired_size; | ||
| 209 | 	uint64_t ri_resident_size; | ||
| 210 | 	uint64_t ri_phys_footprint; | ||
| 211 | 	uint64_t ri_proc_start_abstime; | ||
| 212 | 	uint64_t ri_proc_exit_abstime; | ||
| 213 | }; | ||
| 214 | |||
| 215 | struct rusage_info_v1 { | ||
| 216 | 	uint8_t ri_uuid[16]; | ||
| 217 | 	uint64_t ri_user_time; | ||
| 218 | 	uint64_t ri_system_time; | ||
| 219 | 	uint64_t ri_pkg_idle_wkups; | ||
| 220 | 	uint64_t ri_interrupt_wkups; | ||
| 221 | 	uint64_t ri_pageins; | ||
| 222 | 	uint64_t ri_wired_size; | ||
| 223 | 	uint64_t ri_resident_size; | ||
| 224 | 	uint64_t ri_phys_footprint; | ||
| 225 | 	uint64_t ri_proc_start_abstime; | ||
| 226 | 	uint64_t ri_proc_exit_abstime; | ||
| 227 | 	uint64_t ri_child_user_time; | ||
| 228 | 	uint64_t ri_child_system_time; | ||
| 229 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 230 | 	uint64_t ri_child_interrupt_wkups; | ||
| 231 | 	uint64_t ri_child_pageins; | ||
| 232 | 	uint64_t ri_child_elapsed_abstime; | ||
| 233 | }; | ||
| 234 | |||
| 235 | struct rusage_info_v2 { | ||
| 236 | 	uint8_t ri_uuid[16]; | ||
| 237 | 	uint64_t ri_user_time; | ||
| 238 | 	uint64_t ri_system_time; | ||
| 239 | 	uint64_t ri_pkg_idle_wkups; | ||
| 240 | 	uint64_t ri_interrupt_wkups; | ||
| 241 | 	uint64_t ri_pageins; | ||
| 242 | 	uint64_t ri_wired_size; | ||
| 243 | 	uint64_t ri_resident_size; | ||
| 244 | 	uint64_t ri_phys_footprint; | ||
| 245 | 	uint64_t ri_proc_start_abstime; | ||
| 246 | 	uint64_t ri_proc_exit_abstime; | ||
| 247 | 	uint64_t ri_child_user_time; | ||
| 248 | 	uint64_t ri_child_system_time; | ||
| 249 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 250 | 	uint64_t ri_child_interrupt_wkups; | ||
| 251 | 	uint64_t ri_child_pageins; | ||
| 252 | 	uint64_t ri_child_elapsed_abstime; | ||
| 253 | 	uint64_t ri_diskio_bytesread; | ||
| 254 | 	uint64_t ri_diskio_byteswritten; | ||
| 255 | }; | ||
| 256 | |||
| 257 | struct rusage_info_v3 { | ||
| 258 | 	uint8_t ri_uuid[16]; | ||
| 259 | 	uint64_t ri_user_time; | ||
| 260 | 	uint64_t ri_system_time; | ||
| 261 | 	uint64_t ri_pkg_idle_wkups; | ||
| 262 | 	uint64_t ri_interrupt_wkups; | ||
| 263 | 	uint64_t ri_pageins; | ||
| 264 | 	uint64_t ri_wired_size; | ||
| 265 | 	uint64_t ri_resident_size; | ||
| 266 | 	uint64_t ri_phys_footprint; | ||
| 267 | 	uint64_t ri_proc_start_abstime; | ||
| 268 | 	uint64_t ri_proc_exit_abstime; | ||
| 269 | 	uint64_t ri_child_user_time; | ||
| 270 | 	uint64_t ri_child_system_time; | ||
| 271 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 272 | 	uint64_t ri_child_interrupt_wkups; | ||
| 273 | 	uint64_t ri_child_pageins; | ||
| 274 | 	uint64_t ri_child_elapsed_abstime; | ||
| 275 | 	uint64_t ri_diskio_bytesread; | ||
| 276 | 	uint64_t ri_diskio_byteswritten; | ||
| 277 | 	uint64_t ri_cpu_time_qos_default; | ||
| 278 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 279 | 	uint64_t ri_cpu_time_qos_background; | ||
| 280 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 281 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 282 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 283 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 284 | 	uint64_t ri_billed_system_time; | ||
| 285 | 	uint64_t ri_serviced_system_time; | ||
| 286 | }; | ||
| 287 | |||
| 288 | struct rusage_info_v4 { | ||
| 289 | 	uint8_t ri_uuid[16]; | ||
| 290 | 	uint64_t ri_user_time; | ||
| 291 | 	uint64_t ri_system_time; | ||
| 292 | 	uint64_t ri_pkg_idle_wkups; | ||
| 293 | 	uint64_t ri_interrupt_wkups; | ||
| 294 | 	uint64_t ri_pageins; | ||
| 295 | 	uint64_t ri_wired_size; | ||
| 296 | 	uint64_t ri_resident_size; | ||
| 297 | 	uint64_t ri_phys_footprint; | ||
| 298 | 	uint64_t ri_proc_start_abstime; | ||
| 299 | 	uint64_t ri_proc_exit_abstime; | ||
| 300 | 	uint64_t ri_child_user_time; | ||
| 301 | 	uint64_t ri_child_system_time; | ||
| 302 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 303 | 	uint64_t ri_child_interrupt_wkups; | ||
| 304 | 	uint64_t ri_child_pageins; | ||
| 305 | 	uint64_t ri_child_elapsed_abstime; | ||
| 306 | 	uint64_t ri_diskio_bytesread; | ||
| 307 | 	uint64_t ri_diskio_byteswritten; | ||
| 308 | 	uint64_t ri_cpu_time_qos_default; | ||
| 309 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 310 | 	uint64_t ri_cpu_time_qos_background; | ||
| 311 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 312 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 313 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 314 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 315 | 	uint64_t ri_billed_system_time; | ||
| 316 | 	uint64_t ri_serviced_system_time; | ||
| 317 | 	uint64_t ri_logical_writes; | ||
| 318 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 319 | 	uint64_t ri_instructions; | ||
| 320 | 	uint64_t ri_cycles; | ||
| 321 | 	uint64_t ri_billed_energy; | ||
| 322 | 	uint64_t ri_serviced_energy; | ||
| 323 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 324 | 	uint64_t ri_runnable_time; | ||
| 325 | }; | ||
| 326 | |||
| 327 | struct rusage_info_v5 { | ||
| 328 | 	uint8_t ri_uuid[16]; | ||
| 329 | 	uint64_t ri_user_time; | ||
| 330 | 	uint64_t ri_system_time; | ||
| 331 | 	uint64_t ri_pkg_idle_wkups; | ||
| 332 | 	uint64_t ri_interrupt_wkups; | ||
| 333 | 	uint64_t ri_pageins; | ||
| 334 | 	uint64_t ri_wired_size; | ||
| 335 | 	uint64_t ri_resident_size; | ||
| 336 | 	uint64_t ri_phys_footprint; | ||
| 337 | 	uint64_t ri_proc_start_abstime; | ||
| 338 | 	uint64_t ri_proc_exit_abstime; | ||
| 339 | 	uint64_t ri_child_user_time; | ||
| 340 | 	uint64_t ri_child_system_time; | ||
| 341 | 	uint64_t ri_child_pkg_idle_wkups; | ||
| 342 | 	uint64_t ri_child_interrupt_wkups; | ||
| 343 | 	uint64_t ri_child_pageins; | ||
| 344 | 	uint64_t ri_child_elapsed_abstime; | ||
| 345 | 	uint64_t ri_diskio_bytesread; | ||
| 346 | 	uint64_t ri_diskio_byteswritten; | ||
| 347 | 	uint64_t ri_cpu_time_qos_default; | ||
| 348 | 	uint64_t ri_cpu_time_qos_maintenance; | ||
| 349 | 	uint64_t ri_cpu_time_qos_background; | ||
| 350 | 	uint64_t ri_cpu_time_qos_utility; | ||
| 351 | 	uint64_t ri_cpu_time_qos_legacy; | ||
| 352 | 	uint64_t ri_cpu_time_qos_user_initiated; | ||
| 353 | 	uint64_t ri_cpu_time_qos_user_interactive; | ||
| 354 | 	uint64_t ri_billed_system_time; | ||
| 355 | 	uint64_t ri_serviced_system_time; | ||
| 356 | 	uint64_t ri_logical_writes; | ||
| 357 | 	uint64_t ri_lifetime_max_phys_footprint; | ||
| 358 | 	uint64_t ri_instructions; | ||
| 359 | 	uint64_t ri_cycles; | ||
| 360 | 	uint64_t ri_billed_energy; | ||
| 361 | 	uint64_t ri_serviced_energy; | ||
| 362 | 	uint64_t ri_interval_max_phys_footprint; | ||
| 363 | 	uint64_t ri_runnable_time; | ||
| 364 | 	uint64_t ri_flags; | ||
| 365 | }; | ||
| 366 | |||
| 367 | typedef struct rusage_info_v5 rusage_info_current; | ||
| 368 | |||
| 369 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 370 | |||
| 371 | |||
| 372 | |||
| 373 | /***** | ||
| 374 | * RESOURCE LIMITS | ||
| 375 | */ | ||
| 376 | |||
| 377 | /* | ||
| 378 | * Symbolic constants for resource limits; since all limits are representable | ||
| 379 | * as a type rlim_t, we are permitted to define RLIM_SAVED_* in terms of | ||
| 380 | * RLIM_INFINITY. | ||
| 381 | */ | ||
| 382 | #define RLIM_INFINITY (((__uint64_t)1 << 63) - 1) /* no limit */ | ||
| 383 | #define RLIM_SAVED_MAX RLIM_INFINITY /* Unrepresentable hard limit */ | ||
| 384 | #define RLIM_SAVED_CUR RLIM_INFINITY /* Unrepresentable soft limit */ | ||
| 385 | |||
| 386 | /* | ||
| 387 | * Possible values of the first parameter to getrlimit()/setrlimit(), to | ||
| 388 | * indicate for which resource the operation is being performed. | ||
| 389 | */ | ||
| 390 | #define RLIMIT_CPU 0 /* cpu time per process */ | ||
| 391 | #define RLIMIT_FSIZE 1 /* file size */ | ||
| 392 | #define RLIMIT_DATA 2 /* data segment size */ | ||
| 393 | #define RLIMIT_STACK 3 /* stack size */ | ||
| 394 | #define RLIMIT_CORE 4 /* core file size */ | ||
| 395 | #define RLIMIT_AS 5 /* address space (resident set size) */ | ||
| 396 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 397 | #define RLIMIT_RSS RLIMIT_AS /* source compatibility alias */ | ||
| 398 | #define RLIMIT_MEMLOCK 6 /* locked-in-memory address space */ | ||
| 399 | #define RLIMIT_NPROC 7 /* number of processes */ | ||
| 400 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 401 | #define RLIMIT_NOFILE 8 /* number of open files */ | ||
| 402 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 403 | #define RLIM_NLIMITS 9 /* total number of resource limits */ | ||
| 404 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 405 | #define _RLIMIT_POSIX_FLAG 0x1000 /* Set bit for strict POSIX */ | ||
| 406 | |||
| 407 | /* | ||
| 408 | * A structure representing a resource limit. The address of an instance | ||
| 409 | * of this structure is the second parameter to getrlimit()/setrlimit(). | ||
| 410 | */ | ||
| 411 | struct rlimit { | ||
| 412 | 	rlim_t rlim_cur; /* current (soft) limit */ | ||
| 413 | 	rlim_t rlim_max; /* maximum value for rlim_cur */ | ||
| 414 | }; | ||
| 415 | |||
| 416 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 417 | /* | ||
| 418 | * proc_rlimit_control() | ||
| 419 | * | ||
| 420 | * Resource limit flavors | ||
| 421 | */ | ||
| 422 | #define RLIMIT_WAKEUPS_MONITOR 0x1 /* Configure the wakeups monitor. */ | ||
| 423 | #define RLIMIT_CPU_USAGE_MONITOR 0x2 /* Configure the CPU usage monitor. */ | ||
| 424 | #define RLIMIT_THREAD_CPULIMITS 0x3 /* Configure a blocking, per-thread, CPU limits. */ | ||
| 425 | #define RLIMIT_FOOTPRINT_INTERVAL 0x4 /* Configure memory footprint interval tracking */ | ||
| 426 | |||
| 427 | /* | ||
| 428 | * Flags for wakeups monitor control. | ||
| 429 | */ | ||
| 430 | #define WAKEMON_ENABLE 0x01 | ||
| 431 | #define WAKEMON_DISABLE 0x02 | ||
| 432 | #define WAKEMON_GET_PARAMS 0x04 | ||
| 433 | #define WAKEMON_SET_DEFAULTS 0x08 | ||
| 434 | #define WAKEMON_MAKE_FATAL 0x10 /* Configure the task so that violations are fatal. */ | ||
| 435 | |||
| 436 | /* | ||
| 437 | * Flags for CPU usage monitor control. | ||
| 438 | */ | ||
| 439 | #define CPUMON_MAKE_FATAL 0x1000 | ||
| 440 | |||
| 441 | /* | ||
| 442 | * Flags for memory footprint interval tracking. | ||
| 443 | */ | ||
| 444 | #define FOOTPRINT_INTERVAL_RESET 0x1 /* Reset the footprint interval counter to zero */ | ||
| 445 | |||
| 446 | struct proc_rlimit_control_wakeupmon { | ||
| 447 | 	uint32_t wm_flags; | ||
| 448 | 	int32_t wm_rate; | ||
| 449 | }; | ||
| 450 | |||
| 451 | |||
| 452 | |||
| 453 | /* I/O type */ | ||
| 454 | #define IOPOL_TYPE_DISK 0 | ||
| 455 | #define IOPOL_TYPE_VFS_ATIME_UPDATES 2 | ||
| 456 | #define IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES 3 | ||
| 457 | #define IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME 4 | ||
| 458 | #define IOPOL_TYPE_VFS_TRIGGER_RESOLVE 5 | ||
| 459 | #define IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION 6 | ||
| 460 | #define IOPOL_TYPE_VFS_IGNORE_PERMISSIONS 7 | ||
| 461 | #define IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE 8 | ||
| 462 | #define IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES 9 | ||
| 463 | |||
| 464 | /* scope */ | ||
| 465 | #define IOPOL_SCOPE_PROCESS 0 | ||
| 466 | #define IOPOL_SCOPE_THREAD 1 | ||
| 467 | #define IOPOL_SCOPE_DARWIN_BG 2 | ||
| 468 | |||
| 469 | /* I/O Priority */ | ||
| 470 | #define IOPOL_DEFAULT 0 | ||
| 471 | #define IOPOL_IMPORTANT 1 | ||
| 472 | #define IOPOL_PASSIVE 2 | ||
| 473 | #define IOPOL_THROTTLE 3 | ||
| 474 | #define IOPOL_UTILITY 4 | ||
| 475 | #define IOPOL_STANDARD 5 | ||
| 476 | |||
| 477 | /* compatibility with older names */ | ||
| 478 | #define IOPOL_APPLICATION IOPOL_STANDARD | ||
| 479 | #define IOPOL_NORMAL IOPOL_IMPORTANT | ||
| 480 | |||
| 481 | |||
| 482 | #define IOPOL_ATIME_UPDATES_DEFAULT 0 | ||
| 483 | #define IOPOL_ATIME_UPDATES_OFF 1 | ||
| 484 | |||
| 485 | #define IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT 0 | ||
| 486 | #define IOPOL_MATERIALIZE_DATALESS_FILES_OFF 1 | ||
| 487 | #define IOPOL_MATERIALIZE_DATALESS_FILES_ON 2 | ||
| 488 | |||
| 489 | #define IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT 0 | ||
| 490 | #define IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME 1 | ||
| 491 | |||
| 492 | #define IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT 0 | ||
| 493 | #define IOPOL_VFS_TRIGGER_RESOLVE_OFF 1 | ||
| 494 | |||
| 495 | #define IOPOL_VFS_CONTENT_PROTECTION_DEFAULT 0 | ||
| 496 | #define IOPOL_VFS_CONTENT_PROTECTION_IGNORE 1 | ||
| 497 | |||
| 498 | #define IOPOL_VFS_IGNORE_PERMISSIONS_OFF 0 | ||
| 499 | #define IOPOL_VFS_IGNORE_PERMISSIONS_ON 1 | ||
| 500 | |||
| 501 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_OFF 0 | ||
| 502 | #define IOPOL_VFS_SKIP_MTIME_UPDATE_ON 1 | ||
| 503 | |||
| 504 | #define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF 0 | ||
| 505 | #define IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON 1 | ||
| 506 | |||
| 507 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 508 | |||
| 509 | |||
| 510 | __BEGIN_DECLS | ||
| 511 | int getpriority(int, id_t); | ||
| 512 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 513 | int getiopolicy_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 514 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 515 | int getrlimit(int, struct rlimit *) __DARWIN_ALIAS(getrlimit); | ||
| 516 | int getrusage(int, struct rusage *); | ||
| 517 | int setpriority(int, id_t, int); | ||
| 518 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 519 | int setiopolicy_np(int, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 520 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 521 | int setrlimit(int, const struct rlimit *) __DARWIN_ALIAS(setrlimit); | ||
| 522 | __END_DECLS | ||
| 523 | |||
| 524 | #endif /* !_SYS_RESOURCE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/socket.h deleted-745| ... | @@ -1,745 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2019 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1998, 1999 Apple Computer, Inc. All Rights Reserved */ | ||
| 29 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 30 | /* | ||
| 31 | * Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994 | ||
| 32 | *	The Regents of the University of California. All rights reserved. | ||
| 33 | * | ||
| 34 | * Redistribution and use in source and binary forms, with or without | ||
| 35 | * modification, are permitted provided that the following conditions | ||
| 36 | * are met: | ||
| 37 | * 1. Redistributions of source code must retain the above copyright | ||
| 38 | * notice, this list of conditions and the following disclaimer. | ||
| 39 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 40 | * notice, this list of conditions and the following disclaimer in the | ||
| 41 | * documentation and/or other materials provided with the distribution. | ||
| 42 | * 3. All advertising materials mentioning features or use of this software | ||
| 43 | * must display the following acknowledgement: | ||
| 44 | *	This product includes software developed by the University of | ||
| 45 | *	California, Berkeley and its contributors. | ||
| 46 | * 4. Neither the name of the University nor the names of its contributors | ||
| 47 | * may be used to endorse or promote products derived from this software | ||
| 48 | * without specific prior written permission. | ||
| 49 | * | ||
| 50 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 51 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 52 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 53 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 54 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 55 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 56 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 57 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 58 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 59 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 60 | * SUCH DAMAGE. | ||
| 61 | * | ||
| 62 | *	@(#)socket.h	8.4 (Berkeley) 2/21/94 | ||
| 63 | * $FreeBSD: src/sys/sys/socket.h,v 1.39.2.7 2001/07/03 11:02:01 ume Exp $ | ||
| 64 | */ | ||
| 65 | /* | ||
| 66 | * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce | ||
| 67 | * support for mandatory and extensible security protections. This notice | ||
| 68 | * is included in support of clause 2.2 (b) of the Apple Public License, | ||
| 69 | * Version 2.0. | ||
| 70 | */ | ||
| 71 | |||
| 72 | #ifndef _SYS_SOCKET_H_ | ||
| 73 | #define _SYS_SOCKET_H_ | ||
| 74 | |||
| 75 | #include <sys/types.h> | ||
| 76 | #include <sys/cdefs.h> | ||
| 77 | #include <machine/_param.h> | ||
| 78 | #include <net/net_kev.h> | ||
| 79 | |||
| 80 | |||
| 81 | |||
| 82 | #include <Availability.h> | ||
| 83 | |||
| 84 | /* | ||
| 85 | * Definitions related to sockets: types, address families, options. | ||
| 86 | */ | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Data types. | ||
| 90 | */ | ||
| 91 | |||
| 92 | #include <sys/_types/_gid_t.h> | ||
| 93 | #include <sys/_types/_off_t.h> | ||
| 94 | #include <sys/_types/_pid_t.h> | ||
| 95 | #include <sys/_types/_sa_family_t.h> | ||
| 96 | #include <sys/_types/_socklen_t.h> | ||
| 97 | |||
| 98 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 99 | #include <sys/_types/_size_t.h> | ||
| 100 | |||
| 101 | /* XXX Not explicitly defined by POSIX, but function return types are */ | ||
| 102 | #include <sys/_types/_ssize_t.h> | ||
| 103 | |||
| 104 | /* | ||
| 105 | * [XSI] The iovec structure shall be defined as described in <sys/uio.h>. | ||
| 106 | */ | ||
| 107 | #include <sys/_types/_iovec_t.h> | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Types | ||
| 111 | */ | ||
| 112 | #define SOCK_STREAM 1 /* stream socket */ | ||
| 113 | #define SOCK_DGRAM 2 /* datagram socket */ | ||
| 114 | #define SOCK_RAW 3 /* raw-protocol interface */ | ||
| 115 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 116 | #define SOCK_RDM 4 /* reliably-delivered message */ | ||
| 117 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 118 | #define SOCK_SEQPACKET 5 /* sequenced packet stream */ | ||
| 119 | |||
| 120 | /* | ||
| 121 | * Option flags per-socket. | ||
| 122 | */ | ||
| 123 | #define SO_DEBUG 0x0001 /* turn on debugging info recording */ | ||
| 124 | #define SO_ACCEPTCONN 0x0002 /* socket has had listen() */ | ||
| 125 | #define SO_REUSEADDR 0x0004 /* allow local address reuse */ | ||
| 126 | #define SO_KEEPALIVE 0x0008 /* keep connections alive */ | ||
| 127 | #define SO_DONTROUTE 0x0010 /* just use interface addresses */ | ||
| 128 | #define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */ | ||
| 129 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 130 | #define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */ | ||
| 131 | #define SO_LINGER 0x0080 /* linger on close if data present (in ticks) */ | ||
| 132 | #else | ||
| 133 | #define SO_LINGER 0x1080 /* linger on close if data present (in seconds) */ | ||
| 134 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 135 | #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ | ||
| 136 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 137 | #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ | ||
| 138 | #define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */ | ||
| 139 | #define SO_TIMESTAMP_MONOTONIC 0x0800 /* Monotonically increasing timestamp on rcvd dgram */ | ||
| 140 | #ifndef __APPLE__ | ||
| 141 | #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ | ||
| 142 | #else | ||
| 143 | #define SO_DONTTRUNC 0x2000 /* APPLE: Retain unread data */ | ||
| 144 | /* (ATOMIC proto) */ | ||
| 145 | #define SO_WANTMORE 0x4000 /* APPLE: Give hint when more data ready */ | ||
| 146 | #define SO_WANTOOBFLAG 0x8000 /* APPLE: Want OOB in MSG_FLAG on receive */ | ||
| 147 | |||
| 148 | |||
| 149 | #endif /* (!__APPLE__) */ | ||
| 150 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 151 | |||
| 152 | /* | ||
| 153 | * Additional options, not kept in so_options. | ||
| 154 | */ | ||
| 155 | #define SO_SNDBUF 0x1001 /* send buffer size */ | ||
| 156 | #define SO_RCVBUF 0x1002 /* receive buffer size */ | ||
| 157 | #define SO_SNDLOWAT 0x1003 /* send low-water mark */ | ||
| 158 | #define SO_RCVLOWAT 0x1004 /* receive low-water mark */ | ||
| 159 | #define SO_SNDTIMEO 0x1005 /* send timeout */ | ||
| 160 | #define SO_RCVTIMEO 0x1006 /* receive timeout */ | ||
| 161 | #define SO_ERROR 0x1007 /* get error status and clear */ | ||
| 162 | #define SO_TYPE 0x1008 /* get socket type */ | ||
| 163 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 164 | #define SO_LABEL 0x1010 /* deprecated */ | ||
| 165 | #define SO_PEERLABEL 0x1011 /* deprecated */ | ||
| 166 | #ifdef __APPLE__ | ||
| 167 | #define SO_NREAD 0x1020 /* APPLE: get 1st-packet byte count */ | ||
| 168 | #define SO_NKE 0x1021 /* APPLE: Install socket-level NKE */ | ||
| 169 | #define SO_NOSIGPIPE 0x1022 /* APPLE: No SIGPIPE on EPIPE */ | ||
| 170 | #define SO_NOADDRERR 0x1023 /* APPLE: Returns EADDRNOTAVAIL when src is not available anymore */ | ||
| 171 | #define SO_NWRITE 0x1024 /* APPLE: Get number of bytes currently in send socket buffer */ | ||
| 172 | #define SO_REUSESHAREUID 0x1025 /* APPLE: Allow reuse of port/socket by different userids */ | ||
| 173 | #ifdef __APPLE_API_PRIVATE | ||
| 174 | #define SO_NOTIFYCONFLICT 0x1026 /* APPLE: send notification if there is a bind on a port which is already in use */ | ||
| 175 | #define SO_UPCALLCLOSEWAIT 0x1027 /* APPLE: block on close until an upcall returns */ | ||
| 176 | #endif | ||
| 177 | #define SO_LINGER_SEC 0x1080 /* linger on close if data present (in seconds) */ | ||
| 178 | #define SO_RANDOMPORT 0x1082 /* APPLE: request local port randomization */ | ||
| 179 | #define SO_NP_EXTENSIONS 0x1083 /* To turn off some POSIX behavior */ | ||
| 180 | #endif | ||
| 181 | |||
| 182 | #define SO_NUMRCVPKT 0x1112 /* number of datagrams in receive socket buffer */ | ||
| 183 | #define SO_NET_SERVICE_TYPE 0x1116 /* Network service type */ | ||
| 184 | |||
| 185 | |||
| 186 | #define SO_NETSVC_MARKING_LEVEL 0x1119 /* Get QoS marking in effect for socket */ | ||
| 187 | |||
| 188 | |||
| 189 | /* When adding new socket-options, you need to make sure MPTCP supports these as well! */ | ||
| 190 | |||
| 191 | /* | ||
| 192 | * Network Service Type for option SO_NET_SERVICE_TYPE | ||
| 193 | * | ||
| 194 | * The vast majority of sockets should use Best Effort that is the default | ||
| 195 | * Network Service Type. Other Network Service Types have to be used only if | ||
| 196 | * the traffic actually matches the description of the Network Service Type. | ||
| 197 | * | ||
| 198 | * Network Service Types do not represent priorities but rather describe | ||
| 199 | * different categories of delay, jitter and loss parameters. | ||
| 200 | * Those parameters may influence protocols from layer 4 protocols like TCP | ||
| 201 | * to layer 2 protocols like Wi-Fi. The Network Service Type can determine | ||
| 202 | * how the traffic is queued and scheduled by the host networking stack and | ||
| 203 | * by other entities on the network like switches and routers. For example | ||
| 204 | * for Wi-Fi, the Network Service Type can select the marking of the | ||
| 205 | * layer 2 packet with the appropriate WMM Access Category. | ||
| 206 | * | ||
| 207 | * There is no point in attempting to game the system and use | ||
| 208 | * a Network Service Type that does not correspond to the actual | ||
| 209 | * traffic characteristic but one that seems to have a higher precedence. | ||
| 210 | * The reason is that for service classes that have lower tolerance | ||
| 211 | * for delay and jitter, the queues size is lower than for service | ||
| 212 | * classes that are more tolerant to delay and jitter. | ||
| 213 | * | ||
| 214 | * For example using a voice service type for bulk data transfer will lead | ||
| 215 | * to disastrous results as soon as congestion happens because the voice | ||
| 216 | * queue overflows and packets get dropped. This is not only bad for the bulk | ||
| 217 | * data transfer but it is also bad for VoIP apps that legitimately are using | ||
| 218 | * the voice service type. | ||
| 219 | * | ||
| 220 | * The characteristics of the Network Service Types are based on the service | ||
| 221 | * classes defined in RFC 4594 "Configuration Guidelines for DiffServ Service | ||
| 222 | * Classes" | ||
| 223 | * | ||
| 224 | * When system detects the outgoing interface belongs to a DiffServ domain | ||
| 225 | * that follows the recommendation of the IETF draft "Guidelines for DiffServ to | ||
| 226 | * IEEE 802.11 Mapping", the packet will marked at layer 3 with a DSCP value | ||
| 227 | * that corresponds to Network Service Type. | ||
| 228 | * | ||
| 229 | * NET_SERVICE_TYPE_BE | ||
| 230 | *	"Best Effort", unclassified/standard. This is the default service | ||
| 231 | *	class and cover the majority of the traffic. | ||
| 232 | * | ||
| 233 | * NET_SERVICE_TYPE_BK | ||
| 234 | *	"Background", high delay tolerant, loss tolerant. elastic flow, | ||
| 235 | *	variable size & long-lived. E.g: non-interactive network bulk transfer | ||
| 236 | *	like synching or backup. | ||
| 237 | * | ||
| 238 | * NET_SERVICE_TYPE_RD | ||
| 239 | *	"Responsive Data", a notch higher than "Best Effort", medium delay | ||
| 240 | *	tolerant, elastic & inelastic flow, bursty, long-lived. E.g. email, | ||
| 241 | *	instant messaging, for which there is a sense of interactivity and | ||
| 242 | *	urgency (user waiting for output). | ||
| 243 | * | ||
| 244 | * NET_SERVICE_TYPE_OAM | ||
| 245 | *	"Operations, Administration, and Management", medium delay tolerant, | ||
| 246 | *	low-medium loss tolerant, elastic & inelastic flows, variable size. | ||
| 247 | *	E.g. VPN tunnels. | ||
| 248 | * | ||
| 249 | * NET_SERVICE_TYPE_AV | ||
| 250 | *	"Multimedia Audio/Video Streaming", medium delay tolerant, low-medium | ||
| 251 | *	loss tolerant, elastic flow, constant packet interval, variable rate | ||
| 252 | *	and size. E.g. video and audio playback with buffering. | ||
| 253 | * | ||
| 254 | * NET_SERVICE_TYPE_RV | ||
| 255 | *	"Responsive Multimedia Audio/Video", low delay tolerant, low-medium | ||
| 256 | *	loss tolerant, elastic flow, variable packet interval, rate and size. | ||
| 257 | *	E.g. screen sharing. | ||
| 258 | * | ||
| 259 | * NET_SERVICE_TYPE_VI | ||
| 260 | *	"Interactive Video", low delay tolerant, low-medium loss tolerant, | ||
| 261 | *	elastic flow, constant packet interval, variable rate & size. E.g. | ||
| 262 | *	video telephony. | ||
| 263 | * | ||
| 264 | * NET_SERVICE_TYPE_SIG | ||
| 265 | *	"Signaling", low delay tolerant, low loss tolerant, inelastic flow, | ||
| 266 | *	jitter tolerant, rate is bursty but short, variable size. E.g. SIP. | ||
| 267 | * | ||
| 268 | * NET_SERVICE_TYPE_VO | ||
| 269 | *	"Interactive Voice", very low delay tolerant, very low loss tolerant, | ||
| 270 | *	inelastic flow, constant packet rate, somewhat fixed size. | ||
| 271 | *	E.g. VoIP. | ||
| 272 | */ | ||
| 273 | |||
| 274 | #define NET_SERVICE_TYPE_BE 0 /* Best effort */ | ||
| 275 | #define NET_SERVICE_TYPE_BK 1 /* Background system initiated */ | ||
| 276 | #define NET_SERVICE_TYPE_SIG 2 /* Signaling */ | ||
| 277 | #define NET_SERVICE_TYPE_VI 3 /* Interactive Video */ | ||
| 278 | #define NET_SERVICE_TYPE_VO 4 /* Interactive Voice */ | ||
| 279 | #define NET_SERVICE_TYPE_RV 5 /* Responsive Multimedia Audio/Video */ | ||
| 280 | #define NET_SERVICE_TYPE_AV 6 /* Multimedia Audio/Video Streaming */ | ||
| 281 | #define NET_SERVICE_TYPE_OAM 7 /* Operations, Administration, and Management */ | ||
| 282 | #define NET_SERVICE_TYPE_RD 8 /* Responsive Data */ | ||
| 283 | |||
| 284 | |||
| 285 | /* These are supported values for SO_NETSVC_MARKING_LEVEL */ | ||
| 286 | #define NETSVC_MRKNG_UNKNOWN 0 /* The outgoing network interface is not known */ | ||
| 287 | #define NETSVC_MRKNG_LVL_L2 1 /* Default marking at layer 2 (for example Wi-Fi WMM) */ | ||
| 288 | #define NETSVC_MRKNG_LVL_L3L2_ALL 2 /* Layer 3 DSCP marking and layer 2 marking for all Network Service Types */ | ||
| 289 | #define NETSVC_MRKNG_LVL_L3L2_BK 3 /* The system policy limits layer 3 DSCP marking and layer 2 marking | ||
| 290 | 	 * to background Network Service Types */ | ||
| 291 | |||
| 292 | |||
| 293 | typedef __uint32_t sae_associd_t; | ||
| 294 | #define SAE_ASSOCID_ANY 0 | ||
| 295 | #define SAE_ASSOCID_ALL ((sae_associd_t)(-1ULL)) | ||
| 296 | |||
| 297 | typedef __uint32_t sae_connid_t; | ||
| 298 | #define SAE_CONNID_ANY 0 | ||
| 299 | #define SAE_CONNID_ALL ((sae_connid_t)(-1ULL)) | ||
| 300 | |||
| 301 | /* connectx() flag parameters */ | ||
| 302 | #define CONNECT_RESUME_ON_READ_WRITE 0x1 /* resume connect() on read/write */ | ||
| 303 | #define CONNECT_DATA_IDEMPOTENT 0x2 /* data is idempotent */ | ||
| 304 | #define CONNECT_DATA_AUTHENTICATED 0x4 /* data includes security that replaces the TFO-cookie */ | ||
| 305 | |||
| 306 | /* sockaddr endpoints */ | ||
| 307 | typedef struct sa_endpoints { | ||
| 308 | 	unsigned int sae_srcif; /* optional source interface */ | ||
| 309 | 	const struct sockaddr *sae_srcaddr; /* optional source address */ | ||
| 310 | 	socklen_t sae_srcaddrlen; /* size of source address */ | ||
| 311 | 	const struct sockaddr *sae_dstaddr; /* destination address */ | ||
| 312 | 	socklen_t sae_dstaddrlen; /* size of destination address */ | ||
| 313 | } sa_endpoints_t; | ||
| 314 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 315 | |||
| 316 | /* | ||
| 317 | * Structure used for manipulating linger option. | ||
| 318 | */ | ||
| 319 | struct linger { | ||
| 320 | 	int l_onoff; /* option on/off */ | ||
| 321 | 	int l_linger; /* linger time */ | ||
| 322 | }; | ||
| 323 | |||
| 324 | #ifndef __APPLE__ | ||
| 325 | struct accept_filter_arg { | ||
| 326 | 	char af_name[16]; | ||
| 327 | 	char af_arg[256 - 16]; | ||
| 328 | }; | ||
| 329 | #endif | ||
| 330 | |||
| 331 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 332 | #ifdef __APPLE__ | ||
| 333 | |||
| 334 | /* | ||
| 335 | * Structure to control non-portable Sockets extension to POSIX | ||
| 336 | */ | ||
| 337 | struct so_np_extensions { | ||
| 338 | 	u_int32_t npx_flags; | ||
| 339 | 	u_int32_t npx_mask; | ||
| 340 | }; | ||
| 341 | |||
| 342 | #define SONPX_SETOPTSHUT 0x000000001 /* flag for allowing setsockopt after shutdown */ | ||
| 343 | |||
| 344 | |||
| 345 | |||
| 346 | #endif | ||
| 347 | #endif | ||
| 348 | |||
| 349 | /* | ||
| 350 | * Level number for (get/set)sockopt() to apply to socket itself. | ||
| 351 | */ | ||
| 352 | #define SOL_SOCKET 0xffff /* options for socket level */ | ||
| 353 | |||
| 354 | |||
| 355 | /* | ||
| 356 | * Address families. | ||
| 357 | */ | ||
| 358 | #define AF_UNSPEC 0 /* unspecified */ | ||
| 359 | #define AF_UNIX 1 /* local to host (pipes) */ | ||
| 360 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 361 | #define AF_LOCAL AF_UNIX /* backward compatibility */ | ||
| 362 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 363 | #define AF_INET 2 /* internetwork: UDP, TCP, etc. */ | ||
| 364 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 365 | #define AF_IMPLINK 3 /* arpanet imp addresses */ | ||
| 366 | #define AF_PUP 4 /* pup protocols: e.g. BSP */ | ||
| 367 | #define AF_CHAOS 5 /* mit CHAOS protocols */ | ||
| 368 | #define AF_NS 6 /* XEROX NS protocols */ | ||
| 369 | #define AF_ISO 7 /* ISO protocols */ | ||
| 370 | #define AF_OSI AF_ISO | ||
| 371 | #define AF_ECMA 8 /* European computer manufacturers */ | ||
| 372 | #define AF_DATAKIT 9 /* datakit protocols */ | ||
| 373 | #define AF_CCITT 10 /* CCITT protocols, X.25 etc */ | ||
| 374 | #define AF_SNA 11 /* IBM SNA */ | ||
| 375 | #define AF_DECnet 12 /* DECnet */ | ||
| 376 | #define AF_DLI 13 /* DEC Direct data link interface */ | ||
| 377 | #define AF_LAT 14 /* LAT */ | ||
| 378 | #define AF_HYLINK 15 /* NSC Hyperchannel */ | ||
| 379 | #define AF_APPLETALK 16 /* Apple Talk */ | ||
| 380 | #define AF_ROUTE 17 /* Internal Routing Protocol */ | ||
| 381 | #define AF_LINK 18 /* Link layer interface */ | ||
| 382 | #define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */ | ||
| 383 | #define AF_COIP 20 /* connection-oriented IP, aka ST II */ | ||
| 384 | #define AF_CNT 21 /* Computer Network Technology */ | ||
| 385 | #define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */ | ||
| 386 | #define AF_IPX 23 /* Novell Internet Protocol */ | ||
| 387 | #define AF_SIP 24 /* Simple Internet Protocol */ | ||
| 388 | #define pseudo_AF_PIP 25 /* Help Identify PIP packets */ | ||
| 389 | #define AF_NDRV 27 /* Network Driver 'raw' access */ | ||
| 390 | #define AF_ISDN 28 /* Integrated Services Digital Network */ | ||
| 391 | #define AF_E164 AF_ISDN /* CCITT E.164 recommendation */ | ||
| 392 | #define pseudo_AF_KEY 29 /* Internal key-management function */ | ||
| 393 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 394 | #define AF_INET6 30 /* IPv6 */ | ||
| 395 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 396 | #define AF_NATM 31 /* native ATM access */ | ||
| 397 | #define AF_SYSTEM 32 /* Kernel event messages */ | ||
| 398 | #define AF_NETBIOS 33 /* NetBIOS */ | ||
| 399 | #define AF_PPP 34 /* PPP communication protocol */ | ||
| 400 | #define pseudo_AF_HDRCMPLT 35 /* Used by BPF to not rewrite headers | ||
| 401 | 	 * in interface output routine */ | ||
| 402 | #define AF_RESERVED_36 36 /* Reserved for internal usage */ | ||
| 403 | #define AF_IEEE80211 37 /* IEEE 802.11 protocol */ | ||
| 404 | #define AF_UTUN 38 | ||
| 405 | #define AF_VSOCK 40 /* VM Sockets */ | ||
| 406 | #define AF_MAX 41 | ||
| 407 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 408 | |||
| 409 | /* | ||
| 410 | * [XSI] Structure used by kernel to store most addresses. | ||
| 411 | */ | ||
| 412 | struct sockaddr { | ||
| 413 | 	__uint8_t sa_len; /* total length */ | ||
| 414 | 	sa_family_t sa_family; /* [XSI] address family */ | ||
| 415 | 	char sa_data[14]; /* [XSI] addr value (actually larger) */ | ||
| 416 | }; | ||
| 417 | |||
| 418 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 419 | #define SOCK_MAXADDRLEN 255 /* longest possible addresses */ | ||
| 420 | |||
| 421 | /* | ||
| 422 | * Structure used by kernel to pass protocol | ||
| 423 | * information in raw sockets. | ||
| 424 | */ | ||
| 425 | struct sockproto { | ||
| 426 | 	__uint16_t sp_family; /* address family */ | ||
| 427 | 	__uint16_t sp_protocol; /* protocol */ | ||
| 428 | }; | ||
| 429 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 430 | |||
| 431 | /* | ||
| 432 | * RFC 2553: protocol-independent placeholder for socket addresses | ||
| 433 | */ | ||
| 434 | #define _SS_MAXSIZE 128 | ||
| 435 | #define _SS_ALIGNSIZE (sizeof(__int64_t)) | ||
| 436 | #define _SS_PAD1SIZE \ | ||
| 437 | 	 (_SS_ALIGNSIZE - sizeof(__uint8_t) - sizeof(sa_family_t)) | ||
| 438 | #define _SS_PAD2SIZE \ | ||
| 439 | 	 (_SS_MAXSIZE - sizeof(__uint8_t) - sizeof(sa_family_t) - \ | ||
| 440 | 	 _SS_PAD1SIZE - _SS_ALIGNSIZE) | ||
| 441 | |||
| 442 | /* | ||
| 443 | * [XSI] sockaddr_storage | ||
| 444 | */ | ||
| 445 | struct sockaddr_storage { | ||
| 446 | 	__uint8_t ss_len; /* address length */ | ||
| 447 | 	sa_family_t ss_family; /* [XSI] address family */ | ||
| 448 | 	char __ss_pad1[_SS_PAD1SIZE]; | ||
| 449 | 	__int64_t __ss_align; /* force structure storage alignment */ | ||
| 450 | 	char __ss_pad2[_SS_PAD2SIZE]; | ||
| 451 | }; | ||
| 452 | |||
| 453 | /* | ||
| 454 | * Protocol families, same as address families for now. | ||
| 455 | */ | ||
| 456 | #define PF_UNSPEC AF_UNSPEC | ||
| 457 | #define PF_LOCAL AF_LOCAL | ||
| 458 | #define PF_UNIX PF_LOCAL /* backward compatibility */ | ||
| 459 | #define PF_INET AF_INET | ||
| 460 | #define PF_IMPLINK AF_IMPLINK | ||
| 461 | #define PF_PUP AF_PUP | ||
| 462 | #define PF_CHAOS AF_CHAOS | ||
| 463 | #define PF_NS AF_NS | ||
| 464 | #define PF_ISO AF_ISO | ||
| 465 | #define PF_OSI AF_ISO | ||
| 466 | #define PF_ECMA AF_ECMA | ||
| 467 | #define PF_DATAKIT AF_DATAKIT | ||
| 468 | #define PF_CCITT AF_CCITT | ||
| 469 | #define PF_SNA AF_SNA | ||
| 470 | #define PF_DECnet AF_DECnet | ||
| 471 | #define PF_DLI AF_DLI | ||
| 472 | #define PF_LAT AF_LAT | ||
| 473 | #define PF_HYLINK AF_HYLINK | ||
| 474 | #define PF_APPLETALK AF_APPLETALK | ||
| 475 | #define PF_ROUTE AF_ROUTE | ||
| 476 | #define PF_LINK AF_LINK | ||
| 477 | #define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */ | ||
| 478 | #define PF_COIP AF_COIP | ||
| 479 | #define PF_CNT AF_CNT | ||
| 480 | #define PF_SIP AF_SIP | ||
| 481 | #define PF_IPX AF_IPX /* same format as AF_NS */ | ||
| 482 | #define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */ | ||
| 483 | #define PF_PIP pseudo_AF_PIP | ||
| 484 | #define PF_NDRV AF_NDRV | ||
| 485 | #define PF_ISDN AF_ISDN | ||
| 486 | #define PF_KEY pseudo_AF_KEY | ||
| 487 | #define PF_INET6 AF_INET6 | ||
| 488 | #define PF_NATM AF_NATM | ||
| 489 | #define PF_SYSTEM AF_SYSTEM | ||
| 490 | #define PF_NETBIOS AF_NETBIOS | ||
| 491 | #define PF_PPP AF_PPP | ||
| 492 | #define PF_RESERVED_36 AF_RESERVED_36 | ||
| 493 | #define PF_UTUN AF_UTUN | ||
| 494 | #define PF_VSOCK AF_VSOCK | ||
| 495 | #define PF_MAX AF_MAX | ||
| 496 | |||
| 497 | /* | ||
| 498 | * These do not have socket-layer support: | ||
| 499 | */ | ||
| 500 | #define PF_VLAN ((uint32_t)0x766c616e) /* 'vlan' */ | ||
| 501 | #define PF_BOND ((uint32_t)0x626f6e64) /* 'bond' */ | ||
| 502 | |||
| 503 | /* | ||
| 504 | * Definitions for network related sysctl, CTL_NET. | ||
| 505 | * | ||
| 506 | * Second level is protocol family. | ||
| 507 | * Third level is protocol number. | ||
| 508 | * | ||
| 509 | * Further levels are defined by the individual families below. | ||
| 510 | */ | ||
| 511 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 512 | #define NET_MAXID AF_MAX | ||
| 513 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 514 | |||
| 515 | |||
| 516 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 517 | /* | ||
| 518 | * PF_ROUTE - Routing table | ||
| 519 | * | ||
| 520 | * Three additional levels are defined: | ||
| 521 | *	Fourth: address family, 0 is wildcard | ||
| 522 | *	Fifth: type of info, defined below | ||
| 523 | *	Sixth: flag(s) to mask with for NET_RT_FLAGS | ||
| 524 | */ | ||
| 525 | #define NET_RT_DUMP 1 /* dump; may limit to a.f. */ | ||
| 526 | #define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */ | ||
| 527 | #define NET_RT_IFLIST 3 /* survey interface list */ | ||
| 528 | #define NET_RT_STAT 4 /* routing statistics */ | ||
| 529 | #define NET_RT_TRASH 5 /* routes not in table but not freed */ | ||
| 530 | #define NET_RT_IFLIST2 6 /* interface list with addresses */ | ||
| 531 | #define NET_RT_DUMP2 7 /* dump; may limit to a.f. */ | ||
| 532 | /* | ||
| 533 | * Allows read access non-local host's MAC address | ||
| 534 | * if the process has neighbor cache entitlement. | ||
| 535 | */ | ||
| 536 | #define NET_RT_FLAGS_PRIV 10 | ||
| 537 | #define NET_RT_MAXID 11 | ||
| 538 | #endif /* (_POSIX_C_SOURCE && !_DARWIN_C_SOURCE) */ | ||
| 539 | |||
| 540 | |||
| 541 | |||
| 542 | |||
| 543 | /* | ||
| 544 | * Maximum queue length specifiable by listen. | ||
| 545 | */ | ||
| 546 | #define SOMAXCONN 128 | ||
| 547 | |||
| 548 | /* | ||
| 549 | * [XSI] Message header for recvmsg and sendmsg calls. | ||
| 550 | * Used value-result for recvmsg, value only for sendmsg. | ||
| 551 | */ | ||
| 552 | struct msghdr { | ||
| 553 | 	void *msg_name; /* [XSI] optional address */ | ||
| 554 | 	socklen_t msg_namelen; /* [XSI] size of address */ | ||
| 555 | 	struct iovec *msg_iov; /* [XSI] scatter/gather array */ | ||
| 556 | 	int msg_iovlen; /* [XSI] # elements in msg_iov */ | ||
| 557 | 	void *msg_control; /* [XSI] ancillary data, see below */ | ||
| 558 | 	socklen_t msg_controllen; /* [XSI] ancillary data buffer len */ | ||
| 559 | 	int msg_flags; /* [XSI] flags on received message */ | ||
| 560 | }; | ||
| 561 | |||
| 562 | |||
| 563 | |||
| 564 | #define MSG_OOB 0x1 /* process out-of-band data */ | ||
| 565 | #define MSG_PEEK 0x2 /* peek at incoming message */ | ||
| 566 | #define MSG_DONTROUTE 0x4 /* send without using routing tables */ | ||
| 567 | #define MSG_EOR 0x8 /* data completes record */ | ||
| 568 | #define MSG_TRUNC 0x10 /* data discarded before delivery */ | ||
| 569 | #define MSG_CTRUNC 0x20 /* control data lost before delivery */ | ||
| 570 | #define MSG_WAITALL 0x40 /* wait for full request or error */ | ||
| 571 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 572 | #define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ | ||
| 573 | #define MSG_EOF 0x100 /* data completes connection */ | ||
| 574 | #ifdef __APPLE__ | ||
| 575 | #ifdef __APPLE_API_OBSOLETE | ||
| 576 | #define MSG_WAITSTREAM 0x200 /* wait up to full request.. may return partial */ | ||
| 577 | #endif | ||
| 578 | #define MSG_FLUSH 0x400 /* Start of 'hold' seq; dump so_temp, deprecated */ | ||
| 579 | #define MSG_HOLD 0x800 /* Hold frag in so_temp, deprecated */ | ||
| 580 | #define MSG_SEND 0x1000 /* Send the packet in so_temp, deprecated */ | ||
| 581 | #define MSG_HAVEMORE 0x2000 /* Data ready to be read */ | ||
| 582 | #define MSG_RCVMORE 0x4000 /* Data remains in current pkt */ | ||
| 583 | #endif | ||
| 584 | #define MSG_NEEDSA 0x10000 /* Fail receive if socket address cannot be allocated */ | ||
| 585 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 586 | |||
| 587 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 588 | #define MSG_NOSIGNAL 0x80000 /* do not generate SIGPIPE on EOF */ | ||
| 589 | #endif /* __DARWIN_C_LEVEL */ | ||
| 590 | |||
| 591 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 592 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 593 | |||
| 594 | /* | ||
| 595 | * Header for ancillary data objects in msg_control buffer. | ||
| 596 | * Used for additional information with/about a datagram | ||
| 597 | * not expressible by flags. The format is a sequence | ||
| 598 | * of message elements headed by cmsghdr structures. | ||
| 599 | */ | ||
| 600 | struct cmsghdr { | ||
| 601 | 	socklen_t cmsg_len; /* [XSI] data byte count, including hdr */ | ||
| 602 | 	int cmsg_level; /* [XSI] originating protocol */ | ||
| 603 | 	int cmsg_type; /* [XSI] protocol-specific type */ | ||
| 604 | /* followed by	unsigned char cmsg_data[]; */ | ||
| 605 | }; | ||
| 606 | |||
| 607 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 608 | #ifndef __APPLE__ | ||
| 609 | /* | ||
| 610 | * While we may have more groups than this, the cmsgcred struct must | ||
| 611 | * be able to fit in an mbuf, and NGROUPS_MAX is too large to allow | ||
| 612 | * this. | ||
| 613 | */ | ||
| 614 | #define CMGROUP_MAX 16 | ||
| 615 | |||
| 616 | /* | ||
| 617 | * Credentials structure, used to verify the identity of a peer | ||
| 618 | * process that has sent us a message. This is allocated by the | ||
| 619 | * peer process but filled in by the kernel. This prevents the | ||
| 620 | * peer from lying about its identity. (Note that cmcred_groups[0] | ||
| 621 | * is the effective GID.) | ||
| 622 | */ | ||
| 623 | struct cmsgcred { | ||
| 624 | 	pid_t cmcred_pid; /* PID of sending process */ | ||
| 625 | 	uid_t cmcred_uid; /* real UID of sending process */ | ||
| 626 | 	uid_t cmcred_euid; /* effective UID of sending process */ | ||
| 627 | 	gid_t cmcred_gid; /* real GID of sending process */ | ||
| 628 | 	short cmcred_ngroups; /* number or groups */ | ||
| 629 | 	gid_t cmcred_groups[CMGROUP_MAX]; /* groups */ | ||
| 630 | }; | ||
| 631 | #endif | ||
| 632 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 633 | |||
| 634 | /* given pointer to struct cmsghdr, return pointer to data */ | ||
| 635 | #define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \ | ||
| 636 | 	__DARWIN_ALIGN32(sizeof(struct cmsghdr))) | ||
| 637 | |||
| 638 | /* | ||
| 639 | * RFC 2292 requires to check msg_controllen, in case that the kernel returns | ||
| 640 | * an empty list for some reasons. | ||
| 641 | */ | ||
| 642 | #define CMSG_FIRSTHDR(mhdr) \ | ||
| 643 | 	((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ | ||
| 644 | 	 (struct cmsghdr *)(mhdr)->msg_control : \ | ||
| 645 | 	 (struct cmsghdr *)0L) | ||
| 646 | |||
| 647 | |||
| 648 | /* | ||
| 649 | * Given pointer to struct cmsghdr, return pointer to next cmsghdr | ||
| 650 | * RFC 2292 says that CMSG_NXTHDR(mhdr, NULL) is equivalent to CMSG_FIRSTHDR(mhdr) | ||
| 651 | */ | ||
| 652 | #define CMSG_NXTHDR(mhdr, cmsg) \ | ||
| 653 | 	((char *)(cmsg) == (char *)0L ? CMSG_FIRSTHDR(mhdr) : \ | ||
| 654 | 	 ((((unsigned char *)(cmsg) + \ | ||
| 655 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len) + \ | ||
| 656 | 	 __DARWIN_ALIGN32(sizeof(struct cmsghdr))) > \ | ||
| 657 | 	 ((unsigned char *)(mhdr)->msg_control + \ | ||
| 658 | 	 (mhdr)->msg_controllen)) ? \ | ||
| 659 | 	 (struct cmsghdr *)0L /* NULL */ : \ | ||
| 660 | 	 (struct cmsghdr *)(void *)((unsigned char *)(cmsg) + \ | ||
| 661 | 	 __DARWIN_ALIGN32((__uint32_t)(cmsg)->cmsg_len)))) | ||
| 662 | |||
| 663 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 664 | /* RFC 2292 additions */ | ||
| 665 | #define CMSG_SPACE(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) | ||
| 666 | #define CMSG_LEN(l) (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) | ||
| 667 | |||
| 668 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 669 | |||
| 670 | /* "Socket"-level control message types: */ | ||
| 671 | #define SCM_RIGHTS 0x01 /* access rights (array of int) */ | ||
| 672 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 673 | #define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */ | ||
| 674 | #define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */ | ||
| 675 | #define SCM_TIMESTAMP_MONOTONIC 0x04 /* timestamp (uint64_t) */ | ||
| 676 | |||
| 677 | |||
| 678 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 679 | |||
| 680 | /* | ||
| 681 | * howto arguments for shutdown(2), specified by Posix.1g. | ||
| 682 | */ | ||
| 683 | #define SHUT_RD 0 /* shut down the reading side */ | ||
| 684 | #define SHUT_WR 1 /* shut down the writing side */ | ||
| 685 | #define SHUT_RDWR 2 /* shut down both sides */ | ||
| 686 | |||
| 687 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 688 | /* | ||
| 689 | * sendfile(2) header/trailer struct | ||
| 690 | */ | ||
| 691 | struct sf_hdtr { | ||
| 692 | 	struct iovec *headers; /* pointer to an array of header struct iovec's */ | ||
| 693 | 	int hdr_cnt; /* number of header iovec's */ | ||
| 694 | 	struct iovec *trailers; /* pointer to an array of trailer struct iovec's */ | ||
| 695 | 	int trl_cnt; /* number of trailer iovec's */ | ||
| 696 | }; | ||
| 697 | |||
| 698 | |||
| 699 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 700 | |||
| 701 | |||
| 702 | __BEGIN_DECLS | ||
| 703 | |||
| 704 | int accept(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 705 | __DARWIN_ALIAS_C(accept); | ||
| 706 | int bind(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS(bind); | ||
| 707 | int connect(int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(connect); | ||
| 708 | int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 709 | __DARWIN_ALIAS(getpeername); | ||
| 710 | int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict) | ||
| 711 | __DARWIN_ALIAS(getsockname); | ||
| 712 | int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict); | ||
| 713 | int listen(int, int) __DARWIN_ALIAS(listen); | ||
| 714 | ssize_t recv(int, void *, size_t, int) __DARWIN_ALIAS_C(recv); | ||
| 715 | ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, | ||
| 716 | socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); | ||
| 717 | ssize_t recvmsg(int, struct msghdr *, int) __DARWIN_ALIAS_C(recvmsg); | ||
| 718 | ssize_t send(int, const void *, size_t, int) __DARWIN_ALIAS_C(send); | ||
| 719 | ssize_t sendmsg(int, const struct msghdr *, int) __DARWIN_ALIAS_C(sendmsg); | ||
| 720 | ssize_t sendto(int, const void *, size_t, | ||
| 721 | int, const struct sockaddr *, socklen_t) __DARWIN_ALIAS_C(sendto); | ||
| 722 | int setsockopt(int, int, int, const void *, socklen_t); | ||
| 723 | int shutdown(int, int); | ||
| 724 | int sockatmark(int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 725 | int socket(int, int, int); | ||
| 726 | int socketpair(int, int, int, int *) __DARWIN_ALIAS(socketpair); | ||
| 727 | |||
| 728 | #if !defined(_POSIX_C_SOURCE) | ||
| 729 | int sendfile(int, int, off_t, off_t *, struct sf_hdtr *, int); | ||
| 730 | #endif /* !_POSIX_C_SOURCE */ | ||
| 731 | |||
| 732 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 733 | void pfctlinput(int, struct sockaddr *); | ||
| 734 | |||
| 735 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 736 | int connectx(int, const sa_endpoints_t *, sae_associd_t, unsigned int, | ||
| 737 | const struct iovec *, unsigned int, size_t *, sae_connid_t *); | ||
| 738 | |||
| 739 | __API_AVAILABLE(macosx(10.11), ios(9.0), tvos(9.0), watchos(2.0)) | ||
| 740 | int disconnectx(int, sae_associd_t, sae_connid_t); | ||
| 741 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 742 | __END_DECLS | ||
| 743 | |||
| 744 | |||
| 745 | #endif /* !_SYS_SOCKET_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/sockio.h deleted-180| ... | @@ -1,180 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)sockio.h	8.1 (Berkeley) 3/28/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_SOCKIO_H_ | ||
| 65 | #define _SYS_SOCKIO_H_ | ||
| 66 | |||
| 67 | #include <sys/appleapiopts.h> | ||
| 68 | |||
| 69 | #include <sys/ioccom.h> | ||
| 70 | |||
| 71 | /* Socket ioctl's. */ | ||
| 72 | #define SIOCSHIWAT _IOW('s', 0, int) /* set high watermark */ | ||
| 73 | #define SIOCGHIWAT _IOR('s', 1, int) /* get high watermark */ | ||
| 74 | #define SIOCSLOWAT _IOW('s', 2, int) /* set low watermark */ | ||
| 75 | #define SIOCGLOWAT _IOR('s', 3, int) /* get low watermark */ | ||
| 76 | #define SIOCATMARK _IOR('s', 7, int) /* at oob mark? */ | ||
| 77 | #define SIOCSPGRP _IOW('s', 8, int) /* set process group */ | ||
| 78 | #define SIOCGPGRP _IOR('s', 9, int) /* get process group */ | ||
| 79 | |||
| 80 | /* | ||
| 81 | * OSIOCGIF* ioctls are deprecated; they are kept for binary compatibility. | ||
| 82 | */ | ||
| 83 | #define SIOCSIFADDR _IOW('i', 12, struct ifreq) /* set ifnet address */ | ||
| 84 | #define SIOCSIFDSTADDR _IOW('i', 14, struct ifreq) /* set p-p address */ | ||
| 85 | #define SIOCSIFFLAGS _IOW('i', 16, struct ifreq) /* set ifnet flags */ | ||
| 86 | #define SIOCGIFFLAGS _IOWR('i', 17, struct ifreq) /* get ifnet flags */ | ||
| 87 | #define SIOCSIFBRDADDR _IOW('i', 19, struct ifreq) /* set broadcast addr */ | ||
| 88 | #define SIOCSIFNETMASK _IOW('i', 22, struct ifreq) /* set net addr mask */ | ||
| 89 | #define SIOCGIFMETRIC _IOWR('i', 23, struct ifreq) /* get IF metric */ | ||
| 90 | #define SIOCSIFMETRIC _IOW('i', 24, struct ifreq) /* set IF metric */ | ||
| 91 | #define SIOCDIFADDR _IOW('i', 25, struct ifreq) /* delete IF addr */ | ||
| 92 | #define SIOCAIFADDR _IOW('i', 26, struct ifaliasreq)/* add/chg IF alias */ | ||
| 93 | |||
| 94 | #define SIOCGIFADDR _IOWR('i', 33, struct ifreq) /* get ifnet address */ | ||
| 95 | #define SIOCGIFDSTADDR _IOWR('i', 34, struct ifreq) /* get p-p address */ | ||
| 96 | #define SIOCGIFBRDADDR _IOWR('i', 35, struct ifreq) /* get broadcast addr */ | ||
| 97 | #define SIOCGIFCONF _IOWR('i', 36, struct ifconf) /* get ifnet list */ | ||
| 98 | #define SIOCGIFNETMASK _IOWR('i', 37, struct ifreq) /* get net addr mask */ | ||
| 99 | #define SIOCAUTOADDR _IOWR('i', 38, struct ifreq) /* autoconf address */ | ||
| 100 | #define SIOCAUTONETMASK _IOW('i', 39, struct ifreq) /* autoconf netmask */ | ||
| 101 | #define SIOCARPIPLL _IOWR('i', 40, struct ifreq) /* arp for IPv4LL address */ | ||
| 102 | |||
| 103 | #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ | ||
| 104 | #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ | ||
| 105 | #define SIOCGIFMTU _IOWR('i', 51, struct ifreq) /* get IF mtu */ | ||
| 106 | #define SIOCSIFMTU _IOW('i', 52, struct ifreq) /* set IF mtu */ | ||
| 107 | #define SIOCGIFPHYS _IOWR('i', 53, struct ifreq) /* get IF wire */ | ||
| 108 | #define SIOCSIFPHYS _IOW('i', 54, struct ifreq) /* set IF wire */ | ||
| 109 | #define SIOCSIFMEDIA _IOWR('i', 55, struct ifreq) /* set net media */ | ||
| 110 | |||
| 111 | /* | ||
| 112 | * The command SIOCGIFMEDIA does not allow a process to access the extended | ||
| 113 | * media subtype and extended subtype values are returned as IFM_OTHER. | ||
| 114 | */ | ||
| 115 | #define SIOCGIFMEDIA _IOWR('i', 56, struct ifmediareq) /* get compatible net media */ | ||
| 116 | |||
| 117 | #define SIOCSIFGENERIC _IOW('i', 57, struct ifreq) /* generic IF set op */ | ||
| 118 | #define SIOCGIFGENERIC _IOWR('i', 58, struct ifreq) /* generic IF get op */ | ||
| 119 | #define SIOCRSLVMULTI _IOWR('i', 59, struct rslvmulti_req) | ||
| 120 | |||
| 121 | #define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set link level addr */ | ||
| 122 | #define SIOCGIFSTATUS _IOWR('i', 61, struct ifstat) /* get IF status */ | ||
| 123 | #define SIOCSIFPHYADDR _IOW('i', 62, struct ifaliasreq) /* set gif addres */ | ||
| 124 | #define SIOCGIFPSRCADDR _IOWR('i', 63, struct ifreq) /* get gif psrc addr */ | ||
| 125 | #define SIOCGIFPDSTADDR _IOWR('i', 64, struct ifreq) /* get gif pdst addr */ | ||
| 126 | #define SIOCDIFPHYADDR _IOW('i', 65, struct ifreq) /* delete gif addrs */ | ||
| 127 | |||
| 128 | #define SIOCGIFDEVMTU _IOWR('i', 68, struct ifreq) /* get if ifdevmtu */ | ||
| 129 | #define SIOCSIFALTMTU _IOW('i', 69, struct ifreq) /* set if alternate mtu */ | ||
| 130 | #define SIOCGIFALTMTU _IOWR('i', 72, struct ifreq) /* get if alternate mtu */ | ||
| 131 | #define SIOCSIFBOND _IOW('i', 70, struct ifreq) /* set bond if config */ | ||
| 132 | #define SIOCGIFBOND _IOWR('i', 71, struct ifreq) /* get bond if config */ | ||
| 133 | |||
| 134 | /* | ||
| 135 | * The command SIOCGIFXMEDIA is meant to be used by processes only to be able | ||
| 136 | * to access the extended media subtypes with the extended IFM_TMASK. | ||
| 137 | * | ||
| 138 | * An ifnet must not implement SIOCGIFXMEDIA as it gets the extended | ||
| 139 | * media subtypes by simply compiling with <net/if_media.h> | ||
| 140 | */ | ||
| 141 | #define SIOCGIFXMEDIA _IOWR('i', 72, struct ifmediareq) /* get net extended media */ | ||
| 142 | |||
| 143 | |||
| 144 | #define SIOCSIFCAP _IOW('i', 90, struct ifreq) /* set IF features */ | ||
| 145 | #define SIOCGIFCAP _IOWR('i', 91, struct ifreq) /* get IF features */ | ||
| 146 | |||
| 147 | #define SIOCIFCREATE _IOWR('i', 120, struct ifreq) /* create clone if */ | ||
| 148 | #define SIOCIFDESTROY _IOW('i', 121, struct ifreq) /* destroy clone if */ | ||
| 149 | #define SIOCIFCREATE2 _IOWR('i', 122, struct ifreq) /* create clone if with data */ | ||
| 150 | |||
| 151 | #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific | ||
| 152 | 	 * parameters */ | ||
| 153 | #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific | ||
| 154 | 	 * parameters */ | ||
| 155 | #define SIOCSIFVLAN _IOW('i', 126, struct ifreq) /* set VLAN config */ | ||
| 156 | #define SIOCGIFVLAN _IOWR('i', 127, struct ifreq) /* get VLAN config */ | ||
| 157 | #define SIOCSETVLAN SIOCSIFVLAN | ||
| 158 | #define SIOCGETVLAN SIOCGIFVLAN | ||
| 159 | |||
| 160 | #define SIOCIFGCLONERS _IOWR('i', 129, struct if_clonereq) /* get cloners */ | ||
| 161 | |||
| 162 | #define SIOCGIFASYNCMAP _IOWR('i', 124, struct ifreq) /* get ppp asyncmap */ | ||
| 163 | #define SIOCSIFASYNCMAP _IOW('i', 125, struct ifreq) /* set ppp asyncmap */ | ||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | #define SIOCGIFMAC _IOWR('i', 130, struct ifreq) /* deprecated */ | ||
| 168 | #define SIOCSIFMAC _IOW('i', 131, struct ifreq) /* deprecated */ | ||
| 169 | #define SIOCSIFKPI _IOW('i', 134, struct ifreq) /* set interface kext param - root only */ | ||
| 170 | #define SIOCGIFKPI _IOWR('i', 135, struct ifreq) /* get interface kext param */ | ||
| 171 | |||
| 172 | #define SIOCGIFWAKEFLAGS _IOWR('i', 136, struct ifreq) /* get interface wake property flags */ | ||
| 173 | |||
| 174 | #define SIOCGIFFUNCTIONALTYPE _IOWR('i', 173, struct ifreq) /* get interface functional type */ | ||
| 175 | |||
| 176 | #define SIOCSIF6LOWPAN _IOW('i', 196, struct ifreq) /* set 6LOWPAN config */ | ||
| 177 | #define SIOCGIF6LOWPAN _IOWR('i', 197, struct ifreq) /* get 6LOWPAN config */ | ||
| 178 | |||
| 179 | |||
| 180 | #endif /* !_SYS_SOCKIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/stdio.h created+60| ... | @@ -0,0 +1,60 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _SYS_STDIO_H_ | ||
| 30 | #define _SYS_STDIO_H_ | ||
| 31 | |||
| 32 | #include <sys/cdefs.h> | ||
| 33 | |||
| 34 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 35 | #define RENAME_SECLUDE 0x00000001 | ||
| 36 | #define RENAME_SWAP 0x00000002 | ||
| 37 | #define RENAME_EXCL 0x00000004 | ||
| 38 | #define RENAME_RESERVED1 0x00000008 | ||
| 39 | #define RENAME_NOFOLLOW_ANY 0x00000010 | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 43 | #include <Availability.h> | ||
| 44 | |||
| 45 | __BEGIN_DECLS | ||
| 46 | |||
| 47 | int renameat(int, const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 48 | |||
| 49 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 50 | |||
| 51 | int renamex_np(const char *, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 52 | int renameatx_np(int, const char *, int, const char *, unsigned int) __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 53 | |||
| 54 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 55 | |||
| 56 | __END_DECLS | ||
| 57 | |||
| 58 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 59 | |||
| 60 | #endif /* _SYS_STDIO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/sysctl.h+3-2| ... | @@ -1,5 +1,5 @@ | ... | @@ -1,5 +1,5 @@ |
| 1 | /* | 1 | /* |
| 2 | * Copyright (c) 2000-2019 Apple Inc. All rights reserved. | 2 | * Copyright (c) 2000-2021 Apple Inc. All rights reserved. |
| 3 | * | 3 | * |
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ |
| 5 | * | 5 | * |
| ... | @@ -339,7 +339,8 @@ struct ctlname { | ... | @@ -339,7 +339,8 @@ struct ctlname { |
| 339 | #define KERN_KDBUFWAIT 23 | 339 | #define KERN_KDBUFWAIT 23 |
| 340 | #define KERN_KDCPUMAP 24 | 340 | #define KERN_KDCPUMAP 24 |
| 341 | #define KERN_KDCPUMAP_EXT 25 | 341 | #define KERN_KDCPUMAP_EXT 25 |
| 342 | /* 25 - 27 unused */ | 342 | #define KERN_KDSET_EDM 26 |
| 343 | #define KERN_KDGET_EDM 27 | ||
| 343 | #define KERN_KDWRITETR_V3 28 | 344 | #define KERN_KDWRITETR_V3 28 |
| 344 | 345 | ||
| 345 | #define CTL_KERN_NAMES { \ | 346 | #define CTL_KERN_NAMES { \ |
lib/libc/include/any-macos.12-any/sys/ttycom.h deleted-173| ... | @@ -1,173 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * (c) UNIX System Laboratories, Inc. | ||
| 33 | * All or some portions of this file are derived from material licensed | ||
| 34 | * to the University of California by American Telephone and Telegraph | ||
| 35 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 36 | * the permission of UNIX System Laboratories, Inc. | ||
| 37 | * | ||
| 38 | * Redistribution and use in source and binary forms, with or without | ||
| 39 | * modification, are permitted provided that the following conditions | ||
| 40 | * are met: | ||
| 41 | * 1. Redistributions of source code must retain the above copyright | ||
| 42 | * notice, this list of conditions and the following disclaimer. | ||
| 43 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 44 | * notice, this list of conditions and the following disclaimer in the | ||
| 45 | * documentation and/or other materials provided with the distribution. | ||
| 46 | * 3. All advertising materials mentioning features or use of this software | ||
| 47 | * must display the following acknowledgement: | ||
| 48 | * This product includes software developed by the University of | ||
| 49 | * California, Berkeley and its contributors. | ||
| 50 | * 4. Neither the name of the University nor the names of its contributors | ||
| 51 | * may be used to endorse or promote products derived from this software | ||
| 52 | * without specific prior written permission. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 64 | * SUCH DAMAGE. | ||
| 65 | * | ||
| 66 | *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94 | ||
| 67 | */ | ||
| 68 | |||
| 69 | #ifndef _SYS_TTYCOM_H_ | ||
| 70 | #define _SYS_TTYCOM_H_ | ||
| 71 | |||
| 72 | #include <sys/ioccom.h> | ||
| 73 | /* | ||
| 74 | * Tty ioctl's except for those supported only for backwards compatibility | ||
| 75 | * with the old tty driver. | ||
| 76 | */ | ||
| 77 | |||
| 78 | /* | ||
| 79 | * Window/terminal size structure. This information is stored by the kernel | ||
| 80 | * in order to provide a consistent interface, but is not used by the kernel. | ||
| 81 | */ | ||
| 82 | struct winsize { | ||
| 83 | 	unsigned short ws_row; /* rows, in characters */ | ||
| 84 | 	unsigned short ws_col; /* columns, in characters */ | ||
| 85 | 	unsigned short ws_xpixel; /* horizontal size, pixels */ | ||
| 86 | 	unsigned short ws_ypixel; /* vertical size, pixels */ | ||
| 87 | }; | ||
| 88 | |||
| 89 | #define TIOCMODG _IOR('t', 3, int) /* get modem control state */ | ||
| 90 | #define TIOCMODS _IOW('t', 4, int) /* set modem control state */ | ||
| 91 | #define TIOCM_LE 0001 /* line enable */ | ||
| 92 | #define TIOCM_DTR 0002 /* data terminal ready */ | ||
| 93 | #define TIOCM_RTS 0004 /* request to send */ | ||
| 94 | #define TIOCM_ST 0010 /* secondary transmit */ | ||
| 95 | #define TIOCM_SR 0020 /* secondary receive */ | ||
| 96 | #define TIOCM_CTS 0040 /* clear to send */ | ||
| 97 | #define TIOCM_CAR 0100 /* carrier detect */ | ||
| 98 | #define TIOCM_CD TIOCM_CAR | ||
| 99 | #define TIOCM_RNG 0200 /* ring */ | ||
| 100 | #define TIOCM_RI TIOCM_RNG | ||
| 101 | #define TIOCM_DSR 0400 /* data set ready */ | ||
| 102 | /* 8-10 compat */ | ||
| 103 | #define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ | ||
| 104 | #define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ | ||
| 105 | /* 15 unused */ | ||
| 106 | #define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ | ||
| 107 | /* 17-18 compat */ | ||
| 108 | #define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ | ||
| 109 | #define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ | ||
| 110 | #define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ | ||
| 111 | #define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ | ||
| 112 | #define TIOCGETD _IOR('t', 26, int) /* get line discipline */ | ||
| 113 | #define TIOCSETD _IOW('t', 27, int) /* set line discipline */ | ||
| 114 | #define TIOCIXON _IO('t', 129) /* internal input VSTART */ | ||
| 115 | #define TIOCIXOFF _IO('t', 128) /* internal input VSTOP */ | ||
| 116 | /* 127-124 compat */ | ||
| 117 | #define TIOCSBRK _IO('t', 123) /* set break bit */ | ||
| 118 | #define TIOCCBRK _IO('t', 122) /* clear break bit */ | ||
| 119 | #define TIOCSDTR _IO('t', 121) /* set data terminal ready */ | ||
| 120 | #define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ | ||
| 121 | #define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ | ||
| 122 | #define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ | ||
| 123 | /* 117-116 compat */ | ||
| 124 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ | ||
| 125 | #define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ | ||
| 126 | #define TIOCNOTTY _IO('t', 113) /* void tty association */ | ||
| 127 | #define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ | ||
| 128 | #define TIOCPKT_DATA 0x00 /* data packet */ | ||
| 129 | #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ | ||
| 130 | #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ | ||
| 131 | #define TIOCPKT_STOP 0x04 /* stop output */ | ||
| 132 | #define TIOCPKT_START 0x08 /* start output */ | ||
| 133 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | ||
| 134 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | ||
| 135 | #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ | ||
| 136 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ | ||
| 137 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | ||
| 138 | #define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ | ||
| 139 | #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ | ||
| 140 | #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ | ||
| 141 | #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ | ||
| 142 | /* 105 unused */ | ||
| 143 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ | ||
| 144 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ | ||
| 145 | #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ | ||
| 146 | #define TIOCSTAT _IO('t', 101) /* simulate ^T status message */ | ||
| 147 | #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ | ||
| 148 | #define TIOCSCONS _IO('t', 99) /* 4.2 compatibility */ | ||
| 149 | #define TIOCCONS _IOW('t', 98, int) /* become virtual console */ | ||
| 150 | #define TIOCSCTTY _IO('t', 97) /* become controlling tty */ | ||
| 151 | #define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ | ||
| 152 | #define TIOCSIG _IO('t', 95) /* pty: generate signal */ | ||
| 153 | #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ | ||
| 154 | #define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */ | ||
| 155 | #define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */ | ||
| 156 | #define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp | ||
| 157 | 	 * of last input event */ | ||
| 158 | #define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval) /* enable/get timestamp | ||
| 159 | 	 * of last DCd rise */ | ||
| 160 | #define TIOCSDRAINWAIT _IOW('t', 87, int) /* set ttywait timeout */ | ||
| 161 | #define TIOCGDRAINWAIT _IOR('t', 86, int) /* get ttywait timeout */ | ||
| 162 | #define TIOCDSIMICROCODE _IO('t', 85) /* download microcode to | ||
| 163 | 	 * DSI Softmodem */ | ||
| 164 | #define TIOCPTYGRANT _IO('t', 84) /* grantpt(3) */ | ||
| 165 | #define TIOCPTYGNAME _IOC(IOC_OUT, 't', 83, 128) /* ptsname(3) */ | ||
| 166 | #define TIOCPTYUNLK _IO('t', 82) /* unlockpt(3) */ | ||
| 167 | |||
| 168 | #define TTYDISC 0 /* termios tty line discipline */ | ||
| 169 | #define TABLDISC 3 /* tablet discipline */ | ||
| 170 | #define SLIPDISC 4 /* serial IP discipline */ | ||
| 171 | #define PPPDISC 5 /* PPP discipline */ | ||
| 172 | |||
| 173 | #endif /* !_SYS_TTYCOM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/sys/unistd.h created+219| ... | @@ -0,0 +1,219 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2013 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /* | ||
| 30 | * Copyright (c) 1989, 1993 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * | ||
| 33 | * Redistribution and use in source and binary forms, with or without | ||
| 34 | * modification, are permitted provided that the following conditions | ||
| 35 | * are met: | ||
| 36 | * 1. Redistributions of source code must retain the above copyright | ||
| 37 | * notice, this list of conditions and the following disclaimer. | ||
| 38 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 39 | * notice, this list of conditions and the following disclaimer in the | ||
| 40 | * documentation and/or other materials provided with the distribution. | ||
| 41 | * 3. All advertising materials mentioning features or use of this software | ||
| 42 | * must display the following acknowledgement: | ||
| 43 | *	This product includes software developed by the University of | ||
| 44 | *	California, Berkeley and its contributors. | ||
| 45 | * 4. Neither the name of the University nor the names of its contributors | ||
| 46 | * may be used to endorse or promote products derived from this software | ||
| 47 | * without specific prior written permission. | ||
| 48 | * | ||
| 49 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 50 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 51 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 52 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 53 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 54 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 55 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 56 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 57 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 58 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 59 | * SUCH DAMAGE. | ||
| 60 | * | ||
| 61 | *	@(#)unistd.h	8.2 (Berkeley) 1/7/94 | ||
| 62 | */ | ||
| 63 | |||
| 64 | #ifndef _SYS_UNISTD_H_ | ||
| 65 | #define _SYS_UNISTD_H_ | ||
| 66 | |||
| 67 | #include <sys/cdefs.h> | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Although we have saved user/group IDs, we do not use them in setuid | ||
| 71 | * as described in POSIX 1003.1, because the feature does not work for | ||
| 72 | * root. We use the saved IDs in seteuid/setegid, which are not currently | ||
| 73 | * part of the POSIX 1003.1 specification. | ||
| 74 | */ | ||
| 75 | #ifdef _NOT_AVAILABLE | ||
| 76 | #define _POSIX_SAVED_IDS /* saved set-user-ID and set-group-ID */ | ||
| 77 | #endif | ||
| 78 | |||
| 79 | #define _POSIX_VERSION 200112L | ||
| 80 | #define _POSIX2_VERSION 200112L | ||
| 81 | |||
| 82 | /* execution-time symbolic constants */ | ||
| 83 | /* may disable terminal special characters */ | ||
| 84 | #include <sys/_types/_posix_vdisable.h> | ||
| 85 | |||
| 86 | #define _POSIX_THREAD_KEYS_MAX 128 | ||
| 87 | |||
| 88 | /* access function */ | ||
| 89 | #define F_OK 0 /* test for existence of file */ | ||
| 90 | #define X_OK (1<<0) /* test for execute or search permission */ | ||
| 91 | #define W_OK (1<<1) /* test for write permission */ | ||
| 92 | #define R_OK (1<<2) /* test for read permission */ | ||
| 93 | |||
| 94 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 95 | /* | ||
| 96 | * Extended access functions. | ||
| 97 | * Note that we depend on these matching the definitions in sys/kauth.h, | ||
| 98 | * but with the bits shifted left by 8. | ||
| 99 | */ | ||
| 100 | #define _READ_OK (1<<9) /* read file data / read directory */ | ||
| 101 | #define _WRITE_OK (1<<10) /* write file data / add file to directory */ | ||
| 102 | #define _EXECUTE_OK (1<<11) /* execute file / search in directory*/ | ||
| 103 | #define _DELETE_OK (1<<12) /* delete file / delete directory */ | ||
| 104 | #define _APPEND_OK (1<<13) /* append to file / add subdirectory to directory */ | ||
| 105 | #define _RMFILE_OK (1<<14) /* - / remove file from directory */ | ||
| 106 | #define _RATTR_OK (1<<15) /* read basic attributes */ | ||
| 107 | #define _WATTR_OK (1<<16) /* write basic attributes */ | ||
| 108 | #define _REXT_OK (1<<17) /* read extended attributes */ | ||
| 109 | #define _WEXT_OK (1<<18) /* write extended attributes */ | ||
| 110 | #define _RPERM_OK (1<<19) /* read permissions */ | ||
| 111 | #define _WPERM_OK (1<<20) /* write permissions */ | ||
| 112 | #define _CHOWN_OK (1<<21) /* change ownership */ | ||
| 113 | |||
| 114 | #define _ACCESS_EXTENDED_MASK (_READ_OK | _WRITE_OK | _EXECUTE_OK | \ | ||
| 115 | 	 _DELETE_OK | _APPEND_OK | \ | ||
| 116 | 	 _RMFILE_OK | _REXT_OK | \ | ||
| 117 | 	 _WEXT_OK | _RATTR_OK | _WATTR_OK | _RPERM_OK | \ | ||
| 118 | 	 _WPERM_OK | _CHOWN_OK) | ||
| 119 | #endif | ||
| 120 | |||
| 121 | /* whence values for lseek(2) */ | ||
| 122 | #include <sys/_types/_seek_set.h> | ||
| 123 | |||
| 124 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 125 | /* whence values for lseek(2); renamed by POSIX 1003.1 */ | ||
| 126 | #define L_SET SEEK_SET | ||
| 127 | #define L_INCR SEEK_CUR | ||
| 128 | #define L_XTND SEEK_END | ||
| 129 | #endif | ||
| 130 | |||
| 131 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 132 | struct accessx_descriptor { | ||
| 133 | 	unsigned int ad_name_offset; | ||
| 134 | 	int ad_flags; | ||
| 135 | 	int ad_pad[2]; | ||
| 136 | }; | ||
| 137 | #define ACCESSX_MAX_DESCRIPTORS 100 | ||
| 138 | #define ACCESSX_MAX_TABLESIZE (16 * 1024) | ||
| 139 | #endif | ||
| 140 | |||
| 141 | /* configurable pathname variables */ | ||
| 142 | #define _PC_LINK_MAX 1 | ||
| 143 | #define _PC_MAX_CANON 2 | ||
| 144 | #define _PC_MAX_INPUT 3 | ||
| 145 | #define _PC_NAME_MAX 4 | ||
| 146 | #define _PC_PATH_MAX 5 | ||
| 147 | #define _PC_PIPE_BUF 6 | ||
| 148 | #define _PC_CHOWN_RESTRICTED 7 | ||
| 149 | #define _PC_NO_TRUNC 8 | ||
| 150 | #define _PC_VDISABLE 9 | ||
| 151 | |||
| 152 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 153 | #define _PC_NAME_CHARS_MAX 10 | ||
| 154 | #define _PC_CASE_SENSITIVE 11 | ||
| 155 | #define _PC_CASE_PRESERVING 12 | ||
| 156 | #define _PC_EXTENDED_SECURITY_NP 13 | ||
| 157 | #define _PC_AUTH_OPAQUE_NP 14 | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #define _PC_2_SYMLINKS 15 /* Symlink supported in directory */ | ||
| 161 | #define _PC_ALLOC_SIZE_MIN 16 /* Minimum storage actually allocated */ | ||
| 162 | #define _PC_ASYNC_IO 17 /* Async I/O [AIO] supported? */ | ||
| 163 | #define _PC_FILESIZEBITS 18 /* # of bits to represent file size */ | ||
| 164 | #define _PC_PRIO_IO 19 /* Priority I/O [PIO] supported? */ | ||
| 165 | #define _PC_REC_INCR_XFER_SIZE 20 /* Recommended increment for next two */ | ||
| 166 | #define _PC_REC_MAX_XFER_SIZE 21 /* Recommended max file transfer size */ | ||
| 167 | #define _PC_REC_MIN_XFER_SIZE 22 /* Recommended min file transfer size */ | ||
| 168 | #define _PC_REC_XFER_ALIGN 23 /* Recommended buffer alignment */ | ||
| 169 | #define _PC_SYMLINK_MAX 24 /* Max # of bytes in symlink name */ | ||
| 170 | #define _PC_SYNC_IO 25 /* Sync I/O [SIO] supported? */ | ||
| 171 | #define _PC_XATTR_SIZE_BITS 26 /* # of bits to represent maximum xattr size */ | ||
| 172 | #define _PC_MIN_HOLE_SIZE 27 /* Recommended minimum hole size for sparse files */ | ||
| 173 | |||
| 174 | /* configurable system strings */ | ||
| 175 | #define _CS_PATH 1 | ||
| 176 | |||
| 177 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 178 | |||
| 179 | #include <machine/_types.h> | ||
| 180 | #include <sys/_types/_size_t.h> | ||
| 181 | #include <sys/_types/_ssize_t.h> | ||
| 182 | #include <_types/_uint64_t.h> | ||
| 183 | #include <_types/_uint32_t.h> | ||
| 184 | #include <Availability.h> | ||
| 185 | |||
| 186 | __BEGIN_DECLS | ||
| 187 | |||
| 188 | int getattrlistbulk(int, void *, void *, size_t, uint64_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 189 | int getattrlistat(int, const char *, void *, void *, size_t, unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 190 | int setattrlistat(int, const char *, void *, void *, size_t, uint32_t) __OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) __TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 191 | |||
| 192 | __END_DECLS | ||
| 193 | |||
| 194 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 195 | |||
| 196 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 197 | |||
| 198 | #include <machine/_types.h> | ||
| 199 | #include <sys/_types/_size_t.h> | ||
| 200 | #include <sys/_types/_ssize_t.h> | ||
| 201 | #include <sys/_types.h> | ||
| 202 | #include <sys/_types/_uid_t.h> | ||
| 203 | #include <sys/_types/_gid_t.h> | ||
| 204 | #include <Availability.h> | ||
| 205 | |||
| 206 | __BEGIN_DECLS | ||
| 207 | |||
| 208 | int faccessat(int, const char *, int, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 209 | int fchownat(int, const char *, uid_t, gid_t, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 210 | int linkat(int, const char *, int, const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 211 | ssize_t readlinkat(int, const char *, char *, size_t) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 212 | int symlinkat(const char *, int, const char *) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 213 | int unlinkat(int, const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_10, __IPHONE_8_0); | ||
| 214 | |||
| 215 | __END_DECLS | ||
| 216 | |||
| 217 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 218 | |||
| 219 | #endif /* !_SYS_UNISTD_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/time.h created+208| ... | @@ -0,0 +1,208 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 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 <Availability.h> | ||
| 69 | #include <sys/_types/_clock_t.h> | ||
| 70 | #include <sys/_types/_null.h> | ||
| 71 | #include <sys/_types/_size_t.h> | ||
| 72 | #include <sys/_types/_time_t.h> | ||
| 73 | #include <sys/_types/_timespec.h> | ||
| 74 | |||
| 75 | struct tm { | ||
| 76 | 	int	tm_sec;		/* seconds after the minute [0-60] */ | ||
| 77 | 	int	tm_min;		/* minutes after the hour [0-59] */ | ||
| 78 | 	int	tm_hour;	/* hours since midnight [0-23] */ | ||
| 79 | 	int	tm_mday;	/* day of the month [1-31] */ | ||
| 80 | 	int	tm_mon;		/* months since January [0-11] */ | ||
| 81 | 	int	tm_year;	/* years since 1900 */ | ||
| 82 | 	int	tm_wday;	/* days since Sunday [0-6] */ | ||
| 83 | 	int	tm_yday;	/* days since January 1 [0-365] */ | ||
| 84 | 	int	tm_isdst;	/* Daylight Savings Time flag */ | ||
| 85 | 	long	tm_gmtoff;	/* offset from UTC in seconds */ | ||
| 86 | 	char	*tm_zone;	/* timezone abbreviation */ | ||
| 87 | }; | ||
| 88 | |||
| 89 | #if __DARWIN_UNIX03 | ||
| 90 | #define CLOCKS_PER_SEC ((clock_t)1000000)	/* [XSI] */ | ||
| 91 | #else /* !__DARWIN_UNIX03 */ | ||
| 92 | #include <machine/_limits.h>	/* Include file containing CLK_TCK. */ | ||
| 93 | |||
| 94 | #define CLOCKS_PER_SEC ((clock_t)(__DARWIN_CLK_TCK)) | ||
| 95 | #endif /* __DARWIN_UNIX03 */ | ||
| 96 | |||
| 97 | #ifndef _ANSI_SOURCE | ||
| 98 | extern char *tzname[]; | ||
| 99 | #endif | ||
| 100 | |||
| 101 | extern int getdate_err; | ||
| 102 | #if __DARWIN_UNIX03 | ||
| 103 | extern long timezone __DARWIN_ALIAS(timezone); | ||
| 104 | #endif /* __DARWIN_UNIX03 */ | ||
| 105 | extern int daylight; | ||
| 106 | |||
| 107 | __BEGIN_DECLS | ||
| 108 | char *asctime(const struct tm *); | ||
| 109 | clock_t clock(void) __DARWIN_ALIAS(clock); | ||
| 110 | char *ctime(const time_t *); | ||
| 111 | double difftime(time_t, time_t); | ||
| 112 | struct tm *getdate(const char *); | ||
| 113 | struct tm *gmtime(const time_t *); | ||
| 114 | struct tm *localtime(const time_t *); | ||
| 115 | time_t mktime(struct tm *) __DARWIN_ALIAS(mktime); | ||
| 116 | size_t strftime(char * __restrict, size_t, const char * __restrict, const struct tm * __restrict) __DARWIN_ALIAS(strftime); | ||
| 117 | char *strptime(const char * __restrict, const char * __restrict, struct tm * __restrict) __DARWIN_ALIAS(strptime); | ||
| 118 | time_t time(time_t *); | ||
| 119 | |||
| 120 | #ifndef _ANSI_SOURCE | ||
| 121 | void tzset(void); | ||
| 122 | #endif /* not ANSI */ | ||
| 123 | |||
| 124 | /* [TSF] Thread safe functions */ | ||
| 125 | char *asctime_r(const struct tm * __restrict, char * __restrict); | ||
| 126 | char *ctime_r(const time_t *, char *); | ||
| 127 | struct tm *gmtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 128 | struct tm *localtime_r(const time_t * __restrict, struct tm * __restrict); | ||
| 129 | |||
| 130 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) | ||
| 131 | time_t posix2time(time_t); | ||
| 132 | #if !__DARWIN_UNIX03 | ||
| 133 | char *timezone(int, int); | ||
| 134 | #endif /* !__DARWIN_UNIX03 */ | ||
| 135 | void tzsetwall(void); | ||
| 136 | time_t time2posix(time_t); | ||
| 137 | time_t timelocal(struct tm * const); | ||
| 138 | time_t timegm(struct tm * const); | ||
| 139 | #endif /* neither ANSI nor POSIX */ | ||
| 140 | |||
| 141 | #if !defined(_ANSI_SOURCE) | ||
| 142 | int nanosleep(const struct timespec *__rqtp, struct timespec *__rmtp) __DARWIN_ALIAS_C(nanosleep); | ||
| 143 | #endif | ||
| 144 | |||
| 145 | #if !defined(_DARWIN_FEATURE_CLOCK_GETTIME) || _DARWIN_FEATURE_CLOCK_GETTIME != 0 | ||
| 146 | #if __DARWIN_C_LEVEL >= 199309L | ||
| 147 | #if __has_feature(enumerator_attributes) | ||
| 148 | #define __CLOCK_AVAILABILITY __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 149 | #else | ||
| 150 | #define __CLOCK_AVAILABILITY | ||
| 151 | #endif | ||
| 152 | |||
| 153 | typedef enum { | ||
| 154 | _CLOCK_REALTIME __CLOCK_AVAILABILITY = 0, | ||
| 155 | #define CLOCK_REALTIME _CLOCK_REALTIME | ||
| 156 | _CLOCK_MONOTONIC __CLOCK_AVAILABILITY = 6, | ||
| 157 | #define CLOCK_MONOTONIC _CLOCK_MONOTONIC | ||
| 158 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 159 | _CLOCK_MONOTONIC_RAW __CLOCK_AVAILABILITY = 4, | ||
| 160 | #define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW | ||
| 161 | _CLOCK_MONOTONIC_RAW_APPROX __CLOCK_AVAILABILITY = 5, | ||
| 162 | #define CLOCK_MONOTONIC_RAW_APPROX _CLOCK_MONOTONIC_RAW_APPROX | ||
| 163 | _CLOCK_UPTIME_RAW __CLOCK_AVAILABILITY = 8, | ||
| 164 | #define CLOCK_UPTIME_RAW _CLOCK_UPTIME_RAW | ||
| 165 | _CLOCK_UPTIME_RAW_APPROX __CLOCK_AVAILABILITY = 9, | ||
| 166 | #define CLOCK_UPTIME_RAW_APPROX _CLOCK_UPTIME_RAW_APPROX | ||
| 167 | #endif | ||
| 168 | _CLOCK_PROCESS_CPUTIME_ID __CLOCK_AVAILABILITY = 12, | ||
| 169 | #define CLOCK_PROCESS_CPUTIME_ID _CLOCK_PROCESS_CPUTIME_ID | ||
| 170 | _CLOCK_THREAD_CPUTIME_ID __CLOCK_AVAILABILITY = 16 | ||
| 171 | #define CLOCK_THREAD_CPUTIME_ID _CLOCK_THREAD_CPUTIME_ID | ||
| 172 | } clockid_t; | ||
| 173 | |||
| 174 | __CLOCK_AVAILABILITY | ||
| 175 | int clock_getres(clockid_t __clock_id, struct timespec *__res); | ||
| 176 | |||
| 177 | __CLOCK_AVAILABILITY | ||
| 178 | int clock_gettime(clockid_t __clock_id, struct timespec *__tp); | ||
| 179 | |||
| 180 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 181 | __CLOCK_AVAILABILITY | ||
| 182 | __uint64_t clock_gettime_nsec_np(clockid_t __clock_id); | ||
| 183 | #endif | ||
| 184 | |||
| 185 | __OSX_AVAILABLE(10.12) __IOS_PROHIBITED | ||
| 186 | __TVOS_PROHIBITED __WATCHOS_PROHIBITED | ||
| 187 | int clock_settime(clockid_t __clock_id, const struct timespec *__tp); | ||
| 188 | |||
| 189 | #undef __CLOCK_AVAILABILITY | ||
| 190 | #endif /* __DARWIN_C_LEVEL */ | ||
| 191 | #endif /* _DARWIN_FEATURE_CLOCK_GETTIME */ | ||
| 192 | |||
| 193 | #if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) || \ | ||
| 194 | (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ | ||
| 195 | (defined(__cplusplus) && __cplusplus >= 201703L) | ||
| 196 | /* ISO/IEC 9899:201x 7.27.2.5 The timespec_get function */ | ||
| 197 | #define TIME_UTC	1	/* time elapsed since epoch */ | ||
| 198 | __API_AVAILABLE(macosx(10.15), ios(13.0), tvos(13.0), watchos(6.0)) | ||
| 199 | int timespec_get(struct timespec *ts, int base); | ||
| 200 | #endif | ||
| 201 | |||
| 202 | __END_DECLS | ||
| 203 | |||
| 204 | #ifdef _USE_EXTENDED_LOCALES_ | ||
| 205 | #include <xlocale/_time.h> | ||
| 206 | #endif /* _USE_EXTENDED_LOCALES_ */ | ||
| 207 | |||
| 208 | #endif /* !_TIME_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/unistd.h deleted-791| ... | @@ -1,791 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 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) 1998-1999 Apple Computer, Inc. All Rights Reserved | ||
| 25 | * Copyright (c) 1991, 1993, 1994 | ||
| 26 | *	The Regents of the University of California. All rights reserved. | ||
| 27 | * | ||
| 28 | * Redistribution and use in source and binary forms, with or without | ||
| 29 | * modification, are permitted provided that the following conditions | ||
| 30 | * are met: | ||
| 31 | * 1. Redistributions of source code must retain the above copyright | ||
| 32 | * notice, this list of conditions and the following disclaimer. | ||
| 33 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 34 | * notice, this list of conditions and the following disclaimer in the | ||
| 35 | * documentation and/or other materials provided with the distribution. | ||
| 36 | * 3. All advertising materials mentioning features or use of this software | ||
| 37 | * must display the following acknowledgement: | ||
| 38 | *	This product includes software developed by the University of | ||
| 39 | *	California, Berkeley and its contributors. | ||
| 40 | * 4. Neither the name of the University nor the names of its contributors | ||
| 41 | * may be used to endorse or promote products derived from this software | ||
| 42 | * without specific prior written permission. | ||
| 43 | * | ||
| 44 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 45 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 46 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 47 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 48 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 49 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 50 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 51 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 52 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 53 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 54 | * SUCH DAMAGE. | ||
| 55 | * | ||
| 56 | *	@(#)unistd.h	8.12 (Berkeley) 4/27/95 | ||
| 57 | * | ||
| 58 | * Copyright (c) 1998 Apple Compter, Inc. | ||
| 59 | * All Rights Reserved | ||
| 60 | */ | ||
| 61 | |||
| 62 | /* History: | ||
| 63 | 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr | ||
| 64 | 3/26/98 CHW at Apple added real interface to searchfs call | ||
| 65 | 	3/5/98 CHW at Apple added hfs semantic system calls headers | ||
| 66 | */ | ||
| 67 | |||
| 68 | #ifndef _UNISTD_H_ | ||
| 69 | #define	_UNISTD_H_ | ||
| 70 | |||
| 71 | #include <_types.h> | ||
| 72 | #include <sys/unistd.h> | ||
| 73 | #include <Availability.h> | ||
| 74 | #include <sys/_types/_gid_t.h> | ||
| 75 | #include <sys/_types/_intptr_t.h> | ||
| 76 | #include <sys/_types/_off_t.h> | ||
| 77 | #include <sys/_types/_pid_t.h> | ||
| 78 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | ||
| 79 | * _GCC_SIZE_T */ | ||
| 80 | #include <sys/_types/_size_t.h> | ||
| 81 | #include <sys/_types/_ssize_t.h> | ||
| 82 | #include <sys/_types/_uid_t.h> | ||
| 83 | #include <sys/_types/_useconds_t.h> | ||
| 84 | #include <sys/_types/_null.h> | ||
| 85 | |||
| 86 | #define	 STDIN_FILENO	0	/* standard input file descriptor */ | ||
| 87 | #define	STDOUT_FILENO	1	/* standard output file descriptor */ | ||
| 88 | #define	STDERR_FILENO	2	/* standard error file descriptor */ | ||
| 89 | |||
| 90 | |||
| 91 | /* Version test macros */ | ||
| 92 | /* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ | ||
| 93 | #define	_XOPEN_VERSION			600		/* [XSI] */ | ||
| 94 | #define	_XOPEN_XCU_VERSION		4		/* Older standard */ | ||
| 95 | |||
| 96 | |||
| 97 | /* Please keep this list in the same order as the applicable standard */ | ||
| 98 | #define	_POSIX_ADVISORY_INFO		(-1)		/* [ADV] */ | ||
| 99 | #define	_POSIX_ASYNCHRONOUS_IO		(-1)		/* [AIO] */ | ||
| 100 | #define	_POSIX_BARRIERS			(-1)		/* [BAR] */ | ||
| 101 | #define	_POSIX_CHOWN_RESTRICTED		200112L | ||
| 102 | #define	_POSIX_CLOCK_SELECTION		(-1)		/* [CS] */ | ||
| 103 | #define	_POSIX_CPUTIME			(-1)		/* [CPT] */ | ||
| 104 | #define	_POSIX_FSYNC			200112L		/* [FSC] */ | ||
| 105 | #define	_POSIX_IPV6			200112L | ||
| 106 | #define	_POSIX_JOB_CONTROL		200112L | ||
| 107 | #define	_POSIX_MAPPED_FILES		200112L		/* [MF] */ | ||
| 108 | #define	_POSIX_MEMLOCK			(-1)		/* [ML] */ | ||
| 109 | #define	_POSIX_MEMLOCK_RANGE		(-1)		/* [MR] */ | ||
| 110 | #define	_POSIX_MEMORY_PROTECTION	200112L		/* [MPR] */ | ||
| 111 | #define	_POSIX_MESSAGE_PASSING		(-1)		/* [MSG] */ | ||
| 112 | #define	_POSIX_MONOTONIC_CLOCK		(-1)		/* [MON] */ | ||
| 113 | #define	_POSIX_NO_TRUNC			200112L | ||
| 114 | #define	_POSIX_PRIORITIZED_IO		(-1)		/* [PIO] */ | ||
| 115 | #define	_POSIX_PRIORITY_SCHEDULING	(-1)		/* [PS] */ | ||
| 116 | #define	_POSIX_RAW_SOCKETS		(-1)		/* [RS] */ | ||
| 117 | #define	_POSIX_READER_WRITER_LOCKS	200112L		/* [THR] */ | ||
| 118 | #define	_POSIX_REALTIME_SIGNALS		(-1)		/* [RTS] */ | ||
| 119 | #define	_POSIX_REGEXP			200112L | ||
| 120 | #define	_POSIX_SAVED_IDS		200112L		/* XXX required */ | ||
| 121 | #define	_POSIX_SEMAPHORES		(-1)		/* [SEM] */ | ||
| 122 | #define	_POSIX_SHARED_MEMORY_OBJECTS	(-1)		/* [SHM] */ | ||
| 123 | #define	_POSIX_SHELL			200112L | ||
| 124 | #define	_POSIX_SPAWN			(-1)		/* [SPN] */ | ||
| 125 | #define	_POSIX_SPIN_LOCKS		(-1)		/* [SPI] */ | ||
| 126 | #define	_POSIX_SPORADIC_SERVER		(-1)		/* [SS] */ | ||
| 127 | #define	_POSIX_SYNCHRONIZED_IO		(-1)		/* [SIO] */ | ||
| 128 | #define	_POSIX_THREAD_ATTR_STACKADDR	200112L		/* [TSA] */ | ||
| 129 | #define	_POSIX_THREAD_ATTR_STACKSIZE	200112L		/* [TSS] */ | ||
| 130 | #define	_POSIX_THREAD_CPUTIME		(-1)		/* [TCT] */ | ||
| 131 | #define	_POSIX_THREAD_PRIO_INHERIT	(-1)		/* [TPI] */ | ||
| 132 | #define	_POSIX_THREAD_PRIO_PROTECT	(-1)		/* [TPP] */ | ||
| 133 | #define	_POSIX_THREAD_PRIORITY_SCHEDULING	(-1)	/* [TPS] */ | ||
| 134 | #define	_POSIX_THREAD_PROCESS_SHARED	200112L		/* [TSH] */ | ||
| 135 | #define	_POSIX_THREAD_SAFE_FUNCTIONS	200112L		/* [TSF] */ | ||
| 136 | #define	_POSIX_THREAD_SPORADIC_SERVER	(-1)		/* [TSP] */ | ||
| 137 | #define	_POSIX_THREADS			200112L		/* [THR] */ | ||
| 138 | #define	_POSIX_TIMEOUTS			(-1)		/* [TMO] */ | ||
| 139 | #define	_POSIX_TIMERS			(-1)		/* [TMR] */ | ||
| 140 | #define	_POSIX_TRACE			(-1)		/* [TRC] */ | ||
| 141 | #define	_POSIX_TRACE_EVENT_FILTER	(-1)		/* [TEF] */ | ||
| 142 | #define	_POSIX_TRACE_INHERIT		(-1)		/* [TRI] */ | ||
| 143 | #define	_POSIX_TRACE_LOG		(-1)		/* [TRL] */ | ||
| 144 | #define	_POSIX_TYPED_MEMORY_OBJECTS	(-1)		/* [TYM] */ | ||
| 145 | #ifndef _POSIX_VDISABLE | ||
| 146 | #define	_POSIX_VDISABLE			0xff		/* same as sys/termios.h */ | ||
| 147 | #endif /* _POSIX_VDISABLE */ | ||
| 148 | |||
| 149 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 150 | #define	_POSIX2_C_BIND			200112L | ||
| 151 | #define	_POSIX2_C_DEV			200112L		/* c99 command */ | ||
| 152 | #define	_POSIX2_CHAR_TERM		200112L | ||
| 153 | #define	_POSIX2_FORT_DEV		(-1)		/* fort77 command */ | ||
| 154 | #define	_POSIX2_FORT_RUN		200112L | ||
| 155 | #define	_POSIX2_LOCALEDEF		200112L		/* localedef command */ | ||
| 156 | #define	_POSIX2_PBS			(-1) | ||
| 157 | #define	_POSIX2_PBS_ACCOUNTING		(-1) | ||
| 158 | #define	_POSIX2_PBS_CHECKPOINT		(-1) | ||
| 159 | #define	_POSIX2_PBS_LOCATE		(-1) | ||
| 160 | #define	_POSIX2_PBS_MESSAGE		(-1) | ||
| 161 | #define	_POSIX2_PBS_TRACK		(-1) | ||
| 162 | #define	_POSIX2_SW_DEV			200112L | ||
| 163 | #define	_POSIX2_UPE			200112L	/* XXXX no fc, newgrp, tabs */ | ||
| 164 | #endif /* __DARWIN_C_LEVEL */ | ||
| 165 | |||
| 166 | #define	__ILP32_OFF32 (-1) | ||
| 167 | #define	__ILP32_OFFBIG (-1) | ||
| 168 | |||
| 169 | #define	__LP64_OFF64 (1) | ||
| 170 | #define	__LPBIG_OFFBIG (1) | ||
| 171 | |||
| 172 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 173 | #define	_POSIX_V6_ILP32_OFF32		__ILP32_OFF32 | ||
| 174 | #define	_POSIX_V6_ILP32_OFFBIG		__ILP32_OFFBIG | ||
| 175 | #define	_POSIX_V6_LP64_OFF64		__LP64_OFF64 | ||
| 176 | #define	_POSIX_V6_LPBIG_OFFBIG		__LPBIG_OFFBIG | ||
| 177 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 178 | |||
| 179 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 180 | #define	_POSIX_V7_ILP32_OFF32		__ILP32_OFF32 | ||
| 181 | #define	_POSIX_V7_ILP32_OFFBIG		__ILP32_OFFBIG | ||
| 182 | #define	_POSIX_V7_LP64_OFF64		__LP64_OFF64 | ||
| 183 | #define	_POSIX_V7_LPBIG_OFFBIG		__LPBIG_OFFBIG | ||
| 184 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 185 | |||
| 186 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 187 | #define	_V6_ILP32_OFF32 __ILP32_OFF32 | ||
| 188 | #define	_V6_ILP32_OFFBIG __ILP32_OFFBIG | ||
| 189 | #define	_V6_LP64_OFF64 __LP64_OFF64 | ||
| 190 | #define	_V6_LPBIG_OFFBIG __LPBIG_OFFBIG | ||
| 191 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 192 | |||
| 193 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 194 | /* Removed in Issue 7 */ | ||
| 195 | #define	_XBS5_ILP32_OFF32		 __ILP32_OFF32 | ||
| 196 | #define	_XBS5_ILP32_OFFBIG		 __ILP32_OFFBIG | ||
| 197 | #define	_XBS5_LP64_OFF64		 __LP64_OFF64 | ||
| 198 | #define	_XBS5_LPBIG_OFFBIG		 __LPBIG_OFFBIG | ||
| 199 | #endif /* __DARWIN_C_LEVEL < 200809L */ | ||
| 200 | |||
| 201 | #if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */ | ||
| 202 | #define	_XOPEN_CRYPT			(1) | ||
| 203 | #define	_XOPEN_ENH_I18N			(1)		/* XXX required */ | ||
| 204 | #define	_XOPEN_LEGACY			(-1)	/* no ftime gcvt, wcswcs */ | ||
| 205 | #define	_XOPEN_REALTIME			(-1)	/* no q'ed signals, mq_* */ | ||
| 206 | #define	_XOPEN_REALTIME_THREADS		(-1)	/* no posix_spawn, et. al. */ | ||
| 207 | #define	_XOPEN_SHM			(1) | ||
| 208 | #define	_XOPEN_STREAMS			(-1) /* Issue 6 */ | ||
| 209 | #define	_XOPEN_UNIX			(1) | ||
| 210 | #endif /* XSI */ | ||
| 211 | |||
| 212 | /* configurable system variables */ | ||
| 213 | #define	_SC_ARG_MAX			 1 | ||
| 214 | #define	_SC_CHILD_MAX			 2 | ||
| 215 | #define	_SC_CLK_TCK			 3 | ||
| 216 | #define	_SC_NGROUPS_MAX			 4 | ||
| 217 | #define	_SC_OPEN_MAX			 5 | ||
| 218 | #define	_SC_JOB_CONTROL			 6 | ||
| 219 | #define	_SC_SAVED_IDS			 7 | ||
| 220 | #define	_SC_VERSION			 8 | ||
| 221 | #define	_SC_BC_BASE_MAX			 9 | ||
| 222 | #define	_SC_BC_DIM_MAX			10 | ||
| 223 | #define	_SC_BC_SCALE_MAX		11 | ||
| 224 | #define	_SC_BC_STRING_MAX		12 | ||
| 225 | #define	_SC_COLL_WEIGHTS_MAX		13 | ||
| 226 | #define	_SC_EXPR_NEST_MAX		14 | ||
| 227 | #define	_SC_LINE_MAX			15 | ||
| 228 | #define	_SC_RE_DUP_MAX			16 | ||
| 229 | #define	_SC_2_VERSION			17 | ||
| 230 | #define	_SC_2_C_BIND			18 | ||
| 231 | #define	_SC_2_C_DEV			19 | ||
| 232 | #define	_SC_2_CHAR_TERM			20 | ||
| 233 | #define	_SC_2_FORT_DEV			21 | ||
| 234 | #define	_SC_2_FORT_RUN			22 | ||
| 235 | #define	_SC_2_LOCALEDEF			23 | ||
| 236 | #define	_SC_2_SW_DEV			24 | ||
| 237 | #define	_SC_2_UPE			25 | ||
| 238 | #define	_SC_STREAM_MAX			26 | ||
| 239 | #define	_SC_TZNAME_MAX			27 | ||
| 240 | |||
| 241 | #if __DARWIN_C_LEVEL >= 199309L | ||
| 242 | #define	_SC_ASYNCHRONOUS_IO		28 | ||
| 243 | #define	_SC_PAGESIZE			29 | ||
| 244 | #define	_SC_MEMLOCK			30 | ||
| 245 | #define	_SC_MEMLOCK_RANGE		31 | ||
| 246 | #define	_SC_MEMORY_PROTECTION		32 | ||
| 247 | #define	_SC_MESSAGE_PASSING		33 | ||
| 248 | #define	_SC_PRIORITIZED_IO		34 | ||
| 249 | #define	_SC_PRIORITY_SCHEDULING		35 | ||
| 250 | #define	_SC_REALTIME_SIGNALS		36 | ||
| 251 | #define	_SC_SEMAPHORES			37 | ||
| 252 | #define	_SC_FSYNC			38 | ||
| 253 | #define	_SC_SHARED_MEMORY_OBJECTS 	39 | ||
| 254 | #define	_SC_SYNCHRONIZED_IO		40 | ||
| 255 | #define	_SC_TIMERS			41 | ||
| 256 | #define	_SC_AIO_LISTIO_MAX		42 | ||
| 257 | #define	_SC_AIO_MAX			43 | ||
| 258 | #define	_SC_AIO_PRIO_DELTA_MAX		44 | ||
| 259 | #define	_SC_DELAYTIMER_MAX		45 | ||
| 260 | #define	_SC_MQ_OPEN_MAX			46 | ||
| 261 | #define	_SC_MAPPED_FILES		47	/* swap _SC_PAGESIZE vs. BSD */ | ||
| 262 | #define	_SC_RTSIG_MAX			48 | ||
| 263 | #define	_SC_SEM_NSEMS_MAX		49 | ||
| 264 | #define	_SC_SEM_VALUE_MAX		50 | ||
| 265 | #define	_SC_SIGQUEUE_MAX		51 | ||
| 266 | #define	_SC_TIMER_MAX			52 | ||
| 267 | #endif /* __DARWIN_C_LEVEL >= 199309L */ | ||
| 268 | |||
| 269 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 270 | #define	_SC_NPROCESSORS_CONF		57 | ||
| 271 | #define	_SC_NPROCESSORS_ONLN		58 | ||
| 272 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 273 | |||
| 274 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 275 | #define	_SC_2_PBS			59 | ||
| 276 | #define	_SC_2_PBS_ACCOUNTING		60 | ||
| 277 | #define	_SC_2_PBS_CHECKPOINT		61 | ||
| 278 | #define	_SC_2_PBS_LOCATE		62 | ||
| 279 | #define	_SC_2_PBS_MESSAGE		63 | ||
| 280 | #define	_SC_2_PBS_TRACK			64 | ||
| 281 | #define	_SC_ADVISORY_INFO		65 | ||
| 282 | #define	_SC_BARRIERS			66 | ||
| 283 | #define	_SC_CLOCK_SELECTION		67 | ||
| 284 | #define	_SC_CPUTIME			68 | ||
| 285 | #define	_SC_FILE_LOCKING		69 | ||
| 286 | #define	_SC_GETGR_R_SIZE_MAX		70 | ||
| 287 | #define	_SC_GETPW_R_SIZE_MAX		71 | ||
| 288 | #define	_SC_HOST_NAME_MAX		72 | ||
| 289 | #define	_SC_LOGIN_NAME_MAX		73 | ||
| 290 | #define	_SC_MONOTONIC_CLOCK		74 | ||
| 291 | #define	_SC_MQ_PRIO_MAX			75 | ||
| 292 | #define	_SC_READER_WRITER_LOCKS		76 | ||
| 293 | #define	_SC_REGEXP			77 | ||
| 294 | #define	_SC_SHELL			78 | ||
| 295 | #define	_SC_SPAWN			79 | ||
| 296 | #define	_SC_SPIN_LOCKS			80 | ||
| 297 | #define	_SC_SPORADIC_SERVER		81 | ||
| 298 | #define	_SC_THREAD_ATTR_STACKADDR	82 | ||
| 299 | #define	_SC_THREAD_ATTR_STACKSIZE	83 | ||
| 300 | #define	_SC_THREAD_CPUTIME		84 | ||
| 301 | #define	_SC_THREAD_DESTRUCTOR_ITERATIONS 85 | ||
| 302 | #define	_SC_THREAD_KEYS_MAX		86 | ||
| 303 | #define	_SC_THREAD_PRIO_INHERIT		87 | ||
| 304 | #define	_SC_THREAD_PRIO_PROTECT		88 | ||
| 305 | #define	_SC_THREAD_PRIORITY_SCHEDULING	89 | ||
| 306 | #define	_SC_THREAD_PROCESS_SHARED	90 | ||
| 307 | #define	_SC_THREAD_SAFE_FUNCTIONS	91 | ||
| 308 | #define	_SC_THREAD_SPORADIC_SERVER	92 | ||
| 309 | #define	_SC_THREAD_STACK_MIN		93 | ||
| 310 | #define	_SC_THREAD_THREADS_MAX		94 | ||
| 311 | #define	_SC_TIMEOUTS			95 | ||
| 312 | #define	_SC_THREADS			96 | ||
| 313 | #define	_SC_TRACE			97 | ||
| 314 | #define	_SC_TRACE_EVENT_FILTER		98 | ||
| 315 | #define	_SC_TRACE_INHERIT		99 | ||
| 316 | #define	_SC_TRACE_LOG			100 | ||
| 317 | #define	_SC_TTY_NAME_MAX		101 | ||
| 318 | #define	_SC_TYPED_MEMORY_OBJECTS	102 | ||
| 319 | #define	_SC_V6_ILP32_OFF32		103 | ||
| 320 | #define	_SC_V6_ILP32_OFFBIG		104 | ||
| 321 | #define	_SC_V6_LP64_OFF64		105 | ||
| 322 | #define	_SC_V6_LPBIG_OFFBIG		106 | ||
| 323 | #define	_SC_IPV6			118 | ||
| 324 | #define	_SC_RAW_SOCKETS			119 | ||
| 325 | #define	_SC_SYMLOOP_MAX			120 | ||
| 326 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 327 | |||
| 328 | #if __DARWIN_C_LEVEL >= 199506L /* Really XSI */ | ||
| 329 | #define	_SC_ATEXIT_MAX			107 | ||
| 330 | #define	_SC_IOV_MAX			56 | ||
| 331 | #define	_SC_PAGE_SIZE			_SC_PAGESIZE | ||
| 332 | #define	_SC_XOPEN_CRYPT			108 | ||
| 333 | #define	_SC_XOPEN_ENH_I18N		109 | ||
| 334 | #define	_SC_XOPEN_LEGACY		110 /* Issue 6 */ | ||
| 335 | #define	_SC_XOPEN_REALTIME		111 /* Issue 6 */ | ||
| 336 | #define	_SC_XOPEN_REALTIME_THREADS	112 /* Issue 6 */ | ||
| 337 | #define	_SC_XOPEN_SHM			113 | ||
| 338 | #define	_SC_XOPEN_STREAMS		114 /* Issue 6 */ | ||
| 339 | #define	_SC_XOPEN_UNIX			115 | ||
| 340 | #define	_SC_XOPEN_VERSION		116 | ||
| 341 | #define	_SC_XOPEN_XCU_VERSION		121 | ||
| 342 | #endif /* XSI */ | ||
| 343 | |||
| 344 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 345 | /* Removed in Issue 7 */ | ||
| 346 | #define	_SC_XBS5_ILP32_OFF32		122 | ||
| 347 | #define	_SC_XBS5_ILP32_OFFBIG		123 | ||
| 348 | #define	_SC_XBS5_LP64_OFF64		124 | ||
| 349 | #define	_SC_XBS5_LPBIG_OFFBIG		125 | ||
| 350 | #endif /* __DARWIN_C_LEVEL <= 200809L */ | ||
| 351 | |||
| 352 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 353 | #define	_SC_SS_REPL_MAX			126 | ||
| 354 | #define	_SC_TRACE_EVENT_NAME_MAX	127 | ||
| 355 | #define	_SC_TRACE_NAME_MAX		128 | ||
| 356 | #define	_SC_TRACE_SYS_MAX		129 | ||
| 357 | #define	_SC_TRACE_USER_EVENT_MAX	130 | ||
| 358 | #endif | ||
| 359 | |||
| 360 | #if __DARWIN_C_LEVEL < 200112L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 361 | /* Removed in Issue 6 */ | ||
| 362 | #define	_SC_PASS_MAX			131 | ||
| 363 | #endif | ||
| 364 | |||
| 365 | /* 132-199 available for future use */ | ||
| 366 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 367 | #define	_SC_PHYS_PAGES			200 | ||
| 368 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 369 | |||
| 370 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 371 | #ifndef _CS_PATH /* Defined in <sys/unistd.h> */ | ||
| 372 | #define	_CS_PATH				1 | ||
| 373 | #endif | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #if __DARWIN_C_LEVEL >= 200112 | ||
| 377 | #define	_CS_POSIX_V6_ILP32_OFF32_CFLAGS		2 | ||
| 378 | #define	_CS_POSIX_V6_ILP32_OFF32_LDFLAGS	3 | ||
| 379 | #define	_CS_POSIX_V6_ILP32_OFF32_LIBS		4 | ||
| 380 | #define	_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	5 | ||
| 381 | #define	_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	6 | ||
| 382 | #define	_CS_POSIX_V6_ILP32_OFFBIG_LIBS		7 | ||
| 383 | #define	_CS_POSIX_V6_LP64_OFF64_CFLAGS		8 | ||
| 384 | #define	_CS_POSIX_V6_LP64_OFF64_LDFLAGS		9 | ||
| 385 | #define	_CS_POSIX_V6_LP64_OFF64_LIBS		10 | ||
| 386 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	11 | ||
| 387 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	12 | ||
| 388 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_LIBS		13 | ||
| 389 | #define	_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	14 | ||
| 390 | #endif | ||
| 391 | |||
| 392 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 393 | /* Removed in Issue 7 */ | ||
| 394 | #define	_CS_XBS5_ILP32_OFF32_CFLAGS		20 | ||
| 395 | #define	_CS_XBS5_ILP32_OFF32_LDFLAGS		21 | ||
| 396 | #define	_CS_XBS5_ILP32_OFF32_LIBS		22 | ||
| 397 | #define	_CS_XBS5_ILP32_OFF32_LINTFLAGS		23 | ||
| 398 | #define	_CS_XBS5_ILP32_OFFBIG_CFLAGS		24 | ||
| 399 | #define	_CS_XBS5_ILP32_OFFBIG_LDFLAGS		25 | ||
| 400 | #define	_CS_XBS5_ILP32_OFFBIG_LIBS		26 | ||
| 401 | #define	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS		27 | ||
| 402 | #define	_CS_XBS5_LP64_OFF64_CFLAGS		28 | ||
| 403 | #define	_CS_XBS5_LP64_OFF64_LDFLAGS		29 | ||
| 404 | #define	_CS_XBS5_LP64_OFF64_LIBS		30 | ||
| 405 | #define	_CS_XBS5_LP64_OFF64_LINTFLAGS		31 | ||
| 406 | #define	_CS_XBS5_LPBIG_OFFBIG_CFLAGS		32 | ||
| 407 | #define	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS		33 | ||
| 408 | #define	_CS_XBS5_LPBIG_OFFBIG_LIBS		34 | ||
| 409 | #define	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS		35 | ||
| 410 | #endif | ||
| 411 | |||
| 412 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 413 | #define	_CS_DARWIN_USER_DIR			65536 | ||
| 414 | #define	_CS_DARWIN_USER_TEMP_DIR		65537 | ||
| 415 | #define	_CS_DARWIN_USER_CACHE_DIR		65538 | ||
| 416 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 417 | |||
| 418 | |||
| 419 | #ifdef _DARWIN_UNLIMITED_GETGROUPS | ||
| 420 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 | ||
| 421 | #error "_DARWIN_UNLIMITED_GETGROUPS specified, but -miphoneos-version-min version does not support it." | ||
| 422 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 | ||
| 423 | #error "_DARWIN_UNLIMITED_GETGROUPS specified, but -mmacosx-version-min version does not support it." | ||
| 424 | #endif | ||
| 425 | #endif | ||
| 426 | |||
| 427 | /* POSIX.1-1990 */ | ||
| 428 | |||
| 429 | __BEGIN_DECLS | ||
| 430 | void	 _exit(int) __dead2; | ||
| 431 | int	 access(const char *, int); | ||
| 432 | unsigned int | ||
| 433 | 	 alarm(unsigned int); | ||
| 434 | int	 chdir(const char *); | ||
| 435 | int	 chown(const char *, uid_t, gid_t); | ||
| 436 | |||
| 437 | int	 close(int) __DARWIN_ALIAS_C(close); | ||
| 438 | |||
| 439 | int	 dup(int); | ||
| 440 | int	 dup2(int, int); | ||
| 441 | int	 execl(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 442 | int	 execle(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 443 | int	 execlp(const char * __file, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 444 | int	 execv(const char * __path, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 445 | int	 execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 446 | int	 execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 447 | pid_t	 fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 448 | long	 fpathconf(int, int); | ||
| 449 | char	*getcwd(char *, size_t); | ||
| 450 | gid_t	 getegid(void); | ||
| 451 | uid_t	 geteuid(void); | ||
| 452 | gid_t	 getgid(void); | ||
| 453 | #if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE) | ||
| 454 | int	 getgroups(int, gid_t []) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(getgroups)); | ||
| 455 | #else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */ | ||
| 456 | int	 getgroups(int, gid_t []); | ||
| 457 | #endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */ | ||
| 458 | char	*getlogin(void); | ||
| 459 | pid_t	 getpgrp(void); | ||
| 460 | pid_t	 getpid(void); | ||
| 461 | pid_t	 getppid(void); | ||
| 462 | uid_t	 getuid(void); | ||
| 463 | int	 isatty(int); | ||
| 464 | int	 link(const char *, const char *); | ||
| 465 | off_t	 lseek(int, off_t, int); | ||
| 466 | long	 pathconf(const char *, int); | ||
| 467 | |||
| 468 | int	 pause(void) __DARWIN_ALIAS_C(pause); | ||
| 469 | |||
| 470 | int	 pipe(int [2]); | ||
| 471 | |||
| 472 | ssize_t	 read(int, void *, size_t) __DARWIN_ALIAS_C(read); | ||
| 473 | |||
| 474 | int	 rmdir(const char *); | ||
| 475 | int	 setgid(gid_t); | ||
| 476 | int	 setpgid(pid_t, pid_t); | ||
| 477 | pid_t	 setsid(void); | ||
| 478 | int	 setuid(uid_t); | ||
| 479 | |||
| 480 | unsigned int | ||
| 481 | 	 sleep(unsigned int) __DARWIN_ALIAS_C(sleep); | ||
| 482 | |||
| 483 | long	 sysconf(int); | ||
| 484 | pid_t	 tcgetpgrp(int); | ||
| 485 | int	 tcsetpgrp(int, pid_t); | ||
| 486 | char	*ttyname(int); | ||
| 487 | |||
| 488 | #if __DARWIN_UNIX03 | ||
| 489 | int	 ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); | ||
| 490 | #else /* !__DARWIN_UNIX03 */ | ||
| 491 | char	*ttyname_r(int, char *, size_t); | ||
| 492 | #endif /* __DARWIN_UNIX03 */ | ||
| 493 | |||
| 494 | int	 unlink(const char *); | ||
| 495 | |||
| 496 | ssize_t	 write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write); | ||
| 497 | __END_DECLS | ||
| 498 | |||
| 499 | |||
| 500 | |||
| 501 | /* Additional functionality provided by: | ||
| 502 | * POSIX.2-1992 C Language Binding Option | ||
| 503 | */ | ||
| 504 | |||
| 505 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 506 | __BEGIN_DECLS | ||
| 507 | size_t	 confstr(int, char *, size_t) __DARWIN_ALIAS(confstr); | ||
| 508 | |||
| 509 | int	 getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); | ||
| 510 | |||
| 511 | extern char *optarg;			/* getopt(3) external variables */ | ||
| 512 | extern int optind, opterr, optopt; | ||
| 513 | __END_DECLS | ||
| 514 | #endif /* __DARWIN_C_LEVEL >= 199209L */ | ||
| 515 | |||
| 516 | |||
| 517 | |||
| 518 | /* Additional functionality provided by: | ||
| 519 | * POSIX.1c-1995, | ||
| 520 | * POSIX.1i-1995, | ||
| 521 | * and the omnibus ISO/IEC 9945-1: 1996 | ||
| 522 | */ | ||
| 523 | |||
| 524 | #if __DARWIN_C_LEVEL >= 199506L | ||
| 525 | #include <_ctermid.h> | ||
| 526 | /* These F_* are really XSI or Issue 6 */ | ||
| 527 | #define F_ULOCK 0 /* unlock locked section */ | ||
| 528 | #define	F_LOCK 1 /* lock a section for exclusive use */ | ||
| 529 | #define	F_TLOCK 2 /* test and lock a section for exclusive use */ | ||
| 530 | #define	F_TEST 3 /* test a section for locks by other procs */ | ||
| 531 | |||
| 532 | __BEGIN_DECLS | ||
| 533 | |||
| 534 | /* Begin XSI */ | ||
| 535 | /* Removed in Issue 6 */ | ||
| 536 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 537 | #if !defined(_POSIX_C_SOURCE) | ||
| 538 | __deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 539 | #endif | ||
| 540 | void	*brk(const void *); | ||
| 541 | int	 chroot(const char *) __POSIX_C_DEPRECATED(199506L); | ||
| 542 | #endif | ||
| 543 | |||
| 544 | char	*crypt(const char *, const char *); | ||
| 545 | #if __DARWIN_UNIX03 | ||
| 546 | void	 encrypt(char *, int) __DARWIN_ALIAS(encrypt); | ||
| 547 | #else /* !__DARWIN_UNIX03 */ | ||
| 548 | int	 encrypt(char *, int); | ||
| 549 | #endif /* __DARWIN_UNIX03 */ | ||
| 550 | int	 fchdir(int); | ||
| 551 | long	 gethostid(void); | ||
| 552 | pid_t	 getpgid(pid_t); | ||
| 553 | pid_t	 getsid(pid_t); | ||
| 554 | |||
| 555 | /* Removed in Issue 6 */ | ||
| 556 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 557 | int	 getdtablesize(void) __POSIX_C_DEPRECATED(199506L); | ||
| 558 | int	 getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L); | ||
| 559 | char	*getpass(const char *) __POSIX_C_DEPRECATED(199506L); | ||
| 560 | #endif | ||
| 561 | |||
| 562 | /* Removed in Issue 7 */ | ||
| 563 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L | ||
| 564 | char	*getwd(char *) __POSIX_C_DEPRECATED(200112L); /* obsoleted by getcwd() */ | ||
| 565 | #endif | ||
| 566 | |||
| 567 | int	 lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown); | ||
| 568 | |||
| 569 | int	 lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf); | ||
| 570 | |||
| 571 | int	 nice(int) __DARWIN_ALIAS(nice); | ||
| 572 | |||
| 573 | ssize_t	 pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pread); | ||
| 574 | |||
| 575 | ssize_t	 pwrite(int __fd, const void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pwrite); | ||
| 576 | |||
| 577 | /* Removed in Issue 6 */ | ||
| 578 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 579 | /* Note that Issue 5 changed the argument as intprt_t, | ||
| 580 | * but we keep it as int for binary compatability. */ | ||
| 581 | #if !defined(_POSIX_C_SOURCE) | ||
| 582 | __deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 583 | #endif | ||
| 584 | void	*sbrk(int); | ||
| 585 | #endif | ||
| 586 | |||
| 587 | #if __DARWIN_UNIX03 | ||
| 588 | pid_t	 setpgrp(void) __DARWIN_ALIAS(setpgrp); | ||
| 589 | #else /* !__DARWIN_UNIX03 */ | ||
| 590 | int	 setpgrp(pid_t pid, pid_t pgrp);	/* obsoleted by setpgid() */ | ||
| 591 | #endif /* __DARWIN_UNIX03 */ | ||
| 592 | |||
| 593 | int	 setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); | ||
| 594 | |||
| 595 | int	 setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid); | ||
| 596 | |||
| 597 | void swab(const void * __restrict, void * __restrict, ssize_t); | ||
| 598 | void	 sync(void); | ||
| 599 | int	 truncate(const char *, off_t); | ||
| 600 | useconds_t	 ualarm(useconds_t, useconds_t); | ||
| 601 | int	 usleep(useconds_t) __DARWIN_ALIAS_C(usleep); | ||
| 602 | |||
| 603 | #if !defined(_POSIX_C_SOURCE) | ||
| 604 | __deprecated_msg("Use posix_spawn or fork") | ||
| 605 | #endif | ||
| 606 | pid_t	 vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 607 | /* End XSI */ | ||
| 608 | |||
| 609 | int	 fsync(int) __DARWIN_ALIAS_C(fsync); | ||
| 610 | |||
| 611 | int	 ftruncate(int, off_t); | ||
| 612 | int	 getlogin_r(char *, size_t); | ||
| 613 | __END_DECLS | ||
| 614 | #endif /* __DARWIN_C_LEVEL >= 199506L */ | ||
| 615 | |||
| 616 | |||
| 617 | |||
| 618 | /* Additional functionality provided by: | ||
| 619 | * POSIX.1-2001 | ||
| 620 | * ISO C99 | ||
| 621 | */ | ||
| 622 | |||
| 623 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 624 | __BEGIN_DECLS | ||
| 625 | int	 fchown(int, uid_t, gid_t); | ||
| 626 | int	 gethostname(char *, size_t); | ||
| 627 | ssize_t readlink(const char * __restrict, char * __restrict, size_t); | ||
| 628 | int	 setegid(gid_t); | ||
| 629 | int	 seteuid(uid_t); | ||
| 630 | int	 symlink(const char *, const char *); | ||
| 631 | __END_DECLS | ||
| 632 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 633 | |||
| 634 | |||
| 635 | |||
| 636 | /* Darwin extensions */ | ||
| 637 | |||
| 638 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 639 | #include <sys/select.h> | ||
| 640 | |||
| 641 | #include <sys/_types/_dev_t.h> | ||
| 642 | #include <sys/_types/_mode_t.h> | ||
| 643 | #include <sys/_types/_uuid_t.h> | ||
| 644 | |||
| 645 | __BEGIN_DECLS | ||
| 646 | void	 _Exit(int) __dead2; | ||
| 647 | int	 accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); | ||
| 648 | int	 acct(const char *); | ||
| 649 | int	 add_profil(char *, size_t, unsigned long, unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 650 | void	 endusershell(void); | ||
| 651 | int	 execvP(const char * __file, const char * __searchpath, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 652 | char	*fflagstostr(unsigned long); | ||
| 653 | int	 getdomainname(char *, int); | ||
| 654 | int	 getgrouplist(const char *, int, int *, int *); | ||
| 655 | #if defined(__has_include) | ||
| 656 | #if __has_include(<gethostuuid_private.h>) | ||
| 657 | #include <gethostuuid_private.h> | ||
| 658 | #else | ||
| 659 | #include <gethostuuid.h> | ||
| 660 | #endif | ||
| 661 | #else | ||
| 662 | #include <gethostuuid.h> | ||
| 663 | #endif | ||
| 664 | mode_t	 getmode(const void *, mode_t); | ||
| 665 | int	 getpeereid(int, uid_t *, gid_t *); | ||
| 666 | int	 getsgroups_np(int *, uuid_t); | ||
| 667 | char	*getusershell(void); | ||
| 668 | int	 getwgroups_np(int *, uuid_t); | ||
| 669 | int	 initgroups(const char *, int); | ||
| 670 | int	 issetugid(void); | ||
| 671 | char	*mkdtemp(char *); | ||
| 672 | int	 mknod(const char *, mode_t, dev_t); | ||
| 673 | int	 mkpath_np(const char *path, mode_t omode) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); /* returns errno */ | ||
| 674 | int	 mkpathat_np(int dfd, const char *path, mode_t omode) /* returns errno */ | ||
| 675 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 676 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 677 | int	 mkstemp(char *); | ||
| 678 | int	 mkstemps(char *, int); | ||
| 679 | char	*mktemp(char *); | ||
| 680 | int	 mkostemp(char *path, int oflags) | ||
| 681 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 682 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 683 | int	 mkostemps(char *path, int slen, int oflags) | ||
| 684 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 685 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 686 | /* Non-portable mkstemp that uses open_dprotected_np */ | ||
| 687 | int	 mkstemp_dprotected_np(char *path, int dpclass, int dpflags) | ||
| 688 | 		__OSX_UNAVAILABLE __IOS_AVAILABLE(10.0) | ||
| 689 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 690 | char *mkdtempat_np(int dfd, char *path) | ||
| 691 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 692 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 693 | int mkstempsat_np(int dfd, char *path, int slen) | ||
| 694 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 695 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 696 | int mkostempsat_np(int dfd, char *path, int slen, int oflags) | ||
| 697 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 698 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 699 | int	 nfssvc(int, void *); | ||
| 700 | int	 profil(char *, size_t, unsigned long, unsigned int); | ||
| 701 | |||
| 702 | __deprecated_msg("Use of per-thread security contexts is error-prone and discouraged.") | ||
| 703 | int	 pthread_setugid_np(uid_t, gid_t); | ||
| 704 | int	 pthread_getugid_np( uid_t *, gid_t *); | ||
| 705 | |||
| 706 | int	 reboot(int); | ||
| 707 | int	 revoke(const char *); | ||
| 708 | |||
| 709 | __deprecated int	 rcmd(char **, int, const char *, const char *, const char *, int *); | ||
| 710 | __deprecated int	 rcmd_af(char **, int, const char *, const char *, const char *, int *, | ||
| 711 | 		int); | ||
| 712 | __deprecated int	 rresvport(int *); | ||
| 713 | __deprecated int	 rresvport_af(int *, int); | ||
| 714 | __deprecated int	 iruserok(unsigned long, int, const char *, const char *); | ||
| 715 | __deprecated int	 iruserok_sa(const void *, int, int, const char *, const char *); | ||
| 716 | __deprecated int	 ruserok(const char *, int, const char *, const char *); | ||
| 717 | |||
| 718 | int	 setdomainname(const char *, int); | ||
| 719 | int	 setgroups(int, const gid_t *); | ||
| 720 | void	 sethostid(long); | ||
| 721 | int	 sethostname(const char *, int); | ||
| 722 | #if __DARWIN_UNIX03 | ||
| 723 | void	 setkey(const char *) __DARWIN_ALIAS(setkey); | ||
| 724 | #else /* !__DARWIN_UNIX03 */ | ||
| 725 | int	 setkey(const char *); | ||
| 726 | #endif /* __DARWIN_UNIX03 */ | ||
| 727 | int	 setlogin(const char *); | ||
| 728 | void	*setmode(const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(setmode)); | ||
| 729 | int	 setrgid(gid_t); | ||
| 730 | int	 setruid(uid_t); | ||
| 731 | int	 setsgroups_np(int, const uuid_t); | ||
| 732 | void	 setusershell(void); | ||
| 733 | int	 setwgroups_np(int, const uuid_t); | ||
| 734 | int	 strtofflags(char **, unsigned long *, unsigned long *); | ||
| 735 | int	 swapon(const char *); | ||
| 736 | int	 ttyslot(void); | ||
| 737 | int	 undelete(const char *); | ||
| 738 | int	 unwhiteout(const char *); | ||
| 739 | void	*valloc(size_t);			 | ||
| 740 | |||
| 741 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 742 | __OS_AVAILABILITY_MSG(ios,deprecated=10.0,"syscall(2) is unsupported; " | ||
| 743 | "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") | ||
| 744 | __OS_AVAILABILITY_MSG(macosx,deprecated=10.12,"syscall(2) is unsupported; " | ||
| 745 | "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") | ||
| 746 | int	 syscall(int, ...); | ||
| 747 | |||
| 748 | extern char *suboptarg;			/* getsubopt(3) external variable */ | ||
| 749 | int	 getsubopt(char **, char * const *, char **); | ||
| 750 | |||
| 751 | /* HFS & HFS Plus semantics system calls go here */ | ||
| 752 | #ifdef __LP64__ | ||
| 753 | int fgetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 754 | int fsetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 755 | int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist); | ||
| 756 | int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist); | ||
| 757 | int exchangedata(const char*,const char*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 758 | int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 759 | |||
| 760 | #else /* __LP64__ */ | ||
| 761 | int	fgetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 762 | int	fsetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 763 | int	getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist); | ||
| 764 | int	setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist); | ||
| 765 | int exchangedata(const char*,const char*,unsigned long) | ||
| 766 | 		__OSX_DEPRECATED(10.0, 10.13, "use renamex_np with the RENAME_SWAP flag") | ||
| 767 | 		__IOS_DEPRECATED(2.0, 11.0, "use renamex_np with the RENAME_SWAP flag") | ||
| 768 | 		__WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 769 | int	getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 770 | |||
| 771 | #endif /* __LP64__ */ | ||
| 772 | |||
| 773 | struct fssearchblock; | ||
| 774 | struct searchstate; | ||
| 775 | |||
| 776 | int	 searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 777 | int	 fsctl(const char *,unsigned long,void*,unsigned int); | ||
| 778 | int	 ffsctl(int,unsigned long,void*,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 779 | |||
| 780 | #define	SYNC_VOLUME_FULLSYNC	0x01	/* Flush data and metadata to platter, not just to disk cache */ | ||
| 781 | #define SYNC_VOLUME_WAIT	0x02	/* Wait for sync to complete */ | ||
| 782 | |||
| 783 | int	fsync_volume_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); | ||
| 784 | int	sync_volume_np(const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); | ||
| 785 | |||
| 786 | extern int optreset; | ||
| 787 | |||
| 788 | __END_DECLS | ||
| 789 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 790 | |||
| 791 | #endif /* _UNISTD_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/uuid/uuid.h deleted-78| ... | @@ -1,78 +0,0 @@ | ||
| 1 | /* | ||
| 2 | * Public include file for the UUID library | ||
| 3 | * | ||
| 4 | * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. | ||
| 5 | * | ||
| 6 | * %Begin-Header% | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions | ||
| 9 | * are met: | ||
| 10 | * 1. Redistributions of source code must retain the above copyright | ||
| 11 | * notice, and the entire permission notice in its entirety, | ||
| 12 | * including the disclaimer of warranties. | ||
| 13 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * 3. The name of the author may not be used to endorse or promote | ||
| 17 | * products derived from this software without specific prior | ||
| 18 | * written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | ||
| 23 | * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE | ||
| 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT | ||
| 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 27 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
| 30 | * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH | ||
| 31 | * DAMAGE. | ||
| 32 | * %End-Header% | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef _UUID_UUID_H | ||
| 36 | #define _UUID_UUID_H | ||
| 37 | |||
| 38 | #include <sys/_types.h> | ||
| 39 | #include <sys/_types/_uuid_t.h> | ||
| 40 | |||
| 41 | #ifndef _UUID_STRING_T | ||
| 42 | #define _UUID_STRING_T | ||
| 43 | typedef __darwin_uuid_string_t uuid_string_t; | ||
| 44 | #endif /* _UUID_STRING_T */ | ||
| 45 | |||
| 46 | #define UUID_DEFINE(name, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15) \ | ||
| 47 | 	static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | ||
| 48 | |||
| 49 | UUID_DEFINE(UUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
| 50 | |||
| 51 | #ifdef __cplusplus | ||
| 52 | extern "C" { | ||
| 53 | #endif | ||
| 54 | |||
| 55 | void uuid_clear(uuid_t uu); | ||
| 56 | |||
| 57 | int uuid_compare(const uuid_t uu1, const uuid_t uu2); | ||
| 58 | |||
| 59 | void uuid_copy(uuid_t dst, const uuid_t src); | ||
| 60 | |||
| 61 | void uuid_generate(uuid_t out); | ||
| 62 | void uuid_generate_random(uuid_t out); | ||
| 63 | void uuid_generate_time(uuid_t out); | ||
| 64 | |||
| 65 | |||
| 66 | int uuid_is_null(const uuid_t uu); | ||
| 67 | |||
| 68 | int uuid_parse(const uuid_string_t in, uuid_t uu); | ||
| 69 | |||
| 70 | void uuid_unparse(const uuid_t uu, uuid_string_t out); | ||
| 71 | void uuid_unparse_lower(const uuid_t uu, uuid_string_t out); | ||
| 72 | void uuid_unparse_upper(const uuid_t uu, uuid_string_t out); | ||
| 73 | |||
| 74 | #ifdef __cplusplus | ||
| 75 | } | ||
| 76 | #endif | ||
| 77 | |||
| 78 | #endif /* _UUID_UUID_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/xpc/activity.h deleted-460| ... | @@ -1,460 +0,0 @@ | ||
| 1 | #ifndef __XPC_ACTIVITY_H__ | ||
| 2 | #define __XPC_ACTIVITY_H__ | ||
| 3 | |||
| 4 | #ifndef __XPC_INDIRECT__ | ||
| 5 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 6 | // For HeaderDoc. | ||
| 7 | #include <xpc/base.h> | ||
| 8 | #endif // __XPC_INDIRECT__ | ||
| 9 | |||
| 10 | #ifdef __BLOCKS__ | ||
| 11 | |||
| 12 | XPC_ASSUME_NONNULL_BEGIN | ||
| 13 | __BEGIN_DECLS | ||
| 14 | |||
| 15 | /* | ||
| 16 | * The following are a collection of keys and values used to set an activity's | ||
| 17 | * execution criteria. | ||
| 18 | */ | ||
| 19 | |||
| 20 | /*! | ||
| 21 | * @constant XPC_ACTIVITY_INTERVAL | ||
| 22 | * An integer property indicating the desired time interval (in seconds) of the | ||
| 23 | * activity. The activity will not be run more than once per time interval. | ||
| 24 | * Due to the nature of XPC Activity finding an opportune time to run | ||
| 25 | * the activity, any two occurrences may be more or less than 'interval' | ||
| 26 | * seconds apart, but on average will be 'interval' seconds apart. | ||
| 27 | * The presence of this key implies the following, unless overridden: | ||
| 28 | * - XPC_ACTIVITY_REPEATING with a value of true | ||
| 29 | * - XPC_ACTIVITY_DELAY with a value of half the 'interval' | ||
| 30 | * The delay enforces a minimum distance between any two occurrences. | ||
| 31 | * - XPC_ACTIVITY_GRACE_PERIOD with a value of half the 'interval'. | ||
| 32 | * The grace period is the amount of time allowed to pass after the end of | ||
| 33 | * the interval before more aggressive scheduling occurs. The grace period | ||
| 34 | * does not increase the size of the interval. | ||
| 35 | */ | ||
| 36 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 37 | XPC_EXPORT | ||
| 38 | const char * const XPC_ACTIVITY_INTERVAL; | ||
| 39 | |||
| 40 | /*! | ||
| 41 | * @constant XPC_ACTIVITY_REPEATING | ||
| 42 | * A boolean property indicating whether this is a repeating activity. | ||
| 43 | */ | ||
| 44 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 45 | XPC_EXPORT | ||
| 46 | const char * const XPC_ACTIVITY_REPEATING; | ||
| 47 | |||
| 48 | /*! | ||
| 49 | * @constant XPC_ACTIVITY_DELAY | ||
| 50 | * An integer property indicating the number of seconds to delay before | ||
| 51 | * beginning the activity. | ||
| 52 | */ | ||
| 53 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 54 | XPC_EXPORT | ||
| 55 | const char * const XPC_ACTIVITY_DELAY; | ||
| 56 | |||
| 57 | /*! | ||
| 58 | * @constant XPC_ACTIVITY_GRACE_PERIOD | ||
| 59 | * An integer property indicating the number of seconds to allow as a grace | ||
| 60 | * period before the scheduling of the activity becomes more aggressive. | ||
| 61 | */ | ||
| 62 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 63 | XPC_EXPORT | ||
| 64 | const char * const XPC_ACTIVITY_GRACE_PERIOD; | ||
| 65 | |||
| 66 | |||
| 67 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 68 | XPC_EXPORT | ||
| 69 | const int64_t XPC_ACTIVITY_INTERVAL_1_MIN; | ||
| 70 | |||
| 71 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 72 | XPC_EXPORT | ||
| 73 | const int64_t XPC_ACTIVITY_INTERVAL_5_MIN; | ||
| 74 | |||
| 75 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 76 | XPC_EXPORT | ||
| 77 | const int64_t XPC_ACTIVITY_INTERVAL_15_MIN; | ||
| 78 | |||
| 79 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 80 | XPC_EXPORT | ||
| 81 | const int64_t XPC_ACTIVITY_INTERVAL_30_MIN; | ||
| 82 | |||
| 83 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 84 | XPC_EXPORT | ||
| 85 | const int64_t XPC_ACTIVITY_INTERVAL_1_HOUR; | ||
| 86 | |||
| 87 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 88 | XPC_EXPORT | ||
| 89 | const int64_t XPC_ACTIVITY_INTERVAL_4_HOURS; | ||
| 90 | |||
| 91 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 92 | XPC_EXPORT | ||
| 93 | const int64_t XPC_ACTIVITY_INTERVAL_8_HOURS; | ||
| 94 | |||
| 95 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 96 | XPC_EXPORT | ||
| 97 | const int64_t XPC_ACTIVITY_INTERVAL_1_DAY; | ||
| 98 | |||
| 99 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 100 | XPC_EXPORT | ||
| 101 | const int64_t XPC_ACTIVITY_INTERVAL_7_DAYS; | ||
| 102 | |||
| 103 | /*! | ||
| 104 | * @constant XPC_ACTIVITY_PRIORITY | ||
| 105 | * A string property indicating the priority of the activity. | ||
| 106 | */ | ||
| 107 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 108 | XPC_EXPORT | ||
| 109 | const char * const XPC_ACTIVITY_PRIORITY; | ||
| 110 | |||
| 111 | /*! | ||
| 112 | * @constant XPC_ACTIVITY_PRIORITY_MAINTENANCE | ||
| 113 | * A string indicating activity is maintenance priority. | ||
| 114 | * | ||
| 115 | * Maintenance priority is intended for user-invisible maintenance tasks | ||
| 116 | * such as garbage collection or optimization. | ||
| 117 | * | ||
| 118 | * Maintenance activities are not permitted to run if the device thermal | ||
| 119 | * condition exceeds a nominal level or if the battery level is lower than 20%. | ||
| 120 | * In Low Power Mode (on supported devices), maintenance activities are not | ||
| 121 | * permitted to run while the device is on battery, or plugged in and the | ||
| 122 | * battery level is lower than 30%. | ||
| 123 | */ | ||
| 124 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 125 | XPC_EXPORT | ||
| 126 | const char * const XPC_ACTIVITY_PRIORITY_MAINTENANCE; | ||
| 127 | |||
| 128 | /*! | ||
| 129 | * @constant XPC_ACTIVITY_PRIORITY_UTILITY | ||
| 130 | * A string indicating activity is utility priority. | ||
| 131 | * | ||
| 132 | * Utility priority is intended for user-visible tasks such as fetching data | ||
| 133 | * from the network, copying files, or importing data. | ||
| 134 | * | ||
| 135 | * Utility activities are not permitted to run if the device thermal condition | ||
| 136 | * exceeds a moderate level or if the battery level is less than 10%. In Low | ||
| 137 | * Power Mode (on supported devices) when on battery power, utility activities | ||
| 138 | * are only permitted when they are close to their deadline (90% of their time | ||
| 139 | * window has elapsed). | ||
| 140 | */ | ||
| 141 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 142 | XPC_EXPORT | ||
| 143 | const char * const XPC_ACTIVITY_PRIORITY_UTILITY; | ||
| 144 | |||
| 145 | /*! | ||
| 146 | * @constant XPC_ACTIVITY_ALLOW_BATTERY | ||
| 147 | * A Boolean value indicating whether the activity should be allowed to run | ||
| 148 | * while the computer is on battery power. The default value is false for | ||
| 149 | * maintenance priority activity and true for utility priority activity. | ||
| 150 | */ | ||
| 151 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 152 | XPC_EXPORT | ||
| 153 | const char * const XPC_ACTIVITY_ALLOW_BATTERY; | ||
| 154 | |||
| 155 | /*! | ||
| 156 | * @constant XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP | ||
| 157 | * A Boolean value indicating whether the activity should only be performed | ||
| 158 | * while device appears to be asleep. Note that the definition of screen sleep | ||
| 159 | * may vary by platform and may include states where the device is known to be | ||
| 160 | * idle despite the fact that the display itself is still powered. Defaults to | ||
| 161 | * false. | ||
| 162 | */ | ||
| 163 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 164 | XPC_EXPORT | ||
| 165 | const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool | ||
| 166 | |||
| 167 | /*! | ||
| 168 | * @constant XPC_ACTIVITY_PREVENT_DEVICE_SLEEP | ||
| 169 | * A Boolean value indicating whether the activity should prevent system sleep while | ||
| 170 | * running on battery. | ||
| 171 | * If this property is set, the activity scheduler will take the appropriate power | ||
| 172 | * assertion to keep the device (but not the screen) awake while the activity is running. | ||
| 173 | * Only activities which perform critical system functions that do not want to be | ||
| 174 | * interrupted by system sleep should set this. | ||
| 175 | * Setting this property can impact battery life. | ||
| 176 | */ | ||
| 177 | __API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0)) | ||
| 178 | XPC_EXPORT | ||
| 179 | const char * const XPC_ACTIVITY_PREVENT_DEVICE_SLEEP; // bool | ||
| 180 | |||
| 181 | /*! | ||
| 182 | * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL | ||
| 183 | * An integer percentage of minimum battery charge required to allow the | ||
| 184 | * activity to run. A default minimum battery level is determined by the | ||
| 185 | * system. | ||
| 186 | */ | ||
| 187 | __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, | ||
| 188 | 	"REQUIRE_BATTERY_LEVEL is not implemented") | ||
| 189 | XPC_EXPORT | ||
| 190 | const char * const XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL; // int (%) | ||
| 191 | |||
| 192 | /*! | ||
| 193 | * @constant XPC_ACTIVITY_REQUIRE_HDD_SPINNING | ||
| 194 | * A Boolean value indicating whether the activity should only be performed | ||
| 195 | * while the hard disk drive (HDD) is spinning. Computers with flash storage | ||
| 196 | * are considered to be equivalent to HDD spinning. Defaults to false. | ||
| 197 | */ | ||
| 198 | __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, | ||
| 199 | 	"REQUIRE_HDD_SPINNING is not implemented") | ||
| 200 | XPC_EXPORT | ||
| 201 | const char * const XPC_ACTIVITY_REQUIRE_HDD_SPINNING; // bool | ||
| 202 | |||
| 203 | /*! | ||
| 204 | * @define XPC_TYPE_ACTIVITY | ||
| 205 | * A type representing the XPC activity object. | ||
| 206 | */ | ||
| 207 | #define XPC_TYPE_ACTIVITY (&_xpc_type_activity) | ||
| 208 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 209 | XPC_EXPORT | ||
| 210 | XPC_TYPE(_xpc_type_activity); | ||
| 211 | |||
| 212 | /*! | ||
| 213 | * @typedef xpc_activity_t | ||
| 214 | * | ||
| 215 | * @abstract | ||
| 216 | * An XPC activity object. | ||
| 217 | * | ||
| 218 | * @discussion | ||
| 219 | * This object represents a set of execution criteria and a current execution | ||
| 220 | * state for background activity on the system. Once an activity is registered, | ||
| 221 | * the system will evaluate its criteria to determine whether the activity is | ||
| 222 | * eligible to run under current system conditions. When an activity becomes | ||
| 223 | * eligible to run, its execution state will be updated and an invocation of | ||
| 224 | * its handler block will be made. | ||
| 225 | */ | ||
| 226 | XPC_DECL(xpc_activity); | ||
| 227 | |||
| 228 | /*! | ||
| 229 | * @typedef xpc_activity_handler_t | ||
| 230 | * | ||
| 231 | * @abstract | ||
| 232 | * A block that is called when an XPC activity becomes eligible to run. | ||
| 233 | */ | ||
| 234 | XPC_NONNULL1 | ||
| 235 | typedef void (^xpc_activity_handler_t)(xpc_activity_t activity); | ||
| 236 | |||
| 237 | /*! | ||
| 238 | * @constant XPC_ACTIVITY_CHECK_IN | ||
| 239 | * This constant may be passed to xpc_activity_register() as the criteria | ||
| 240 | * dictionary in order to check in with the system for previously registered | ||
| 241 | * activity using the same identifier (for example, an activity taken from a | ||
| 242 | * launchd property list). | ||
| 243 | */ | ||
| 244 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 245 | XPC_EXPORT | ||
| 246 | const xpc_object_t XPC_ACTIVITY_CHECK_IN; | ||
| 247 | |||
| 248 | /*! | ||
| 249 | * @function xpc_activity_register | ||
| 250 | * | ||
| 251 | * @abstract | ||
| 252 | * Registers an activity with the system. | ||
| 253 | * | ||
| 254 | * @discussion | ||
| 255 | * Registers a new activity with the system. The criteria of the activity are | ||
| 256 | * described by the dictionary passed to this function. If an activity with the | ||
| 257 | * same identifier already exists, the criteria provided override the existing | ||
| 258 | * criteria unless the special dictionary XPC_ACTIVITY_CHECK_IN is used. The | ||
| 259 | * XPC_ACTIVITY_CHECK_IN dictionary instructs the system to first look up an | ||
| 260 | * existing activity without modifying its criteria. Once the existing activity | ||
| 261 | * is found (or a new one is created with an empty set of criteria) the handler | ||
| 262 | * will be called with an activity object in the XPC_ACTIVITY_STATE_CHECK_IN | ||
| 263 | * state. | ||
| 264 | * | ||
| 265 | * @param identifier | ||
| 266 | * A unique identifier for the activity. Each application has its own namespace. | ||
| 267 | * The identifier should remain constant across registrations, relaunches of | ||
| 268 | * the application, and reboots. It should identify the kind of work being done, | ||
| 269 | * not a particular invocation of the work. | ||
| 270 | * | ||
| 271 | * @param criteria | ||
| 272 | * A dictionary of criteria for the activity. | ||
| 273 | * | ||
| 274 | * @param handler | ||
| 275 | * The handler block to be called when the activity changes state to one of the | ||
| 276 | * following states: | ||
| 277 | * - XPC_ACTIVITY_STATE_CHECK_IN (optional) | ||
| 278 | * - XPC_ACTIVITY_STATE_RUN | ||
| 279 | * | ||
| 280 | * The handler block is never invoked reentrantly. It will be invoked on a | ||
| 281 | * dispatch queue with an appropriate priority to perform the activity. | ||
| 282 | */ | ||
| 283 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 284 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL3 | ||
| 285 | void | ||
| 286 | xpc_activity_register(const char *identifier, xpc_object_t criteria, | ||
| 287 | 	xpc_activity_handler_t handler); | ||
| 288 | |||
| 289 | /*! | ||
| 290 | * @function xpc_activity_copy_criteria | ||
| 291 | * | ||
| 292 | * @abstract | ||
| 293 | * Returns an XPC dictionary describing the execution criteria of an activity. | ||
| 294 | * This will return NULL in cases where the activity has already completed, e.g. | ||
| 295 | * when checking in to an event that finished and was not rescheduled. | ||
| 296 | */ | ||
| 297 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 298 | XPC_EXPORT XPC_WARN_RESULT XPC_RETURNS_RETAINED XPC_NONNULL1 | ||
| 299 | xpc_object_t _Nullable | ||
| 300 | xpc_activity_copy_criteria(xpc_activity_t activity); | ||
| 301 | |||
| 302 | /*! | ||
| 303 | * @function xpc_activity_set_criteria | ||
| 304 | * | ||
| 305 | * @abstract | ||
| 306 | * Modifies the execution criteria of an activity. | ||
| 307 | */ | ||
| 308 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 309 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 | ||
| 310 | void | ||
| 311 | xpc_activity_set_criteria(xpc_activity_t activity, xpc_object_t criteria); | ||
| 312 | |||
| 313 | /*! | ||
| 314 | * @enum xpc_activity_state_t | ||
| 315 | * An activity is defined to be in one of the following states. Applications | ||
| 316 | * may check the current state of the activity using xpc_activity_get_state() | ||
| 317 | * in the handler block provided to xpc_activity_register(). | ||
| 318 | * | ||
| 319 | * The application can modify the state of the activity by calling | ||
| 320 | * xpc_activity_set_state() with one of the following: | ||
| 321 | * - XPC_ACTIVITY_STATE_DEFER | ||
| 322 | * - XPC_ACTIVITY_STATE_CONTINUE | ||
| 323 | * - XPC_ACTIVITY_STATE_DONE | ||
| 324 | * | ||
| 325 | * @constant XPC_ACTIVITY_STATE_CHECK_IN | ||
| 326 | * An activity in this state has just completed a checkin with the system after | ||
| 327 | * XPC_ACTIVITY_CHECK_IN was provided as the criteria dictionary to | ||
| 328 | * xpc_activity_register. The state gives the application an opportunity to | ||
| 329 | * inspect and modify the activity's criteria. | ||
| 330 | * | ||
| 331 | * @constant XPC_ACTIVITY_STATE_WAIT | ||
| 332 | * An activity in this state is waiting for an opportunity to run. This value | ||
| 333 | * is never returned within the activity's handler block, as the block is | ||
| 334 | * invoked in response to XPC_ACTIVITY_STATE_CHECK_IN or XPC_ACTIVITY_STATE_RUN. | ||
| 335 | * | ||
| 336 | * Note: | ||
| 337 | * A launchd job may idle exit while an activity is in the wait state and be | ||
| 338 | * relaunched in response to the activity becoming runnable. The launchd job | ||
| 339 | * simply needs to re-register for the activity on its next launch by passing | ||
| 340 | * XPC_ACTIVITY_STATE_CHECK_IN to xpc_activity_register(). | ||
| 341 | * | ||
| 342 | * @constant XPC_ACTIVITY_STATE_RUN | ||
| 343 | * An activity in this state is eligible to run based on its criteria. | ||
| 344 | * | ||
| 345 | * @constant XPC_ACTIVITY_STATE_DEFER | ||
| 346 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 347 | * that the activity should be deferred (placed back into the WAIT state) until | ||
| 348 | * a time when its criteria are met again. Deferring an activity does not reset | ||
| 349 | * any of its time-based criteria (in other words, it will remain past due). | ||
| 350 | * | ||
| 351 | * IMPORTANT: | ||
| 352 | * This should be done in response to observing xpc_activity_should_defer(). | ||
| 353 | * It should not be done unilaterally. If you determine that conditions are bad | ||
| 354 | * to do your activity's work for reasons you can't express in a criteria | ||
| 355 | * dictionary, you should set the activity's state to XPC_ACTIVITY_STATE_DONE. | ||
| 356 | * | ||
| 357 | * | ||
| 358 | * @constant XPC_ACTIVITY_STATE_CONTINUE | ||
| 359 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 360 | * that the activity will continue its operation beyond the return of its | ||
| 361 | * handler block. This can be used to extend an activity to include asynchronous | ||
| 362 | * operations. The activity's handler block will not be invoked again until the | ||
| 363 | * state has been updated to either XPC_ACTIVITY_STATE_DEFER or, in the case | ||
| 364 | * of repeating activity, XPC_ACTIVITY_STATE_DONE. | ||
| 365 | * | ||
| 366 | * @constant XPC_ACTIVITY_STATE_DONE | ||
| 367 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 368 | * that the activity has completed. For non-repeating activity, the resources | ||
| 369 | * associated with the activity will be automatically released upon return from | ||
| 370 | * the handler block. For repeating activity, timers present in the activity's | ||
| 371 | * criteria will be reset. | ||
| 372 | */ | ||
| 373 | enum { | ||
| 374 | 	XPC_ACTIVITY_STATE_CHECK_IN, | ||
| 375 | 	XPC_ACTIVITY_STATE_WAIT, | ||
| 376 | 	XPC_ACTIVITY_STATE_RUN, | ||
| 377 | 	XPC_ACTIVITY_STATE_DEFER, | ||
| 378 | 	XPC_ACTIVITY_STATE_CONTINUE, | ||
| 379 | 	XPC_ACTIVITY_STATE_DONE, | ||
| 380 | }; | ||
| 381 | typedef long xpc_activity_state_t; | ||
| 382 | |||
| 383 | /*! | ||
| 384 | * @function xpc_activity_get_state | ||
| 385 | * | ||
| 386 | * @abstract | ||
| 387 | * Returns the current state of an activity. | ||
| 388 | */ | ||
| 389 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 390 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 391 | xpc_activity_state_t | ||
| 392 | xpc_activity_get_state(xpc_activity_t activity); | ||
| 393 | |||
| 394 | /*! | ||
| 395 | * @function xpc_activity_set_state | ||
| 396 | * | ||
| 397 | * @abstract | ||
| 398 | * Updates the current state of an activity. | ||
| 399 | * | ||
| 400 | * @return | ||
| 401 | * Returns true if the state was successfully updated; otherwise, returns | ||
| 402 | * false if the requested state transition is not valid. | ||
| 403 | */ | ||
| 404 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 405 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 406 | bool | ||
| 407 | xpc_activity_set_state(xpc_activity_t activity, xpc_activity_state_t state); | ||
| 408 | |||
| 409 | /*! | ||
| 410 | * @function xpc_activity_should_defer | ||
| 411 | * | ||
| 412 | * @abstract | ||
| 413 | * Test whether an activity should be deferred. | ||
| 414 | * | ||
| 415 | * @discussion | ||
| 416 | * This function may be used to test whether the criteria of a long-running | ||
| 417 | * activity are still satisfied. If not, the system indicates that the | ||
| 418 | * application should defer the activity. The application may acknowledge the | ||
| 419 | * deferral by calling xpc_activity_set_state() with XPC_ACTIVITY_STATE_DEFER. | ||
| 420 | * Once deferred, the system will place the activity back into the WAIT state | ||
| 421 | * and re-invoke the handler block at the earliest opportunity when the criteria | ||
| 422 | * are once again satisfied. | ||
| 423 | * | ||
| 424 | * @return | ||
| 425 | * Returns true if the activity should be deferred. | ||
| 426 | */ | ||
| 427 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 428 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 429 | bool | ||
| 430 | xpc_activity_should_defer(xpc_activity_t activity); | ||
| 431 | |||
| 432 | /*! | ||
| 433 | * @function xpc_activity_unregister | ||
| 434 | * | ||
| 435 | * @abstract | ||
| 436 | * Unregisters an activity found by its identifier. | ||
| 437 | * | ||
| 438 | * @discussion | ||
| 439 | * A dynamically registered activity will be deleted in response to this call. | ||
| 440 | * Statically registered activity (from a launchd property list) will be | ||
| 441 | * deleted until the job is next loaded (e.g. at next boot). | ||
| 442 | * | ||
| 443 | * Unregistering an activity has no effect on any outstanding xpc_activity_t | ||
| 444 | * objects or any currently executing xpc_activity_handler_t blocks; however, | ||
| 445 | * no new handler block invocations will be made after it is unregistered. | ||
| 446 | * | ||
| 447 | * @param identifier | ||
| 448 | * The identifier of the activity to unregister. | ||
| 449 | */ | ||
| 450 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 451 | XPC_EXPORT XPC_NONNULL1 | ||
| 452 | void | ||
| 453 | xpc_activity_unregister(const char *identifier); | ||
| 454 | |||
| 455 | __END_DECLS | ||
| 456 | XPC_ASSUME_NONNULL_END | ||
| 457 | |||
| 458 | #endif // __BLOCKS__ | ||
| 459 | |||
| 460 | #endif // __XPC_ACTIVITY_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/xpc/availability.h deleted-130| ... | @@ -1,130 +0,0 @@ | ||
| 1 | #ifndef __XPC_AVAILABILITY_H__ | ||
| 2 | #define __XPC_AVAILABILITY_H__ | ||
| 3 | |||
| 4 | #include <Availability.h> | ||
| 5 | |||
| 6 | // Certain parts of the project use all the project's headers but have to build | ||
| 7 | // against newer OSX SDKs than ebuild uses -- liblaunch_host being the example. | ||
| 8 | // So we need to define these. | ||
| 9 | #ifndef __MAC_10_16 | ||
| 10 | #define __MAC_10_16 101600 | ||
| 11 | #endif // __MAC_10_16 | ||
| 12 | |||
| 13 | #ifndef __MAC_10_15 | ||
| 14 | #define __MAC_10_15 101500 | ||
| 15 | #define __AVAILABILITY_INTERNAL__MAC_10_15 \ | ||
| 16 | __attribute__((availability(macosx, introduced=10.15))) | ||
| 17 | #endif // __MAC_10_15 | ||
| 18 | |||
| 19 | #ifndef __MAC_10_14 | ||
| 20 | #define __MAC_10_14 101400 | ||
| 21 | #define __AVAILABILITY_INTERNAL__MAC_10_14 \ | ||
| 22 | __attribute__((availability(macosx, introduced=10.14))) | ||
| 23 | #endif // __MAC_10_14 | ||
| 24 | |||
| 25 | #ifndef __MAC_10_13 | ||
| 26 | #define __MAC_10_13 101300 | ||
| 27 | #define __AVAILABILITY_INTERNAL__MAC_10_13 \ | ||
| 28 | 	__attribute__((availability(macosx, introduced=10.13))) | ||
| 29 | #endif // __MAC_10_13 | ||
| 30 | |||
| 31 | #ifndef __MAC_10_12 | ||
| 32 | #define __MAC_10_12 101200 | ||
| 33 | #define __AVAILABILITY_INTERNAL__MAC_10_12 \ | ||
| 34 | 	__attribute__((availability(macosx, introduced=10.12))) | ||
| 35 | #endif // __MAC_10_12 | ||
| 36 | |||
| 37 | #ifndef __MAC_10_11 | ||
| 38 | #define __MAC_10_11 101100 | ||
| 39 | #define __AVAILABILITY_INTERNAL__MAC_10_11 \ | ||
| 40 | 	__attribute__((availability(macosx, introduced=10.11))) | ||
| 41 | #endif // __MAC_10_11 | ||
| 42 | |||
| 43 | #ifndef __MAC_12_0 | ||
| 44 | #define __MAC_12_0 120000 | ||
| 45 | #define __AVAILABILITY_INTERNAL__MAC_12_0 \ | ||
| 46 | 	__attribute__((availability(macosx, introduced=12.0))) | ||
| 47 | #endif // __MAC_12_0 | ||
| 48 | |||
| 49 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 50 | #define __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 51 | #endif // __AVAILABILITY_INTERNAL__MAC_10_2_DEP__MAC_10_11 | ||
| 52 | |||
| 53 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 54 | #define __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 55 | #endif // __AVAILABILITY_INTERNAL__MAC_10_3_DEP__MAC_10_11 | ||
| 56 | |||
| 57 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 58 | #define __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 59 | #endif // __AVAILABILITY_INTERNAL__MAC_10_4_DEP__MAC_10_11 | ||
| 60 | |||
| 61 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 62 | #define __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 63 | #endif // __AVAILABILITY_INTERNAL__MAC_10_5_DEP__MAC_10_11 | ||
| 64 | |||
| 65 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 66 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 67 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_11 | ||
| 68 | |||
| 69 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 70 | #define __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 71 | #endif // __AVAILABILITY_INTERNAL__MAC_10_7_DEP__MAC_10_11 | ||
| 72 | |||
| 73 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 74 | #define __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 75 | #endif // __AVAILABILITY_INTERNAL__MAC_10_8_DEP__MAC_10_11 | ||
| 76 | |||
| 77 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 78 | #define __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 79 | #endif // __AVAILABILITY_INTERNAL__MAC_10_9_DEP__MAC_10_11 | ||
| 80 | |||
| 81 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 82 | #define __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 83 | #endif // __AVAILABILITY_INTERNAL__MAC_10_10_DEP__MAC_10_11 | ||
| 84 | |||
| 85 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 86 | #define __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 87 | #endif // __AVAILABILITY_INTERNAL__MAC_10_11_DEP__MAC_10_11 | ||
| 88 | |||
| 89 | #ifndef __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 90 | #define __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 91 | #endif // __AVAILABILITY_INTERNAL__MAC_10_6_DEP__MAC_10_13 | ||
| 92 | |||
| 93 | #if __has_include(<simulator_host.h>) | ||
| 94 | #include <simulator_host.h> | ||
| 95 | #else // __has_include(<simulator_host.h>) | ||
| 96 | #ifndef IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 97 | #define IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED 999999 | ||
| 98 | #endif // IPHONE_SIMULATOR_HOST_MIN_VERSION_REQUIRED | ||
| 99 | #endif // __has_include(<simulator_host.h>) | ||
| 100 | |||
| 101 | #ifndef __WATCHOS_UNAVAILABLE | ||
| 102 | #define __WATCHOS_UNAVAILABLE | ||
| 103 | #endif | ||
| 104 | |||
| 105 | #ifndef __TVOS_UNAVAILABLE | ||
| 106 | #define __TVOS_UNAVAILABLE | ||
| 107 | #endif | ||
| 108 | |||
| 109 | // simulator host-side bits build against SDKs not having __*_AVAILABLE() yet | ||
| 110 | #ifndef __OSX_AVAILABLE | ||
| 111 | #define __OSX_AVAILABLE(...) | ||
| 112 | #endif | ||
| 113 | |||
| 114 | #ifndef __IOS_AVAILABLE | ||
| 115 | #define __IOS_AVAILABLE(...) | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #ifndef __TVOS_AVAILABLE | ||
| 119 | #define __TVOS_AVAILABLE(...) | ||
| 120 | #endif | ||
| 121 | |||
| 122 | #ifndef __WATCHOS_AVAILABLE | ||
| 123 | #define __WATCHOS_AVAILABLE(...) | ||
| 124 | #endif | ||
| 125 | |||
| 126 | #ifndef __API_AVAILABLE | ||
| 127 | #define __API_AVAILABLE(...) | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #endif // __XPC_AVAILABILITY_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/xpc/base.h deleted-216| ... | @@ -1,216 +0,0 @@ | ||
| 1 | // Copyright (c) 2009-2011 Apple Inc. All rights reserved. | ||
| 2 | |||
| 3 | #ifndef __XPC_BASE_H__ | ||
| 4 | #define __XPC_BASE_H__ | ||
| 5 | |||
| 6 | #include <sys/cdefs.h> | ||
| 7 | |||
| 8 | __BEGIN_DECLS | ||
| 9 | |||
| 10 | #if !defined(__has_include) | ||
| 11 | #define __has_include(x) 0 | ||
| 12 | #endif // !defined(__has_include) | ||
| 13 | |||
| 14 | #if !defined(__has_attribute) | ||
| 15 | #define __has_attribute(x) 0 | ||
| 16 | #endif // !defined(__has_attribute) | ||
| 17 | |||
| 18 | #if !defined(__has_feature) | ||
| 19 | #define __has_feature(x) 0 | ||
| 20 | #endif // !defined(__has_feature) | ||
| 21 | |||
| 22 | #if !defined(__has_extension) | ||
| 23 | #define __has_extension(x) 0 | ||
| 24 | #endif // !defined(__has_extension) | ||
| 25 | |||
| 26 | #if __has_include(<xpc/availability.h>) | ||
| 27 | #include <xpc/availability.h> | ||
| 28 | #else // __has_include(<xpc/availability.h>) | ||
| 29 | #include <Availability.h> | ||
| 30 | #endif // __has_include(<xpc/availability.h>) | ||
| 31 | |||
| 32 | #include <os/availability.h> | ||
| 33 | |||
| 34 | #ifndef __XPC_INDIRECT__ | ||
| 35 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 36 | #endif // __XPC_INDIRECT__ | ||
| 37 | |||
| 38 | #pragma mark Attribute Shims | ||
| 39 | #ifdef __GNUC__ | ||
| 40 | #define XPC_CONSTRUCTOR __attribute__((constructor)) | ||
| 41 | #define XPC_NORETURN __attribute__((__noreturn__)) | ||
| 42 | #define XPC_NOTHROW __attribute__((__nothrow__)) | ||
| 43 | #define XPC_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 44 | #define XPC_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 45 | #define XPC_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 46 | #define XPC_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 47 | #define XPC_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 48 | #define XPC_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 49 | #define XPC_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 50 | #define XPC_NONNULL8 __attribute__((__nonnull__(8))) | ||
| 51 | #define XPC_NONNULL9 __attribute__((__nonnull__(9))) | ||
| 52 | #define XPC_NONNULL10 __attribute__((__nonnull__(10))) | ||
| 53 | #define XPC_NONNULL11 __attribute__((__nonnull__(11))) | ||
| 54 | #define XPC_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 55 | #define XPC_SENTINEL __attribute__((__sentinel__)) | ||
| 56 | #define XPC_PURE __attribute__((__pure__)) | ||
| 57 | #define XPC_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 58 | #define XPC_MALLOC __attribute__((__malloc__)) | ||
| 59 | #define XPC_UNUSED __attribute__((__unused__)) | ||
| 60 | #define XPC_USED __attribute__((__used__)) | ||
| 61 | #define XPC_PACKED __attribute__((__packed__)) | ||
| 62 | #define XPC_PRINTF(m, n) __attribute__((format(printf, m, n))) | ||
| 63 | #define XPC_INLINE static __inline__ __attribute__((__always_inline__)) | ||
| 64 | #define XPC_NOINLINE __attribute__((noinline)) | ||
| 65 | #define XPC_NOIMPL __attribute__((unavailable)) | ||
| 66 | |||
| 67 | #if __has_attribute(noescape) | ||
| 68 | #define XPC_NOESCAPE __attribute__((__noescape__)) | ||
| 69 | #else | ||
| 70 | #define XPC_NOESCAPE | ||
| 71 | #endif | ||
| 72 | |||
| 73 | #if __has_extension(attribute_unavailable_with_message) | ||
| 74 | #define XPC_UNAVAILABLE(m) __attribute__((unavailable(m))) | ||
| 75 | #else // __has_extension(attribute_unavailable_with_message) | ||
| 76 | #define XPC_UNAVAILABLE(m) XPC_NOIMPL | ||
| 77 | #endif // __has_extension(attribute_unavailable_with_message) | ||
| 78 | |||
| 79 | #define XPC_EXPORT extern __attribute__((visibility("default"))) | ||
| 80 | #define XPC_NOEXPORT __attribute__((visibility("hidden"))) | ||
| 81 | #define XPC_WEAKIMPORT extern __attribute__((weak_import)) | ||
| 82 | #define XPC_DEBUGGER_EXCL XPC_NOEXPORT XPC_USED | ||
| 83 | #define XPC_TRANSPARENT_UNION __attribute__((transparent_union)) | ||
| 84 | #if __clang__ | ||
| 85 | #define XPC_DEPRECATED(m) __attribute__((deprecated(m))) | ||
| 86 | #else // __clang__ | ||
| 87 | #define XPC_DEPRECATED(m) __attribute__((deprecated)) | ||
| 88 | #endif // __clang | ||
| 89 | #ifndef XPC_TESTEXPORT | ||
| 90 | #define XPC_TESTEXPORT XPC_NOEXPORT | ||
| 91 | #endif // XPC_TESTEXPORT | ||
| 92 | |||
| 93 | #if defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 94 | #define XPC_TESTSTATIC | ||
| 95 | #define XPC_TESTEXTERN extern | ||
| 96 | #else // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 97 | #define XPC_TESTSTATIC static | ||
| 98 | #endif // defined(__XPC_TEST__) && __XPC_TEST__ | ||
| 99 | |||
| 100 | #if __has_feature(objc_arc) | ||
| 101 | #define XPC_GIVES_REFERENCE __strong | ||
| 102 | #define XPC_UNRETAINED __unsafe_unretained | ||
| 103 | #define XPC_BRIDGE(xo) ((__bridge void *)(xo)) | ||
| 104 | #define XPC_BRIDGEREF_BEGIN(xo) ((__bridge_retained void *)(xo)) | ||
| 105 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) ((__bridge void *)(xo)) | ||
| 106 | #define XPC_BRIDGEREF_MIDDLE(xo) ((__bridge id)(xo)) | ||
| 107 | #define XPC_BRIDGEREF_END(xo) ((__bridge_transfer id)(xo)) | ||
| 108 | #else // __has_feature(objc_arc) | ||
| 109 | #define XPC_GIVES_REFERENCE | ||
| 110 | #define XPC_UNRETAINED | ||
| 111 | #define XPC_BRIDGE(xo) (xo) | ||
| 112 | #define XPC_BRIDGEREF_BEGIN(xo) (xo) | ||
| 113 | #define XPC_BRIDGEREF_BEGIN_WITH_REF(xo) (xo) | ||
| 114 | #define XPC_BRIDGEREF_MIDDLE(xo) (xo) | ||
| 115 | #define XPC_BRIDGEREF_END(xo) (xo) | ||
| 116 | #endif // __has_feature(objc_arc) | ||
| 117 | |||
| 118 | #define _xpc_unreachable() __builtin_unreachable() | ||
| 119 | #else // __GNUC__ | ||
| 120 | /*! @parseOnly */ | ||
| 121 | #define XPC_CONSTRUCTOR | ||
| 122 | /*! @parseOnly */ | ||
| 123 | #define XPC_NORETURN | ||
| 124 | /*! @parseOnly */ | ||
| 125 | #define XPC_NOTHROW | ||
| 126 | /*! @parseOnly */ | ||
| 127 | #define XPC_NONNULL1 | ||
| 128 | /*! @parseOnly */ | ||
| 129 | #define XPC_NONNULL2 | ||
| 130 | /*! @parseOnly */ | ||
| 131 | #define XPC_NONNULL3 | ||
| 132 | /*! @parseOnly */ | ||
| 133 | #define XPC_NONNULL4 | ||
| 134 | /*! @parseOnly */ | ||
| 135 | #define XPC_NONNULL5 | ||
| 136 | /*! @parseOnly */ | ||
| 137 | #define XPC_NONNULL6 | ||
| 138 | /*! @parseOnly */ | ||
| 139 | #define XPC_NONNULL7 | ||
| 140 | /*! @parseOnly */ | ||
| 141 | #define XPC_NONNULL8 | ||
| 142 | /*! @parseOnly */ | ||
| 143 | #define XPC_NONNULL9 | ||
| 144 | /*! @parseOnly */ | ||
| 145 | #define XPC_NONNULL10 | ||
| 146 | /*! @parseOnly */ | ||
| 147 | #define XPC_NONNULL11 | ||
| 148 | /*! @parseOnly */ | ||
| 149 | #define XPC_NONNULL(n) | ||
| 150 | /*! @parseOnly */ | ||
| 151 | #define XPC_NONNULL_ALL | ||
| 152 | /*! @parseOnly */ | ||
| 153 | #define XPC_SENTINEL | ||
| 154 | /*! @parseOnly */ | ||
| 155 | #define XPC_PURE | ||
| 156 | /*! @parseOnly */ | ||
| 157 | #define XPC_WARN_RESULT | ||
| 158 | /*! @parseOnly */ | ||
| 159 | #define XPC_MALLOC | ||
| 160 | /*! @parseOnly */ | ||
| 161 | #define XPC_UNUSED | ||
| 162 | /*! @parseOnly */ | ||
| 163 | #define XPC_PACKED | ||
| 164 | /*! @parseOnly */ | ||
| 165 | #define XPC_PRINTF(m, n) | ||
| 166 | /*! @parseOnly */ | ||
| 167 | #define XPC_INLINE static inline | ||
| 168 | /*! @parseOnly */ | ||
| 169 | #define XPC_NOINLINE | ||
| 170 | /*! @parseOnly */ | ||
| 171 | #define XPC_NOIMPL | ||
| 172 | /*! @parseOnly */ | ||
| 173 | #define XPC_EXPORT extern | ||
| 174 | /*! @parseOnly */ | ||
| 175 | #define XPC_WEAKIMPORT | ||
| 176 | /*! @parseOnly */ | ||
| 177 | #define XPC_DEPRECATED | ||
| 178 | /*! @parseOnly */ | ||
| 179 | #define XPC_UNAVAILABLE(m) | ||
| 180 | /*! @parseOnly */ | ||
| 181 | #define XPC_NOESCAPE | ||
| 182 | #endif // __GNUC__ | ||
| 183 | |||
| 184 | #if __has_feature(assume_nonnull) | ||
| 185 | #define XPC_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 186 | #define XPC_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 187 | #else | ||
| 188 | #define XPC_ASSUME_NONNULL_BEGIN | ||
| 189 | #define XPC_ASSUME_NONNULL_END | ||
| 190 | #endif | ||
| 191 | |||
| 192 | #if __has_feature(nullability_on_arrays) | ||
| 193 | #define XPC_NONNULL_ARRAY _Nonnull | ||
| 194 | #else | ||
| 195 | #define XPC_NONNULL_ARRAY | ||
| 196 | #endif | ||
| 197 | |||
| 198 | #ifdef OS_CLOSED_OPTIONS | ||
| 199 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 200 | 		OS_CLOSED_OPTIONS(_name, _type, __VA_ARGS__) | ||
| 201 | #else // OS_CLOSED_ENUM | ||
| 202 | #define XPC_FLAGS_ENUM(_name, _type, ...) \ | ||
| 203 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 204 | #endif // OS_CLOSED_ENUM | ||
| 205 | |||
| 206 | #ifdef OS_CLOSED_ENUM | ||
| 207 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 208 | 		OS_CLOSED_ENUM(_name, _type, __VA_ARGS__) | ||
| 209 | #else // OS_CLOSED_ENUM | ||
| 210 | #define XPC_ENUM(_name, _type, ...) \ | ||
| 211 | 		OS_ENUM(_name, _type, __VA_ARGS__) | ||
| 212 | #endif // OS_CLOSED_ENUM | ||
| 213 | |||
| 214 | __END_DECLS | ||
| 215 | |||
| 216 | #endif // __XPC_BASE_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/any-macos.12-any/xpc/connection.h deleted-794| ... | @@ -1,794 +0,0 @@ | ||
| 1 | #ifndef __XPC_CONNECTION_H__ | ||
| 2 | #define __XPC_CONNECTION_H__ | ||
| 3 | |||
| 4 | #ifndef __XPC_INDIRECT__ | ||
| 5 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 6 | // For HeaderDoc. | ||
| 7 | #include <xpc/base.h> | ||
| 8 | #endif // __XPC_INDIRECT__ | ||
| 9 | |||
| 10 | #ifndef __BLOCKS__ | ||
| 11 | #error "XPC connections require Blocks support." | ||
| 12 | #endif // __BLOCKS__ | ||
| 13 | |||
| 14 | XPC_ASSUME_NONNULL_BEGIN | ||
| 15 | __BEGIN_DECLS | ||
| 16 | |||
| 17 | /*! | ||
| 18 | * @constant XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 19 | * Will be delivered to the connection's event handler if the remote service | ||
| 20 | * exited. The connection is still live even in this case, and resending a | ||
| 21 | * message will cause the service to be launched on-demand. This error serves | ||
| 22 | * as a client's indication that it should resynchronize any state that it had | ||
| 23 | * given the service. | ||
| 24 | * | ||
| 25 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 26 | * error occurs. In the case where a message waiting to be sent has a reply | ||
| 27 | * handler, that handler will be invoked with this error. In the context of the | ||
| 28 | * reply handler, this error indicates that a reply to the message will never | ||
| 29 | * arrive. | ||
| 30 | * | ||
| 31 | * Messages that do not have reply handlers associated with them will be | ||
| 32 | * silently disposed of. This error will only be given to peer connections. | ||
| 33 | */ | ||
| 34 | #define XPC_ERROR_CONNECTION_INTERRUPTED \ | ||
| 35 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_interrupted) | ||
| 36 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 37 | XPC_EXPORT | ||
| 38 | const struct _xpc_dictionary_s _xpc_error_connection_interrupted; | ||
| 39 | |||
| 40 | /*! | ||
| 41 | * @constant XPC_ERROR_CONNECTION_INVALID | ||
| 42 | * Will be delivered to the connection's event handler if the named service | ||
| 43 | * provided to xpc_connection_create() could not be found in the XPC service | ||
| 44 | * namespace. The connection is useless and should be disposed of. | ||
| 45 | * | ||
| 46 | * Any messages in the queue to be sent will be unwound and canceled when this | ||
| 47 | * error occurs, similarly to the behavior when XPC_ERROR_CONNECTION_INTERRUPTED | ||
| 48 | * occurs. The only difference is that the XPC_ERROR_CONNECTION_INVALID will be | ||
| 49 | * given to outstanding reply handlers and the connection's event handler. | ||
| 50 | * | ||
| 51 | * This error may be given to any type of connection. | ||
| 52 | */ | ||
| 53 | #define XPC_ERROR_CONNECTION_INVALID \ | ||
| 54 | 	XPC_GLOBAL_OBJECT(_xpc_error_connection_invalid) | ||
| 55 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 56 | XPC_EXPORT | ||
| 57 | const struct _xpc_dictionary_s _xpc_error_connection_invalid; | ||
| 58 | |||
| 59 | /*! | ||
| 60 | * @constant XPC_ERROR_TERMINATION_IMMINENT | ||
| 61 | * On macOS, this error will be delivered to a peer connection's event handler | ||
| 62 | * when the XPC runtime has determined that the program should exit and that | ||
| 63 | * all outstanding transactions must be wound down, and no new transactions can | ||
| 64 | * be opened. | ||
| 65 | * | ||
| 66 | * After this error has been delivered to the event handler, no more messages | ||
| 67 | * will be received by the connection. The runtime will still attempt to deliver | ||
| 68 | * outgoing messages, but this error should be treated as an indication that | ||
| 69 | * the program will exit very soon, and any outstanding business over the | ||
| 70 | * connection should be wrapped up as quickly as possible and the connection | ||
| 71 | * canceled shortly thereafter. | ||
| 72 | * | ||
| 73 | * This error will only be delivered to peer connections received through a | ||
| 74 | * listener or the xpc_main() event handler. | ||
| 75 | */ | ||
| 76 | #define XPC_ERROR_TERMINATION_IMMINENT \ | ||
| 77 | 	XPC_GLOBAL_OBJECT(_xpc_error_termination_imminent) | ||
| 78 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 79 | XPC_EXPORT | ||
| 80 | const struct _xpc_dictionary_s _xpc_error_termination_imminent; | ||
| 81 | |||
| 82 | /*! | ||
| 83 | * @constant XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT | ||
| 84 | * On macOS, this error will be delivered to a peer connection's event handler | ||
| 85 | * when the XPC runtime has detected that a peer connection does not | ||
| 86 | * satisfy the code signing requirement specified for the connection. | ||
| 87 | * | ||
| 88 | * See {@link xpc_connection_set_peer_code_signing_requirement} | ||
| 89 | */ | ||
| 90 | #define XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT \ | ||
| 91 | 	XPC_GLOBAL_OBJECT(_xpc_error_peer_code_signing_requirement) | ||
| 92 | __API_AVAILABLE(macos(12.0)) | ||
| 93 | XPC_EXPORT | ||
| 94 | const struct _xpc_dictionary_s _xpc_error_peer_code_signing_requirement; | ||
| 95 | |||
| 96 | /*! | ||
| 97 | * @constant XPC_CONNECTION_MACH_SERVICE_LISTENER | ||
| 98 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 99 | * caller is the listener for the named service. This flag may only be passed | ||
| 100 | * for services which are advertised in the process' launchd.plist(5). You may | ||
| 101 | * not use this flag to dynamically add services to the Mach bootstrap | ||
| 102 | * namespace. | ||
| 103 | */ | ||
| 104 | #define XPC_CONNECTION_MACH_SERVICE_LISTENER (1 << 0) | ||
| 105 | |||
| 106 | /*! | ||
| 107 | * @constant XPC_CONNECTION_MACH_SERVICE_PRIVILEGED | ||
| 108 | * Passed to xpc_connection_create_mach_service(). This flag indicates that the | ||
| 109 | * job advertising the service name in its launchd.plist(5) should be in the | ||
| 110 | * privileged Mach bootstrap. This is typically accomplished by placing your | ||
| 111 | * launchd.plist(5) in /Library/LaunchDaemons. If specified alongside the | ||
| 112 | * XPC_CONNECTION_MACH_SERVICE_LISTENER flag, this flag is a no-op. | ||
| 113 | */ | ||
| 114 | #define XPC_CONNECTION_MACH_SERVICE_PRIVILEGED (1 << 1) | ||
| 115 | |||
| 116 | /*! | ||
| 117 | * @typedef xpc_finalizer_f | ||
| 118 | * A function that is invoked when a connection is being torn down and its | ||
| 119 | * context needs to be freed. The sole argument is the value that was given to | ||
| 120 | * {@link xpc_connection_set_context} or NULL if no context has been set. It is | ||
| 121 | * not safe to reference the connection from within this function. | ||
| 122 | * | ||
| 123 | * @param value | ||
| 124 | * The context object that is to be disposed of. | ||
| 125 | */ | ||
| 126 | typedef void (*xpc_finalizer_t)(void * _Nullable value); | ||
| 127 | |||
| 128 | /*! | ||
| 129 | * @function xpc_connection_create | ||
| 130 | * Creates a new connection object. | ||
| 131 | * | ||
| 132 | * @param name | ||
| 133 | * If non-NULL, the name of the service with which to connect. The returned | ||
| 134 | * connection will be a peer. | ||
| 135 | * | ||
| 136 | * If NULL, an anonymous listener connection will be created. You can embed the | ||
| 137 | * ability to create new peer connections in an endpoint, which can be inserted | ||
| 138 | * into a message and sent to another process . | ||
| 139 | * | ||
| 140 | * @param targetq | ||
| 141 | * The GCD queue to which the event handler block will be submitted. This | ||
| 142 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 143 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 144 | * The target queue may be changed later with a call to | ||
| 145 | * xpc_connection_set_target_queue(). | ||
| 146 | * | ||
| 147 | * @result | ||
| 148 | * A new connection object. The caller is responsible for disposing of the | ||
| 149 | * returned object with {@link xpc_release} when it is no longer needed. | ||
| 150 | * | ||
| 151 | * @discussion | ||
| 152 | * This method will succeed even if the named service does not exist. This is | ||
| 153 | * because the XPC namespace is not queried for the service name until the | ||
| 154 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 155 | * | ||
| 156 | * XPC connections, like dispatch sources, are returned in an inactive state, so | ||
| 157 | * you must call {@link xpc_connection_activate()} in order to begin receiving | ||
| 158 | * events from the connection. Also like dispatch sources, connections must be | ||
| 159 | * activated and not suspended in order to be safely released. It is | ||
| 160 | * a programming error to release an inactive or suspended connection. | ||
| 161 | */ | ||
| 162 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 163 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT | ||
| 164 | xpc_connection_t | ||
| 165 | xpc_connection_create(const char * _Nullable name, | ||
| 166 | 	dispatch_queue_t _Nullable targetq); | ||
| 167 | |||
| 168 | /*! | ||
| 169 | * @function xpc_connection_create_mach_service | ||
| 170 | * Creates a new connection object representing a Mach service. | ||
| 171 | * | ||
| 172 | * @param name | ||
| 173 | * The name of the remote service with which to connect. The service name must | ||
| 174 | * exist in a Mach bootstrap that is accessible to the process and be advertised | ||
| 175 | * in a launchd.plist. | ||
| 176 | * | ||
| 177 | * @param targetq | ||
| 178 | * The GCD queue to which the event handler block will be submitted. This | ||
| 179 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 180 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 181 | * The target queue may be changed later with a call to | ||
| 182 | * xpc_connection_set_target_queue(). | ||
| 183 | * | ||
| 184 | * @param flags | ||
| 185 | * Additional attributes with which to create the connection. | ||
| 186 | * | ||
| 187 | * @result | ||
| 188 | * A new connection object. | ||
| 189 | * | ||
| 190 | * @discussion | ||
| 191 | * If the XPC_CONNECTION_MACH_SERVICE_LISTENER flag is given to this method, | ||
| 192 | * then the connection returned will be a listener connection. Otherwise, a peer | ||
| 193 | * connection will be returned. See the documentation for | ||
| 194 | * {@link xpc_connection_set_event_handler()} for the semantics of listener | ||
| 195 | * connections versus peer connections. | ||
| 196 | * | ||
| 197 | * This method will succeed even if the named service does not exist. This is | ||
| 198 | * because the Mach namespace is not queried for the service name until the | ||
| 199 | * connection has been activated. See {@link xpc_connection_activate()}. | ||
| 200 | */ | ||
| 201 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 202 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL1 | ||
| 203 | xpc_connection_t | ||
| 204 | xpc_connection_create_mach_service(const char *name, | ||
| 205 | 	dispatch_queue_t _Nullable targetq, uint64_t flags); | ||
| 206 | |||
| 207 | /*! | ||
| 208 | * @function xpc_connection_create_from_endpoint | ||
| 209 | * Creates a new connection from the given endpoint. | ||
| 210 | * | ||
| 211 | * @param endpoint | ||
| 212 | * The endpoint from which to create the new connection. | ||
| 213 | * | ||
| 214 | * @result | ||
| 215 | * A new peer connection to the listener represented by the given endpoint. | ||
| 216 | * | ||
| 217 | * The same responsibilities of setting an event handler and activating the | ||
| 218 | * connection after calling xpc_connection_create() apply to the connection | ||
| 219 | * returned by this API. Since the connection yielded by this API is not | ||
| 220 | * associated with a name (and therefore is not rediscoverable), this connection | ||
| 221 | * will receive XPC_ERROR_CONNECTION_INVALID if the listening side crashes, | ||
| 222 | * exits or cancels the listener connection. | ||
| 223 | */ | ||
| 224 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 225 | XPC_EXPORT XPC_MALLOC XPC_RETURNS_RETAINED XPC_WARN_RESULT XPC_NONNULL_ALL | ||
| 226 | xpc_connection_t | ||
| 227 | xpc_connection_create_from_endpoint(xpc_endpoint_t endpoint); | ||
| 228 | |||
| 229 | /*! | ||
| 230 | * @function xpc_connection_set_target_queue | ||
| 231 | * Sets the target queue of the given connection. | ||
| 232 | * | ||
| 233 | * @param connection | ||
| 234 | * The connection object which is to be manipulated. | ||
| 235 | * | ||
| 236 | * @param targetq | ||
| 237 | * The GCD queue to which the event handler block will be submitted. This | ||
| 238 | * parameter may be NULL, in which case the connection's target queue will be | ||
| 239 | * libdispatch's default target queue, defined as DISPATCH_TARGET_QUEUE_DEFAULT. | ||
| 240 | * | ||
| 241 | * @discussion | ||
| 242 | * Setting the target queue is asynchronous and non-preemptive and therefore | ||
| 243 | * this method will not interrupt the execution of an already-running event | ||
| 244 | * handler block. Setting the target queue may be likened to issuing a barrier | ||
| 245 | * to the connection which does the actual work of changing the target queue. | ||
| 246 | * | ||
| 247 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 248 | * queues. If the target queue is a concurrent queue, then XPC still guarantees | ||
| 249 | * that there will never be more than one invocation of the connection's event | ||
| 250 | * handler block executing concurrently. If you wish to process events | ||
| 251 | * concurrently, you can dispatch_async(3) to a concurrent queue from within | ||
| 252 | * the event handler. | ||
| 253 | * | ||
| 254 | * IMPORTANT: When called from within the event handler block, | ||
| 255 | * dispatch_get_current_queue(3) is NOT guaranteed to return a pointer to the | ||
| 256 | * queue set with this method. | ||
| 257 | * | ||
| 258 | * Despite this seeming inconsistency, the XPC runtime guarantees that, when the | ||
| 259 | * target queue is a serial queue, the event handler block will execute | ||
| 260 | * synchonously with respect to other blocks submitted to that same queue. When | ||
| 261 | * the target queue is a concurrent queue, the event handler block may run | ||
| 262 | * concurrently with other blocks submitted to that queue, but it will never run | ||
| 263 | * concurrently with other invocations of itself for the same connection, as | ||
| 264 | * discussed previously. | ||
| 265 | */ | ||
| 266 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 267 | XPC_EXPORT XPC_NONNULL1 | ||
| 268 | void | ||
| 269 | xpc_connection_set_target_queue(xpc_connection_t connection, | ||
| 270 | 	dispatch_queue_t _Nullable targetq); | ||
| 271 | |||
| 272 | /*! | ||
| 273 | * @function xpc_connection_set_event_handler | ||
| 274 | * Sets the event handler block for the connection. | ||
| 275 | * | ||
| 276 | * @param connection | ||
| 277 | * The connection object which is to be manipulated. | ||
| 278 | * | ||
| 279 | * @param handler | ||
| 280 | * The event handler block. | ||
| 281 | * | ||
| 282 | * @discussion | ||
| 283 | * Setting the event handler is asynchronous and non-preemptive, and therefore | ||
| 284 | * this method will not interrupt the execution of an already-running event | ||
| 285 | * handler block. If the event handler is executing at the time of this call, it | ||
| 286 | * will finish, and then the connection's event handler will be changed before | ||
| 287 | * the next invocation of the event handler. The XPC runtime guarantees this | ||
| 288 | * non-preemptiveness even for concurrent target queues. | ||
| 289 | * | ||
| 290 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 291 | * xpc_connection_set_event_handler() from within the event handler block. | ||
| 292 | * | ||
| 293 | * The event handler's execution should be treated as a barrier to all | ||
| 294 | * connection activity. When it is executing, the connection will not attempt to | ||
| 295 | * send or receive messages, including reply messages. Thus, it is not safe to | ||
| 296 | * call xpc_connection_send_message_with_reply_sync() on the connection from | ||
| 297 | * within the event handler. | ||
| 298 | * | ||
| 299 | * You do not hold a reference on the object received as the event handler's | ||
| 300 | * only argument. Regardless of the type of object received, it is safe to call | ||
| 301 | * xpc_retain() on the object to obtain a reference to it. | ||
| 302 | * | ||
| 303 | * A connection may receive different events depending upon whether it is a | ||
| 304 | * listener or not. Any connection may receive an error in its event handler. | ||
| 305 | * But while normal connections may receive messages in addition to errors, | ||
| 306 | * listener connections will receive connections and and not messages. | ||
| 307 | * | ||
| 308 | * Connections received by listeners are equivalent to those returned by | ||
| 309 | * xpc_connection_create() with a non-NULL name argument and a NULL targetq | ||
| 310 | * argument with the exception that you do not hold a reference on them. | ||
| 311 | * You must set an event handler and activate the connection. If you do not wish | ||
| 312 | * to accept the connection, you may simply call xpc_connection_cancel() on it | ||
| 313 | * and return. The runtime will dispose of it for you. | ||
| 314 | * | ||
| 315 | * If there is an error in the connection, this handler will be invoked with the | ||
| 316 | * error dictionary as its argument. This dictionary will be one of the well- | ||
| 317 | * known XPC_ERROR_* dictionaries. | ||
| 318 | * | ||
| 319 | * Regardless of the type of event, ownership of the event object is NOT | ||
| 320 | * implicitly transferred. Thus, the object will be released and deallocated at | ||
| 321 | * some point in the future after the event handler returns. If you wish the | ||
| 322 | * event's lifetime to persist, you must retain it with xpc_retain(). | ||
| 323 | * | ||
| 324 | * Connections received through the event handler will be released and | ||
| 325 | * deallocated after the connection has gone invalid and delivered that event to | ||
| 326 | * its event handler. | ||
| 327 | */ | ||
| 328 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 329 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 330 | void | ||
| 331 | xpc_connection_set_event_handler(xpc_connection_t connection, | ||
| 332 | 	xpc_handler_t handler); | ||
| 333 | |||
| 334 | /*! | ||
| 335 | * @function xpc_connection_activate | ||
| 336 | * Activates the connection. Connections start in an inactive state, so you must | ||
| 337 | * call xpc_connection_activate() on a connection before it will send or receive | ||
| 338 | * any messages. | ||
| 339 | * | ||
| 340 | * @param connection | ||
| 341 | * The connection object which is to be manipulated. | ||
| 342 | * | ||
| 343 | * @discussion | ||
| 344 | * Calling xpc_connection_activate() on an active connection has no effect. | ||
| 345 | * Releasing the last reference on an inactive connection that was created with | ||
| 346 | * an xpc_connection_create*() call is undefined. | ||
| 347 | * | ||
| 348 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 349 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 350 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 351 | * is preferred. | ||
| 352 | */ | ||
| 353 | __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 354 | __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 355 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 356 | void | ||
| 357 | xpc_connection_activate(xpc_connection_t connection); | ||
| 358 | |||
| 359 | /*! | ||
| 360 | * @function xpc_connection_suspend | ||
| 361 | * Suspends the connection so that the event handler block will not fire and | ||
| 362 | * that the connection will not attempt to send any messages it has in its | ||
| 363 | * queue. All calls to xpc_connection_suspend() must be balanced with calls to | ||
| 364 | * xpc_connection_resume() before releasing the last reference to the | ||
| 365 | * connection. | ||
| 366 | * | ||
| 367 | * @param connection | ||
| 368 | * The connection object which is to be manipulated. | ||
| 369 | * | ||
| 370 | * @discussion | ||
| 371 | * Suspension is asynchronous and non-preemptive, and therefore this method will | ||
| 372 | * not interrupt the execution of an already-running event handler block. If | ||
| 373 | * the event handler is executing at the time of this call, it will finish, and | ||
| 374 | * then the connection will be suspended before the next scheduled invocation | ||
| 375 | * of the event handler. The XPC runtime guarantees this non-preemptiveness even | ||
| 376 | * for concurrent target queues. | ||
| 377 | * | ||
| 378 | * Connection event handlers are non-reentrant, so it is safe to call | ||
| 379 | * xpc_connection_suspend() from within the event handler block. | ||
| 380 | */ | ||
| 381 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 382 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 383 | void | ||
| 384 | xpc_connection_suspend(xpc_connection_t connection); | ||
| 385 | |||
| 386 | /*! | ||
| 387 | * @function xpc_connection_resume | ||
| 388 | * Resumes the connection. | ||
| 389 | * | ||
| 390 | * @param connection | ||
| 391 | * The connection object which is to be manipulated. | ||
| 392 | * | ||
| 393 | * @discussion | ||
| 394 | * In order for a connection to become live, every call to | ||
| 395 | * xpc_connection_suspend() must be balanced with a call to | ||
| 396 | * xpc_connection_resume(). | ||
| 397 | * | ||
| 398 | * For backward compatibility reasons, xpc_connection_resume() on an inactive | ||
| 399 | * and not otherwise suspended xpc connection has the same effect as calling | ||
| 400 | * xpc_connection_activate(). For new code, using xpc_connection_activate() | ||
| 401 | * is preferred. | ||
| 402 | * | ||
| 403 | * Calling xpc_connection_resume() more times than xpc_connection_suspend() | ||
| 404 | * has been called is otherwise considered an error. | ||
| 405 | */ | ||
| 406 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 407 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 408 | void | ||
| 409 | xpc_connection_resume(xpc_connection_t connection); | ||
| 410 | |||
| 411 | /*! | ||
| 412 | * @function xpc_connection_send_message | ||
| 413 | * Sends a message over the connection to the destination service. | ||
| 414 | * | ||
| 415 | * @param connection | ||
| 416 | * The connection over which the message shall be sent. | ||
| 417 | * | ||
| 418 | * @param message | ||
| 419 | * The message to send. This must be a dictionary object. This dictionary is | ||
| 420 | * logically copied by the connection, so it is safe to modify the dictionary | ||
| 421 | * after this call. | ||
| 422 | * | ||
| 423 | * @discussion | ||
| 424 | * Messages are delivered in FIFO order. This API is safe to call from multiple | ||
| 425 | * GCD queues. There is no indication that a message was delivered successfully. | ||
| 426 | * This is because even once the message has been successfully enqueued on the | ||
| 427 | * remote end, there are no guarantees about when the runtime will dequeue the | ||
| 428 | * message and invoke the other connection's event handler block. | ||
| 429 | * | ||
| 430 | * If this API is used to send a message that is in reply to another message, | ||
| 431 | * there is no guarantee of ordering between the invocations of the connection's | ||
| 432 | * event handler and the reply handler for that message, even if they are | ||
| 433 | * targeted to the same queue. | ||
| 434 | * | ||
| 435 | * After extensive study, we have found that clients who are interested in | ||
| 436 | * the state of the message on the server end are typically holding open | ||
| 437 | * transactions related to that message. And the only reliable way to track the | ||
| 438 | * lifetime of that transaction is at the protocol layer. So the server should | ||
| 439 | * send a reply message, which upon receiving, will cause the client to close | ||
| 440 | * its transaction. | ||
| 441 | */ | ||
| 442 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 443 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 444 | void | ||
| 445 | xpc_connection_send_message(xpc_connection_t connection, xpc_object_t message); | ||
| 446 | |||
| 447 | /*! | ||
| 448 | * @function xpc_connection_send_barrier | ||
| 449 | * Issues a barrier against the connection's message-send activity. | ||
| 450 | * | ||
| 451 | * @param connection | ||
| 452 | * The connection against which the barrier is to be issued. | ||
| 453 | * | ||
| 454 | * @param barrier | ||
| 455 | * The barrier block to issue. This barrier prevents concurrent message-send | ||
| 456 | * activity on the connection. No messages will be sent while the barrier block | ||
| 457 | * is executing. | ||
| 458 | * | ||
| 459 | * @discussion | ||
| 460 | * XPC guarantees that, even if the connection's target queue is a concurrent | ||
| 461 | * queue, there are no other messages being sent concurrently while the barrier | ||
| 462 | * block is executing. XPC does not guarantee that the receipt of messages | ||
| 463 | * (either through the connection's event handler or through reply handlers) | ||
| 464 | * will be suspended while the barrier is executing. | ||
| 465 | * | ||
| 466 | * A barrier is issued relative to the message-send queue. Thus, if you call | ||
| 467 | * xpc_connection_send_message() five times and then call | ||
| 468 | * xpc_connection_send_barrier(), the barrier will be invoked after the fifth | ||
| 469 | * message has been sent and its memory disposed of. You may safely cancel a | ||
| 470 | * connection from within a barrier block. | ||
| 471 | * | ||
| 472 | * If a barrier is issued after sending a message which expects a reply, the | ||
| 473 | * behavior is the same as described above. The receipt of a reply message will | ||
| 474 | * not influence when the barrier runs. | ||
| 475 | * | ||
| 476 | * A barrier block can be useful for throttling resource consumption on the | ||
| 477 | * connected side of a connection. For example, if your connection sends many | ||
| 478 | * large messages, you can use a barrier to limit the number of messages that | ||
| 479 | * are inflight at any given time. This can be particularly useful for messages | ||
| 480 | * that contain kernel resources (like file descriptors) which have a system- | ||
| 481 | * wide limit. | ||
| 482 | * | ||
| 483 | * If a barrier is issued on a canceled connection, it will be invoked | ||
| 484 | * immediately. If a connection has been canceled and still has outstanding | ||
| 485 | * barriers, those barriers will be invoked as part of the connection's | ||
| 486 | * unwinding process. | ||
| 487 | * | ||
| 488 | * It is important to note that a barrier block's execution order is not | ||
| 489 | * guaranteed with respect to other blocks that have been scheduled on the | ||
| 490 | * target queue of the connection. Or said differently, | ||
| 491 | * xpc_connection_send_barrier(3) is not equivalent to dispatch_async(3). | ||
| 492 | */ | ||
| 493 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 494 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 495 | void | ||
| 496 | xpc_connection_send_barrier(xpc_connection_t connection, | ||
| 497 | 	dispatch_block_t barrier); | ||
| 498 | |||
| 499 | /*! | ||
| 500 | * @function xpc_connection_send_message_with_reply | ||
| 501 | * Sends a message over the connection to the destination service and associates | ||
| 502 | * a handler to be invoked when the remote service sends a reply message. | ||
| 503 | * | ||
| 504 | * @param connection | ||
| 505 | * The connection over which the message shall be sent. | ||
| 506 | * | ||
| 507 | * @param message | ||
| 508 | * The message to send. This must be a dictionary object. | ||
| 509 | * | ||
| 510 | * @param replyq | ||
| 511 | * The GCD queue to which the reply handler will be submitted. This may be a | ||
| 512 | * concurrent queue. | ||
| 513 | * | ||
| 514 | * @param handler | ||
| 515 | * The handler block to invoke when a reply to the message is received from | ||
| 516 | * the connection. If the remote service exits prematurely before the reply was | ||
| 517 | * received, the XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. | ||
| 518 | * If the connection went invalid before the message could be sent, the | ||
| 519 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 520 | * | ||
| 521 | * @discussion | ||
| 522 | * If the given GCD queue is a concurrent queue, XPC cannot guarantee that there | ||
| 523 | * will not be multiple reply handlers being invoked concurrently. XPC does not | ||
| 524 | * guarantee any ordering for the invocation of reply handers. So if multiple | ||
| 525 | * messages are waiting for replies and the connection goes invalid, there is no | ||
| 526 | * guarantee that the reply handlers will be invoked in FIFO order. Similarly, | ||
| 527 | * XPC does not guarantee that reply handlers will not run concurrently with | ||
| 528 | * the connection's event handler in the case that the reply queue and the | ||
| 529 | * connection's target queue are the same concurrent queue. | ||
| 530 | */ | ||
| 531 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 532 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL4 | ||
| 533 | void | ||
| 534 | xpc_connection_send_message_with_reply(xpc_connection_t connection, | ||
| 535 | 	xpc_object_t message, dispatch_queue_t _Nullable replyq, | ||
| 536 | 	xpc_handler_t handler); | ||
| 537 | |||
| 538 | /*! | ||
| 539 | * @function xpc_connection_send_message_with_reply_sync | ||
| 540 | * Sends a message over the connection and blocks the caller until a reply is | ||
| 541 | * received. | ||
| 542 | * | ||
| 543 | * @param connection | ||
| 544 | * The connection over which the message shall be sent. | ||
| 545 | * | ||
| 546 | * @param message | ||
| 547 | * The message to send. This must be a dictionary object. | ||
| 548 | * | ||
| 549 | * @result | ||
| 550 | * The message that the remote service sent in reply to the original message. | ||
| 551 | * If the remote service exits prematurely before the reply was received, the | ||
| 552 | * XPC_ERROR_CONNECTION_INTERRUPTED error will be returned. If the connection | ||
| 553 | * went invalid before the message could be sent, the | ||
| 554 | * XPC_ERROR_CONNECTION_INVALID error will be returned. | ||
| 555 | * | ||
| 556 | * You are responsible for releasing the returned object. | ||
| 557 | * | ||
| 558 | * @discussion | ||
| 559 | * This API supports priority inversion avoidance, and should be used instead of | ||
| 560 | * combining xpc_connection_send_message_with_reply() with a semaphore. | ||
| 561 | * | ||
| 562 | * Invoking this API from a queue that is a part of the target queue hierarchy | ||
| 563 | * results in deadlocks under certain conditions. | ||
| 564 | * | ||
| 565 | * Be judicious about your use of this API. It can block indefinitely, so if you | ||
| 566 | * are using it to implement an API that can be called from the main thread, you | ||
| 567 | * may wish to consider allowing the API to take a queue and callback block so | ||
| 568 | * that results may be delivered asynchronously if possible. | ||
| 569 | */ | ||
| 570 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 571 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT XPC_RETURNS_RETAINED | ||
| 572 | xpc_object_t | ||
| 573 | xpc_connection_send_message_with_reply_sync(xpc_connection_t connection, | ||
| 574 | 	xpc_object_t message); | ||
| 575 | |||
| 576 | /*! | ||
| 577 | * @function xpc_connection_cancel | ||
| 578 | * Cancels the connection and ensures that its event handler will not fire | ||
| 579 | * again. After this call, any messages that have not yet been sent will be | ||
| 580 | * discarded, and the connection will be unwound. If there are messages that are | ||
| 581 | * awaiting replies, they will have their reply handlers invoked with the | ||
| 582 | * XPC_ERROR_CONNECTION_INVALID error. | ||
| 583 | * | ||
| 584 | * @param connection | ||
| 585 | * The connection object which is to be manipulated. | ||
| 586 | * | ||
| 587 | * @discussion | ||
| 588 | * Cancellation is asynchronous and non-preemptive and therefore this method | ||
| 589 | * will not interrupt the execution of an already-running event handler block. | ||
| 590 | * If the event handler is executing at the time of this call, it will finish, | ||
| 591 | * and then the connection will be canceled, causing a final invocation of the | ||
| 592 | * event handler to be scheduled with the XPC_ERROR_CONNECTION_INVALID error. | ||
| 593 | * After that invocation, there will be no further invocations of the event | ||
| 594 | * handler. | ||
| 595 | * | ||
| 596 | * The XPC runtime guarantees this non-preemptiveness even for concurrent target | ||
| 597 | * queues. | ||
| 598 | */ | ||
| 599 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 600 | XPC_EXPORT XPC_NONNULL_ALL | ||
| 601 | void | ||
| 602 | xpc_connection_cancel(xpc_connection_t connection); | ||
| 603 | |||
| 604 | /*! | ||
| 605 | * @function xpc_connection_get_name | ||
| 606 | * Returns the name of the service with which the connections was created. | ||
| 607 | * | ||
| 608 | * @param connection | ||
| 609 | * The connection object which is to be examined. | ||
| 610 | * | ||
| 611 | * @result | ||
| 612 | * The name of the remote service. If you obtained the connection through an | ||
| 613 | * invocation of another connection's event handler, NULL is returned. | ||
| 614 | */ | ||
| 615 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 616 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 617 | const char * _Nullable | ||
| 618 | xpc_connection_get_name(xpc_connection_t connection); | ||
| 619 | |||
| 620 | /*! | ||
| 621 | * @function xpc_connection_get_euid | ||
| 622 | * Returns the EUID of the remote peer. | ||
| 623 | * | ||
| 624 | * @param connection | ||
| 625 | * The connection object which is to be examined. | ||
| 626 | * | ||
| 627 | * @result | ||
| 628 | * The EUID of the remote peer at the time the connection was made. | ||
| 629 | */ | ||
| 630 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 631 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 632 | uid_t | ||
| 633 | xpc_connection_get_euid(xpc_connection_t connection); | ||
| 634 | |||
| 635 | /*! | ||
| 636 | * @function xpc_connection_get_egid | ||
| 637 | * Returns the EGID of the remote peer. | ||
| 638 | * | ||
| 639 | * @param connection | ||
| 640 | * The connection object which is to be examined. | ||
| 641 | * | ||
| 642 | * @result | ||
| 643 | * The EGID of the remote peer at the time the connection was made. | ||
| 644 | */ | ||
| 645 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 646 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 647 | gid_t | ||
| 648 | xpc_connection_get_egid(xpc_connection_t connection); | ||
| 649 | |||
| 650 | /*! | ||
| 651 | * @function xpc_connection_get_pid | ||
| 652 | * Returns the PID of the remote peer. | ||
| 653 | * | ||
| 654 | * @param connection | ||
| 655 | * The connection object which is to be examined. | ||
| 656 | * | ||
| 657 | * @result | ||
| 658 | * The PID of the remote peer. | ||
| 659 | * | ||
| 660 | * @discussion | ||
| 661 | * A given PID is not guaranteed to be unique across an entire boot cycle. | ||
| 662 | * Great care should be taken when dealing with this information, as it can go | ||
| 663 | * stale after the connection is established. OS X recycles PIDs, and therefore | ||
| 664 | * another process could spawn and claim the PID before a message is actually | ||
| 665 | * received from the connection. | ||
| 666 | * | ||
| 667 | * XPC will deliver an error to your event handler if the remote process goes | ||
| 668 | * away, but there are no guarantees as to the timing of this notification's | ||
| 669 | * delivery either at the kernel layer or at the XPC layer. | ||
| 670 | */ | ||
| 671 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 672 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 673 | pid_t | ||
| 674 | xpc_connection_get_pid(xpc_connection_t connection); | ||
| 675 | |||
| 676 | /*! | ||
| 677 | * @function xpc_connection_get_asid | ||
| 678 | * Returns the audit session identifier of the remote peer. | ||
| 679 | * | ||
| 680 | * @param connection | ||
| 681 | * The connection object which is to be examined. | ||
| 682 | * | ||
| 683 | * @result | ||
| 684 | * The audit session ID of the remote peer at the time the connection was made. | ||
| 685 | */ | ||
| 686 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 687 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 688 | au_asid_t | ||
| 689 | xpc_connection_get_asid(xpc_connection_t connection); | ||
| 690 | |||
| 691 | /*! | ||
| 692 | * @function xpc_connection_set_context | ||
| 693 | * Sets context on an connection. | ||
| 694 | * | ||
| 695 | * @param connection | ||
| 696 | * The connection which is to be manipulated. | ||
| 697 | * | ||
| 698 | * @param context | ||
| 699 | * The context to associate with the connection. | ||
| 700 | * | ||
| 701 | * @discussion | ||
| 702 | * If you must manage the memory of the context object, you must set a finalizer | ||
| 703 | * to dispose of it. If this method is called on a connection which already has | ||
| 704 | * context associated with it, the finalizer will NOT be invoked. The finalizer | ||
| 705 | * is only invoked when the connection is being deallocated. | ||
| 706 | * | ||
| 707 | * It is recommended that, instead of changing the actual context pointer | ||
| 708 | * associated with the object, you instead change the state of the context | ||
| 709 | * object itself. | ||
| 710 | */ | ||
| 711 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 712 | XPC_EXPORT XPC_NONNULL1 | ||
| 713 | void | ||
| 714 | xpc_connection_set_context(xpc_connection_t connection, | ||
| 715 | 	void * _Nullable context); | ||
| 716 | |||
| 717 | /*! | ||
| 718 | * @function xpc_connection_get_context | ||
| 719 | * Returns the context associated with the connection. | ||
| 720 | * | ||
| 721 | * @param connection | ||
| 722 | * The connection which is to be examined. | ||
| 723 | * | ||
| 724 | * @result | ||
| 725 | * The context associated with the connection. NULL if there has been no context | ||
| 726 | * associated with the object. | ||
| 727 | */ | ||
| 728 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 729 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 730 | void * _Nullable | ||
| 731 | xpc_connection_get_context(xpc_connection_t connection); | ||
| 732 | |||
| 733 | /*! | ||
| 734 | * @function xpc_connection_set_finalizer_f | ||
| 735 | * Sets the finalizer for the given connection. | ||
| 736 | * | ||
| 737 | * @param connection | ||
| 738 | * The connection on which to set the finalizer. | ||
| 739 | * | ||
| 740 | * @param finalizer | ||
| 741 | * The function that will be invoked when the connection's retain count has | ||
| 742 | * dropped to zero and is being torn down. | ||
| 743 | * | ||
| 744 | * @discussion | ||
| 745 | * This method disposes of the context value associated with a connection, as | ||
| 746 | * set by {@link xpc_connection_set_context}. | ||
| 747 | * | ||
| 748 | * For many uses of context objects, this API allows for a convenient shorthand | ||
| 749 | * for freeing them. For example, for a context object allocated with malloc(3): | ||
| 750 | * | ||
| 751 | * xpc_connection_set_finalizer_f(object, free); | ||
| 752 | */ | ||
| 753 | __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_5_0) | ||
| 754 | XPC_EXPORT XPC_NONNULL1 | ||
| 755 | void | ||
| 756 | xpc_connection_set_finalizer_f(xpc_connection_t connection, | ||
| 757 | 	xpc_finalizer_t _Nullable finalizer); | ||
| 758 | |||
| 759 | /*! | ||
| 760 | * @function xpc_connection_set_peer_code_signing_requirement | ||
| 761 | * Requires that the connection peer satisfies a code signing requirement. | ||
| 762 | * | ||
| 763 | * @param connection | ||
| 764 | * The connection object which is to be modified. | ||
| 765 | * | ||
| 766 | * @param requirement | ||
| 767 | * The code signing requirement to be satisfied by the peer | ||
| 768 | * It is safe to deallocate the requirement string after calling `xpc_connection_set_peer_code_signing_requirement` | ||
| 769 | * | ||
| 770 | * @result | ||
| 771 | * 0 on success, non-zero on error | ||
| 772 | * | ||
| 773 | * @discussion | ||
| 774 | * This function will return an error promptly if the code signing requirement string is invalid. | ||
| 775 | * | ||
| 776 | * It is a programming error to call `xpc_connection_set_peer_code_signing_requirement` more than once per connection. | ||
| 777 | * | ||
| 778 | * All messages received on this connection will be checked to ensure they come from a peer who satisfies | ||
| 779 | * the code signing requirement. For a listener connection, requests that do not satisfy the requirement | ||
| 780 | * are dropped. When a reply is expected on the connection and the peer does not satisfy the requirement | ||
| 781 | * XPC_ERROR_PEER_CODE_SIGNING_REQUIREMENT will be delivered instead of the reply. | ||
| 782 | * | ||
| 783 | * @see https://developer.apple.com/library/archive/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html | ||
| 784 | */ | ||
| 785 | __API_AVAILABLE(macos(12.0)) | ||
| 786 | XPC_EXPORT XPC_NONNULL_ALL XPC_WARN_RESULT | ||
| 787 | int | ||
| 788 | xpc_connection_set_peer_code_signing_requirement(xpc_connection_t connection, const char *requirement); | ||
| 789 | |||
| 790 | |||
| 791 | __END_DECLS | ||
| 792 | XPC_ASSUME_NONNULL_END | ||
| 793 | |||
| 794 | #endif // __XPC_CONNECTION_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/AssertMacros.h created+1441| ... | @@ -0,0 +1,1441 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2002-2017 by Apple Inc.. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | |||
| 25 | /* | ||
| 26 | 	File: AssertMacros.h | ||
| 27 | |||
| 28 | 	Contains: This file defines structured error handling and assertion macros for | ||
| 29 | 				programming in C. Originally used in QuickDraw GX and later enhanced. | ||
| 30 | 				These macros are used throughout Apple's software. | ||
| 31 | 	 | ||
| 32 | 				New code may not want to begin adopting these macros and instead use | ||
| 33 | 				existing language functionality. | ||
| 34 | 	 | ||
| 35 | 				See "Living In an Exceptional World" by Sean Parent | ||
| 36 | 				(develop, The Apple Technical Journal, Issue 11, August/September 1992) | ||
| 37 | 				<http://developer.apple.com/dev/techsupport/develop/issue11toc.shtml> or | ||
| 38 | 				<http://www.mactech.com/articles/develop/issue_11/Parent_final.html> | ||
| 39 | 				for the methodology behind these error handling and assertion macros. | ||
| 40 | 	 | ||
| 41 | 	Bugs?: For bug reports, consult the following page on | ||
| 42 | 				the World Wide Web: | ||
| 43 | |||
| 44 | 	 http://developer.apple.com/bugreporter/ | ||
| 45 | */ | ||
| 46 | #ifndef __ASSERTMACROS__ | ||
| 47 | #define __ASSERTMACROS__ | ||
| 48 | |||
| 49 | #ifdef DEBUG_ASSERT_CONFIG_INCLUDE | ||
| 50 | #include DEBUG_ASSERT_CONFIG_INCLUDE | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* | ||
| 54 | * Macro overview: | ||
| 55 | * | ||
| 56 | * check(assertion) | ||
| 57 | * In production builds, pre-processed away | ||
| 58 | * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 59 | * | ||
| 60 | * verify(assertion) | ||
| 61 | * In production builds, evaluates assertion and does nothing | ||
| 62 | * In debug builds, if assertion evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 63 | * | ||
| 64 | * require(assertion, exceptionLabel) | ||
| 65 | * In production builds, if the assertion expression evaluates to false, goto exceptionLabel | ||
| 66 | * In debug builds, if the assertion expression evaluates to false, calls DEBUG_ASSERT_MESSAGE | ||
| 67 | * and jumps to exceptionLabel | ||
| 68 | * | ||
| 69 | * In addition the following suffixes are available: | ||
| 70 | * | ||
| 71 | * _noerr Adds "!= 0" to assertion. Useful for asserting and OSStatus or OSErr is noErr (zero) | ||
| 72 | * _action Adds statement to be executued if assertion fails | ||
| 73 | * _quiet Suppress call to DEBUG_ASSERT_MESSAGE | ||
| 74 | * _string Allows you to add explanitory message to DEBUG_ASSERT_MESSAGE | ||
| 75 | * | ||
| 76 | * For instance, require_noerr_string(resultCode, label, msg) will do nothing if | ||
| 77 | * resultCode is zero, otherwise it will call DEBUG_ASSERT_MESSAGE with msg | ||
| 78 | * and jump to label. | ||
| 79 | * | ||
| 80 | * Configuration: | ||
| 81 | * | ||
| 82 | * By default all macros generate "production code" (i.e non-debug). If | ||
| 83 | * DEBUG_ASSERT_PRODUCTION_CODE is defined to zero or DEBUG is defined to non-zero | ||
| 84 | * while this header is included, the macros will generated debug code. | ||
| 85 | * | ||
| 86 | * If DEBUG_ASSERT_COMPONENT_NAME_STRING is defined, all debug messages will | ||
| 87 | * be prefixed with it. | ||
| 88 | * | ||
| 89 | * By default, all messages write to stderr. If you would like to write a custom | ||
| 90 | * error message formater, defined DEBUG_ASSERT_MESSAGE to your function name. | ||
| 91 | * | ||
| 92 | * Each individual macro will only be defined if it is not already defined, so | ||
| 93 | * you can redefine their behavior singly by providing your own definition before | ||
| 94 | * this file is included. | ||
| 95 | * | ||
| 96 | * If you define __ASSERTMACROS__ before this file is included, then nothing in | ||
| 97 | * this file will take effect. | ||
| 98 | * | ||
| 99 | * Prior to Mac OS X 10.6 the macro names used in this file conflicted with some | ||
| 100 | * user code, including libraries in boost and the proposed C++ standards efforts, | ||
| 101 | * and there was no way for a client of this header to resolve this conflict. Because | ||
| 102 | * of this, most of the macros have been changed so that they are prefixed with | ||
| 103 | * __ and contain at least one capital letter, which should alleviate the current | ||
| 104 | * and future conflicts. However, to allow current sources to continue to compile, | ||
| 105 | * compatibility macros are defined at the end with the old names. A tops script | ||
| 106 | * at the end of this file will convert all of the old macro names used in a directory | ||
| 107 | * to the new names. Clients are recommended to migrate over to these new macros as | ||
| 108 | * they update their sources because a future release of Mac OS X will remove the | ||
| 109 | * old macro definitions ( without the double-underscore prefix ). Clients who | ||
| 110 | * want to compile without the old macro definitions can define the macro | ||
| 111 | * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES to 0 before this file is | ||
| 112 | * included. | ||
| 113 | */ | ||
| 114 | |||
| 115 | |||
| 116 | /* | ||
| 117 | * Before including this file, #define DEBUG_ASSERT_COMPONENT_NAME_STRING to | ||
| 118 | * a C-string containing the name of your client. This string will be passed to | ||
| 119 | * the DEBUG_ASSERT_MESSAGE macro for inclusion in any assertion messages. | ||
| 120 | * | ||
| 121 | * If you do not define DEBUG_ASSERT_COMPONENT_NAME_STRING, the default | ||
| 122 | * DEBUG_ASSERT_COMPONENT_NAME_STRING value, an empty string, will be used by | ||
| 123 | * the assertion macros. | ||
| 124 | */ | ||
| 125 | #ifndef DEBUG_ASSERT_COMPONENT_NAME_STRING | ||
| 126 | #define DEBUG_ASSERT_COMPONENT_NAME_STRING "" | ||
| 127 | #endif | ||
| 128 | |||
| 129 | |||
| 130 | /* | ||
| 131 | * To activate the additional assertion code and messages for non-production builds, | ||
| 132 | * #define DEBUG_ASSERT_PRODUCTION_CODE to zero before including this file. | ||
| 133 | * | ||
| 134 | * If you do not define DEBUG_ASSERT_PRODUCTION_CODE, the default value 1 will be used | ||
| 135 | * (production code = no assertion code and no messages). | ||
| 136 | */ | ||
| 137 | #ifndef DEBUG_ASSERT_PRODUCTION_CODE | ||
| 138 | #define DEBUG_ASSERT_PRODUCTION_CODE !DEBUG | ||
| 139 | #endif | ||
| 140 | |||
| 141 | |||
| 142 | /* | ||
| 143 | * DEBUG_ASSERT_MESSAGE(component, assertion, label, error, file, line, errorCode) | ||
| 144 | * | ||
| 145 | * Summary: | ||
| 146 | * All assertion messages are routed through this macro. If you wish to use your | ||
| 147 | * own routine to display assertion messages, you can override DEBUG_ASSERT_MESSAGE | ||
| 148 | * by #defining DEBUG_ASSERT_MESSAGE before including this file. | ||
| 149 | * | ||
| 150 | * Parameters: | ||
| 151 | * | ||
| 152 | * componentNameString: | ||
| 153 | * A pointer to a string constant containing the name of the | ||
| 154 | * component this code is part of. This must be a string constant | ||
| 155 | * (and not a string variable or NULL) because the preprocessor | ||
| 156 | * concatenates it with other string constants. | ||
| 157 | * | ||
| 158 | * assertionString: | ||
| 159 | * A pointer to a string constant containing the assertion. | ||
| 160 | * This must be a string constant (and not a string variable or | ||
| 161 | * NULL) because the Preprocessor concatenates it with other | ||
| 162 | * string constants. | ||
| 163 | * | ||
| 164 | * exceptionLabelString: | ||
| 165 | * A pointer to a string containing the exceptionLabel, or NULL. | ||
| 166 | * | ||
| 167 | * errorString: | ||
| 168 | * A pointer to the error string, or NULL. DEBUG_ASSERT_MESSAGE macros | ||
| 169 | * must not attempt to concatenate this string with constant | ||
| 170 | * character strings. | ||
| 171 | * | ||
| 172 | * fileName: | ||
| 173 | * A pointer to the fileName or pathname (generated by the | ||
| 174 | * preprocessor __FILE__ identifier), or NULL. | ||
| 175 | * | ||
| 176 | * lineNumber: | ||
| 177 | * The line number in the file (generated by the preprocessor | ||
| 178 | * __LINE__ identifier), or 0 (zero). | ||
| 179 | * | ||
| 180 | * errorCode: | ||
| 181 | * A value associated with the assertion, or 0. | ||
| 182 | * | ||
| 183 | * Here is an example of a DEBUG_ASSERT_MESSAGE macro and a routine which displays | ||
| 184 | * assertion messsages: | ||
| 185 | * | ||
| 186 | * #define DEBUG_ASSERT_COMPONENT_NAME_STRING "MyCoolProgram" | ||
| 187 | * | ||
| 188 | * #define DEBUG_ASSERT_MESSAGE(componentNameString, assertionString, \ | ||
| 189 | * exceptionLabelString, errorString, fileName, lineNumber, errorCode) \ | ||
| 190 | * MyProgramDebugAssert(componentNameString, assertionString, \ | ||
| 191 | * exceptionLabelString, errorString, fileName, lineNumber, errorCode) | ||
| 192 | * | ||
| 193 | * static void | ||
| 194 | * MyProgramDebugAssert(const char *componentNameString, const char *assertionString, | ||
| 195 | * const char *exceptionLabelString, const char *errorString, | ||
| 196 | * const char *fileName, long lineNumber, int errorCode) | ||
| 197 | * { | ||
| 198 | * if ( (assertionString != NULL) && (*assertionString != '\0') ) | ||
| 199 | * fprintf(stderr, "Assertion failed: %s: %s\n", componentNameString, assertionString); | ||
| 200 | * else | ||
| 201 | * fprintf(stderr, "Check failed: %s:\n", componentNameString); | ||
| 202 | * if ( exceptionLabelString != NULL ) | ||
| 203 | * fprintf(stderr, " %s\n", exceptionLabelString); | ||
| 204 | * if ( errorString != NULL ) | ||
| 205 | * fprintf(stderr, " %s\n", errorString); | ||
| 206 | * if ( fileName != NULL ) | ||
| 207 | * fprintf(stderr, " file: %s\n", fileName); | ||
| 208 | * if ( lineNumber != 0 ) | ||
| 209 | * fprintf(stderr, " line: %ld\n", lineNumber); | ||
| 210 | * if ( errorCode != 0 ) | ||
| 211 | * fprintf(stderr, " error: %d\n", errorCode); | ||
| 212 | * } | ||
| 213 | * | ||
| 214 | * If you do not define DEBUG_ASSERT_MESSAGE, a simple printf to stderr will be used. | ||
| 215 | */ | ||
| 216 | #ifndef DEBUG_ASSERT_MESSAGE | ||
| 217 | #ifdef KERNEL | ||
| 218 | #include <libkern/libkern.h> | ||
| 219 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 220 | printf( "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 221 | #else | ||
| 222 | #include <stdio.h> | ||
| 223 | #define DEBUG_ASSERT_MESSAGE(name, assertion, label, message, file, line, value) \ | ||
| 224 | fprintf(stderr, "AssertMacros: %s, %s file: %s, line: %d, value: %ld\n", assertion, (message!=0) ? message : "", file, line, (long) (value)); | ||
| 225 | #endif | ||
| 226 | #endif | ||
| 227 | |||
| 228 | |||
| 229 | |||
| 230 | |||
| 231 | |||
| 232 | /* | ||
| 233 | * __Debug_String(message) | ||
| 234 | * | ||
| 235 | * Summary: | ||
| 236 | * Production builds: does nothing and produces no code. | ||
| 237 | * | ||
| 238 | * Non-production builds: call DEBUG_ASSERT_MESSAGE. | ||
| 239 | * | ||
| 240 | * Parameters: | ||
| 241 | * | ||
| 242 | * message: | ||
| 243 | * The C string to display. | ||
| 244 | * | ||
| 245 | */ | ||
| 246 | #ifndef __Debug_String | ||
| 247 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 248 | 	 #define __Debug_String(message) | ||
| 249 | 	#else | ||
| 250 | 	 #define __Debug_String(message) \ | ||
| 251 | 		 do \ | ||
| 252 | 		 { \ | ||
| 253 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 254 | 				 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 255 | 				 "", \ | ||
| 256 | 				 0, \ | ||
| 257 | 				 message, \ | ||
| 258 | 				 __FILE__, \ | ||
| 259 | 				 __LINE__, \ | ||
| 260 | 				 0); \ | ||
| 261 | 		 } while ( 0 ) | ||
| 262 | 	#endif | ||
| 263 | #endif | ||
| 264 | |||
| 265 | /* | ||
| 266 | * __Check(assertion) | ||
| 267 | * | ||
| 268 | * Summary: | ||
| 269 | * Production builds: does nothing and produces no code. | ||
| 270 | * | ||
| 271 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 272 | * call DEBUG_ASSERT_MESSAGE. | ||
| 273 | * | ||
| 274 | * Parameters: | ||
| 275 | * | ||
| 276 | * assertion: | ||
| 277 | * The assertion expression. | ||
| 278 | */ | ||
| 279 | #ifndef __Check | ||
| 280 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 281 | 	 #define __Check(assertion) | ||
| 282 | 	#else | ||
| 283 | 	 #define __Check(assertion) \ | ||
| 284 | 		 do \ | ||
| 285 | 		 { \ | ||
| 286 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 287 | 			 { \ | ||
| 288 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 289 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 290 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 291 | 			 } \ | ||
| 292 | 		 } while ( 0 ) | ||
| 293 | 	#endif | ||
| 294 | #endif | ||
| 295 | |||
| 296 | #ifndef __nCheck | ||
| 297 | 	#define __nCheck(assertion) __Check(!(assertion)) | ||
| 298 | #endif | ||
| 299 | |||
| 300 | /* | ||
| 301 | * __Check_String(assertion, message) | ||
| 302 | * | ||
| 303 | * Summary: | ||
| 304 | * Production builds: does nothing and produces no code. | ||
| 305 | * | ||
| 306 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 307 | * call DEBUG_ASSERT_MESSAGE. | ||
| 308 | * | ||
| 309 | * Parameters: | ||
| 310 | * | ||
| 311 | * assertion: | ||
| 312 | * The assertion expression. | ||
| 313 | * | ||
| 314 | * message: | ||
| 315 | * The C string to display. | ||
| 316 | */ | ||
| 317 | #ifndef __Check_String | ||
| 318 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 319 | 	 #define __Check_String(assertion, message) | ||
| 320 | 	#else | ||
| 321 | 	 #define __Check_String(assertion, message) \ | ||
| 322 | 		 do \ | ||
| 323 | 		 { \ | ||
| 324 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 325 | 			 { \ | ||
| 326 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 327 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 328 | 					 #assertion, 0, message, __FILE__, __LINE__, 0 ); \ | ||
| 329 | 			 } \ | ||
| 330 | 		 } while ( 0 ) | ||
| 331 | 	#endif | ||
| 332 | #endif | ||
| 333 | |||
| 334 | #ifndef __nCheck_String | ||
| 335 | 	#define __nCheck_String(assertion, message) __Check_String(!(assertion), message) | ||
| 336 | #endif | ||
| 337 | |||
| 338 | /* | ||
| 339 | * __Check_noErr(errorCode) | ||
| 340 | * | ||
| 341 | * Summary: | ||
| 342 | * Production builds: does nothing and produces no code. | ||
| 343 | * | ||
| 344 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 345 | * call DEBUG_ASSERT_MESSAGE. | ||
| 346 | * | ||
| 347 | * Parameters: | ||
| 348 | * | ||
| 349 | * errorCode: | ||
| 350 | * The errorCode expression to compare with 0. | ||
| 351 | */ | ||
| 352 | #ifndef __Check_noErr | ||
| 353 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 354 | 	 #define __Check_noErr(errorCode) | ||
| 355 | 	#else | ||
| 356 | 	 #define __Check_noErr(errorCode) \ | ||
| 357 | 		 do \ | ||
| 358 | 		 { \ | ||
| 359 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 360 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 361 | 			 { \ | ||
| 362 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 363 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 364 | 					 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 365 | 			 } \ | ||
| 366 | 		 } while ( 0 ) | ||
| 367 | 	#endif | ||
| 368 | #endif | ||
| 369 | |||
| 370 | /* | ||
| 371 | * __Check_noErr_String(errorCode, message) | ||
| 372 | * | ||
| 373 | * Summary: | ||
| 374 | * Production builds: check_noerr_string() does nothing and produces | ||
| 375 | * no code. | ||
| 376 | * | ||
| 377 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 378 | * call DEBUG_ASSERT_MESSAGE. | ||
| 379 | * | ||
| 380 | * Parameters: | ||
| 381 | * | ||
| 382 | * errorCode: | ||
| 383 | * The errorCode expression to compare to 0. | ||
| 384 | * | ||
| 385 | * message: | ||
| 386 | * The C string to display. | ||
| 387 | */ | ||
| 388 | #ifndef __Check_noErr_String | ||
| 389 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 390 | 	 #define __Check_noErr_String(errorCode, message) | ||
| 391 | 	#else | ||
| 392 | 	 #define __Check_noErr_String(errorCode, message) \ | ||
| 393 | 		 do \ | ||
| 394 | 		 { \ | ||
| 395 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 396 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 397 | 			 { \ | ||
| 398 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 399 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 400 | 					 #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 401 | 			 } \ | ||
| 402 | 		 } while ( 0 ) | ||
| 403 | 	#endif | ||
| 404 | #endif | ||
| 405 | |||
| 406 | /* | ||
| 407 | * __Verify(assertion) | ||
| 408 | * | ||
| 409 | * Summary: | ||
| 410 | * Production builds: evaluate the assertion expression, but ignore | ||
| 411 | * the result. | ||
| 412 | * | ||
| 413 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 414 | * call DEBUG_ASSERT_MESSAGE. | ||
| 415 | * | ||
| 416 | * Parameters: | ||
| 417 | * | ||
| 418 | * assertion: | ||
| 419 | * The assertion expression. | ||
| 420 | */ | ||
| 421 | #ifndef __Verify | ||
| 422 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 423 | 	 #define __Verify(assertion) \ | ||
| 424 | 		 do \ | ||
| 425 | 		 { \ | ||
| 426 | 			 if ( !(assertion) ) \ | ||
| 427 | 			 { \ | ||
| 428 | 			 } \ | ||
| 429 | 		 } while ( 0 ) | ||
| 430 | 	#else | ||
| 431 | 	 #define __Verify(assertion) \ | ||
| 432 | 		 do \ | ||
| 433 | 		 { \ | ||
| 434 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 435 | 			 { \ | ||
| 436 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 437 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 438 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 439 | 			 } \ | ||
| 440 | 		 } while ( 0 ) | ||
| 441 | 	#endif | ||
| 442 | #endif | ||
| 443 | |||
| 444 | #ifndef __nVerify | ||
| 445 | 	#define __nVerify(assertion)	__Verify(!(assertion)) | ||
| 446 | #endif | ||
| 447 | |||
| 448 | /* | ||
| 449 | * __Verify_String(assertion, message) | ||
| 450 | * | ||
| 451 | * Summary: | ||
| 452 | * Production builds: evaluate the assertion expression, but ignore | ||
| 453 | * the result. | ||
| 454 | * | ||
| 455 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 456 | * call DEBUG_ASSERT_MESSAGE. | ||
| 457 | * | ||
| 458 | * Parameters: | ||
| 459 | * | ||
| 460 | * assertion: | ||
| 461 | * The assertion expression. | ||
| 462 | * | ||
| 463 | * message: | ||
| 464 | * The C string to display. | ||
| 465 | */ | ||
| 466 | #ifndef __Verify_String | ||
| 467 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 468 | 	 #define __Verify_String(assertion, message) \ | ||
| 469 | 		 do \ | ||
| 470 | 		 { \ | ||
| 471 | 			 if ( !(assertion) ) \ | ||
| 472 | 			 { \ | ||
| 473 | 			 } \ | ||
| 474 | 		 } while ( 0 ) | ||
| 475 | 	#else | ||
| 476 | 	 #define __Verify_String(assertion, message) \ | ||
| 477 | 		 do \ | ||
| 478 | 		 { \ | ||
| 479 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 480 | 			 { \ | ||
| 481 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 482 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 483 | 					 #assertion, 0, message, __FILE__, __LINE__, 0 ); \ | ||
| 484 | 			 } \ | ||
| 485 | 		 } while ( 0 ) | ||
| 486 | 	#endif | ||
| 487 | #endif | ||
| 488 | |||
| 489 | #ifndef __nVerify_String | ||
| 490 | 	#define __nVerify_String(assertion, message) __Verify_String(!(assertion), message) | ||
| 491 | #endif | ||
| 492 | |||
| 493 | /* | ||
| 494 | * __Verify_noErr(errorCode) | ||
| 495 | * | ||
| 496 | * Summary: | ||
| 497 | * Production builds: evaluate the errorCode expression, but ignore | ||
| 498 | * the result. | ||
| 499 | * | ||
| 500 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 501 | * call DEBUG_ASSERT_MESSAGE. | ||
| 502 | * | ||
| 503 | * Parameters: | ||
| 504 | * | ||
| 505 | * errorCode: | ||
| 506 | * The expression to compare to 0. | ||
| 507 | */ | ||
| 508 | #ifndef __Verify_noErr | ||
| 509 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 510 | 	 #define __Verify_noErr(errorCode) \ | ||
| 511 | 		 do \ | ||
| 512 | 		 { \ | ||
| 513 | 			 if ( 0 != (errorCode) ) \ | ||
| 514 | 			 { \ | ||
| 515 | 			 } \ | ||
| 516 | 		 } while ( 0 ) | ||
| 517 | 	#else | ||
| 518 | 	 #define __Verify_noErr(errorCode) \ | ||
| 519 | 		 do \ | ||
| 520 | 		 { \ | ||
| 521 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 522 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 523 | 			 { \ | ||
| 524 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 525 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 526 | 					 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 527 | 			 } \ | ||
| 528 | 		 } while ( 0 ) | ||
| 529 | 	#endif | ||
| 530 | #endif | ||
| 531 | |||
| 532 | /* | ||
| 533 | * __Verify_noErr_String(errorCode, message) | ||
| 534 | * | ||
| 535 | * Summary: | ||
| 536 | * Production builds: evaluate the errorCode expression, but ignore | ||
| 537 | * the result. | ||
| 538 | * | ||
| 539 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 540 | * call DEBUG_ASSERT_MESSAGE. | ||
| 541 | * | ||
| 542 | * Parameters: | ||
| 543 | * | ||
| 544 | * errorCode: | ||
| 545 | * The expression to compare to 0. | ||
| 546 | * | ||
| 547 | * message: | ||
| 548 | * The C string to display. | ||
| 549 | */ | ||
| 550 | #ifndef __Verify_noErr_String | ||
| 551 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 552 | 	 #define __Verify_noErr_String(errorCode, message) \ | ||
| 553 | 		 do \ | ||
| 554 | 		 { \ | ||
| 555 | 			 if ( 0 != (errorCode) ) \ | ||
| 556 | 			 { \ | ||
| 557 | 			 } \ | ||
| 558 | 		 } while ( 0 ) | ||
| 559 | 	#else | ||
| 560 | 	 #define __Verify_noErr_String(errorCode, message) \ | ||
| 561 | 		 do \ | ||
| 562 | 		 { \ | ||
| 563 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 564 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 565 | 			 { \ | ||
| 566 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 567 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 568 | 					 #errorCode " == 0 ", 0, message, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 569 | 			 } \ | ||
| 570 | 		 } while ( 0 ) | ||
| 571 | 	#endif | ||
| 572 | #endif | ||
| 573 | |||
| 574 | /* | ||
| 575 | * __Verify_noErr_Action(errorCode, action) | ||
| 576 | * | ||
| 577 | * Summary: | ||
| 578 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 579 | * execute the action statement or compound statement (block). | ||
| 580 | * | ||
| 581 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 582 | * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound | ||
| 583 | * statement (block). | ||
| 584 | * | ||
| 585 | * Parameters: | ||
| 586 | * | ||
| 587 | * errorCode: | ||
| 588 | * The expression to compare to 0. | ||
| 589 | * | ||
| 590 | * action: | ||
| 591 | * The statement or compound statement (block). | ||
| 592 | */ | ||
| 593 | #ifndef __Verify_noErr_Action | ||
| 594 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 595 | 	 #define __Verify_noErr_Action(errorCode, action) \ | ||
| 596 | 		 if ( 0 != (errorCode) ) { \ | ||
| 597 | 			 action; \ | ||
| 598 | 		 } \ | ||
| 599 | 		 else do {} while (0) | ||
| 600 | 	#else | ||
| 601 | 	 #define __Verify_noErr_Action(errorCode, action) \ | ||
| 602 | do { \ | ||
| 603 | 		 long evalOnceErrorCode = (errorCode); \ | ||
| 604 | 		 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) { \ | ||
| 605 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 606 | 				 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 607 | 				 #errorCode " == 0 ", 0, 0, __FILE__, __LINE__, evalOnceErrorCode ); \ | ||
| 608 | 			 action; \ | ||
| 609 | 		 } \ | ||
| 610 | 	 } while (0) | ||
| 611 | 	#endif | ||
| 612 | #endif | ||
| 613 | |||
| 614 | /* | ||
| 615 | * __Verify_Action(assertion, action) | ||
| 616 | * | ||
| 617 | * Summary: | ||
| 618 | * Production builds: if the assertion expression evaluates to false, | ||
| 619 | * then execute the action statement or compound statement (block). | ||
| 620 | * | ||
| 621 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 622 | * call DEBUG_ASSERT_MESSAGE and then execute the action statement or compound | ||
| 623 | * statement (block). | ||
| 624 | * | ||
| 625 | * Parameters: | ||
| 626 | * | ||
| 627 | * assertion: | ||
| 628 | * The assertion expression. | ||
| 629 | * | ||
| 630 | * action: | ||
| 631 | * The statement or compound statement (block). | ||
| 632 | */ | ||
| 633 | #ifndef __Verify_Action | ||
| 634 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 635 | 	 #define __Verify_Action(assertion, action) \ | ||
| 636 | 		 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 637 | 			action; \ | ||
| 638 | 		 } \ | ||
| 639 | 		 else do {} while (0) | ||
| 640 | 	#else | ||
| 641 | 	 #define __Verify_Action(assertion, action) \ | ||
| 642 | 		 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 643 | 			 DEBUG_ASSERT_MESSAGE( \ | ||
| 644 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 645 | 					 #assertion, 0, 0, __FILE__, __LINE__, 0 ); \ | ||
| 646 | 			 action; \ | ||
| 647 | 		 } \ | ||
| 648 | 		 else do {} while (0) | ||
| 649 | 	#endif | ||
| 650 | #endif | ||
| 651 | |||
| 652 | /* | ||
| 653 | * __Require(assertion, exceptionLabel) | ||
| 654 | * | ||
| 655 | * Summary: | ||
| 656 | * Production builds: if the assertion expression evaluates to false, | ||
| 657 | * goto exceptionLabel. | ||
| 658 | * | ||
| 659 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 660 | * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. | ||
| 661 | * | ||
| 662 | * Parameters: | ||
| 663 | * | ||
| 664 | * assertion: | ||
| 665 | * The assertion expression. | ||
| 666 | * | ||
| 667 | * exceptionLabel: | ||
| 668 | * The label. | ||
| 669 | */ | ||
| 670 | #ifndef __Require | ||
| 671 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 672 | 	 #define __Require(assertion, exceptionLabel) \ | ||
| 673 | 		 do \ | ||
| 674 | 		 { \ | ||
| 675 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 676 | 			 { \ | ||
| 677 | 				 goto exceptionLabel; \ | ||
| 678 | 			 } \ | ||
| 679 | 		 } while ( 0 ) | ||
| 680 | 	#else | ||
| 681 | 	 #define __Require(assertion, exceptionLabel) \ | ||
| 682 | 		 do \ | ||
| 683 | 		 { \ | ||
| 684 | 			 if ( __builtin_expect(!(assertion), 0) ) { \ | ||
| 685 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 686 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 687 | 					 #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ | ||
| 688 | 				 goto exceptionLabel; \ | ||
| 689 | 			 } \ | ||
| 690 | 		 } while ( 0 ) | ||
| 691 | 	#endif | ||
| 692 | #endif | ||
| 693 | |||
| 694 | #ifndef __nRequire | ||
| 695 | 	#define __nRequire(assertion, exceptionLabel) __Require(!(assertion), exceptionLabel) | ||
| 696 | #endif | ||
| 697 | |||
| 698 | /* | ||
| 699 | * __Require_Action(assertion, exceptionLabel, action) | ||
| 700 | * | ||
| 701 | * Summary: | ||
| 702 | * Production builds: if the assertion expression evaluates to false, | ||
| 703 | * execute the action statement or compound statement (block) and then | ||
| 704 | * goto exceptionLabel. | ||
| 705 | * | ||
| 706 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 707 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 708 | * statement (block), and then goto exceptionLabel. | ||
| 709 | * | ||
| 710 | * Parameters: | ||
| 711 | * | ||
| 712 | * assertion: | ||
| 713 | * The assertion expression. | ||
| 714 | * | ||
| 715 | * exceptionLabel: | ||
| 716 | * The label. | ||
| 717 | * | ||
| 718 | * action: | ||
| 719 | * The statement or compound statement (block). | ||
| 720 | */ | ||
| 721 | #ifndef __Require_Action | ||
| 722 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 723 | 	 #define __Require_Action(assertion, exceptionLabel, action) \ | ||
| 724 | 		 do \ | ||
| 725 | 		 { \ | ||
| 726 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 727 | 			 { \ | ||
| 728 | 				 { \ | ||
| 729 | 					 action; \ | ||
| 730 | 				 } \ | ||
| 731 | 				 goto exceptionLabel; \ | ||
| 732 | 			 } \ | ||
| 733 | 		 } while ( 0 ) | ||
| 734 | 	#else | ||
| 735 | 	 #define __Require_Action(assertion, exceptionLabel, action) \ | ||
| 736 | 		 do \ | ||
| 737 | 		 { \ | ||
| 738 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 739 | 			 { \ | ||
| 740 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 741 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 742 | 					 #assertion, #exceptionLabel, 0, __FILE__, __LINE__, 0); \ | ||
| 743 | 				 { \ | ||
| 744 | 					 action; \ | ||
| 745 | 				 } \ | ||
| 746 | 				 goto exceptionLabel; \ | ||
| 747 | 			 } \ | ||
| 748 | 		 } while ( 0 ) | ||
| 749 | 	#endif | ||
| 750 | #endif | ||
| 751 | |||
| 752 | #ifndef __nRequire_Action | ||
| 753 | 	#define __nRequire_Action(assertion, exceptionLabel, action) \ | ||
| 754 | 	__Require_Action(!(assertion), exceptionLabel, action) | ||
| 755 | #endif | ||
| 756 | |||
| 757 | /* | ||
| 758 | * __Require_Quiet(assertion, exceptionLabel) | ||
| 759 | * | ||
| 760 | * Summary: | ||
| 761 | * If the assertion expression evaluates to false, goto exceptionLabel. | ||
| 762 | * | ||
| 763 | * Parameters: | ||
| 764 | * | ||
| 765 | * assertion: | ||
| 766 | * The assertion expression. | ||
| 767 | * | ||
| 768 | * exceptionLabel: | ||
| 769 | * The label. | ||
| 770 | */ | ||
| 771 | #ifndef __Require_Quiet | ||
| 772 | 	#define __Require_Quiet(assertion, exceptionLabel) \ | ||
| 773 | 	 do \ | ||
| 774 | 	 { \ | ||
| 775 | 		 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 776 | 		 { \ | ||
| 777 | 			 goto exceptionLabel; \ | ||
| 778 | 		 } \ | ||
| 779 | 	 } while ( 0 ) | ||
| 780 | #endif | ||
| 781 | |||
| 782 | #ifndef __nRequire_Quiet | ||
| 783 | 	#define __nRequire_Quiet(assertion, exceptionLabel) __Require_Quiet(!(assertion), exceptionLabel) | ||
| 784 | #endif | ||
| 785 | |||
| 786 | /* | ||
| 787 | * __Require_Action_Quiet(assertion, exceptionLabel, action) | ||
| 788 | * | ||
| 789 | * Summary: | ||
| 790 | * If the assertion expression evaluates to false, execute the action | ||
| 791 | * statement or compound statement (block), and goto exceptionLabel. | ||
| 792 | * | ||
| 793 | * Parameters: | ||
| 794 | * | ||
| 795 | * assertion: | ||
| 796 | * The assertion expression. | ||
| 797 | * | ||
| 798 | * exceptionLabel: | ||
| 799 | * The label. | ||
| 800 | * | ||
| 801 | * action: | ||
| 802 | * The statement or compound statement (block). | ||
| 803 | */ | ||
| 804 | #ifndef __Require_Action_Quiet | ||
| 805 | 	#define __Require_Action_Quiet(assertion, exceptionLabel, action) \ | ||
| 806 | 	 do \ | ||
| 807 | 	 { \ | ||
| 808 | 		 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 809 | 		 { \ | ||
| 810 | 			 { \ | ||
| 811 | 				 action; \ | ||
| 812 | 			 } \ | ||
| 813 | 			 goto exceptionLabel; \ | ||
| 814 | 		 } \ | ||
| 815 | 	 } while ( 0 ) | ||
| 816 | #endif | ||
| 817 | |||
| 818 | #ifndef __nRequire_Action_Quiet | ||
| 819 | 	#define __nRequire_Action_Quiet(assertion, exceptionLabel, action) \ | ||
| 820 | 		__Require_Action_Quiet(!(assertion), exceptionLabel, action) | ||
| 821 | #endif | ||
| 822 | |||
| 823 | /* | ||
| 824 | * __Require_String(assertion, exceptionLabel, message) | ||
| 825 | * | ||
| 826 | * Summary: | ||
| 827 | * Production builds: if the assertion expression evaluates to false, | ||
| 828 | * goto exceptionLabel. | ||
| 829 | * | ||
| 830 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 831 | * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. | ||
| 832 | * | ||
| 833 | * Parameters: | ||
| 834 | * | ||
| 835 | * assertion: | ||
| 836 | * The assertion expression. | ||
| 837 | * | ||
| 838 | * exceptionLabel: | ||
| 839 | * The label. | ||
| 840 | * | ||
| 841 | * message: | ||
| 842 | * The C string to display. | ||
| 843 | */ | ||
| 844 | #ifndef __Require_String | ||
| 845 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 846 | 	 #define __Require_String(assertion, exceptionLabel, message) \ | ||
| 847 | 		 do \ | ||
| 848 | 		 { \ | ||
| 849 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 850 | 			 { \ | ||
| 851 | 				 goto exceptionLabel; \ | ||
| 852 | 			 } \ | ||
| 853 | 		 } while ( 0 ) | ||
| 854 | 	#else | ||
| 855 | 	 #define __Require_String(assertion, exceptionLabel, message) \ | ||
| 856 | 		 do \ | ||
| 857 | 		 { \ | ||
| 858 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 859 | 			 { \ | ||
| 860 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 861 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 862 | 					 #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ | ||
| 863 | 				 goto exceptionLabel; \ | ||
| 864 | 			 } \ | ||
| 865 | 		 } while ( 0 ) | ||
| 866 | 	#endif | ||
| 867 | #endif | ||
| 868 | |||
| 869 | #ifndef __nRequire_String | ||
| 870 | 	#define __nRequire_String(assertion, exceptionLabel, string) \ | ||
| 871 | 		__Require_String(!(assertion), exceptionLabel, string) | ||
| 872 | #endif | ||
| 873 | |||
| 874 | /* | ||
| 875 | * __Require_Action_String(assertion, exceptionLabel, action, message) | ||
| 876 | * | ||
| 877 | * Summary: | ||
| 878 | * Production builds: if the assertion expression evaluates to false, | ||
| 879 | * execute the action statement or compound statement (block), and then | ||
| 880 | * goto exceptionLabel. | ||
| 881 | * | ||
| 882 | * Non-production builds: if the assertion expression evaluates to false, | ||
| 883 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 884 | * statement (block), and then goto exceptionLabel. | ||
| 885 | * | ||
| 886 | * Parameters: | ||
| 887 | * | ||
| 888 | * assertion: | ||
| 889 | * The assertion expression. | ||
| 890 | * | ||
| 891 | * exceptionLabel: | ||
| 892 | * The label. | ||
| 893 | * | ||
| 894 | * action: | ||
| 895 | * The statement or compound statement (block). | ||
| 896 | * | ||
| 897 | * message: | ||
| 898 | * The C string to display. | ||
| 899 | */ | ||
| 900 | #ifndef __Require_Action_String | ||
| 901 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 902 | 	 #define __Require_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 903 | 		 do \ | ||
| 904 | 		 { \ | ||
| 905 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 906 | 			 { \ | ||
| 907 | 				 { \ | ||
| 908 | 					 action; \ | ||
| 909 | 				 } \ | ||
| 910 | 				 goto exceptionLabel; \ | ||
| 911 | 			 } \ | ||
| 912 | 		 } while ( 0 ) | ||
| 913 | 	#else | ||
| 914 | 	 #define __Require_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 915 | 		 do \ | ||
| 916 | 		 { \ | ||
| 917 | 			 if ( __builtin_expect(!(assertion), 0) ) \ | ||
| 918 | 			 { \ | ||
| 919 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 920 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 921 | 					 #assertion, #exceptionLabel, message, __FILE__, __LINE__, 0); \ | ||
| 922 | 				 { \ | ||
| 923 | 					 action; \ | ||
| 924 | 				 } \ | ||
| 925 | 				 goto exceptionLabel; \ | ||
| 926 | 			 } \ | ||
| 927 | 		 } while ( 0 ) | ||
| 928 | 	#endif | ||
| 929 | #endif | ||
| 930 | |||
| 931 | #ifndef __nRequire_Action_String | ||
| 932 | 	#define __nRequire_Action_String(assertion, exceptionLabel, action, message) \ | ||
| 933 | 		__Require_Action_String(!(assertion), exceptionLabel, action, message) | ||
| 934 | #endif | ||
| 935 | |||
| 936 | /* | ||
| 937 | * __Require_noErr(errorCode, exceptionLabel) | ||
| 938 | * | ||
| 939 | * Summary: | ||
| 940 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 941 | * goto exceptionLabel. | ||
| 942 | * | ||
| 943 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 944 | * call DEBUG_ASSERT_MESSAGE and then goto exceptionLabel. | ||
| 945 | * | ||
| 946 | * Parameters: | ||
| 947 | * | ||
| 948 | * errorCode: | ||
| 949 | * The expression to compare to 0. | ||
| 950 | * | ||
| 951 | * exceptionLabel: | ||
| 952 | * The label. | ||
| 953 | */ | ||
| 954 | #ifndef __Require_noErr | ||
| 955 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 956 | 	 #define __Require_noErr(errorCode, exceptionLabel) \ | ||
| 957 | 		 do \ | ||
| 958 | 		 { \ | ||
| 959 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 960 | 			 { \ | ||
| 961 | 				 goto exceptionLabel; \ | ||
| 962 | 			 } \ | ||
| 963 | 		 } while ( 0 ) | ||
| 964 | 	#else | ||
| 965 | 	 #define __Require_noErr(errorCode, exceptionLabel) \ | ||
| 966 | 		 do \ | ||
| 967 | 		 { \ | ||
| 968 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 969 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 970 | 			 { \ | ||
| 971 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 972 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 973 | 					 #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 974 | 				 goto exceptionLabel; \ | ||
| 975 | 			 } \ | ||
| 976 | 		 } while ( 0 ) | ||
| 977 | 	#endif | ||
| 978 | #endif | ||
| 979 | |||
| 980 | /* | ||
| 981 | * __Require_noErr_Action(errorCode, exceptionLabel, action) | ||
| 982 | * | ||
| 983 | * Summary: | ||
| 984 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 985 | * execute the action statement or compound statement (block) and | ||
| 986 | * goto exceptionLabel. | ||
| 987 | * | ||
| 988 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 989 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or | ||
| 990 | * compound statement (block), and then goto exceptionLabel. | ||
| 991 | * | ||
| 992 | * Parameters: | ||
| 993 | * | ||
| 994 | * errorCode: | ||
| 995 | * The expression to compare to 0. | ||
| 996 | * | ||
| 997 | * exceptionLabel: | ||
| 998 | * The label. | ||
| 999 | * | ||
| 1000 | * action: | ||
| 1001 | * The statement or compound statement (block). | ||
| 1002 | */ | ||
| 1003 | #ifndef __Require_noErr_Action | ||
| 1004 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1005 | 	 #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ | ||
| 1006 | 		 do \ | ||
| 1007 | 		 { \ | ||
| 1008 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1009 | 			 { \ | ||
| 1010 | 				 { \ | ||
| 1011 | 					 action; \ | ||
| 1012 | 				 } \ | ||
| 1013 | 				 goto exceptionLabel; \ | ||
| 1014 | 			 } \ | ||
| 1015 | 		 } while ( 0 ) | ||
| 1016 | 	#else | ||
| 1017 | 	 #define __Require_noErr_Action(errorCode, exceptionLabel, action) \ | ||
| 1018 | 		 do \ | ||
| 1019 | 		 { \ | ||
| 1020 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1021 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1022 | 			 { \ | ||
| 1023 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1024 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1025 | 					 #errorCode " == 0 ", #exceptionLabel, 0, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1026 | 				 { \ | ||
| 1027 | 					 action; \ | ||
| 1028 | 				 } \ | ||
| 1029 | 				 goto exceptionLabel; \ | ||
| 1030 | 			 } \ | ||
| 1031 | 		 } while ( 0 ) | ||
| 1032 | 	#endif | ||
| 1033 | #endif | ||
| 1034 | |||
| 1035 | /* | ||
| 1036 | * __Require_noErr_Quiet(errorCode, exceptionLabel) | ||
| 1037 | * | ||
| 1038 | * Summary: | ||
| 1039 | * If the errorCode expression does not equal 0 (noErr), | ||
| 1040 | * goto exceptionLabel. | ||
| 1041 | * | ||
| 1042 | * Parameters: | ||
| 1043 | * | ||
| 1044 | * errorCode: | ||
| 1045 | * The expression to compare to 0. | ||
| 1046 | * | ||
| 1047 | * exceptionLabel: | ||
| 1048 | * The label. | ||
| 1049 | */ | ||
| 1050 | #ifndef __Require_noErr_Quiet | ||
| 1051 | 	#define __Require_noErr_Quiet(errorCode, exceptionLabel) \ | ||
| 1052 | 	 do \ | ||
| 1053 | 	 { \ | ||
| 1054 | 		 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1055 | 		 { \ | ||
| 1056 | 			 goto exceptionLabel; \ | ||
| 1057 | 		 } \ | ||
| 1058 | 	 } while ( 0 ) | ||
| 1059 | #endif | ||
| 1060 | |||
| 1061 | /* | ||
| 1062 | * __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) | ||
| 1063 | * | ||
| 1064 | * Summary: | ||
| 1065 | * If the errorCode expression does not equal 0 (noErr), | ||
| 1066 | * execute the action statement or compound statement (block) and | ||
| 1067 | * goto exceptionLabel. | ||
| 1068 | * | ||
| 1069 | * Parameters: | ||
| 1070 | * | ||
| 1071 | * errorCode: | ||
| 1072 | * The expression to compare to 0. | ||
| 1073 | * | ||
| 1074 | * exceptionLabel: | ||
| 1075 | * The label. | ||
| 1076 | * | ||
| 1077 | * action: | ||
| 1078 | * The statement or compound statement (block). | ||
| 1079 | */ | ||
| 1080 | #ifndef __Require_noErr_Action_Quiet | ||
| 1081 | 	#define __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) \ | ||
| 1082 | 	 do \ | ||
| 1083 | 	 { \ | ||
| 1084 | 		 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1085 | 		 { \ | ||
| 1086 | 			 { \ | ||
| 1087 | 				 action; \ | ||
| 1088 | 			 } \ | ||
| 1089 | 			 goto exceptionLabel; \ | ||
| 1090 | 		 } \ | ||
| 1091 | 	 } while ( 0 ) | ||
| 1092 | #endif | ||
| 1093 | |||
| 1094 | /* | ||
| 1095 | * __Require_noErr_String(errorCode, exceptionLabel, message) | ||
| 1096 | * | ||
| 1097 | * Summary: | ||
| 1098 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1099 | * goto exceptionLabel. | ||
| 1100 | * | ||
| 1101 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1102 | * call DEBUG_ASSERT_MESSAGE, and then goto exceptionLabel. | ||
| 1103 | * | ||
| 1104 | * Parameters: | ||
| 1105 | * | ||
| 1106 | * errorCode: | ||
| 1107 | * The expression to compare to 0. | ||
| 1108 | * | ||
| 1109 | * exceptionLabel: | ||
| 1110 | * The label. | ||
| 1111 | * | ||
| 1112 | * message: | ||
| 1113 | * The C string to display. | ||
| 1114 | */ | ||
| 1115 | #ifndef __Require_noErr_String | ||
| 1116 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1117 | 	 #define __Require_noErr_String(errorCode, exceptionLabel, message) \ | ||
| 1118 | 		 do \ | ||
| 1119 | 		 { \ | ||
| 1120 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1121 | 			 { \ | ||
| 1122 | 				 goto exceptionLabel; \ | ||
| 1123 | 			 } \ | ||
| 1124 | 		 } while ( 0 ) | ||
| 1125 | 	#else | ||
| 1126 | 	 #define __Require_noErr_String(errorCode, exceptionLabel, message) \ | ||
| 1127 | 		 do \ | ||
| 1128 | 		 { \ | ||
| 1129 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1130 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1131 | 			 { \ | ||
| 1132 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1133 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1134 | 					 #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1135 | 				 goto exceptionLabel; \ | ||
| 1136 | 			 } \ | ||
| 1137 | 		 } while ( 0 ) | ||
| 1138 | 	#endif | ||
| 1139 | #endif | ||
| 1140 | |||
| 1141 | /* | ||
| 1142 | * __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) | ||
| 1143 | * | ||
| 1144 | * Summary: | ||
| 1145 | * Production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1146 | * execute the action statement or compound statement (block) and | ||
| 1147 | * goto exceptionLabel. | ||
| 1148 | * | ||
| 1149 | * Non-production builds: if the errorCode expression does not equal 0 (noErr), | ||
| 1150 | * call DEBUG_ASSERT_MESSAGE, execute the action statement or compound | ||
| 1151 | * statement (block), and then goto exceptionLabel. | ||
| 1152 | * | ||
| 1153 | * Parameters: | ||
| 1154 | * | ||
| 1155 | * errorCode: | ||
| 1156 | * The expression to compare to 0. | ||
| 1157 | * | ||
| 1158 | * exceptionLabel: | ||
| 1159 | * The label. | ||
| 1160 | * | ||
| 1161 | * action: | ||
| 1162 | * The statement or compound statement (block). | ||
| 1163 | * | ||
| 1164 | * message: | ||
| 1165 | * The C string to display. | ||
| 1166 | */ | ||
| 1167 | #ifndef __Require_noErr_Action_String | ||
| 1168 | 	#if DEBUG_ASSERT_PRODUCTION_CODE | ||
| 1169 | 	 #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ | ||
| 1170 | 		 do \ | ||
| 1171 | 		 { \ | ||
| 1172 | 			 if ( __builtin_expect(0 != (errorCode), 0) ) \ | ||
| 1173 | 			 { \ | ||
| 1174 | 				 { \ | ||
| 1175 | 					 action; \ | ||
| 1176 | 				 } \ | ||
| 1177 | 				 goto exceptionLabel; \ | ||
| 1178 | 			 } \ | ||
| 1179 | 		 } while ( 0 ) | ||
| 1180 | 	#else | ||
| 1181 | 	 #define __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) \ | ||
| 1182 | 		 do \ | ||
| 1183 | 		 { \ | ||
| 1184 | 			 long evalOnceErrorCode = (errorCode); \ | ||
| 1185 | 			 if ( __builtin_expect(0 != evalOnceErrorCode, 0) ) \ | ||
| 1186 | 			 { \ | ||
| 1187 | 				 DEBUG_ASSERT_MESSAGE( \ | ||
| 1188 | 					 DEBUG_ASSERT_COMPONENT_NAME_STRING, \ | ||
| 1189 | 					 #errorCode " == 0 ", #exceptionLabel, message, __FILE__, __LINE__, evalOnceErrorCode); \ | ||
| 1190 | 				 { \ | ||
| 1191 | 					 action; \ | ||
| 1192 | 				 } \ | ||
| 1193 | 				 goto exceptionLabel; \ | ||
| 1194 | 			 } \ | ||
| 1195 | 		 } while ( 0 ) | ||
| 1196 | 	#endif | ||
| 1197 | #endif | ||
| 1198 | |||
| 1199 | /* | ||
| 1200 | * __Check_Compile_Time(expr) | ||
| 1201 | * | ||
| 1202 | * Summary: | ||
| 1203 | * any build: if the expression is not true, generated a compile time error. | ||
| 1204 | * | ||
| 1205 | * Parameters: | ||
| 1206 | * | ||
| 1207 | * expr: | ||
| 1208 | * The compile time expression that should evaluate to non-zero. | ||
| 1209 | * | ||
| 1210 | * Discussion: | ||
| 1211 | * This declares an array with a size that is determined by a compile-time expression. | ||
| 1212 | * If false, it declares a negatively sized array, which generates a compile-time error. | ||
| 1213 | * | ||
| 1214 | * Examples: | ||
| 1215 | * __Check_Compile_Time( sizeof( int ) == 4 ); | ||
| 1216 | * __Check_Compile_Time( offsetof( MyStruct, myField ) == 4 ); | ||
| 1217 | * __Check_Compile_Time( ( kMyBufferSize % 512 ) == 0 ); | ||
| 1218 | * | ||
| 1219 | * Note: This only works with compile-time expressions. | ||
| 1220 | * Note: This only works in places where extern declarations are allowed (e.g. global scope). | ||
| 1221 | */ | ||
| 1222 | #ifndef __Check_Compile_Time | ||
| 1223 | #ifdef __GNUC__ | ||
| 1224 | #if (__cplusplus >= 201103L) | ||
| 1225 | #define __Check_Compile_Time( expr ) static_assert( expr , "__Check_Compile_Time") | ||
| 1226 | #elif (__STDC_VERSION__ >= 201112L) | ||
| 1227 | #define __Check_Compile_Time( expr ) _Static_assert( expr , "__Check_Compile_Time") | ||
| 1228 | #else | ||
| 1229 | #define __Check_Compile_Time( expr ) \ | ||
| 1230 | extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] __attribute__( ( unused ) ) | ||
| 1231 | #endif | ||
| 1232 | #else | ||
| 1233 | #define __Check_Compile_Time( expr ) \ | ||
| 1234 | extern int compile_time_assert_failed[ ( expr ) ? 1 : -1 ] | ||
| 1235 | #endif | ||
| 1236 | #endif | ||
| 1237 | |||
| 1238 | /* | ||
| 1239 | *	For time immemorial, Mac OS X has defined version of most of these macros without the __ prefix, which | ||
| 1240 | *	could collide with similarly named functions or macros in user code, including new functionality in | ||
| 1241 | *	Boost and the C++ standard library. | ||
| 1242 | * | ||
| 1243 | * macOS High Sierra and iOS 11 will now require that clients move to the new macros as defined above. | ||
| 1244 | * | ||
| 1245 | * If you would like to enable the macros for use within your own project, you can define the | ||
| 1246 | * __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES macro via an Xcode Build Configuration. | ||
| 1247 | * See "Add a build configuration (xcconfig) file" in Xcode Help. | ||
| 1248 | * | ||
| 1249 | * To aid users of these macros in converting their sources, the following tops script will convert usages | ||
| 1250 | * of the old macros into the new equivalents. To do so, in Terminal go into the directory containing the | ||
| 1251 | * sources to be converted and run this command. | ||
| 1252 | * | ||
| 1253 | find -E . -regex '.*\.(c|cc|cp|cpp|m|mm|h)' -print0 | xargs -0 tops -verbose \ | ||
| 1254 | replace "check(<b args>)" with "__Check(<args>)" \ | ||
| 1255 | replace "check_noerr(<b args>)" with "__Check_noErr(<args>)" \ | ||
| 1256 | replace "check_noerr_string(<b args>)" with "__Check_noErr_String(<args>)" \ | ||
| 1257 | replace "check_string(<b args>)" with "__Check_String(<args>)" \ | ||
| 1258 | replace "require(<b args>)" with "__Require(<args>)" \ | ||
| 1259 | replace "require_action(<b args>)" with "__Require_Action(<args>)" \ | ||
| 1260 | replace "require_action_string(<b args>)" with "__Require_Action_String(<args>)" \ | ||
| 1261 | replace "require_noerr(<b args>)" with "__Require_noErr(<args>)" \ | ||
| 1262 | replace "require_noerr_action(<b args>)" with "__Require_noErr_Action(<args>)" \ | ||
| 1263 | replace "require_noerr_action_string(<b args>)" with "__Require_noErr_Action_String(<args>)" \ | ||
| 1264 | replace "require_noerr_string(<b args>)" with "__Require_noErr_String(<args>)" \ | ||
| 1265 | replace "require_string(<b args>)" with "__Require_String(<args>)" \ | ||
| 1266 | replace "verify(<b args>)" with "__Verify(<args>)" \ | ||
| 1267 | replace "verify_action(<b args>)" with "__Verify_Action(<args>)" \ | ||
| 1268 | replace "verify_noerr(<b args>)" with "__Verify_noErr(<args>)" \ | ||
| 1269 | replace "verify_noerr_action(<b args>)" with "__Verify_noErr_Action(<args>)" \ | ||
| 1270 | replace "verify_noerr_string(<b args>)" with "__Verify_noErr_String(<args>)" \ | ||
| 1271 | replace "verify_string(<b args>)" with "__Verify_String(<args>)" \ | ||
| 1272 | replace "ncheck(<b args>)" with "__nCheck(<args>)" \ | ||
| 1273 | replace "ncheck_string(<b args>)" with "__nCheck_String(<args>)" \ | ||
| 1274 | replace "nrequire(<b args>)" with "__nRequire(<args>)" \ | ||
| 1275 | replace "nrequire_action(<b args>)" with "__nRequire_Action(<args>)" \ | ||
| 1276 | replace "nrequire_action_quiet(<b args>)" with "__nRequire_Action_Quiet(<args>)" \ | ||
| 1277 | replace "nrequire_action_string(<b args>)" with "__nRequire_Action_String(<args>)" \ | ||
| 1278 | replace "nrequire_quiet(<b args>)" with "__nRequire_Quiet(<args>)" \ | ||
| 1279 | replace "nrequire_string(<b args>)" with "__nRequire_String(<args>)" \ | ||
| 1280 | replace "nverify(<b args>)" with "__nVerify(<args>)" \ | ||
| 1281 | replace "nverify_string(<b args>)" with "__nVerify_String(<args>)" \ | ||
| 1282 | replace "require_action_quiet(<b args>)" with "__Require_Action_Quiet(<args>)" \ | ||
| 1283 | replace "require_noerr_action_quiet(<b args>)" with "__Require_noErr_Action_Quiet(<args>)" \ | ||
| 1284 | replace "require_noerr_quiet(<b args>)" with "__Require_noErr_Quiet(<args>)" \ | ||
| 1285 | replace "require_quiet(<b args>)" with "__Require_Quiet(<args>)" \ | ||
| 1286 | replace "check_compile_time(<b args>)" with "__Check_Compile_Time(<args>)" \ | ||
| 1287 | replace "debug_string(<b args>)" with "__Debug_String(<args>)" | ||
| 1288 | * | ||
| 1289 | */ | ||
| 1290 | |||
| 1291 | #ifndef __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES | ||
| 1292 | #if __has_include(<AssertMacrosInternal.h>) | ||
| 1293 | #include <AssertMacrosInternal.h> | ||
| 1294 | #else | ||
| 1295 | /* In macOS High Sierra and iOS 11, if we haven't set this yet, it now defaults to off. */ | ||
| 1296 | #define	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES	0 | ||
| 1297 | #endif | ||
| 1298 | #endif | ||
| 1299 | |||
| 1300 | #if	__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES | ||
| 1301 | |||
| 1302 | 	#ifndef check | ||
| 1303 | 	#define check(assertion) __Check(assertion) | ||
| 1304 | 	#endif | ||
| 1305 | |||
| 1306 | 	#ifndef check_noerr | ||
| 1307 | 	#define check_noerr(errorCode) __Check_noErr(errorCode) | ||
| 1308 | 	#endif | ||
| 1309 | |||
| 1310 | 	#ifndef check_noerr_string | ||
| 1311 | 		#define check_noerr_string(errorCode, message) __Check_noErr_String(errorCode, message) | ||
| 1312 | 	#endif | ||
| 1313 | |||
| 1314 | 	#ifndef check_string | ||
| 1315 | 		#define check_string(assertion, message) __Check_String(assertion, message) | ||
| 1316 | 	#endif | ||
| 1317 | |||
| 1318 | 	#ifndef require | ||
| 1319 | 		#define require(assertion, exceptionLabel) __Require(assertion, exceptionLabel) | ||
| 1320 | 	#endif | ||
| 1321 | |||
| 1322 | 	#ifndef require_action | ||
| 1323 | 		#define require_action(assertion, exceptionLabel, action) __Require_Action(assertion, exceptionLabel, action) | ||
| 1324 | 	#endif | ||
| 1325 | |||
| 1326 | 	#ifndef require_action_string | ||
| 1327 | 		#define require_action_string(assertion, exceptionLabel, action, message) __Require_Action_String(assertion, exceptionLabel, action, message) | ||
| 1328 | 	#endif | ||
| 1329 | |||
| 1330 | 	#ifndef require_noerr | ||
| 1331 | 		#define require_noerr(errorCode, exceptionLabel) __Require_noErr(errorCode, exceptionLabel) | ||
| 1332 | 	#endif | ||
| 1333 | |||
| 1334 | 	#ifndef require_noerr_action | ||
| 1335 | 		#define require_noerr_action(errorCode, exceptionLabel, action) __Require_noErr_Action(errorCode, exceptionLabel, action) | ||
| 1336 | 	#endif | ||
| 1337 | |||
| 1338 | 	#ifndef require_noerr_action_string | ||
| 1339 | 		#define require_noerr_action_string(errorCode, exceptionLabel, action, message) __Require_noErr_Action_String(errorCode, exceptionLabel, action, message) | ||
| 1340 | 	#endif | ||
| 1341 | |||
| 1342 | 	#ifndef require_noerr_string | ||
| 1343 | 		#define require_noerr_string(errorCode, exceptionLabel, message) __Require_noErr_String(errorCode, exceptionLabel, message) | ||
| 1344 | 	#endif | ||
| 1345 | |||
| 1346 | 	#ifndef require_string | ||
| 1347 | 		#define require_string(assertion, exceptionLabel, message) __Require_String(assertion, exceptionLabel, message) | ||
| 1348 | 	#endif | ||
| 1349 | |||
| 1350 | 	#ifndef verify | ||
| 1351 | 		#define verify(assertion) __Verify(assertion) | ||
| 1352 | 	#endif | ||
| 1353 | |||
| 1354 | 	#ifndef verify_action | ||
| 1355 | 		#define verify_action(assertion, action) __Verify_Action(assertion, action) | ||
| 1356 | 	#endif | ||
| 1357 | |||
| 1358 | 	#ifndef verify_noerr | ||
| 1359 | 		#define verify_noerr(errorCode) __Verify_noErr(errorCode) | ||
| 1360 | 	#endif | ||
| 1361 | |||
| 1362 | 	#ifndef verify_noerr_action | ||
| 1363 | 		#define verify_noerr_action(errorCode, action) __Verify_noErr_Action(errorCode, action) | ||
| 1364 | 	#endif | ||
| 1365 | |||
| 1366 | 	#ifndef verify_noerr_string | ||
| 1367 | 		#define verify_noerr_string(errorCode, message) __Verify_noErr_String(errorCode, message) | ||
| 1368 | 	#endif | ||
| 1369 | |||
| 1370 | 	#ifndef verify_string | ||
| 1371 | 		#define verify_string(assertion, message) __Verify_String(assertion, message) | ||
| 1372 | 	#endif | ||
| 1373 | |||
| 1374 | 	#ifndef ncheck | ||
| 1375 | 		#define ncheck(assertion) __nCheck(assertion) | ||
| 1376 | 	#endif | ||
| 1377 | |||
| 1378 | 	#ifndef ncheck_string | ||
| 1379 | 		#define ncheck_string(assertion, message) __nCheck_String(assertion, message) | ||
| 1380 | 	#endif | ||
| 1381 | |||
| 1382 | 	#ifndef nrequire | ||
| 1383 | 		#define nrequire(assertion, exceptionLabel) __nRequire(assertion, exceptionLabel) | ||
| 1384 | 	#endif | ||
| 1385 | |||
| 1386 | 	#ifndef nrequire_action | ||
| 1387 | 		#define nrequire_action(assertion, exceptionLabel, action) __nRequire_Action(assertion, exceptionLabel, action) | ||
| 1388 | 	#endif | ||
| 1389 | |||
| 1390 | 	#ifndef nrequire_action_quiet | ||
| 1391 | 		#define nrequire_action_quiet(assertion, exceptionLabel, action) __nRequire_Action_Quiet(assertion, exceptionLabel, action) | ||
| 1392 | 	#endif | ||
| 1393 | |||
| 1394 | 	#ifndef nrequire_action_string | ||
| 1395 | 		#define nrequire_action_string(assertion, exceptionLabel, action, message) __nRequire_Action_String(assertion, exceptionLabel, action, message) | ||
| 1396 | 	#endif | ||
| 1397 | |||
| 1398 | 	#ifndef nrequire_quiet | ||
| 1399 | 		#define nrequire_quiet(assertion, exceptionLabel) __nRequire_Quiet(assertion, exceptionLabel) | ||
| 1400 | 	#endif | ||
| 1401 | |||
| 1402 | 	#ifndef nrequire_string | ||
| 1403 | 		#define nrequire_string(assertion, exceptionLabel, string) __nRequire_String(assertion, exceptionLabel, string) | ||
| 1404 | 	#endif | ||
| 1405 | |||
| 1406 | 	#ifndef nverify | ||
| 1407 | 		#define nverify(assertion) __nVerify(assertion) | ||
| 1408 | 	#endif | ||
| 1409 | |||
| 1410 | 	#ifndef nverify_string | ||
| 1411 | 		#define nverify_string(assertion, message) __nVerify_String(assertion, message) | ||
| 1412 | 	#endif | ||
| 1413 | |||
| 1414 | 	#ifndef require_action_quiet | ||
| 1415 | 		#define require_action_quiet(assertion, exceptionLabel, action) __Require_Action_Quiet(assertion, exceptionLabel, action) | ||
| 1416 | 	#endif | ||
| 1417 | |||
| 1418 | 	#ifndef require_noerr_action_quiet | ||
| 1419 | 		#define require_noerr_action_quiet(errorCode, exceptionLabel, action) __Require_noErr_Action_Quiet(errorCode, exceptionLabel, action) | ||
| 1420 | 	#endif | ||
| 1421 | |||
| 1422 | 	#ifndef require_noerr_quiet | ||
| 1423 | 		#define require_noerr_quiet(errorCode, exceptionLabel) __Require_noErr_Quiet(errorCode, exceptionLabel) | ||
| 1424 | 	#endif | ||
| 1425 | |||
| 1426 | 	#ifndef require_quiet | ||
| 1427 | 		#define require_quiet(assertion, exceptionLabel) __Require_Quiet(assertion, exceptionLabel) | ||
| 1428 | 	#endif | ||
| 1429 | |||
| 1430 | 	#ifndef check_compile_time | ||
| 1431 | 		#define check_compile_time( expr ) __Check_Compile_Time( expr ) | ||
| 1432 | 	#endif | ||
| 1433 | |||
| 1434 | 	#ifndef debug_string | ||
| 1435 | 		#define debug_string(message) __Debug_String(message) | ||
| 1436 | 	#endif | ||
| 1437 | 	 | ||
| 1438 | #endif	/* ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES */ | ||
| 1439 | |||
| 1440 | |||
| 1441 | #endif /* __ASSERTMACROS__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/assert.h created+111| ... | @@ -0,0 +1,111 @@ | ||
| 1 | /*- | ||
| 2 | * Copyright (c) 1992, 1993 | ||
| 3 | *	The Regents of the University of California. All rights reserved. | ||
| 4 | * (c) UNIX System Laboratories, Inc. | ||
| 5 | * All or some portions of this file are derived from material licensed | ||
| 6 | * to the University of California by American Telephone and Telegraph | ||
| 7 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 8 | * the permission of UNIX System Laboratories, Inc. | ||
| 9 | * | ||
| 10 | * Redistribution and use in source and binary forms, with or without | ||
| 11 | * modification, are permitted provided that the following conditions | ||
| 12 | * are met: | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 16 | * notice, this list of conditions and the following disclaimer in the | ||
| 17 | * documentation and/or other materials provided with the distribution. | ||
| 18 | * 3. All advertising materials mentioning features or use of this software | ||
| 19 | * must display the following acknowledgement: | ||
| 20 | *	This product includes software developed by the University of | ||
| 21 | *	California, Berkeley and its contributors. | ||
| 22 | * 4. Neither the name of the University nor the names of its contributors | ||
| 23 | * may be used to endorse or promote products derived from this software | ||
| 24 | * without specific prior written permission. | ||
| 25 | * | ||
| 26 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 27 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 28 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 29 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 30 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 31 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 32 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 33 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 34 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 35 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 36 | * SUCH DAMAGE. | ||
| 37 | * | ||
| 38 | *	@(#)assert.h	8.2 (Berkeley) 1/21/94 | ||
| 39 | * $FreeBSD: src/include/assert.h,v 1.4 2002/03/23 17:24:53 imp Exp $ | ||
| 40 | */ | ||
| 41 | |||
| 42 | #include <sys/cdefs.h> | ||
| 43 | #ifdef __cplusplus | ||
| 44 | #include <stdlib.h> | ||
| 45 | #endif /* __cplusplus */ | ||
| 46 | |||
| 47 | /* | ||
| 48 | * Unlike other ANSI header files, <assert.h> may usefully be included | ||
| 49 | * multiple times, with and without NDEBUG defined. | ||
| 50 | */ | ||
| 51 | |||
| 52 | #undef assert | ||
| 53 | #undef __assert | ||
| 54 | |||
| 55 | #ifdef NDEBUG | ||
| 56 | #define	assert(e)	((void)0) | ||
| 57 | #else | ||
| 58 | |||
| 59 | #ifndef __GNUC__ | ||
| 60 | |||
| 61 | __BEGIN_DECLS | ||
| 62 | #ifndef __cplusplus | ||
| 63 | void abort(void) __dead2 __cold; | ||
| 64 | #endif /* !__cplusplus */ | ||
| 65 | int printf(const char * __restrict, ...); | ||
| 66 | __END_DECLS | ||
| 67 | |||
| 68 | #define assert(e) \ | ||
| 69 | ((void) ((e) ? ((void)0) : __assert (#e, __FILE__, __LINE__))) | ||
| 70 | #define __assert(e, file, line) \ | ||
| 71 | ((void)printf ("%s:%d: failed assertion `%s'\n", file, line, e), abort()) | ||
| 72 | |||
| 73 | #else /* __GNUC__ */ | ||
| 74 | |||
| 75 | __BEGIN_DECLS | ||
| 76 | void __assert_rtn(const char *, const char *, int, const char *) __dead2 __cold __disable_tail_calls; | ||
| 77 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070) | ||
| 78 | void __eprintf(const char *, const char *, unsigned, const char *) __dead2 __cold; | ||
| 79 | #endif | ||
| 80 | __END_DECLS | ||
| 81 | |||
| 82 | #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) < 1070) | ||
| 83 | #define __assert(e, file, line) \ | ||
| 84 | __eprintf ("%s:%d: failed assertion `%s'\n", file, line, e) | ||
| 85 | #else | ||
| 86 | /* 8462256: modified __assert_rtn() replaces deprecated __eprintf() */ | ||
| 87 | #define __assert(e, file, line) \ | ||
| 88 | __assert_rtn ((const char *)-1L, file, line, e) | ||
| 89 | #endif | ||
| 90 | |||
| 91 | #if __DARWIN_UNIX03 | ||
| 92 | #define	assert(e) \ | ||
| 93 | (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0) | ||
| 94 | #else /* !__DARWIN_UNIX03 */ | ||
| 95 | #define assert(e) \ | ||
| 96 | (__builtin_expect(!(e), 0) ? __assert (#e, __FILE__, __LINE__) : (void)0) | ||
| 97 | #endif /* __DARWIN_UNIX03 */ | ||
| 98 | |||
| 99 | #endif /* __GNUC__ */ | ||
| 100 | #endif /* NDEBUG */ | ||
| 101 | |||
| 102 | #ifndef _ASSERT_H_ | ||
| 103 | #define _ASSERT_H_ | ||
| 104 | |||
| 105 | #ifndef __cplusplus | ||
| 106 | #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L | ||
| 107 | #define static_assert _Static_assert | ||
| 108 | #endif /* __STDC_VERSION__ */ | ||
| 109 | #endif /* !__cplusplus */ | ||
| 110 | |||
| 111 | #endif /* _ASSERT_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/device/device_types.h created+118| ... | @@ -0,0 +1,118 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2004 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	Author: David B. Golub, Carnegie Mellon University | ||
| 60 | *	Date: 3/89 | ||
| 61 | */ | ||
| 62 | |||
| 63 | #ifndef DEVICE_TYPES_H | ||
| 64 | #define DEVICE_TYPES_H | ||
| 65 | |||
| 66 | /* | ||
| 67 | * Types for device interface. | ||
| 68 | */ | ||
| 69 | #include <mach/std_types.h> | ||
| 70 | #include <mach/mach_types.h> | ||
| 71 | #include <mach/message.h> | ||
| 72 | #include <mach/port.h> | ||
| 73 | |||
| 74 | |||
| 75 | |||
| 76 | /* | ||
| 77 | * IO buffer - out-of-line array of characters. | ||
| 78 | */ | ||
| 79 | typedef char * io_buf_ptr_t; | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Some types for IOKit. | ||
| 83 | */ | ||
| 84 | |||
| 85 | #ifdef IOKIT | ||
| 86 | |||
| 87 | /* must match device_types.defs */ | ||
| 88 | typedef char io_name_t[128]; | ||
| 89 | typedef char io_string_t[512]; | ||
| 90 | typedef char io_string_inband_t[4096]; | ||
| 91 | typedef char io_struct_inband_t[4096]; | ||
| 92 | |||
| 93 | #if __LP64__ | ||
| 94 | typedef uint64_t io_user_scalar_t; | ||
| 95 | typedef uint64_t io_user_reference_t; | ||
| 96 | typedef io_user_scalar_t io_scalar_inband_t[16]; | ||
| 97 | typedef io_user_reference_t io_async_ref_t[8]; | ||
| 98 | typedef io_user_scalar_t io_scalar_inband64_t[16]; | ||
| 99 | typedef io_user_reference_t io_async_ref64_t[8]; | ||
| 100 | #else | ||
| 101 | typedef int io_user_scalar_t; | ||
| 102 | typedef natural_t io_user_reference_t; | ||
| 103 | typedef io_user_scalar_t io_scalar_inband_t[16]; | ||
| 104 | typedef io_user_reference_t io_async_ref_t[8]; | ||
| 105 | typedef uint64_t io_scalar_inband64_t[16]; | ||
| 106 | typedef uint64_t io_async_ref64_t[8]; | ||
| 107 | #endif // __LP64__ | ||
| 108 | |||
| 109 | |||
| 110 | #ifndef __IOKIT_PORTS_DEFINED__ | ||
| 111 | #define __IOKIT_PORTS_DEFINED__ | ||
| 112 | typedef mach_port_t io_object_t; | ||
| 113 | #endif /* __IOKIT_PORTS_DEFINED__ */ | ||
| 114 | |||
| 115 | |||
| 116 | #endif /* IOKIT */ | ||
| 117 | |||
| 118 | #endif /* DEVICE_TYPES_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/dispatch/base.h created+306| ... | @@ -0,0 +1,306 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2008-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_APACHE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 7 | * you may not use this file except in compliance with the License. | ||
| 8 | * You may obtain a copy of the License at | ||
| 9 | * | ||
| 10 | * http://www.apache.org/licenses/LICENSE-2.0 | ||
| 11 | * | ||
| 12 | * Unless required by applicable law or agreed to in writing, software | ||
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, | ||
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 15 | * See the License for the specific language governing permissions and | ||
| 16 | * limitations under the License. | ||
| 17 | * | ||
| 18 | * @APPLE_APACHE_LICENSE_HEADER_END@ | ||
| 19 | */ | ||
| 20 | |||
| 21 | #ifndef __DISPATCH_BASE__ | ||
| 22 | #define __DISPATCH_BASE__ | ||
| 23 | |||
| 24 | #ifndef __DISPATCH_INDIRECT__ | ||
| 25 | #error "Please #include <dispatch/dispatch.h> instead of this file directly." | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifndef __has_builtin | ||
| 29 | #define __has_builtin(x) 0 | ||
| 30 | #endif | ||
| 31 | #ifndef __has_include | ||
| 32 | #define __has_include(x) 0 | ||
| 33 | #endif | ||
| 34 | #ifndef __has_feature | ||
| 35 | #define __has_feature(x) 0 | ||
| 36 | #endif | ||
| 37 | #ifndef __has_attribute | ||
| 38 | #define __has_attribute(x) 0 | ||
| 39 | #endif | ||
| 40 | #ifndef __has_extension | ||
| 41 | #define __has_extension(x) 0 | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #if __GNUC__ | ||
| 45 | #define DISPATCH_NORETURN __attribute__((__noreturn__)) | ||
| 46 | #define DISPATCH_NOTHROW __attribute__((__nothrow__)) | ||
| 47 | #define DISPATCH_NONNULL1 __attribute__((__nonnull__(1))) | ||
| 48 | #define DISPATCH_NONNULL2 __attribute__((__nonnull__(2))) | ||
| 49 | #define DISPATCH_NONNULL3 __attribute__((__nonnull__(3))) | ||
| 50 | #define DISPATCH_NONNULL4 __attribute__((__nonnull__(4))) | ||
| 51 | #define DISPATCH_NONNULL5 __attribute__((__nonnull__(5))) | ||
| 52 | #define DISPATCH_NONNULL6 __attribute__((__nonnull__(6))) | ||
| 53 | #define DISPATCH_NONNULL7 __attribute__((__nonnull__(7))) | ||
| 54 | #if __clang__ && __clang_major__ < 3 | ||
| 55 | // rdar://problem/6857843 | ||
| 56 | #define DISPATCH_NONNULL_ALL | ||
| 57 | #else | ||
| 58 | #define DISPATCH_NONNULL_ALL __attribute__((__nonnull__)) | ||
| 59 | #endif | ||
| 60 | #define DISPATCH_SENTINEL __attribute__((__sentinel__)) | ||
| 61 | #define DISPATCH_PURE __attribute__((__pure__)) | ||
| 62 | #define DISPATCH_CONST __attribute__((__const__)) | ||
| 63 | #define DISPATCH_WARN_RESULT __attribute__((__warn_unused_result__)) | ||
| 64 | #define DISPATCH_MALLOC __attribute__((__malloc__)) | ||
| 65 | #define DISPATCH_ALWAYS_INLINE __attribute__((__always_inline__)) | ||
| 66 | #define DISPATCH_UNAVAILABLE __attribute__((__unavailable__)) | ||
| 67 | #define DISPATCH_UNAVAILABLE_MSG(msg) __attribute__((__unavailable__(msg))) | ||
| 68 | #elif defined(_MSC_VER) | ||
| 69 | #define DISPATCH_NORETURN __declspec(noreturn) | ||
| 70 | #define DISPATCH_NOTHROW __declspec(nothrow) | ||
| 71 | #define DISPATCH_NONNULL1 | ||
| 72 | #define DISPATCH_NONNULL2 | ||
| 73 | #define DISPATCH_NONNULL3 | ||
| 74 | #define DISPATCH_NONNULL4 | ||
| 75 | #define DISPATCH_NONNULL5 | ||
| 76 | #define DISPATCH_NONNULL6 | ||
| 77 | #define DISPATCH_NONNULL7 | ||
| 78 | #define DISPATCH_NONNULL_ALL | ||
| 79 | #define DISPATCH_SENTINEL | ||
| 80 | #define DISPATCH_PURE | ||
| 81 | #define DISPATCH_CONST | ||
| 82 | #if (_MSC_VER >= 1700) | ||
| 83 | #define DISPATCH_WARN_RESULT _Check_return_ | ||
| 84 | #else | ||
| 85 | #define DISPATCH_WARN_RESULT | ||
| 86 | #endif | ||
| 87 | #define DISPATCH_MALLOC | ||
| 88 | #define DISPATCH_ALWAYS_INLINE __forceinline | ||
| 89 | #define DISPATCH_UNAVAILABLE | ||
| 90 | #define DISPATCH_UNAVAILABLE_MSG(msg) | ||
| 91 | #else | ||
| 92 | /*! @parseOnly */ | ||
| 93 | #define DISPATCH_NORETURN | ||
| 94 | /*! @parseOnly */ | ||
| 95 | #define DISPATCH_NOTHROW | ||
| 96 | /*! @parseOnly */ | ||
| 97 | #define DISPATCH_NONNULL1 | ||
| 98 | /*! @parseOnly */ | ||
| 99 | #define DISPATCH_NONNULL2 | ||
| 100 | /*! @parseOnly */ | ||
| 101 | #define DISPATCH_NONNULL3 | ||
| 102 | /*! @parseOnly */ | ||
| 103 | #define DISPATCH_NONNULL4 | ||
| 104 | /*! @parseOnly */ | ||
| 105 | #define DISPATCH_NONNULL5 | ||
| 106 | /*! @parseOnly */ | ||
| 107 | #define DISPATCH_NONNULL6 | ||
| 108 | /*! @parseOnly */ | ||
| 109 | #define DISPATCH_NONNULL7 | ||
| 110 | /*! @parseOnly */ | ||
| 111 | #define DISPATCH_NONNULL_ALL | ||
| 112 | /*! @parseOnly */ | ||
| 113 | #define DISPATCH_SENTINEL | ||
| 114 | /*! @parseOnly */ | ||
| 115 | #define DISPATCH_PURE | ||
| 116 | /*! @parseOnly */ | ||
| 117 | #define DISPATCH_CONST | ||
| 118 | /*! @parseOnly */ | ||
| 119 | #define DISPATCH_WARN_RESULT | ||
| 120 | /*! @parseOnly */ | ||
| 121 | #define DISPATCH_MALLOC | ||
| 122 | /*! @parseOnly */ | ||
| 123 | #define DISPATCH_ALWAYS_INLINE | ||
| 124 | /*! @parseOnly */ | ||
| 125 | #define DISPATCH_UNAVAILABLE | ||
| 126 | /*! @parseOnly */ | ||
| 127 | #define DISPATCH_UNAVAILABLE_MSG(msg) | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #define DISPATCH_LINUX_UNAVAILABLE() | ||
| 131 | |||
| 132 | #ifdef __FreeBSD__ | ||
| 133 | #define DISPATCH_FREEBSD_UNAVAILABLE() \ | ||
| 134 | 		DISPATCH_UNAVAILABLE_MSG( \ | ||
| 135 | 		"This interface is unavailable on FreeBSD systems") | ||
| 136 | #else | ||
| 137 | #define DISPATCH_FREEBSD_UNAVAILABLE() | ||
| 138 | #endif | ||
| 139 | |||
| 140 | #ifndef DISPATCH_ALIAS_V2 | ||
| 141 | #if TARGET_OS_MAC | ||
| 142 | #define DISPATCH_ALIAS_V2(sym)	 __asm__("_" #sym "$V2") | ||
| 143 | #else | ||
| 144 | #define DISPATCH_ALIAS_V2(sym) | ||
| 145 | #endif | ||
| 146 | #endif | ||
| 147 | |||
| 148 | #if defined(_WIN32) | ||
| 149 | #if defined(__cplusplus) | ||
| 150 | #define DISPATCH_EXPORT extern "C" __declspec(dllimport) | ||
| 151 | #else | ||
| 152 | #define DISPATCH_EXPORT extern __declspec(dllimport) | ||
| 153 | #endif | ||
| 154 | #elif __GNUC__ | ||
| 155 | #define DISPATCH_EXPORT extern __attribute__((visibility("default"))) | ||
| 156 | #else | ||
| 157 | #define DISPATCH_EXPORT extern | ||
| 158 | #endif | ||
| 159 | |||
| 160 | #if __GNUC__ | ||
| 161 | #define DISPATCH_INLINE static __inline__ | ||
| 162 | #else | ||
| 163 | #define DISPATCH_INLINE static inline | ||
| 164 | #endif | ||
| 165 | |||
| 166 | #if __GNUC__ | ||
| 167 | #define DISPATCH_EXPECT(x, v) __builtin_expect((x), (v)) | ||
| 168 | #define dispatch_compiler_barrier() __asm__ __volatile__("" ::: "memory") | ||
| 169 | #else | ||
| 170 | #define DISPATCH_EXPECT(x, v) (x) | ||
| 171 | #define dispatch_compiler_barrier() do { } while (0) | ||
| 172 | #endif | ||
| 173 | |||
| 174 | #if __has_attribute(not_tail_called) | ||
| 175 | #define DISPATCH_NOT_TAIL_CALLED __attribute__((__not_tail_called__)) | ||
| 176 | #else | ||
| 177 | #define DISPATCH_NOT_TAIL_CALLED | ||
| 178 | #endif | ||
| 179 | |||
| 180 | #if __has_builtin(__builtin_assume) | ||
| 181 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) __builtin_assume(expr) | ||
| 182 | #else | ||
| 183 | #define DISPATCH_COMPILER_CAN_ASSUME(expr) ((void)(expr)) | ||
| 184 | #endif | ||
| 185 | |||
| 186 | #if __has_attribute(noescape) | ||
| 187 | #define DISPATCH_NOESCAPE __attribute__((__noescape__)) | ||
| 188 | #else | ||
| 189 | #define DISPATCH_NOESCAPE | ||
| 190 | #endif | ||
| 191 | |||
| 192 | #if __has_attribute(cold) | ||
| 193 | #define DISPATCH_COLD __attribute__((__cold__)) | ||
| 194 | #else | ||
| 195 | #define DISPATCH_COLD | ||
| 196 | #endif | ||
| 197 | |||
| 198 | #if __has_feature(assume_nonnull) | ||
| 199 | #define DISPATCH_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | ||
| 200 | #define DISPATCH_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | ||
| 201 | #else | ||
| 202 | #define DISPATCH_ASSUME_NONNULL_BEGIN | ||
| 203 | #define DISPATCH_ASSUME_NONNULL_END | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #if !__has_feature(nullability) | ||
| 207 | #ifndef _Nullable | ||
| 208 | #define _Nullable | ||
| 209 | #endif | ||
| 210 | #ifndef _Nonnull | ||
| 211 | #define _Nonnull | ||
| 212 | #endif | ||
| 213 | #ifndef _Null_unspecified | ||
| 214 | #define _Null_unspecified | ||
| 215 | #endif | ||
| 216 | #endif | ||
| 217 | |||
| 218 | #ifndef DISPATCH_RETURNS_RETAINED_BLOCK | ||
| 219 | #if __has_attribute(ns_returns_retained) | ||
| 220 | #define DISPATCH_RETURNS_RETAINED_BLOCK __attribute__((__ns_returns_retained__)) | ||
| 221 | #else | ||
| 222 | #define DISPATCH_RETURNS_RETAINED_BLOCK | ||
| 223 | #endif | ||
| 224 | #endif | ||
| 225 | |||
| 226 | #if __has_attribute(enum_extensibility) | ||
| 227 | #define __DISPATCH_ENUM_ATTR __attribute__((__enum_extensibility__(open))) | ||
| 228 | #define __DISPATCH_ENUM_ATTR_CLOSED __attribute__((__enum_extensibility__(closed))) | ||
| 229 | #else | ||
| 230 | #define __DISPATCH_ENUM_ATTR | ||
| 231 | #define __DISPATCH_ENUM_ATTR_CLOSED | ||
| 232 | #endif // __has_attribute(enum_extensibility) | ||
| 233 | |||
| 234 | #if __has_attribute(flag_enum) | ||
| 235 | #define __DISPATCH_OPTIONS_ATTR __attribute__((__flag_enum__)) | ||
| 236 | #else | ||
| 237 | #define __DISPATCH_OPTIONS_ATTR | ||
| 238 | #endif // __has_attribute(flag_enum) | ||
| 239 | |||
| 240 | |||
| 241 | #if __has_feature(objc_fixed_enum) || __has_extension(cxx_strong_enums) || \ | ||
| 242 | 		__has_extension(cxx_fixed_enum) || defined(_WIN32) | ||
| 243 | #define DISPATCH_ENUM(name, type, ...) \ | ||
| 244 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_ENUM_ATTR name##_t | ||
| 245 | #define DISPATCH_OPTIONS(name, type, ...) \ | ||
| 246 | 		typedef enum : type { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR name##_t | ||
| 247 | #else | ||
| 248 | #define DISPATCH_ENUM(name, type, ...) \ | ||
| 249 | 		enum { __VA_ARGS__ } __DISPATCH_ENUM_ATTR; typedef type name##_t | ||
| 250 | #define DISPATCH_OPTIONS(name, type, ...) \ | ||
| 251 | 		enum { __VA_ARGS__ } __DISPATCH_OPTIONS_ATTR __DISPATCH_ENUM_ATTR; typedef type name##_t | ||
| 252 | #endif // __has_feature(objc_fixed_enum) ... | ||
| 253 | |||
| 254 | |||
| 255 | |||
| 256 | #if __has_feature(enumerator_attributes) | ||
| 257 | #define DISPATCH_ENUM_API_AVAILABLE(...) API_AVAILABLE(__VA_ARGS__) | ||
| 258 | #define DISPATCH_ENUM_API_DEPRECATED(...) API_DEPRECATED(__VA_ARGS__) | ||
| 259 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) \ | ||
| 260 | 		API_DEPRECATED_WITH_REPLACEMENT(__VA_ARGS__) | ||
| 261 | #else | ||
| 262 | #define DISPATCH_ENUM_API_AVAILABLE(...) | ||
| 263 | #define DISPATCH_ENUM_API_DEPRECATED(...) | ||
| 264 | #define DISPATCH_ENUM_API_DEPRECATED_WITH_REPLACEMENT(...) | ||
| 265 | #endif | ||
| 266 | |||
| 267 | #ifdef __swift__ | ||
| 268 | #define DISPATCH_SWIFT3_OVERLAY 1 | ||
| 269 | #else // __swift__ | ||
| 270 | #define DISPATCH_SWIFT3_OVERLAY 0 | ||
| 271 | #endif // __swift__ | ||
| 272 | |||
| 273 | #if __has_feature(attribute_availability_swift) | ||
| 274 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) \ | ||
| 275 | 		__attribute__((__availability__(swift, unavailable, message=_msg))) | ||
| 276 | #else | ||
| 277 | #define DISPATCH_SWIFT_UNAVAILABLE(_msg) | ||
| 278 | #endif | ||
| 279 | |||
| 280 | #if DISPATCH_SWIFT3_OVERLAY | ||
| 281 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) DISPATCH_SWIFT_UNAVAILABLE(_msg) | ||
| 282 | #else | ||
| 283 | #define DISPATCH_SWIFT3_UNAVAILABLE(_msg) | ||
| 284 | #endif | ||
| 285 | |||
| 286 | #if __has_attribute(swift_private) | ||
| 287 | #define DISPATCH_REFINED_FOR_SWIFT __attribute__((__swift_private__)) | ||
| 288 | #else | ||
| 289 | #define DISPATCH_REFINED_FOR_SWIFT | ||
| 290 | #endif | ||
| 291 | |||
| 292 | #if __has_attribute(swift_name) | ||
| 293 | #define DISPATCH_SWIFT_NAME(_name) __attribute__((__swift_name__(#_name))) | ||
| 294 | #else | ||
| 295 | #define DISPATCH_SWIFT_NAME(_name) | ||
| 296 | #endif | ||
| 297 | |||
| 298 | #ifndef __cplusplus | ||
| 299 | #define DISPATCH_TRANSPARENT_UNION __attribute__((__transparent_union__)) | ||
| 300 | #else | ||
| 301 | #define DISPATCH_TRANSPARENT_UNION | ||
| 302 | #endif | ||
| 303 | |||
| 304 | typedef void (*dispatch_function_t)(void *_Nullable); | ||
| 305 | |||
| 306 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/execinfo.h created+63| ... | @@ -0,0 +1,63 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2007 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 | #ifndef _EXECINFO_H_ | ||
| 24 | #define _EXECINFO_H_ 1 | ||
| 25 | |||
| 26 | #include <sys/cdefs.h> | ||
| 27 | #include <Availability.h> | ||
| 28 | #include <os/base.h> | ||
| 29 | #include <os/availability.h> | ||
| 30 | #include <stdint.h> | ||
| 31 | #include <uuid/uuid.h> | ||
| 32 | |||
| 33 | __BEGIN_DECLS | ||
| 34 | |||
| 35 | int backtrace(void**,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 36 | |||
| 37 | API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | ||
| 38 | OS_EXPORT | ||
| 39 | int backtrace_from_fp(void *startfp, void **array, int size); | ||
| 40 | |||
| 41 | char** backtrace_symbols(void* const*,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 42 | void backtrace_symbols_fd(void* const*,int,int) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0); | ||
| 43 | |||
| 44 | struct image_offset { | ||
| 45 | 	/* | ||
| 46 | 	 * The UUID of the image. | ||
| 47 | 	 */ | ||
| 48 | 	uuid_t uuid; | ||
| 49 | |||
| 50 | 	/* | ||
| 51 | 	 * The offset is relative to the __TEXT section of the image. | ||
| 52 | 	 */ | ||
| 53 | 	uint32_t offset; | ||
| 54 | }; | ||
| 55 | |||
| 56 | API_AVAILABLE(macosx(10.14), ios(12.0), tvos(12.0), watchos(5.0)) | ||
| 57 | OS_EXPORT | ||
| 58 | void backtrace_image_offsets(void* const* array, | ||
| 59 | 		struct image_offset *image_offsets, int size); | ||
| 60 | |||
| 61 | __END_DECLS | ||
| 62 | |||
| 63 | #endif /* !_EXECINFO_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/gethostuuid.h created+42| ... | @@ -0,0 +1,42 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef __GETHOSTUUID_H | ||
| 30 | #define __GETHOSTUUID_H | ||
| 31 | |||
| 32 | #include <sys/_types/_timespec.h> | ||
| 33 | #include <sys/_types/_uuid_t.h> | ||
| 34 | #include <Availability.h> | ||
| 35 | |||
| 36 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_7_0) | ||
| 37 | 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"); | ||
| 38 | #else | ||
| 39 | int gethostuuid(uuid_t, const struct timespec *) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_NA); | ||
| 40 | #endif | ||
| 41 | |||
| 42 | #endif /* __GETHOSTUUID_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/clock.h created+245| ... | @@ -0,0 +1,245 @@ | ||
| 1 | #ifndef	_clock_user_ | ||
| 2 | #define	_clock_user_ | ||
| 3 | |||
| 4 | /* Module clock */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	clock_MSG_COUNT | ||
| 52 | #define	clock_MSG_COUNT	3 | ||
| 53 | #endif	/* clock_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine clock_get_time */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t clock_get_time | ||
| 76 | ( | ||
| 77 | 	clock_serv_t clock_serv, | ||
| 78 | 	mach_timespec_t *cur_time | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine clock_get_attributes */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | kern_return_t clock_get_attributes | ||
| 88 | ( | ||
| 89 | 	clock_serv_t clock_serv, | ||
| 90 | 	clock_flavor_t flavor, | ||
| 91 | 	clock_attr_t clock_attr, | ||
| 92 | 	mach_msg_type_number_t *clock_attrCnt | ||
| 93 | ); | ||
| 94 | |||
| 95 | /* Routine clock_alarm */ | ||
| 96 | #ifdef	mig_external | ||
| 97 | mig_external | ||
| 98 | #else | ||
| 99 | extern | ||
| 100 | #endif	/* mig_external */ | ||
| 101 | kern_return_t clock_alarm | ||
| 102 | ( | ||
| 103 | 	clock_serv_t clock_serv, | ||
| 104 | 	alarm_type_t alarm_type, | ||
| 105 | 	mach_timespec_t alarm_time, | ||
| 106 | 	clock_reply_t alarm_port | ||
| 107 | ); | ||
| 108 | |||
| 109 | __END_DECLS | ||
| 110 | |||
| 111 | /********************** Caution **************************/ | ||
| 112 | /* The following data types should be used to calculate */ | ||
| 113 | /* maximum message sizes only. The actual message may be */ | ||
| 114 | /* smaller, and the position of the arguments within the */ | ||
| 115 | /* message layout may vary from what is presented here. */ | ||
| 116 | /* For example, if any of the arguments are variable- */ | ||
| 117 | /* sized, and less than the maximum is sent, the data */ | ||
| 118 | /* will be packed tight in the actual message to reduce */ | ||
| 119 | /* the presence of holes. */ | ||
| 120 | /********************** Caution **************************/ | ||
| 121 | |||
| 122 | /* typedefs for all requests */ | ||
| 123 | |||
| 124 | #ifndef __Request__clock_subsystem__defined | ||
| 125 | #define __Request__clock_subsystem__defined | ||
| 126 | |||
| 127 | #ifdef __MigPackStructs | ||
| 128 | #pragma pack(push, 4) | ||
| 129 | #endif | ||
| 130 | 	typedef struct { | ||
| 131 | 		mach_msg_header_t Head; | ||
| 132 | 	} __Request__clock_get_time_t __attribute__((unused)); | ||
| 133 | #ifdef __MigPackStructs | ||
| 134 | #pragma pack(pop) | ||
| 135 | #endif | ||
| 136 | |||
| 137 | #ifdef __MigPackStructs | ||
| 138 | #pragma pack(push, 4) | ||
| 139 | #endif | ||
| 140 | 	typedef struct { | ||
| 141 | 		mach_msg_header_t Head; | ||
| 142 | 		NDR_record_t NDR; | ||
| 143 | 		clock_flavor_t flavor; | ||
| 144 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 145 | 	} __Request__clock_get_attributes_t __attribute__((unused)); | ||
| 146 | #ifdef __MigPackStructs | ||
| 147 | #pragma pack(pop) | ||
| 148 | #endif | ||
| 149 | |||
| 150 | #ifdef __MigPackStructs | ||
| 151 | #pragma pack(push, 4) | ||
| 152 | #endif | ||
| 153 | 	typedef struct { | ||
| 154 | 		mach_msg_header_t Head; | ||
| 155 | 		/* start of the kernel processed data */ | ||
| 156 | 		mach_msg_body_t msgh_body; | ||
| 157 | 		mach_msg_port_descriptor_t alarm_port; | ||
| 158 | 		/* end of the kernel processed data */ | ||
| 159 | 		NDR_record_t NDR; | ||
| 160 | 		alarm_type_t alarm_type; | ||
| 161 | 		mach_timespec_t alarm_time; | ||
| 162 | 	} __Request__clock_alarm_t __attribute__((unused)); | ||
| 163 | #ifdef __MigPackStructs | ||
| 164 | #pragma pack(pop) | ||
| 165 | #endif | ||
| 166 | #endif /* !__Request__clock_subsystem__defined */ | ||
| 167 | |||
| 168 | /* union of all requests */ | ||
| 169 | |||
| 170 | #ifndef __RequestUnion__clock_subsystem__defined | ||
| 171 | #define __RequestUnion__clock_subsystem__defined | ||
| 172 | union __RequestUnion__clock_subsystem { | ||
| 173 | 	__Request__clock_get_time_t Request_clock_get_time; | ||
| 174 | 	__Request__clock_get_attributes_t Request_clock_get_attributes; | ||
| 175 | 	__Request__clock_alarm_t Request_clock_alarm; | ||
| 176 | }; | ||
| 177 | #endif /* !__RequestUnion__clock_subsystem__defined */ | ||
| 178 | /* typedefs for all replies */ | ||
| 179 | |||
| 180 | #ifndef __Reply__clock_subsystem__defined | ||
| 181 | #define __Reply__clock_subsystem__defined | ||
| 182 | |||
| 183 | #ifdef __MigPackStructs | ||
| 184 | #pragma pack(push, 4) | ||
| 185 | #endif | ||
| 186 | 	typedef struct { | ||
| 187 | 		mach_msg_header_t Head; | ||
| 188 | 		NDR_record_t NDR; | ||
| 189 | 		kern_return_t RetCode; | ||
| 190 | 		mach_timespec_t cur_time; | ||
| 191 | 	} __Reply__clock_get_time_t __attribute__((unused)); | ||
| 192 | #ifdef __MigPackStructs | ||
| 193 | #pragma pack(pop) | ||
| 194 | #endif | ||
| 195 | |||
| 196 | #ifdef __MigPackStructs | ||
| 197 | #pragma pack(push, 4) | ||
| 198 | #endif | ||
| 199 | 	typedef struct { | ||
| 200 | 		mach_msg_header_t Head; | ||
| 201 | 		NDR_record_t NDR; | ||
| 202 | 		kern_return_t RetCode; | ||
| 203 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 204 | 		int clock_attr[1]; | ||
| 205 | 	} __Reply__clock_get_attributes_t __attribute__((unused)); | ||
| 206 | #ifdef __MigPackStructs | ||
| 207 | #pragma pack(pop) | ||
| 208 | #endif | ||
| 209 | |||
| 210 | #ifdef __MigPackStructs | ||
| 211 | #pragma pack(push, 4) | ||
| 212 | #endif | ||
| 213 | 	typedef struct { | ||
| 214 | 		mach_msg_header_t Head; | ||
| 215 | 		NDR_record_t NDR; | ||
| 216 | 		kern_return_t RetCode; | ||
| 217 | 	} __Reply__clock_alarm_t __attribute__((unused)); | ||
| 218 | #ifdef __MigPackStructs | ||
| 219 | #pragma pack(pop) | ||
| 220 | #endif | ||
| 221 | #endif /* !__Reply__clock_subsystem__defined */ | ||
| 222 | |||
| 223 | /* union of all replies */ | ||
| 224 | |||
| 225 | #ifndef __ReplyUnion__clock_subsystem__defined | ||
| 226 | #define __ReplyUnion__clock_subsystem__defined | ||
| 227 | union __ReplyUnion__clock_subsystem { | ||
| 228 | 	__Reply__clock_get_time_t Reply_clock_get_time; | ||
| 229 | 	__Reply__clock_get_attributes_t Reply_clock_get_attributes; | ||
| 230 | 	__Reply__clock_alarm_t Reply_clock_alarm; | ||
| 231 | }; | ||
| 232 | #endif /* !__RequestUnion__clock_subsystem__defined */ | ||
| 233 | |||
| 234 | #ifndef subsystem_to_name_map_clock | ||
| 235 | #define subsystem_to_name_map_clock \ | ||
| 236 | { "clock_get_time", 1000 },\ | ||
| 237 | { "clock_get_attributes", 1001 },\ | ||
| 238 | { "clock_alarm", 1002 } | ||
| 239 | #endif | ||
| 240 | |||
| 241 | #ifdef __AfterMigUserHeader | ||
| 242 | __AfterMigUserHeader | ||
| 243 | #endif /* __AfterMigUserHeader */ | ||
| 244 | |||
| 245 | #endif	 /* _clock_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/clock_priv.h created+199| ... | @@ -0,0 +1,199 @@ | ||
| 1 | #ifndef	_clock_priv_user_ | ||
| 2 | #define	_clock_priv_user_ | ||
| 3 | |||
| 4 | /* Module clock_priv */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	clock_priv_MSG_COUNT | ||
| 52 | #define	clock_priv_MSG_COUNT	2 | ||
| 53 | #endif	/* clock_priv_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | |||
| 61 | #ifdef __BeforeMigUserHeader | ||
| 62 | __BeforeMigUserHeader | ||
| 63 | #endif /* __BeforeMigUserHeader */ | ||
| 64 | |||
| 65 | #include <sys/cdefs.h> | ||
| 66 | __BEGIN_DECLS | ||
| 67 | |||
| 68 | |||
| 69 | /* Routine clock_set_time */ | ||
| 70 | #ifdef	mig_external | ||
| 71 | mig_external | ||
| 72 | #else | ||
| 73 | extern | ||
| 74 | #endif	/* mig_external */ | ||
| 75 | kern_return_t clock_set_time | ||
| 76 | ( | ||
| 77 | 	clock_ctrl_t clock_ctrl, | ||
| 78 | 	mach_timespec_t new_time | ||
| 79 | ); | ||
| 80 | |||
| 81 | /* Routine clock_set_attributes */ | ||
| 82 | #ifdef	mig_external | ||
| 83 | mig_external | ||
| 84 | #else | ||
| 85 | extern | ||
| 86 | #endif	/* mig_external */ | ||
| 87 | kern_return_t clock_set_attributes | ||
| 88 | ( | ||
| 89 | 	clock_ctrl_t clock_ctrl, | ||
| 90 | 	clock_flavor_t flavor, | ||
| 91 | 	clock_attr_t clock_attr, | ||
| 92 | 	mach_msg_type_number_t clock_attrCnt | ||
| 93 | ); | ||
| 94 | |||
| 95 | __END_DECLS | ||
| 96 | |||
| 97 | /********************** Caution **************************/ | ||
| 98 | /* The following data types should be used to calculate */ | ||
| 99 | /* maximum message sizes only. The actual message may be */ | ||
| 100 | /* smaller, and the position of the arguments within the */ | ||
| 101 | /* message layout may vary from what is presented here. */ | ||
| 102 | /* For example, if any of the arguments are variable- */ | ||
| 103 | /* sized, and less than the maximum is sent, the data */ | ||
| 104 | /* will be packed tight in the actual message to reduce */ | ||
| 105 | /* the presence of holes. */ | ||
| 106 | /********************** Caution **************************/ | ||
| 107 | |||
| 108 | /* typedefs for all requests */ | ||
| 109 | |||
| 110 | #ifndef __Request__clock_priv_subsystem__defined | ||
| 111 | #define __Request__clock_priv_subsystem__defined | ||
| 112 | |||
| 113 | #ifdef __MigPackStructs | ||
| 114 | #pragma pack(push, 4) | ||
| 115 | #endif | ||
| 116 | 	typedef struct { | ||
| 117 | 		mach_msg_header_t Head; | ||
| 118 | 		NDR_record_t NDR; | ||
| 119 | 		mach_timespec_t new_time; | ||
| 120 | 	} __Request__clock_set_time_t __attribute__((unused)); | ||
| 121 | #ifdef __MigPackStructs | ||
| 122 | #pragma pack(pop) | ||
| 123 | #endif | ||
| 124 | |||
| 125 | #ifdef __MigPackStructs | ||
| 126 | #pragma pack(push, 4) | ||
| 127 | #endif | ||
| 128 | 	typedef struct { | ||
| 129 | 		mach_msg_header_t Head; | ||
| 130 | 		NDR_record_t NDR; | ||
| 131 | 		clock_flavor_t flavor; | ||
| 132 | 		mach_msg_type_number_t clock_attrCnt; | ||
| 133 | 		int clock_attr[1]; | ||
| 134 | 	} __Request__clock_set_attributes_t __attribute__((unused)); | ||
| 135 | #ifdef __MigPackStructs | ||
| 136 | #pragma pack(pop) | ||
| 137 | #endif | ||
| 138 | #endif /* !__Request__clock_priv_subsystem__defined */ | ||
| 139 | |||
| 140 | /* union of all requests */ | ||
| 141 | |||
| 142 | #ifndef __RequestUnion__clock_priv_subsystem__defined | ||
| 143 | #define __RequestUnion__clock_priv_subsystem__defined | ||
| 144 | union __RequestUnion__clock_priv_subsystem { | ||
| 145 | 	__Request__clock_set_time_t Request_clock_set_time; | ||
| 146 | 	__Request__clock_set_attributes_t Request_clock_set_attributes; | ||
| 147 | }; | ||
| 148 | #endif /* !__RequestUnion__clock_priv_subsystem__defined */ | ||
| 149 | /* typedefs for all replies */ | ||
| 150 | |||
| 151 | #ifndef __Reply__clock_priv_subsystem__defined | ||
| 152 | #define __Reply__clock_priv_subsystem__defined | ||
| 153 | |||
| 154 | #ifdef __MigPackStructs | ||
| 155 | #pragma pack(push, 4) | ||
| 156 | #endif | ||
| 157 | 	typedef struct { | ||
| 158 | 		mach_msg_header_t Head; | ||
| 159 | 		NDR_record_t NDR; | ||
| 160 | 		kern_return_t RetCode; | ||
| 161 | 	} __Reply__clock_set_time_t __attribute__((unused)); | ||
| 162 | #ifdef __MigPackStructs | ||
| 163 | #pragma pack(pop) | ||
| 164 | #endif | ||
| 165 | |||
| 166 | #ifdef __MigPackStructs | ||
| 167 | #pragma pack(push, 4) | ||
| 168 | #endif | ||
| 169 | 	typedef struct { | ||
| 170 | 		mach_msg_header_t Head; | ||
| 171 | 		NDR_record_t NDR; | ||
| 172 | 		kern_return_t RetCode; | ||
| 173 | 	} __Reply__clock_set_attributes_t __attribute__((unused)); | ||
| 174 | #ifdef __MigPackStructs | ||
| 175 | #pragma pack(pop) | ||
| 176 | #endif | ||
| 177 | #endif /* !__Reply__clock_priv_subsystem__defined */ | ||
| 178 | |||
| 179 | /* union of all replies */ | ||
| 180 | |||
| 181 | #ifndef __ReplyUnion__clock_priv_subsystem__defined | ||
| 182 | #define __ReplyUnion__clock_priv_subsystem__defined | ||
| 183 | union __ReplyUnion__clock_priv_subsystem { | ||
| 184 | 	__Reply__clock_set_time_t Reply_clock_set_time; | ||
| 185 | 	__Reply__clock_set_attributes_t Reply_clock_set_attributes; | ||
| 186 | }; | ||
| 187 | #endif /* !__RequestUnion__clock_priv_subsystem__defined */ | ||
| 188 | |||
| 189 | #ifndef subsystem_to_name_map_clock_priv | ||
| 190 | #define subsystem_to_name_map_clock_priv \ | ||
| 191 | { "clock_set_time", 1200 },\ | ||
| 192 | { "clock_set_attributes", 1201 } | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #ifdef __AfterMigUserHeader | ||
| 196 | __AfterMigUserHeader | ||
| 197 | #endif /* __AfterMigUserHeader */ | ||
| 198 | |||
| 199 | #endif	 /* _clock_priv_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/host_priv.h created+1163| ... | @@ -0,0 +1,1163 @@ | ||
| 1 | #ifndef	_host_priv_user_ | ||
| 2 | #define	_host_priv_user_ | ||
| 3 | |||
| 4 | /* Module host_priv */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	host_priv_MSG_COUNT | ||
| 52 | #define	host_priv_MSG_COUNT	26 | ||
| 53 | #endif	/* host_priv_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | |||
| 62 | #ifdef __BeforeMigUserHeader | ||
| 63 | __BeforeMigUserHeader | ||
| 64 | #endif /* __BeforeMigUserHeader */ | ||
| 65 | |||
| 66 | #include <sys/cdefs.h> | ||
| 67 | __BEGIN_DECLS | ||
| 68 | |||
| 69 | |||
| 70 | /* Routine host_get_boot_info */ | ||
| 71 | #ifdef	mig_external | ||
| 72 | mig_external | ||
| 73 | #else | ||
| 74 | extern | ||
| 75 | #endif	/* mig_external */ | ||
| 76 | kern_return_t host_get_boot_info | ||
| 77 | ( | ||
| 78 | 	host_priv_t host_priv, | ||
| 79 | 	kernel_boot_info_t boot_info | ||
| 80 | ); | ||
| 81 | |||
| 82 | /* Routine host_reboot */ | ||
| 83 | #ifdef	mig_external | ||
| 84 | mig_external | ||
| 85 | #else | ||
| 86 | extern | ||
| 87 | #endif	/* mig_external */ | ||
| 88 | kern_return_t host_reboot | ||
| 89 | ( | ||
| 90 | 	host_priv_t host_priv, | ||
| 91 | 	int options | ||
| 92 | ); | ||
| 93 | |||
| 94 | /* Routine host_priv_statistics */ | ||
| 95 | #ifdef	mig_external | ||
| 96 | mig_external | ||
| 97 | #else | ||
| 98 | extern | ||
| 99 | #endif	/* mig_external */ | ||
| 100 | kern_return_t host_priv_statistics | ||
| 101 | ( | ||
| 102 | 	host_priv_t host_priv, | ||
| 103 | 	host_flavor_t flavor, | ||
| 104 | 	host_info_t host_info_out, | ||
| 105 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 106 | ); | ||
| 107 | |||
| 108 | /* Routine host_default_memory_manager */ | ||
| 109 | #ifdef	mig_external | ||
| 110 | mig_external | ||
| 111 | #else | ||
| 112 | extern | ||
| 113 | #endif	/* mig_external */ | ||
| 114 | kern_return_t host_default_memory_manager | ||
| 115 | ( | ||
| 116 | 	host_priv_t host_priv, | ||
| 117 | 	memory_object_default_t *default_manager, | ||
| 118 | 	memory_object_cluster_size_t cluster_size | ||
| 119 | ); | ||
| 120 | |||
| 121 | /* Routine vm_wire */ | ||
| 122 | #ifdef	mig_external | ||
| 123 | mig_external | ||
| 124 | #else | ||
| 125 | extern | ||
| 126 | #endif	/* mig_external */ | ||
| 127 | kern_return_t vm_wire | ||
| 128 | ( | ||
| 129 | 	host_priv_t host_priv, | ||
| 130 | 	vm_map_t task, | ||
| 131 | 	vm_address_t address, | ||
| 132 | 	vm_size_t size, | ||
| 133 | 	vm_prot_t desired_access | ||
| 134 | ); | ||
| 135 | |||
| 136 | /* Routine thread_wire */ | ||
| 137 | #ifdef	mig_external | ||
| 138 | mig_external | ||
| 139 | #else | ||
| 140 | extern | ||
| 141 | #endif	/* mig_external */ | ||
| 142 | kern_return_t thread_wire | ||
| 143 | ( | ||
| 144 | 	host_priv_t host_priv, | ||
| 145 | 	thread_act_t thread, | ||
| 146 | 	boolean_t wired | ||
| 147 | ); | ||
| 148 | |||
| 149 | /* Routine vm_allocate_cpm */ | ||
| 150 | #ifdef	mig_external | ||
| 151 | mig_external | ||
| 152 | #else | ||
| 153 | extern | ||
| 154 | #endif	/* mig_external */ | ||
| 155 | kern_return_t vm_allocate_cpm | ||
| 156 | ( | ||
| 157 | 	host_priv_t host_priv, | ||
| 158 | 	vm_map_t task, | ||
| 159 | 	vm_address_t *address, | ||
| 160 | 	vm_size_t size, | ||
| 161 | 	int flags | ||
| 162 | ); | ||
| 163 | |||
| 164 | /* Routine host_processors */ | ||
| 165 | #ifdef	mig_external | ||
| 166 | mig_external | ||
| 167 | #else | ||
| 168 | extern | ||
| 169 | #endif	/* mig_external */ | ||
| 170 | kern_return_t host_processors | ||
| 171 | ( | ||
| 172 | 	host_priv_t host_priv, | ||
| 173 | 	processor_array_t *out_processor_list, | ||
| 174 | 	mach_msg_type_number_t *out_processor_listCnt | ||
| 175 | ); | ||
| 176 | |||
| 177 | /* Routine host_get_clock_control */ | ||
| 178 | #ifdef	mig_external | ||
| 179 | mig_external | ||
| 180 | #else | ||
| 181 | extern | ||
| 182 | #endif	/* mig_external */ | ||
| 183 | kern_return_t host_get_clock_control | ||
| 184 | ( | ||
| 185 | 	host_priv_t host_priv, | ||
| 186 | 	clock_id_t clock_id, | ||
| 187 | 	clock_ctrl_t *clock_ctrl | ||
| 188 | ); | ||
| 189 | |||
| 190 | /* Routine kmod_create */ | ||
| 191 | #ifdef	mig_external | ||
| 192 | mig_external | ||
| 193 | #else | ||
| 194 | extern | ||
| 195 | #endif	/* mig_external */ | ||
| 196 | kern_return_t kmod_create | ||
| 197 | ( | ||
| 198 | 	host_priv_t host_priv, | ||
| 199 | 	vm_address_t info, | ||
| 200 | 	kmod_t *module | ||
| 201 | ); | ||
| 202 | |||
| 203 | /* Routine kmod_destroy */ | ||
| 204 | #ifdef	mig_external | ||
| 205 | mig_external | ||
| 206 | #else | ||
| 207 | extern | ||
| 208 | #endif	/* mig_external */ | ||
| 209 | kern_return_t kmod_destroy | ||
| 210 | ( | ||
| 211 | 	host_priv_t host_priv, | ||
| 212 | 	kmod_t module | ||
| 213 | ); | ||
| 214 | |||
| 215 | /* Routine kmod_control */ | ||
| 216 | #ifdef	mig_external | ||
| 217 | mig_external | ||
| 218 | #else | ||
| 219 | extern | ||
| 220 | #endif	/* mig_external */ | ||
| 221 | kern_return_t kmod_control | ||
| 222 | ( | ||
| 223 | 	host_priv_t host_priv, | ||
| 224 | 	kmod_t module, | ||
| 225 | 	kmod_control_flavor_t flavor, | ||
| 226 | 	kmod_args_t *data, | ||
| 227 | 	mach_msg_type_number_t *dataCnt | ||
| 228 | ); | ||
| 229 | |||
| 230 | /* Routine host_get_special_port */ | ||
| 231 | #ifdef	mig_external | ||
| 232 | mig_external | ||
| 233 | #else | ||
| 234 | extern | ||
| 235 | #endif	/* mig_external */ | ||
| 236 | kern_return_t host_get_special_port | ||
| 237 | ( | ||
| 238 | 	host_priv_t host_priv, | ||
| 239 | 	int node, | ||
| 240 | 	int which, | ||
| 241 | 	mach_port_t *port | ||
| 242 | ); | ||
| 243 | |||
| 244 | /* Routine host_set_special_port */ | ||
| 245 | #ifdef	mig_external | ||
| 246 | mig_external | ||
| 247 | #else | ||
| 248 | extern | ||
| 249 | #endif	/* mig_external */ | ||
| 250 | kern_return_t host_set_special_port | ||
| 251 | ( | ||
| 252 | 	host_priv_t host_priv, | ||
| 253 | 	int which, | ||
| 254 | 	mach_port_t port | ||
| 255 | ); | ||
| 256 | |||
| 257 | /* Routine host_set_exception_ports */ | ||
| 258 | #ifdef	mig_external | ||
| 259 | mig_external | ||
| 260 | #else | ||
| 261 | extern | ||
| 262 | #endif	/* mig_external */ | ||
| 263 | kern_return_t host_set_exception_ports | ||
| 264 | ( | ||
| 265 | 	host_priv_t host_priv, | ||
| 266 | 	exception_mask_t exception_mask, | ||
| 267 | 	mach_port_t new_port, | ||
| 268 | 	exception_behavior_t behavior, | ||
| 269 | 	thread_state_flavor_t new_flavor | ||
| 270 | ); | ||
| 271 | |||
| 272 | /* Routine host_get_exception_ports */ | ||
| 273 | #ifdef	mig_external | ||
| 274 | mig_external | ||
| 275 | #else | ||
| 276 | extern | ||
| 277 | #endif	/* mig_external */ | ||
| 278 | kern_return_t host_get_exception_ports | ||
| 279 | ( | ||
| 280 | 	host_priv_t host_priv, | ||
| 281 | 	exception_mask_t exception_mask, | ||
| 282 | 	exception_mask_array_t masks, | ||
| 283 | 	mach_msg_type_number_t *masksCnt, | ||
| 284 | 	exception_handler_array_t old_handlers, | ||
| 285 | 	exception_behavior_array_t old_behaviors, | ||
| 286 | 	exception_flavor_array_t old_flavors | ||
| 287 | ); | ||
| 288 | |||
| 289 | /* Routine host_swap_exception_ports */ | ||
| 290 | #ifdef	mig_external | ||
| 291 | mig_external | ||
| 292 | #else | ||
| 293 | extern | ||
| 294 | #endif	/* mig_external */ | ||
| 295 | kern_return_t host_swap_exception_ports | ||
| 296 | ( | ||
| 297 | 	host_priv_t host_priv, | ||
| 298 | 	exception_mask_t exception_mask, | ||
| 299 | 	mach_port_t new_port, | ||
| 300 | 	exception_behavior_t behavior, | ||
| 301 | 	thread_state_flavor_t new_flavor, | ||
| 302 | 	exception_mask_array_t masks, | ||
| 303 | 	mach_msg_type_number_t *masksCnt, | ||
| 304 | 	exception_handler_array_t old_handlerss, | ||
| 305 | 	exception_behavior_array_t old_behaviors, | ||
| 306 | 	exception_flavor_array_t old_flavors | ||
| 307 | ); | ||
| 308 | |||
| 309 | /* Routine mach_vm_wire */ | ||
| 310 | #ifdef	mig_external | ||
| 311 | mig_external | ||
| 312 | #else | ||
| 313 | extern | ||
| 314 | #endif	/* mig_external */ | ||
| 315 | kern_return_t mach_vm_wire | ||
| 316 | ( | ||
| 317 | 	host_priv_t host_priv, | ||
| 318 | 	vm_map_t task, | ||
| 319 | 	mach_vm_address_t address, | ||
| 320 | 	mach_vm_size_t size, | ||
| 321 | 	vm_prot_t desired_access | ||
| 322 | ); | ||
| 323 | |||
| 324 | /* Routine host_processor_sets */ | ||
| 325 | #ifdef	mig_external | ||
| 326 | mig_external | ||
| 327 | #else | ||
| 328 | extern | ||
| 329 | #endif	/* mig_external */ | ||
| 330 | kern_return_t host_processor_sets | ||
| 331 | ( | ||
| 332 | 	host_priv_t host_priv, | ||
| 333 | 	processor_set_name_array_t *processor_sets, | ||
| 334 | 	mach_msg_type_number_t *processor_setsCnt | ||
| 335 | ); | ||
| 336 | |||
| 337 | /* Routine host_processor_set_priv */ | ||
| 338 | #ifdef	mig_external | ||
| 339 | mig_external | ||
| 340 | #else | ||
| 341 | extern | ||
| 342 | #endif	/* mig_external */ | ||
| 343 | kern_return_t host_processor_set_priv | ||
| 344 | ( | ||
| 345 | 	host_priv_t host_priv, | ||
| 346 | 	processor_set_name_t set_name, | ||
| 347 | 	processor_set_t *set | ||
| 348 | ); | ||
| 349 | |||
| 350 | /* Routine host_set_UNDServer */ | ||
| 351 | #ifdef	mig_external | ||
| 352 | mig_external | ||
| 353 | #else | ||
| 354 | extern | ||
| 355 | #endif	/* mig_external */ | ||
| 356 | kern_return_t host_set_UNDServer | ||
| 357 | ( | ||
| 358 | 	host_priv_t host, | ||
| 359 | 	UNDServerRef server | ||
| 360 | ); | ||
| 361 | |||
| 362 | /* Routine host_get_UNDServer */ | ||
| 363 | #ifdef	mig_external | ||
| 364 | mig_external | ||
| 365 | #else | ||
| 366 | extern | ||
| 367 | #endif	/* mig_external */ | ||
| 368 | kern_return_t host_get_UNDServer | ||
| 369 | ( | ||
| 370 | 	host_priv_t host, | ||
| 371 | 	UNDServerRef *server | ||
| 372 | ); | ||
| 373 | |||
| 374 | /* Routine kext_request */ | ||
| 375 | #ifdef	mig_external | ||
| 376 | mig_external | ||
| 377 | #else | ||
| 378 | extern | ||
| 379 | #endif	/* mig_external */ | ||
| 380 | kern_return_t kext_request | ||
| 381 | ( | ||
| 382 | 	host_priv_t host_priv, | ||
| 383 | 	uint32_t user_log_flags, | ||
| 384 | 	vm_offset_t request_data, | ||
| 385 | 	mach_msg_type_number_t request_dataCnt, | ||
| 386 | 	vm_offset_t *response_data, | ||
| 387 | 	mach_msg_type_number_t *response_dataCnt, | ||
| 388 | 	vm_offset_t *log_data, | ||
| 389 | 	mach_msg_type_number_t *log_dataCnt, | ||
| 390 | 	kern_return_t *op_result | ||
| 391 | ); | ||
| 392 | |||
| 393 | __END_DECLS | ||
| 394 | |||
| 395 | /********************** Caution **************************/ | ||
| 396 | /* The following data types should be used to calculate */ | ||
| 397 | /* maximum message sizes only. The actual message may be */ | ||
| 398 | /* smaller, and the position of the arguments within the */ | ||
| 399 | /* message layout may vary from what is presented here. */ | ||
| 400 | /* For example, if any of the arguments are variable- */ | ||
| 401 | /* sized, and less than the maximum is sent, the data */ | ||
| 402 | /* will be packed tight in the actual message to reduce */ | ||
| 403 | /* the presence of holes. */ | ||
| 404 | /********************** Caution **************************/ | ||
| 405 | |||
| 406 | /* typedefs for all requests */ | ||
| 407 | |||
| 408 | #ifndef __Request__host_priv_subsystem__defined | ||
| 409 | #define __Request__host_priv_subsystem__defined | ||
| 410 | |||
| 411 | #ifdef __MigPackStructs | ||
| 412 | #pragma pack(push, 4) | ||
| 413 | #endif | ||
| 414 | 	typedef struct { | ||
| 415 | 		mach_msg_header_t Head; | ||
| 416 | 	} __Request__host_get_boot_info_t __attribute__((unused)); | ||
| 417 | #ifdef __MigPackStructs | ||
| 418 | #pragma pack(pop) | ||
| 419 | #endif | ||
| 420 | |||
| 421 | #ifdef __MigPackStructs | ||
| 422 | #pragma pack(push, 4) | ||
| 423 | #endif | ||
| 424 | 	typedef struct { | ||
| 425 | 		mach_msg_header_t Head; | ||
| 426 | 		NDR_record_t NDR; | ||
| 427 | 		int options; | ||
| 428 | 	} __Request__host_reboot_t __attribute__((unused)); | ||
| 429 | #ifdef __MigPackStructs | ||
| 430 | #pragma pack(pop) | ||
| 431 | #endif | ||
| 432 | |||
| 433 | #ifdef __MigPackStructs | ||
| 434 | #pragma pack(push, 4) | ||
| 435 | #endif | ||
| 436 | 	typedef struct { | ||
| 437 | 		mach_msg_header_t Head; | ||
| 438 | 		NDR_record_t NDR; | ||
| 439 | 		host_flavor_t flavor; | ||
| 440 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 441 | 	} __Request__host_priv_statistics_t __attribute__((unused)); | ||
| 442 | #ifdef __MigPackStructs | ||
| 443 | #pragma pack(pop) | ||
| 444 | #endif | ||
| 445 | |||
| 446 | #ifdef __MigPackStructs | ||
| 447 | #pragma pack(push, 4) | ||
| 448 | #endif | ||
| 449 | 	typedef struct { | ||
| 450 | 		mach_msg_header_t Head; | ||
| 451 | 		/* start of the kernel processed data */ | ||
| 452 | 		mach_msg_body_t msgh_body; | ||
| 453 | 		mach_msg_port_descriptor_t default_manager; | ||
| 454 | 		/* end of the kernel processed data */ | ||
| 455 | 		NDR_record_t NDR; | ||
| 456 | 		memory_object_cluster_size_t cluster_size; | ||
| 457 | 	} __Request__host_default_memory_manager_t __attribute__((unused)); | ||
| 458 | #ifdef __MigPackStructs | ||
| 459 | #pragma pack(pop) | ||
| 460 | #endif | ||
| 461 | |||
| 462 | #ifdef __MigPackStructs | ||
| 463 | #pragma pack(push, 4) | ||
| 464 | #endif | ||
| 465 | 	typedef struct { | ||
| 466 | 		mach_msg_header_t Head; | ||
| 467 | 		/* start of the kernel processed data */ | ||
| 468 | 		mach_msg_body_t msgh_body; | ||
| 469 | 		mach_msg_port_descriptor_t task; | ||
| 470 | 		/* end of the kernel processed data */ | ||
| 471 | 		NDR_record_t NDR; | ||
| 472 | 		vm_address_t address; | ||
| 473 | 		vm_size_t size; | ||
| 474 | 		vm_prot_t desired_access; | ||
| 475 | 	} __Request__vm_wire_t __attribute__((unused)); | ||
| 476 | #ifdef __MigPackStructs | ||
| 477 | #pragma pack(pop) | ||
| 478 | #endif | ||
| 479 | |||
| 480 | #ifdef __MigPackStructs | ||
| 481 | #pragma pack(push, 4) | ||
| 482 | #endif | ||
| 483 | 	typedef struct { | ||
| 484 | 		mach_msg_header_t Head; | ||
| 485 | 		/* start of the kernel processed data */ | ||
| 486 | 		mach_msg_body_t msgh_body; | ||
| 487 | 		mach_msg_port_descriptor_t thread; | ||
| 488 | 		/* end of the kernel processed data */ | ||
| 489 | 		NDR_record_t NDR; | ||
| 490 | 		boolean_t wired; | ||
| 491 | 	} __Request__thread_wire_t __attribute__((unused)); | ||
| 492 | #ifdef __MigPackStructs | ||
| 493 | #pragma pack(pop) | ||
| 494 | #endif | ||
| 495 | |||
| 496 | #ifdef __MigPackStructs | ||
| 497 | #pragma pack(push, 4) | ||
| 498 | #endif | ||
| 499 | 	typedef struct { | ||
| 500 | 		mach_msg_header_t Head; | ||
| 501 | 		/* start of the kernel processed data */ | ||
| 502 | 		mach_msg_body_t msgh_body; | ||
| 503 | 		mach_msg_port_descriptor_t task; | ||
| 504 | 		/* end of the kernel processed data */ | ||
| 505 | 		NDR_record_t NDR; | ||
| 506 | 		vm_address_t address; | ||
| 507 | 		vm_size_t size; | ||
| 508 | 		int flags; | ||
| 509 | 	} __Request__vm_allocate_cpm_t __attribute__((unused)); | ||
| 510 | #ifdef __MigPackStructs | ||
| 511 | #pragma pack(pop) | ||
| 512 | #endif | ||
| 513 | |||
| 514 | #ifdef __MigPackStructs | ||
| 515 | #pragma pack(push, 4) | ||
| 516 | #endif | ||
| 517 | 	typedef struct { | ||
| 518 | 		mach_msg_header_t Head; | ||
| 519 | 	} __Request__host_processors_t __attribute__((unused)); | ||
| 520 | #ifdef __MigPackStructs | ||
| 521 | #pragma pack(pop) | ||
| 522 | #endif | ||
| 523 | |||
| 524 | #ifdef __MigPackStructs | ||
| 525 | #pragma pack(push, 4) | ||
| 526 | #endif | ||
| 527 | 	typedef struct { | ||
| 528 | 		mach_msg_header_t Head; | ||
| 529 | 		NDR_record_t NDR; | ||
| 530 | 		clock_id_t clock_id; | ||
| 531 | 	} __Request__host_get_clock_control_t __attribute__((unused)); | ||
| 532 | #ifdef __MigPackStructs | ||
| 533 | #pragma pack(pop) | ||
| 534 | #endif | ||
| 535 | |||
| 536 | #ifdef __MigPackStructs | ||
| 537 | #pragma pack(push, 4) | ||
| 538 | #endif | ||
| 539 | 	typedef struct { | ||
| 540 | 		mach_msg_header_t Head; | ||
| 541 | 		NDR_record_t NDR; | ||
| 542 | 		vm_address_t info; | ||
| 543 | 	} __Request__kmod_create_t __attribute__((unused)); | ||
| 544 | #ifdef __MigPackStructs | ||
| 545 | #pragma pack(pop) | ||
| 546 | #endif | ||
| 547 | |||
| 548 | #ifdef __MigPackStructs | ||
| 549 | #pragma pack(push, 4) | ||
| 550 | #endif | ||
| 551 | 	typedef struct { | ||
| 552 | 		mach_msg_header_t Head; | ||
| 553 | 		NDR_record_t NDR; | ||
| 554 | 		kmod_t module; | ||
| 555 | 	} __Request__kmod_destroy_t __attribute__((unused)); | ||
| 556 | #ifdef __MigPackStructs | ||
| 557 | #pragma pack(pop) | ||
| 558 | #endif | ||
| 559 | |||
| 560 | #ifdef __MigPackStructs | ||
| 561 | #pragma pack(push, 4) | ||
| 562 | #endif | ||
| 563 | 	typedef struct { | ||
| 564 | 		mach_msg_header_t Head; | ||
| 565 | 		/* start of the kernel processed data */ | ||
| 566 | 		mach_msg_body_t msgh_body; | ||
| 567 | 		mach_msg_ool_descriptor_t data; | ||
| 568 | 		/* end of the kernel processed data */ | ||
| 569 | 		NDR_record_t NDR; | ||
| 570 | 		kmod_t module; | ||
| 571 | 		kmod_control_flavor_t flavor; | ||
| 572 | 		mach_msg_type_number_t dataCnt; | ||
| 573 | 	} __Request__kmod_control_t __attribute__((unused)); | ||
| 574 | #ifdef __MigPackStructs | ||
| 575 | #pragma pack(pop) | ||
| 576 | #endif | ||
| 577 | |||
| 578 | #ifdef __MigPackStructs | ||
| 579 | #pragma pack(push, 4) | ||
| 580 | #endif | ||
| 581 | 	typedef struct { | ||
| 582 | 		mach_msg_header_t Head; | ||
| 583 | 		NDR_record_t NDR; | ||
| 584 | 		int node; | ||
| 585 | 		int which; | ||
| 586 | 	} __Request__host_get_special_port_t __attribute__((unused)); | ||
| 587 | #ifdef __MigPackStructs | ||
| 588 | #pragma pack(pop) | ||
| 589 | #endif | ||
| 590 | |||
| 591 | #ifdef __MigPackStructs | ||
| 592 | #pragma pack(push, 4) | ||
| 593 | #endif | ||
| 594 | 	typedef struct { | ||
| 595 | 		mach_msg_header_t Head; | ||
| 596 | 		/* start of the kernel processed data */ | ||
| 597 | 		mach_msg_body_t msgh_body; | ||
| 598 | 		mach_msg_port_descriptor_t port; | ||
| 599 | 		/* end of the kernel processed data */ | ||
| 600 | 		NDR_record_t NDR; | ||
| 601 | 		int which; | ||
| 602 | 	} __Request__host_set_special_port_t __attribute__((unused)); | ||
| 603 | #ifdef __MigPackStructs | ||
| 604 | #pragma pack(pop) | ||
| 605 | #endif | ||
| 606 | |||
| 607 | #ifdef __MigPackStructs | ||
| 608 | #pragma pack(push, 4) | ||
| 609 | #endif | ||
| 610 | 	typedef struct { | ||
| 611 | 		mach_msg_header_t Head; | ||
| 612 | 		/* start of the kernel processed data */ | ||
| 613 | 		mach_msg_body_t msgh_body; | ||
| 614 | 		mach_msg_port_descriptor_t new_port; | ||
| 615 | 		/* end of the kernel processed data */ | ||
| 616 | 		NDR_record_t NDR; | ||
| 617 | 		exception_mask_t exception_mask; | ||
| 618 | 		exception_behavior_t behavior; | ||
| 619 | 		thread_state_flavor_t new_flavor; | ||
| 620 | 	} __Request__host_set_exception_ports_t __attribute__((unused)); | ||
| 621 | #ifdef __MigPackStructs | ||
| 622 | #pragma pack(pop) | ||
| 623 | #endif | ||
| 624 | |||
| 625 | #ifdef __MigPackStructs | ||
| 626 | #pragma pack(push, 4) | ||
| 627 | #endif | ||
| 628 | 	typedef struct { | ||
| 629 | 		mach_msg_header_t Head; | ||
| 630 | 		NDR_record_t NDR; | ||
| 631 | 		exception_mask_t exception_mask; | ||
| 632 | 	} __Request__host_get_exception_ports_t __attribute__((unused)); | ||
| 633 | #ifdef __MigPackStructs | ||
| 634 | #pragma pack(pop) | ||
| 635 | #endif | ||
| 636 | |||
| 637 | #ifdef __MigPackStructs | ||
| 638 | #pragma pack(push, 4) | ||
| 639 | #endif | ||
| 640 | 	typedef struct { | ||
| 641 | 		mach_msg_header_t Head; | ||
| 642 | 		/* start of the kernel processed data */ | ||
| 643 | 		mach_msg_body_t msgh_body; | ||
| 644 | 		mach_msg_port_descriptor_t new_port; | ||
| 645 | 		/* end of the kernel processed data */ | ||
| 646 | 		NDR_record_t NDR; | ||
| 647 | 		exception_mask_t exception_mask; | ||
| 648 | 		exception_behavior_t behavior; | ||
| 649 | 		thread_state_flavor_t new_flavor; | ||
| 650 | 	} __Request__host_swap_exception_ports_t __attribute__((unused)); | ||
| 651 | #ifdef __MigPackStructs | ||
| 652 | #pragma pack(pop) | ||
| 653 | #endif | ||
| 654 | |||
| 655 | #ifdef __MigPackStructs | ||
| 656 | #pragma pack(push, 4) | ||
| 657 | #endif | ||
| 658 | 	typedef struct { | ||
| 659 | 		mach_msg_header_t Head; | ||
| 660 | 		/* start of the kernel processed data */ | ||
| 661 | 		mach_msg_body_t msgh_body; | ||
| 662 | 		mach_msg_port_descriptor_t task; | ||
| 663 | 		/* end of the kernel processed data */ | ||
| 664 | 		NDR_record_t NDR; | ||
| 665 | 		mach_vm_address_t address; | ||
| 666 | 		mach_vm_size_t size; | ||
| 667 | 		vm_prot_t desired_access; | ||
| 668 | 	} __Request__mach_vm_wire_t __attribute__((unused)); | ||
| 669 | #ifdef __MigPackStructs | ||
| 670 | #pragma pack(pop) | ||
| 671 | #endif | ||
| 672 | |||
| 673 | #ifdef __MigPackStructs | ||
| 674 | #pragma pack(push, 4) | ||
| 675 | #endif | ||
| 676 | 	typedef struct { | ||
| 677 | 		mach_msg_header_t Head; | ||
| 678 | 	} __Request__host_processor_sets_t __attribute__((unused)); | ||
| 679 | #ifdef __MigPackStructs | ||
| 680 | #pragma pack(pop) | ||
| 681 | #endif | ||
| 682 | |||
| 683 | #ifdef __MigPackStructs | ||
| 684 | #pragma pack(push, 4) | ||
| 685 | #endif | ||
| 686 | 	typedef struct { | ||
| 687 | 		mach_msg_header_t Head; | ||
| 688 | 		/* start of the kernel processed data */ | ||
| 689 | 		mach_msg_body_t msgh_body; | ||
| 690 | 		mach_msg_port_descriptor_t set_name; | ||
| 691 | 		/* end of the kernel processed data */ | ||
| 692 | 	} __Request__host_processor_set_priv_t __attribute__((unused)); | ||
| 693 | #ifdef __MigPackStructs | ||
| 694 | #pragma pack(pop) | ||
| 695 | #endif | ||
| 696 | |||
| 697 | #ifdef __MigPackStructs | ||
| 698 | #pragma pack(push, 4) | ||
| 699 | #endif | ||
| 700 | 	typedef struct { | ||
| 701 | 		mach_msg_header_t Head; | ||
| 702 | 		/* start of the kernel processed data */ | ||
| 703 | 		mach_msg_body_t msgh_body; | ||
| 704 | 		mach_msg_port_descriptor_t server; | ||
| 705 | 		/* end of the kernel processed data */ | ||
| 706 | 	} __Request__host_set_UNDServer_t __attribute__((unused)); | ||
| 707 | #ifdef __MigPackStructs | ||
| 708 | #pragma pack(pop) | ||
| 709 | #endif | ||
| 710 | |||
| 711 | #ifdef __MigPackStructs | ||
| 712 | #pragma pack(push, 4) | ||
| 713 | #endif | ||
| 714 | 	typedef struct { | ||
| 715 | 		mach_msg_header_t Head; | ||
| 716 | 	} __Request__host_get_UNDServer_t __attribute__((unused)); | ||
| 717 | #ifdef __MigPackStructs | ||
| 718 | #pragma pack(pop) | ||
| 719 | #endif | ||
| 720 | |||
| 721 | #ifdef __MigPackStructs | ||
| 722 | #pragma pack(push, 4) | ||
| 723 | #endif | ||
| 724 | 	typedef struct { | ||
| 725 | 		mach_msg_header_t Head; | ||
| 726 | 		/* start of the kernel processed data */ | ||
| 727 | 		mach_msg_body_t msgh_body; | ||
| 728 | 		mach_msg_ool_descriptor_t request_data; | ||
| 729 | 		/* end of the kernel processed data */ | ||
| 730 | 		NDR_record_t NDR; | ||
| 731 | 		uint32_t user_log_flags; | ||
| 732 | 		mach_msg_type_number_t request_dataCnt; | ||
| 733 | 	} __Request__kext_request_t __attribute__((unused)); | ||
| 734 | #ifdef __MigPackStructs | ||
| 735 | #pragma pack(pop) | ||
| 736 | #endif | ||
| 737 | #endif /* !__Request__host_priv_subsystem__defined */ | ||
| 738 | |||
| 739 | /* union of all requests */ | ||
| 740 | |||
| 741 | #ifndef __RequestUnion__host_priv_subsystem__defined | ||
| 742 | #define __RequestUnion__host_priv_subsystem__defined | ||
| 743 | union __RequestUnion__host_priv_subsystem { | ||
| 744 | 	__Request__host_get_boot_info_t Request_host_get_boot_info; | ||
| 745 | 	__Request__host_reboot_t Request_host_reboot; | ||
| 746 | 	__Request__host_priv_statistics_t Request_host_priv_statistics; | ||
| 747 | 	__Request__host_default_memory_manager_t Request_host_default_memory_manager; | ||
| 748 | 	__Request__vm_wire_t Request_vm_wire; | ||
| 749 | 	__Request__thread_wire_t Request_thread_wire; | ||
| 750 | 	__Request__vm_allocate_cpm_t Request_vm_allocate_cpm; | ||
| 751 | 	__Request__host_processors_t Request_host_processors; | ||
| 752 | 	__Request__host_get_clock_control_t Request_host_get_clock_control; | ||
| 753 | 	__Request__kmod_create_t Request_kmod_create; | ||
| 754 | 	__Request__kmod_destroy_t Request_kmod_destroy; | ||
| 755 | 	__Request__kmod_control_t Request_kmod_control; | ||
| 756 | 	__Request__host_get_special_port_t Request_host_get_special_port; | ||
| 757 | 	__Request__host_set_special_port_t Request_host_set_special_port; | ||
| 758 | 	__Request__host_set_exception_ports_t Request_host_set_exception_ports; | ||
| 759 | 	__Request__host_get_exception_ports_t Request_host_get_exception_ports; | ||
| 760 | 	__Request__host_swap_exception_ports_t Request_host_swap_exception_ports; | ||
| 761 | 	__Request__mach_vm_wire_t Request_mach_vm_wire; | ||
| 762 | 	__Request__host_processor_sets_t Request_host_processor_sets; | ||
| 763 | 	__Request__host_processor_set_priv_t Request_host_processor_set_priv; | ||
| 764 | 	__Request__host_set_UNDServer_t Request_host_set_UNDServer; | ||
| 765 | 	__Request__host_get_UNDServer_t Request_host_get_UNDServer; | ||
| 766 | 	__Request__kext_request_t Request_kext_request; | ||
| 767 | }; | ||
| 768 | #endif /* !__RequestUnion__host_priv_subsystem__defined */ | ||
| 769 | /* typedefs for all replies */ | ||
| 770 | |||
| 771 | #ifndef __Reply__host_priv_subsystem__defined | ||
| 772 | #define __Reply__host_priv_subsystem__defined | ||
| 773 | |||
| 774 | #ifdef __MigPackStructs | ||
| 775 | #pragma pack(push, 4) | ||
| 776 | #endif | ||
| 777 | 	typedef struct { | ||
| 778 | 		mach_msg_header_t Head; | ||
| 779 | 		NDR_record_t NDR; | ||
| 780 | 		kern_return_t RetCode; | ||
| 781 | 		mach_msg_type_number_t boot_infoOffset; /* MiG doesn't use it */ | ||
| 782 | 		mach_msg_type_number_t boot_infoCnt; | ||
| 783 | 		char boot_info[4096]; | ||
| 784 | 	} __Reply__host_get_boot_info_t __attribute__((unused)); | ||
| 785 | #ifdef __MigPackStructs | ||
| 786 | #pragma pack(pop) | ||
| 787 | #endif | ||
| 788 | |||
| 789 | #ifdef __MigPackStructs | ||
| 790 | #pragma pack(push, 4) | ||
| 791 | #endif | ||
| 792 | 	typedef struct { | ||
| 793 | 		mach_msg_header_t Head; | ||
| 794 | 		NDR_record_t NDR; | ||
| 795 | 		kern_return_t RetCode; | ||
| 796 | 	} __Reply__host_reboot_t __attribute__((unused)); | ||
| 797 | #ifdef __MigPackStructs | ||
| 798 | #pragma pack(pop) | ||
| 799 | #endif | ||
| 800 | |||
| 801 | #ifdef __MigPackStructs | ||
| 802 | #pragma pack(push, 4) | ||
| 803 | #endif | ||
| 804 | 	typedef struct { | ||
| 805 | 		mach_msg_header_t Head; | ||
| 806 | 		NDR_record_t NDR; | ||
| 807 | 		kern_return_t RetCode; | ||
| 808 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 809 | 		integer_t host_info_out[68]; | ||
| 810 | 	} __Reply__host_priv_statistics_t __attribute__((unused)); | ||
| 811 | #ifdef __MigPackStructs | ||
| 812 | #pragma pack(pop) | ||
| 813 | #endif | ||
| 814 | |||
| 815 | #ifdef __MigPackStructs | ||
| 816 | #pragma pack(push, 4) | ||
| 817 | #endif | ||
| 818 | 	typedef struct { | ||
| 819 | 		mach_msg_header_t Head; | ||
| 820 | 		/* start of the kernel processed data */ | ||
| 821 | 		mach_msg_body_t msgh_body; | ||
| 822 | 		mach_msg_port_descriptor_t default_manager; | ||
| 823 | 		/* end of the kernel processed data */ | ||
| 824 | 	} __Reply__host_default_memory_manager_t __attribute__((unused)); | ||
| 825 | #ifdef __MigPackStructs | ||
| 826 | #pragma pack(pop) | ||
| 827 | #endif | ||
| 828 | |||
| 829 | #ifdef __MigPackStructs | ||
| 830 | #pragma pack(push, 4) | ||
| 831 | #endif | ||
| 832 | 	typedef struct { | ||
| 833 | 		mach_msg_header_t Head; | ||
| 834 | 		NDR_record_t NDR; | ||
| 835 | 		kern_return_t RetCode; | ||
| 836 | 	} __Reply__vm_wire_t __attribute__((unused)); | ||
| 837 | #ifdef __MigPackStructs | ||
| 838 | #pragma pack(pop) | ||
| 839 | #endif | ||
| 840 | |||
| 841 | #ifdef __MigPackStructs | ||
| 842 | #pragma pack(push, 4) | ||
| 843 | #endif | ||
| 844 | 	typedef struct { | ||
| 845 | 		mach_msg_header_t Head; | ||
| 846 | 		NDR_record_t NDR; | ||
| 847 | 		kern_return_t RetCode; | ||
| 848 | 	} __Reply__thread_wire_t __attribute__((unused)); | ||
| 849 | #ifdef __MigPackStructs | ||
| 850 | #pragma pack(pop) | ||
| 851 | #endif | ||
| 852 | |||
| 853 | #ifdef __MigPackStructs | ||
| 854 | #pragma pack(push, 4) | ||
| 855 | #endif | ||
| 856 | 	typedef struct { | ||
| 857 | 		mach_msg_header_t Head; | ||
| 858 | 		NDR_record_t NDR; | ||
| 859 | 		kern_return_t RetCode; | ||
| 860 | 		vm_address_t address; | ||
| 861 | 	} __Reply__vm_allocate_cpm_t __attribute__((unused)); | ||
| 862 | #ifdef __MigPackStructs | ||
| 863 | #pragma pack(pop) | ||
| 864 | #endif | ||
| 865 | |||
| 866 | #ifdef __MigPackStructs | ||
| 867 | #pragma pack(push, 4) | ||
| 868 | #endif | ||
| 869 | 	typedef struct { | ||
| 870 | 		mach_msg_header_t Head; | ||
| 871 | 		/* start of the kernel processed data */ | ||
| 872 | 		mach_msg_body_t msgh_body; | ||
| 873 | 		mach_msg_ool_ports_descriptor_t out_processor_list; | ||
| 874 | 		/* end of the kernel processed data */ | ||
| 875 | 		NDR_record_t NDR; | ||
| 876 | 		mach_msg_type_number_t out_processor_listCnt; | ||
| 877 | 	} __Reply__host_processors_t __attribute__((unused)); | ||
| 878 | #ifdef __MigPackStructs | ||
| 879 | #pragma pack(pop) | ||
| 880 | #endif | ||
| 881 | |||
| 882 | #ifdef __MigPackStructs | ||
| 883 | #pragma pack(push, 4) | ||
| 884 | #endif | ||
| 885 | 	typedef struct { | ||
| 886 | 		mach_msg_header_t Head; | ||
| 887 | 		/* start of the kernel processed data */ | ||
| 888 | 		mach_msg_body_t msgh_body; | ||
| 889 | 		mach_msg_port_descriptor_t clock_ctrl; | ||
| 890 | 		/* end of the kernel processed data */ | ||
| 891 | 	} __Reply__host_get_clock_control_t __attribute__((unused)); | ||
| 892 | #ifdef __MigPackStructs | ||
| 893 | #pragma pack(pop) | ||
| 894 | #endif | ||
| 895 | |||
| 896 | #ifdef __MigPackStructs | ||
| 897 | #pragma pack(push, 4) | ||
| 898 | #endif | ||
| 899 | 	typedef struct { | ||
| 900 | 		mach_msg_header_t Head; | ||
| 901 | 		NDR_record_t NDR; | ||
| 902 | 		kern_return_t RetCode; | ||
| 903 | 		kmod_t module; | ||
| 904 | 	} __Reply__kmod_create_t __attribute__((unused)); | ||
| 905 | #ifdef __MigPackStructs | ||
| 906 | #pragma pack(pop) | ||
| 907 | #endif | ||
| 908 | |||
| 909 | #ifdef __MigPackStructs | ||
| 910 | #pragma pack(push, 4) | ||
| 911 | #endif | ||
| 912 | 	typedef struct { | ||
| 913 | 		mach_msg_header_t Head; | ||
| 914 | 		NDR_record_t NDR; | ||
| 915 | 		kern_return_t RetCode; | ||
| 916 | 	} __Reply__kmod_destroy_t __attribute__((unused)); | ||
| 917 | #ifdef __MigPackStructs | ||
| 918 | #pragma pack(pop) | ||
| 919 | #endif | ||
| 920 | |||
| 921 | #ifdef __MigPackStructs | ||
| 922 | #pragma pack(push, 4) | ||
| 923 | #endif | ||
| 924 | 	typedef struct { | ||
| 925 | 		mach_msg_header_t Head; | ||
| 926 | 		/* start of the kernel processed data */ | ||
| 927 | 		mach_msg_body_t msgh_body; | ||
| 928 | 		mach_msg_ool_descriptor_t data; | ||
| 929 | 		/* end of the kernel processed data */ | ||
| 930 | 		NDR_record_t NDR; | ||
| 931 | 		mach_msg_type_number_t dataCnt; | ||
| 932 | 	} __Reply__kmod_control_t __attribute__((unused)); | ||
| 933 | #ifdef __MigPackStructs | ||
| 934 | #pragma pack(pop) | ||
| 935 | #endif | ||
| 936 | |||
| 937 | #ifdef __MigPackStructs | ||
| 938 | #pragma pack(push, 4) | ||
| 939 | #endif | ||
| 940 | 	typedef struct { | ||
| 941 | 		mach_msg_header_t Head; | ||
| 942 | 		/* start of the kernel processed data */ | ||
| 943 | 		mach_msg_body_t msgh_body; | ||
| 944 | 		mach_msg_port_descriptor_t port; | ||
| 945 | 		/* end of the kernel processed data */ | ||
| 946 | 	} __Reply__host_get_special_port_t __attribute__((unused)); | ||
| 947 | #ifdef __MigPackStructs | ||
| 948 | #pragma pack(pop) | ||
| 949 | #endif | ||
| 950 | |||
| 951 | #ifdef __MigPackStructs | ||
| 952 | #pragma pack(push, 4) | ||
| 953 | #endif | ||
| 954 | 	typedef struct { | ||
| 955 | 		mach_msg_header_t Head; | ||
| 956 | 		NDR_record_t NDR; | ||
| 957 | 		kern_return_t RetCode; | ||
| 958 | 	} __Reply__host_set_special_port_t __attribute__((unused)); | ||
| 959 | #ifdef __MigPackStructs | ||
| 960 | #pragma pack(pop) | ||
| 961 | #endif | ||
| 962 | |||
| 963 | #ifdef __MigPackStructs | ||
| 964 | #pragma pack(push, 4) | ||
| 965 | #endif | ||
| 966 | 	typedef struct { | ||
| 967 | 		mach_msg_header_t Head; | ||
| 968 | 		NDR_record_t NDR; | ||
| 969 | 		kern_return_t RetCode; | ||
| 970 | 	} __Reply__host_set_exception_ports_t __attribute__((unused)); | ||
| 971 | #ifdef __MigPackStructs | ||
| 972 | #pragma pack(pop) | ||
| 973 | #endif | ||
| 974 | |||
| 975 | #ifdef __MigPackStructs | ||
| 976 | #pragma pack(push, 4) | ||
| 977 | #endif | ||
| 978 | 	typedef struct { | ||
| 979 | 		mach_msg_header_t Head; | ||
| 980 | 		/* start of the kernel processed data */ | ||
| 981 | 		mach_msg_body_t msgh_body; | ||
| 982 | 		mach_msg_port_descriptor_t old_handlers[32]; | ||
| 983 | 		/* end of the kernel processed data */ | ||
| 984 | 		NDR_record_t NDR; | ||
| 985 | 		mach_msg_type_number_t masksCnt; | ||
| 986 | 		exception_mask_t masks[32]; | ||
| 987 | 		exception_behavior_t old_behaviors[32]; | ||
| 988 | 		thread_state_flavor_t old_flavors[32]; | ||
| 989 | 	} __Reply__host_get_exception_ports_t __attribute__((unused)); | ||
| 990 | #ifdef __MigPackStructs | ||
| 991 | #pragma pack(pop) | ||
| 992 | #endif | ||
| 993 | |||
| 994 | #ifdef __MigPackStructs | ||
| 995 | #pragma pack(push, 4) | ||
| 996 | #endif | ||
| 997 | 	typedef struct { | ||
| 998 | 		mach_msg_header_t Head; | ||
| 999 | 		/* start of the kernel processed data */ | ||
| 1000 | 		mach_msg_body_t msgh_body; | ||
| 1001 | 		mach_msg_port_descriptor_t old_handlerss[32]; | ||
| 1002 | 		/* end of the kernel processed data */ | ||
| 1003 | 		NDR_record_t NDR; | ||
| 1004 | 		mach_msg_type_number_t masksCnt; | ||
| 1005 | 		exception_mask_t masks[32]; | ||
| 1006 | 		exception_behavior_t old_behaviors[32]; | ||
| 1007 | 		thread_state_flavor_t old_flavors[32]; | ||
| 1008 | 	} __Reply__host_swap_exception_ports_t __attribute__((unused)); | ||
| 1009 | #ifdef __MigPackStructs | ||
| 1010 | #pragma pack(pop) | ||
| 1011 | #endif | ||
| 1012 | |||
| 1013 | #ifdef __MigPackStructs | ||
| 1014 | #pragma pack(push, 4) | ||
| 1015 | #endif | ||
| 1016 | 	typedef struct { | ||
| 1017 | 		mach_msg_header_t Head; | ||
| 1018 | 		NDR_record_t NDR; | ||
| 1019 | 		kern_return_t RetCode; | ||
| 1020 | 	} __Reply__mach_vm_wire_t __attribute__((unused)); | ||
| 1021 | #ifdef __MigPackStructs | ||
| 1022 | #pragma pack(pop) | ||
| 1023 | #endif | ||
| 1024 | |||
| 1025 | #ifdef __MigPackStructs | ||
| 1026 | #pragma pack(push, 4) | ||
| 1027 | #endif | ||
| 1028 | 	typedef struct { | ||
| 1029 | 		mach_msg_header_t Head; | ||
| 1030 | 		/* start of the kernel processed data */ | ||
| 1031 | 		mach_msg_body_t msgh_body; | ||
| 1032 | 		mach_msg_ool_ports_descriptor_t processor_sets; | ||
| 1033 | 		/* end of the kernel processed data */ | ||
| 1034 | 		NDR_record_t NDR; | ||
| 1035 | 		mach_msg_type_number_t processor_setsCnt; | ||
| 1036 | 	} __Reply__host_processor_sets_t __attribute__((unused)); | ||
| 1037 | #ifdef __MigPackStructs | ||
| 1038 | #pragma pack(pop) | ||
| 1039 | #endif | ||
| 1040 | |||
| 1041 | #ifdef __MigPackStructs | ||
| 1042 | #pragma pack(push, 4) | ||
| 1043 | #endif | ||
| 1044 | 	typedef struct { | ||
| 1045 | 		mach_msg_header_t Head; | ||
| 1046 | 		/* start of the kernel processed data */ | ||
| 1047 | 		mach_msg_body_t msgh_body; | ||
| 1048 | 		mach_msg_port_descriptor_t set; | ||
| 1049 | 		/* end of the kernel processed data */ | ||
| 1050 | 	} __Reply__host_processor_set_priv_t __attribute__((unused)); | ||
| 1051 | #ifdef __MigPackStructs | ||
| 1052 | #pragma pack(pop) | ||
| 1053 | #endif | ||
| 1054 | |||
| 1055 | #ifdef __MigPackStructs | ||
| 1056 | #pragma pack(push, 4) | ||
| 1057 | #endif | ||
| 1058 | 	typedef struct { | ||
| 1059 | 		mach_msg_header_t Head; | ||
| 1060 | 		NDR_record_t NDR; | ||
| 1061 | 		kern_return_t RetCode; | ||
| 1062 | 	} __Reply__host_set_UNDServer_t __attribute__((unused)); | ||
| 1063 | #ifdef __MigPackStructs | ||
| 1064 | #pragma pack(pop) | ||
| 1065 | #endif | ||
| 1066 | |||
| 1067 | #ifdef __MigPackStructs | ||
| 1068 | #pragma pack(push, 4) | ||
| 1069 | #endif | ||
| 1070 | 	typedef struct { | ||
| 1071 | 		mach_msg_header_t Head; | ||
| 1072 | 		/* start of the kernel processed data */ | ||
| 1073 | 		mach_msg_body_t msgh_body; | ||
| 1074 | 		mach_msg_port_descriptor_t server; | ||
| 1075 | 		/* end of the kernel processed data */ | ||
| 1076 | 	} __Reply__host_get_UNDServer_t __attribute__((unused)); | ||
| 1077 | #ifdef __MigPackStructs | ||
| 1078 | #pragma pack(pop) | ||
| 1079 | #endif | ||
| 1080 | |||
| 1081 | #ifdef __MigPackStructs | ||
| 1082 | #pragma pack(push, 4) | ||
| 1083 | #endif | ||
| 1084 | 	typedef struct { | ||
| 1085 | 		mach_msg_header_t Head; | ||
| 1086 | 		/* start of the kernel processed data */ | ||
| 1087 | 		mach_msg_body_t msgh_body; | ||
| 1088 | 		mach_msg_ool_descriptor_t response_data; | ||
| 1089 | 		mach_msg_ool_descriptor_t log_data; | ||
| 1090 | 		/* end of the kernel processed data */ | ||
| 1091 | 		NDR_record_t NDR; | ||
| 1092 | 		mach_msg_type_number_t response_dataCnt; | ||
| 1093 | 		mach_msg_type_number_t log_dataCnt; | ||
| 1094 | 		kern_return_t op_result; | ||
| 1095 | 	} __Reply__kext_request_t __attribute__((unused)); | ||
| 1096 | #ifdef __MigPackStructs | ||
| 1097 | #pragma pack(pop) | ||
| 1098 | #endif | ||
| 1099 | #endif /* !__Reply__host_priv_subsystem__defined */ | ||
| 1100 | |||
| 1101 | /* union of all replies */ | ||
| 1102 | |||
| 1103 | #ifndef __ReplyUnion__host_priv_subsystem__defined | ||
| 1104 | #define __ReplyUnion__host_priv_subsystem__defined | ||
| 1105 | union __ReplyUnion__host_priv_subsystem { | ||
| 1106 | 	__Reply__host_get_boot_info_t Reply_host_get_boot_info; | ||
| 1107 | 	__Reply__host_reboot_t Reply_host_reboot; | ||
| 1108 | 	__Reply__host_priv_statistics_t Reply_host_priv_statistics; | ||
| 1109 | 	__Reply__host_default_memory_manager_t Reply_host_default_memory_manager; | ||
| 1110 | 	__Reply__vm_wire_t Reply_vm_wire; | ||
| 1111 | 	__Reply__thread_wire_t Reply_thread_wire; | ||
| 1112 | 	__Reply__vm_allocate_cpm_t Reply_vm_allocate_cpm; | ||
| 1113 | 	__Reply__host_processors_t Reply_host_processors; | ||
| 1114 | 	__Reply__host_get_clock_control_t Reply_host_get_clock_control; | ||
| 1115 | 	__Reply__kmod_create_t Reply_kmod_create; | ||
| 1116 | 	__Reply__kmod_destroy_t Reply_kmod_destroy; | ||
| 1117 | 	__Reply__kmod_control_t Reply_kmod_control; | ||
| 1118 | 	__Reply__host_get_special_port_t Reply_host_get_special_port; | ||
| 1119 | 	__Reply__host_set_special_port_t Reply_host_set_special_port; | ||
| 1120 | 	__Reply__host_set_exception_ports_t Reply_host_set_exception_ports; | ||
| 1121 | 	__Reply__host_get_exception_ports_t Reply_host_get_exception_ports; | ||
| 1122 | 	__Reply__host_swap_exception_ports_t Reply_host_swap_exception_ports; | ||
| 1123 | 	__Reply__mach_vm_wire_t Reply_mach_vm_wire; | ||
| 1124 | 	__Reply__host_processor_sets_t Reply_host_processor_sets; | ||
| 1125 | 	__Reply__host_processor_set_priv_t Reply_host_processor_set_priv; | ||
| 1126 | 	__Reply__host_set_UNDServer_t Reply_host_set_UNDServer; | ||
| 1127 | 	__Reply__host_get_UNDServer_t Reply_host_get_UNDServer; | ||
| 1128 | 	__Reply__kext_request_t Reply_kext_request; | ||
| 1129 | }; | ||
| 1130 | #endif /* !__RequestUnion__host_priv_subsystem__defined */ | ||
| 1131 | |||
| 1132 | #ifndef subsystem_to_name_map_host_priv | ||
| 1133 | #define subsystem_to_name_map_host_priv \ | ||
| 1134 | { "host_get_boot_info", 400 },\ | ||
| 1135 | { "host_reboot", 401 },\ | ||
| 1136 | { "host_priv_statistics", 402 },\ | ||
| 1137 | { "host_default_memory_manager", 403 },\ | ||
| 1138 | { "vm_wire", 404 },\ | ||
| 1139 | { "thread_wire", 405 },\ | ||
| 1140 | { "vm_allocate_cpm", 406 },\ | ||
| 1141 | { "host_processors", 407 },\ | ||
| 1142 | { "host_get_clock_control", 408 },\ | ||
| 1143 | { "kmod_create", 409 },\ | ||
| 1144 | { "kmod_destroy", 410 },\ | ||
| 1145 | { "kmod_control", 411 },\ | ||
| 1146 | { "host_get_special_port", 412 },\ | ||
| 1147 | { "host_set_special_port", 413 },\ | ||
| 1148 | { "host_set_exception_ports", 414 },\ | ||
| 1149 | { "host_get_exception_ports", 415 },\ | ||
| 1150 | { "host_swap_exception_ports", 416 },\ | ||
| 1151 | { "mach_vm_wire", 418 },\ | ||
| 1152 | { "host_processor_sets", 419 },\ | ||
| 1153 | { "host_processor_set_priv", 420 },\ | ||
| 1154 | { "host_set_UNDServer", 423 },\ | ||
| 1155 | { "host_get_UNDServer", 424 },\ | ||
| 1156 | { "kext_request", 425 } | ||
| 1157 | #endif | ||
| 1158 | |||
| 1159 | #ifdef __AfterMigUserHeader | ||
| 1160 | __AfterMigUserHeader | ||
| 1161 | #endif /* __AfterMigUserHeader */ | ||
| 1162 | |||
| 1163 | #endif	 /* _host_priv_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/host_security.h created+221| ... | @@ -0,0 +1,221 @@ | ||
| 1 | #ifndef	_host_security_user_ | ||
| 2 | #define	_host_security_user_ | ||
| 3 | |||
| 4 | /* Module host_security */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	host_security_MSG_COUNT | ||
| 52 | #define	host_security_MSG_COUNT	2 | ||
| 53 | #endif	/* host_security_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | |||
| 60 | #ifdef __BeforeMigUserHeader | ||
| 61 | __BeforeMigUserHeader | ||
| 62 | #endif /* __BeforeMigUserHeader */ | ||
| 63 | |||
| 64 | #include <sys/cdefs.h> | ||
| 65 | __BEGIN_DECLS | ||
| 66 | |||
| 67 | |||
| 68 | /* Routine host_security_create_task_token */ | ||
| 69 | #ifdef	mig_external | ||
| 70 | mig_external | ||
| 71 | #else | ||
| 72 | extern | ||
| 73 | #endif	/* mig_external */ | ||
| 74 | kern_return_t host_security_create_task_token | ||
| 75 | ( | ||
| 76 | 	host_security_t host_security, | ||
| 77 | 	task_t parent_task, | ||
| 78 | 	security_token_t sec_token, | ||
| 79 | 	audit_token_t audit_token, | ||
| 80 | 	host_t host, | ||
| 81 | 	ledger_array_t ledgers, | ||
| 82 | 	mach_msg_type_number_t ledgersCnt, | ||
| 83 | 	boolean_t inherit_memory, | ||
| 84 | 	task_t *child_task | ||
| 85 | ); | ||
| 86 | |||
| 87 | /* Routine host_security_set_task_token */ | ||
| 88 | #ifdef	mig_external | ||
| 89 | mig_external | ||
| 90 | #else | ||
| 91 | extern | ||
| 92 | #endif	/* mig_external */ | ||
| 93 | kern_return_t host_security_set_task_token | ||
| 94 | ( | ||
| 95 | 	host_security_t host_security, | ||
| 96 | 	task_t target_task, | ||
| 97 | 	security_token_t sec_token, | ||
| 98 | 	audit_token_t audit_token, | ||
| 99 | 	host_t host | ||
| 100 | ); | ||
| 101 | |||
| 102 | __END_DECLS | ||
| 103 | |||
| 104 | /********************** Caution **************************/ | ||
| 105 | /* The following data types should be used to calculate */ | ||
| 106 | /* maximum message sizes only. The actual message may be */ | ||
| 107 | /* smaller, and the position of the arguments within the */ | ||
| 108 | /* message layout may vary from what is presented here. */ | ||
| 109 | /* For example, if any of the arguments are variable- */ | ||
| 110 | /* sized, and less than the maximum is sent, the data */ | ||
| 111 | /* will be packed tight in the actual message to reduce */ | ||
| 112 | /* the presence of holes. */ | ||
| 113 | /********************** Caution **************************/ | ||
| 114 | |||
| 115 | /* typedefs for all requests */ | ||
| 116 | |||
| 117 | #ifndef __Request__host_security_subsystem__defined | ||
| 118 | #define __Request__host_security_subsystem__defined | ||
| 119 | |||
| 120 | #ifdef __MigPackStructs | ||
| 121 | #pragma pack(push, 4) | ||
| 122 | #endif | ||
| 123 | 	typedef struct { | ||
| 124 | 		mach_msg_header_t Head; | ||
| 125 | 		/* start of the kernel processed data */ | ||
| 126 | 		mach_msg_body_t msgh_body; | ||
| 127 | 		mach_msg_port_descriptor_t parent_task; | ||
| 128 | 		mach_msg_port_descriptor_t host; | ||
| 129 | 		mach_msg_ool_ports_descriptor_t ledgers; | ||
| 130 | 		/* end of the kernel processed data */ | ||
| 131 | 		NDR_record_t NDR; | ||
| 132 | 		security_token_t sec_token; | ||
| 133 | 		audit_token_t audit_token; | ||
| 134 | 		mach_msg_type_number_t ledgersCnt; | ||
| 135 | 		boolean_t inherit_memory; | ||
| 136 | 	} __Request__host_security_create_task_token_t __attribute__((unused)); | ||
| 137 | #ifdef __MigPackStructs | ||
| 138 | #pragma pack(pop) | ||
| 139 | #endif | ||
| 140 | |||
| 141 | #ifdef __MigPackStructs | ||
| 142 | #pragma pack(push, 4) | ||
| 143 | #endif | ||
| 144 | 	typedef struct { | ||
| 145 | 		mach_msg_header_t Head; | ||
| 146 | 		/* start of the kernel processed data */ | ||
| 147 | 		mach_msg_body_t msgh_body; | ||
| 148 | 		mach_msg_port_descriptor_t target_task; | ||
| 149 | 		mach_msg_port_descriptor_t host; | ||
| 150 | 		/* end of the kernel processed data */ | ||
| 151 | 		NDR_record_t NDR; | ||
| 152 | 		security_token_t sec_token; | ||
| 153 | 		audit_token_t audit_token; | ||
| 154 | 	} __Request__host_security_set_task_token_t __attribute__((unused)); | ||
| 155 | #ifdef __MigPackStructs | ||
| 156 | #pragma pack(pop) | ||
| 157 | #endif | ||
| 158 | #endif /* !__Request__host_security_subsystem__defined */ | ||
| 159 | |||
| 160 | /* union of all requests */ | ||
| 161 | |||
| 162 | #ifndef __RequestUnion__host_security_subsystem__defined | ||
| 163 | #define __RequestUnion__host_security_subsystem__defined | ||
| 164 | union __RequestUnion__host_security_subsystem { | ||
| 165 | 	__Request__host_security_create_task_token_t Request_host_security_create_task_token; | ||
| 166 | 	__Request__host_security_set_task_token_t Request_host_security_set_task_token; | ||
| 167 | }; | ||
| 168 | #endif /* !__RequestUnion__host_security_subsystem__defined */ | ||
| 169 | /* typedefs for all replies */ | ||
| 170 | |||
| 171 | #ifndef __Reply__host_security_subsystem__defined | ||
| 172 | #define __Reply__host_security_subsystem__defined | ||
| 173 | |||
| 174 | #ifdef __MigPackStructs | ||
| 175 | #pragma pack(push, 4) | ||
| 176 | #endif | ||
| 177 | 	typedef struct { | ||
| 178 | 		mach_msg_header_t Head; | ||
| 179 | 		/* start of the kernel processed data */ | ||
| 180 | 		mach_msg_body_t msgh_body; | ||
| 181 | 		mach_msg_port_descriptor_t child_task; | ||
| 182 | 		/* end of the kernel processed data */ | ||
| 183 | 	} __Reply__host_security_create_task_token_t __attribute__((unused)); | ||
| 184 | #ifdef __MigPackStructs | ||
| 185 | #pragma pack(pop) | ||
| 186 | #endif | ||
| 187 | |||
| 188 | #ifdef __MigPackStructs | ||
| 189 | #pragma pack(push, 4) | ||
| 190 | #endif | ||
| 191 | 	typedef struct { | ||
| 192 | 		mach_msg_header_t Head; | ||
| 193 | 		NDR_record_t NDR; | ||
| 194 | 		kern_return_t RetCode; | ||
| 195 | 	} __Reply__host_security_set_task_token_t __attribute__((unused)); | ||
| 196 | #ifdef __MigPackStructs | ||
| 197 | #pragma pack(pop) | ||
| 198 | #endif | ||
| 199 | #endif /* !__Reply__host_security_subsystem__defined */ | ||
| 200 | |||
| 201 | /* union of all replies */ | ||
| 202 | |||
| 203 | #ifndef __ReplyUnion__host_security_subsystem__defined | ||
| 204 | #define __ReplyUnion__host_security_subsystem__defined | ||
| 205 | union __ReplyUnion__host_security_subsystem { | ||
| 206 | 	__Reply__host_security_create_task_token_t Reply_host_security_create_task_token; | ||
| 207 | 	__Reply__host_security_set_task_token_t Reply_host_security_set_task_token; | ||
| 208 | }; | ||
| 209 | #endif /* !__RequestUnion__host_security_subsystem__defined */ | ||
| 210 | |||
| 211 | #ifndef subsystem_to_name_map_host_security | ||
| 212 | #define subsystem_to_name_map_host_security \ | ||
| 213 | { "host_security_create_task_token", 600 },\ | ||
| 214 | { "host_security_set_task_token", 601 } | ||
| 215 | #endif | ||
| 216 | |||
| 217 | #ifdef __AfterMigUserHeader | ||
| 218 | __AfterMigUserHeader | ||
| 219 | #endif /* __AfterMigUserHeader */ | ||
| 220 | |||
| 221 | #endif	 /* _host_security_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/lock_set.h created+350| ... | @@ -0,0 +1,350 @@ | ||
| 1 | #ifndef	_lock_set_user_ | ||
| 2 | #define	_lock_set_user_ | ||
| 3 | |||
| 4 | /* Module lock_set */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	lock_set_MSG_COUNT | ||
| 52 | #define	lock_set_MSG_COUNT	6 | ||
| 53 | #endif	/* lock_set_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | |||
| 60 | #ifdef __BeforeMigUserHeader | ||
| 61 | __BeforeMigUserHeader | ||
| 62 | #endif /* __BeforeMigUserHeader */ | ||
| 63 | |||
| 64 | #include <sys/cdefs.h> | ||
| 65 | __BEGIN_DECLS | ||
| 66 | |||
| 67 | |||
| 68 | /* Routine lock_acquire */ | ||
| 69 | #ifdef	mig_external | ||
| 70 | mig_external | ||
| 71 | #else | ||
| 72 | extern | ||
| 73 | #endif	/* mig_external */ | ||
| 74 | kern_return_t lock_acquire | ||
| 75 | ( | ||
| 76 | 	lock_set_t lock_set, | ||
| 77 | 	int lock_id | ||
| 78 | ); | ||
| 79 | |||
| 80 | /* Routine lock_release */ | ||
| 81 | #ifdef	mig_external | ||
| 82 | mig_external | ||
| 83 | #else | ||
| 84 | extern | ||
| 85 | #endif	/* mig_external */ | ||
| 86 | kern_return_t lock_release | ||
| 87 | ( | ||
| 88 | 	lock_set_t lock_set, | ||
| 89 | 	int lock_id | ||
| 90 | ); | ||
| 91 | |||
| 92 | /* Routine lock_try */ | ||
| 93 | #ifdef	mig_external | ||
| 94 | mig_external | ||
| 95 | #else | ||
| 96 | extern | ||
| 97 | #endif	/* mig_external */ | ||
| 98 | kern_return_t lock_try | ||
| 99 | ( | ||
| 100 | 	lock_set_t lock_set, | ||
| 101 | 	int lock_id | ||
| 102 | ); | ||
| 103 | |||
| 104 | /* Routine lock_make_stable */ | ||
| 105 | #ifdef	mig_external | ||
| 106 | mig_external | ||
| 107 | #else | ||
| 108 | extern | ||
| 109 | #endif	/* mig_external */ | ||
| 110 | kern_return_t lock_make_stable | ||
| 111 | ( | ||
| 112 | 	lock_set_t lock_set, | ||
| 113 | 	int lock_id | ||
| 114 | ); | ||
| 115 | |||
| 116 | /* Routine lock_handoff */ | ||
| 117 | #ifdef	mig_external | ||
| 118 | mig_external | ||
| 119 | #else | ||
| 120 | extern | ||
| 121 | #endif	/* mig_external */ | ||
| 122 | kern_return_t lock_handoff | ||
| 123 | ( | ||
| 124 | 	lock_set_t lock_set, | ||
| 125 | 	int lock_id | ||
| 126 | ); | ||
| 127 | |||
| 128 | /* Routine lock_handoff_accept */ | ||
| 129 | #ifdef	mig_external | ||
| 130 | mig_external | ||
| 131 | #else | ||
| 132 | extern | ||
| 133 | #endif	/* mig_external */ | ||
| 134 | kern_return_t lock_handoff_accept | ||
| 135 | ( | ||
| 136 | 	lock_set_t lock_set, | ||
| 137 | 	int lock_id | ||
| 138 | ); | ||
| 139 | |||
| 140 | __END_DECLS | ||
| 141 | |||
| 142 | /********************** Caution **************************/ | ||
| 143 | /* The following data types should be used to calculate */ | ||
| 144 | /* maximum message sizes only. The actual message may be */ | ||
| 145 | /* smaller, and the position of the arguments within the */ | ||
| 146 | /* message layout may vary from what is presented here. */ | ||
| 147 | /* For example, if any of the arguments are variable- */ | ||
| 148 | /* sized, and less than the maximum is sent, the data */ | ||
| 149 | /* will be packed tight in the actual message to reduce */ | ||
| 150 | /* the presence of holes. */ | ||
| 151 | /********************** Caution **************************/ | ||
| 152 | |||
| 153 | /* typedefs for all requests */ | ||
| 154 | |||
| 155 | #ifndef __Request__lock_set_subsystem__defined | ||
| 156 | #define __Request__lock_set_subsystem__defined | ||
| 157 | |||
| 158 | #ifdef __MigPackStructs | ||
| 159 | #pragma pack(push, 4) | ||
| 160 | #endif | ||
| 161 | 	typedef struct { | ||
| 162 | 		mach_msg_header_t Head; | ||
| 163 | 		NDR_record_t NDR; | ||
| 164 | 		int lock_id; | ||
| 165 | 	} __Request__lock_acquire_t __attribute__((unused)); | ||
| 166 | #ifdef __MigPackStructs | ||
| 167 | #pragma pack(pop) | ||
| 168 | #endif | ||
| 169 | |||
| 170 | #ifdef __MigPackStructs | ||
| 171 | #pragma pack(push, 4) | ||
| 172 | #endif | ||
| 173 | 	typedef struct { | ||
| 174 | 		mach_msg_header_t Head; | ||
| 175 | 		NDR_record_t NDR; | ||
| 176 | 		int lock_id; | ||
| 177 | 	} __Request__lock_release_t __attribute__((unused)); | ||
| 178 | #ifdef __MigPackStructs | ||
| 179 | #pragma pack(pop) | ||
| 180 | #endif | ||
| 181 | |||
| 182 | #ifdef __MigPackStructs | ||
| 183 | #pragma pack(push, 4) | ||
| 184 | #endif | ||
| 185 | 	typedef struct { | ||
| 186 | 		mach_msg_header_t Head; | ||
| 187 | 		NDR_record_t NDR; | ||
| 188 | 		int lock_id; | ||
| 189 | 	} __Request__lock_try_t __attribute__((unused)); | ||
| 190 | #ifdef __MigPackStructs | ||
| 191 | #pragma pack(pop) | ||
| 192 | #endif | ||
| 193 | |||
| 194 | #ifdef __MigPackStructs | ||
| 195 | #pragma pack(push, 4) | ||
| 196 | #endif | ||
| 197 | 	typedef struct { | ||
| 198 | 		mach_msg_header_t Head; | ||
| 199 | 		NDR_record_t NDR; | ||
| 200 | 		int lock_id; | ||
| 201 | 	} __Request__lock_make_stable_t __attribute__((unused)); | ||
| 202 | #ifdef __MigPackStructs | ||
| 203 | #pragma pack(pop) | ||
| 204 | #endif | ||
| 205 | |||
| 206 | #ifdef __MigPackStructs | ||
| 207 | #pragma pack(push, 4) | ||
| 208 | #endif | ||
| 209 | 	typedef struct { | ||
| 210 | 		mach_msg_header_t Head; | ||
| 211 | 		NDR_record_t NDR; | ||
| 212 | 		int lock_id; | ||
| 213 | 	} __Request__lock_handoff_t __attribute__((unused)); | ||
| 214 | #ifdef __MigPackStructs | ||
| 215 | #pragma pack(pop) | ||
| 216 | #endif | ||
| 217 | |||
| 218 | #ifdef __MigPackStructs | ||
| 219 | #pragma pack(push, 4) | ||
| 220 | #endif | ||
| 221 | 	typedef struct { | ||
| 222 | 		mach_msg_header_t Head; | ||
| 223 | 		NDR_record_t NDR; | ||
| 224 | 		int lock_id; | ||
| 225 | 	} __Request__lock_handoff_accept_t __attribute__((unused)); | ||
| 226 | #ifdef __MigPackStructs | ||
| 227 | #pragma pack(pop) | ||
| 228 | #endif | ||
| 229 | #endif /* !__Request__lock_set_subsystem__defined */ | ||
| 230 | |||
| 231 | /* union of all requests */ | ||
| 232 | |||
| 233 | #ifndef __RequestUnion__lock_set_subsystem__defined | ||
| 234 | #define __RequestUnion__lock_set_subsystem__defined | ||
| 235 | union __RequestUnion__lock_set_subsystem { | ||
| 236 | 	__Request__lock_acquire_t Request_lock_acquire; | ||
| 237 | 	__Request__lock_release_t Request_lock_release; | ||
| 238 | 	__Request__lock_try_t Request_lock_try; | ||
| 239 | 	__Request__lock_make_stable_t Request_lock_make_stable; | ||
| 240 | 	__Request__lock_handoff_t Request_lock_handoff; | ||
| 241 | 	__Request__lock_handoff_accept_t Request_lock_handoff_accept; | ||
| 242 | }; | ||
| 243 | #endif /* !__RequestUnion__lock_set_subsystem__defined */ | ||
| 244 | /* typedefs for all replies */ | ||
| 245 | |||
| 246 | #ifndef __Reply__lock_set_subsystem__defined | ||
| 247 | #define __Reply__lock_set_subsystem__defined | ||
| 248 | |||
| 249 | #ifdef __MigPackStructs | ||
| 250 | #pragma pack(push, 4) | ||
| 251 | #endif | ||
| 252 | 	typedef struct { | ||
| 253 | 		mach_msg_header_t Head; | ||
| 254 | 		NDR_record_t NDR; | ||
| 255 | 		kern_return_t RetCode; | ||
| 256 | 	} __Reply__lock_acquire_t __attribute__((unused)); | ||
| 257 | #ifdef __MigPackStructs | ||
| 258 | #pragma pack(pop) | ||
| 259 | #endif | ||
| 260 | |||
| 261 | #ifdef __MigPackStructs | ||
| 262 | #pragma pack(push, 4) | ||
| 263 | #endif | ||
| 264 | 	typedef struct { | ||
| 265 | 		mach_msg_header_t Head; | ||
| 266 | 		NDR_record_t NDR; | ||
| 267 | 		kern_return_t RetCode; | ||
| 268 | 	} __Reply__lock_release_t __attribute__((unused)); | ||
| 269 | #ifdef __MigPackStructs | ||
| 270 | #pragma pack(pop) | ||
| 271 | #endif | ||
| 272 | |||
| 273 | #ifdef __MigPackStructs | ||
| 274 | #pragma pack(push, 4) | ||
| 275 | #endif | ||
| 276 | 	typedef struct { | ||
| 277 | 		mach_msg_header_t Head; | ||
| 278 | 		NDR_record_t NDR; | ||
| 279 | 		kern_return_t RetCode; | ||
| 280 | 	} __Reply__lock_try_t __attribute__((unused)); | ||
| 281 | #ifdef __MigPackStructs | ||
| 282 | #pragma pack(pop) | ||
| 283 | #endif | ||
| 284 | |||
| 285 | #ifdef __MigPackStructs | ||
| 286 | #pragma pack(push, 4) | ||
| 287 | #endif | ||
| 288 | 	typedef struct { | ||
| 289 | 		mach_msg_header_t Head; | ||
| 290 | 		NDR_record_t NDR; | ||
| 291 | 		kern_return_t RetCode; | ||
| 292 | 	} __Reply__lock_make_stable_t __attribute__((unused)); | ||
| 293 | #ifdef __MigPackStructs | ||
| 294 | #pragma pack(pop) | ||
| 295 | #endif | ||
| 296 | |||
| 297 | #ifdef __MigPackStructs | ||
| 298 | #pragma pack(push, 4) | ||
| 299 | #endif | ||
| 300 | 	typedef struct { | ||
| 301 | 		mach_msg_header_t Head; | ||
| 302 | 		NDR_record_t NDR; | ||
| 303 | 		kern_return_t RetCode; | ||
| 304 | 	} __Reply__lock_handoff_t __attribute__((unused)); | ||
| 305 | #ifdef __MigPackStructs | ||
| 306 | #pragma pack(pop) | ||
| 307 | #endif | ||
| 308 | |||
| 309 | #ifdef __MigPackStructs | ||
| 310 | #pragma pack(push, 4) | ||
| 311 | #endif | ||
| 312 | 	typedef struct { | ||
| 313 | 		mach_msg_header_t Head; | ||
| 314 | 		NDR_record_t NDR; | ||
| 315 | 		kern_return_t RetCode; | ||
| 316 | 	} __Reply__lock_handoff_accept_t __attribute__((unused)); | ||
| 317 | #ifdef __MigPackStructs | ||
| 318 | #pragma pack(pop) | ||
| 319 | #endif | ||
| 320 | #endif /* !__Reply__lock_set_subsystem__defined */ | ||
| 321 | |||
| 322 | /* union of all replies */ | ||
| 323 | |||
| 324 | #ifndef __ReplyUnion__lock_set_subsystem__defined | ||
| 325 | #define __ReplyUnion__lock_set_subsystem__defined | ||
| 326 | union __ReplyUnion__lock_set_subsystem { | ||
| 327 | 	__Reply__lock_acquire_t Reply_lock_acquire; | ||
| 328 | 	__Reply__lock_release_t Reply_lock_release; | ||
| 329 | 	__Reply__lock_try_t Reply_lock_try; | ||
| 330 | 	__Reply__lock_make_stable_t Reply_lock_make_stable; | ||
| 331 | 	__Reply__lock_handoff_t Reply_lock_handoff; | ||
| 332 | 	__Reply__lock_handoff_accept_t Reply_lock_handoff_accept; | ||
| 333 | }; | ||
| 334 | #endif /* !__RequestUnion__lock_set_subsystem__defined */ | ||
| 335 | |||
| 336 | #ifndef subsystem_to_name_map_lock_set | ||
| 337 | #define subsystem_to_name_map_lock_set \ | ||
| 338 | { "lock_acquire", 617000 },\ | ||
| 339 | { "lock_release", 617001 },\ | ||
| 340 | { "lock_try", 617002 },\ | ||
| 341 | { "lock_make_stable", 617003 },\ | ||
| 342 | { "lock_handoff", 617004 },\ | ||
| 343 | { "lock_handoff_accept", 617005 } | ||
| 344 | #endif | ||
| 345 | |||
| 346 | #ifdef __AfterMigUserHeader | ||
| 347 | __AfterMigUserHeader | ||
| 348 | #endif /* __AfterMigUserHeader */ | ||
| 349 | |||
| 350 | #endif	 /* _lock_set_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/mach.h created+245| ... | @@ -0,0 +1,245 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2014 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * Mach Operating System | ||
| 30 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | ||
| 31 | * All Rights Reserved. | ||
| 32 | * | ||
| 33 | * Permission to use, copy, modify and distribute this software and its | ||
| 34 | * documentation is hereby granted, provided that both the copyright | ||
| 35 | * notice and this permission notice appear in all copies of the | ||
| 36 | * software, derivative works or modified versions, and any portions | ||
| 37 | * thereof, and that both notices appear in supporting documentation. | ||
| 38 | * | ||
| 39 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 40 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 41 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 42 | * | ||
| 43 | * Carnegie Mellon requests users of this software to return to | ||
| 44 | * | ||
| 45 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 46 | * School of Computer Science | ||
| 47 | * Carnegie Mellon University | ||
| 48 | * Pittsburgh PA 15213-3890 | ||
| 49 | * | ||
| 50 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 51 | * the rights to redistribute these changes. | ||
| 52 | */ | ||
| 53 | |||
| 54 | /* | ||
| 55 | * Includes all the types that a normal user | ||
| 56 | * of Mach programs should need | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef _MACH_H_ | ||
| 60 | #define _MACH_H_ | ||
| 61 | |||
| 62 | #define __MACH30__ | ||
| 63 | #define MACH_IPC_FLAVOR UNTYPED | ||
| 64 | |||
| 65 | #include <mach/std_types.h> | ||
| 66 | #include <mach/mach_types.h> | ||
| 67 | #include <mach/mach_interface.h> | ||
| 68 | #include <mach/mach_port.h> | ||
| 69 | #include <mach/mach_init.h> | ||
| 70 | #include <mach/mach_host.h> | ||
| 71 | #include <mach/thread_switch.h> | ||
| 72 | |||
| 73 | #include <mach/rpc.h> /* for compatibility only */ | ||
| 74 | #include <mach/mig.h> | ||
| 75 | |||
| 76 | #include <mach/mig_errors.h> | ||
| 77 | #include <mach/mach_error.h> | ||
| 78 | |||
| 79 | #include <sys/cdefs.h> | ||
| 80 | |||
| 81 | __BEGIN_DECLS | ||
| 82 | /* | ||
| 83 | * Standard prototypes | ||
| 84 | */ | ||
| 85 | extern void panic_init(mach_port_t); | ||
| 86 | extern void panic(const char *, ...); | ||
| 87 | |||
| 88 | extern void safe_gets(char *, | ||
| 89 | char *, | ||
| 90 | int); | ||
| 91 | |||
| 92 | extern void slot_name(cpu_type_t, | ||
| 93 | cpu_subtype_t, | ||
| 94 | char **, | ||
| 95 | char **); | ||
| 96 | |||
| 97 | extern void mig_reply_setup(mach_msg_header_t *, | ||
| 98 | mach_msg_header_t *); | ||
| 99 | |||
| 100 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 101 | extern void mach_msg_destroy(mach_msg_header_t *); | ||
| 102 | |||
| 103 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 104 | extern mach_msg_return_t mach_msg_receive(mach_msg_header_t *); | ||
| 105 | |||
| 106 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 107 | extern mach_msg_return_t mach_msg_send(mach_msg_header_t *); | ||
| 108 | |||
| 109 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 110 | extern mach_msg_return_t mach_msg_server_once(boolean_t (*) | ||
| 111 | (mach_msg_header_t *, | ||
| 112 | mach_msg_header_t *), | ||
| 113 | mach_msg_size_t, | ||
| 114 | mach_port_t, | ||
| 115 | mach_msg_options_t); | ||
| 116 | |||
| 117 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 118 | extern mach_msg_return_t mach_msg_server(boolean_t (*) | ||
| 119 | (mach_msg_header_t *, | ||
| 120 | mach_msg_header_t *), | ||
| 121 | mach_msg_size_t, | ||
| 122 | mach_port_t, | ||
| 123 | mach_msg_options_t); | ||
| 124 | |||
| 125 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 126 | extern mach_msg_return_t mach_msg_server_importance(boolean_t (*) | ||
| 127 | (mach_msg_header_t *, | ||
| 128 | mach_msg_header_t *), | ||
| 129 | mach_msg_size_t, | ||
| 130 | mach_port_t, | ||
| 131 | mach_msg_options_t); | ||
| 132 | |||
| 133 | /* | ||
| 134 | * Prototypes for compatibility | ||
| 135 | */ | ||
| 136 | extern kern_return_t clock_get_res(mach_port_t, | ||
| 137 | clock_res_t *); | ||
| 138 | extern kern_return_t clock_set_res(mach_port_t, | ||
| 139 | clock_res_t); | ||
| 140 | |||
| 141 | extern kern_return_t clock_sleep(mach_port_t, | ||
| 142 | int, | ||
| 143 | mach_timespec_t, | ||
| 144 | mach_timespec_t *); | ||
| 145 | |||
| 146 | /*! | ||
| 147 | * @group voucher_mach_msg Prototypes | ||
| 148 | */ | ||
| 149 | |||
| 150 | #define VOUCHER_MACH_MSG_API_VERSION 20140205 | ||
| 151 | |||
| 152 | /*! | ||
| 153 | * @typedef voucher_mach_msg_state_t | ||
| 154 | * | ||
| 155 | * @abstract | ||
| 156 | * Opaque object encapsulating state changed by voucher_mach_msg_adopt(). | ||
| 157 | */ | ||
| 158 | typedef struct voucher_mach_msg_state_s *voucher_mach_msg_state_t; | ||
| 159 | |||
| 160 | /*! | ||
| 161 | * @const VOUCHER_MACH_MSG_STATE_UNCHANGED | ||
| 162 | * | ||
| 163 | * @discussion | ||
| 164 | * Constant indicating no state change occurred. | ||
| 165 | */ | ||
| 166 | #define VOUCHER_MACH_MSG_STATE_UNCHANGED ((voucher_mach_msg_state_t)~0ul) | ||
| 167 | |||
| 168 | /*! | ||
| 169 | * @function voucher_mach_msg_set | ||
| 170 | * | ||
| 171 | * @abstract | ||
| 172 | * Change specified message header to contain current mach voucher with a | ||
| 173 | * COPY_SEND disposition. | ||
| 174 | * Does not change message if it already has non-zero MACH_MSGH_BITS_VOUCHER. | ||
| 175 | * | ||
| 176 | * @discussion | ||
| 177 | * Borrows reference to current thread voucher so message should be sent | ||
| 178 | * immediately (without intervening calls that might change that voucher). | ||
| 179 | * | ||
| 180 | * @param msg | ||
| 181 | * The message to modify. | ||
| 182 | * | ||
| 183 | * @result | ||
| 184 | * True if header was changed. | ||
| 185 | */ | ||
| 186 | extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg); | ||
| 187 | |||
| 188 | /*! | ||
| 189 | * @function voucher_mach_msg_clear | ||
| 190 | * | ||
| 191 | * @abstract | ||
| 192 | * Removes changes made to specified message header by voucher_mach_msg_set() | ||
| 193 | * and any mach_msg() send operations (successful or not). | ||
| 194 | * If the message is not needed further, mach_msg_destroy() should be called | ||
| 195 | * instead. | ||
| 196 | * | ||
| 197 | * @discussion | ||
| 198 | * Not intended to be called if voucher_mach_msg_set() returned false. | ||
| 199 | * Releases reference to message mach voucher if an extra reference was | ||
| 200 | * acquired due to an unsuccessful send operation (pseudo-receive). | ||
| 201 | * | ||
| 202 | * @param msg | ||
| 203 | * The message to modify. | ||
| 204 | */ | ||
| 205 | extern void voucher_mach_msg_clear(mach_msg_header_t *msg); | ||
| 206 | |||
| 207 | /*! | ||
| 208 | * @function voucher_mach_msg_adopt | ||
| 209 | * | ||
| 210 | * @abstract | ||
| 211 | * Adopt the voucher contained in the specified message on the current thread | ||
| 212 | * and return the previous thread voucher state. | ||
| 213 | * | ||
| 214 | * @discussion | ||
| 215 | * Ownership of the mach voucher in the message is transferred to the current | ||
| 216 | * thread and the message header voucher fields are cleared. | ||
| 217 | * | ||
| 218 | * @param msg | ||
| 219 | * The message to query and modify. | ||
| 220 | * | ||
| 221 | * @result | ||
| 222 | * The previous thread voucher state or VOUCHER_MACH_MSG_STATE_UNCHANGED if no | ||
| 223 | * state change occurred. | ||
| 224 | */ | ||
| 225 | extern voucher_mach_msg_state_t voucher_mach_msg_adopt(mach_msg_header_t *msg); | ||
| 226 | |||
| 227 | /*! | ||
| 228 | * @function voucher_mach_msg_revert | ||
| 229 | * | ||
| 230 | * @abstract | ||
| 231 | * Restore thread voucher state previously modified by voucher_mach_msg_adopt(). | ||
| 232 | * | ||
| 233 | * @discussion | ||
| 234 | * Current thread voucher reference is released. | ||
| 235 | * No change to thread voucher state if passed VOUCHER_MACH_MSG_STATE_UNCHANGED. | ||
| 236 | * | ||
| 237 | * @param state | ||
| 238 | * The thread voucher state to restore. | ||
| 239 | */ | ||
| 240 | |||
| 241 | extern void voucher_mach_msg_revert(voucher_mach_msg_state_t state); | ||
| 242 | |||
| 243 | __END_DECLS | ||
| 244 | |||
| 245 | #endif /* _MACH_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/mach_host.h created+1295| ... | @@ -0,0 +1,1295 @@ | ||
| 1 | #ifndef	_mach_host_user_ | ||
| 2 | #define	_mach_host_user_ | ||
| 3 | |||
| 4 | /* Module mach_host */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	mach_host_MSG_COUNT | ||
| 52 | #define	mach_host_MSG_COUNT	35 | ||
| 53 | #endif	/* mach_host_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | #include <mach/mach_types.h> | ||
| 60 | #include <mach_debug/mach_debug_types.h> | ||
| 61 | #include <mach/mach_init.h> | ||
| 62 | |||
| 63 | #ifdef __BeforeMigUserHeader | ||
| 64 | __BeforeMigUserHeader | ||
| 65 | #endif /* __BeforeMigUserHeader */ | ||
| 66 | |||
| 67 | #include <sys/cdefs.h> | ||
| 68 | __BEGIN_DECLS | ||
| 69 | |||
| 70 | |||
| 71 | /* Routine host_info */ | ||
| 72 | #ifdef	mig_external | ||
| 73 | mig_external | ||
| 74 | #else | ||
| 75 | extern | ||
| 76 | #endif	/* mig_external */ | ||
| 77 | __WATCHOS_PROHIBITED | ||
| 78 | __TVOS_PROHIBITED | ||
| 79 | kern_return_t host_info | ||
| 80 | ( | ||
| 81 | 	host_t host, | ||
| 82 | 	host_flavor_t flavor, | ||
| 83 | 	host_info_t host_info_out, | ||
| 84 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 85 | ); | ||
| 86 | |||
| 87 | /* Routine host_kernel_version */ | ||
| 88 | #ifdef	mig_external | ||
| 89 | mig_external | ||
| 90 | #else | ||
| 91 | extern | ||
| 92 | #endif	/* mig_external */ | ||
| 93 | kern_return_t host_kernel_version | ||
| 94 | ( | ||
| 95 | 	host_t host, | ||
| 96 | 	kernel_version_t kernel_version | ||
| 97 | ); | ||
| 98 | |||
| 99 | /* Routine _host_page_size */ | ||
| 100 | #ifdef	mig_external | ||
| 101 | mig_external | ||
| 102 | #else | ||
| 103 | extern | ||
| 104 | #endif	/* mig_external */ | ||
| 105 | kern_return_t _host_page_size | ||
| 106 | ( | ||
| 107 | 	host_t host, | ||
| 108 | 	vm_size_t *out_page_size | ||
| 109 | ); | ||
| 110 | |||
| 111 | /* Routine mach_memory_object_memory_entry */ | ||
| 112 | #ifdef	mig_external | ||
| 113 | mig_external | ||
| 114 | #else | ||
| 115 | extern | ||
| 116 | #endif	/* mig_external */ | ||
| 117 | kern_return_t mach_memory_object_memory_entry | ||
| 118 | ( | ||
| 119 | 	host_t host, | ||
| 120 | 	boolean_t internal, | ||
| 121 | 	vm_size_t size, | ||
| 122 | 	vm_prot_t permission, | ||
| 123 | 	memory_object_t pager, | ||
| 124 | 	mach_port_t *entry_handle | ||
| 125 | ); | ||
| 126 | |||
| 127 | /* Routine host_processor_info */ | ||
| 128 | #ifdef	mig_external | ||
| 129 | mig_external | ||
| 130 | #else | ||
| 131 | extern | ||
| 132 | #endif	/* mig_external */ | ||
| 133 | kern_return_t host_processor_info | ||
| 134 | ( | ||
| 135 | 	host_t host, | ||
| 136 | 	processor_flavor_t flavor, | ||
| 137 | 	natural_t *out_processor_count, | ||
| 138 | 	processor_info_array_t *out_processor_info, | ||
| 139 | 	mach_msg_type_number_t *out_processor_infoCnt | ||
| 140 | ); | ||
| 141 | |||
| 142 | /* Routine host_get_io_master */ | ||
| 143 | #ifdef	mig_external | ||
| 144 | mig_external | ||
| 145 | #else | ||
| 146 | extern | ||
| 147 | #endif	/* mig_external */ | ||
| 148 | kern_return_t host_get_io_master | ||
| 149 | ( | ||
| 150 | 	host_t host, | ||
| 151 | 	io_master_t *io_master | ||
| 152 | ); | ||
| 153 | |||
| 154 | /* Routine host_get_clock_service */ | ||
| 155 | #ifdef	mig_external | ||
| 156 | mig_external | ||
| 157 | #else | ||
| 158 | extern | ||
| 159 | #endif	/* mig_external */ | ||
| 160 | kern_return_t host_get_clock_service | ||
| 161 | ( | ||
| 162 | 	host_t host, | ||
| 163 | 	clock_id_t clock_id, | ||
| 164 | 	clock_serv_t *clock_serv | ||
| 165 | ); | ||
| 166 | |||
| 167 | /* Routine kmod_get_info */ | ||
| 168 | #ifdef	mig_external | ||
| 169 | mig_external | ||
| 170 | #else | ||
| 171 | extern | ||
| 172 | #endif	/* mig_external */ | ||
| 173 | kern_return_t kmod_get_info | ||
| 174 | ( | ||
| 175 | 	host_t host, | ||
| 176 | 	kmod_args_t *modules, | ||
| 177 | 	mach_msg_type_number_t *modulesCnt | ||
| 178 | ); | ||
| 179 | |||
| 180 | /* Routine host_virtual_physical_table_info */ | ||
| 181 | #ifdef	mig_external | ||
| 182 | mig_external | ||
| 183 | #else | ||
| 184 | extern | ||
| 185 | #endif	/* mig_external */ | ||
| 186 | kern_return_t host_virtual_physical_table_info | ||
| 187 | ( | ||
| 188 | 	host_t host, | ||
| 189 | 	hash_info_bucket_array_t *info, | ||
| 190 | 	mach_msg_type_number_t *infoCnt | ||
| 191 | ); | ||
| 192 | |||
| 193 | /* Routine processor_set_default */ | ||
| 194 | #ifdef	mig_external | ||
| 195 | mig_external | ||
| 196 | #else | ||
| 197 | extern | ||
| 198 | #endif	/* mig_external */ | ||
| 199 | kern_return_t processor_set_default | ||
| 200 | ( | ||
| 201 | 	host_t host, | ||
| 202 | 	processor_set_name_t *default_set | ||
| 203 | ); | ||
| 204 | |||
| 205 | /* Routine processor_set_create */ | ||
| 206 | #ifdef	mig_external | ||
| 207 | mig_external | ||
| 208 | #else | ||
| 209 | extern | ||
| 210 | #endif	/* mig_external */ | ||
| 211 | kern_return_t processor_set_create | ||
| 212 | ( | ||
| 213 | 	host_t host, | ||
| 214 | 	processor_set_t *new_set, | ||
| 215 | 	processor_set_name_t *new_name | ||
| 216 | ); | ||
| 217 | |||
| 218 | /* Routine mach_memory_object_memory_entry_64 */ | ||
| 219 | #ifdef	mig_external | ||
| 220 | mig_external | ||
| 221 | #else | ||
| 222 | extern | ||
| 223 | #endif	/* mig_external */ | ||
| 224 | kern_return_t mach_memory_object_memory_entry_64 | ||
| 225 | ( | ||
| 226 | 	host_t host, | ||
| 227 | 	boolean_t internal, | ||
| 228 | 	memory_object_size_t size, | ||
| 229 | 	vm_prot_t permission, | ||
| 230 | 	memory_object_t pager, | ||
| 231 | 	mach_port_t *entry_handle | ||
| 232 | ); | ||
| 233 | |||
| 234 | /* Routine host_statistics */ | ||
| 235 | #ifdef	mig_external | ||
| 236 | mig_external | ||
| 237 | #else | ||
| 238 | extern | ||
| 239 | #endif	/* mig_external */ | ||
| 240 | kern_return_t host_statistics | ||
| 241 | ( | ||
| 242 | 	host_t host_priv, | ||
| 243 | 	host_flavor_t flavor, | ||
| 244 | 	host_info_t host_info_out, | ||
| 245 | 	mach_msg_type_number_t *host_info_outCnt | ||
| 246 | ); | ||
| 247 | |||
| 248 | /* Routine host_request_notification */ | ||
| 249 | #ifdef	mig_external | ||
| 250 | mig_external | ||
| 251 | #else | ||
| 252 | extern | ||
| 253 | #endif	/* mig_external */ | ||
| 254 | __WATCHOS_PROHIBITED | ||
| 255 | __TVOS_PROHIBITED | ||
| 256 | kern_return_t host_request_notification | ||
| 257 | ( | ||
| 258 | 	host_t host, | ||
| 259 | 	host_flavor_t notify_type, | ||
| 260 | 	mach_port_t notify_port | ||
| 261 | ); | ||
| 262 | |||
| 263 | /* Routine host_lockgroup_info */ | ||
| 264 | #ifdef	mig_external | ||
| 265 | mig_external | ||
| 266 | #else | ||
| 267 | extern | ||
| 268 | #endif	/* mig_external */ | ||
| 269 | kern_return_t host_lockgroup_info | ||
| 270 | ( | ||
| 271 | 	host_t host, | ||
| 272 | 	lockgroup_info_array_t *lockgroup_info, | ||
| 273 | 	mach_msg_type_number_t *lockgroup_infoCnt | ||
| 274 | ); | ||
| 275 | |||
| 276 | /* Routine host_statistics64 */ | ||
| 277 | #ifdef	mig_external | ||
| 278 | mig_external | ||
| 279 | #else | ||
| 280 | extern | ||
| 281 | #endif	/* mig_external */ | ||
| 282 | kern_return_t host_statistics64 | ||
| 283 | ( | ||
| 284 | 	host_t host_priv, | ||
| 285 | 	host_flavor_t flavor, | ||
| 286 | 	host_info64_t host_info64_out, | ||
| 287 | 	mach_msg_type_number_t *host_info64_outCnt | ||
| 288 | ); | ||
| 289 | |||
| 290 | /* Routine mach_zone_info */ | ||
| 291 | #ifdef	mig_external | ||
| 292 | mig_external | ||
| 293 | #else | ||
| 294 | extern | ||
| 295 | #endif	/* mig_external */ | ||
| 296 | kern_return_t mach_zone_info | ||
| 297 | ( | ||
| 298 | 	host_priv_t host, | ||
| 299 | 	mach_zone_name_array_t *names, | ||
| 300 | 	mach_msg_type_number_t *namesCnt, | ||
| 301 | 	mach_zone_info_array_t *info, | ||
| 302 | 	mach_msg_type_number_t *infoCnt | ||
| 303 | ); | ||
| 304 | |||
| 305 | /* Routine host_create_mach_voucher */ | ||
| 306 | #ifdef	mig_external | ||
| 307 | mig_external | ||
| 308 | #else | ||
| 309 | extern | ||
| 310 | #endif	/* mig_external */ | ||
| 311 | __WATCHOS_PROHIBITED | ||
| 312 | __TVOS_PROHIBITED | ||
| 313 | kern_return_t host_create_mach_voucher | ||
| 314 | ( | ||
| 315 | 	host_t host, | ||
| 316 | 	mach_voucher_attr_raw_recipe_array_t recipes, | ||
| 317 | 	mach_msg_type_number_t recipesCnt, | ||
| 318 | 	ipc_voucher_t *voucher | ||
| 319 | ); | ||
| 320 | |||
| 321 | /* Routine host_register_mach_voucher_attr_manager */ | ||
| 322 | #ifdef	mig_external | ||
| 323 | mig_external | ||
| 324 | #else | ||
| 325 | extern | ||
| 326 | #endif	/* mig_external */ | ||
| 327 | __WATCHOS_PROHIBITED | ||
| 328 | __TVOS_PROHIBITED | ||
| 329 | kern_return_t host_register_mach_voucher_attr_manager | ||
| 330 | ( | ||
| 331 | 	host_t host, | ||
| 332 | 	mach_voucher_attr_manager_t attr_manager, | ||
| 333 | 	mach_voucher_attr_value_handle_t default_value, | ||
| 334 | 	mach_voucher_attr_key_t *new_key, | ||
| 335 | 	ipc_voucher_attr_control_t *new_attr_control | ||
| 336 | ); | ||
| 337 | |||
| 338 | /* Routine host_register_well_known_mach_voucher_attr_manager */ | ||
| 339 | #ifdef	mig_external | ||
| 340 | mig_external | ||
| 341 | #else | ||
| 342 | extern | ||
| 343 | #endif	/* mig_external */ | ||
| 344 | __WATCHOS_PROHIBITED | ||
| 345 | __TVOS_PROHIBITED | ||
| 346 | kern_return_t host_register_well_known_mach_voucher_attr_manager | ||
| 347 | ( | ||
| 348 | 	host_t host, | ||
| 349 | 	mach_voucher_attr_manager_t attr_manager, | ||
| 350 | 	mach_voucher_attr_value_handle_t default_value, | ||
| 351 | 	mach_voucher_attr_key_t key, | ||
| 352 | 	ipc_voucher_attr_control_t *new_attr_control | ||
| 353 | ); | ||
| 354 | |||
| 355 | /* Routine host_set_atm_diagnostic_flag */ | ||
| 356 | #ifdef	mig_external | ||
| 357 | mig_external | ||
| 358 | #else | ||
| 359 | extern | ||
| 360 | #endif	/* mig_external */ | ||
| 361 | __WATCHOS_PROHIBITED | ||
| 362 | __TVOS_PROHIBITED | ||
| 363 | kern_return_t host_set_atm_diagnostic_flag | ||
| 364 | ( | ||
| 365 | 	host_t host, | ||
| 366 | 	uint32_t diagnostic_flag | ||
| 367 | ); | ||
| 368 | |||
| 369 | /* Routine host_get_atm_diagnostic_flag */ | ||
| 370 | #ifdef	mig_external | ||
| 371 | mig_external | ||
| 372 | #else | ||
| 373 | extern | ||
| 374 | #endif	/* mig_external */ | ||
| 375 | __WATCHOS_PROHIBITED | ||
| 376 | __TVOS_PROHIBITED | ||
| 377 | kern_return_t host_get_atm_diagnostic_flag | ||
| 378 | ( | ||
| 379 | 	host_t host, | ||
| 380 | 	uint32_t *diagnostic_flag | ||
| 381 | ); | ||
| 382 | |||
| 383 | /* Routine mach_memory_info */ | ||
| 384 | #ifdef	mig_external | ||
| 385 | mig_external | ||
| 386 | #else | ||
| 387 | extern | ||
| 388 | #endif	/* mig_external */ | ||
| 389 | kern_return_t mach_memory_info | ||
| 390 | ( | ||
| 391 | 	host_priv_t host, | ||
| 392 | 	mach_zone_name_array_t *names, | ||
| 393 | 	mach_msg_type_number_t *namesCnt, | ||
| 394 | 	mach_zone_info_array_t *info, | ||
| 395 | 	mach_msg_type_number_t *infoCnt, | ||
| 396 | 	mach_memory_info_array_t *memory_info, | ||
| 397 | 	mach_msg_type_number_t *memory_infoCnt | ||
| 398 | ); | ||
| 399 | |||
| 400 | /* Routine host_set_multiuser_config_flags */ | ||
| 401 | #ifdef	mig_external | ||
| 402 | mig_external | ||
| 403 | #else | ||
| 404 | extern | ||
| 405 | #endif	/* mig_external */ | ||
| 406 | kern_return_t host_set_multiuser_config_flags | ||
| 407 | ( | ||
| 408 | 	host_priv_t host_priv, | ||
| 409 | 	uint32_t multiuser_flags | ||
| 410 | ); | ||
| 411 | |||
| 412 | /* Routine host_get_multiuser_config_flags */ | ||
| 413 | #ifdef	mig_external | ||
| 414 | mig_external | ||
| 415 | #else | ||
| 416 | extern | ||
| 417 | #endif	/* mig_external */ | ||
| 418 | kern_return_t host_get_multiuser_config_flags | ||
| 419 | ( | ||
| 420 | 	host_t host, | ||
| 421 | 	uint32_t *multiuser_flags | ||
| 422 | ); | ||
| 423 | |||
| 424 | /* Routine host_check_multiuser_mode */ | ||
| 425 | #ifdef	mig_external | ||
| 426 | mig_external | ||
| 427 | #else | ||
| 428 | extern | ||
| 429 | #endif	/* mig_external */ | ||
| 430 | kern_return_t host_check_multiuser_mode | ||
| 431 | ( | ||
| 432 | 	host_t host, | ||
| 433 | 	uint32_t *multiuser_mode | ||
| 434 | ); | ||
| 435 | |||
| 436 | /* Routine mach_zone_info_for_zone */ | ||
| 437 | #ifdef	mig_external | ||
| 438 | mig_external | ||
| 439 | #else | ||
| 440 | extern | ||
| 441 | #endif	/* mig_external */ | ||
| 442 | kern_return_t mach_zone_info_for_zone | ||
| 443 | ( | ||
| 444 | 	host_priv_t host, | ||
| 445 | 	mach_zone_name_t name, | ||
| 446 | 	mach_zone_info_t *info | ||
| 447 | ); | ||
| 448 | |||
| 449 | __END_DECLS | ||
| 450 | |||
| 451 | /********************** Caution **************************/ | ||
| 452 | /* The following data types should be used to calculate */ | ||
| 453 | /* maximum message sizes only. The actual message may be */ | ||
| 454 | /* smaller, and the position of the arguments within the */ | ||
| 455 | /* message layout may vary from what is presented here. */ | ||
| 456 | /* For example, if any of the arguments are variable- */ | ||
| 457 | /* sized, and less than the maximum is sent, the data */ | ||
| 458 | /* will be packed tight in the actual message to reduce */ | ||
| 459 | /* the presence of holes. */ | ||
| 460 | /********************** Caution **************************/ | ||
| 461 | |||
| 462 | /* typedefs for all requests */ | ||
| 463 | |||
| 464 | #ifndef __Request__mach_host_subsystem__defined | ||
| 465 | #define __Request__mach_host_subsystem__defined | ||
| 466 | |||
| 467 | #ifdef __MigPackStructs | ||
| 468 | #pragma pack(push, 4) | ||
| 469 | #endif | ||
| 470 | 	typedef struct { | ||
| 471 | 		mach_msg_header_t Head; | ||
| 472 | 		NDR_record_t NDR; | ||
| 473 | 		host_flavor_t flavor; | ||
| 474 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 475 | 	} __Request__host_info_t __attribute__((unused)); | ||
| 476 | #ifdef __MigPackStructs | ||
| 477 | #pragma pack(pop) | ||
| 478 | #endif | ||
| 479 | |||
| 480 | #ifdef __MigPackStructs | ||
| 481 | #pragma pack(push, 4) | ||
| 482 | #endif | ||
| 483 | 	typedef struct { | ||
| 484 | 		mach_msg_header_t Head; | ||
| 485 | 	} __Request__host_kernel_version_t __attribute__((unused)); | ||
| 486 | #ifdef __MigPackStructs | ||
| 487 | #pragma pack(pop) | ||
| 488 | #endif | ||
| 489 | |||
| 490 | #ifdef __MigPackStructs | ||
| 491 | #pragma pack(push, 4) | ||
| 492 | #endif | ||
| 493 | 	typedef struct { | ||
| 494 | 		mach_msg_header_t Head; | ||
| 495 | 	} __Request___host_page_size_t __attribute__((unused)); | ||
| 496 | #ifdef __MigPackStructs | ||
| 497 | #pragma pack(pop) | ||
| 498 | #endif | ||
| 499 | |||
| 500 | #ifdef __MigPackStructs | ||
| 501 | #pragma pack(push, 4) | ||
| 502 | #endif | ||
| 503 | 	typedef struct { | ||
| 504 | 		mach_msg_header_t Head; | ||
| 505 | 		/* start of the kernel processed data */ | ||
| 506 | 		mach_msg_body_t msgh_body; | ||
| 507 | 		mach_msg_port_descriptor_t pager; | ||
| 508 | 		/* end of the kernel processed data */ | ||
| 509 | 		NDR_record_t NDR; | ||
| 510 | 		boolean_t internal; | ||
| 511 | 		vm_size_t size; | ||
| 512 | 		vm_prot_t permission; | ||
| 513 | 	} __Request__mach_memory_object_memory_entry_t __attribute__((unused)); | ||
| 514 | #ifdef __MigPackStructs | ||
| 515 | #pragma pack(pop) | ||
| 516 | #endif | ||
| 517 | |||
| 518 | #ifdef __MigPackStructs | ||
| 519 | #pragma pack(push, 4) | ||
| 520 | #endif | ||
| 521 | 	typedef struct { | ||
| 522 | 		mach_msg_header_t Head; | ||
| 523 | 		NDR_record_t NDR; | ||
| 524 | 		processor_flavor_t flavor; | ||
| 525 | 	} __Request__host_processor_info_t __attribute__((unused)); | ||
| 526 | #ifdef __MigPackStructs | ||
| 527 | #pragma pack(pop) | ||
| 528 | #endif | ||
| 529 | |||
| 530 | #ifdef __MigPackStructs | ||
| 531 | #pragma pack(push, 4) | ||
| 532 | #endif | ||
| 533 | 	typedef struct { | ||
| 534 | 		mach_msg_header_t Head; | ||
| 535 | 	} __Request__host_get_io_master_t __attribute__((unused)); | ||
| 536 | #ifdef __MigPackStructs | ||
| 537 | #pragma pack(pop) | ||
| 538 | #endif | ||
| 539 | |||
| 540 | #ifdef __MigPackStructs | ||
| 541 | #pragma pack(push, 4) | ||
| 542 | #endif | ||
| 543 | 	typedef struct { | ||
| 544 | 		mach_msg_header_t Head; | ||
| 545 | 		NDR_record_t NDR; | ||
| 546 | 		clock_id_t clock_id; | ||
| 547 | 	} __Request__host_get_clock_service_t __attribute__((unused)); | ||
| 548 | #ifdef __MigPackStructs | ||
| 549 | #pragma pack(pop) | ||
| 550 | #endif | ||
| 551 | |||
| 552 | #ifdef __MigPackStructs | ||
| 553 | #pragma pack(push, 4) | ||
| 554 | #endif | ||
| 555 | 	typedef struct { | ||
| 556 | 		mach_msg_header_t Head; | ||
| 557 | 	} __Request__kmod_get_info_t __attribute__((unused)); | ||
| 558 | #ifdef __MigPackStructs | ||
| 559 | #pragma pack(pop) | ||
| 560 | #endif | ||
| 561 | |||
| 562 | #ifdef __MigPackStructs | ||
| 563 | #pragma pack(push, 4) | ||
| 564 | #endif | ||
| 565 | 	typedef struct { | ||
| 566 | 		mach_msg_header_t Head; | ||
| 567 | 	} __Request__host_virtual_physical_table_info_t __attribute__((unused)); | ||
| 568 | #ifdef __MigPackStructs | ||
| 569 | #pragma pack(pop) | ||
| 570 | #endif | ||
| 571 | |||
| 572 | #ifdef __MigPackStructs | ||
| 573 | #pragma pack(push, 4) | ||
| 574 | #endif | ||
| 575 | 	typedef struct { | ||
| 576 | 		mach_msg_header_t Head; | ||
| 577 | 	} __Request__processor_set_default_t __attribute__((unused)); | ||
| 578 | #ifdef __MigPackStructs | ||
| 579 | #pragma pack(pop) | ||
| 580 | #endif | ||
| 581 | |||
| 582 | #ifdef __MigPackStructs | ||
| 583 | #pragma pack(push, 4) | ||
| 584 | #endif | ||
| 585 | 	typedef struct { | ||
| 586 | 		mach_msg_header_t Head; | ||
| 587 | 	} __Request__processor_set_create_t __attribute__((unused)); | ||
| 588 | #ifdef __MigPackStructs | ||
| 589 | #pragma pack(pop) | ||
| 590 | #endif | ||
| 591 | |||
| 592 | #ifdef __MigPackStructs | ||
| 593 | #pragma pack(push, 4) | ||
| 594 | #endif | ||
| 595 | 	typedef struct { | ||
| 596 | 		mach_msg_header_t Head; | ||
| 597 | 		/* start of the kernel processed data */ | ||
| 598 | 		mach_msg_body_t msgh_body; | ||
| 599 | 		mach_msg_port_descriptor_t pager; | ||
| 600 | 		/* end of the kernel processed data */ | ||
| 601 | 		NDR_record_t NDR; | ||
| 602 | 		boolean_t internal; | ||
| 603 | 		memory_object_size_t size; | ||
| 604 | 		vm_prot_t permission; | ||
| 605 | 	} __Request__mach_memory_object_memory_entry_64_t __attribute__((unused)); | ||
| 606 | #ifdef __MigPackStructs | ||
| 607 | #pragma pack(pop) | ||
| 608 | #endif | ||
| 609 | |||
| 610 | #ifdef __MigPackStructs | ||
| 611 | #pragma pack(push, 4) | ||
| 612 | #endif | ||
| 613 | 	typedef struct { | ||
| 614 | 		mach_msg_header_t Head; | ||
| 615 | 		NDR_record_t NDR; | ||
| 616 | 		host_flavor_t flavor; | ||
| 617 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 618 | 	} __Request__host_statistics_t __attribute__((unused)); | ||
| 619 | #ifdef __MigPackStructs | ||
| 620 | #pragma pack(pop) | ||
| 621 | #endif | ||
| 622 | |||
| 623 | #ifdef __MigPackStructs | ||
| 624 | #pragma pack(push, 4) | ||
| 625 | #endif | ||
| 626 | 	typedef struct { | ||
| 627 | 		mach_msg_header_t Head; | ||
| 628 | 		/* start of the kernel processed data */ | ||
| 629 | 		mach_msg_body_t msgh_body; | ||
| 630 | 		mach_msg_port_descriptor_t notify_port; | ||
| 631 | 		/* end of the kernel processed data */ | ||
| 632 | 		NDR_record_t NDR; | ||
| 633 | 		host_flavor_t notify_type; | ||
| 634 | 	} __Request__host_request_notification_t __attribute__((unused)); | ||
| 635 | #ifdef __MigPackStructs | ||
| 636 | #pragma pack(pop) | ||
| 637 | #endif | ||
| 638 | |||
| 639 | #ifdef __MigPackStructs | ||
| 640 | #pragma pack(push, 4) | ||
| 641 | #endif | ||
| 642 | 	typedef struct { | ||
| 643 | 		mach_msg_header_t Head; | ||
| 644 | 	} __Request__host_lockgroup_info_t __attribute__((unused)); | ||
| 645 | #ifdef __MigPackStructs | ||
| 646 | #pragma pack(pop) | ||
| 647 | #endif | ||
| 648 | |||
| 649 | #ifdef __MigPackStructs | ||
| 650 | #pragma pack(push, 4) | ||
| 651 | #endif | ||
| 652 | 	typedef struct { | ||
| 653 | 		mach_msg_header_t Head; | ||
| 654 | 		NDR_record_t NDR; | ||
| 655 | 		host_flavor_t flavor; | ||
| 656 | 		mach_msg_type_number_t host_info64_outCnt; | ||
| 657 | 	} __Request__host_statistics64_t __attribute__((unused)); | ||
| 658 | #ifdef __MigPackStructs | ||
| 659 | #pragma pack(pop) | ||
| 660 | #endif | ||
| 661 | |||
| 662 | #ifdef __MigPackStructs | ||
| 663 | #pragma pack(push, 4) | ||
| 664 | #endif | ||
| 665 | 	typedef struct { | ||
| 666 | 		mach_msg_header_t Head; | ||
| 667 | 	} __Request__mach_zone_info_t __attribute__((unused)); | ||
| 668 | #ifdef __MigPackStructs | ||
| 669 | #pragma pack(pop) | ||
| 670 | #endif | ||
| 671 | |||
| 672 | #ifdef __MigPackStructs | ||
| 673 | #pragma pack(push, 4) | ||
| 674 | #endif | ||
| 675 | 	typedef struct { | ||
| 676 | 		mach_msg_header_t Head; | ||
| 677 | 		NDR_record_t NDR; | ||
| 678 | 		mach_msg_type_number_t recipesCnt; | ||
| 679 | 		uint8_t recipes[5120]; | ||
| 680 | 	} __Request__host_create_mach_voucher_t __attribute__((unused)); | ||
| 681 | #ifdef __MigPackStructs | ||
| 682 | #pragma pack(pop) | ||
| 683 | #endif | ||
| 684 | |||
| 685 | #ifdef __MigPackStructs | ||
| 686 | #pragma pack(push, 4) | ||
| 687 | #endif | ||
| 688 | 	typedef struct { | ||
| 689 | 		mach_msg_header_t Head; | ||
| 690 | 		/* start of the kernel processed data */ | ||
| 691 | 		mach_msg_body_t msgh_body; | ||
| 692 | 		mach_msg_port_descriptor_t attr_manager; | ||
| 693 | 		/* end of the kernel processed data */ | ||
| 694 | 		NDR_record_t NDR; | ||
| 695 | 		mach_voucher_attr_value_handle_t default_value; | ||
| 696 | 	} __Request__host_register_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 697 | #ifdef __MigPackStructs | ||
| 698 | #pragma pack(pop) | ||
| 699 | #endif | ||
| 700 | |||
| 701 | #ifdef __MigPackStructs | ||
| 702 | #pragma pack(push, 4) | ||
| 703 | #endif | ||
| 704 | 	typedef struct { | ||
| 705 | 		mach_msg_header_t Head; | ||
| 706 | 		/* start of the kernel processed data */ | ||
| 707 | 		mach_msg_body_t msgh_body; | ||
| 708 | 		mach_msg_port_descriptor_t attr_manager; | ||
| 709 | 		/* end of the kernel processed data */ | ||
| 710 | 		NDR_record_t NDR; | ||
| 711 | 		mach_voucher_attr_value_handle_t default_value; | ||
| 712 | 		mach_voucher_attr_key_t key; | ||
| 713 | 	} __Request__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 714 | #ifdef __MigPackStructs | ||
| 715 | #pragma pack(pop) | ||
| 716 | #endif | ||
| 717 | |||
| 718 | #ifdef __MigPackStructs | ||
| 719 | #pragma pack(push, 4) | ||
| 720 | #endif | ||
| 721 | 	typedef struct { | ||
| 722 | 		mach_msg_header_t Head; | ||
| 723 | 		NDR_record_t NDR; | ||
| 724 | 		uint32_t diagnostic_flag; | ||
| 725 | 	} __Request__host_set_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 726 | #ifdef __MigPackStructs | ||
| 727 | #pragma pack(pop) | ||
| 728 | #endif | ||
| 729 | |||
| 730 | #ifdef __MigPackStructs | ||
| 731 | #pragma pack(push, 4) | ||
| 732 | #endif | ||
| 733 | 	typedef struct { | ||
| 734 | 		mach_msg_header_t Head; | ||
| 735 | 	} __Request__host_get_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 736 | #ifdef __MigPackStructs | ||
| 737 | #pragma pack(pop) | ||
| 738 | #endif | ||
| 739 | |||
| 740 | #ifdef __MigPackStructs | ||
| 741 | #pragma pack(push, 4) | ||
| 742 | #endif | ||
| 743 | 	typedef struct { | ||
| 744 | 		mach_msg_header_t Head; | ||
| 745 | 	} __Request__mach_memory_info_t __attribute__((unused)); | ||
| 746 | #ifdef __MigPackStructs | ||
| 747 | #pragma pack(pop) | ||
| 748 | #endif | ||
| 749 | |||
| 750 | #ifdef __MigPackStructs | ||
| 751 | #pragma pack(push, 4) | ||
| 752 | #endif | ||
| 753 | 	typedef struct { | ||
| 754 | 		mach_msg_header_t Head; | ||
| 755 | 		NDR_record_t NDR; | ||
| 756 | 		uint32_t multiuser_flags; | ||
| 757 | 	} __Request__host_set_multiuser_config_flags_t __attribute__((unused)); | ||
| 758 | #ifdef __MigPackStructs | ||
| 759 | #pragma pack(pop) | ||
| 760 | #endif | ||
| 761 | |||
| 762 | #ifdef __MigPackStructs | ||
| 763 | #pragma pack(push, 4) | ||
| 764 | #endif | ||
| 765 | 	typedef struct { | ||
| 766 | 		mach_msg_header_t Head; | ||
| 767 | 	} __Request__host_get_multiuser_config_flags_t __attribute__((unused)); | ||
| 768 | #ifdef __MigPackStructs | ||
| 769 | #pragma pack(pop) | ||
| 770 | #endif | ||
| 771 | |||
| 772 | #ifdef __MigPackStructs | ||
| 773 | #pragma pack(push, 4) | ||
| 774 | #endif | ||
| 775 | 	typedef struct { | ||
| 776 | 		mach_msg_header_t Head; | ||
| 777 | 	} __Request__host_check_multiuser_mode_t __attribute__((unused)); | ||
| 778 | #ifdef __MigPackStructs | ||
| 779 | #pragma pack(pop) | ||
| 780 | #endif | ||
| 781 | |||
| 782 | #ifdef __MigPackStructs | ||
| 783 | #pragma pack(push, 4) | ||
| 784 | #endif | ||
| 785 | 	typedef struct { | ||
| 786 | 		mach_msg_header_t Head; | ||
| 787 | 		NDR_record_t NDR; | ||
| 788 | 		mach_zone_name_t name; | ||
| 789 | 	} __Request__mach_zone_info_for_zone_t __attribute__((unused)); | ||
| 790 | #ifdef __MigPackStructs | ||
| 791 | #pragma pack(pop) | ||
| 792 | #endif | ||
| 793 | #endif /* !__Request__mach_host_subsystem__defined */ | ||
| 794 | |||
| 795 | /* union of all requests */ | ||
| 796 | |||
| 797 | #ifndef __RequestUnion__mach_host_subsystem__defined | ||
| 798 | #define __RequestUnion__mach_host_subsystem__defined | ||
| 799 | union __RequestUnion__mach_host_subsystem { | ||
| 800 | 	__Request__host_info_t Request_host_info; | ||
| 801 | 	__Request__host_kernel_version_t Request_host_kernel_version; | ||
| 802 | 	__Request___host_page_size_t Request__host_page_size; | ||
| 803 | 	__Request__mach_memory_object_memory_entry_t Request_mach_memory_object_memory_entry; | ||
| 804 | 	__Request__host_processor_info_t Request_host_processor_info; | ||
| 805 | 	__Request__host_get_io_master_t Request_host_get_io_master; | ||
| 806 | 	__Request__host_get_clock_service_t Request_host_get_clock_service; | ||
| 807 | 	__Request__kmod_get_info_t Request_kmod_get_info; | ||
| 808 | 	__Request__host_virtual_physical_table_info_t Request_host_virtual_physical_table_info; | ||
| 809 | 	__Request__processor_set_default_t Request_processor_set_default; | ||
| 810 | 	__Request__processor_set_create_t Request_processor_set_create; | ||
| 811 | 	__Request__mach_memory_object_memory_entry_64_t Request_mach_memory_object_memory_entry_64; | ||
| 812 | 	__Request__host_statistics_t Request_host_statistics; | ||
| 813 | 	__Request__host_request_notification_t Request_host_request_notification; | ||
| 814 | 	__Request__host_lockgroup_info_t Request_host_lockgroup_info; | ||
| 815 | 	__Request__host_statistics64_t Request_host_statistics64; | ||
| 816 | 	__Request__mach_zone_info_t Request_mach_zone_info; | ||
| 817 | 	__Request__host_create_mach_voucher_t Request_host_create_mach_voucher; | ||
| 818 | 	__Request__host_register_mach_voucher_attr_manager_t Request_host_register_mach_voucher_attr_manager; | ||
| 819 | 	__Request__host_register_well_known_mach_voucher_attr_manager_t Request_host_register_well_known_mach_voucher_attr_manager; | ||
| 820 | 	__Request__host_set_atm_diagnostic_flag_t Request_host_set_atm_diagnostic_flag; | ||
| 821 | 	__Request__host_get_atm_diagnostic_flag_t Request_host_get_atm_diagnostic_flag; | ||
| 822 | 	__Request__mach_memory_info_t Request_mach_memory_info; | ||
| 823 | 	__Request__host_set_multiuser_config_flags_t Request_host_set_multiuser_config_flags; | ||
| 824 | 	__Request__host_get_multiuser_config_flags_t Request_host_get_multiuser_config_flags; | ||
| 825 | 	__Request__host_check_multiuser_mode_t Request_host_check_multiuser_mode; | ||
| 826 | 	__Request__mach_zone_info_for_zone_t Request_mach_zone_info_for_zone; | ||
| 827 | }; | ||
| 828 | #endif /* !__RequestUnion__mach_host_subsystem__defined */ | ||
| 829 | /* typedefs for all replies */ | ||
| 830 | |||
| 831 | #ifndef __Reply__mach_host_subsystem__defined | ||
| 832 | #define __Reply__mach_host_subsystem__defined | ||
| 833 | |||
| 834 | #ifdef __MigPackStructs | ||
| 835 | #pragma pack(push, 4) | ||
| 836 | #endif | ||
| 837 | 	typedef struct { | ||
| 838 | 		mach_msg_header_t Head; | ||
| 839 | 		NDR_record_t NDR; | ||
| 840 | 		kern_return_t RetCode; | ||
| 841 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 842 | 		integer_t host_info_out[68]; | ||
| 843 | 	} __Reply__host_info_t __attribute__((unused)); | ||
| 844 | #ifdef __MigPackStructs | ||
| 845 | #pragma pack(pop) | ||
| 846 | #endif | ||
| 847 | |||
| 848 | #ifdef __MigPackStructs | ||
| 849 | #pragma pack(push, 4) | ||
| 850 | #endif | ||
| 851 | 	typedef struct { | ||
| 852 | 		mach_msg_header_t Head; | ||
| 853 | 		NDR_record_t NDR; | ||
| 854 | 		kern_return_t RetCode; | ||
| 855 | 		mach_msg_type_number_t kernel_versionOffset; /* MiG doesn't use it */ | ||
| 856 | 		mach_msg_type_number_t kernel_versionCnt; | ||
| 857 | 		char kernel_version[512]; | ||
| 858 | 	} __Reply__host_kernel_version_t __attribute__((unused)); | ||
| 859 | #ifdef __MigPackStructs | ||
| 860 | #pragma pack(pop) | ||
| 861 | #endif | ||
| 862 | |||
| 863 | #ifdef __MigPackStructs | ||
| 864 | #pragma pack(push, 4) | ||
| 865 | #endif | ||
| 866 | 	typedef struct { | ||
| 867 | 		mach_msg_header_t Head; | ||
| 868 | 		NDR_record_t NDR; | ||
| 869 | 		kern_return_t RetCode; | ||
| 870 | 		vm_size_t out_page_size; | ||
| 871 | 	} __Reply___host_page_size_t __attribute__((unused)); | ||
| 872 | #ifdef __MigPackStructs | ||
| 873 | #pragma pack(pop) | ||
| 874 | #endif | ||
| 875 | |||
| 876 | #ifdef __MigPackStructs | ||
| 877 | #pragma pack(push, 4) | ||
| 878 | #endif | ||
| 879 | 	typedef struct { | ||
| 880 | 		mach_msg_header_t Head; | ||
| 881 | 		/* start of the kernel processed data */ | ||
| 882 | 		mach_msg_body_t msgh_body; | ||
| 883 | 		mach_msg_port_descriptor_t entry_handle; | ||
| 884 | 		/* end of the kernel processed data */ | ||
| 885 | 	} __Reply__mach_memory_object_memory_entry_t __attribute__((unused)); | ||
| 886 | #ifdef __MigPackStructs | ||
| 887 | #pragma pack(pop) | ||
| 888 | #endif | ||
| 889 | |||
| 890 | #ifdef __MigPackStructs | ||
| 891 | #pragma pack(push, 4) | ||
| 892 | #endif | ||
| 893 | 	typedef struct { | ||
| 894 | 		mach_msg_header_t Head; | ||
| 895 | 		/* start of the kernel processed data */ | ||
| 896 | 		mach_msg_body_t msgh_body; | ||
| 897 | 		mach_msg_ool_descriptor_t out_processor_info; | ||
| 898 | 		/* end of the kernel processed data */ | ||
| 899 | 		NDR_record_t NDR; | ||
| 900 | 		natural_t out_processor_count; | ||
| 901 | 		mach_msg_type_number_t out_processor_infoCnt; | ||
| 902 | 	} __Reply__host_processor_info_t __attribute__((unused)); | ||
| 903 | #ifdef __MigPackStructs | ||
| 904 | #pragma pack(pop) | ||
| 905 | #endif | ||
| 906 | |||
| 907 | #ifdef __MigPackStructs | ||
| 908 | #pragma pack(push, 4) | ||
| 909 | #endif | ||
| 910 | 	typedef struct { | ||
| 911 | 		mach_msg_header_t Head; | ||
| 912 | 		/* start of the kernel processed data */ | ||
| 913 | 		mach_msg_body_t msgh_body; | ||
| 914 | 		mach_msg_port_descriptor_t io_master; | ||
| 915 | 		/* end of the kernel processed data */ | ||
| 916 | 	} __Reply__host_get_io_master_t __attribute__((unused)); | ||
| 917 | #ifdef __MigPackStructs | ||
| 918 | #pragma pack(pop) | ||
| 919 | #endif | ||
| 920 | |||
| 921 | #ifdef __MigPackStructs | ||
| 922 | #pragma pack(push, 4) | ||
| 923 | #endif | ||
| 924 | 	typedef struct { | ||
| 925 | 		mach_msg_header_t Head; | ||
| 926 | 		/* start of the kernel processed data */ | ||
| 927 | 		mach_msg_body_t msgh_body; | ||
| 928 | 		mach_msg_port_descriptor_t clock_serv; | ||
| 929 | 		/* end of the kernel processed data */ | ||
| 930 | 	} __Reply__host_get_clock_service_t __attribute__((unused)); | ||
| 931 | #ifdef __MigPackStructs | ||
| 932 | #pragma pack(pop) | ||
| 933 | #endif | ||
| 934 | |||
| 935 | #ifdef __MigPackStructs | ||
| 936 | #pragma pack(push, 4) | ||
| 937 | #endif | ||
| 938 | 	typedef struct { | ||
| 939 | 		mach_msg_header_t Head; | ||
| 940 | 		/* start of the kernel processed data */ | ||
| 941 | 		mach_msg_body_t msgh_body; | ||
| 942 | 		mach_msg_ool_descriptor_t modules; | ||
| 943 | 		/* end of the kernel processed data */ | ||
| 944 | 		NDR_record_t NDR; | ||
| 945 | 		mach_msg_type_number_t modulesCnt; | ||
| 946 | 	} __Reply__kmod_get_info_t __attribute__((unused)); | ||
| 947 | #ifdef __MigPackStructs | ||
| 948 | #pragma pack(pop) | ||
| 949 | #endif | ||
| 950 | |||
| 951 | #ifdef __MigPackStructs | ||
| 952 | #pragma pack(push, 4) | ||
| 953 | #endif | ||
| 954 | 	typedef struct { | ||
| 955 | 		mach_msg_header_t Head; | ||
| 956 | 		/* start of the kernel processed data */ | ||
| 957 | 		mach_msg_body_t msgh_body; | ||
| 958 | 		mach_msg_ool_descriptor_t info; | ||
| 959 | 		/* end of the kernel processed data */ | ||
| 960 | 		NDR_record_t NDR; | ||
| 961 | 		mach_msg_type_number_t infoCnt; | ||
| 962 | 	} __Reply__host_virtual_physical_table_info_t __attribute__((unused)); | ||
| 963 | #ifdef __MigPackStructs | ||
| 964 | #pragma pack(pop) | ||
| 965 | #endif | ||
| 966 | |||
| 967 | #ifdef __MigPackStructs | ||
| 968 | #pragma pack(push, 4) | ||
| 969 | #endif | ||
| 970 | 	typedef struct { | ||
| 971 | 		mach_msg_header_t Head; | ||
| 972 | 		/* start of the kernel processed data */ | ||
| 973 | 		mach_msg_body_t msgh_body; | ||
| 974 | 		mach_msg_port_descriptor_t default_set; | ||
| 975 | 		/* end of the kernel processed data */ | ||
| 976 | 	} __Reply__processor_set_default_t __attribute__((unused)); | ||
| 977 | #ifdef __MigPackStructs | ||
| 978 | #pragma pack(pop) | ||
| 979 | #endif | ||
| 980 | |||
| 981 | #ifdef __MigPackStructs | ||
| 982 | #pragma pack(push, 4) | ||
| 983 | #endif | ||
| 984 | 	typedef struct { | ||
| 985 | 		mach_msg_header_t Head; | ||
| 986 | 		/* start of the kernel processed data */ | ||
| 987 | 		mach_msg_body_t msgh_body; | ||
| 988 | 		mach_msg_port_descriptor_t new_set; | ||
| 989 | 		mach_msg_port_descriptor_t new_name; | ||
| 990 | 		/* end of the kernel processed data */ | ||
| 991 | 	} __Reply__processor_set_create_t __attribute__((unused)); | ||
| 992 | #ifdef __MigPackStructs | ||
| 993 | #pragma pack(pop) | ||
| 994 | #endif | ||
| 995 | |||
| 996 | #ifdef __MigPackStructs | ||
| 997 | #pragma pack(push, 4) | ||
| 998 | #endif | ||
| 999 | 	typedef struct { | ||
| 1000 | 		mach_msg_header_t Head; | ||
| 1001 | 		/* start of the kernel processed data */ | ||
| 1002 | 		mach_msg_body_t msgh_body; | ||
| 1003 | 		mach_msg_port_descriptor_t entry_handle; | ||
| 1004 | 		/* end of the kernel processed data */ | ||
| 1005 | 	} __Reply__mach_memory_object_memory_entry_64_t __attribute__((unused)); | ||
| 1006 | #ifdef __MigPackStructs | ||
| 1007 | #pragma pack(pop) | ||
| 1008 | #endif | ||
| 1009 | |||
| 1010 | #ifdef __MigPackStructs | ||
| 1011 | #pragma pack(push, 4) | ||
| 1012 | #endif | ||
| 1013 | 	typedef struct { | ||
| 1014 | 		mach_msg_header_t Head; | ||
| 1015 | 		NDR_record_t NDR; | ||
| 1016 | 		kern_return_t RetCode; | ||
| 1017 | 		mach_msg_type_number_t host_info_outCnt; | ||
| 1018 | 		integer_t host_info_out[68]; | ||
| 1019 | 	} __Reply__host_statistics_t __attribute__((unused)); | ||
| 1020 | #ifdef __MigPackStructs | ||
| 1021 | #pragma pack(pop) | ||
| 1022 | #endif | ||
| 1023 | |||
| 1024 | #ifdef __MigPackStructs | ||
| 1025 | #pragma pack(push, 4) | ||
| 1026 | #endif | ||
| 1027 | 	typedef struct { | ||
| 1028 | 		mach_msg_header_t Head; | ||
| 1029 | 		NDR_record_t NDR; | ||
| 1030 | 		kern_return_t RetCode; | ||
| 1031 | 	} __Reply__host_request_notification_t __attribute__((unused)); | ||
| 1032 | #ifdef __MigPackStructs | ||
| 1033 | #pragma pack(pop) | ||
| 1034 | #endif | ||
| 1035 | |||
| 1036 | #ifdef __MigPackStructs | ||
| 1037 | #pragma pack(push, 4) | ||
| 1038 | #endif | ||
| 1039 | 	typedef struct { | ||
| 1040 | 		mach_msg_header_t Head; | ||
| 1041 | 		/* start of the kernel processed data */ | ||
| 1042 | 		mach_msg_body_t msgh_body; | ||
| 1043 | 		mach_msg_ool_descriptor_t lockgroup_info; | ||
| 1044 | 		/* end of the kernel processed data */ | ||
| 1045 | 		NDR_record_t NDR; | ||
| 1046 | 		mach_msg_type_number_t lockgroup_infoCnt; | ||
| 1047 | 	} __Reply__host_lockgroup_info_t __attribute__((unused)); | ||
| 1048 | #ifdef __MigPackStructs | ||
| 1049 | #pragma pack(pop) | ||
| 1050 | #endif | ||
| 1051 | |||
| 1052 | #ifdef __MigPackStructs | ||
| 1053 | #pragma pack(push, 4) | ||
| 1054 | #endif | ||
| 1055 | 	typedef struct { | ||
| 1056 | 		mach_msg_header_t Head; | ||
| 1057 | 		NDR_record_t NDR; | ||
| 1058 | 		kern_return_t RetCode; | ||
| 1059 | 		mach_msg_type_number_t host_info64_outCnt; | ||
| 1060 | 		integer_t host_info64_out[256]; | ||
| 1061 | 	} __Reply__host_statistics64_t __attribute__((unused)); | ||
| 1062 | #ifdef __MigPackStructs | ||
| 1063 | #pragma pack(pop) | ||
| 1064 | #endif | ||
| 1065 | |||
| 1066 | #ifdef __MigPackStructs | ||
| 1067 | #pragma pack(push, 4) | ||
| 1068 | #endif | ||
| 1069 | 	typedef struct { | ||
| 1070 | 		mach_msg_header_t Head; | ||
| 1071 | 		/* start of the kernel processed data */ | ||
| 1072 | 		mach_msg_body_t msgh_body; | ||
| 1073 | 		mach_msg_ool_descriptor_t names; | ||
| 1074 | 		mach_msg_ool_descriptor_t info; | ||
| 1075 | 		/* end of the kernel processed data */ | ||
| 1076 | 		NDR_record_t NDR; | ||
| 1077 | 		mach_msg_type_number_t namesCnt; | ||
| 1078 | 		mach_msg_type_number_t infoCnt; | ||
| 1079 | 	} __Reply__mach_zone_info_t __attribute__((unused)); | ||
| 1080 | #ifdef __MigPackStructs | ||
| 1081 | #pragma pack(pop) | ||
| 1082 | #endif | ||
| 1083 | |||
| 1084 | #ifdef __MigPackStructs | ||
| 1085 | #pragma pack(push, 4) | ||
| 1086 | #endif | ||
| 1087 | 	typedef struct { | ||
| 1088 | 		mach_msg_header_t Head; | ||
| 1089 | 		/* start of the kernel processed data */ | ||
| 1090 | 		mach_msg_body_t msgh_body; | ||
| 1091 | 		mach_msg_port_descriptor_t voucher; | ||
| 1092 | 		/* end of the kernel processed data */ | ||
| 1093 | 	} __Reply__host_create_mach_voucher_t __attribute__((unused)); | ||
| 1094 | #ifdef __MigPackStructs | ||
| 1095 | #pragma pack(pop) | ||
| 1096 | #endif | ||
| 1097 | |||
| 1098 | #ifdef __MigPackStructs | ||
| 1099 | #pragma pack(push, 4) | ||
| 1100 | #endif | ||
| 1101 | 	typedef struct { | ||
| 1102 | 		mach_msg_header_t Head; | ||
| 1103 | 		/* start of the kernel processed data */ | ||
| 1104 | 		mach_msg_body_t msgh_body; | ||
| 1105 | 		mach_msg_port_descriptor_t new_attr_control; | ||
| 1106 | 		/* end of the kernel processed data */ | ||
| 1107 | 		NDR_record_t NDR; | ||
| 1108 | 		mach_voucher_attr_key_t new_key; | ||
| 1109 | 	} __Reply__host_register_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 1110 | #ifdef __MigPackStructs | ||
| 1111 | #pragma pack(pop) | ||
| 1112 | #endif | ||
| 1113 | |||
| 1114 | #ifdef __MigPackStructs | ||
| 1115 | #pragma pack(push, 4) | ||
| 1116 | #endif | ||
| 1117 | 	typedef struct { | ||
| 1118 | 		mach_msg_header_t Head; | ||
| 1119 | 		/* start of the kernel processed data */ | ||
| 1120 | 		mach_msg_body_t msgh_body; | ||
| 1121 | 		mach_msg_port_descriptor_t new_attr_control; | ||
| 1122 | 		/* end of the kernel processed data */ | ||
| 1123 | 	} __Reply__host_register_well_known_mach_voucher_attr_manager_t __attribute__((unused)); | ||
| 1124 | #ifdef __MigPackStructs | ||
| 1125 | #pragma pack(pop) | ||
| 1126 | #endif | ||
| 1127 | |||
| 1128 | #ifdef __MigPackStructs | ||
| 1129 | #pragma pack(push, 4) | ||
| 1130 | #endif | ||
| 1131 | 	typedef struct { | ||
| 1132 | 		mach_msg_header_t Head; | ||
| 1133 | 		NDR_record_t NDR; | ||
| 1134 | 		kern_return_t RetCode; | ||
| 1135 | 	} __Reply__host_set_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 1136 | #ifdef __MigPackStructs | ||
| 1137 | #pragma pack(pop) | ||
| 1138 | #endif | ||
| 1139 | |||
| 1140 | #ifdef __MigPackStructs | ||
| 1141 | #pragma pack(push, 4) | ||
| 1142 | #endif | ||
| 1143 | 	typedef struct { | ||
| 1144 | 		mach_msg_header_t Head; | ||
| 1145 | 		NDR_record_t NDR; | ||
| 1146 | 		kern_return_t RetCode; | ||
| 1147 | 		uint32_t diagnostic_flag; | ||
| 1148 | 	} __Reply__host_get_atm_diagnostic_flag_t __attribute__((unused)); | ||
| 1149 | #ifdef __MigPackStructs | ||
| 1150 | #pragma pack(pop) | ||
| 1151 | #endif | ||
| 1152 | |||
| 1153 | #ifdef __MigPackStructs | ||
| 1154 | #pragma pack(push, 4) | ||
| 1155 | #endif | ||
| 1156 | 	typedef struct { | ||
| 1157 | 		mach_msg_header_t Head; | ||
| 1158 | 		/* start of the kernel processed data */ | ||
| 1159 | 		mach_msg_body_t msgh_body; | ||
| 1160 | 		mach_msg_ool_descriptor_t names; | ||
| 1161 | 		mach_msg_ool_descriptor_t info; | ||
| 1162 | 		mach_msg_ool_descriptor_t memory_info; | ||
| 1163 | 		/* end of the kernel processed data */ | ||
| 1164 | 		NDR_record_t NDR; | ||
| 1165 | 		mach_msg_type_number_t namesCnt; | ||
| 1166 | 		mach_msg_type_number_t infoCnt; | ||
| 1167 | 		mach_msg_type_number_t memory_infoCnt; | ||
| 1168 | 	} __Reply__mach_memory_info_t __attribute__((unused)); | ||
| 1169 | #ifdef __MigPackStructs | ||
| 1170 | #pragma pack(pop) | ||
| 1171 | #endif | ||
| 1172 | |||
| 1173 | #ifdef __MigPackStructs | ||
| 1174 | #pragma pack(push, 4) | ||
| 1175 | #endif | ||
| 1176 | 	typedef struct { | ||
| 1177 | 		mach_msg_header_t Head; | ||
| 1178 | 		NDR_record_t NDR; | ||
| 1179 | 		kern_return_t RetCode; | ||
| 1180 | 	} __Reply__host_set_multiuser_config_flags_t __attribute__((unused)); | ||
| 1181 | #ifdef __MigPackStructs | ||
| 1182 | #pragma pack(pop) | ||
| 1183 | #endif | ||
| 1184 | |||
| 1185 | #ifdef __MigPackStructs | ||
| 1186 | #pragma pack(push, 4) | ||
| 1187 | #endif | ||
| 1188 | 	typedef struct { | ||
| 1189 | 		mach_msg_header_t Head; | ||
| 1190 | 		NDR_record_t NDR; | ||
| 1191 | 		kern_return_t RetCode; | ||
| 1192 | 		uint32_t multiuser_flags; | ||
| 1193 | 	} __Reply__host_get_multiuser_config_flags_t __attribute__((unused)); | ||
| 1194 | #ifdef __MigPackStructs | ||
| 1195 | #pragma pack(pop) | ||
| 1196 | #endif | ||
| 1197 | |||
| 1198 | #ifdef __MigPackStructs | ||
| 1199 | #pragma pack(push, 4) | ||
| 1200 | #endif | ||
| 1201 | 	typedef struct { | ||
| 1202 | 		mach_msg_header_t Head; | ||
| 1203 | 		NDR_record_t NDR; | ||
| 1204 | 		kern_return_t RetCode; | ||
| 1205 | 		uint32_t multiuser_mode; | ||
| 1206 | 	} __Reply__host_check_multiuser_mode_t __attribute__((unused)); | ||
| 1207 | #ifdef __MigPackStructs | ||
| 1208 | #pragma pack(pop) | ||
| 1209 | #endif | ||
| 1210 | |||
| 1211 | #ifdef __MigPackStructs | ||
| 1212 | #pragma pack(push, 4) | ||
| 1213 | #endif | ||
| 1214 | 	typedef struct { | ||
| 1215 | 		mach_msg_header_t Head; | ||
| 1216 | 		NDR_record_t NDR; | ||
| 1217 | 		kern_return_t RetCode; | ||
| 1218 | 		mach_zone_info_t info; | ||
| 1219 | 	} __Reply__mach_zone_info_for_zone_t __attribute__((unused)); | ||
| 1220 | #ifdef __MigPackStructs | ||
| 1221 | #pragma pack(pop) | ||
| 1222 | #endif | ||
| 1223 | #endif /* !__Reply__mach_host_subsystem__defined */ | ||
| 1224 | |||
| 1225 | /* union of all replies */ | ||
| 1226 | |||
| 1227 | #ifndef __ReplyUnion__mach_host_subsystem__defined | ||
| 1228 | #define __ReplyUnion__mach_host_subsystem__defined | ||
| 1229 | union __ReplyUnion__mach_host_subsystem { | ||
| 1230 | 	__Reply__host_info_t Reply_host_info; | ||
| 1231 | 	__Reply__host_kernel_version_t Reply_host_kernel_version; | ||
| 1232 | 	__Reply___host_page_size_t Reply__host_page_size; | ||
| 1233 | 	__Reply__mach_memory_object_memory_entry_t Reply_mach_memory_object_memory_entry; | ||
| 1234 | 	__Reply__host_processor_info_t Reply_host_processor_info; | ||
| 1235 | 	__Reply__host_get_io_master_t Reply_host_get_io_master; | ||
| 1236 | 	__Reply__host_get_clock_service_t Reply_host_get_clock_service; | ||
| 1237 | 	__Reply__kmod_get_info_t Reply_kmod_get_info; | ||
| 1238 | 	__Reply__host_virtual_physical_table_info_t Reply_host_virtual_physical_table_info; | ||
| 1239 | 	__Reply__processor_set_default_t Reply_processor_set_default; | ||
| 1240 | 	__Reply__processor_set_create_t Reply_processor_set_create; | ||
| 1241 | 	__Reply__mach_memory_object_memory_entry_64_t Reply_mach_memory_object_memory_entry_64; | ||
| 1242 | 	__Reply__host_statistics_t Reply_host_statistics; | ||
| 1243 | 	__Reply__host_request_notification_t Reply_host_request_notification; | ||
| 1244 | 	__Reply__host_lockgroup_info_t Reply_host_lockgroup_info; | ||
| 1245 | 	__Reply__host_statistics64_t Reply_host_statistics64; | ||
| 1246 | 	__Reply__mach_zone_info_t Reply_mach_zone_info; | ||
| 1247 | 	__Reply__host_create_mach_voucher_t Reply_host_create_mach_voucher; | ||
| 1248 | 	__Reply__host_register_mach_voucher_attr_manager_t Reply_host_register_mach_voucher_attr_manager; | ||
| 1249 | 	__Reply__host_register_well_known_mach_voucher_attr_manager_t Reply_host_register_well_known_mach_voucher_attr_manager; | ||
| 1250 | 	__Reply__host_set_atm_diagnostic_flag_t Reply_host_set_atm_diagnostic_flag; | ||
| 1251 | 	__Reply__host_get_atm_diagnostic_flag_t Reply_host_get_atm_diagnostic_flag; | ||
| 1252 | 	__Reply__mach_memory_info_t Reply_mach_memory_info; | ||
| 1253 | 	__Reply__host_set_multiuser_config_flags_t Reply_host_set_multiuser_config_flags; | ||
| 1254 | 	__Reply__host_get_multiuser_config_flags_t Reply_host_get_multiuser_config_flags; | ||
| 1255 | 	__Reply__host_check_multiuser_mode_t Reply_host_check_multiuser_mode; | ||
| 1256 | 	__Reply__mach_zone_info_for_zone_t Reply_mach_zone_info_for_zone; | ||
| 1257 | }; | ||
| 1258 | #endif /* !__RequestUnion__mach_host_subsystem__defined */ | ||
| 1259 | |||
| 1260 | #ifndef subsystem_to_name_map_mach_host | ||
| 1261 | #define subsystem_to_name_map_mach_host \ | ||
| 1262 | { "host_info", 200 },\ | ||
| 1263 | { "host_kernel_version", 201 },\ | ||
| 1264 | { "_host_page_size", 202 },\ | ||
| 1265 | { "mach_memory_object_memory_entry", 203 },\ | ||
| 1266 | { "host_processor_info", 204 },\ | ||
| 1267 | { "host_get_io_master", 205 },\ | ||
| 1268 | { "host_get_clock_service", 206 },\ | ||
| 1269 | { "kmod_get_info", 207 },\ | ||
| 1270 | { "host_virtual_physical_table_info", 209 },\ | ||
| 1271 | { "processor_set_default", 213 },\ | ||
| 1272 | { "processor_set_create", 214 },\ | ||
| 1273 | { "mach_memory_object_memory_entry_64", 215 },\ | ||
| 1274 | { "host_statistics", 216 },\ | ||
| 1275 | { "host_request_notification", 217 },\ | ||
| 1276 | { "host_lockgroup_info", 218 },\ | ||
| 1277 | { "host_statistics64", 219 },\ | ||
| 1278 | { "mach_zone_info", 220 },\ | ||
| 1279 | { "host_create_mach_voucher", 222 },\ | ||
| 1280 | { "host_register_mach_voucher_attr_manager", 223 },\ | ||
| 1281 | { "host_register_well_known_mach_voucher_attr_manager", 224 },\ | ||
| 1282 | { "host_set_atm_diagnostic_flag", 225 },\ | ||
| 1283 | { "host_get_atm_diagnostic_flag", 226 },\ | ||
| 1284 | { "mach_memory_info", 227 },\ | ||
| 1285 | { "host_set_multiuser_config_flags", 228 },\ | ||
| 1286 | { "host_get_multiuser_config_flags", 229 },\ | ||
| 1287 | { "host_check_multiuser_mode", 230 },\ | ||
| 1288 | { "mach_zone_info_for_zone", 231 } | ||
| 1289 | #endif | ||
| 1290 | |||
| 1291 | #ifdef __AfterMigUserHeader | ||
| 1292 | __AfterMigUserHeader | ||
| 1293 | #endif /* __AfterMigUserHeader */ | ||
| 1294 | |||
| 1295 | #endif	 /* _mach_host_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/mach_voucher_types.h created+245| ... | @@ -0,0 +1,245 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2013 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_VOUCHER_TYPES_H_ | ||
| 30 | #define _MACH_VOUCHER_TYPES_H_ | ||
| 31 | |||
| 32 | #include <mach/std_types.h> | ||
| 33 | #include <mach/port.h> | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Mach Voucher - an immutable collection of attribute value handles. | ||
| 37 | * | ||
| 38 | * The mach voucher is such that it can be passed between processes | ||
| 39 | * as a Mach port send right (by convention in the mach_msg_header_t’s | ||
| 40 | * msgh_voucher field). | ||
| 41 | * | ||
| 42 | * You may construct a new mach voucher by passing a construction | ||
| 43 | * recipe to host_create_mach_voucher(). The construction recipe supports | ||
| 44 | * generic commands for copying, removing, and redeeming attribute value | ||
| 45 | * handles from previous vouchers, or running attribute-mananger-specific | ||
| 46 | * commands within the recipe. | ||
| 47 | * | ||
| 48 | * Once the set of attribute value handles is constructed and returned, | ||
| 49 | * that set will not change for the life of the voucher (just because the | ||
| 50 | * attribute value handle itself doesn't change, the value the handle refers | ||
| 51 | * to is free to change at will). | ||
| 52 | */ | ||
| 53 | typedef mach_port_t mach_voucher_t; | ||
| 54 | #define MACH_VOUCHER_NULL ((mach_voucher_t) 0) | ||
| 55 | |||
| 56 | typedef mach_port_name_t mach_voucher_name_t; | ||
| 57 | #define MACH_VOUCHER_NAME_NULL ((mach_voucher_name_t) 0) | ||
| 58 | |||
| 59 | typedef mach_voucher_name_t *mach_voucher_name_array_t; | ||
| 60 | #define MACH_VOUCHER_NAME_ARRAY_NULL ((mach_voucher_name_array_t) 0) | ||
| 61 | |||
| 62 | /* | ||
| 63 | * This type changes appearance between user-space and kernel. It is | ||
| 64 | * a port at user-space and a reference to an ipc_voucher structure in-kernel. | ||
| 65 | */ | ||
| 66 | typedef mach_voucher_t ipc_voucher_t; | ||
| 67 | #define IPC_VOUCHER_NULL ((ipc_voucher_t) 0) | ||
| 68 | |||
| 69 | /* | ||
| 70 | * mach_voucher_selector_t - A means of specifying which thread/task value to extract - | ||
| 71 | * the current voucher set at this level, or a voucher representing | ||
| 72 | * the full [layered] effective value for the task/thread. | ||
| 73 | */ | ||
| 74 | typedef uint32_t mach_voucher_selector_t; | ||
| 75 | #define MACH_VOUCHER_SELECTOR_CURRENT ((mach_voucher_selector_t)0) | ||
| 76 | #define MACH_VOUCHER_SELECTOR_EFFECTIVE ((mach_voucher_selector_t)1) | ||
| 77 | |||
| 78 | |||
| 79 | /* | ||
| 80 | * mach_voucher_attr_key_t - The key used to identify a particular managed resource or | ||
| 81 | * to select the specific resource manager’s data associated | ||
| 82 | * with a given voucher. | ||
| 83 | */ | ||
| 84 | typedef uint32_t mach_voucher_attr_key_t; | ||
| 85 | typedef mach_voucher_attr_key_t *mach_voucher_attr_key_array_t; | ||
| 86 | |||
| 87 | #define MACH_VOUCHER_ATTR_KEY_ALL ((mach_voucher_attr_key_t)~0) | ||
| 88 | #define MACH_VOUCHER_ATTR_KEY_NONE ((mach_voucher_attr_key_t)0) | ||
| 89 | |||
| 90 | /* other well-known-keys will be added here */ | ||
| 91 | #define MACH_VOUCHER_ATTR_KEY_ATM ((mach_voucher_attr_key_t)1) | ||
| 92 | #define MACH_VOUCHER_ATTR_KEY_IMPORTANCE ((mach_voucher_attr_key_t)2) | ||
| 93 | #define MACH_VOUCHER_ATTR_KEY_BANK ((mach_voucher_attr_key_t)3) | ||
| 94 | #define MACH_VOUCHER_ATTR_KEY_PTHPRIORITY ((mach_voucher_attr_key_t)4) | ||
| 95 | |||
| 96 | #define MACH_VOUCHER_ATTR_KEY_USER_DATA ((mach_voucher_attr_key_t)7) | ||
| 97 | #define MACH_VOUCHER_ATTR_KEY_BITS MACH_VOUCHER_ATTR_KEY_USER_DATA /* deprecated */ | ||
| 98 | #define MACH_VOUCHER_ATTR_KEY_TEST ((mach_voucher_attr_key_t)8) | ||
| 99 | |||
| 100 | #define MACH_VOUCHER_ATTR_KEY_NUM_WELL_KNOWN MACH_VOUCHER_ATTR_KEY_TEST | ||
| 101 | |||
| 102 | /* | ||
| 103 | * mach_voucher_attr_content_t | ||
| 104 | * | ||
| 105 | * Data passed to a resource manager for modifying an attribute | ||
| 106 | * value or returned from the resource manager in response to a | ||
| 107 | * request to externalize the current value for that attribute. | ||
| 108 | */ | ||
| 109 | typedef uint8_t *mach_voucher_attr_content_t; | ||
| 110 | typedef uint32_t mach_voucher_attr_content_size_t; | ||
| 111 | |||
| 112 | /* | ||
| 113 | * mach_voucher_attr_command_t - The private verbs implemented by each voucher | ||
| 114 | * attribute manager via mach_voucher_attr_command(). | ||
| 115 | */ | ||
| 116 | typedef uint32_t mach_voucher_attr_command_t; | ||
| 117 | |||
| 118 | /* | ||
| 119 | * mach_voucher_attr_recipe_command_t | ||
| 120 | * | ||
| 121 | * The verbs used to create/morph a voucher attribute value. | ||
| 122 | * We define some system-wide commands here - related to creation, and transport of | ||
| 123 | * vouchers and attributes. Additional commands can be defined by, and supported by, | ||
| 124 | * individual attribute resource managers. | ||
| 125 | */ | ||
| 126 | typedef uint32_t mach_voucher_attr_recipe_command_t; | ||
| 127 | typedef mach_voucher_attr_recipe_command_t *mach_voucher_attr_recipe_command_array_t; | ||
| 128 | |||
| 129 | #define MACH_VOUCHER_ATTR_NOOP ((mach_voucher_attr_recipe_command_t)0) | ||
| 130 | #define MACH_VOUCHER_ATTR_COPY ((mach_voucher_attr_recipe_command_t)1) | ||
| 131 | #define MACH_VOUCHER_ATTR_REMOVE ((mach_voucher_attr_recipe_command_t)2) | ||
| 132 | #define MACH_VOUCHER_ATTR_SET_VALUE_HANDLE ((mach_voucher_attr_recipe_command_t)3) | ||
| 133 | #define MACH_VOUCHER_ATTR_AUTO_REDEEM ((mach_voucher_attr_recipe_command_t)4) | ||
| 134 | #define MACH_VOUCHER_ATTR_SEND_PREPROCESS ((mach_voucher_attr_recipe_command_t)5) | ||
| 135 | |||
| 136 | /* redeem is on its way out? */ | ||
| 137 | #define MACH_VOUCHER_ATTR_REDEEM ((mach_voucher_attr_recipe_command_t)10) | ||
| 138 | |||
| 139 | /* recipe command(s) for importance attribute manager */ | ||
| 140 | #define MACH_VOUCHER_ATTR_IMPORTANCE_SELF ((mach_voucher_attr_recipe_command_t)200) | ||
| 141 | |||
| 142 | /* recipe command(s) for bit-store attribute manager */ | ||
| 143 | #define MACH_VOUCHER_ATTR_USER_DATA_STORE ((mach_voucher_attr_recipe_command_t)211) | ||
| 144 | #define MACH_VOUCHER_ATTR_BITS_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE /* deprecated */ | ||
| 145 | |||
| 146 | /* recipe command(s) for test attribute manager */ | ||
| 147 | #define MACH_VOUCHER_ATTR_TEST_STORE MACH_VOUCHER_ATTR_USER_DATA_STORE | ||
| 148 | |||
| 149 | /* | ||
| 150 | * mach_voucher_attr_recipe_t | ||
| 151 | * | ||
| 152 | * An element in a recipe list to create a voucher. | ||
| 153 | */ | ||
| 154 | #pragma pack(push, 1) | ||
| 155 | |||
| 156 | typedef struct mach_voucher_attr_recipe_data { | ||
| 157 | 	mach_voucher_attr_key_t key; | ||
| 158 | 	mach_voucher_attr_recipe_command_t command; | ||
| 159 | 	mach_voucher_name_t previous_voucher; | ||
| 160 | 	mach_voucher_attr_content_size_t content_size; | ||
| 161 | 	uint8_t content[]; | ||
| 162 | } mach_voucher_attr_recipe_data_t; | ||
| 163 | typedef mach_voucher_attr_recipe_data_t *mach_voucher_attr_recipe_t; | ||
| 164 | typedef mach_msg_type_number_t mach_voucher_attr_recipe_size_t; | ||
| 165 | |||
| 166 | /* Make the above palatable to MIG */ | ||
| 167 | typedef uint8_t *mach_voucher_attr_raw_recipe_t; | ||
| 168 | typedef mach_voucher_attr_raw_recipe_t mach_voucher_attr_raw_recipe_array_t; | ||
| 169 | typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_size_t; | ||
| 170 | typedef mach_msg_type_number_t mach_voucher_attr_raw_recipe_array_size_t; | ||
| 171 | |||
| 172 | #define MACH_VOUCHER_ATTR_MAX_RAW_RECIPE_ARRAY_SIZE 5120 | ||
| 173 | #define MACH_VOUCHER_TRAP_STACK_LIMIT 256 | ||
| 174 | |||
| 175 | #pragma pack(pop) | ||
| 176 | |||
| 177 | /* | ||
| 178 | * VOUCHER ATTRIBUTE MANAGER Writer types | ||
| 179 | */ | ||
| 180 | |||
| 181 | /* | ||
| 182 | * mach_voucher_attr_manager_t | ||
| 183 | * | ||
| 184 | * A handle through which the mach voucher mechanism communicates with the voucher | ||
| 185 | * attribute manager for a given attribute key. | ||
| 186 | */ | ||
| 187 | typedef mach_port_t mach_voucher_attr_manager_t; | ||
| 188 | #define MACH_VOUCHER_ATTR_MANAGER_NULL ((mach_voucher_attr_manager_t) 0) | ||
| 189 | |||
| 190 | /* | ||
| 191 | * mach_voucher_attr_control_t | ||
| 192 | * | ||
| 193 | * A handle provided to the voucher attribute manager for a given attribute key | ||
| 194 | * through which it makes inquiries or control operations of the mach voucher mechanism. | ||
| 195 | */ | ||
| 196 | typedef mach_port_t mach_voucher_attr_control_t; | ||
| 197 | #define MACH_VOUCHER_ATTR_CONTROL_NULL ((mach_voucher_attr_control_t) 0) | ||
| 198 | |||
| 199 | /* | ||
| 200 | * These types are different in-kernel vs user-space. They are ports in user-space, | ||
| 201 | * pointers to opaque structs in most of the kernel, and pointers to known struct | ||
| 202 | * types in the Mach portion of the kernel. | ||
| 203 | */ | ||
| 204 | typedef mach_port_t ipc_voucher_attr_manager_t; | ||
| 205 | typedef mach_port_t ipc_voucher_attr_control_t; | ||
| 206 | #define IPC_VOUCHER_ATTR_MANAGER_NULL ((ipc_voucher_attr_manager_t) 0) | ||
| 207 | #define IPC_VOUCHER_ATTR_CONTROL_NULL ((ipc_voucher_attr_control_t) 0) | ||
| 208 | |||
| 209 | /* | ||
| 210 | * mach_voucher_attr_value_handle_t | ||
| 211 | * | ||
| 212 | * The private handle that the voucher attribute manager provides to | ||
| 213 | * the mach voucher mechanism to represent a given attr content/value. | ||
| 214 | */ | ||
| 215 | typedef uint64_t mach_voucher_attr_value_handle_t; | ||
| 216 | typedef mach_voucher_attr_value_handle_t *mach_voucher_attr_value_handle_array_t; | ||
| 217 | |||
| 218 | typedef mach_msg_type_number_t mach_voucher_attr_value_handle_array_size_t; | ||
| 219 | #define MACH_VOUCHER_ATTR_VALUE_MAX_NESTED ((mach_voucher_attr_value_handle_array_size_t)4) | ||
| 220 | |||
| 221 | typedef uint32_t mach_voucher_attr_value_reference_t; | ||
| 222 | typedef uint32_t mach_voucher_attr_value_flags_t; | ||
| 223 | #define MACH_VOUCHER_ATTR_VALUE_FLAGS_NONE ((mach_voucher_attr_value_flags_t)0) | ||
| 224 | #define MACH_VOUCHER_ATTR_VALUE_FLAGS_PERSIST ((mach_voucher_attr_value_flags_t)1) | ||
| 225 | |||
| 226 | /* USE - TBD */ | ||
| 227 | typedef uint32_t mach_voucher_attr_control_flags_t; | ||
| 228 | #define MACH_VOUCHER_ATTR_CONTROL_FLAGS_NONE ((mach_voucher_attr_control_flags_t)0) | ||
| 229 | |||
| 230 | /* | ||
| 231 | * Commands and types for the IPC Importance Attribute Manager | ||
| 232 | * | ||
| 233 | * These are the valid mach_voucher_attr_command() options with the | ||
| 234 | * MACH_VOUCHER_ATTR_KEY_IMPORTANCE key. | ||
| 235 | */ | ||
| 236 | #define MACH_VOUCHER_IMPORTANCE_ATTR_ADD_EXTERNAL 1 /* Add some number of external refs (not supported) */ | ||
| 237 | #define MACH_VOUCHER_IMPORTANCE_ATTR_DROP_EXTERNAL 2 /* Drop some number of external refs */ | ||
| 238 | typedef uint32_t mach_voucher_attr_importance_refs; | ||
| 239 | |||
| 240 | /* | ||
| 241 | * Activity id Generation defines | ||
| 242 | */ | ||
| 243 | #define MACH_ACTIVITY_ID_COUNT_MAX 16 | ||
| 244 | |||
| 245 | #endif /* _MACH_VOUCHER_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/mig.h created+180| ... | @@ -0,0 +1,180 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | |||
| 32 | /* | ||
| 33 | * Mach MIG Subsystem Interfaces | ||
| 34 | */ | ||
| 35 | |||
| 36 | #ifndef _MACH_MIG_H_ | ||
| 37 | #define _MACH_MIG_H_ | ||
| 38 | |||
| 39 | #include <stdint.h> | ||
| 40 | #include <mach/port.h> | ||
| 41 | #include <mach/message.h> | ||
| 42 | #include <mach/vm_types.h> | ||
| 43 | |||
| 44 | #include <sys/cdefs.h> | ||
| 45 | |||
| 46 | #if defined(MACH_KERNEL) | ||
| 47 | |||
| 48 | #if !defined(__MigTypeCheck) | ||
| 49 | /* Turn MIG type checking on by default for kernel */ | ||
| 50 | #define __MigTypeCheck 1 | ||
| 51 | #endif | ||
| 52 | |||
| 53 | #define __MigKernelSpecificCode 1 | ||
| 54 | #define _MIG_KERNEL_SPECIFIC_CODE_ 1 | ||
| 55 | |||
| 56 | #elif !defined(__MigTypeCheck) | ||
| 57 | |||
| 58 | #if defined(TypeCheck) | ||
| 59 | /* use legacy setting (temporary) */ | ||
| 60 | #define __MigTypeCheck TypeCheck | ||
| 61 | #else | ||
| 62 | /* default MIG type checking on */ | ||
| 63 | #define __MigTypeCheck 1 | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #endif /* !defined(MACH_KERNEL) && !defined(__MigTypeCheck) */ | ||
| 67 | |||
| 68 | /* | ||
| 69 | * Pack MIG message structs. | ||
| 70 | * This is an indicator of the need to view shared structs in a | ||
| 71 | * binary-compatible format - and MIG message structs are no different. | ||
| 72 | */ | ||
| 73 | #define __MigPackStructs 1 | ||
| 74 | |||
| 75 | /* | ||
| 76 | * Definition for MIG-generated server stub routines. These routines | ||
| 77 | * unpack the request message, call the server procedure, and pack the | ||
| 78 | * reply message. | ||
| 79 | */ | ||
| 80 | typedef void (*mig_stub_routine_t) (mach_msg_header_t *InHeadP, | ||
| 81 | mach_msg_header_t *OutHeadP); | ||
| 82 | |||
| 83 | typedef mig_stub_routine_t mig_routine_t; | ||
| 84 | |||
| 85 | /* | ||
| 86 | * Definition for MIG-generated server routine. This routine takes a | ||
| 87 | * message, and returns the appropriate stub function for handling that | ||
| 88 | * message. | ||
| 89 | */ | ||
| 90 | typedef mig_routine_t (*mig_server_routine_t) (mach_msg_header_t *InHeadP); | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Generic definition for implementation routines. These routines do | ||
| 94 | * the real work associated with this request. This generic type is | ||
| 95 | * used for keeping the pointers in the subsystem array. | ||
| 96 | */ | ||
| 97 | typedef kern_return_t (*mig_impl_routine_t)(void); | ||
| 98 | |||
| 99 | typedef mach_msg_type_descriptor_t routine_arg_descriptor; | ||
| 100 | typedef mach_msg_type_descriptor_t *routine_arg_descriptor_t; | ||
| 101 | typedef mach_msg_type_descriptor_t *mig_routine_arg_descriptor_t; | ||
| 102 | |||
| 103 | #define MIG_ROUTINE_ARG_DESCRIPTOR_NULL ((mig_routine_arg_descriptor_t)0) | ||
| 104 | |||
| 105 | struct routine_descriptor { | ||
| 106 | 	mig_impl_routine_t impl_routine; /* Server work func pointer */ | ||
| 107 | 	mig_stub_routine_t stub_routine; /* Unmarshalling func pointer */ | ||
| 108 | 	unsigned int argc; /* Number of argument words */ | ||
| 109 | 	unsigned int descr_count; /* Number complex descriptors */ | ||
| 110 | 	routine_arg_descriptor_t | ||
| 111 | 	 arg_descr; /* pointer to descriptor array*/ | ||
| 112 | 	unsigned int max_reply_msg; /* Max size for reply msg */ | ||
| 113 | }; | ||
| 114 | typedef struct routine_descriptor *routine_descriptor_t; | ||
| 115 | |||
| 116 | typedef struct routine_descriptor mig_routine_descriptor; | ||
| 117 | typedef mig_routine_descriptor *mig_routine_descriptor_t; | ||
| 118 | |||
| 119 | #define MIG_ROUTINE_DESCRIPTOR_NULL ((mig_routine_descriptor_t)0) | ||
| 120 | |||
| 121 | typedef struct mig_subsystem { | ||
| 122 | 	mig_server_routine_t server; /* pointer to demux routine	*/ | ||
| 123 | 	mach_msg_id_t start; /* Min routine number	 */ | ||
| 124 | 	mach_msg_id_t end; /* Max routine number + 1 */ | ||
| 125 | 	mach_msg_size_t maxsize; /* Max reply message size */ | ||
| 126 | 	vm_address_t reserved; /* reserved for MIG use	 */ | ||
| 127 | 	mig_routine_descriptor | ||
| 128 | 	 routine[1]; /* Routine descriptor array */ | ||
| 129 | } *mig_subsystem_t; | ||
| 130 | |||
| 131 | #define MIG_SUBSYSTEM_NULL ((mig_subsystem_t)0) | ||
| 132 | |||
| 133 | typedef struct mig_symtab { | ||
| 134 | 	char *ms_routine_name; | ||
| 135 | 	int ms_routine_number; | ||
| 136 | 	void (*ms_routine)(void); /* Since the functions in the | ||
| 137 | 	 * symbol table have unknown | ||
| 138 | 	 * signatures, this is the best | ||
| 139 | 	 * we can do... | ||
| 140 | 	 */ | ||
| 141 | } mig_symtab_t; | ||
| 142 | |||
| 143 | /* | ||
| 144 | * A compiler attribute for annotating all MIG server routines and other | ||
| 145 | * functions that should behave similarly. Allows the compiler to perform | ||
| 146 | * additional static bug-finding over them. | ||
| 147 | */ | ||
| 148 | #if __has_attribute(mig_server_routine) | ||
| 149 | #define MIG_SERVER_ROUTINE __attribute__((mig_server_routine)) | ||
| 150 | #else | ||
| 151 | #define MIG_SERVER_ROUTINE | ||
| 152 | #endif | ||
| 153 | |||
| 154 | |||
| 155 | __BEGIN_DECLS | ||
| 156 | |||
| 157 | /* Client side reply port allocate */ | ||
| 158 | extern mach_port_t mig_get_reply_port(void); | ||
| 159 | |||
| 160 | /* Client side reply port deallocate */ | ||
| 161 | extern void mig_dealloc_reply_port(mach_port_t reply_port); | ||
| 162 | |||
| 163 | /* Client side reply port "deallocation" */ | ||
| 164 | extern void mig_put_reply_port(mach_port_t reply_port); | ||
| 165 | |||
| 166 | /* Bounded string copy */ | ||
| 167 | extern int mig_strncpy(char *dest, const char *src, int len); | ||
| 168 | extern int mig_strncpy_zerofill(char *dest, const char *src, int len); | ||
| 169 | |||
| 170 | |||
| 171 | /* Allocate memory for out-of-line mig structures */ | ||
| 172 | extern void mig_allocate(vm_address_t *, vm_size_t); | ||
| 173 | |||
| 174 | /* Deallocate memory used for out-of-line mig structures */ | ||
| 175 | extern void mig_deallocate(vm_address_t, vm_size_t); | ||
| 176 | |||
| 177 | |||
| 178 | __END_DECLS | ||
| 179 | |||
| 180 | #endif /* _MACH_MIG_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/processor.h created+360| ... | @@ -0,0 +1,360 @@ | ||
| 1 | #ifndef	_processor_user_ | ||
| 2 | #define	_processor_user_ | ||
| 3 | |||
| 4 | /* Module processor */ | ||
| 5 | |||
| 6 | #include <string.h> | ||
| 7 | #include <mach/ndr.h> | ||
| 8 | #include <mach/boolean.h> | ||
| 9 | #include <mach/kern_return.h> | ||
| 10 | #include <mach/notify.h> | ||
| 11 | #include <mach/mach_types.h> | ||
| 12 | #include <mach/message.h> | ||
| 13 | #include <mach/mig_errors.h> | ||
| 14 | #include <mach/port.h> | ||
| 15 | 	 | ||
| 16 | /* BEGIN MIG_STRNCPY_ZEROFILL CODE */ | ||
| 17 | |||
| 18 | #if defined(__has_include) | ||
| 19 | #if __has_include(<mach/mig_strncpy_zerofill_support.h>) | ||
| 20 | #ifndef USING_MIG_STRNCPY_ZEROFILL | ||
| 21 | #define USING_MIG_STRNCPY_ZEROFILL | ||
| 22 | #endif | ||
| 23 | #ifndef __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 24 | #define __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ | ||
| 25 | #ifdef __cplusplus | ||
| 26 | extern "C" { | ||
| 27 | #endif | ||
| 28 | 	extern int mig_strncpy_zerofill(char *dest, const char *src, int len) __attribute__((weak_import)); | ||
| 29 | #ifdef __cplusplus | ||
| 30 | } | ||
| 31 | #endif | ||
| 32 | #endif /* __MIG_STRNCPY_ZEROFILL_FORWARD_TYPE_DECLS__ */ | ||
| 33 | #endif /* __has_include(<mach/mig_strncpy_zerofill_support.h>) */ | ||
| 34 | #endif /* __has_include */ | ||
| 35 | 	 | ||
| 36 | /* END MIG_STRNCPY_ZEROFILL CODE */ | ||
| 37 | |||
| 38 | |||
| 39 | #ifdef AUTOTEST | ||
| 40 | #ifndef FUNCTION_PTR_T | ||
| 41 | #define FUNCTION_PTR_T | ||
| 42 | typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); | ||
| 43 | typedef struct { | ||
| 44 | char *name; | ||
| 45 | function_ptr_t function; | ||
| 46 | } function_table_entry; | ||
| 47 | typedef function_table_entry *function_table_t; | ||
| 48 | #endif /* FUNCTION_PTR_T */ | ||
| 49 | #endif /* AUTOTEST */ | ||
| 50 | |||
| 51 | #ifndef	processor_MSG_COUNT | ||
| 52 | #define	processor_MSG_COUNT	6 | ||
| 53 | #endif	/* processor_MSG_COUNT */ | ||
| 54 | |||
| 55 | #include <mach/std_types.h> | ||
| 56 | #include <mach/mig.h> | ||
| 57 | #include <mach/mig.h> | ||
| 58 | #include <mach/mach_types.h> | ||
| 59 | |||
| 60 | #ifdef __BeforeMigUserHeader | ||
| 61 | __BeforeMigUserHeader | ||
| 62 | #endif /* __BeforeMigUserHeader */ | ||
| 63 | |||
| 64 | #include <sys/cdefs.h> | ||
| 65 | __BEGIN_DECLS | ||
| 66 | |||
| 67 | |||
| 68 | /* Routine processor_start */ | ||
| 69 | #ifdef	mig_external | ||
| 70 | mig_external | ||
| 71 | #else | ||
| 72 | extern | ||
| 73 | #endif	/* mig_external */ | ||
| 74 | kern_return_t processor_start | ||
| 75 | ( | ||
| 76 | 	processor_t processor | ||
| 77 | ); | ||
| 78 | |||
| 79 | /* Routine processor_exit */ | ||
| 80 | #ifdef	mig_external | ||
| 81 | mig_external | ||
| 82 | #else | ||
| 83 | extern | ||
| 84 | #endif	/* mig_external */ | ||
| 85 | kern_return_t processor_exit | ||
| 86 | ( | ||
| 87 | 	processor_t processor | ||
| 88 | ); | ||
| 89 | |||
| 90 | /* Routine processor_info */ | ||
| 91 | #ifdef	mig_external | ||
| 92 | mig_external | ||
| 93 | #else | ||
| 94 | extern | ||
| 95 | #endif	/* mig_external */ | ||
| 96 | kern_return_t processor_info | ||
| 97 | ( | ||
| 98 | 	processor_t processor, | ||
| 99 | 	processor_flavor_t flavor, | ||
| 100 | 	host_t *host, | ||
| 101 | 	processor_info_t processor_info_out, | ||
| 102 | 	mach_msg_type_number_t *processor_info_outCnt | ||
| 103 | ); | ||
| 104 | |||
| 105 | /* Routine processor_control */ | ||
| 106 | #ifdef	mig_external | ||
| 107 | mig_external | ||
| 108 | #else | ||
| 109 | extern | ||
| 110 | #endif	/* mig_external */ | ||
| 111 | kern_return_t processor_control | ||
| 112 | ( | ||
| 113 | 	processor_t processor, | ||
| 114 | 	processor_info_t processor_cmd, | ||
| 115 | 	mach_msg_type_number_t processor_cmdCnt | ||
| 116 | ); | ||
| 117 | |||
| 118 | /* Routine processor_assign */ | ||
| 119 | #ifdef	mig_external | ||
| 120 | mig_external | ||
| 121 | #else | ||
| 122 | extern | ||
| 123 | #endif	/* mig_external */ | ||
| 124 | kern_return_t processor_assign | ||
| 125 | ( | ||
| 126 | 	processor_t processor, | ||
| 127 | 	processor_set_t new_set, | ||
| 128 | 	boolean_t wait | ||
| 129 | ); | ||
| 130 | |||
| 131 | /* Routine processor_get_assignment */ | ||
| 132 | #ifdef	mig_external | ||
| 133 | mig_external | ||
| 134 | #else | ||
| 135 | extern | ||
| 136 | #endif	/* mig_external */ | ||
| 137 | kern_return_t processor_get_assignment | ||
| 138 | ( | ||
| 139 | 	processor_t processor, | ||
| 140 | 	processor_set_name_t *assigned_set | ||
| 141 | ); | ||
| 142 | |||
| 143 | __END_DECLS | ||
| 144 | |||
| 145 | /********************** Caution **************************/ | ||
| 146 | /* The following data types should be used to calculate */ | ||
| 147 | /* maximum message sizes only. The actual message may be */ | ||
| 148 | /* smaller, and the position of the arguments within the */ | ||
| 149 | /* message layout may vary from what is presented here. */ | ||
| 150 | /* For example, if any of the arguments are variable- */ | ||
| 151 | /* sized, and less than the maximum is sent, the data */ | ||
| 152 | /* will be packed tight in the actual message to reduce */ | ||
| 153 | /* the presence of holes. */ | ||
| 154 | /********************** Caution **************************/ | ||
| 155 | |||
| 156 | /* typedefs for all requests */ | ||
| 157 | |||
| 158 | #ifndef __Request__processor_subsystem__defined | ||
| 159 | #define __Request__processor_subsystem__defined | ||
| 160 | |||
| 161 | #ifdef __MigPackStructs | ||
| 162 | #pragma pack(push, 4) | ||
| 163 | #endif | ||
| 164 | 	typedef struct { | ||
| 165 | 		mach_msg_header_t Head; | ||
| 166 | 	} __Request__processor_start_t __attribute__((unused)); | ||
| 167 | #ifdef __MigPackStructs | ||
| 168 | #pragma pack(pop) | ||
| 169 | #endif | ||
| 170 | |||
| 171 | #ifdef __MigPackStructs | ||
| 172 | #pragma pack(push, 4) | ||
| 173 | #endif | ||
| 174 | 	typedef struct { | ||
| 175 | 		mach_msg_header_t Head; | ||
| 176 | 	} __Request__processor_exit_t __attribute__((unused)); | ||
| 177 | #ifdef __MigPackStructs | ||
| 178 | #pragma pack(pop) | ||
| 179 | #endif | ||
| 180 | |||
| 181 | #ifdef __MigPackStructs | ||
| 182 | #pragma pack(push, 4) | ||
| 183 | #endif | ||
| 184 | 	typedef struct { | ||
| 185 | 		mach_msg_header_t Head; | ||
| 186 | 		NDR_record_t NDR; | ||
| 187 | 		processor_flavor_t flavor; | ||
| 188 | 		mach_msg_type_number_t processor_info_outCnt; | ||
| 189 | 	} __Request__processor_info_t __attribute__((unused)); | ||
| 190 | #ifdef __MigPackStructs | ||
| 191 | #pragma pack(pop) | ||
| 192 | #endif | ||
| 193 | |||
| 194 | #ifdef __MigPackStructs | ||
| 195 | #pragma pack(push, 4) | ||
| 196 | #endif | ||
| 197 | 	typedef struct { | ||
| 198 | 		mach_msg_header_t Head; | ||
| 199 | 		NDR_record_t NDR; | ||
| 200 | 		mach_msg_type_number_t processor_cmdCnt; | ||
| 201 | 		integer_t processor_cmd[20]; | ||
| 202 | 	} __Request__processor_control_t __attribute__((unused)); | ||
| 203 | #ifdef __MigPackStructs | ||
| 204 | #pragma pack(pop) | ||
| 205 | #endif | ||
| 206 | |||
| 207 | #ifdef __MigPackStructs | ||
| 208 | #pragma pack(push, 4) | ||
| 209 | #endif | ||
| 210 | 	typedef struct { | ||
| 211 | 		mach_msg_header_t Head; | ||
| 212 | 		/* start of the kernel processed data */ | ||
| 213 | 		mach_msg_body_t msgh_body; | ||
| 214 | 		mach_msg_port_descriptor_t new_set; | ||
| 215 | 		/* end of the kernel processed data */ | ||
| 216 | 		NDR_record_t NDR; | ||
| 217 | 		boolean_t wait; | ||
| 218 | 	} __Request__processor_assign_t __attribute__((unused)); | ||
| 219 | #ifdef __MigPackStructs | ||
| 220 | #pragma pack(pop) | ||
| 221 | #endif | ||
| 222 | |||
| 223 | #ifdef __MigPackStructs | ||
| 224 | #pragma pack(push, 4) | ||
| 225 | #endif | ||
| 226 | 	typedef struct { | ||
| 227 | 		mach_msg_header_t Head; | ||
| 228 | 	} __Request__processor_get_assignment_t __attribute__((unused)); | ||
| 229 | #ifdef __MigPackStructs | ||
| 230 | #pragma pack(pop) | ||
| 231 | #endif | ||
| 232 | #endif /* !__Request__processor_subsystem__defined */ | ||
| 233 | |||
| 234 | /* union of all requests */ | ||
| 235 | |||
| 236 | #ifndef __RequestUnion__processor_subsystem__defined | ||
| 237 | #define __RequestUnion__processor_subsystem__defined | ||
| 238 | union __RequestUnion__processor_subsystem { | ||
| 239 | 	__Request__processor_start_t Request_processor_start; | ||
| 240 | 	__Request__processor_exit_t Request_processor_exit; | ||
| 241 | 	__Request__processor_info_t Request_processor_info; | ||
| 242 | 	__Request__processor_control_t Request_processor_control; | ||
| 243 | 	__Request__processor_assign_t Request_processor_assign; | ||
| 244 | 	__Request__processor_get_assignment_t Request_processor_get_assignment; | ||
| 245 | }; | ||
| 246 | #endif /* !__RequestUnion__processor_subsystem__defined */ | ||
| 247 | /* typedefs for all replies */ | ||
| 248 | |||
| 249 | #ifndef __Reply__processor_subsystem__defined | ||
| 250 | #define __Reply__processor_subsystem__defined | ||
| 251 | |||
| 252 | #ifdef __MigPackStructs | ||
| 253 | #pragma pack(push, 4) | ||
| 254 | #endif | ||
| 255 | 	typedef struct { | ||
| 256 | 		mach_msg_header_t Head; | ||
| 257 | 		NDR_record_t NDR; | ||
| 258 | 		kern_return_t RetCode; | ||
| 259 | 	} __Reply__processor_start_t __attribute__((unused)); | ||
| 260 | #ifdef __MigPackStructs | ||
| 261 | #pragma pack(pop) | ||
| 262 | #endif | ||
| 263 | |||
| 264 | #ifdef __MigPackStructs | ||
| 265 | #pragma pack(push, 4) | ||
| 266 | #endif | ||
| 267 | 	typedef struct { | ||
| 268 | 		mach_msg_header_t Head; | ||
| 269 | 		NDR_record_t NDR; | ||
| 270 | 		kern_return_t RetCode; | ||
| 271 | 	} __Reply__processor_exit_t __attribute__((unused)); | ||
| 272 | #ifdef __MigPackStructs | ||
| 273 | #pragma pack(pop) | ||
| 274 | #endif | ||
| 275 | |||
| 276 | #ifdef __MigPackStructs | ||
| 277 | #pragma pack(push, 4) | ||
| 278 | #endif | ||
| 279 | 	typedef struct { | ||
| 280 | 		mach_msg_header_t Head; | ||
| 281 | 		/* start of the kernel processed data */ | ||
| 282 | 		mach_msg_body_t msgh_body; | ||
| 283 | 		mach_msg_port_descriptor_t host; | ||
| 284 | 		/* end of the kernel processed data */ | ||
| 285 | 		NDR_record_t NDR; | ||
| 286 | 		mach_msg_type_number_t processor_info_outCnt; | ||
| 287 | 		integer_t processor_info_out[20]; | ||
| 288 | 	} __Reply__processor_info_t __attribute__((unused)); | ||
| 289 | #ifdef __MigPackStructs | ||
| 290 | #pragma pack(pop) | ||
| 291 | #endif | ||
| 292 | |||
| 293 | #ifdef __MigPackStructs | ||
| 294 | #pragma pack(push, 4) | ||
| 295 | #endif | ||
| 296 | 	typedef struct { | ||
| 297 | 		mach_msg_header_t Head; | ||
| 298 | 		NDR_record_t NDR; | ||
| 299 | 		kern_return_t RetCode; | ||
| 300 | 	} __Reply__processor_control_t __attribute__((unused)); | ||
| 301 | #ifdef __MigPackStructs | ||
| 302 | #pragma pack(pop) | ||
| 303 | #endif | ||
| 304 | |||
| 305 | #ifdef __MigPackStructs | ||
| 306 | #pragma pack(push, 4) | ||
| 307 | #endif | ||
| 308 | 	typedef struct { | ||
| 309 | 		mach_msg_header_t Head; | ||
| 310 | 		NDR_record_t NDR; | ||
| 311 | 		kern_return_t RetCode; | ||
| 312 | 	} __Reply__processor_assign_t __attribute__((unused)); | ||
| 313 | #ifdef __MigPackStructs | ||
| 314 | #pragma pack(pop) | ||
| 315 | #endif | ||
| 316 | |||
| 317 | #ifdef __MigPackStructs | ||
| 318 | #pragma pack(push, 4) | ||
| 319 | #endif | ||
| 320 | 	typedef struct { | ||
| 321 | 		mach_msg_header_t Head; | ||
| 322 | 		/* start of the kernel processed data */ | ||
| 323 | 		mach_msg_body_t msgh_body; | ||
| 324 | 		mach_msg_port_descriptor_t assigned_set; | ||
| 325 | 		/* end of the kernel processed data */ | ||
| 326 | 	} __Reply__processor_get_assignment_t __attribute__((unused)); | ||
| 327 | #ifdef __MigPackStructs | ||
| 328 | #pragma pack(pop) | ||
| 329 | #endif | ||
| 330 | #endif /* !__Reply__processor_subsystem__defined */ | ||
| 331 | |||
| 332 | /* union of all replies */ | ||
| 333 | |||
| 334 | #ifndef __ReplyUnion__processor_subsystem__defined | ||
| 335 | #define __ReplyUnion__processor_subsystem__defined | ||
| 336 | union __ReplyUnion__processor_subsystem { | ||
| 337 | 	__Reply__processor_start_t Reply_processor_start; | ||
| 338 | 	__Reply__processor_exit_t Reply_processor_exit; | ||
| 339 | 	__Reply__processor_info_t Reply_processor_info; | ||
| 340 | 	__Reply__processor_control_t Reply_processor_control; | ||
| 341 | 	__Reply__processor_assign_t Reply_processor_assign; | ||
| 342 | 	__Reply__processor_get_assignment_t Reply_processor_get_assignment; | ||
| 343 | }; | ||
| 344 | #endif /* !__RequestUnion__processor_subsystem__defined */ | ||
| 345 | |||
| 346 | #ifndef subsystem_to_name_map_processor | ||
| 347 | #define subsystem_to_name_map_processor \ | ||
| 348 | { "processor_start", 3000 },\ | ||
| 349 | { "processor_exit", 3001 },\ | ||
| 350 | { "processor_info", 3002 },\ | ||
| 351 | { "processor_control", 3003 },\ | ||
| 352 | { "processor_assign", 3004 },\ | ||
| 353 | { "processor_get_assignment", 3005 } | ||
| 354 | #endif | ||
| 355 | |||
| 356 | #ifdef __AfterMigUserHeader | ||
| 357 | __AfterMigUserHeader | ||
| 358 | #endif /* __AfterMigUserHeader */ | ||
| 359 | |||
| 360 | #endif	 /* _processor_user_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/sync_policy.h created+49| ... | @@ -0,0 +1,49 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | |||
| 32 | #ifndef _MACH_SYNC_POLICY_H_ | ||
| 33 | #define _MACH_SYNC_POLICY_H_ | ||
| 34 | |||
| 35 | typedef int sync_policy_t; | ||
| 36 | |||
| 37 | /* | ||
| 38 | *	These options define the wait ordering of the synchronizers | ||
| 39 | */ | ||
| 40 | #define SYNC_POLICY_FIFO 0x0 | ||
| 41 | #define SYNC_POLICY_FIXED_PRIORITY 0x1 | ||
| 42 | #define SYNC_POLICY_REVERSED 0x2 | ||
| 43 | #define SYNC_POLICY_ORDER_MASK 0x3 | ||
| 44 | #define SYNC_POLICY_LIFO (SYNC_POLICY_FIFO|SYNC_POLICY_REVERSED) | ||
| 45 | |||
| 46 | |||
| 47 | #define SYNC_POLICY_MAX 0x7 | ||
| 48 | |||
| 49 | #endif /* _MACH_SYNC_POLICY_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/task_inspect.h created+54| ... | @@ -0,0 +1,54 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2017 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef MACH_TASK_INSPECT_H | ||
| 30 | #define MACH_TASK_INSPECT_H | ||
| 31 | |||
| 32 | /* | ||
| 33 | * XXX These interfaces are still in development -- they are subject to change | ||
| 34 | * without notice. | ||
| 35 | */ | ||
| 36 | |||
| 37 | typedef natural_t task_inspect_flavor_t; | ||
| 38 | |||
| 39 | enum task_inspect_flavor { | ||
| 40 | 	TASK_INSPECT_BASIC_COUNTS = 1, | ||
| 41 | }; | ||
| 42 | |||
| 43 | struct task_inspect_basic_counts { | ||
| 44 | 	uint64_t instructions; | ||
| 45 | 	uint64_t cycles; | ||
| 46 | }; | ||
| 47 | #define TASK_INSPECT_BASIC_COUNTS_COUNT \ | ||
| 48 | 	(sizeof(struct task_inspect_basic_counts) / sizeof(natural_t)) | ||
| 49 | typedef struct task_inspect_basic_counts task_inspect_basic_counts_data_t; | ||
| 50 | typedef struct task_inspect_basic_counts *task_inspect_basic_counts_t; | ||
| 51 | |||
| 52 | typedef integer_t *task_inspect_info_t; | ||
| 53 | |||
| 54 | #endif /* !defined(MACH_TASK_INSPECT_H) */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/thread_policy.h created+266| ... | @@ -0,0 +1,266 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2007 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_THREAD_POLICY_H_ | ||
| 30 | #define _MACH_THREAD_POLICY_H_ | ||
| 31 | |||
| 32 | #include <mach/mach_types.h> | ||
| 33 | |||
| 34 | /* | ||
| 35 | * These are the calls for accessing the policy parameters | ||
| 36 | * of a particular thread. | ||
| 37 | * | ||
| 38 | * The extra 'get_default' parameter to the second call is | ||
| 39 | * IN/OUT as follows: | ||
| 40 | * 1) if asserted on the way in it indicates that the default | ||
| 41 | * values should be returned, not the ones currently set, in | ||
| 42 | * this case 'get_default' will always be asserted on return; | ||
| 43 | * 2) if unasserted on the way in, the current settings are | ||
| 44 | * desired and if still unasserted on return, then the info | ||
| 45 | * returned reflects the current settings, otherwise if | ||
| 46 | * 'get_default' returns asserted, it means that there are no | ||
| 47 | * current settings due to other parameters taking precedence, | ||
| 48 | * and the default ones are being returned instead. | ||
| 49 | */ | ||
| 50 | |||
| 51 | typedef natural_t thread_policy_flavor_t; | ||
| 52 | typedef integer_t *thread_policy_t; | ||
| 53 | |||
| 54 | /* | ||
| 55 | * kern_return_t	thread_policy_set( | ||
| 56 | * thread_t					thread, | ||
| 57 | * thread_policy_flavor_t		flavor, | ||
| 58 | * thread_policy_t				policy_info, | ||
| 59 | * mach_msg_type_number_t		count); | ||
| 60 | * | ||
| 61 | * kern_return_t	thread_policy_get( | ||
| 62 | * thread_t					thread, | ||
| 63 | * thread_policy_flavor_t		flavor, | ||
| 64 | * thread_policy_t				policy_info, | ||
| 65 | * mach_msg_type_number_t		*count, | ||
| 66 | * boolean_t					*get_default); | ||
| 67 | */ | ||
| 68 | |||
| 69 | /* | ||
| 70 | * Defined flavors. | ||
| 71 | */ | ||
| 72 | /* | ||
| 73 | * THREAD_STANDARD_POLICY: | ||
| 74 | * | ||
| 75 | * This is the standard (fair) scheduling mode, assigned to new | ||
| 76 | * threads. The thread will be given processor time in a manner | ||
| 77 | * which apportions approximately equal share to long running | ||
| 78 | * computations. | ||
| 79 | * | ||
| 80 | * Parameters: | ||
| 81 | *	[none] | ||
| 82 | */ | ||
| 83 | |||
| 84 | #define THREAD_STANDARD_POLICY 1 | ||
| 85 | |||
| 86 | struct thread_standard_policy { | ||
| 87 | 	natural_t no_data; | ||
| 88 | }; | ||
| 89 | |||
| 90 | typedef struct thread_standard_policy thread_standard_policy_data_t; | ||
| 91 | typedef struct thread_standard_policy *thread_standard_policy_t; | ||
| 92 | |||
| 93 | #define THREAD_STANDARD_POLICY_COUNT 0 | ||
| 94 | |||
| 95 | /* | ||
| 96 | * THREAD_EXTENDED_POLICY: | ||
| 97 | * | ||
| 98 | * Extended form of THREAD_STANDARD_POLICY, which supplies a | ||
| 99 | * hint indicating whether this is a long running computation. | ||
| 100 | * | ||
| 101 | * Parameters: | ||
| 102 | * | ||
| 103 | * timeshare: TRUE (the default) results in identical scheduling | ||
| 104 | * behavior as THREAD_STANDARD_POLICY. | ||
| 105 | */ | ||
| 106 | |||
| 107 | #define THREAD_EXTENDED_POLICY 1 | ||
| 108 | |||
| 109 | struct thread_extended_policy { | ||
| 110 | 	boolean_t timeshare; | ||
| 111 | }; | ||
| 112 | |||
| 113 | typedef struct thread_extended_policy thread_extended_policy_data_t; | ||
| 114 | typedef struct thread_extended_policy *thread_extended_policy_t; | ||
| 115 | |||
| 116 | #define THREAD_EXTENDED_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 117 | 	(sizeof (thread_extended_policy_data_t) / sizeof (integer_t))) | ||
| 118 | |||
| 119 | /* | ||
| 120 | * THREAD_TIME_CONSTRAINT_POLICY: | ||
| 121 | * | ||
| 122 | * This scheduling mode is for threads which have real time | ||
| 123 | * constraints on their execution. | ||
| 124 | * | ||
| 125 | * Parameters: | ||
| 126 | * | ||
| 127 | * period: This is the nominal amount of time between separate | ||
| 128 | * processing arrivals, specified in absolute time units. A | ||
| 129 | * value of 0 indicates that there is no inherent periodicity in | ||
| 130 | * the computation. | ||
| 131 | * | ||
| 132 | * computation: This is the nominal amount of computation | ||
| 133 | * time needed during a separate processing arrival, specified | ||
| 134 | * in absolute time units. | ||
| 135 | * | ||
| 136 | * constraint: This is the maximum amount of real time that | ||
| 137 | * may elapse from the start of a separate processing arrival | ||
| 138 | * to the end of computation for logically correct functioning, | ||
| 139 | * specified in absolute time units. Must be (>= computation). | ||
| 140 | * Note that latency = (constraint - computation). | ||
| 141 | * | ||
| 142 | * preemptible: This indicates that the computation may be | ||
| 143 | * interrupted, subject to the constraint specified above. | ||
| 144 | */ | ||
| 145 | |||
| 146 | #define THREAD_TIME_CONSTRAINT_POLICY 2 | ||
| 147 | |||
| 148 | struct thread_time_constraint_policy { | ||
| 149 | 	uint32_t period; | ||
| 150 | 	uint32_t computation; | ||
| 151 | 	uint32_t constraint; | ||
| 152 | 	boolean_t preemptible; | ||
| 153 | }; | ||
| 154 | |||
| 155 | typedef struct thread_time_constraint_policy \ | ||
| 156 | thread_time_constraint_policy_data_t; | ||
| 157 | typedef struct thread_time_constraint_policy \ | ||
| 158 | *thread_time_constraint_policy_t; | ||
| 159 | |||
| 160 | #define THREAD_TIME_CONSTRAINT_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 161 | 	(sizeof (thread_time_constraint_policy_data_t) / sizeof (integer_t))) | ||
| 162 | |||
| 163 | /* | ||
| 164 | * THREAD_PRECEDENCE_POLICY: | ||
| 165 | * | ||
| 166 | * This may be used to indicate the relative value of the | ||
| 167 | * computation compared to the other threads in the task. | ||
| 168 | * | ||
| 169 | * Parameters: | ||
| 170 | * | ||
| 171 | * importance: The importance is specified as a signed value. | ||
| 172 | */ | ||
| 173 | |||
| 174 | #define THREAD_PRECEDENCE_POLICY 3 | ||
| 175 | |||
| 176 | struct thread_precedence_policy { | ||
| 177 | 	integer_t importance; | ||
| 178 | }; | ||
| 179 | |||
| 180 | typedef struct thread_precedence_policy thread_precedence_policy_data_t; | ||
| 181 | typedef struct thread_precedence_policy *thread_precedence_policy_t; | ||
| 182 | |||
| 183 | #define THREAD_PRECEDENCE_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 184 | 	(sizeof (thread_precedence_policy_data_t) / sizeof (integer_t))) | ||
| 185 | |||
| 186 | /* | ||
| 187 | * THREAD_AFFINITY_POLICY: | ||
| 188 | * | ||
| 189 | * This policy is experimental. | ||
| 190 | * This may be used to express affinity relationships | ||
| 191 | * between threads in the task. Threads with the same affinity tag will | ||
| 192 | * be scheduled to share an L2 cache if possible. That is, affinity tags | ||
| 193 | * are a hint to the scheduler for thread placement. | ||
| 194 | * | ||
| 195 | * The namespace of affinity tags is generally local to one task. However, | ||
| 196 | * a child task created after the assignment of affinity tags by its parent | ||
| 197 | * will share that namespace. In particular, a family of forked processes | ||
| 198 | * may be created with a shared affinity namespace. | ||
| 199 | * | ||
| 200 | * Parameters: | ||
| 201 | * tag: The affinity set identifier. | ||
| 202 | */ | ||
| 203 | |||
| 204 | #define THREAD_AFFINITY_POLICY 4 | ||
| 205 | |||
| 206 | struct thread_affinity_policy { | ||
| 207 | 	integer_t affinity_tag; | ||
| 208 | }; | ||
| 209 | |||
| 210 | #define THREAD_AFFINITY_TAG_NULL 0 | ||
| 211 | |||
| 212 | typedef struct thread_affinity_policy thread_affinity_policy_data_t; | ||
| 213 | typedef struct thread_affinity_policy *thread_affinity_policy_t; | ||
| 214 | |||
| 215 | #define THREAD_AFFINITY_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 216 | 	(sizeof (thread_affinity_policy_data_t) / sizeof (integer_t))) | ||
| 217 | |||
| 218 | /* | ||
| 219 | * THREAD_BACKGROUND_POLICY: | ||
| 220 | */ | ||
| 221 | |||
| 222 | #define THREAD_BACKGROUND_POLICY 5 | ||
| 223 | |||
| 224 | struct thread_background_policy { | ||
| 225 | 	integer_t priority; | ||
| 226 | }; | ||
| 227 | |||
| 228 | #define THREAD_BACKGROUND_POLICY_DARWIN_BG 0x1000 | ||
| 229 | |||
| 230 | typedef struct thread_background_policy thread_background_policy_data_t; | ||
| 231 | typedef struct thread_background_policy *thread_background_policy_t; | ||
| 232 | |||
| 233 | #define THREAD_BACKGROUND_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 234 | 	(sizeof (thread_background_policy_data_t) / sizeof (integer_t))) | ||
| 235 | |||
| 236 | |||
| 237 | #define THREAD_LATENCY_QOS_POLICY 7 | ||
| 238 | typedef integer_t thread_latency_qos_t; | ||
| 239 | |||
| 240 | struct thread_latency_qos_policy { | ||
| 241 | 	thread_latency_qos_t thread_latency_qos_tier; | ||
| 242 | }; | ||
| 243 | |||
| 244 | typedef struct thread_latency_qos_policy thread_latency_qos_policy_data_t; | ||
| 245 | typedef struct thread_latency_qos_policy *thread_latency_qos_policy_t; | ||
| 246 | |||
| 247 | #define THREAD_LATENCY_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 248 | 	 (sizeof (thread_latency_qos_policy_data_t) / sizeof (integer_t))) | ||
| 249 | |||
| 250 | #define THREAD_THROUGHPUT_QOS_POLICY 8 | ||
| 251 | typedef integer_t thread_throughput_qos_t; | ||
| 252 | |||
| 253 | struct thread_throughput_qos_policy { | ||
| 254 | 	thread_throughput_qos_t thread_throughput_qos_tier; | ||
| 255 | }; | ||
| 256 | |||
| 257 | typedef struct thread_throughput_qos_policy thread_throughput_qos_policy_data_t; | ||
| 258 | typedef struct thread_throughput_qos_policy *thread_throughput_qos_policy_t; | ||
| 259 | |||
| 260 | #define THREAD_THROUGHPUT_QOS_POLICY_COUNT ((mach_msg_type_number_t) \ | ||
| 261 | 	 (sizeof (thread_throughput_qos_policy_data_t) / sizeof (integer_t))) | ||
| 262 | |||
| 263 | |||
| 264 | |||
| 265 | |||
| 266 | #endif /* _MACH_THREAD_POLICY_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach/thread_state.h created+63| ... | @@ -0,0 +1,63 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2015 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _MACH_THREAD_STATE_H_ | ||
| 30 | #define _MACH_THREAD_STATE_H_ | ||
| 31 | |||
| 32 | #include <Availability.h> | ||
| 33 | #include <mach/mach.h> | ||
| 34 | |||
| 35 | #ifndef KERNEL | ||
| 36 | /* | ||
| 37 | * Gets all register values in the target thread with pointer-like contents. | ||
| 38 | * | ||
| 39 | * There is no guarantee that the returned values are valid pointers, but all | ||
| 40 | * valid pointers will be returned. The order and count of the provided | ||
| 41 | * register values is unspecified and may change; registers with values that | ||
| 42 | * are not valid pointers may be omitted, so the number of pointers returned | ||
| 43 | * may vary from call to call. | ||
| 44 | * | ||
| 45 | * sp is an out parameter that will contain the stack pointer. | ||
| 46 | * length is an in/out parameter for the length of the values array. | ||
| 47 | * values is an array of pointers. | ||
| 48 | * | ||
| 49 | * This may only be called on threads in the current task. If the current | ||
| 50 | * platform defines a stack red zone, the stack pointer returned will be | ||
| 51 | * adjusted to account for red zone. | ||
| 52 | * | ||
| 53 | * If length is insufficient, KERN_INSUFFICIENT_BUFFER_SIZE will be returned | ||
| 54 | * and length set to the amount of memory required. Callers MUST NOT assume | ||
| 55 | * that any particular size of buffer will be sufficient and should retry with | ||
| 56 | * an appropriately sized buffer upon this error. | ||
| 57 | */ | ||
| 58 | __API_AVAILABLE(macosx(10.14), ios(12.0), tvos(9.0), watchos(5.0)) | ||
| 59 | kern_return_t thread_get_register_pointer_values(thread_t thread, | ||
| 60 | uintptr_t *sp, size_t *length, uintptr_t *values); | ||
| 61 | #endif | ||
| 62 | |||
| 63 | #endif /* _MACH_THREAD_STATE_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/mach_debug/mach_debug_types.h created+95| ... | @@ -0,0 +1,95 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* | ||
| 29 | * @OSF_COPYRIGHT@ | ||
| 30 | */ | ||
| 31 | /* | ||
| 32 | * Mach Operating System | ||
| 33 | * Copyright (c) 1991,1990,1989,1988 Carnegie Mellon University | ||
| 34 | * All Rights Reserved. | ||
| 35 | * | ||
| 36 | * Permission to use, copy, modify and distribute this software and its | ||
| 37 | * documentation is hereby granted, provided that both the copyright | ||
| 38 | * notice and this permission notice appear in all copies of the | ||
| 39 | * software, derivative works or modified versions, and any portions | ||
| 40 | * thereof, and that both notices appear in supporting documentation. | ||
| 41 | * | ||
| 42 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | ||
| 43 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | ||
| 44 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | ||
| 45 | * | ||
| 46 | * Carnegie Mellon requests users of this software to return to | ||
| 47 | * | ||
| 48 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | ||
| 49 | * School of Computer Science | ||
| 50 | * Carnegie Mellon University | ||
| 51 | * Pittsburgh PA 15213-3890 | ||
| 52 | * | ||
| 53 | * any improvements or extensions that they make and grant Carnegie Mellon | ||
| 54 | * the rights to redistribute these changes. | ||
| 55 | */ | ||
| 56 | /* | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | *	Mach kernel debugging interface type declarations | ||
| 60 | */ | ||
| 61 | |||
| 62 | #ifndef _MACH_DEBUG_MACH_DEBUG_TYPES_H_ | ||
| 63 | #define _MACH_DEBUG_MACH_DEBUG_TYPES_H_ | ||
| 64 | |||
| 65 | #include <mach_debug/ipc_info.h> | ||
| 66 | #include <mach_debug/vm_info.h> | ||
| 67 | #include <mach_debug/zone_info.h> | ||
| 68 | #include <mach_debug/page_info.h> | ||
| 69 | #include <mach_debug/hash_info.h> | ||
| 70 | #include <mach_debug/lockgroup_info.h> | ||
| 71 | |||
| 72 | #define MACH_CORE_FILEHEADER_SIGNATURE 0x0063614d20646152ULL | ||
| 73 | #define MACH_CORE_FILEHEADER_MAXFILES 16 | ||
| 74 | #define MACH_CORE_FILEHEADER_NAMELEN 16 | ||
| 75 | |||
| 76 | typedef char symtab_name_t[32]; | ||
| 77 | |||
| 78 | struct mach_core_details { | ||
| 79 | 	uint64_t gzip_offset; | ||
| 80 | 	uint64_t gzip_length; | ||
| 81 | 	char core_name[MACH_CORE_FILEHEADER_NAMELEN]; | ||
| 82 | }; | ||
| 83 | |||
| 84 | struct mach_core_fileheader { | ||
| 85 | 	uint64_t signature; | ||
| 86 | 	uint64_t log_offset; | ||
| 87 | 	uint64_t log_length; | ||
| 88 | 	uint64_t num_files; | ||
| 89 | 	struct mach_core_details files[MACH_CORE_FILEHEADER_MAXFILES]; | ||
| 90 | }; | ||
| 91 | |||
| 92 | #define KOBJECT_DESCRIPTION_LENGTH 512 | ||
| 93 | typedef char kobject_description_t[KOBJECT_DESCRIPTION_LENGTH]; | ||
| 94 | |||
| 95 | #endif /* _MACH_DEBUG_MACH_DEBUG_TYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/net/net_kev.h created+98| ... | @@ -0,0 +1,98 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2016-2018 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef _NET_NETKEV_H_ | ||
| 30 | #define _NET_NETKEV_H_ | ||
| 31 | |||
| 32 | #if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE) | ||
| 33 | |||
| 34 | /* Kernel event subclass identifiers for KEV_NETWORK_CLASS */ | ||
| 35 | #define KEV_INET_SUBCLASS 1 /* inet subclass */ | ||
| 36 | /* KEV_INET_SUBCLASS event codes */ | ||
| 37 | #define KEV_INET_NEW_ADDR 1 /* Userland configured IP address */ | ||
| 38 | #define KEV_INET_CHANGED_ADDR 2 /* Address changed event */ | ||
| 39 | #define KEV_INET_ADDR_DELETED 3 /* IPv6 address was deleted */ | ||
| 40 | #define KEV_INET_SIFDSTADDR 4 /* Dest. address was set */ | ||
| 41 | #define KEV_INET_SIFBRDADDR 5 /* Broadcast address was set */ | ||
| 42 | #define KEV_INET_SIFNETMASK 6 /* Netmask was set */ | ||
| 43 | #define KEV_INET_ARPCOLLISION 7 /* ARP collision detected */ | ||
| 44 | #ifdef __APPLE_API_PRIVATE | ||
| 45 | #define KEV_INET_PORTINUSE 8 /* use ken_in_portinuse */ | ||
| 46 | #endif | ||
| 47 | #define KEV_INET_ARPRTRFAILURE 9 /* ARP resolution failed for router */ | ||
| 48 | #define KEV_INET_ARPRTRALIVE 10 /* ARP resolution succeeded for router */ | ||
| 49 | |||
| 50 | #define KEV_DL_SUBCLASS 2 /* Data Link subclass */ | ||
| 51 | /* | ||
| 52 | * Define Data-Link event subclass, and associated | ||
| 53 | * events. | ||
| 54 | */ | ||
| 55 | #define KEV_DL_SIFFLAGS 1 | ||
| 56 | #define KEV_DL_SIFMETRICS 2 | ||
| 57 | #define KEV_DL_SIFMTU 3 | ||
| 58 | #define KEV_DL_SIFPHYS 4 | ||
| 59 | #define KEV_DL_SIFMEDIA 5 | ||
| 60 | #define KEV_DL_SIFGENERIC 6 | ||
| 61 | #define KEV_DL_ADDMULTI 7 | ||
| 62 | #define KEV_DL_DELMULTI 8 | ||
| 63 | #define KEV_DL_IF_ATTACHED 9 | ||
| 64 | #define KEV_DL_IF_DETACHING 10 | ||
| 65 | #define KEV_DL_IF_DETACHED 11 | ||
| 66 | #define KEV_DL_LINK_OFF 12 | ||
| 67 | #define KEV_DL_LINK_ON 13 | ||
| 68 | #define KEV_DL_PROTO_ATTACHED 14 | ||
| 69 | #define KEV_DL_PROTO_DETACHED 15 | ||
| 70 | #define KEV_DL_LINK_ADDRESS_CHANGED 16 | ||
| 71 | #define KEV_DL_WAKEFLAGS_CHANGED 17 | ||
| 72 | #define KEV_DL_IF_IDLE_ROUTE_REFCNT 18 | ||
| 73 | #define KEV_DL_IFCAP_CHANGED 19 | ||
| 74 | #define KEV_DL_LINK_QUALITY_METRIC_CHANGED 20 | ||
| 75 | #define KEV_DL_NODE_PRESENCE 21 | ||
| 76 | #define KEV_DL_NODE_ABSENCE 22 | ||
| 77 | #define KEV_DL_MASTER_ELECTED 23 | ||
| 78 | #define KEV_DL_ISSUES 24 | ||
| 79 | #define KEV_DL_IFDELEGATE_CHANGED 25 | ||
| 80 | #define KEV_DL_AWDL_RESTRICTED 26 | ||
| 81 | #define KEV_DL_AWDL_UNRESTRICTED 27 | ||
| 82 | #define KEV_DL_RRC_STATE_CHANGED 28 | ||
| 83 | #define KEV_DL_QOS_MODE_CHANGED 29 | ||
| 84 | #define KEV_DL_LOW_POWER_MODE_CHANGED 30 | ||
| 85 | |||
| 86 | |||
| 87 | #define KEV_INET6_SUBCLASS 6 /* inet6 subclass */ | ||
| 88 | /* KEV_INET6_SUBCLASS event codes */ | ||
| 89 | #define KEV_INET6_NEW_USER_ADDR 1 /* Userland configured IPv6 address */ | ||
| 90 | #define KEV_INET6_CHANGED_ADDR 2 /* Address changed event (future) */ | ||
| 91 | #define KEV_INET6_ADDR_DELETED 3 /* IPv6 address was deleted */ | ||
| 92 | #define KEV_INET6_NEW_LL_ADDR 4 /* Autoconf LL address appeared */ | ||
| 93 | #define KEV_INET6_NEW_RTADV_ADDR 5 /* Autoconf address has appeared */ | ||
| 94 | #define KEV_INET6_DEFROUTER 6 /* Default router detected */ | ||
| 95 | #define KEV_INET6_REQUEST_NAT64_PREFIX 7 /* Asking for the NAT64-prefix */ | ||
| 96 | |||
| 97 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ | ||
| 98 | #endif /* _NET_NETKEV_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/objc/NSObjCRuntime.h created+33| ... | @@ -0,0 +1,33 @@ | ||
| 1 | /*	NSObjCRuntime.h | ||
| 2 | 	Copyright (c) 1994-2012, Apple Inc. All rights reserved. | ||
| 3 | */ | ||
| 4 | |||
| 5 | #ifndef _OBJC_NSOBJCRUNTIME_H_ | ||
| 6 | #define _OBJC_NSOBJCRUNTIME_H_ | ||
| 7 | |||
| 8 | #include <TargetConditionals.h> | ||
| 9 | #include <objc/objc.h> | ||
| 10 | |||
| 11 | #if __LP64__ || 0 || NS_BUILD_32_LIKE_64 | ||
| 12 | typedef long NSInteger; | ||
| 13 | typedef unsigned long NSUInteger; | ||
| 14 | #else | ||
| 15 | typedef int NSInteger; | ||
| 16 | typedef unsigned int NSUInteger; | ||
| 17 | #endif | ||
| 18 | |||
| 19 | #define NSIntegerMax LONG_MAX | ||
| 20 | #define NSIntegerMin LONG_MIN | ||
| 21 | #define NSUIntegerMax ULONG_MAX | ||
| 22 | |||
| 23 | #define NSINTEGER_DEFINED 1 | ||
| 24 | |||
| 25 | #ifndef NS_DESIGNATED_INITIALIZER | ||
| 26 | #if __has_attribute(objc_designated_initializer) | ||
| 27 | #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) | ||
| 28 | #else | ||
| 29 | #define NS_DESIGNATED_INITIALIZER | ||
| 30 | #endif | ||
| 31 | #endif | ||
| 32 | |||
| 33 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/objc/message.h created+388| ... | @@ -0,0 +1,388 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. Please obtain a copy of the License at | ||
| 10 | * http://www.opensource.apple.com/apsl/ and read it before using this | ||
| 11 | * file. | ||
| 12 | * | ||
| 13 | * The Original Code and all software distributed under the License are | ||
| 14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 18 | * Please see the License for the specific language governing rights and | ||
| 19 | * limitations under the License. | ||
| 20 | * | ||
| 21 | * @APPLE_LICENSE_HEADER_END@ | ||
| 22 | */ | ||
| 23 | |||
| 24 | #ifndef _OBJC_MESSAGE_H | ||
| 25 | #define _OBJC_MESSAGE_H | ||
| 26 | |||
| 27 | #include <objc/objc.h> | ||
| 28 | #include <objc/runtime.h> | ||
| 29 | |||
| 30 | #ifndef OBJC_SUPER | ||
| 31 | #define OBJC_SUPER | ||
| 32 | |||
| 33 | /// Specifies the superclass of an instance. | ||
| 34 | struct objc_super { | ||
| 35 | /// Specifies an instance of a class. | ||
| 36 | __unsafe_unretained _Nonnull id receiver; | ||
| 37 | |||
| 38 | /// Specifies the particular superclass of the instance to message. | ||
| 39 | #if !defined(__cplusplus) && !__OBJC2__ | ||
| 40 | /* For compatibility with old objc-runtime.h header */ | ||
| 41 | __unsafe_unretained _Nonnull Class class; | ||
| 42 | #else | ||
| 43 | __unsafe_unretained _Nonnull Class super_class; | ||
| 44 | #endif | ||
| 45 | /* super_class is the first class to search */ | ||
| 46 | }; | ||
| 47 | #endif | ||
| 48 | |||
| 49 | |||
| 50 | /* Basic Messaging Primitives | ||
| 51 | * | ||
| 52 | * On some architectures, use objc_msgSend_stret for some struct return types. | ||
| 53 | * On some architectures, use objc_msgSend_fpret for some float return types. | ||
| 54 | * On some architectures, use objc_msgSend_fp2ret for some float return types. | ||
| 55 | * | ||
| 56 | * These functions must be cast to an appropriate function pointer type | ||
| 57 | * before being called. | ||
| 58 | */ | ||
| 59 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 60 | #pragma clang diagnostic push | ||
| 61 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 62 | OBJC_EXPORT void | ||
| 63 | objc_msgSend(void /* id self, SEL op, ... */ ) | ||
| 64 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 65 | |||
| 66 | OBJC_EXPORT void | ||
| 67 | objc_msgSendSuper(void /* struct objc_super *super, SEL op, ... */ ) | ||
| 68 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 69 | #pragma clang diagnostic pop | ||
| 70 | #else | ||
| 71 | /** | ||
| 72 | * Sends a message with a simple return value to an instance of a class. | ||
| 73 | * | ||
| 74 | * @param self A pointer to the instance of the class that is to receive the message. | ||
| 75 | * @param op The selector of the method that handles the message. | ||
| 76 | * @param ... | ||
| 77 | * A variable argument list containing the arguments to the method. | ||
| 78 | * | ||
| 79 | * @return The return value of the method. | ||
| 80 | * | ||
| 81 | * @note When it encounters a method call, the compiler generates a call to one of the | ||
| 82 | * functions \c objc_msgSend, \c objc_msgSend_stret, \c objc_msgSendSuper, or \c objc_msgSendSuper_stret. | ||
| 83 | * Messages sent to an object’s superclass (using the \c super keyword) are sent using \c objc_msgSendSuper; | ||
| 84 | * other messages are sent using \c objc_msgSend. Methods that have data structures as return values | ||
| 85 | * are sent using \c objc_msgSendSuper_stret and \c objc_msgSend_stret. | ||
| 86 | */ | ||
| 87 | OBJC_EXPORT id _Nullable | ||
| 88 | objc_msgSend(id _Nullable self, SEL _Nonnull op, ...) | ||
| 89 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 90 | /** | ||
| 91 | * Sends a message with a simple return value to the superclass of an instance of a class. | ||
| 92 | * | ||
| 93 | * @param super A pointer to an \c objc_super data structure. Pass values identifying the | ||
| 94 | * context the message was sent to, including the instance of the class that is to receive the | ||
| 95 | * message and the superclass at which to start searching for the method implementation. | ||
| 96 | * @param op A pointer of type SEL. Pass the selector of the method that will handle the message. | ||
| 97 | * @param ... | ||
| 98 | * A variable argument list containing the arguments to the method. | ||
| 99 | * | ||
| 100 | * @return The return value of the method identified by \e op. | ||
| 101 | * | ||
| 102 | * @see objc_msgSend | ||
| 103 | */ | ||
| 104 | OBJC_EXPORT id _Nullable | ||
| 105 | objc_msgSendSuper(struct objc_super * _Nonnull super, SEL _Nonnull op, ...) | ||
| 106 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 107 | #endif | ||
| 108 | |||
| 109 | |||
| 110 | /* Struct-returning Messaging Primitives | ||
| 111 | * | ||
| 112 | * Use these functions to call methods that return structs on the stack. | ||
| 113 | * On some architectures, some structures are returned in registers. | ||
| 114 | * Consult your local function call ABI documentation for details. | ||
| 115 | * | ||
| 116 | * These functions must be cast to an appropriate function pointer type | ||
| 117 | * before being called. | ||
| 118 | */ | ||
| 119 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 120 | #pragma clang diagnostic push | ||
| 121 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 122 | OBJC_EXPORT void | ||
| 123 | objc_msgSend_stret(void /* id self, SEL op, ... */ ) | ||
| 124 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 125 | OBJC_ARM64_UNAVAILABLE; | ||
| 126 | |||
| 127 | OBJC_EXPORT void | ||
| 128 | objc_msgSendSuper_stret(void /* struct objc_super *super, SEL op, ... */ ) | ||
| 129 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 130 | OBJC_ARM64_UNAVAILABLE; | ||
| 131 | #pragma clang diagnostic pop | ||
| 132 | #else | ||
| 133 | /** | ||
| 134 | * Sends a message with a data-structure return value to an instance of a class. | ||
| 135 | * | ||
| 136 | * @see objc_msgSend | ||
| 137 | */ | ||
| 138 | OBJC_EXPORT void | ||
| 139 | objc_msgSend_stret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 140 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 141 | OBJC_ARM64_UNAVAILABLE; | ||
| 142 | |||
| 143 | /** | ||
| 144 | * Sends a message with a data-structure return value to the superclass of an instance of a class. | ||
| 145 | * | ||
| 146 | * @see objc_msgSendSuper | ||
| 147 | */ | ||
| 148 | OBJC_EXPORT void | ||
| 149 | objc_msgSendSuper_stret(struct objc_super * _Nonnull super, | ||
| 150 | SEL _Nonnull op, ...) | ||
| 151 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0) | ||
| 152 | OBJC_ARM64_UNAVAILABLE; | ||
| 153 | #endif | ||
| 154 | |||
| 155 | |||
| 156 | /* Floating-point-returning Messaging Primitives | ||
| 157 | * | ||
| 158 | * Use these functions to call methods that return floating-point values | ||
| 159 | * on the stack. | ||
| 160 | * Consult your local function call ABI documentation for details. | ||
| 161 | * | ||
| 162 | * arm: objc_msgSend_fpret not used | ||
| 163 | * i386: objc_msgSend_fpret used for `float`, `double`, `long double`. | ||
| 164 | * x86-64: objc_msgSend_fpret used for `long double`. | ||
| 165 | * | ||
| 166 | * arm: objc_msgSend_fp2ret not used | ||
| 167 | * i386: objc_msgSend_fp2ret not used | ||
| 168 | * x86-64: objc_msgSend_fp2ret used for `_Complex long double`. | ||
| 169 | * | ||
| 170 | * These functions must be cast to an appropriate function pointer type | ||
| 171 | * before being called. | ||
| 172 | */ | ||
| 173 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 174 | #pragma clang diagnostic push | ||
| 175 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 176 | |||
| 177 | # if defined(__i386__) | ||
| 178 | |||
| 179 | OBJC_EXPORT void | ||
| 180 | objc_msgSend_fpret(void /* id self, SEL op, ... */ ) | ||
| 181 | OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); | ||
| 182 | |||
| 183 | # elif defined(__x86_64__) | ||
| 184 | |||
| 185 | OBJC_EXPORT void | ||
| 186 | objc_msgSend_fpret(void /* id self, SEL op, ... */ ) | ||
| 187 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 188 | |||
| 189 | OBJC_EXPORT void | ||
| 190 | objc_msgSend_fp2ret(void /* id self, SEL op, ... */ ) | ||
| 191 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 192 | |||
| 193 | #pragma clang diagnostic pop | ||
| 194 | # endif | ||
| 195 | |||
| 196 | // !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 197 | #else | ||
| 198 | // OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 199 | # if defined(__i386__) | ||
| 200 | |||
| 201 | /** | ||
| 202 | * Sends a message with a floating-point return value to an instance of a class. | ||
| 203 | * | ||
| 204 | * @see objc_msgSend | ||
| 205 | * @note On the i386 platform, the ABI for functions returning a floating-point value is | ||
| 206 | * incompatible with that for functions returning an integral type. On the i386 platform, therefore, | ||
| 207 | * you must use \c objc_msgSend_fpret for functions returning non-integral type. For \c float or | ||
| 208 | * \c long \c double return types, cast the function to an appropriate function pointer type first. | ||
| 209 | */ | ||
| 210 | #pragma clang diagnostic push | ||
| 211 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 212 | OBJC_EXPORT double | ||
| 213 | objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 214 | OBJC_AVAILABLE(10.4, 2.0, 9.0, 1.0, 2.0); | ||
| 215 | #pragma clang diagnostic pop | ||
| 216 | |||
| 217 | /* Use objc_msgSendSuper() for fp-returning messages to super. */ | ||
| 218 | /* See also objc_msgSendv_fpret() below. */ | ||
| 219 | |||
| 220 | # elif defined(__x86_64__) | ||
| 221 | /** | ||
| 222 | * Sends a message with a floating-point return value to an instance of a class. | ||
| 223 | * | ||
| 224 | * @see objc_msgSend | ||
| 225 | */ | ||
| 226 | OBJC_EXPORT long double | ||
| 227 | objc_msgSend_fpret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 228 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 229 | |||
| 230 | # if __STDC_VERSION__ >= 199901L | ||
| 231 | OBJC_EXPORT _Complex long double | ||
| 232 | objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 233 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 234 | # else | ||
| 235 | OBJC_EXPORT void objc_msgSend_fp2ret(id _Nullable self, SEL _Nonnull op, ...) | ||
| 236 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 237 | # endif | ||
| 238 | |||
| 239 | /* Use objc_msgSendSuper() for fp-returning messages to super. */ | ||
| 240 | /* See also objc_msgSendv_fpret() below. */ | ||
| 241 | |||
| 242 | # endif | ||
| 243 | |||
| 244 | // OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 245 | #endif | ||
| 246 | |||
| 247 | |||
| 248 | /* Direct Method Invocation Primitives | ||
| 249 | * Use these functions to call the implementation of a given Method. | ||
| 250 | * This is faster than calling method_getImplementation() and method_getName(). | ||
| 251 | * | ||
| 252 | * The receiver must not be nil. | ||
| 253 | * | ||
| 254 | * These functions must be cast to an appropriate function pointer type | ||
| 255 | * before being called. | ||
| 256 | */ | ||
| 257 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 258 | #pragma clang diagnostic push | ||
| 259 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 260 | OBJC_EXPORT void | ||
| 261 | method_invoke(void /* id receiver, Method m, ... */ ) | ||
| 262 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 263 | |||
| 264 | OBJC_EXPORT void | ||
| 265 | method_invoke_stret(void /* id receiver, Method m, ... */ ) | ||
| 266 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) | ||
| 267 | OBJC_ARM64_UNAVAILABLE; | ||
| 268 | #pragma clang diagnostic pop | ||
| 269 | #else | ||
| 270 | OBJC_EXPORT id _Nullable | ||
| 271 | method_invoke(id _Nullable receiver, Method _Nonnull m, ...) | ||
| 272 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0); | ||
| 273 | |||
| 274 | OBJC_EXPORT void | ||
| 275 | method_invoke_stret(id _Nullable receiver, Method _Nonnull m, ...) | ||
| 276 | OBJC_AVAILABLE(10.5, 2.0, 9.0, 1.0, 2.0) | ||
| 277 | OBJC_ARM64_UNAVAILABLE; | ||
| 278 | #endif | ||
| 279 | |||
| 280 | |||
| 281 | /* Message Forwarding Primitives | ||
| 282 | * Use these functions to forward a message as if the receiver did not | ||
| 283 | * respond to it. | ||
| 284 | * | ||
| 285 | * The receiver must not be nil. | ||
| 286 | * | ||
| 287 | * class_getMethodImplementation() may return (IMP)_objc_msgForward. | ||
| 288 | * class_getMethodImplementation_stret() may return (IMP)_objc_msgForward_stret | ||
| 289 | * | ||
| 290 | * These functions must be cast to an appropriate function pointer type | ||
| 291 | * before being called. | ||
| 292 | * | ||
| 293 | * Before Mac OS X 10.6, _objc_msgForward must not be called directly | ||
| 294 | * but may be compared to other IMP values. | ||
| 295 | */ | ||
| 296 | #if !OBJC_OLD_DISPATCH_PROTOTYPES | ||
| 297 | #pragma clang diagnostic push | ||
| 298 | #pragma clang diagnostic ignored "-Wincompatible-library-redeclaration" | ||
| 299 | OBJC_EXPORT void | ||
| 300 | _objc_msgForward(void /* id receiver, SEL sel, ... */ ) | ||
| 301 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 302 | |||
| 303 | OBJC_EXPORT void | ||
| 304 | _objc_msgForward_stret(void /* id receiver, SEL sel, ... */ ) | ||
| 305 | OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) | ||
| 306 | OBJC_ARM64_UNAVAILABLE; | ||
| 307 | #pragma clang diagnostic pop | ||
| 308 | #else | ||
| 309 | OBJC_EXPORT id _Nullable | ||
| 310 | _objc_msgForward(id _Nonnull receiver, SEL _Nonnull sel, ...) | ||
| 311 | OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0); | ||
| 312 | |||
| 313 | OBJC_EXPORT void | ||
| 314 | _objc_msgForward_stret(id _Nonnull receiver, SEL _Nonnull sel, ...) | ||
| 315 | OBJC_AVAILABLE(10.6, 3.0, 9.0, 1.0, 2.0) | ||
| 316 | OBJC_ARM64_UNAVAILABLE; | ||
| 317 | #endif | ||
| 318 | |||
| 319 | |||
| 320 | /* Variable-argument Messaging Primitives | ||
| 321 | * | ||
| 322 | * Use these functions to call methods with a list of arguments, such | ||
| 323 | * as the one passed to forward:: . | ||
| 324 | * | ||
| 325 | * The contents of the argument list are architecture-specific. | ||
| 326 | * Consult your local function call ABI documentation for details. | ||
| 327 | * | ||
| 328 | * These functions must be cast to an appropriate function pointer type | ||
| 329 | * before being called, except for objc_msgSendv_stret() which must not | ||
| 330 | * be cast to a struct-returning type. | ||
| 331 | */ | ||
| 332 | |||
| 333 | typedef void* marg_list; | ||
| 334 | |||
| 335 | OBJC_EXPORT id _Nullable | ||
| 336 | objc_msgSendv(id _Nullable self, SEL _Nonnull op, size_t arg_size, | ||
| 337 | marg_list _Nonnull arg_frame) | ||
| 338 | OBJC2_UNAVAILABLE; | ||
| 339 | |||
| 340 | OBJC_EXPORT void | ||
| 341 | objc_msgSendv_stret(void * _Nonnull stretAddr, id _Nullable self, | ||
| 342 | SEL _Nonnull op, size_t arg_size, | ||
| 343 | marg_list _Nullable arg_frame) | ||
| 344 | OBJC2_UNAVAILABLE; | ||
| 345 | /* Note that objc_msgSendv_stret() does not return a structure type, | ||
| 346 | * and should not be cast to do so. This is unlike objc_msgSend_stret() | ||
| 347 | * and objc_msgSendSuper_stret(). | ||
| 348 | */ | ||
| 349 | #if defined(__i386__) | ||
| 350 | OBJC_EXPORT double | ||
| 351 | objc_msgSendv_fpret(id _Nullable self, SEL _Nonnull op, | ||
| 352 | unsigned arg_size, marg_list _Nullable arg_frame) | ||
| 353 | OBJC2_UNAVAILABLE; | ||
| 354 | #endif | ||
| 355 | |||
| 356 | |||
| 357 | /* The following marg_list macros are of marginal utility. They | ||
| 358 | * are included for compatibility with the old objc-class.h header. */ | ||
| 359 | |||
| 360 | #if !__OBJC2__ | ||
| 361 | |||
| 362 | #define marg_prearg_size	0 | ||
| 363 | |||
| 364 | #define marg_malloc(margs, method) \ | ||
| 365 | 	do { \ | ||
| 366 | 		margs = (marg_list *)malloc (marg_prearg_size + ((7 + method_getSizeOfArguments(method)) & ~7)); \ | ||
| 367 | 	} while (0) | ||
| 368 | |||
| 369 | #define marg_free(margs) \ | ||
| 370 | 	do { \ | ||
| 371 | 		free(margs); \ | ||
| 372 | 	} while (0) | ||
| 373 | 	 | ||
| 374 | #define marg_adjustedOffset(method, offset) \ | ||
| 375 | 	(marg_prearg_size + offset) | ||
| 376 | |||
| 377 | #define marg_getRef(margs, offset, type) \ | ||
| 378 | 	( (type *)((char *)margs + marg_adjustedOffset(method,offset) ) ) | ||
| 379 | |||
| 380 | #define marg_getValue(margs, offset, type) \ | ||
| 381 | 	( *marg_getRef(margs, offset, type) ) | ||
| 382 | |||
| 383 | #define marg_setValue(margs, offset, type, value) \ | ||
| 384 | 	( marg_getValue(margs, offset, type) = (value) ) | ||
| 385 | |||
| 386 | #endif | ||
| 387 | |||
| 388 | #endif | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/simd/base.h created+122| ... | @@ -0,0 +1,122 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines macros used in the implementation of <simd/simd.h> | ||
| 3 | * types and functions. Even though they are exposed in a public header, | ||
| 4 | * the macros defined in this header are implementation details, and you | ||
| 5 | * should not use or rely on them. They may be changed or removed entirely | ||
| 6 | * in a future release. | ||
| 7 | * | ||
| 8 | * @copyright 2016-2017 Apple, Inc. All rights reserved. | ||
| 9 | * @unsorted */ | ||
| 10 | |||
| 11 | #ifndef SIMD_BASE | ||
| 12 | #define SIMD_BASE | ||
| 13 | |||
| 14 | /* Define __has_attribute and __has_include if they aren't available */ | ||
| 15 | # ifndef __has_attribute | ||
| 16 | # define __has_attribute(__x) 0 | ||
| 17 | # endif | ||
| 18 | # ifndef __has_include | ||
| 19 | # define __has_include(__x) 0 | ||
| 20 | # endif | ||
| 21 | # ifndef __has_feature | ||
| 22 | # define __has_feature(__x) 0 | ||
| 23 | # endif | ||
| 24 | |||
| 25 | # if __has_attribute(__ext_vector_type__) && __has_attribute(__overloadable__) | ||
| 26 | # define SIMD_COMPILER_HAS_REQUIRED_FEATURES 1 | ||
| 27 | # else | ||
| 28 | /* Your compiler is missing one or more features that are hard requirements | ||
| 29 | * for any <simd/simd.h> support. None of the types or functions defined by | ||
| 30 | * the simd headers will be available. */ | ||
| 31 | # define SIMD_COMPILER_HAS_REQUIRED_FEATURES 0 | ||
| 32 | # endif | ||
| 33 | |||
| 34 | # if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 35 | # if __has_include(<Availability.h>) | ||
| 36 | # include <Availability.h> | ||
| 37 | /* A number of new features are added in newer releases; most of these are | ||
| 38 | * inline in the header, which makes them available even when targeting older | ||
| 39 | * OS versions. Those that make external calls, however, are only available | ||
| 40 | * when targeting the release in which they became available. Because of the | ||
| 41 | * way in which simd functions are overloaded, the usual weak-linking tricks | ||
| 42 | * do not work; these functions are simply unavailable when targeting older | ||
| 43 | * versions of the library. */ | ||
| 44 | # if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13 || \ | ||
| 45 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_11_0 || \ | ||
| 46 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_4_0 || \ | ||
| 47 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_11_0 || \ | ||
| 48 | __DRIVERKIT_VERSION_MIN_REQUIRED >= __DRIVERKIT_19_0 | ||
| 49 | # define SIMD_LIBRARY_VERSION 3 | ||
| 50 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_12 || \ | ||
| 51 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0 || \ | ||
| 52 | __WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_3_0 || \ | ||
| 53 | __TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0 | ||
| 54 | # define SIMD_LIBRARY_VERSION 2 | ||
| 55 | # elif __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_10 || \ | ||
| 56 | __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_8_0 | ||
| 57 | # define SIMD_LIBRARY_VERSION 1 | ||
| 58 | # else | ||
| 59 | # define SIMD_LIBRARY_VERSION 0 | ||
| 60 | # endif | ||
| 61 | # else /* !__has_include(<Availability.h>) */ | ||
| 62 | # define SIMD_LIBRARY_VERSION 3 | ||
| 63 | # define __API_AVAILABLE(...) /* Nothing */ | ||
| 64 | # endif | ||
| 65 | |||
| 66 | /* The simd types interoperate with the native simd intrinsic types for each | ||
| 67 | * architecture; the headers that define those types and operations are | ||
| 68 | * automatically included with simd.h */ | ||
| 69 | # if defined __ARM_NEON__ | ||
| 70 | # include <arm_neon.h> | ||
| 71 | # elif defined __i386__ || defined __x86_64__ | ||
| 72 | # include <immintrin.h> | ||
| 73 | # endif | ||
| 74 | |||
| 75 | /* Define a number of function attributes used by the simd functions. */ | ||
| 76 | # if __has_attribute(__always_inline__) | ||
| 77 | # define SIMD_INLINE __attribute__((__always_inline__)) | ||
| 78 | # else | ||
| 79 | # define SIMD_INLINE inline | ||
| 80 | # endif | ||
| 81 | |||
| 82 | # if __has_attribute(__const__) | ||
| 83 | # define SIMD_CONST __attribute__((__const__)) | ||
| 84 | # else | ||
| 85 | # define SIMD_CONST /* nothing */ | ||
| 86 | # endif | ||
| 87 | |||
| 88 | # if __has_attribute(__nodebug__) | ||
| 89 | # define SIMD_NODEBUG __attribute__((__nodebug__)) | ||
| 90 | # else | ||
| 91 | # define SIMD_NODEBUG /* nothing */ | ||
| 92 | # endif | ||
| 93 | |||
| 94 | # if __has_attribute(__deprecated__) | ||
| 95 | # define SIMD_DEPRECATED(message) __attribute__((__deprecated__(message))) | ||
| 96 | # else | ||
| 97 | # define SIMD_DEPRECATED(message) /* nothing */ | ||
| 98 | # endif | ||
| 99 | |||
| 100 | #define SIMD_OVERLOAD __attribute__((__overloadable__)) | ||
| 101 | #define SIMD_CPPFUNC SIMD_INLINE SIMD_CONST SIMD_NODEBUG | ||
| 102 | #define SIMD_CFUNC SIMD_CPPFUNC SIMD_OVERLOAD | ||
| 103 | #define SIMD_NOINLINE SIMD_CONST SIMD_NODEBUG SIMD_OVERLOAD | ||
| 104 | #define SIMD_NONCONST SIMD_INLINE SIMD_NODEBUG SIMD_OVERLOAD | ||
| 105 | #define __SIMD_INLINE__ SIMD_CPPFUNC | ||
| 106 | #define __SIMD_ATTRIBUTES__ SIMD_CFUNC | ||
| 107 | #define __SIMD_OVERLOAD__ SIMD_OVERLOAD | ||
| 108 | |||
| 109 | #if defined __cplusplus | ||
| 110 | /*! @abstract A boolean scalar. */ | ||
| 111 | typedef bool simd_bool; | ||
| 112 | #else | ||
| 113 | /*! @abstract A boolean scalar. */ | ||
| 114 | typedef _Bool simd_bool; | ||
| 115 | #endif | ||
| 116 | /*! @abstract A boolean scalar. | ||
| 117 | * @discussion This type is deprecated; In C or Objective-C sources, use | ||
| 118 | * `_Bool` instead. In C++ sources, use `bool`. */ | ||
| 119 | typedef simd_bool __SIMD_BOOLEAN_TYPE__; | ||
| 120 | |||
| 121 | # endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 122 | #endif /* defined SIMD_BASE */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/simd/matrix.h created+1786| ... | @@ -0,0 +1,1786 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * Function Result | ||
| 4 | * ------------------------------------------------------------------ | ||
| 5 | * | ||
| 6 | * simd_diagonal_matrix(x) A square matrix with the vector x | ||
| 7 | * as its diagonal. | ||
| 8 | * | ||
| 9 | * simd_matrix(c0, c1, ... ) A matrix with the specified vectors | ||
| 10 | * as columns. | ||
| 11 | * | ||
| 12 | * simd_matrix_from_rows(r0, r1, ... ) A matrix with the specified vectors | ||
| 13 | * as rows. | ||
| 14 | * | ||
| 15 | * simd_mul(a,x) Scalar product a*x. | ||
| 16 | * | ||
| 17 | * simd_linear_combination(a,x,b,y) a*x + b*y. | ||
| 18 | * | ||
| 19 | * simd_add(x,y) Macro wrapping linear_combination | ||
| 20 | * to compute x + y. | ||
| 21 | * | ||
| 22 | * simd_sub(x,y) Macro wrapping linear_combination | ||
| 23 | * to compute x - y. | ||
| 24 | * | ||
| 25 | * simd_transpose(x) Transpose of the matrix x. | ||
| 26 | * | ||
| 27 | * simd_inverse(x) Inverse of x if x is non-singular. If | ||
| 28 | * x is singular, the result is undefined. | ||
| 29 | * | ||
| 30 | * simd_mul(x,y) If x is a matrix, returns the matrix | ||
| 31 | * product x*y, where y is either a matrix | ||
| 32 | * or a column vector. If x is a vector, | ||
| 33 | * returns the product x*y where x is | ||
| 34 | * interpreted as a row vector. | ||
| 35 | * | ||
| 36 | * simd_equal(x,y) Returns true if and only if every | ||
| 37 | * element of x is exactly equal to the | ||
| 38 | * corresponding element of y. | ||
| 39 | * | ||
| 40 | * simd_almost_equal_elements(x,y,tol) | ||
| 41 | * Returns true if and only if for each | ||
| 42 | * entry xij in x, the corresponding | ||
| 43 | * element yij in y satisfies | ||
| 44 | * |xij - yij| <= tol. | ||
| 45 | * | ||
| 46 | * simd_almost_equal_elements_relative(x,y,tol) | ||
| 47 | * Returns true if and only if for each | ||
| 48 | * entry xij in x, the corresponding | ||
| 49 | * element yij in y satisfies | ||
| 50 | * |xij - yij| <= tol*|xij|. | ||
| 51 | * | ||
| 52 | * The header also defines a few useful global matrix objects: | ||
| 53 | * matrix_identity_floatNxM and matrix_identity_doubleNxM, may be used to get | ||
| 54 | * an identity matrix of the specified size. | ||
| 55 | * | ||
| 56 | * In C++, we are able to use namespacing to make the functions more concise; | ||
| 57 | * we also overload some common arithmetic operators to work with the matrix | ||
| 58 | * types: | ||
| 59 | * | ||
| 60 | * C++ Function Equivalent C Function | ||
| 61 | * -------------------------------------------------------------------- | ||
| 62 | * simd::inverse simd_inverse | ||
| 63 | * simd::transpose simd_transpose | ||
| 64 | * operator+ simd_add | ||
| 65 | * operator- simd_sub | ||
| 66 | * operator+= N/A | ||
| 67 | * operator-= N/A | ||
| 68 | * operator* simd_mul or simd_mul | ||
| 69 | * operator*= simd_mul or simd_mul | ||
| 70 | * operator== simd_equal | ||
| 71 | * operator!= !simd_equal | ||
| 72 | * simd::almost_equal_elements simd_almost_equal_elements | ||
| 73 | * simd::almost_equal_elements_relative simd_almost_equal_elements_relative | ||
| 74 | * | ||
| 75 | * <simd/matrix_types.h> provides constructors for C++ matrix types. | ||
| 76 | */ | ||
| 77 | |||
| 78 | #ifndef SIMD_MATRIX_HEADER | ||
| 79 | #define SIMD_MATRIX_HEADER | ||
| 80 | |||
| 81 | #include <simd/base.h> | ||
| 82 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 83 | #include <simd/matrix_types.h> | ||
| 84 | #include <simd/geometry.h> | ||
| 85 | #include <simd/extern.h> | ||
| 86 | #include <simd/logic.h> | ||
| 87 | |||
| 88 | #ifdef __cplusplus | ||
| 89 | extern "C" { | ||
| 90 | #endif | ||
| 91 | |||
| 92 | extern const simd_float2x2 matrix_identity_float2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 93 | extern const simd_float3x3 matrix_identity_float3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 94 | extern const simd_float4x4 matrix_identity_float4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 95 | extern const simd_double2x2 matrix_identity_double2x2 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 96 | extern const simd_double3x3 matrix_identity_double3x3 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 97 | extern const simd_double4x4 matrix_identity_double4x4 __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 98 | |||
| 99 | static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x); | ||
| 100 | static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x); | ||
| 101 | static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x); | ||
| 102 | static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x); | ||
| 103 | static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x); | ||
| 104 | static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x); | ||
| 105 | #define matrix_from_diagonal simd_diagonal_matrix | ||
| 106 | |||
| 107 | static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1); | ||
| 108 | static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2); | ||
| 109 | static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3); | ||
| 110 | static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1); | ||
| 111 | static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2); | ||
| 112 | static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3); | ||
| 113 | static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1); | ||
| 114 | static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2); | ||
| 115 | static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3); | ||
| 116 | static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1); | ||
| 117 | static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2); | ||
| 118 | static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3); | ||
| 119 | static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1); | ||
| 120 | static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2); | ||
| 121 | static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3); | ||
| 122 | static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1); | ||
| 123 | static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2); | ||
| 124 | static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3); | ||
| 125 | #define matrix_from_columns simd_matrix | ||
| 126 | |||
| 127 | static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1); | ||
| 128 | static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2); | ||
| 129 | static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3); | ||
| 130 | static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1); | ||
| 131 | static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2); | ||
| 132 | static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3); | ||
| 133 | static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1); | ||
| 134 | static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2); | ||
| 135 | static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3); | ||
| 136 | static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1); | ||
| 137 | static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2); | ||
| 138 | static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3); | ||
| 139 | static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1); | ||
| 140 | static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2); | ||
| 141 | static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3); | ||
| 142 | static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1); | ||
| 143 | static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2); | ||
| 144 | static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3); | ||
| 145 | #define matrix_from_rows simd_matrix_from_rows | ||
| 146 | |||
| 147 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); | ||
| 148 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); | ||
| 149 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); | ||
| 150 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); | ||
| 151 | |||
| 152 | static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x); | ||
| 153 | static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x); | ||
| 154 | static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x); | ||
| 155 | static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x); | ||
| 156 | static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x); | ||
| 157 | static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x); | ||
| 158 | static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x); | ||
| 159 | static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x); | ||
| 160 | static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x); | ||
| 161 | static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x); | ||
| 162 | static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x); | ||
| 163 | static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x); | ||
| 164 | static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x); | ||
| 165 | static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x); | ||
| 166 | static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x); | ||
| 167 | static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x); | ||
| 168 | static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x); | ||
| 169 | static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x); | ||
| 170 | |||
| 171 | static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y); | ||
| 172 | static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y); | ||
| 173 | static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y); | ||
| 174 | static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y); | ||
| 175 | static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y); | ||
| 176 | static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y); | ||
| 177 | static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y); | ||
| 178 | static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y); | ||
| 179 | static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y); | ||
| 180 | static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y); | ||
| 181 | static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y); | ||
| 182 | static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y); | ||
| 183 | static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y); | ||
| 184 | static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y); | ||
| 185 | static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y); | ||
| 186 | static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y); | ||
| 187 | static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y); | ||
| 188 | static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y); | ||
| 189 | #define matrix_linear_combination simd_linear_combination | ||
| 190 | |||
| 191 | static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y); | ||
| 192 | static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y); | ||
| 193 | static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y); | ||
| 194 | static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y); | ||
| 195 | static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y); | ||
| 196 | static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y); | ||
| 197 | static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y); | ||
| 198 | static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y); | ||
| 199 | static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y); | ||
| 200 | static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y); | ||
| 201 | static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y); | ||
| 202 | static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y); | ||
| 203 | static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y); | ||
| 204 | static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y); | ||
| 205 | static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y); | ||
| 206 | static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y); | ||
| 207 | static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y); | ||
| 208 | static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y); | ||
| 209 | #define matrix_add simd_add | ||
| 210 | |||
| 211 | static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y); | ||
| 212 | static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y); | ||
| 213 | static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y); | ||
| 214 | static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y); | ||
| 215 | static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y); | ||
| 216 | static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y); | ||
| 217 | static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y); | ||
| 218 | static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y); | ||
| 219 | static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y); | ||
| 220 | static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y); | ||
| 221 | static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y); | ||
| 222 | static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y); | ||
| 223 | static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y); | ||
| 224 | static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y); | ||
| 225 | static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y); | ||
| 226 | static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y); | ||
| 227 | static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y); | ||
| 228 | static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y); | ||
| 229 | #define matrix_sub simd_sub | ||
| 230 | |||
| 231 | static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x); | ||
| 232 | static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x); | ||
| 233 | static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x); | ||
| 234 | static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x); | ||
| 235 | static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x); | ||
| 236 | static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x); | ||
| 237 | static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x); | ||
| 238 | static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x); | ||
| 239 | static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x); | ||
| 240 | static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x); | ||
| 241 | static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x); | ||
| 242 | static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x); | ||
| 243 | static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x); | ||
| 244 | static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x); | ||
| 245 | static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x); | ||
| 246 | static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x); | ||
| 247 | static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x); | ||
| 248 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x); | ||
| 249 | #define matrix_transpose simd_transpose | ||
| 250 | |||
| 251 | static float SIMD_CFUNC simd_determinant(simd_float2x2 __x); | ||
| 252 | static float SIMD_CFUNC simd_determinant(simd_float3x3 __x); | ||
| 253 | static float SIMD_CFUNC simd_determinant(simd_float4x4 __x); | ||
| 254 | static double SIMD_CFUNC simd_determinant(simd_double2x2 __x); | ||
| 255 | static double SIMD_CFUNC simd_determinant(simd_double3x3 __x); | ||
| 256 | static double SIMD_CFUNC simd_determinant(simd_double4x4 __x); | ||
| 257 | #define matrix_determinant simd_determinant | ||
| 258 | |||
| 259 | static simd_float2x2 SIMD_CFUNC simd_inverse(simd_float2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 260 | static simd_float3x3 SIMD_CFUNC simd_inverse(simd_float3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 261 | static simd_float4x4 SIMD_CFUNC simd_inverse(simd_float4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 262 | static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 263 | static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 264 | static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)); | ||
| 265 | #define matrix_invert simd_inverse | ||
| 266 | |||
| 267 | static simd_float2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2 __y); | ||
| 268 | static simd_float2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3 __y); | ||
| 269 | static simd_float2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4 __y); | ||
| 270 | static simd_float3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2 __y); | ||
| 271 | static simd_float3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3 __y); | ||
| 272 | static simd_float3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4 __y); | ||
| 273 | static simd_float4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2 __y); | ||
| 274 | static simd_float4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3 __y); | ||
| 275 | static simd_float4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4 __y); | ||
| 276 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y); | ||
| 277 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y); | ||
| 278 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y); | ||
| 279 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y); | ||
| 280 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y); | ||
| 281 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y); | ||
| 282 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y); | ||
| 283 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y); | ||
| 284 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y); | ||
| 285 | static simd_float2 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float2x2 __y); | ||
| 286 | static simd_float3 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float3x2 __y); | ||
| 287 | static simd_float4 SIMD_CFUNC simd_mul(simd_float2 __x, simd_float4x2 __y); | ||
| 288 | static simd_float2 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float2x3 __y); | ||
| 289 | static simd_float3 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float3x3 __y); | ||
| 290 | static simd_float4 SIMD_CFUNC simd_mul(simd_float3 __x, simd_float4x3 __y); | ||
| 291 | static simd_float2 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float2x4 __y); | ||
| 292 | static simd_float3 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float3x4 __y); | ||
| 293 | static simd_float4 SIMD_CFUNC simd_mul(simd_float4 __x, simd_float4x4 __y); | ||
| 294 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y); | ||
| 295 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y); | ||
| 296 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y); | ||
| 297 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y); | ||
| 298 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y); | ||
| 299 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y); | ||
| 300 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y); | ||
| 301 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y); | ||
| 302 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y); | ||
| 303 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float2x2 __y); | ||
| 304 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float3x2 __y); | ||
| 305 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float2x2 __x, simd_float4x2 __y); | ||
| 306 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float2x2 __y); | ||
| 307 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float3x2 __y); | ||
| 308 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float2x3 __x, simd_float4x2 __y); | ||
| 309 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float2x2 __y); | ||
| 310 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float3x2 __y); | ||
| 311 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float2x4 __x, simd_float4x2 __y); | ||
| 312 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y); | ||
| 313 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y); | ||
| 314 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y); | ||
| 315 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y); | ||
| 316 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y); | ||
| 317 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y); | ||
| 318 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y); | ||
| 319 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y); | ||
| 320 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y); | ||
| 321 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float2x3 __y); | ||
| 322 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float3x3 __y); | ||
| 323 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float3x2 __x, simd_float4x3 __y); | ||
| 324 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float2x3 __y); | ||
| 325 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float3x3 __y); | ||
| 326 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float3x3 __x, simd_float4x3 __y); | ||
| 327 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float2x3 __y); | ||
| 328 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float3x3 __y); | ||
| 329 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float3x4 __x, simd_float4x3 __y); | ||
| 330 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y); | ||
| 331 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y); | ||
| 332 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y); | ||
| 333 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y); | ||
| 334 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y); | ||
| 335 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y); | ||
| 336 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y); | ||
| 337 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y); | ||
| 338 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y); | ||
| 339 | static simd_float2x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float2x4 __y); | ||
| 340 | static simd_float3x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float3x4 __y); | ||
| 341 | static simd_float4x2 SIMD_CFUNC simd_mul(simd_float4x2 __x, simd_float4x4 __y); | ||
| 342 | static simd_float2x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float2x4 __y); | ||
| 343 | static simd_float3x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float3x4 __y); | ||
| 344 | static simd_float4x3 SIMD_CFUNC simd_mul(simd_float4x3 __x, simd_float4x4 __y); | ||
| 345 | static simd_float2x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float2x4 __y); | ||
| 346 | static simd_float3x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float3x4 __y); | ||
| 347 | static simd_float4x4 SIMD_CFUNC simd_mul(simd_float4x4 __x, simd_float4x4 __y); | ||
| 348 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y); | ||
| 349 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y); | ||
| 350 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y); | ||
| 351 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y); | ||
| 352 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y); | ||
| 353 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y); | ||
| 354 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y); | ||
| 355 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y); | ||
| 356 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y); | ||
| 357 | |||
| 358 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y); | ||
| 359 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y); | ||
| 360 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y); | ||
| 361 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y); | ||
| 362 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y); | ||
| 363 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y); | ||
| 364 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y); | ||
| 365 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y); | ||
| 366 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y); | ||
| 367 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y); | ||
| 368 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y); | ||
| 369 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y); | ||
| 370 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y); | ||
| 371 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y); | ||
| 372 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y); | ||
| 373 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y); | ||
| 374 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y); | ||
| 375 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y); | ||
| 376 | #define matrix_equal simd_equal | ||
| 377 | |||
| 378 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol); | ||
| 379 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol); | ||
| 380 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol); | ||
| 381 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol); | ||
| 382 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol); | ||
| 383 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol); | ||
| 384 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol); | ||
| 385 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol); | ||
| 386 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol); | ||
| 387 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol); | ||
| 388 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol); | ||
| 389 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol); | ||
| 390 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol); | ||
| 391 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol); | ||
| 392 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol); | ||
| 393 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol); | ||
| 394 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol); | ||
| 395 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol); | ||
| 396 | #define matrix_almost_equal_elements simd_almost_equal_elements | ||
| 397 | |||
| 398 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol); | ||
| 399 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol); | ||
| 400 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol); | ||
| 401 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol); | ||
| 402 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol); | ||
| 403 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol); | ||
| 404 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol); | ||
| 405 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol); | ||
| 406 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol); | ||
| 407 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol); | ||
| 408 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol); | ||
| 409 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol); | ||
| 410 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol); | ||
| 411 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol); | ||
| 412 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol); | ||
| 413 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol); | ||
| 414 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol); | ||
| 415 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol); | ||
| 416 | #define matrix_almost_equal_elements_relative simd_almost_equal_elements_relative | ||
| 417 | |||
| 418 | #ifdef __cplusplus | ||
| 419 | } /* extern "C" */ | ||
| 420 | |||
| 421 | namespace simd { | ||
| 422 | static SIMD_CPPFUNC float2x2 operator+(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 423 | static SIMD_CPPFUNC float2x3 operator+(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 424 | static SIMD_CPPFUNC float2x4 operator+(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 425 | static SIMD_CPPFUNC float3x2 operator+(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 426 | static SIMD_CPPFUNC float3x3 operator+(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 427 | static SIMD_CPPFUNC float3x4 operator+(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 428 | static SIMD_CPPFUNC float4x2 operator+(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 429 | static SIMD_CPPFUNC float4x3 operator+(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 430 | static SIMD_CPPFUNC float4x4 operator+(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 431 | |||
| 432 | static SIMD_CPPFUNC float2x2 operator-(const float2x2 x, const float2x2 y) { return float2x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 433 | static SIMD_CPPFUNC float2x3 operator-(const float2x3 x, const float2x3 y) { return float2x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 434 | static SIMD_CPPFUNC float2x4 operator-(const float2x4 x, const float2x4 y) { return float2x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 435 | static SIMD_CPPFUNC float3x2 operator-(const float3x2 x, const float3x2 y) { return float3x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 436 | static SIMD_CPPFUNC float3x3 operator-(const float3x3 x, const float3x3 y) { return float3x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 437 | static SIMD_CPPFUNC float3x4 operator-(const float3x4 x, const float3x4 y) { return float3x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 438 | static SIMD_CPPFUNC float4x2 operator-(const float4x2 x, const float4x2 y) { return float4x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 439 | static SIMD_CPPFUNC float4x3 operator-(const float4x3 x, const float4x3 y) { return float4x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 440 | static SIMD_CPPFUNC float4x4 operator-(const float4x4 x, const float4x4 y) { return float4x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 441 | |||
| 442 | static SIMD_CPPFUNC float2x2& operator+=(float2x2& x, const float2x2 y) { x = x + y; return x; } | ||
| 443 | static SIMD_CPPFUNC float2x3& operator+=(float2x3& x, const float2x3 y) { x = x + y; return x; } | ||
| 444 | static SIMD_CPPFUNC float2x4& operator+=(float2x4& x, const float2x4 y) { x = x + y; return x; } | ||
| 445 | static SIMD_CPPFUNC float3x2& operator+=(float3x2& x, const float3x2 y) { x = x + y; return x; } | ||
| 446 | static SIMD_CPPFUNC float3x3& operator+=(float3x3& x, const float3x3 y) { x = x + y; return x; } | ||
| 447 | static SIMD_CPPFUNC float3x4& operator+=(float3x4& x, const float3x4 y) { x = x + y; return x; } | ||
| 448 | static SIMD_CPPFUNC float4x2& operator+=(float4x2& x, const float4x2 y) { x = x + y; return x; } | ||
| 449 | static SIMD_CPPFUNC float4x3& operator+=(float4x3& x, const float4x3 y) { x = x + y; return x; } | ||
| 450 | static SIMD_CPPFUNC float4x4& operator+=(float4x4& x, const float4x4 y) { x = x + y; return x; } | ||
| 451 | |||
| 452 | static SIMD_CPPFUNC float2x2& operator-=(float2x2& x, const float2x2 y) { x = x - y; return x; } | ||
| 453 | static SIMD_CPPFUNC float2x3& operator-=(float2x3& x, const float2x3 y) { x = x - y; return x; } | ||
| 454 | static SIMD_CPPFUNC float2x4& operator-=(float2x4& x, const float2x4 y) { x = x - y; return x; } | ||
| 455 | static SIMD_CPPFUNC float3x2& operator-=(float3x2& x, const float3x2 y) { x = x - y; return x; } | ||
| 456 | static SIMD_CPPFUNC float3x3& operator-=(float3x3& x, const float3x3 y) { x = x - y; return x; } | ||
| 457 | static SIMD_CPPFUNC float3x4& operator-=(float3x4& x, const float3x4 y) { x = x - y; return x; } | ||
| 458 | static SIMD_CPPFUNC float4x2& operator-=(float4x2& x, const float4x2 y) { x = x - y; return x; } | ||
| 459 | static SIMD_CPPFUNC float4x3& operator-=(float4x3& x, const float4x3 y) { x = x - y; return x; } | ||
| 460 | static SIMD_CPPFUNC float4x4& operator-=(float4x4& x, const float4x4 y) { x = x - y; return x; } | ||
| 461 | |||
| 462 | static SIMD_CPPFUNC float2x2 transpose(const float2x2 x) { return ::simd_transpose(x); } | ||
| 463 | static SIMD_CPPFUNC float2x3 transpose(const float3x2 x) { return ::simd_transpose(x); } | ||
| 464 | static SIMD_CPPFUNC float2x4 transpose(const float4x2 x) { return ::simd_transpose(x); } | ||
| 465 | static SIMD_CPPFUNC float3x2 transpose(const float2x3 x) { return ::simd_transpose(x); } | ||
| 466 | static SIMD_CPPFUNC float3x3 transpose(const float3x3 x) { return ::simd_transpose(x); } | ||
| 467 | static SIMD_CPPFUNC float3x4 transpose(const float4x3 x) { return ::simd_transpose(x); } | ||
| 468 | static SIMD_CPPFUNC float4x2 transpose(const float2x4 x) { return ::simd_transpose(x); } | ||
| 469 | static SIMD_CPPFUNC float4x3 transpose(const float3x4 x) { return ::simd_transpose(x); } | ||
| 470 | static SIMD_CPPFUNC float4x4 transpose(const float4x4 x) { return ::simd_transpose(x); } | ||
| 471 | |||
| 472 | static SIMD_CPPFUNC float determinant(const float2x2 x) { return ::simd_determinant(x); } | ||
| 473 | static SIMD_CPPFUNC float determinant(const float3x3 x) { return ::simd_determinant(x); } | ||
| 474 | static SIMD_CPPFUNC float determinant(const float4x4 x) { return ::simd_determinant(x); } | ||
| 475 | |||
| 476 | #pragma clang diagnostic push | ||
| 477 | #pragma clang diagnostic ignored "-Wgcc-compat" | ||
| 478 | static SIMD_CPPFUNC float2x2 inverse(const float2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 479 | static SIMD_CPPFUNC float3x3 inverse(const float3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 480 | static SIMD_CPPFUNC float4x4 inverse(const float4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 481 | #pragma clang diagnostic pop | ||
| 482 | |||
| 483 | static SIMD_CPPFUNC float2x2 operator*(const float a, const float2x2 x) { return ::simd_mul(a, x); } | ||
| 484 | static SIMD_CPPFUNC float2x3 operator*(const float a, const float2x3 x) { return ::simd_mul(a, x); } | ||
| 485 | static SIMD_CPPFUNC float2x4 operator*(const float a, const float2x4 x) { return ::simd_mul(a, x); } | ||
| 486 | static SIMD_CPPFUNC float3x2 operator*(const float a, const float3x2 x) { return ::simd_mul(a, x); } | ||
| 487 | static SIMD_CPPFUNC float3x3 operator*(const float a, const float3x3 x) { return ::simd_mul(a, x); } | ||
| 488 | static SIMD_CPPFUNC float3x4 operator*(const float a, const float3x4 x) { return ::simd_mul(a, x); } | ||
| 489 | static SIMD_CPPFUNC float4x2 operator*(const float a, const float4x2 x) { return ::simd_mul(a, x); } | ||
| 490 | static SIMD_CPPFUNC float4x3 operator*(const float a, const float4x3 x) { return ::simd_mul(a, x); } | ||
| 491 | static SIMD_CPPFUNC float4x4 operator*(const float a, const float4x4 x) { return ::simd_mul(a, x); } | ||
| 492 | static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 493 | static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 494 | static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 495 | static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 496 | static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 497 | static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 498 | static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float a) { return ::simd_mul(a, x); } | ||
| 499 | static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float a) { return ::simd_mul(a, x); } | ||
| 500 | static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float a) { return ::simd_mul(a, x); } | ||
| 501 | static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 502 | static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 503 | static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 504 | static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 505 | static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 506 | static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 507 | static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 508 | static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 509 | static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float a) { x = ::simd_mul(a, x); return x; } | ||
| 510 | |||
| 511 | static SIMD_CPPFUNC float2 operator*(const float2 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 512 | static SIMD_CPPFUNC float3 operator*(const float2 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 513 | static SIMD_CPPFUNC float4 operator*(const float2 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 514 | static SIMD_CPPFUNC float2 operator*(const float3 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 515 | static SIMD_CPPFUNC float3 operator*(const float3 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 516 | static SIMD_CPPFUNC float4 operator*(const float3 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 517 | static SIMD_CPPFUNC float2 operator*(const float4 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 518 | static SIMD_CPPFUNC float3 operator*(const float4 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 519 | static SIMD_CPPFUNC float4 operator*(const float4 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 520 | static SIMD_CPPFUNC float2 operator*(const float2x2 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 521 | static SIMD_CPPFUNC float2 operator*(const float3x2 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 522 | static SIMD_CPPFUNC float2 operator*(const float4x2 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 523 | static SIMD_CPPFUNC float3 operator*(const float2x3 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 524 | static SIMD_CPPFUNC float3 operator*(const float3x3 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 525 | static SIMD_CPPFUNC float3 operator*(const float4x3 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 526 | static SIMD_CPPFUNC float4 operator*(const float2x4 x, const float2 y) { return ::simd_mul(x, y); } | ||
| 527 | static SIMD_CPPFUNC float4 operator*(const float3x4 x, const float3 y) { return ::simd_mul(x, y); } | ||
| 528 | static SIMD_CPPFUNC float4 operator*(const float4x4 x, const float4 y) { return ::simd_mul(x, y); } | ||
| 529 | static SIMD_CPPFUNC float2& operator*=(float2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 530 | static SIMD_CPPFUNC float3& operator*=(float3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 531 | static SIMD_CPPFUNC float4& operator*=(float4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 532 | |||
| 533 | static SIMD_CPPFUNC float2x2 operator*(const float2x2 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 534 | static SIMD_CPPFUNC float3x2 operator*(const float2x2 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 535 | static SIMD_CPPFUNC float4x2 operator*(const float2x2 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 536 | static SIMD_CPPFUNC float2x3 operator*(const float2x3 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 537 | static SIMD_CPPFUNC float3x3 operator*(const float2x3 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 538 | static SIMD_CPPFUNC float4x3 operator*(const float2x3 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 539 | static SIMD_CPPFUNC float2x4 operator*(const float2x4 x, const float2x2 y) { return ::simd_mul(x, y); } | ||
| 540 | static SIMD_CPPFUNC float3x4 operator*(const float2x4 x, const float3x2 y) { return ::simd_mul(x, y); } | ||
| 541 | static SIMD_CPPFUNC float4x4 operator*(const float2x4 x, const float4x2 y) { return ::simd_mul(x, y); } | ||
| 542 | static SIMD_CPPFUNC float2x2 operator*(const float3x2 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 543 | static SIMD_CPPFUNC float3x2 operator*(const float3x2 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 544 | static SIMD_CPPFUNC float4x2 operator*(const float3x2 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 545 | static SIMD_CPPFUNC float2x3 operator*(const float3x3 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 546 | static SIMD_CPPFUNC float3x3 operator*(const float3x3 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 547 | static SIMD_CPPFUNC float4x3 operator*(const float3x3 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 548 | static SIMD_CPPFUNC float2x4 operator*(const float3x4 x, const float2x3 y) { return ::simd_mul(x, y); } | ||
| 549 | static SIMD_CPPFUNC float3x4 operator*(const float3x4 x, const float3x3 y) { return ::simd_mul(x, y); } | ||
| 550 | static SIMD_CPPFUNC float4x4 operator*(const float3x4 x, const float4x3 y) { return ::simd_mul(x, y); } | ||
| 551 | static SIMD_CPPFUNC float2x2 operator*(const float4x2 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 552 | static SIMD_CPPFUNC float3x2 operator*(const float4x2 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 553 | static SIMD_CPPFUNC float4x2 operator*(const float4x2 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 554 | static SIMD_CPPFUNC float2x3 operator*(const float4x3 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 555 | static SIMD_CPPFUNC float3x3 operator*(const float4x3 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 556 | static SIMD_CPPFUNC float4x3 operator*(const float4x3 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 557 | static SIMD_CPPFUNC float2x4 operator*(const float4x4 x, const float2x4 y) { return ::simd_mul(x, y); } | ||
| 558 | static SIMD_CPPFUNC float3x4 operator*(const float4x4 x, const float3x4 y) { return ::simd_mul(x, y); } | ||
| 559 | static SIMD_CPPFUNC float4x4 operator*(const float4x4 x, const float4x4 y) { return ::simd_mul(x, y); } | ||
| 560 | static SIMD_CPPFUNC float2x2& operator*=(float2x2& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 561 | static SIMD_CPPFUNC float2x3& operator*=(float2x3& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 562 | static SIMD_CPPFUNC float2x4& operator*=(float2x4& x, const float2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 563 | static SIMD_CPPFUNC float3x2& operator*=(float3x2& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 564 | static SIMD_CPPFUNC float3x3& operator*=(float3x3& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 565 | static SIMD_CPPFUNC float3x4& operator*=(float3x4& x, const float3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 566 | static SIMD_CPPFUNC float4x2& operator*=(float4x2& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 567 | static SIMD_CPPFUNC float4x3& operator*=(float4x3& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 568 | static SIMD_CPPFUNC float4x4& operator*=(float4x4& x, const float4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 569 | |||
| 570 | static SIMD_CPPFUNC bool operator==(const float2x2& x, const float2x2& y) { return ::simd_equal(x, y); } | ||
| 571 | static SIMD_CPPFUNC bool operator==(const float2x3& x, const float2x3& y) { return ::simd_equal(x, y); } | ||
| 572 | static SIMD_CPPFUNC bool operator==(const float2x4& x, const float2x4& y) { return ::simd_equal(x, y); } | ||
| 573 | static SIMD_CPPFUNC bool operator==(const float3x2& x, const float3x2& y) { return ::simd_equal(x, y); } | ||
| 574 | static SIMD_CPPFUNC bool operator==(const float3x3& x, const float3x3& y) { return ::simd_equal(x, y); } | ||
| 575 | static SIMD_CPPFUNC bool operator==(const float3x4& x, const float3x4& y) { return ::simd_equal(x, y); } | ||
| 576 | static SIMD_CPPFUNC bool operator==(const float4x2& x, const float4x2& y) { return ::simd_equal(x, y); } | ||
| 577 | static SIMD_CPPFUNC bool operator==(const float4x3& x, const float4x3& y) { return ::simd_equal(x, y); } | ||
| 578 | static SIMD_CPPFUNC bool operator==(const float4x4& x, const float4x4& y) { return ::simd_equal(x, y); } | ||
| 579 | |||
| 580 | static SIMD_CPPFUNC bool operator!=(const float2x2& x, const float2x2& y) { return !(x == y); } | ||
| 581 | static SIMD_CPPFUNC bool operator!=(const float2x3& x, const float2x3& y) { return !(x == y); } | ||
| 582 | static SIMD_CPPFUNC bool operator!=(const float2x4& x, const float2x4& y) { return !(x == y); } | ||
| 583 | static SIMD_CPPFUNC bool operator!=(const float3x2& x, const float3x2& y) { return !(x == y); } | ||
| 584 | static SIMD_CPPFUNC bool operator!=(const float3x3& x, const float3x3& y) { return !(x == y); } | ||
| 585 | static SIMD_CPPFUNC bool operator!=(const float3x4& x, const float3x4& y) { return !(x == y); } | ||
| 586 | static SIMD_CPPFUNC bool operator!=(const float4x2& x, const float4x2& y) { return !(x == y); } | ||
| 587 | static SIMD_CPPFUNC bool operator!=(const float4x3& x, const float4x3& y) { return !(x == y); } | ||
| 588 | static SIMD_CPPFUNC bool operator!=(const float4x4& x, const float4x4& y) { return !(x == y); } | ||
| 589 | |||
| 590 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 591 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 592 | static SIMD_CPPFUNC bool almost_equal_elements(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 593 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 594 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 595 | static SIMD_CPPFUNC bool almost_equal_elements(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 596 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 597 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 598 | static SIMD_CPPFUNC bool almost_equal_elements(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 599 | |||
| 600 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x2 x, const float2x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 601 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x3 x, const float2x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 602 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float2x4 x, const float2x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 603 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x2 x, const float3x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 604 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x3 x, const float3x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 605 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float3x4 x, const float3x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 606 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x2 x, const float4x2 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 607 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x3 x, const float4x3 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 608 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const float4x4 x, const float4x4 y, const float tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 609 | |||
| 610 | static SIMD_CPPFUNC double2x2 operator+(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 611 | static SIMD_CPPFUNC double2x3 operator+(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 612 | static SIMD_CPPFUNC double2x4 operator+(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 613 | static SIMD_CPPFUNC double3x2 operator+(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 614 | static SIMD_CPPFUNC double3x3 operator+(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 615 | static SIMD_CPPFUNC double3x4 operator+(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 616 | static SIMD_CPPFUNC double4x2 operator+(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, 1, y)); } | ||
| 617 | static SIMD_CPPFUNC double4x3 operator+(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, 1, y)); } | ||
| 618 | static SIMD_CPPFUNC double4x4 operator+(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, 1, y)); } | ||
| 619 | |||
| 620 | static SIMD_CPPFUNC double2x2 operator-(const double2x2 x, const double2x2 y) { return double2x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 621 | static SIMD_CPPFUNC double2x3 operator-(const double2x3 x, const double2x3 y) { return double2x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 622 | static SIMD_CPPFUNC double2x4 operator-(const double2x4 x, const double2x4 y) { return double2x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 623 | static SIMD_CPPFUNC double3x2 operator-(const double3x2 x, const double3x2 y) { return double3x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 624 | static SIMD_CPPFUNC double3x3 operator-(const double3x3 x, const double3x3 y) { return double3x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 625 | static SIMD_CPPFUNC double3x4 operator-(const double3x4 x, const double3x4 y) { return double3x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 626 | static SIMD_CPPFUNC double4x2 operator-(const double4x2 x, const double4x2 y) { return double4x2(::simd_linear_combination(1, x, -1, y)); } | ||
| 627 | static SIMD_CPPFUNC double4x3 operator-(const double4x3 x, const double4x3 y) { return double4x3(::simd_linear_combination(1, x, -1, y)); } | ||
| 628 | static SIMD_CPPFUNC double4x4 operator-(const double4x4 x, const double4x4 y) { return double4x4(::simd_linear_combination(1, x, -1, y)); } | ||
| 629 | |||
| 630 | static SIMD_CPPFUNC double2x2& operator+=(double2x2& x, const double2x2 y) { x = x + y; return x; } | ||
| 631 | static SIMD_CPPFUNC double2x3& operator+=(double2x3& x, const double2x3 y) { x = x + y; return x; } | ||
| 632 | static SIMD_CPPFUNC double2x4& operator+=(double2x4& x, const double2x4 y) { x = x + y; return x; } | ||
| 633 | static SIMD_CPPFUNC double3x2& operator+=(double3x2& x, const double3x2 y) { x = x + y; return x; } | ||
| 634 | static SIMD_CPPFUNC double3x3& operator+=(double3x3& x, const double3x3 y) { x = x + y; return x; } | ||
| 635 | static SIMD_CPPFUNC double3x4& operator+=(double3x4& x, const double3x4 y) { x = x + y; return x; } | ||
| 636 | static SIMD_CPPFUNC double4x2& operator+=(double4x2& x, const double4x2 y) { x = x + y; return x; } | ||
| 637 | static SIMD_CPPFUNC double4x3& operator+=(double4x3& x, const double4x3 y) { x = x + y; return x; } | ||
| 638 | static SIMD_CPPFUNC double4x4& operator+=(double4x4& x, const double4x4 y) { x = x + y; return x; } | ||
| 639 | |||
| 640 | static SIMD_CPPFUNC double2x2& operator-=(double2x2& x, const double2x2 y) { x = x - y; return x; } | ||
| 641 | static SIMD_CPPFUNC double2x3& operator-=(double2x3& x, const double2x3 y) { x = x - y; return x; } | ||
| 642 | static SIMD_CPPFUNC double2x4& operator-=(double2x4& x, const double2x4 y) { x = x - y; return x; } | ||
| 643 | static SIMD_CPPFUNC double3x2& operator-=(double3x2& x, const double3x2 y) { x = x - y; return x; } | ||
| 644 | static SIMD_CPPFUNC double3x3& operator-=(double3x3& x, const double3x3 y) { x = x - y; return x; } | ||
| 645 | static SIMD_CPPFUNC double3x4& operator-=(double3x4& x, const double3x4 y) { x = x - y; return x; } | ||
| 646 | static SIMD_CPPFUNC double4x2& operator-=(double4x2& x, const double4x2 y) { x = x - y; return x; } | ||
| 647 | static SIMD_CPPFUNC double4x3& operator-=(double4x3& x, const double4x3 y) { x = x - y; return x; } | ||
| 648 | static SIMD_CPPFUNC double4x4& operator-=(double4x4& x, const double4x4 y) { x = x - y; return x; } | ||
| 649 | |||
| 650 | static SIMD_CPPFUNC double2x2 transpose(const double2x2 x) { return ::simd_transpose(x); } | ||
| 651 | static SIMD_CPPFUNC double2x3 transpose(const double3x2 x) { return ::simd_transpose(x); } | ||
| 652 | static SIMD_CPPFUNC double2x4 transpose(const double4x2 x) { return ::simd_transpose(x); } | ||
| 653 | static SIMD_CPPFUNC double3x2 transpose(const double2x3 x) { return ::simd_transpose(x); } | ||
| 654 | static SIMD_CPPFUNC double3x3 transpose(const double3x3 x) { return ::simd_transpose(x); } | ||
| 655 | static SIMD_CPPFUNC double3x4 transpose(const double4x3 x) { return ::simd_transpose(x); } | ||
| 656 | static SIMD_CPPFUNC double4x2 transpose(const double2x4 x) { return ::simd_transpose(x); } | ||
| 657 | static SIMD_CPPFUNC double4x3 transpose(const double3x4 x) { return ::simd_transpose(x); } | ||
| 658 | static SIMD_CPPFUNC double4x4 transpose(const double4x4 x) { return ::simd_transpose(x); } | ||
| 659 | |||
| 660 | static SIMD_CPPFUNC double determinant(const double2x2 x) { return ::simd_determinant(x); } | ||
| 661 | static SIMD_CPPFUNC double determinant(const double3x3 x) { return ::simd_determinant(x); } | ||
| 662 | static SIMD_CPPFUNC double determinant(const double4x4 x) { return ::simd_determinant(x); } | ||
| 663 | |||
| 664 | #pragma clang diagnostic push | ||
| 665 | #pragma clang diagnostic ignored "-Wgcc-compat" | ||
| 666 | static SIMD_CPPFUNC double2x2 inverse(const double2x2 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 667 | static SIMD_CPPFUNC double3x3 inverse(const double3x3 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 668 | static SIMD_CPPFUNC double4x4 inverse(const double4x4 x) __API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) { return ::simd_inverse(x); } | ||
| 669 | #pragma clang diagnostic pop | ||
| 670 | |||
| 671 | static SIMD_CPPFUNC double2x2 operator*(const double a, const double2x2 x) { return ::simd_mul(a, x); } | ||
| 672 | static SIMD_CPPFUNC double2x3 operator*(const double a, const double2x3 x) { return ::simd_mul(a, x); } | ||
| 673 | static SIMD_CPPFUNC double2x4 operator*(const double a, const double2x4 x) { return ::simd_mul(a, x); } | ||
| 674 | static SIMD_CPPFUNC double3x2 operator*(const double a, const double3x2 x) { return ::simd_mul(a, x); } | ||
| 675 | static SIMD_CPPFUNC double3x3 operator*(const double a, const double3x3 x) { return ::simd_mul(a, x); } | ||
| 676 | static SIMD_CPPFUNC double3x4 operator*(const double a, const double3x4 x) { return ::simd_mul(a, x); } | ||
| 677 | static SIMD_CPPFUNC double4x2 operator*(const double a, const double4x2 x) { return ::simd_mul(a, x); } | ||
| 678 | static SIMD_CPPFUNC double4x3 operator*(const double a, const double4x3 x) { return ::simd_mul(a, x); } | ||
| 679 | static SIMD_CPPFUNC double4x4 operator*(const double a, const double4x4 x) { return ::simd_mul(a, x); } | ||
| 680 | static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 681 | static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 682 | static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 683 | static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 684 | static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 685 | static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 686 | static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double a) { return ::simd_mul(a, x); } | ||
| 687 | static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double a) { return ::simd_mul(a, x); } | ||
| 688 | static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double a) { return ::simd_mul(a, x); } | ||
| 689 | static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 690 | static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 691 | static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 692 | static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 693 | static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 694 | static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 695 | static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 696 | static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 697 | static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double a) { x = ::simd_mul(a, x); return x; } | ||
| 698 | |||
| 699 | static SIMD_CPPFUNC double2 operator*(const double2 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 700 | static SIMD_CPPFUNC double3 operator*(const double2 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 701 | static SIMD_CPPFUNC double4 operator*(const double2 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 702 | static SIMD_CPPFUNC double2 operator*(const double3 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 703 | static SIMD_CPPFUNC double3 operator*(const double3 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 704 | static SIMD_CPPFUNC double4 operator*(const double3 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 705 | static SIMD_CPPFUNC double2 operator*(const double4 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 706 | static SIMD_CPPFUNC double3 operator*(const double4 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 707 | static SIMD_CPPFUNC double4 operator*(const double4 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 708 | static SIMD_CPPFUNC double2 operator*(const double2x2 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 709 | static SIMD_CPPFUNC double2 operator*(const double3x2 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 710 | static SIMD_CPPFUNC double2 operator*(const double4x2 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 711 | static SIMD_CPPFUNC double3 operator*(const double2x3 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 712 | static SIMD_CPPFUNC double3 operator*(const double3x3 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 713 | static SIMD_CPPFUNC double3 operator*(const double4x3 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 714 | static SIMD_CPPFUNC double4 operator*(const double2x4 x, const double2 y) { return ::simd_mul(x, y); } | ||
| 715 | static SIMD_CPPFUNC double4 operator*(const double3x4 x, const double3 y) { return ::simd_mul(x, y); } | ||
| 716 | static SIMD_CPPFUNC double4 operator*(const double4x4 x, const double4 y) { return ::simd_mul(x, y); } | ||
| 717 | static SIMD_CPPFUNC double2& operator*=(double2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 718 | static SIMD_CPPFUNC double3& operator*=(double3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 719 | static SIMD_CPPFUNC double4& operator*=(double4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 720 | |||
| 721 | static SIMD_CPPFUNC double2x2 operator*(const double2x2 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 722 | static SIMD_CPPFUNC double3x2 operator*(const double2x2 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 723 | static SIMD_CPPFUNC double4x2 operator*(const double2x2 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 724 | static SIMD_CPPFUNC double2x3 operator*(const double2x3 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 725 | static SIMD_CPPFUNC double3x3 operator*(const double2x3 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 726 | static SIMD_CPPFUNC double4x3 operator*(const double2x3 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 727 | static SIMD_CPPFUNC double2x4 operator*(const double2x4 x, const double2x2 y) { return ::simd_mul(x, y); } | ||
| 728 | static SIMD_CPPFUNC double3x4 operator*(const double2x4 x, const double3x2 y) { return ::simd_mul(x, y); } | ||
| 729 | static SIMD_CPPFUNC double4x4 operator*(const double2x4 x, const double4x2 y) { return ::simd_mul(x, y); } | ||
| 730 | static SIMD_CPPFUNC double2x2 operator*(const double3x2 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 731 | static SIMD_CPPFUNC double3x2 operator*(const double3x2 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 732 | static SIMD_CPPFUNC double4x2 operator*(const double3x2 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 733 | static SIMD_CPPFUNC double2x3 operator*(const double3x3 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 734 | static SIMD_CPPFUNC double3x3 operator*(const double3x3 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 735 | static SIMD_CPPFUNC double4x3 operator*(const double3x3 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 736 | static SIMD_CPPFUNC double2x4 operator*(const double3x4 x, const double2x3 y) { return ::simd_mul(x, y); } | ||
| 737 | static SIMD_CPPFUNC double3x4 operator*(const double3x4 x, const double3x3 y) { return ::simd_mul(x, y); } | ||
| 738 | static SIMD_CPPFUNC double4x4 operator*(const double3x4 x, const double4x3 y) { return ::simd_mul(x, y); } | ||
| 739 | static SIMD_CPPFUNC double2x2 operator*(const double4x2 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 740 | static SIMD_CPPFUNC double3x2 operator*(const double4x2 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 741 | static SIMD_CPPFUNC double4x2 operator*(const double4x2 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 742 | static SIMD_CPPFUNC double2x3 operator*(const double4x3 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 743 | static SIMD_CPPFUNC double3x3 operator*(const double4x3 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 744 | static SIMD_CPPFUNC double4x3 operator*(const double4x3 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 745 | static SIMD_CPPFUNC double2x4 operator*(const double4x4 x, const double2x4 y) { return ::simd_mul(x, y); } | ||
| 746 | static SIMD_CPPFUNC double3x4 operator*(const double4x4 x, const double3x4 y) { return ::simd_mul(x, y); } | ||
| 747 | static SIMD_CPPFUNC double4x4 operator*(const double4x4 x, const double4x4 y) { return ::simd_mul(x, y); } | ||
| 748 | static SIMD_CPPFUNC double2x2& operator*=(double2x2& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 749 | static SIMD_CPPFUNC double2x3& operator*=(double2x3& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 750 | static SIMD_CPPFUNC double2x4& operator*=(double2x4& x, const double2x2 y) { x = ::simd_mul(x, y); return x; } | ||
| 751 | static SIMD_CPPFUNC double3x2& operator*=(double3x2& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 752 | static SIMD_CPPFUNC double3x3& operator*=(double3x3& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 753 | static SIMD_CPPFUNC double3x4& operator*=(double3x4& x, const double3x3 y) { x = ::simd_mul(x, y); return x; } | ||
| 754 | static SIMD_CPPFUNC double4x2& operator*=(double4x2& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 755 | static SIMD_CPPFUNC double4x3& operator*=(double4x3& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 756 | static SIMD_CPPFUNC double4x4& operator*=(double4x4& x, const double4x4 y) { x = ::simd_mul(x, y); return x; } | ||
| 757 | |||
| 758 | static SIMD_CPPFUNC bool operator==(const double2x2& x, const double2x2& y) { return ::simd_equal(x, y); } | ||
| 759 | static SIMD_CPPFUNC bool operator==(const double2x3& x, const double2x3& y) { return ::simd_equal(x, y); } | ||
| 760 | static SIMD_CPPFUNC bool operator==(const double2x4& x, const double2x4& y) { return ::simd_equal(x, y); } | ||
| 761 | static SIMD_CPPFUNC bool operator==(const double3x2& x, const double3x2& y) { return ::simd_equal(x, y); } | ||
| 762 | static SIMD_CPPFUNC bool operator==(const double3x3& x, const double3x3& y) { return ::simd_equal(x, y); } | ||
| 763 | static SIMD_CPPFUNC bool operator==(const double3x4& x, const double3x4& y) { return ::simd_equal(x, y); } | ||
| 764 | static SIMD_CPPFUNC bool operator==(const double4x2& x, const double4x2& y) { return ::simd_equal(x, y); } | ||
| 765 | static SIMD_CPPFUNC bool operator==(const double4x3& x, const double4x3& y) { return ::simd_equal(x, y); } | ||
| 766 | static SIMD_CPPFUNC bool operator==(const double4x4& x, const double4x4& y) { return ::simd_equal(x, y); } | ||
| 767 | |||
| 768 | static SIMD_CPPFUNC bool operator!=(const double2x2& x, const double2x2& y) { return !(x == y); } | ||
| 769 | static SIMD_CPPFUNC bool operator!=(const double2x3& x, const double2x3& y) { return !(x == y); } | ||
| 770 | static SIMD_CPPFUNC bool operator!=(const double2x4& x, const double2x4& y) { return !(x == y); } | ||
| 771 | static SIMD_CPPFUNC bool operator!=(const double3x2& x, const double3x2& y) { return !(x == y); } | ||
| 772 | static SIMD_CPPFUNC bool operator!=(const double3x3& x, const double3x3& y) { return !(x == y); } | ||
| 773 | static SIMD_CPPFUNC bool operator!=(const double3x4& x, const double3x4& y) { return !(x == y); } | ||
| 774 | static SIMD_CPPFUNC bool operator!=(const double4x2& x, const double4x2& y) { return !(x == y); } | ||
| 775 | static SIMD_CPPFUNC bool operator!=(const double4x3& x, const double4x3& y) { return !(x == y); } | ||
| 776 | static SIMD_CPPFUNC bool operator!=(const double4x4& x, const double4x4& y) { return !(x == y); } | ||
| 777 | |||
| 778 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 779 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 780 | static SIMD_CPPFUNC bool almost_equal_elements(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 781 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 782 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 783 | static SIMD_CPPFUNC bool almost_equal_elements(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 784 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 785 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 786 | static SIMD_CPPFUNC bool almost_equal_elements(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements(x, y, tol); } | ||
| 787 | |||
| 788 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x2 x, const double2x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 789 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x3 x, const double2x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 790 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double2x4 x, const double2x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 791 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x2 x, const double3x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 792 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x3 x, const double3x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 793 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double3x4 x, const double3x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 794 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x2 x, const double4x2 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 795 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x3 x, const double4x3 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 796 | static SIMD_CPPFUNC bool almost_equal_elements_relative(const double4x4 x, const double4x4 y, const double tol) { return ::simd_almost_equal_elements_relative(x, y, tol); } | ||
| 797 | } | ||
| 798 | |||
| 799 | extern "C" { | ||
| 800 | #endif /* __cplusplus */ | ||
| 801 | |||
| 802 | #pragma mark - Implementation | ||
| 803 | |||
| 804 | static simd_float2x2 SIMD_CFUNC simd_diagonal_matrix(simd_float2 __x) { simd_float2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } | ||
| 805 | static simd_double2x2 SIMD_CFUNC simd_diagonal_matrix(simd_double2 __x) { simd_double2x2 __r = { .columns[0] = {__x.x,0}, .columns[1] = {0,__x.y} }; return __r; } | ||
| 806 | static simd_float3x3 SIMD_CFUNC simd_diagonal_matrix(simd_float3 __x) { simd_float3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } | ||
| 807 | static simd_double3x3 SIMD_CFUNC simd_diagonal_matrix(simd_double3 __x) { simd_double3x3 __r = { .columns[0] = {__x.x,0,0}, .columns[1] = {0,__x.y,0}, .columns[2] = {0,0,__x.z} }; return __r; } | ||
| 808 | static simd_float4x4 SIMD_CFUNC simd_diagonal_matrix(simd_float4 __x) { simd_float4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } | ||
| 809 | static simd_double4x4 SIMD_CFUNC simd_diagonal_matrix(simd_double4 __x) { simd_double4x4 __r = { .columns[0] = {__x.x,0,0,0}, .columns[1] = {0,__x.y,0,0}, .columns[2] = {0,0,__x.z,0}, .columns[3] = {0,0,0,__x.w} }; return __r; } | ||
| 810 | |||
| 811 | static simd_float2x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1) { simd_float2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 812 | static simd_float2x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1) { simd_float2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 813 | static simd_float2x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1) { simd_float2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 814 | static simd_double2x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1) { simd_double2x2 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 815 | static simd_double2x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1) { simd_double2x3 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 816 | static simd_double2x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1) { simd_double2x4 __r = { .columns[0] = col0, .columns[1] = col1 }; return __r; } | ||
| 817 | static simd_float3x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2) { simd_float3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 818 | static simd_float3x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2) { simd_float3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 819 | static simd_float3x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2) { simd_float3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 820 | static simd_double3x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2) { simd_double3x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 821 | static simd_double3x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2) { simd_double3x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 822 | static simd_double3x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2) { simd_double3x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2 }; return __r; } | ||
| 823 | static simd_float4x2 SIMD_CFUNC simd_matrix(simd_float2 col0, simd_float2 col1, simd_float2 col2, simd_float2 col3) { simd_float4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 824 | static simd_float4x3 SIMD_CFUNC simd_matrix(simd_float3 col0, simd_float3 col1, simd_float3 col2, simd_float3 col3) { simd_float4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 825 | static simd_float4x4 SIMD_CFUNC simd_matrix(simd_float4 col0, simd_float4 col1, simd_float4 col2, simd_float4 col3) { simd_float4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 826 | static simd_double4x2 SIMD_CFUNC simd_matrix(simd_double2 col0, simd_double2 col1, simd_double2 col2, simd_double2 col3) { simd_double4x2 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 827 | static simd_double4x3 SIMD_CFUNC simd_matrix(simd_double3 col0, simd_double3 col1, simd_double3 col2, simd_double3 col3) { simd_double4x3 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 828 | static simd_double4x4 SIMD_CFUNC simd_matrix(simd_double4 col0, simd_double4 col1, simd_double4 col2, simd_double4 col3) { simd_double4x4 __r = { .columns[0] = col0, .columns[1] = col1, .columns[2] = col2, .columns[3] = col3 }; return __r; } | ||
| 829 | |||
| 830 | static simd_float2x2 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 831 | static simd_float3x2 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 832 | static simd_float4x2 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 833 | static simd_double2x2 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 834 | static simd_double3x2 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 835 | static simd_double4x2 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1) { return simd_transpose(simd_matrix(row0, row1)); } | ||
| 836 | static simd_float2x3 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 837 | static simd_float3x3 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 838 | static simd_float4x3 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 839 | static simd_double2x3 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 840 | static simd_double3x3 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 841 | static simd_double4x3 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2) { return simd_transpose(simd_matrix(row0, row1, row2)); } | ||
| 842 | static simd_float2x4 SIMD_CFUNC simd_matrix_from_rows(simd_float2 row0, simd_float2 row1, simd_float2 row2, simd_float2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 843 | static simd_float3x4 SIMD_CFUNC simd_matrix_from_rows(simd_float3 row0, simd_float3 row1, simd_float3 row2, simd_float3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 844 | static simd_float4x4 SIMD_CFUNC simd_matrix_from_rows(simd_float4 row0, simd_float4 row1, simd_float4 row2, simd_float4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 845 | static simd_double2x4 SIMD_CFUNC simd_matrix_from_rows(simd_double2 row0, simd_double2 row1, simd_double2 row2, simd_double2 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 846 | static simd_double3x4 SIMD_CFUNC simd_matrix_from_rows(simd_double3 row0, simd_double3 row1, simd_double3 row2, simd_double3 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 847 | static simd_double4x4 SIMD_CFUNC simd_matrix_from_rows(simd_double4 row0, simd_double4 row1, simd_double4 row2, simd_double4 row3) { return simd_transpose(simd_matrix(row0, row1, row2, row3)); } | ||
| 848 | |||
| 849 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q) { | ||
| 850 | simd_float4x4 r = simd_matrix4x4(q); | ||
| 851 | return (simd_float3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; | ||
| 852 | } | ||
| 853 | |||
| 854 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q) { | ||
| 855 | simd_float4 v = q.vector; | ||
| 856 | simd_float4x4 r = { | ||
| 857 | .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), | ||
| 858 | 2*(v.x*v.y + v.z*v.w), | ||
| 859 | 2*(v.x*v.z - v.y*v.w), 0 }, | ||
| 860 | .columns[1] = { 2*(v.x*v.y - v.z*v.w), | ||
| 861 | 1 - 2*(v.z*v.z + v.x*v.x), | ||
| 862 | 2*(v.y*v.z + v.x*v.w), 0 }, | ||
| 863 | .columns[2] = { 2*(v.z*v.x + v.y*v.w), | ||
| 864 | 2*(v.y*v.z - v.x*v.w), | ||
| 865 | 1 - 2*(v.y*v.y + v.x*v.x), 0 }, | ||
| 866 | .columns[3] = { 0, 0, 0, 1 } | ||
| 867 | }; | ||
| 868 | return r; | ||
| 869 | } | ||
| 870 | |||
| 871 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q) { | ||
| 872 | simd_double4x4 r = simd_matrix4x4(q); | ||
| 873 | return (simd_double3x3){ r.columns[0].xyz, r.columns[1].xyz, r.columns[2].xyz }; | ||
| 874 | } | ||
| 875 | |||
| 876 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q) { | ||
| 877 | simd_double4 v = q.vector; | ||
| 878 | simd_double4x4 r = { | ||
| 879 | .columns[0] = { 1 - 2*(v.y*v.y + v.z*v.z), | ||
| 880 | 2*(v.x*v.y + v.z*v.w), | ||
| 881 | 2*(v.x*v.z - v.y*v.w), 0 }, | ||
| 882 | .columns[1] = { 2*(v.x*v.y - v.z*v.w), | ||
| 883 | 1 - 2*(v.z*v.z + v.x*v.x), | ||
| 884 | 2*(v.y*v.z + v.x*v.w), 0 }, | ||
| 885 | .columns[2] = { 2*(v.z*v.x + v.y*v.w), | ||
| 886 | 2*(v.y*v.z - v.x*v.w), | ||
| 887 | 1 - 2*(v.y*v.y + v.x*v.x), 0 }, | ||
| 888 | .columns[3] = { 0, 0, 0, 1 } | ||
| 889 | }; | ||
| 890 | return r; | ||
| 891 | } | ||
| 892 | |||
| 893 | static simd_float2x2 SIMD_CFUNC matrix_scale(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 894 | static simd_float3x2 SIMD_CFUNC matrix_scale(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 895 | static simd_float4x2 SIMD_CFUNC matrix_scale(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 896 | static simd_float2x3 SIMD_CFUNC matrix_scale(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 897 | static simd_float3x3 SIMD_CFUNC matrix_scale(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 898 | static simd_float4x3 SIMD_CFUNC matrix_scale(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 899 | static simd_float2x4 SIMD_CFUNC matrix_scale(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 900 | static simd_float3x4 SIMD_CFUNC matrix_scale(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 901 | static simd_float4x4 SIMD_CFUNC matrix_scale(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 902 | static simd_double2x2 SIMD_CFUNC matrix_scale(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 903 | static simd_double3x2 SIMD_CFUNC matrix_scale(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 904 | static simd_double4x2 SIMD_CFUNC matrix_scale(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 905 | static simd_double2x3 SIMD_CFUNC matrix_scale(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 906 | static simd_double3x3 SIMD_CFUNC matrix_scale(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 907 | static simd_double4x3 SIMD_CFUNC matrix_scale(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 908 | static simd_double2x4 SIMD_CFUNC matrix_scale(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 909 | static simd_double3x4 SIMD_CFUNC matrix_scale(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 910 | static simd_double4x4 SIMD_CFUNC matrix_scale(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 911 | |||
| 912 | static simd_float2x2 SIMD_CFUNC simd_mul(float __a, simd_float2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 913 | static simd_float3x2 SIMD_CFUNC simd_mul(float __a, simd_float3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 914 | static simd_float4x2 SIMD_CFUNC simd_mul(float __a, simd_float4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 915 | static simd_float2x3 SIMD_CFUNC simd_mul(float __a, simd_float2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 916 | static simd_float3x3 SIMD_CFUNC simd_mul(float __a, simd_float3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 917 | static simd_float4x3 SIMD_CFUNC simd_mul(float __a, simd_float4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 918 | static simd_float2x4 SIMD_CFUNC simd_mul(float __a, simd_float2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 919 | static simd_float3x4 SIMD_CFUNC simd_mul(float __a, simd_float3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 920 | static simd_float4x4 SIMD_CFUNC simd_mul(float __a, simd_float4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 921 | static simd_double2x2 SIMD_CFUNC simd_mul(double __a, simd_double2x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 922 | static simd_double3x2 SIMD_CFUNC simd_mul(double __a, simd_double3x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 923 | static simd_double4x2 SIMD_CFUNC simd_mul(double __a, simd_double4x2 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 924 | static simd_double2x3 SIMD_CFUNC simd_mul(double __a, simd_double2x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 925 | static simd_double3x3 SIMD_CFUNC simd_mul(double __a, simd_double3x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 926 | static simd_double4x3 SIMD_CFUNC simd_mul(double __a, simd_double4x3 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 927 | static simd_double2x4 SIMD_CFUNC simd_mul(double __a, simd_double2x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; return __x; } | ||
| 928 | static simd_double3x4 SIMD_CFUNC simd_mul(double __a, simd_double3x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; return __x; } | ||
| 929 | static simd_double4x4 SIMD_CFUNC simd_mul(double __a, simd_double4x4 __x) { __x.columns[0] *= __a; __x.columns[1] *= __a; __x.columns[2] *= __a; __x.columns[3] *= __a; return __x; } | ||
| 930 | |||
| 931 | static simd_float2x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x2 __x, float __b, simd_float2x2 __y) { | ||
| 932 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 933 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 934 | return __x; | ||
| 935 | } | ||
| 936 | static simd_float3x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x2 __x, float __b, simd_float3x2 __y) { | ||
| 937 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 938 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 939 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 940 | return __x; | ||
| 941 | } | ||
| 942 | static simd_float4x2 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x2 __x, float __b, simd_float4x2 __y) { | ||
| 943 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 944 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 945 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 946 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 947 | return __x; | ||
| 948 | } | ||
| 949 | static simd_float2x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x3 __x, float __b, simd_float2x3 __y) { | ||
| 950 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 951 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 952 | return __x; | ||
| 953 | } | ||
| 954 | static simd_float3x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x3 __x, float __b, simd_float3x3 __y) { | ||
| 955 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 956 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 957 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 958 | return __x; | ||
| 959 | } | ||
| 960 | static simd_float4x3 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x3 __x, float __b, simd_float4x3 __y) { | ||
| 961 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 962 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 963 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 964 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 965 | return __x; | ||
| 966 | } | ||
| 967 | static simd_float2x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float2x4 __x, float __b, simd_float2x4 __y) { | ||
| 968 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 969 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 970 | return __x; | ||
| 971 | } | ||
| 972 | static simd_float3x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float3x4 __x, float __b, simd_float3x4 __y) { | ||
| 973 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 974 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 975 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 976 | return __x; | ||
| 977 | } | ||
| 978 | static simd_float4x4 SIMD_CFUNC simd_linear_combination(float __a, simd_float4x4 __x, float __b, simd_float4x4 __y) { | ||
| 979 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 980 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 981 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 982 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 983 | return __x; | ||
| 984 | } | ||
| 985 | static simd_double2x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x2 __x, double __b, simd_double2x2 __y) { | ||
| 986 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 987 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 988 | return __x; | ||
| 989 | } | ||
| 990 | static simd_double3x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x2 __x, double __b, simd_double3x2 __y) { | ||
| 991 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 992 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 993 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 994 | return __x; | ||
| 995 | } | ||
| 996 | static simd_double4x2 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x2 __x, double __b, simd_double4x2 __y) { | ||
| 997 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 998 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 999 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1000 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1001 | return __x; | ||
| 1002 | } | ||
| 1003 | static simd_double2x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x3 __x, double __b, simd_double2x3 __y) { | ||
| 1004 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1005 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1006 | return __x; | ||
| 1007 | } | ||
| 1008 | static simd_double3x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x3 __x, double __b, simd_double3x3 __y) { | ||
| 1009 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1010 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1011 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1012 | return __x; | ||
| 1013 | } | ||
| 1014 | static simd_double4x3 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x3 __x, double __b, simd_double4x3 __y) { | ||
| 1015 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1016 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1017 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1018 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1019 | return __x; | ||
| 1020 | } | ||
| 1021 | static simd_double2x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double2x4 __x, double __b, simd_double2x4 __y) { | ||
| 1022 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1023 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1024 | return __x; | ||
| 1025 | } | ||
| 1026 | static simd_double3x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double3x4 __x, double __b, simd_double3x4 __y) { | ||
| 1027 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1028 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1029 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1030 | return __x; | ||
| 1031 | } | ||
| 1032 | static simd_double4x4 SIMD_CFUNC simd_linear_combination(double __a, simd_double4x4 __x, double __b, simd_double4x4 __y) { | ||
| 1033 | __x.columns[0] = __a*__x.columns[0] + __b*__y.columns[0]; | ||
| 1034 | __x.columns[1] = __a*__x.columns[1] + __b*__y.columns[1]; | ||
| 1035 | __x.columns[2] = __a*__x.columns[2] + __b*__y.columns[2]; | ||
| 1036 | __x.columns[3] = __a*__x.columns[3] + __b*__y.columns[3]; | ||
| 1037 | return __x; | ||
| 1038 | } | ||
| 1039 | |||
| 1040 | static simd_float2x2 SIMD_CFUNC simd_add(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1041 | static simd_float3x2 SIMD_CFUNC simd_add(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1042 | static simd_float4x2 SIMD_CFUNC simd_add(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1043 | static simd_float2x3 SIMD_CFUNC simd_add(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1044 | static simd_float3x3 SIMD_CFUNC simd_add(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1045 | static simd_float4x3 SIMD_CFUNC simd_add(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1046 | static simd_float2x4 SIMD_CFUNC simd_add(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1047 | static simd_float3x4 SIMD_CFUNC simd_add(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1048 | static simd_float4x4 SIMD_CFUNC simd_add(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1049 | static simd_double2x2 SIMD_CFUNC simd_add(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1050 | static simd_double3x2 SIMD_CFUNC simd_add(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1051 | static simd_double4x2 SIMD_CFUNC simd_add(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1052 | static simd_double2x3 SIMD_CFUNC simd_add(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1053 | static simd_double3x3 SIMD_CFUNC simd_add(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1054 | static simd_double4x3 SIMD_CFUNC simd_add(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1055 | static simd_double2x4 SIMD_CFUNC simd_add(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1056 | static simd_double3x4 SIMD_CFUNC simd_add(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1057 | static simd_double4x4 SIMD_CFUNC simd_add(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, 1, __y); } | ||
| 1058 | |||
| 1059 | static simd_float2x2 SIMD_CFUNC simd_sub(simd_float2x2 __x, simd_float2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1060 | static simd_float3x2 SIMD_CFUNC simd_sub(simd_float3x2 __x, simd_float3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1061 | static simd_float4x2 SIMD_CFUNC simd_sub(simd_float4x2 __x, simd_float4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1062 | static simd_float2x3 SIMD_CFUNC simd_sub(simd_float2x3 __x, simd_float2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1063 | static simd_float3x3 SIMD_CFUNC simd_sub(simd_float3x3 __x, simd_float3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1064 | static simd_float4x3 SIMD_CFUNC simd_sub(simd_float4x3 __x, simd_float4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1065 | static simd_float2x4 SIMD_CFUNC simd_sub(simd_float2x4 __x, simd_float2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1066 | static simd_float3x4 SIMD_CFUNC simd_sub(simd_float3x4 __x, simd_float3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1067 | static simd_float4x4 SIMD_CFUNC simd_sub(simd_float4x4 __x, simd_float4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1068 | static simd_double2x2 SIMD_CFUNC simd_sub(simd_double2x2 __x, simd_double2x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1069 | static simd_double3x2 SIMD_CFUNC simd_sub(simd_double3x2 __x, simd_double3x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1070 | static simd_double4x2 SIMD_CFUNC simd_sub(simd_double4x2 __x, simd_double4x2 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1071 | static simd_double2x3 SIMD_CFUNC simd_sub(simd_double2x3 __x, simd_double2x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1072 | static simd_double3x3 SIMD_CFUNC simd_sub(simd_double3x3 __x, simd_double3x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1073 | static simd_double4x3 SIMD_CFUNC simd_sub(simd_double4x3 __x, simd_double4x3 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1074 | static simd_double2x4 SIMD_CFUNC simd_sub(simd_double2x4 __x, simd_double2x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1075 | static simd_double3x4 SIMD_CFUNC simd_sub(simd_double3x4 __x, simd_double3x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1076 | static simd_double4x4 SIMD_CFUNC simd_sub(simd_double4x4 __x, simd_double4x4 __y) { return simd_linear_combination(1, __x, -1, __y); } | ||
| 1077 | |||
| 1078 | static simd_float2x2 SIMD_CFUNC simd_transpose(simd_float2x2 __x) { | ||
| 1079 | #if defined __SSE__ | ||
| 1080 | simd_float4 __x0, __x1; | ||
| 1081 | __x0.xy = __x.columns[0]; | ||
| 1082 | __x1.xy = __x.columns[1]; | ||
| 1083 | simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1084 | return simd_matrix(__r01.lo, __r01.hi); | ||
| 1085 | #else | ||
| 1086 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1087 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}); | ||
| 1088 | #endif | ||
| 1089 | } | ||
| 1090 | |||
| 1091 | static simd_float3x2 SIMD_CFUNC simd_transpose(simd_float2x3 __x) { | ||
| 1092 | #if defined __SSE__ | ||
| 1093 | simd_float4 __x0, __x1; | ||
| 1094 | __x0.xyz = __x.columns[0]; | ||
| 1095 | __x1.xyz = __x.columns[1]; | ||
| 1096 | simd_float4 __r01 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1097 | simd_float4 __r2x = _mm_unpackhi_ps(__x0, __x1); | ||
| 1098 | return simd_matrix(__r01.lo, __r01.hi, __r2x.lo); | ||
| 1099 | #else | ||
| 1100 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1101 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1102 | (simd_float2){__x.columns[0][2], __x.columns[1][2]}); | ||
| 1103 | #endif | ||
| 1104 | } | ||
| 1105 | |||
| 1106 | static simd_float4x2 SIMD_CFUNC simd_transpose(simd_float2x4 __x) { | ||
| 1107 | #if defined __SSE__ | ||
| 1108 | simd_float4 __r01 = _mm_unpacklo_ps(__x.columns[0], __x.columns[1]); | ||
| 1109 | simd_float4 __r23 = _mm_unpackhi_ps(__x.columns[0], __x.columns[1]); | ||
| 1110 | return simd_matrix(__r01.lo, __r01.hi, __r23.lo, __r23.hi); | ||
| 1111 | #else | ||
| 1112 | return simd_matrix((simd_float2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1113 | (simd_float2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1114 | (simd_float2){__x.columns[0][2], __x.columns[1][2]}, | ||
| 1115 | (simd_float2){__x.columns[0][3], __x.columns[1][3]}); | ||
| 1116 | #endif | ||
| 1117 | } | ||
| 1118 | |||
| 1119 | static simd_float2x3 SIMD_CFUNC simd_transpose(simd_float3x2 __x) { | ||
| 1120 | #if defined __SSE__ | ||
| 1121 | simd_float4 __x0, __x1, __x2; | ||
| 1122 | __x0.xy = __x.columns[0]; | ||
| 1123 | __x1.xy = __x.columns[1]; | ||
| 1124 | __x2.xy = __x.columns[2]; | ||
| 1125 | simd_float4 __t = _mm_unpacklo_ps(__x0, __x1); | ||
| 1126 | simd_float4 __r0 = _mm_shuffle_ps(__t,__x2,0xc4); | ||
| 1127 | simd_float4 __r1 = _mm_shuffle_ps(__t,__x2,0xde); | ||
| 1128 | return simd_matrix(__r0.xyz, __r1.xyz); | ||
| 1129 | #else | ||
| 1130 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1131 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); | ||
| 1132 | #endif | ||
| 1133 | } | ||
| 1134 | |||
| 1135 | static simd_float3x3 SIMD_CFUNC simd_transpose(simd_float3x3 __x) { | ||
| 1136 | #if defined __SSE__ | ||
| 1137 | simd_float4 __x0, __x1, __x2; | ||
| 1138 | __x0.xyz = __x.columns[0]; | ||
| 1139 | __x1.xyz = __x.columns[1]; | ||
| 1140 | __x2.xyz = __x.columns[2]; | ||
| 1141 | simd_float4 __t0 = _mm_unpacklo_ps(__x0, __x1); | ||
| 1142 | simd_float4 __t1 = _mm_unpackhi_ps(__x0, __x1); | ||
| 1143 | simd_float4 __r0 = __t0; __r0.hi = __x2.lo; | ||
| 1144 | simd_float4 __r1 = _mm_shuffle_ps(__t0, __x2, 0xde); | ||
| 1145 | simd_float4 __r2 = __x2; __r2.lo = __t1.lo; | ||
| 1146 | return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz); | ||
| 1147 | #else | ||
| 1148 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1149 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1150 | (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); | ||
| 1151 | #endif | ||
| 1152 | } | ||
| 1153 | |||
| 1154 | static simd_float4x3 SIMD_CFUNC simd_transpose(simd_float3x4 __x) { | ||
| 1155 | #if defined __SSE__ | ||
| 1156 | simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[1]); /* 00 10 01 11 */ | ||
| 1157 | simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[1]); /* 02 12 03 13 */ | ||
| 1158 | simd_float4 __r0 = __t0; __r0.hi = __x.columns[2].lo; | ||
| 1159 | simd_float4 __r1 = _mm_shuffle_ps(__t0, __x.columns[2], 0xde); | ||
| 1160 | simd_float4 __r2 = __x.columns[2]; __r2.lo = __t1.lo; | ||
| 1161 | simd_float4 __r3 = _mm_shuffle_ps(__t1, __x.columns[2], 0xfe); | ||
| 1162 | return simd_matrix(__r0.xyz, __r1.xyz, __r2.xyz, __r3.xyz); | ||
| 1163 | #else | ||
| 1164 | return simd_matrix((simd_float3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1165 | (simd_float3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1166 | (simd_float3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, | ||
| 1167 | (simd_float3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); | ||
| 1168 | #endif | ||
| 1169 | } | ||
| 1170 | |||
| 1171 | static simd_float2x4 SIMD_CFUNC simd_transpose(simd_float4x2 __x) { | ||
| 1172 | #if defined __SSE__ | ||
| 1173 | simd_float4 __x0, __x1, __x2, __x3; | ||
| 1174 | __x0.xy = __x.columns[0]; | ||
| 1175 | __x1.xy = __x.columns[1]; | ||
| 1176 | __x2.xy = __x.columns[2]; | ||
| 1177 | __x3.xy = __x.columns[3]; | ||
| 1178 | simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); | ||
| 1179 | simd_float4 __t1 = _mm_unpacklo_ps(__x1,__x3); | ||
| 1180 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t1); | ||
| 1181 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t1); | ||
| 1182 | return simd_matrix(__r0,__r1); | ||
| 1183 | #else | ||
| 1184 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1185 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); | ||
| 1186 | #endif | ||
| 1187 | } | ||
| 1188 | |||
| 1189 | static simd_float3x4 SIMD_CFUNC simd_transpose(simd_float4x3 __x) { | ||
| 1190 | #if defined __SSE__ | ||
| 1191 | simd_float4 __x0, __x1, __x2, __x3; | ||
| 1192 | __x0.xyz = __x.columns[0]; | ||
| 1193 | __x1.xyz = __x.columns[1]; | ||
| 1194 | __x2.xyz = __x.columns[2]; | ||
| 1195 | __x3.xyz = __x.columns[3]; | ||
| 1196 | simd_float4 __t0 = _mm_unpacklo_ps(__x0,__x2); | ||
| 1197 | simd_float4 __t1 = _mm_unpackhi_ps(__x0,__x2); | ||
| 1198 | simd_float4 __t2 = _mm_unpacklo_ps(__x1,__x3); | ||
| 1199 | simd_float4 __t3 = _mm_unpackhi_ps(__x1,__x3); | ||
| 1200 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); | ||
| 1201 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); | ||
| 1202 | simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); | ||
| 1203 | return simd_matrix(__r0,__r1,__r2); | ||
| 1204 | #else | ||
| 1205 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1206 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1207 | (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); | ||
| 1208 | #endif | ||
| 1209 | } | ||
| 1210 | |||
| 1211 | static simd_float4x4 SIMD_CFUNC simd_transpose(simd_float4x4 __x) { | ||
| 1212 | #if defined __SSE__ | ||
| 1213 | simd_float4 __t0 = _mm_unpacklo_ps(__x.columns[0],__x.columns[2]); | ||
| 1214 | simd_float4 __t1 = _mm_unpackhi_ps(__x.columns[0],__x.columns[2]); | ||
| 1215 | simd_float4 __t2 = _mm_unpacklo_ps(__x.columns[1],__x.columns[3]); | ||
| 1216 | simd_float4 __t3 = _mm_unpackhi_ps(__x.columns[1],__x.columns[3]); | ||
| 1217 | simd_float4 __r0 = _mm_unpacklo_ps(__t0,__t2); | ||
| 1218 | simd_float4 __r1 = _mm_unpackhi_ps(__t0,__t2); | ||
| 1219 | simd_float4 __r2 = _mm_unpacklo_ps(__t1,__t3); | ||
| 1220 | simd_float4 __r3 = _mm_unpackhi_ps(__t1,__t3); | ||
| 1221 | return simd_matrix(__r0,__r1,__r2,__r3); | ||
| 1222 | #else | ||
| 1223 | return simd_matrix((simd_float4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1224 | (simd_float4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1225 | (simd_float4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, | ||
| 1226 | (simd_float4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); | ||
| 1227 | #endif | ||
| 1228 | } | ||
| 1229 | |||
| 1230 | static simd_double2x2 SIMD_CFUNC simd_transpose(simd_double2x2 __x) { | ||
| 1231 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1232 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}); | ||
| 1233 | } | ||
| 1234 | |||
| 1235 | static simd_double3x2 SIMD_CFUNC simd_transpose(simd_double2x3 __x) { | ||
| 1236 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1237 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1238 | (simd_double2){__x.columns[0][2], __x.columns[1][2]}); | ||
| 1239 | } | ||
| 1240 | |||
| 1241 | static simd_double4x2 SIMD_CFUNC simd_transpose(simd_double2x4 __x) { | ||
| 1242 | return simd_matrix((simd_double2){__x.columns[0][0], __x.columns[1][0]}, | ||
| 1243 | (simd_double2){__x.columns[0][1], __x.columns[1][1]}, | ||
| 1244 | (simd_double2){__x.columns[0][2], __x.columns[1][2]}, | ||
| 1245 | (simd_double2){__x.columns[0][3], __x.columns[1][3]}); | ||
| 1246 | } | ||
| 1247 | |||
| 1248 | static simd_double2x3 SIMD_CFUNC simd_transpose(simd_double3x2 __x) { | ||
| 1249 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1250 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}); | ||
| 1251 | } | ||
| 1252 | |||
| 1253 | static simd_double3x3 SIMD_CFUNC simd_transpose(simd_double3x3 __x) { | ||
| 1254 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1255 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1256 | (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}); | ||
| 1257 | } | ||
| 1258 | |||
| 1259 | static simd_double4x3 SIMD_CFUNC simd_transpose(simd_double3x4 __x) { | ||
| 1260 | return simd_matrix((simd_double3){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0]}, | ||
| 1261 | (simd_double3){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1]}, | ||
| 1262 | (simd_double3){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2]}, | ||
| 1263 | (simd_double3){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3]}); | ||
| 1264 | } | ||
| 1265 | |||
| 1266 | static simd_double2x4 SIMD_CFUNC simd_transpose(simd_double4x2 __x) { | ||
| 1267 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1268 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}); | ||
| 1269 | } | ||
| 1270 | |||
| 1271 | static simd_double3x4 SIMD_CFUNC simd_transpose(simd_double4x3 __x) { | ||
| 1272 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1273 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1274 | (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}); | ||
| 1275 | } | ||
| 1276 | |||
| 1277 | static simd_double4x4 SIMD_CFUNC simd_transpose(simd_double4x4 __x) { | ||
| 1278 | return simd_matrix((simd_double4){__x.columns[0][0], __x.columns[1][0], __x.columns[2][0], __x.columns[3][0]}, | ||
| 1279 | (simd_double4){__x.columns[0][1], __x.columns[1][1], __x.columns[2][1], __x.columns[3][1]}, | ||
| 1280 | (simd_double4){__x.columns[0][2], __x.columns[1][2], __x.columns[2][2], __x.columns[3][2]}, | ||
| 1281 | (simd_double4){__x.columns[0][3], __x.columns[1][3], __x.columns[2][3], __x.columns[3][3]}); | ||
| 1282 | } | ||
| 1283 | |||
| 1284 | static simd_float3 SIMD_CFUNC __rotate1( simd_float3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } | ||
| 1285 | static simd_float3 SIMD_CFUNC __rotate2( simd_float3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } | ||
| 1286 | static simd_float4 SIMD_CFUNC __rotate1( simd_float4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } | ||
| 1287 | static simd_float4 SIMD_CFUNC __rotate2( simd_float4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } | ||
| 1288 | static simd_float4 SIMD_CFUNC __rotate3( simd_float4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } | ||
| 1289 | static simd_double3 SIMD_CFUNC __rotate1(simd_double3 __x) { return __builtin_shufflevector(__x,__x,1,2,0); } | ||
| 1290 | static simd_double3 SIMD_CFUNC __rotate2(simd_double3 __x) { return __builtin_shufflevector(__x,__x,2,0,1); } | ||
| 1291 | static simd_double4 SIMD_CFUNC __rotate1(simd_double4 __x) { return __builtin_shufflevector(__x,__x,1,2,3,0); } | ||
| 1292 | static simd_double4 SIMD_CFUNC __rotate2(simd_double4 __x) { return __builtin_shufflevector(__x,__x,2,3,0,1); } | ||
| 1293 | static simd_double4 SIMD_CFUNC __rotate3(simd_double4 __x) { return __builtin_shufflevector(__x,__x,3,0,1,2); } | ||
| 1294 | |||
| 1295 | 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]; } | ||
| 1296 | 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]; } | ||
| 1297 | 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]))); } | ||
| 1298 | static double SIMD_CFUNC simd_determinant(simd_double3x3 __x) { return simd_reduce_add(__x.columns[0]*(__rotate1(__x.columns[1])*__rotate2(__x.columns[2]) - __rotate2(__x.columns[1])*__rotate1(__x.columns[2]))); } | ||
| 1299 | static float SIMD_CFUNC simd_determinant( simd_float4x4 __x) { | ||
| 1300 | simd_float4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + | ||
| 1301 | __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + | ||
| 1302 | __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); | ||
| 1303 | return simd_reduce_add(codet.even - codet.odd); | ||
| 1304 | } | ||
| 1305 | static double SIMD_CFUNC simd_determinant(simd_double4x4 __x) { | ||
| 1306 | simd_double4 codet = __x.columns[0]*(__rotate1(__x.columns[1])*(__rotate2(__x.columns[2])*__rotate3(__x.columns[3])-__rotate3(__x.columns[2])*__rotate2(__x.columns[3])) + | ||
| 1307 | __rotate2(__x.columns[1])*(__rotate3(__x.columns[2])*__rotate1(__x.columns[3])-__rotate1(__x.columns[2])*__rotate3(__x.columns[3])) + | ||
| 1308 | __rotate3(__x.columns[1])*(__rotate1(__x.columns[2])*__rotate2(__x.columns[3])-__rotate2(__x.columns[2])*__rotate1(__x.columns[3]))); | ||
| 1309 | return simd_reduce_add(codet.even - codet.odd); | ||
| 1310 | } | ||
| 1311 | |||
| 1312 | static simd_float2x2 SIMD_CFUNC simd_inverse( simd_float2x2 __x) { return __invert_f2(__x); } | ||
| 1313 | static simd_float3x3 SIMD_CFUNC simd_inverse( simd_float3x3 __x) { return __invert_f3(__x); } | ||
| 1314 | static simd_float4x4 SIMD_CFUNC simd_inverse( simd_float4x4 __x) { return __invert_f4(__x); } | ||
| 1315 | static simd_double2x2 SIMD_CFUNC simd_inverse(simd_double2x2 __x) { return __invert_d2(__x); } | ||
| 1316 | static simd_double3x3 SIMD_CFUNC simd_inverse(simd_double3x3 __x) { return __invert_d3(__x); } | ||
| 1317 | static simd_double4x4 SIMD_CFUNC simd_inverse(simd_double4x4 __x) { return __invert_d4(__x); } | ||
| 1318 | |||
| 1319 | static simd_float2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1320 | static simd_float3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1321 | static simd_float4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1322 | static simd_float2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1323 | static simd_float3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1324 | static simd_float4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1325 | static simd_float2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4 __y) { simd_float2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1326 | static simd_float3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4 __y) { simd_float3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1327 | static simd_float4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4 __y) { simd_float4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1328 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1329 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1330 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); return __r; } | ||
| 1331 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1332 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1333 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); return __r; } | ||
| 1334 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4 __y) { simd_double2 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1335 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4 __y) { simd_double3 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1336 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4 __y) { simd_double4 __r = __x.columns[0]*__y[0]; __r = simd_muladd( __x.columns[1], __y[1],__r); __r = simd_muladd( __x.columns[2], __y[2],__r); __r = simd_muladd( __x.columns[3], __y[3],__r); return __r; } | ||
| 1337 | |||
| 1338 | static simd_float2 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float2x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1339 | static simd_float3 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float3x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1340 | static simd_float4 SIMD_CFUNC simd_mul( simd_float2 __x, simd_float4x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1341 | static simd_float2 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float2x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1342 | static simd_float3 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float3x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1343 | static simd_float4 SIMD_CFUNC simd_mul( simd_float3 __x, simd_float4x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1344 | static simd_float2 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float2x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1345 | static simd_float3 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float3x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1346 | static simd_float4 SIMD_CFUNC simd_mul( simd_float4 __x, simd_float4x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1347 | static simd_double2 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double2x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1348 | static simd_double3 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double3x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1349 | static simd_double4 SIMD_CFUNC simd_mul(simd_double2 __x, simd_double4x2 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1350 | static simd_double2 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double2x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1351 | static simd_double3 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double3x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1352 | static simd_double4 SIMD_CFUNC simd_mul(simd_double3 __x, simd_double4x3 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1353 | static simd_double2 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double2x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1354 | static simd_double3 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double3x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1355 | static simd_double4 SIMD_CFUNC simd_mul(simd_double4 __x, simd_double4x4 __y) { return simd_mul(simd_transpose(__y), __x); } | ||
| 1356 | |||
| 1357 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float2x2 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1358 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double2x2 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1359 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float2x2 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1360 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double2x2 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1361 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float2x2 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1362 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double2x2 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1363 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float2x3 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1364 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double2x3 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1365 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float2x3 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1366 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double2x3 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1367 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float2x3 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1368 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double2x3 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1369 | static simd_float2x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float2x4 __y) { simd_float2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1370 | static simd_double2x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double2x4 __y) { simd_double2x2 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1371 | static simd_float2x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float2x4 __y) { simd_float2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1372 | static simd_double2x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double2x4 __y) { simd_double2x3 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1373 | static simd_float2x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float2x4 __y) { simd_float2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1374 | static simd_double2x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double2x4 __y) { simd_double2x4 __r; for (int i=0; i<2; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1375 | |||
| 1376 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float3x2 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1377 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double3x2 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1378 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float3x2 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1379 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double3x2 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1380 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float3x2 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1381 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double3x2 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1382 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float3x3 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1383 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double3x3 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1384 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float3x3 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1385 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double3x3 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1386 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float3x3 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1387 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double3x3 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1388 | static simd_float3x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float3x4 __y) { simd_float3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1389 | static simd_double3x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double3x4 __y) { simd_double3x2 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1390 | static simd_float3x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float3x4 __y) { simd_float3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1391 | static simd_double3x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double3x4 __y) { simd_double3x3 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1392 | static simd_float3x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float3x4 __y) { simd_float3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1393 | static simd_double3x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double3x4 __y) { simd_double3x4 __r; for (int i=0; i<3; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1394 | |||
| 1395 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float2x2 __x, simd_float4x2 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1396 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double2x2 __x, simd_double4x2 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1397 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float2x3 __x, simd_float4x2 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1398 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double2x3 __x, simd_double4x2 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1399 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float2x4 __x, simd_float4x2 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1400 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double2x4 __x, simd_double4x2 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1401 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float3x2 __x, simd_float4x3 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1402 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double3x2 __x, simd_double4x3 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1403 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float3x3 __x, simd_float4x3 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1404 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double3x3 __x, simd_double4x3 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1405 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float3x4 __x, simd_float4x3 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1406 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double3x4 __x, simd_double4x3 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1407 | static simd_float4x2 SIMD_CFUNC simd_mul( simd_float4x2 __x, simd_float4x4 __y) { simd_float4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1408 | static simd_double4x2 SIMD_CFUNC simd_mul(simd_double4x2 __x, simd_double4x4 __y) { simd_double4x2 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1409 | static simd_float4x3 SIMD_CFUNC simd_mul( simd_float4x3 __x, simd_float4x4 __y) { simd_float4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1410 | static simd_double4x3 SIMD_CFUNC simd_mul(simd_double4x3 __x, simd_double4x4 __y) { simd_double4x3 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1411 | static simd_float4x4 SIMD_CFUNC simd_mul( simd_float4x4 __x, simd_float4x4 __y) { simd_float4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1412 | static simd_double4x4 SIMD_CFUNC simd_mul(simd_double4x4 __x, simd_double4x4 __y) { simd_double4x4 __r; for (int i=0; i<4; ++i) __r.columns[i] = simd_mul(__x, __y.columns[i]); return __r; } | ||
| 1413 | |||
| 1414 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1415 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1416 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2 __y) { return simd_mul(__x, __y); } | ||
| 1417 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1418 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1419 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3 __y) { return simd_mul(__x, __y); } | ||
| 1420 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1421 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1422 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4 __y) { return simd_mul(__x, __y); } | ||
| 1423 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1424 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1425 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2 __y) { return simd_mul(__x, __y); } | ||
| 1426 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1427 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1428 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3 __y) { return simd_mul(__x, __y); } | ||
| 1429 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1430 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1431 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4 __y) { return simd_mul(__x, __y); } | ||
| 1432 | |||
| 1433 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1434 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1435 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1436 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1437 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1438 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1439 | static simd_float2 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1440 | static simd_float3 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1441 | static simd_float4 SIMD_CFUNC matrix_multiply( simd_float4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1442 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1443 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1444 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1445 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1446 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1447 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1448 | static simd_double2 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1449 | static simd_double3 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1450 | static simd_double4 SIMD_CFUNC matrix_multiply(simd_double4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1451 | |||
| 1452 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1453 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1454 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1455 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1456 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float2x2 __y) { return simd_mul(__x, __y); } | ||
| 1457 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double2x2 __y) { return simd_mul(__x, __y); } | ||
| 1458 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1459 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1460 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1461 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1462 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float2x3 __y) { return simd_mul(__x, __y); } | ||
| 1463 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double2x3 __y) { return simd_mul(__x, __y); } | ||
| 1464 | static simd_float2x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1465 | static simd_double2x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1466 | static simd_float2x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1467 | static simd_double2x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1468 | static simd_float2x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float2x4 __y) { return simd_mul(__x, __y); } | ||
| 1469 | static simd_double2x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double2x4 __y) { return simd_mul(__x, __y); } | ||
| 1470 | |||
| 1471 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1472 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1473 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1474 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1475 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float3x2 __y) { return simd_mul(__x, __y); } | ||
| 1476 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double3x2 __y) { return simd_mul(__x, __y); } | ||
| 1477 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1478 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1479 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1480 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1481 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float3x3 __y) { return simd_mul(__x, __y); } | ||
| 1482 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double3x3 __y) { return simd_mul(__x, __y); } | ||
| 1483 | static simd_float3x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1484 | static simd_double3x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1485 | static simd_float3x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1486 | static simd_double3x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1487 | static simd_float3x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float3x4 __y) { return simd_mul(__x, __y); } | ||
| 1488 | static simd_double3x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double3x4 __y) { return simd_mul(__x, __y); } | ||
| 1489 | |||
| 1490 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float2x2 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1491 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double2x2 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1492 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float2x3 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1493 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double2x3 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1494 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float2x4 __x, simd_float4x2 __y) { return simd_mul(__x, __y); } | ||
| 1495 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double2x4 __x, simd_double4x2 __y) { return simd_mul(__x, __y); } | ||
| 1496 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float3x2 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1497 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double3x2 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1498 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float3x3 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1499 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double3x3 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1500 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float3x4 __x, simd_float4x3 __y) { return simd_mul(__x, __y); } | ||
| 1501 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double3x4 __x, simd_double4x3 __y) { return simd_mul(__x, __y); } | ||
| 1502 | static simd_float4x2 SIMD_CFUNC matrix_multiply( simd_float4x2 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1503 | static simd_double4x2 SIMD_CFUNC matrix_multiply(simd_double4x2 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1504 | static simd_float4x3 SIMD_CFUNC matrix_multiply( simd_float4x3 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1505 | static simd_double4x3 SIMD_CFUNC matrix_multiply(simd_double4x3 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1506 | static simd_float4x4 SIMD_CFUNC matrix_multiply( simd_float4x4 __x, simd_float4x4 __y) { return simd_mul(__x, __y); } | ||
| 1507 | static simd_double4x4 SIMD_CFUNC matrix_multiply(simd_double4x4 __x, simd_double4x4 __y) { return simd_mul(__x, __y); } | ||
| 1508 | |||
| 1509 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x2 __x, simd_float2x2 __y) { | ||
| 1510 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1511 | (__x.columns[1] == __y.columns[1])); | ||
| 1512 | } | ||
| 1513 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x3 __x, simd_float2x3 __y) { | ||
| 1514 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1515 | (__x.columns[1] == __y.columns[1])); | ||
| 1516 | } | ||
| 1517 | static simd_bool SIMD_CFUNC simd_equal(simd_float2x4 __x, simd_float2x4 __y) { | ||
| 1518 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1519 | (__x.columns[1] == __y.columns[1])); | ||
| 1520 | } | ||
| 1521 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x2 __x, simd_float3x2 __y) { | ||
| 1522 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1523 | (__x.columns[1] == __y.columns[1]) & | ||
| 1524 | (__x.columns[2] == __y.columns[2])); | ||
| 1525 | } | ||
| 1526 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x3 __x, simd_float3x3 __y) { | ||
| 1527 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1528 | (__x.columns[1] == __y.columns[1]) & | ||
| 1529 | (__x.columns[2] == __y.columns[2])); | ||
| 1530 | } | ||
| 1531 | static simd_bool SIMD_CFUNC simd_equal(simd_float3x4 __x, simd_float3x4 __y) { | ||
| 1532 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1533 | (__x.columns[1] == __y.columns[1]) & | ||
| 1534 | (__x.columns[2] == __y.columns[2])); | ||
| 1535 | } | ||
| 1536 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x2 __x, simd_float4x2 __y) { | ||
| 1537 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1538 | (__x.columns[1] == __y.columns[1]) & | ||
| 1539 | (__x.columns[2] == __y.columns[2]) & | ||
| 1540 | (__x.columns[3] == __y.columns[3])); | ||
| 1541 | } | ||
| 1542 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x3 __x, simd_float4x3 __y) { | ||
| 1543 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1544 | (__x.columns[1] == __y.columns[1]) & | ||
| 1545 | (__x.columns[2] == __y.columns[2]) & | ||
| 1546 | (__x.columns[3] == __y.columns[3])); | ||
| 1547 | } | ||
| 1548 | static simd_bool SIMD_CFUNC simd_equal(simd_float4x4 __x, simd_float4x4 __y) { | ||
| 1549 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1550 | (__x.columns[1] == __y.columns[1]) & | ||
| 1551 | (__x.columns[2] == __y.columns[2]) & | ||
| 1552 | (__x.columns[3] == __y.columns[3])); | ||
| 1553 | } | ||
| 1554 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x2 __x, simd_double2x2 __y) { | ||
| 1555 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1556 | (__x.columns[1] == __y.columns[1])); | ||
| 1557 | } | ||
| 1558 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x3 __x, simd_double2x3 __y) { | ||
| 1559 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1560 | (__x.columns[1] == __y.columns[1])); | ||
| 1561 | } | ||
| 1562 | static simd_bool SIMD_CFUNC simd_equal(simd_double2x4 __x, simd_double2x4 __y) { | ||
| 1563 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1564 | (__x.columns[1] == __y.columns[1])); | ||
| 1565 | } | ||
| 1566 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x2 __x, simd_double3x2 __y) { | ||
| 1567 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1568 | (__x.columns[1] == __y.columns[1]) & | ||
| 1569 | (__x.columns[2] == __y.columns[2])); | ||
| 1570 | } | ||
| 1571 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x3 __x, simd_double3x3 __y) { | ||
| 1572 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1573 | (__x.columns[1] == __y.columns[1]) & | ||
| 1574 | (__x.columns[2] == __y.columns[2])); | ||
| 1575 | } | ||
| 1576 | static simd_bool SIMD_CFUNC simd_equal(simd_double3x4 __x, simd_double3x4 __y) { | ||
| 1577 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1578 | (__x.columns[1] == __y.columns[1]) & | ||
| 1579 | (__x.columns[2] == __y.columns[2])); | ||
| 1580 | } | ||
| 1581 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x2 __x, simd_double4x2 __y) { | ||
| 1582 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1583 | (__x.columns[1] == __y.columns[1]) & | ||
| 1584 | (__x.columns[2] == __y.columns[2]) & | ||
| 1585 | (__x.columns[3] == __y.columns[3])); | ||
| 1586 | } | ||
| 1587 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x3 __x, simd_double4x3 __y) { | ||
| 1588 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1589 | (__x.columns[1] == __y.columns[1]) & | ||
| 1590 | (__x.columns[2] == __y.columns[2]) & | ||
| 1591 | (__x.columns[3] == __y.columns[3])); | ||
| 1592 | } | ||
| 1593 | static simd_bool SIMD_CFUNC simd_equal(simd_double4x4 __x, simd_double4x4 __y) { | ||
| 1594 | return simd_all((__x.columns[0] == __y.columns[0]) & | ||
| 1595 | (__x.columns[1] == __y.columns[1]) & | ||
| 1596 | (__x.columns[2] == __y.columns[2]) & | ||
| 1597 | (__x.columns[3] == __y.columns[3])); | ||
| 1598 | } | ||
| 1599 | |||
| 1600 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x2 __x, simd_float2x2 __y, float __tol) { | ||
| 1601 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1602 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1603 | } | ||
| 1604 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x3 __x, simd_float2x3 __y, float __tol) { | ||
| 1605 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1606 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1607 | } | ||
| 1608 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float2x4 __x, simd_float2x4 __y, float __tol) { | ||
| 1609 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1610 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1611 | } | ||
| 1612 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x2 __x, simd_float3x2 __y, float __tol) { | ||
| 1613 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1614 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1615 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1616 | } | ||
| 1617 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x3 __x, simd_float3x3 __y, float __tol) { | ||
| 1618 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1619 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1620 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1621 | } | ||
| 1622 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float3x4 __x, simd_float3x4 __y, float __tol) { | ||
| 1623 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1624 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1625 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1626 | } | ||
| 1627 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x2 __x, simd_float4x2 __y, float __tol) { | ||
| 1628 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1629 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1630 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1631 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1632 | } | ||
| 1633 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x3 __x, simd_float4x3 __y, float __tol) { | ||
| 1634 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1635 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1636 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1637 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1638 | } | ||
| 1639 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_float4x4 __x, simd_float4x4 __y, float __tol) { | ||
| 1640 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1641 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1642 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1643 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1644 | } | ||
| 1645 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x2 __x, simd_double2x2 __y, double __tol) { | ||
| 1646 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1647 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1648 | } | ||
| 1649 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x3 __x, simd_double2x3 __y, double __tol) { | ||
| 1650 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1651 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1652 | } | ||
| 1653 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double2x4 __x, simd_double2x4 __y, double __tol) { | ||
| 1654 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1655 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol)); | ||
| 1656 | } | ||
| 1657 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x2 __x, simd_double3x2 __y, double __tol) { | ||
| 1658 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1659 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1660 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1661 | } | ||
| 1662 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x3 __x, simd_double3x3 __y, double __tol) { | ||
| 1663 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1664 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1665 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1666 | } | ||
| 1667 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double3x4 __x, simd_double3x4 __y, double __tol) { | ||
| 1668 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1669 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1670 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol)); | ||
| 1671 | } | ||
| 1672 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x2 __x, simd_double4x2 __y, double __tol) { | ||
| 1673 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1674 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1675 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1676 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1677 | } | ||
| 1678 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x3 __x, simd_double4x3 __y, double __tol) { | ||
| 1679 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1680 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1681 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1682 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1683 | } | ||
| 1684 | static simd_bool SIMD_CFUNC simd_almost_equal_elements(simd_double4x4 __x, simd_double4x4 __y, double __tol) { | ||
| 1685 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol) & | ||
| 1686 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol) & | ||
| 1687 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol) & | ||
| 1688 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol)); | ||
| 1689 | } | ||
| 1690 | |||
| 1691 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x2 __x, simd_float2x2 __y, float __tol) { | ||
| 1692 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1693 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1694 | } | ||
| 1695 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x3 __x, simd_float2x3 __y, float __tol) { | ||
| 1696 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1697 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1698 | } | ||
| 1699 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float2x4 __x, simd_float2x4 __y, float __tol) { | ||
| 1700 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1701 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1702 | } | ||
| 1703 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x2 __x, simd_float3x2 __y, float __tol) { | ||
| 1704 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1705 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1706 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1707 | } | ||
| 1708 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x3 __x, simd_float3x3 __y, float __tol) { | ||
| 1709 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1710 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1711 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1712 | } | ||
| 1713 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float3x4 __x, simd_float3x4 __y, float __tol) { | ||
| 1714 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1715 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1716 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1717 | } | ||
| 1718 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x2 __x, simd_float4x2 __y, float __tol) { | ||
| 1719 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1720 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1721 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1722 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1723 | } | ||
| 1724 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x3 __x, simd_float4x3 __y, float __tol) { | ||
| 1725 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1726 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1727 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1728 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1729 | } | ||
| 1730 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_float4x4 __x, simd_float4x4 __y, float __tol) { | ||
| 1731 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1732 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1733 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1734 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1735 | } | ||
| 1736 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x2 __x, simd_double2x2 __y, double __tol) { | ||
| 1737 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1738 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1739 | } | ||
| 1740 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x3 __x, simd_double2x3 __y, double __tol) { | ||
| 1741 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1742 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1743 | } | ||
| 1744 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double2x4 __x, simd_double2x4 __y, double __tol) { | ||
| 1745 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1746 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1]))); | ||
| 1747 | } | ||
| 1748 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x2 __x, simd_double3x2 __y, double __tol) { | ||
| 1749 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1750 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1751 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1752 | } | ||
| 1753 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x3 __x, simd_double3x3 __y, double __tol) { | ||
| 1754 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1755 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1756 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1757 | } | ||
| 1758 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double3x4 __x, simd_double3x4 __y, double __tol) { | ||
| 1759 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1760 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1761 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2]))); | ||
| 1762 | } | ||
| 1763 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x2 __x, simd_double4x2 __y, double __tol) { | ||
| 1764 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1765 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1766 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1767 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1768 | } | ||
| 1769 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x3 __x, simd_double4x3 __y, double __tol) { | ||
| 1770 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1771 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1772 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1773 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1774 | } | ||
| 1775 | static simd_bool SIMD_CFUNC simd_almost_equal_elements_relative(simd_double4x4 __x, simd_double4x4 __y, double __tol) { | ||
| 1776 | return simd_all((__tg_fabs(__x.columns[0] - __y.columns[0]) <= __tol*__tg_fabs(__x.columns[0])) & | ||
| 1777 | (__tg_fabs(__x.columns[1] - __y.columns[1]) <= __tol*__tg_fabs(__x.columns[1])) & | ||
| 1778 | (__tg_fabs(__x.columns[2] - __y.columns[2]) <= __tol*__tg_fabs(__x.columns[2])) & | ||
| 1779 | (__tg_fabs(__x.columns[3] - __y.columns[3]) <= __tol*__tg_fabs(__x.columns[3]))); | ||
| 1780 | } | ||
| 1781 | |||
| 1782 | #ifdef __cplusplus | ||
| 1783 | } | ||
| 1784 | #endif | ||
| 1785 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 1786 | #endif /* __SIMD_HEADER__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/simd/matrix_types.h created+264| ... | @@ -0,0 +1,264 @@ | ||
| 1 | /* Copyright (c) 2014-2017 Apple, Inc. All rights reserved. | ||
| 2 | * | ||
| 3 | * This header defines nine matrix types for each of float and double, which | ||
| 4 | * are intended for use together with the vector types defined in | ||
| 5 | * <simd/vector_types.h>. | ||
| 6 | * | ||
| 7 | * For compatibility with common graphics libraries, these matrices are stored | ||
| 8 | * in column-major order, and implemented as arrays of column vectors. | ||
| 9 | * Column-major storage order may seem a little strange if you aren't used to | ||
| 10 | * it, but for most usage the memory layout of the matrices shouldn't matter | ||
| 11 | * at all; instead you should think of matrices as abstract mathematical | ||
| 12 | * objects that you use to perform arithmetic without worrying about the | ||
| 13 | * details of the underlying representation. | ||
| 14 | * | ||
| 15 | * WARNING: vectors of length three are internally represented as length four | ||
| 16 | * vectors with one element of padding (for alignment purposes). This means | ||
| 17 | * that when a floatNx3 or doubleNx3 is viewed as a vector, it appears to | ||
| 18 | * have 4*N elements instead of the expected 3*N (with one padding element | ||
| 19 | * at the end of each column). The matrix elements are laid out in memory | ||
| 20 | * as follows: | ||
| 21 | * | ||
| 22 | * { 0, 1, 2, x, 3, 4, 5, x, ... } | ||
| 23 | * | ||
| 24 | * (where the scalar indices used above indicate the conceptual column- | ||
| 25 | * major storage order). If you aren't monkeying around with the internal | ||
| 26 | * storage details of matrices, you don't need to worry about this at all. | ||
| 27 | * Consider this yet another good reason to avoid doing so. */ | ||
| 28 | |||
| 29 | #ifndef SIMD_MATRIX_TYPES_HEADER | ||
| 30 | #define SIMD_MATRIX_TYPES_HEADER | ||
| 31 | |||
| 32 | #include <simd/types.h> | ||
| 33 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 34 | |||
| 35 | /* Matrix types available in C, Objective-C, and C++ */ | ||
| 36 | typedef simd_float2x2 matrix_float2x2; | ||
| 37 | typedef simd_float3x2 matrix_float3x2; | ||
| 38 | typedef simd_float4x2 matrix_float4x2; | ||
| 39 | |||
| 40 | typedef simd_float2x3 matrix_float2x3; | ||
| 41 | typedef simd_float3x3 matrix_float3x3; | ||
| 42 | typedef simd_float4x3 matrix_float4x3; | ||
| 43 | |||
| 44 | typedef simd_float2x4 matrix_float2x4; | ||
| 45 | typedef simd_float3x4 matrix_float3x4; | ||
| 46 | typedef simd_float4x4 matrix_float4x4; | ||
| 47 | |||
| 48 | typedef simd_double2x2 matrix_double2x2; | ||
| 49 | typedef simd_double3x2 matrix_double3x2; | ||
| 50 | typedef simd_double4x2 matrix_double4x2; | ||
| 51 | |||
| 52 | typedef simd_double2x3 matrix_double2x3; | ||
| 53 | typedef simd_double3x3 matrix_double3x3; | ||
| 54 | typedef simd_double4x3 matrix_double4x3; | ||
| 55 | |||
| 56 | typedef simd_double2x4 matrix_double2x4; | ||
| 57 | typedef simd_double3x4 matrix_double3x4; | ||
| 58 | typedef simd_double4x4 matrix_double4x4; | ||
| 59 | |||
| 60 | #ifdef __cplusplus | ||
| 61 | #if defined SIMD_MATRIX_HEADER | ||
| 62 | static simd_float3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatf q); | ||
| 63 | static simd_float4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatf q); | ||
| 64 | static simd_double3x3 SIMD_NOINLINE simd_matrix3x3(simd_quatd q); | ||
| 65 | static simd_double4x4 SIMD_NOINLINE simd_matrix4x4(simd_quatd q); | ||
| 66 | #endif | ||
| 67 | |||
| 68 | namespace simd { | ||
| 69 | |||
| 70 | struct float2x2 : ::simd_float2x2 { | ||
| 71 | float2x2() { columns[0] = 0; columns[1] = 0; } | ||
| 72 | #if __has_feature(cxx_delegating_constructors) | ||
| 73 | float2x2(float diagonal) : float2x2((float2)diagonal) { } | ||
| 74 | #endif | ||
| 75 | float2x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; } | ||
| 76 | float2x2(float2 c0, float2 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 77 | float2x2(::simd_float2x2 m) : ::simd_float2x2(m) { } | ||
| 78 | }; | ||
| 79 | |||
| 80 | struct float3x2 : ::simd_float3x2 { | ||
| 81 | float3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 82 | #if __has_feature(cxx_delegating_constructors) | ||
| 83 | float3x2(float diagonal) : float3x2((float2)diagonal) { } | ||
| 84 | #endif | ||
| 85 | float3x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; } | ||
| 86 | float3x2(float2 c0, float2 c1, float2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 87 | float3x2(::simd_float3x2 m) : ::simd_float3x2(m) { } | ||
| 88 | }; | ||
| 89 | |||
| 90 | struct float4x2 : ::simd_float4x2 { | ||
| 91 | float4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 92 | #if __has_feature(cxx_delegating_constructors) | ||
| 93 | float4x2(float diagonal) : float4x2((float2)diagonal) { } | ||
| 94 | #endif | ||
| 95 | float4x2(float2 v) { columns[0] = (float2){v.x,0}; columns[1] = (float2){0,v.y}; columns[2] = 0; columns[3] = 0; } | ||
| 96 | float4x2(float2 c0, float2 c1, float2 c2, float2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 97 | float4x2(::simd_float4x2 m) : ::simd_float4x2(m) { } | ||
| 98 | }; | ||
| 99 | |||
| 100 | struct float2x3 : ::simd_float2x3 { | ||
| 101 | float2x3() { columns[0] = 0; columns[1] = 0; } | ||
| 102 | #if __has_feature(cxx_delegating_constructors) | ||
| 103 | float2x3(float diagonal) : float2x3((float2)diagonal) { } | ||
| 104 | #endif | ||
| 105 | float2x3(float2 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; } | ||
| 106 | float2x3(float3 c0, float3 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 107 | float2x3(::simd_float2x3 m) : ::simd_float2x3(m) { } | ||
| 108 | }; | ||
| 109 | |||
| 110 | struct float3x3 : ::simd_float3x3 { | ||
| 111 | float3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 112 | #if __has_feature(cxx_delegating_constructors) | ||
| 113 | float3x3(float diagonal) : float3x3((float3)diagonal) { } | ||
| 114 | #endif | ||
| 115 | float3x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; } | ||
| 116 | float3x3(float3 c0, float3 c1, float3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 117 | float3x3(::simd_float3x3 m) : ::simd_float3x3(m) { } | ||
| 118 | #if defined SIMD_MATRIX_HEADER | ||
| 119 | float3x3(::simd_quatf q) : ::simd_float3x3(::simd_matrix3x3(q)) { } | ||
| 120 | #endif | ||
| 121 | }; | ||
| 122 | |||
| 123 | struct float4x3 : ::simd_float4x3 { | ||
| 124 | float4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 125 | #if __has_feature(cxx_delegating_constructors) | ||
| 126 | float4x3(float diagonal) : float4x3((float3)diagonal) { } | ||
| 127 | #endif | ||
| 128 | float4x3(float3 v) { columns[0] = (float3){v.x,0,0}; columns[1] = (float3){0,v.y,0}; columns[2] = (float3){0,0,v.z}; columns[3] = 0; } | ||
| 129 | float4x3(float3 c0, float3 c1, float3 c2, float3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 130 | float4x3(::simd_float4x3 m) : ::simd_float4x3(m) { } | ||
| 131 | }; | ||
| 132 | |||
| 133 | struct float2x4 : ::simd_float2x4 { | ||
| 134 | float2x4() { columns[0] = 0; columns[1] = 0; } | ||
| 135 | #if __has_feature(cxx_delegating_constructors) | ||
| 136 | float2x4(float diagonal) : float2x4((float2)diagonal) { } | ||
| 137 | #endif | ||
| 138 | float2x4(float2 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; } | ||
| 139 | float2x4(float4 c0, float4 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 140 | float2x4(::simd_float2x4 m) : ::simd_float2x4(m) { } | ||
| 141 | }; | ||
| 142 | |||
| 143 | struct float3x4 : ::simd_float3x4 { | ||
| 144 | float3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 145 | #if __has_feature(cxx_delegating_constructors) | ||
| 146 | float3x4(float diagonal) : float3x4((float3)diagonal) { } | ||
| 147 | #endif | ||
| 148 | float3x4(float3 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; } | ||
| 149 | float3x4(float4 c0, float4 c1, float4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 150 | float3x4(::simd_float3x4 m) : ::simd_float3x4(m) { } | ||
| 151 | }; | ||
| 152 | |||
| 153 | struct float4x4 : ::simd_float4x4 { | ||
| 154 | float4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 155 | #if __has_feature(cxx_delegating_constructors) | ||
| 156 | float4x4(float diagonal) : float4x4((float4)diagonal) { } | ||
| 157 | #endif | ||
| 158 | float4x4(float4 v) { columns[0] = (float4){v.x,0,0,0}; columns[1] = (float4){0,v.y,0,0}; columns[2] = (float4){0,0,v.z,0}; columns[3] = (float4){0,0,0,v.w}; } | ||
| 159 | float4x4(float4 c0, float4 c1, float4 c2, float4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 160 | float4x4(::simd_float4x4 m) : ::simd_float4x4(m) { } | ||
| 161 | #if defined SIMD_MATRIX_HEADER | ||
| 162 | float4x4(::simd_quatf q) : ::simd_float4x4(::simd_matrix4x4(q)) { } | ||
| 163 | #endif | ||
| 164 | }; | ||
| 165 | |||
| 166 | struct double2x2 : ::simd_double2x2 { | ||
| 167 | double2x2() { columns[0] = 0; columns[1] = 0; } | ||
| 168 | #if __has_feature(cxx_delegating_constructors) | ||
| 169 | double2x2(double diagonal) : double2x2((double2)diagonal) { } | ||
| 170 | #endif | ||
| 171 | double2x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; } | ||
| 172 | double2x2(double2 c0, double2 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 173 | double2x2(::simd_double2x2 m) : ::simd_double2x2(m) { } | ||
| 174 | }; | ||
| 175 | |||
| 176 | struct double3x2 : ::simd_double3x2 { | ||
| 177 | double3x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 178 | #if __has_feature(cxx_delegating_constructors) | ||
| 179 | double3x2(double diagonal) : double3x2((double2)diagonal) { } | ||
| 180 | #endif | ||
| 181 | double3x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; } | ||
| 182 | double3x2(double2 c0, double2 c1, double2 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 183 | double3x2(::simd_double3x2 m) : ::simd_double3x2(m) { } | ||
| 184 | }; | ||
| 185 | |||
| 186 | struct double4x2 : ::simd_double4x2 { | ||
| 187 | double4x2() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 188 | #if __has_feature(cxx_delegating_constructors) | ||
| 189 | double4x2(double diagonal) : double4x2((double2)diagonal) { } | ||
| 190 | #endif | ||
| 191 | double4x2(double2 v) { columns[0] = (double2){v.x,0}; columns[1] = (double2){0,v.y}; columns[2] = 0; columns[3] = 0; } | ||
| 192 | double4x2(double2 c0, double2 c1, double2 c2, double2 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 193 | double4x2(::simd_double4x2 m) : ::simd_double4x2(m) { } | ||
| 194 | }; | ||
| 195 | |||
| 196 | struct double2x3 : ::simd_double2x3 { | ||
| 197 | double2x3() { columns[0] = 0; columns[1] = 0; } | ||
| 198 | #if __has_feature(cxx_delegating_constructors) | ||
| 199 | double2x3(double diagonal) : double2x3((double2)diagonal) { } | ||
| 200 | #endif | ||
| 201 | double2x3(double2 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; } | ||
| 202 | double2x3(double3 c0, double3 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 203 | double2x3(::simd_double2x3 m) : ::simd_double2x3(m) { } | ||
| 204 | }; | ||
| 205 | |||
| 206 | struct double3x3 : ::simd_double3x3 { | ||
| 207 | double3x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 208 | #if __has_feature(cxx_delegating_constructors) | ||
| 209 | double3x3(double diagonal) : double3x3((double3)diagonal) { } | ||
| 210 | #endif | ||
| 211 | double3x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; } | ||
| 212 | double3x3(double3 c0, double3 c1, double3 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 213 | double3x3(::simd_double3x3 m) : ::simd_double3x3(m) { } | ||
| 214 | #if defined SIMD_MATRIX_HEADER | ||
| 215 | double3x3(::simd_quatd q) : ::simd_double3x3(::simd_matrix3x3(q)) { } | ||
| 216 | #endif | ||
| 217 | }; | ||
| 218 | |||
| 219 | struct double4x3 : ::simd_double4x3 { | ||
| 220 | double4x3() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 221 | #if __has_feature(cxx_delegating_constructors) | ||
| 222 | double4x3(double diagonal) : double4x3((double3)diagonal) { } | ||
| 223 | #endif | ||
| 224 | double4x3(double3 v) { columns[0] = (double3){v.x,0,0}; columns[1] = (double3){0,v.y,0}; columns[2] = (double3){0,0,v.z}; columns[3] = 0; } | ||
| 225 | double4x3(double3 c0, double3 c1, double3 c2, double3 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 226 | double4x3(::simd_double4x3 m) : ::simd_double4x3(m) { } | ||
| 227 | }; | ||
| 228 | |||
| 229 | struct double2x4 : ::simd_double2x4 { | ||
| 230 | double2x4() { columns[0] = 0; columns[1] = 0; } | ||
| 231 | #if __has_feature(cxx_delegating_constructors) | ||
| 232 | double2x4(double diagonal) : double2x4((double2)diagonal) { } | ||
| 233 | #endif | ||
| 234 | double2x4(double2 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; } | ||
| 235 | double2x4(double4 c0, double4 c1) { columns[0] = c0; columns[1] = c1; } | ||
| 236 | double2x4(::simd_double2x4 m) : ::simd_double2x4(m) { } | ||
| 237 | }; | ||
| 238 | |||
| 239 | struct double3x4 : ::simd_double3x4 { | ||
| 240 | double3x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; } | ||
| 241 | #if __has_feature(cxx_delegating_constructors) | ||
| 242 | double3x4(double diagonal) : double3x4((double3)diagonal) { } | ||
| 243 | #endif | ||
| 244 | double3x4(double3 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; } | ||
| 245 | double3x4(double4 c0, double4 c1, double4 c2) { columns[0] = c0; columns[1] = c1; columns[2] = c2; } | ||
| 246 | double3x4(::simd_double3x4 m) : ::simd_double3x4(m) { } | ||
| 247 | }; | ||
| 248 | |||
| 249 | struct double4x4 : ::simd_double4x4 { | ||
| 250 | double4x4() { columns[0] = 0; columns[1] = 0; columns[2] = 0; columns[3] = 0; } | ||
| 251 | #if __has_feature(cxx_delegating_constructors) | ||
| 252 | double4x4(double diagonal) : double4x4((double4)diagonal) { } | ||
| 253 | #endif | ||
| 254 | double4x4(double4 v) { columns[0] = (double4){v.x,0,0,0}; columns[1] = (double4){0,v.y,0,0}; columns[2] = (double4){0,0,v.z,0}; columns[3] = (double4){0,0,0,v.w}; } | ||
| 255 | double4x4(double4 c0, double4 c1, double4 c2, double4 c3) { columns[0] = c0; columns[1] = c1; columns[2] = c2; columns[3] = c3; } | ||
| 256 | double4x4(::simd_double4x4 m) : ::simd_double4x4(m) { } | ||
| 257 | #if defined SIMD_MATRIX_HEADER | ||
| 258 | double4x4(::simd_quatd q) : ::simd_double4x4(::simd_matrix4x4(q)) { } | ||
| 259 | #endif | ||
| 260 | }; | ||
| 261 | } | ||
| 262 | #endif /* __cplusplus */ | ||
| 263 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 264 | #endif /* SIMD_MATRIX_TYPES_HEADER */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/simd/vector_make.h created+6768| ... | @@ -0,0 +1,6768 @@ | ||
| 1 | /*! @header | ||
| 2 | * This header defines functions for constructing, extending, and truncating | ||
| 3 | * simd vector types. | ||
| 4 | * | ||
| 5 | * For each vector type `simd_typeN` supported by <simd/simd.h>, the following | ||
| 6 | * constructors are provided: | ||
| 7 | * | ||
| 8 | * ~~~ | ||
| 9 | * simd_typeN simd_make_typeN(type other); | ||
| 10 | * simd_typeN simd_make_typeN(simd_typeM other); | ||
| 11 | * ~~~ | ||
| 12 | * For the scalar-input version, or if M < N, these functions zero-extend | ||
| 13 | * `other` to produce a wider vector. If M == N, `other` is passed through | ||
| 14 | * unmodified. If `M > N`, `other` is truncated to form the result. | ||
| 15 | * | ||
| 16 | * ~~~ | ||
| 17 | * simd_typeN simd_make_typeN_undef(type other); | ||
| 18 | * simd_typeN simd_make_typeN_undef(simd_typeM other); | ||
| 19 | * ~~~ | ||
| 20 | * These functions are only available for M < N and for scalar inputs. They | ||
| 21 | * extend `other` to produce a wider vector where the contents of the newly- | ||
| 22 | * formed lanes are undefined. | ||
| 23 | * | ||
| 24 | * In addition, if N is 2, 3, or 4, the following constructors are available: | ||
| 25 | * ~~~ | ||
| 26 | * simd_make_typeN(parts ...) | ||
| 27 | * ~~~ | ||
| 28 | * where parts is a list of scalars and smaller vectors such that the sum of | ||
| 29 | * the number of lanes in the arguments is equal to N. For example, a | ||
| 30 | * `simd_float3` can be constructed from three `floats`, or a `float` and a | ||
| 31 | * `simd_float2` in any order: | ||
| 32 | * ~~~ | ||
| 33 | * simd_float2 ab = { 1, 2 }; | ||
| 34 | * simd_float3 vector = simd_make_float3(ab, 3); | ||
| 35 | * ~~~ | ||
| 36 | * | ||
| 37 | * @copyright 2014-2016 Apple, Inc. All rights reserved. | ||
| 38 | * @unsorted */ | ||
| 39 | |||
| 40 | #ifndef SIMD_VECTOR_CONSTRUCTORS | ||
| 41 | #define SIMD_VECTOR_CONSTRUCTORS | ||
| 42 | |||
| 43 | #include <simd/vector_types.h> | ||
| 44 | #if SIMD_COMPILER_HAS_REQUIRED_FEATURES | ||
| 45 | |||
| 46 | #ifdef __cplusplus | ||
| 47 | extern "C" { | ||
| 48 | #endif | ||
| 49 | |||
| 50 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed | ||
| 51 | * (twos-complement) integers. */ | ||
| 52 | static inline SIMD_CFUNC simd_char2 simd_make_char2(char x, char y) { | ||
| 53 | simd_char2 result; | ||
| 54 | result.x = x; | ||
| 55 | result.y = y; | ||
| 56 | return result; | ||
| 57 | } | ||
| 58 | |||
| 59 | /*! @abstract Zero-extends `other` to form a vector of two 8-bit signed | ||
| 60 | * (twos-complement) integers. */ | ||
| 61 | static inline SIMD_CFUNC simd_char2 simd_make_char2(char other) { | ||
| 62 | simd_char2 result = 0; | ||
| 63 | result.x = other; | ||
| 64 | return result; | ||
| 65 | } | ||
| 66 | |||
| 67 | /*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- | ||
| 68 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 69 | * unspecified. */ | ||
| 70 | static inline SIMD_CFUNC simd_char2 simd_make_char2_undef(char other) { | ||
| 71 | simd_char2 result; | ||
| 72 | result.x = other; | ||
| 73 | return result; | ||
| 74 | } | ||
| 75 | |||
| 76 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 77 | * templated and autogenerated code. */ | ||
| 78 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char2 other) { | ||
| 79 | return other; | ||
| 80 | } | ||
| 81 | |||
| 82 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 83 | * complement) integers. */ | ||
| 84 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char3 other) { | ||
| 85 | return other.xy; | ||
| 86 | } | ||
| 87 | |||
| 88 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 89 | * complement) integers. */ | ||
| 90 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char4 other) { | ||
| 91 | return other.xy; | ||
| 92 | } | ||
| 93 | |||
| 94 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 95 | * complement) integers. */ | ||
| 96 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char8 other) { | ||
| 97 | return other.xy; | ||
| 98 | } | ||
| 99 | |||
| 100 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 101 | * complement) integers. */ | ||
| 102 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char16 other) { | ||
| 103 | return other.xy; | ||
| 104 | } | ||
| 105 | |||
| 106 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 107 | * complement) integers. */ | ||
| 108 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char32 other) { | ||
| 109 | return other.xy; | ||
| 110 | } | ||
| 111 | |||
| 112 | /*! @abstract Truncates `other` to form a vector of two 8-bit signed (twos- | ||
| 113 | * complement) integers. */ | ||
| 114 | static inline SIMD_CFUNC simd_char2 simd_make_char2(simd_char64 other) { | ||
| 115 | return other.xy; | ||
| 116 | } | ||
| 117 | |||
| 118 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 119 | * signed (twos-complement) integers. */ | ||
| 120 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, char y, char z) { | ||
| 121 | simd_char3 result; | ||
| 122 | result.x = x; | ||
| 123 | result.y = y; | ||
| 124 | result.z = z; | ||
| 125 | return result; | ||
| 126 | } | ||
| 127 | |||
| 128 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 129 | * signed (twos-complement) integers. */ | ||
| 130 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char x, simd_char2 yz) { | ||
| 131 | simd_char3 result; | ||
| 132 | result.x = x; | ||
| 133 | result.yz = yz; | ||
| 134 | return result; | ||
| 135 | } | ||
| 136 | |||
| 137 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 138 | * signed (twos-complement) integers. */ | ||
| 139 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 xy, char z) { | ||
| 140 | simd_char3 result; | ||
| 141 | result.xy = xy; | ||
| 142 | result.z = z; | ||
| 143 | return result; | ||
| 144 | } | ||
| 145 | |||
| 146 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit signed | ||
| 147 | * (twos-complement) integers. */ | ||
| 148 | static inline SIMD_CFUNC simd_char3 simd_make_char3(char other) { | ||
| 149 | simd_char3 result = 0; | ||
| 150 | result.x = other; | ||
| 151 | return result; | ||
| 152 | } | ||
| 153 | |||
| 154 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 155 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 156 | * unspecified. */ | ||
| 157 | static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(char other) { | ||
| 158 | simd_char3 result; | ||
| 159 | result.x = other; | ||
| 160 | return result; | ||
| 161 | } | ||
| 162 | |||
| 163 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit signed | ||
| 164 | * (twos-complement) integers. */ | ||
| 165 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char2 other) { | ||
| 166 | simd_char3 result = 0; | ||
| 167 | result.xy = other; | ||
| 168 | return result; | ||
| 169 | } | ||
| 170 | |||
| 171 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 172 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 173 | * unspecified. */ | ||
| 174 | static inline SIMD_CFUNC simd_char3 simd_make_char3_undef(simd_char2 other) { | ||
| 175 | simd_char3 result; | ||
| 176 | result.xy = other; | ||
| 177 | return result; | ||
| 178 | } | ||
| 179 | |||
| 180 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 181 | * templated and autogenerated code. */ | ||
| 182 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char3 other) { | ||
| 183 | return other; | ||
| 184 | } | ||
| 185 | |||
| 186 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 187 | * (twos-complement) integers. */ | ||
| 188 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char4 other) { | ||
| 189 | return other.xyz; | ||
| 190 | } | ||
| 191 | |||
| 192 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 193 | * (twos-complement) integers. */ | ||
| 194 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char8 other) { | ||
| 195 | return other.xyz; | ||
| 196 | } | ||
| 197 | |||
| 198 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 199 | * (twos-complement) integers. */ | ||
| 200 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char16 other) { | ||
| 201 | return other.xyz; | ||
| 202 | } | ||
| 203 | |||
| 204 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 205 | * (twos-complement) integers. */ | ||
| 206 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char32 other) { | ||
| 207 | return other.xyz; | ||
| 208 | } | ||
| 209 | |||
| 210 | /*! @abstract Truncates `other` to form a vector of three 8-bit signed | ||
| 211 | * (twos-complement) integers. */ | ||
| 212 | static inline SIMD_CFUNC simd_char3 simd_make_char3(simd_char64 other) { | ||
| 213 | return other.xyz; | ||
| 214 | } | ||
| 215 | |||
| 216 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 217 | * 8-bit signed (twos-complement) integers. */ | ||
| 218 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, char z, char w) { | ||
| 219 | simd_char4 result; | ||
| 220 | result.x = x; | ||
| 221 | result.y = y; | ||
| 222 | result.z = z; | ||
| 223 | result.w = w; | ||
| 224 | return result; | ||
| 225 | } | ||
| 226 | |||
| 227 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 228 | * signed (twos-complement) integers. */ | ||
| 229 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, char y, simd_char2 zw) { | ||
| 230 | simd_char4 result; | ||
| 231 | result.x = x; | ||
| 232 | result.y = y; | ||
| 233 | result.zw = zw; | ||
| 234 | return result; | ||
| 235 | } | ||
| 236 | |||
| 237 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 238 | * signed (twos-complement) integers. */ | ||
| 239 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char2 yz, char w) { | ||
| 240 | simd_char4 result; | ||
| 241 | result.x = x; | ||
| 242 | result.yz = yz; | ||
| 243 | result.w = w; | ||
| 244 | return result; | ||
| 245 | } | ||
| 246 | |||
| 247 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 248 | * signed (twos-complement) integers. */ | ||
| 249 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, char z, char w) { | ||
| 250 | simd_char4 result; | ||
| 251 | result.xy = xy; | ||
| 252 | result.z = z; | ||
| 253 | result.w = w; | ||
| 254 | return result; | ||
| 255 | } | ||
| 256 | |||
| 257 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 258 | * signed (twos-complement) integers. */ | ||
| 259 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char x, simd_char3 yzw) { | ||
| 260 | simd_char4 result; | ||
| 261 | result.x = x; | ||
| 262 | result.yzw = yzw; | ||
| 263 | return result; | ||
| 264 | } | ||
| 265 | |||
| 266 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 267 | * signed (twos-complement) integers. */ | ||
| 268 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 xy, simd_char2 zw) { | ||
| 269 | simd_char4 result; | ||
| 270 | result.xy = xy; | ||
| 271 | result.zw = zw; | ||
| 272 | return result; | ||
| 273 | } | ||
| 274 | |||
| 275 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 276 | * signed (twos-complement) integers. */ | ||
| 277 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 xyz, char w) { | ||
| 278 | simd_char4 result; | ||
| 279 | result.xyz = xyz; | ||
| 280 | result.w = w; | ||
| 281 | return result; | ||
| 282 | } | ||
| 283 | |||
| 284 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 285 | * (twos-complement) integers. */ | ||
| 286 | static inline SIMD_CFUNC simd_char4 simd_make_char4(char other) { | ||
| 287 | simd_char4 result = 0; | ||
| 288 | result.x = other; | ||
| 289 | return result; | ||
| 290 | } | ||
| 291 | |||
| 292 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 293 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 294 | * unspecified. */ | ||
| 295 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(char other) { | ||
| 296 | simd_char4 result; | ||
| 297 | result.x = other; | ||
| 298 | return result; | ||
| 299 | } | ||
| 300 | |||
| 301 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 302 | * (twos-complement) integers. */ | ||
| 303 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char2 other) { | ||
| 304 | simd_char4 result = 0; | ||
| 305 | result.xy = other; | ||
| 306 | return result; | ||
| 307 | } | ||
| 308 | |||
| 309 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 310 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 311 | * unspecified. */ | ||
| 312 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char2 other) { | ||
| 313 | simd_char4 result; | ||
| 314 | result.xy = other; | ||
| 315 | return result; | ||
| 316 | } | ||
| 317 | |||
| 318 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit signed | ||
| 319 | * (twos-complement) integers. */ | ||
| 320 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char3 other) { | ||
| 321 | simd_char4 result = 0; | ||
| 322 | result.xyz = other; | ||
| 323 | return result; | ||
| 324 | } | ||
| 325 | |||
| 326 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 327 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 328 | * unspecified. */ | ||
| 329 | static inline SIMD_CFUNC simd_char4 simd_make_char4_undef(simd_char3 other) { | ||
| 330 | simd_char4 result; | ||
| 331 | result.xyz = other; | ||
| 332 | return result; | ||
| 333 | } | ||
| 334 | |||
| 335 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 336 | * templated and autogenerated code. */ | ||
| 337 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char4 other) { | ||
| 338 | return other; | ||
| 339 | } | ||
| 340 | |||
| 341 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 342 | * complement) integers. */ | ||
| 343 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char8 other) { | ||
| 344 | return other.xyzw; | ||
| 345 | } | ||
| 346 | |||
| 347 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 348 | * complement) integers. */ | ||
| 349 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char16 other) { | ||
| 350 | return other.xyzw; | ||
| 351 | } | ||
| 352 | |||
| 353 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 354 | * complement) integers. */ | ||
| 355 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char32 other) { | ||
| 356 | return other.xyzw; | ||
| 357 | } | ||
| 358 | |||
| 359 | /*! @abstract Truncates `other` to form a vector of four 8-bit signed (twos- | ||
| 360 | * complement) integers. */ | ||
| 361 | static inline SIMD_CFUNC simd_char4 simd_make_char4(simd_char64 other) { | ||
| 362 | return other.xyzw; | ||
| 363 | } | ||
| 364 | |||
| 365 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 366 | * signed (twos-complement) integers. */ | ||
| 367 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 lo, simd_char4 hi) { | ||
| 368 | simd_char8 result; | ||
| 369 | result.lo = lo; | ||
| 370 | result.hi = hi; | ||
| 371 | return result; | ||
| 372 | } | ||
| 373 | |||
| 374 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 375 | * (twos-complement) integers. */ | ||
| 376 | static inline SIMD_CFUNC simd_char8 simd_make_char8(char other) { | ||
| 377 | simd_char8 result = 0; | ||
| 378 | result.x = other; | ||
| 379 | return result; | ||
| 380 | } | ||
| 381 | |||
| 382 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 383 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 384 | * unspecified. */ | ||
| 385 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(char other) { | ||
| 386 | simd_char8 result; | ||
| 387 | result.x = other; | ||
| 388 | return result; | ||
| 389 | } | ||
| 390 | |||
| 391 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 392 | * (twos-complement) integers. */ | ||
| 393 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char2 other) { | ||
| 394 | simd_char8 result = 0; | ||
| 395 | result.xy = other; | ||
| 396 | return result; | ||
| 397 | } | ||
| 398 | |||
| 399 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 400 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 401 | * unspecified. */ | ||
| 402 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char2 other) { | ||
| 403 | simd_char8 result; | ||
| 404 | result.xy = other; | ||
| 405 | return result; | ||
| 406 | } | ||
| 407 | |||
| 408 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 409 | * (twos-complement) integers. */ | ||
| 410 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char3 other) { | ||
| 411 | simd_char8 result = 0; | ||
| 412 | result.xyz = other; | ||
| 413 | return result; | ||
| 414 | } | ||
| 415 | |||
| 416 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 417 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 418 | * unspecified. */ | ||
| 419 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char3 other) { | ||
| 420 | simd_char8 result; | ||
| 421 | result.xyz = other; | ||
| 422 | return result; | ||
| 423 | } | ||
| 424 | |||
| 425 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit signed | ||
| 426 | * (twos-complement) integers. */ | ||
| 427 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char4 other) { | ||
| 428 | simd_char8 result = 0; | ||
| 429 | result.xyzw = other; | ||
| 430 | return result; | ||
| 431 | } | ||
| 432 | |||
| 433 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 434 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 435 | * unspecified. */ | ||
| 436 | static inline SIMD_CFUNC simd_char8 simd_make_char8_undef(simd_char4 other) { | ||
| 437 | simd_char8 result; | ||
| 438 | result.xyzw = other; | ||
| 439 | return result; | ||
| 440 | } | ||
| 441 | |||
| 442 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 443 | * templated and autogenerated code. */ | ||
| 444 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char8 other) { | ||
| 445 | return other; | ||
| 446 | } | ||
| 447 | |||
| 448 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 449 | * (twos-complement) integers. */ | ||
| 450 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char16 other) { | ||
| 451 | return simd_make_char8(other.lo); | ||
| 452 | } | ||
| 453 | |||
| 454 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 455 | * (twos-complement) integers. */ | ||
| 456 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char32 other) { | ||
| 457 | return simd_make_char8(other.lo); | ||
| 458 | } | ||
| 459 | |||
| 460 | /*! @abstract Truncates `other` to form a vector of eight 8-bit signed | ||
| 461 | * (twos-complement) integers. */ | ||
| 462 | static inline SIMD_CFUNC simd_char8 simd_make_char8(simd_char64 other) { | ||
| 463 | return simd_make_char8(other.lo); | ||
| 464 | } | ||
| 465 | |||
| 466 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 467 | * signed (twos-complement) integers. */ | ||
| 468 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 lo, simd_char8 hi) { | ||
| 469 | simd_char16 result; | ||
| 470 | result.lo = lo; | ||
| 471 | result.hi = hi; | ||
| 472 | return result; | ||
| 473 | } | ||
| 474 | |||
| 475 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 476 | * (twos-complement) integers. */ | ||
| 477 | static inline SIMD_CFUNC simd_char16 simd_make_char16(char other) { | ||
| 478 | simd_char16 result = 0; | ||
| 479 | result.x = other; | ||
| 480 | return result; | ||
| 481 | } | ||
| 482 | |||
| 483 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 484 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 485 | * lanes are unspecified. */ | ||
| 486 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(char other) { | ||
| 487 | simd_char16 result; | ||
| 488 | result.x = other; | ||
| 489 | return result; | ||
| 490 | } | ||
| 491 | |||
| 492 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 493 | * (twos-complement) integers. */ | ||
| 494 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char2 other) { | ||
| 495 | simd_char16 result = 0; | ||
| 496 | result.xy = other; | ||
| 497 | return result; | ||
| 498 | } | ||
| 499 | |||
| 500 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 501 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 502 | * lanes are unspecified. */ | ||
| 503 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char2 other) { | ||
| 504 | simd_char16 result; | ||
| 505 | result.xy = other; | ||
| 506 | return result; | ||
| 507 | } | ||
| 508 | |||
| 509 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 510 | * (twos-complement) integers. */ | ||
| 511 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char3 other) { | ||
| 512 | simd_char16 result = 0; | ||
| 513 | result.xyz = other; | ||
| 514 | return result; | ||
| 515 | } | ||
| 516 | |||
| 517 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 518 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 519 | * lanes are unspecified. */ | ||
| 520 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char3 other) { | ||
| 521 | simd_char16 result; | ||
| 522 | result.xyz = other; | ||
| 523 | return result; | ||
| 524 | } | ||
| 525 | |||
| 526 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 527 | * (twos-complement) integers. */ | ||
| 528 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char4 other) { | ||
| 529 | simd_char16 result = 0; | ||
| 530 | result.xyzw = other; | ||
| 531 | return result; | ||
| 532 | } | ||
| 533 | |||
| 534 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 535 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 536 | * lanes are unspecified. */ | ||
| 537 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char4 other) { | ||
| 538 | simd_char16 result; | ||
| 539 | result.xyzw = other; | ||
| 540 | return result; | ||
| 541 | } | ||
| 542 | |||
| 543 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit signed | ||
| 544 | * (twos-complement) integers. */ | ||
| 545 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char8 other) { | ||
| 546 | simd_char16 result = 0; | ||
| 547 | result.lo = simd_make_char8(other); | ||
| 548 | return result; | ||
| 549 | } | ||
| 550 | |||
| 551 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 552 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 553 | * lanes are unspecified. */ | ||
| 554 | static inline SIMD_CFUNC simd_char16 simd_make_char16_undef(simd_char8 other) { | ||
| 555 | simd_char16 result; | ||
| 556 | result.lo = simd_make_char8(other); | ||
| 557 | return result; | ||
| 558 | } | ||
| 559 | |||
| 560 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 561 | * templated and autogenerated code. */ | ||
| 562 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char16 other) { | ||
| 563 | return other; | ||
| 564 | } | ||
| 565 | |||
| 566 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed | ||
| 567 | * (twos-complement) integers. */ | ||
| 568 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char32 other) { | ||
| 569 | return simd_make_char16(other.lo); | ||
| 570 | } | ||
| 571 | |||
| 572 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit signed | ||
| 573 | * (twos-complement) integers. */ | ||
| 574 | static inline SIMD_CFUNC simd_char16 simd_make_char16(simd_char64 other) { | ||
| 575 | return simd_make_char16(other.lo); | ||
| 576 | } | ||
| 577 | |||
| 578 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 579 | * 8-bit signed (twos-complement) integers. */ | ||
| 580 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 lo, simd_char16 hi) { | ||
| 581 | simd_char32 result; | ||
| 582 | result.lo = lo; | ||
| 583 | result.hi = hi; | ||
| 584 | return result; | ||
| 585 | } | ||
| 586 | |||
| 587 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 588 | * signed (twos-complement) integers. */ | ||
| 589 | static inline SIMD_CFUNC simd_char32 simd_make_char32(char other) { | ||
| 590 | simd_char32 result = 0; | ||
| 591 | result.x = other; | ||
| 592 | return result; | ||
| 593 | } | ||
| 594 | |||
| 595 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 596 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 597 | * lanes are unspecified. */ | ||
| 598 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(char other) { | ||
| 599 | simd_char32 result; | ||
| 600 | result.x = other; | ||
| 601 | return result; | ||
| 602 | } | ||
| 603 | |||
| 604 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 605 | * signed (twos-complement) integers. */ | ||
| 606 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char2 other) { | ||
| 607 | simd_char32 result = 0; | ||
| 608 | result.xy = other; | ||
| 609 | return result; | ||
| 610 | } | ||
| 611 | |||
| 612 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 613 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 614 | * lanes are unspecified. */ | ||
| 615 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char2 other) { | ||
| 616 | simd_char32 result; | ||
| 617 | result.xy = other; | ||
| 618 | return result; | ||
| 619 | } | ||
| 620 | |||
| 621 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 622 | * signed (twos-complement) integers. */ | ||
| 623 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char3 other) { | ||
| 624 | simd_char32 result = 0; | ||
| 625 | result.xyz = other; | ||
| 626 | return result; | ||
| 627 | } | ||
| 628 | |||
| 629 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 630 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 631 | * lanes are unspecified. */ | ||
| 632 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char3 other) { | ||
| 633 | simd_char32 result; | ||
| 634 | result.xyz = other; | ||
| 635 | return result; | ||
| 636 | } | ||
| 637 | |||
| 638 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 639 | * signed (twos-complement) integers. */ | ||
| 640 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char4 other) { | ||
| 641 | simd_char32 result = 0; | ||
| 642 | result.xyzw = other; | ||
| 643 | return result; | ||
| 644 | } | ||
| 645 | |||
| 646 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 647 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 648 | * lanes are unspecified. */ | ||
| 649 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char4 other) { | ||
| 650 | simd_char32 result; | ||
| 651 | result.xyzw = other; | ||
| 652 | return result; | ||
| 653 | } | ||
| 654 | |||
| 655 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 656 | * signed (twos-complement) integers. */ | ||
| 657 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char8 other) { | ||
| 658 | simd_char32 result = 0; | ||
| 659 | result.lo = simd_make_char16(other); | ||
| 660 | return result; | ||
| 661 | } | ||
| 662 | |||
| 663 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 664 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 665 | * lanes are unspecified. */ | ||
| 666 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char8 other) { | ||
| 667 | simd_char32 result; | ||
| 668 | result.lo = simd_make_char16(other); | ||
| 669 | return result; | ||
| 670 | } | ||
| 671 | |||
| 672 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 673 | * signed (twos-complement) integers. */ | ||
| 674 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char16 other) { | ||
| 675 | simd_char32 result = 0; | ||
| 676 | result.lo = simd_make_char16(other); | ||
| 677 | return result; | ||
| 678 | } | ||
| 679 | |||
| 680 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 681 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 682 | * lanes are unspecified. */ | ||
| 683 | static inline SIMD_CFUNC simd_char32 simd_make_char32_undef(simd_char16 other) { | ||
| 684 | simd_char32 result; | ||
| 685 | result.lo = simd_make_char16(other); | ||
| 686 | return result; | ||
| 687 | } | ||
| 688 | |||
| 689 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 690 | * templated and autogenerated code. */ | ||
| 691 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char32 other) { | ||
| 692 | return other; | ||
| 693 | } | ||
| 694 | |||
| 695 | /*! @abstract Truncates `other` to form a vector of thirty-two 8-bit signed | ||
| 696 | * (twos-complement) integers. */ | ||
| 697 | static inline SIMD_CFUNC simd_char32 simd_make_char32(simd_char64 other) { | ||
| 698 | return simd_make_char32(other.lo); | ||
| 699 | } | ||
| 700 | |||
| 701 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 702 | * 8-bit signed (twos-complement) integers. */ | ||
| 703 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 lo, simd_char32 hi) { | ||
| 704 | simd_char64 result; | ||
| 705 | result.lo = lo; | ||
| 706 | result.hi = hi; | ||
| 707 | return result; | ||
| 708 | } | ||
| 709 | |||
| 710 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 711 | * signed (twos-complement) integers. */ | ||
| 712 | static inline SIMD_CFUNC simd_char64 simd_make_char64(char other) { | ||
| 713 | simd_char64 result = 0; | ||
| 714 | result.x = other; | ||
| 715 | return result; | ||
| 716 | } | ||
| 717 | |||
| 718 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 719 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 720 | * lanes are unspecified. */ | ||
| 721 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(char other) { | ||
| 722 | simd_char64 result; | ||
| 723 | result.x = other; | ||
| 724 | return result; | ||
| 725 | } | ||
| 726 | |||
| 727 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 728 | * signed (twos-complement) integers. */ | ||
| 729 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char2 other) { | ||
| 730 | simd_char64 result = 0; | ||
| 731 | result.xy = other; | ||
| 732 | return result; | ||
| 733 | } | ||
| 734 | |||
| 735 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 736 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 737 | * lanes are unspecified. */ | ||
| 738 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char2 other) { | ||
| 739 | simd_char64 result; | ||
| 740 | result.xy = other; | ||
| 741 | return result; | ||
| 742 | } | ||
| 743 | |||
| 744 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 745 | * signed (twos-complement) integers. */ | ||
| 746 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char3 other) { | ||
| 747 | simd_char64 result = 0; | ||
| 748 | result.xyz = other; | ||
| 749 | return result; | ||
| 750 | } | ||
| 751 | |||
| 752 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 753 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 754 | * lanes are unspecified. */ | ||
| 755 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char3 other) { | ||
| 756 | simd_char64 result; | ||
| 757 | result.xyz = other; | ||
| 758 | return result; | ||
| 759 | } | ||
| 760 | |||
| 761 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 762 | * signed (twos-complement) integers. */ | ||
| 763 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char4 other) { | ||
| 764 | simd_char64 result = 0; | ||
| 765 | result.xyzw = other; | ||
| 766 | return result; | ||
| 767 | } | ||
| 768 | |||
| 769 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 770 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 771 | * lanes are unspecified. */ | ||
| 772 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char4 other) { | ||
| 773 | simd_char64 result; | ||
| 774 | result.xyzw = other; | ||
| 775 | return result; | ||
| 776 | } | ||
| 777 | |||
| 778 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 779 | * signed (twos-complement) integers. */ | ||
| 780 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char8 other) { | ||
| 781 | simd_char64 result = 0; | ||
| 782 | result.lo = simd_make_char32(other); | ||
| 783 | return result; | ||
| 784 | } | ||
| 785 | |||
| 786 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 787 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 788 | * lanes are unspecified. */ | ||
| 789 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char8 other) { | ||
| 790 | simd_char64 result; | ||
| 791 | result.lo = simd_make_char32(other); | ||
| 792 | return result; | ||
| 793 | } | ||
| 794 | |||
| 795 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 796 | * signed (twos-complement) integers. */ | ||
| 797 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char16 other) { | ||
| 798 | simd_char64 result = 0; | ||
| 799 | result.lo = simd_make_char32(other); | ||
| 800 | return result; | ||
| 801 | } | ||
| 802 | |||
| 803 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 804 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 805 | * lanes are unspecified. */ | ||
| 806 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char16 other) { | ||
| 807 | simd_char64 result; | ||
| 808 | result.lo = simd_make_char32(other); | ||
| 809 | return result; | ||
| 810 | } | ||
| 811 | |||
| 812 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 813 | * signed (twos-complement) integers. */ | ||
| 814 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char32 other) { | ||
| 815 | simd_char64 result = 0; | ||
| 816 | result.lo = simd_make_char32(other); | ||
| 817 | return result; | ||
| 818 | } | ||
| 819 | |||
| 820 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 821 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 822 | * lanes are unspecified. */ | ||
| 823 | static inline SIMD_CFUNC simd_char64 simd_make_char64_undef(simd_char32 other) { | ||
| 824 | simd_char64 result; | ||
| 825 | result.lo = simd_make_char32(other); | ||
| 826 | return result; | ||
| 827 | } | ||
| 828 | |||
| 829 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 830 | * templated and autogenerated code. */ | ||
| 831 | static inline SIMD_CFUNC simd_char64 simd_make_char64(simd_char64 other) { | ||
| 832 | return other; | ||
| 833 | } | ||
| 834 | |||
| 835 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit | ||
| 836 | * unsigned integers. */ | ||
| 837 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char x, unsigned char y) { | ||
| 838 | simd_uchar2 result; | ||
| 839 | result.x = x; | ||
| 840 | result.y = y; | ||
| 841 | return result; | ||
| 842 | } | ||
| 843 | |||
| 844 | /*! @abstract Zero-extends `other` to form a vector of two 8-bit unsigned | ||
| 845 | * integers. */ | ||
| 846 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(unsigned char other) { | ||
| 847 | simd_uchar2 result = 0; | ||
| 848 | result.x = other; | ||
| 849 | return result; | ||
| 850 | } | ||
| 851 | |||
| 852 | /*! @abstract Extends `other` to form a vector of two 8-bit unsigned | ||
| 853 | * integers. The contents of the newly-created vector lanes are | ||
| 854 | * unspecified. */ | ||
| 855 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2_undef(unsigned char other) { | ||
| 856 | simd_uchar2 result; | ||
| 857 | result.x = other; | ||
| 858 | return result; | ||
| 859 | } | ||
| 860 | |||
| 861 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 862 | * templated and autogenerated code. */ | ||
| 863 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar2 other) { | ||
| 864 | return other; | ||
| 865 | } | ||
| 866 | |||
| 867 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 868 | * integers. */ | ||
| 869 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar3 other) { | ||
| 870 | return other.xy; | ||
| 871 | } | ||
| 872 | |||
| 873 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 874 | * integers. */ | ||
| 875 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar4 other) { | ||
| 876 | return other.xy; | ||
| 877 | } | ||
| 878 | |||
| 879 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 880 | * integers. */ | ||
| 881 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar8 other) { | ||
| 882 | return other.xy; | ||
| 883 | } | ||
| 884 | |||
| 885 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 886 | * integers. */ | ||
| 887 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar16 other) { | ||
| 888 | return other.xy; | ||
| 889 | } | ||
| 890 | |||
| 891 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 892 | * integers. */ | ||
| 893 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar32 other) { | ||
| 894 | return other.xy; | ||
| 895 | } | ||
| 896 | |||
| 897 | /*! @abstract Truncates `other` to form a vector of two 8-bit unsigned | ||
| 898 | * integers. */ | ||
| 899 | static inline SIMD_CFUNC simd_uchar2 simd_make_uchar2(simd_uchar64 other) { | ||
| 900 | return other.xy; | ||
| 901 | } | ||
| 902 | |||
| 903 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 904 | * unsigned integers. */ | ||
| 905 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, unsigned char y, unsigned char z) { | ||
| 906 | simd_uchar3 result; | ||
| 907 | result.x = x; | ||
| 908 | result.y = y; | ||
| 909 | result.z = z; | ||
| 910 | return result; | ||
| 911 | } | ||
| 912 | |||
| 913 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 914 | * unsigned integers. */ | ||
| 915 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char x, simd_uchar2 yz) { | ||
| 916 | simd_uchar3 result; | ||
| 917 | result.x = x; | ||
| 918 | result.yz = yz; | ||
| 919 | return result; | ||
| 920 | } | ||
| 921 | |||
| 922 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 923 | * unsigned integers. */ | ||
| 924 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 xy, unsigned char z) { | ||
| 925 | simd_uchar3 result; | ||
| 926 | result.xy = xy; | ||
| 927 | result.z = z; | ||
| 928 | return result; | ||
| 929 | } | ||
| 930 | |||
| 931 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned | ||
| 932 | * integers. */ | ||
| 933 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(unsigned char other) { | ||
| 934 | simd_uchar3 result = 0; | ||
| 935 | result.x = other; | ||
| 936 | return result; | ||
| 937 | } | ||
| 938 | |||
| 939 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 940 | * integers. The contents of the newly-created vector lanes are | ||
| 941 | * unspecified. */ | ||
| 942 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(unsigned char other) { | ||
| 943 | simd_uchar3 result; | ||
| 944 | result.x = other; | ||
| 945 | return result; | ||
| 946 | } | ||
| 947 | |||
| 948 | /*! @abstract Zero-extends `other` to form a vector of three 8-bit unsigned | ||
| 949 | * integers. */ | ||
| 950 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar2 other) { | ||
| 951 | simd_uchar3 result = 0; | ||
| 952 | result.xy = other; | ||
| 953 | return result; | ||
| 954 | } | ||
| 955 | |||
| 956 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 957 | * integers. The contents of the newly-created vector lanes are | ||
| 958 | * unspecified. */ | ||
| 959 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3_undef(simd_uchar2 other) { | ||
| 960 | simd_uchar3 result; | ||
| 961 | result.xy = other; | ||
| 962 | return result; | ||
| 963 | } | ||
| 964 | |||
| 965 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 966 | * templated and autogenerated code. */ | ||
| 967 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar3 other) { | ||
| 968 | return other; | ||
| 969 | } | ||
| 970 | |||
| 971 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 972 | * integers. */ | ||
| 973 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar4 other) { | ||
| 974 | return other.xyz; | ||
| 975 | } | ||
| 976 | |||
| 977 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 978 | * integers. */ | ||
| 979 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar8 other) { | ||
| 980 | return other.xyz; | ||
| 981 | } | ||
| 982 | |||
| 983 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 984 | * integers. */ | ||
| 985 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar16 other) { | ||
| 986 | return other.xyz; | ||
| 987 | } | ||
| 988 | |||
| 989 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 990 | * integers. */ | ||
| 991 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar32 other) { | ||
| 992 | return other.xyz; | ||
| 993 | } | ||
| 994 | |||
| 995 | /*! @abstract Truncates `other` to form a vector of three 8-bit unsigned | ||
| 996 | * integers. */ | ||
| 997 | static inline SIMD_CFUNC simd_uchar3 simd_make_uchar3(simd_uchar64 other) { | ||
| 998 | return other.xyz; | ||
| 999 | } | ||
| 1000 | |||
| 1001 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 1002 | * 8-bit unsigned integers. */ | ||
| 1003 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { | ||
| 1004 | simd_uchar4 result; | ||
| 1005 | result.x = x; | ||
| 1006 | result.y = y; | ||
| 1007 | result.z = z; | ||
| 1008 | result.w = w; | ||
| 1009 | return result; | ||
| 1010 | } | ||
| 1011 | |||
| 1012 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 1013 | * unsigned integers. */ | ||
| 1014 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, unsigned char y, simd_uchar2 zw) { | ||
| 1015 | simd_uchar4 result; | ||
| 1016 | result.x = x; | ||
| 1017 | result.y = y; | ||
| 1018 | result.zw = zw; | ||
| 1019 | return result; | ||
| 1020 | } | ||
| 1021 | |||
| 1022 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 1023 | * unsigned integers. */ | ||
| 1024 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar2 yz, unsigned char w) { | ||
| 1025 | simd_uchar4 result; | ||
| 1026 | result.x = x; | ||
| 1027 | result.yz = yz; | ||
| 1028 | result.w = w; | ||
| 1029 | return result; | ||
| 1030 | } | ||
| 1031 | |||
| 1032 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 1033 | * unsigned integers. */ | ||
| 1034 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, unsigned char z, unsigned char w) { | ||
| 1035 | simd_uchar4 result; | ||
| 1036 | result.xy = xy; | ||
| 1037 | result.z = z; | ||
| 1038 | result.w = w; | ||
| 1039 | return result; | ||
| 1040 | } | ||
| 1041 | |||
| 1042 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 1043 | * unsigned integers. */ | ||
| 1044 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char x, simd_uchar3 yzw) { | ||
| 1045 | simd_uchar4 result; | ||
| 1046 | result.x = x; | ||
| 1047 | result.yzw = yzw; | ||
| 1048 | return result; | ||
| 1049 | } | ||
| 1050 | |||
| 1051 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 1052 | * unsigned integers. */ | ||
| 1053 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 xy, simd_uchar2 zw) { | ||
| 1054 | simd_uchar4 result; | ||
| 1055 | result.xy = xy; | ||
| 1056 | result.zw = zw; | ||
| 1057 | return result; | ||
| 1058 | } | ||
| 1059 | |||
| 1060 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 1061 | * unsigned integers. */ | ||
| 1062 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 xyz, unsigned char w) { | ||
| 1063 | simd_uchar4 result; | ||
| 1064 | result.xyz = xyz; | ||
| 1065 | result.w = w; | ||
| 1066 | return result; | ||
| 1067 | } | ||
| 1068 | |||
| 1069 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1070 | * integers. */ | ||
| 1071 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(unsigned char other) { | ||
| 1072 | simd_uchar4 result = 0; | ||
| 1073 | result.x = other; | ||
| 1074 | return result; | ||
| 1075 | } | ||
| 1076 | |||
| 1077 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1078 | * integers. The contents of the newly-created vector lanes are | ||
| 1079 | * unspecified. */ | ||
| 1080 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(unsigned char other) { | ||
| 1081 | simd_uchar4 result; | ||
| 1082 | result.x = other; | ||
| 1083 | return result; | ||
| 1084 | } | ||
| 1085 | |||
| 1086 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1087 | * integers. */ | ||
| 1088 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar2 other) { | ||
| 1089 | simd_uchar4 result = 0; | ||
| 1090 | result.xy = other; | ||
| 1091 | return result; | ||
| 1092 | } | ||
| 1093 | |||
| 1094 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1095 | * integers. The contents of the newly-created vector lanes are | ||
| 1096 | * unspecified. */ | ||
| 1097 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar2 other) { | ||
| 1098 | simd_uchar4 result; | ||
| 1099 | result.xy = other; | ||
| 1100 | return result; | ||
| 1101 | } | ||
| 1102 | |||
| 1103 | /*! @abstract Zero-extends `other` to form a vector of four 8-bit unsigned | ||
| 1104 | * integers. */ | ||
| 1105 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar3 other) { | ||
| 1106 | simd_uchar4 result = 0; | ||
| 1107 | result.xyz = other; | ||
| 1108 | return result; | ||
| 1109 | } | ||
| 1110 | |||
| 1111 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 1112 | * integers. The contents of the newly-created vector lanes are | ||
| 1113 | * unspecified. */ | ||
| 1114 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4_undef(simd_uchar3 other) { | ||
| 1115 | simd_uchar4 result; | ||
| 1116 | result.xyz = other; | ||
| 1117 | return result; | ||
| 1118 | } | ||
| 1119 | |||
| 1120 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1121 | * templated and autogenerated code. */ | ||
| 1122 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar4 other) { | ||
| 1123 | return other; | ||
| 1124 | } | ||
| 1125 | |||
| 1126 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1127 | * integers. */ | ||
| 1128 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar8 other) { | ||
| 1129 | return other.xyzw; | ||
| 1130 | } | ||
| 1131 | |||
| 1132 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1133 | * integers. */ | ||
| 1134 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar16 other) { | ||
| 1135 | return other.xyzw; | ||
| 1136 | } | ||
| 1137 | |||
| 1138 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1139 | * integers. */ | ||
| 1140 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar32 other) { | ||
| 1141 | return other.xyzw; | ||
| 1142 | } | ||
| 1143 | |||
| 1144 | /*! @abstract Truncates `other` to form a vector of four 8-bit unsigned | ||
| 1145 | * integers. */ | ||
| 1146 | static inline SIMD_CFUNC simd_uchar4 simd_make_uchar4(simd_uchar64 other) { | ||
| 1147 | return other.xyzw; | ||
| 1148 | } | ||
| 1149 | |||
| 1150 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 1151 | * unsigned integers. */ | ||
| 1152 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 lo, simd_uchar4 hi) { | ||
| 1153 | simd_uchar8 result; | ||
| 1154 | result.lo = lo; | ||
| 1155 | result.hi = hi; | ||
| 1156 | return result; | ||
| 1157 | } | ||
| 1158 | |||
| 1159 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1160 | * integers. */ | ||
| 1161 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(unsigned char other) { | ||
| 1162 | simd_uchar8 result = 0; | ||
| 1163 | result.x = other; | ||
| 1164 | return result; | ||
| 1165 | } | ||
| 1166 | |||
| 1167 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1168 | * integers. The contents of the newly-created vector lanes are | ||
| 1169 | * unspecified. */ | ||
| 1170 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(unsigned char other) { | ||
| 1171 | simd_uchar8 result; | ||
| 1172 | result.x = other; | ||
| 1173 | return result; | ||
| 1174 | } | ||
| 1175 | |||
| 1176 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1177 | * integers. */ | ||
| 1178 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar2 other) { | ||
| 1179 | simd_uchar8 result = 0; | ||
| 1180 | result.xy = other; | ||
| 1181 | return result; | ||
| 1182 | } | ||
| 1183 | |||
| 1184 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1185 | * integers. The contents of the newly-created vector lanes are | ||
| 1186 | * unspecified. */ | ||
| 1187 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar2 other) { | ||
| 1188 | simd_uchar8 result; | ||
| 1189 | result.xy = other; | ||
| 1190 | return result; | ||
| 1191 | } | ||
| 1192 | |||
| 1193 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1194 | * integers. */ | ||
| 1195 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar3 other) { | ||
| 1196 | simd_uchar8 result = 0; | ||
| 1197 | result.xyz = other; | ||
| 1198 | return result; | ||
| 1199 | } | ||
| 1200 | |||
| 1201 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1202 | * integers. The contents of the newly-created vector lanes are | ||
| 1203 | * unspecified. */ | ||
| 1204 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar3 other) { | ||
| 1205 | simd_uchar8 result; | ||
| 1206 | result.xyz = other; | ||
| 1207 | return result; | ||
| 1208 | } | ||
| 1209 | |||
| 1210 | /*! @abstract Zero-extends `other` to form a vector of eight 8-bit unsigned | ||
| 1211 | * integers. */ | ||
| 1212 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar4 other) { | ||
| 1213 | simd_uchar8 result = 0; | ||
| 1214 | result.xyzw = other; | ||
| 1215 | return result; | ||
| 1216 | } | ||
| 1217 | |||
| 1218 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 1219 | * integers. The contents of the newly-created vector lanes are | ||
| 1220 | * unspecified. */ | ||
| 1221 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8_undef(simd_uchar4 other) { | ||
| 1222 | simd_uchar8 result; | ||
| 1223 | result.xyzw = other; | ||
| 1224 | return result; | ||
| 1225 | } | ||
| 1226 | |||
| 1227 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1228 | * templated and autogenerated code. */ | ||
| 1229 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar8 other) { | ||
| 1230 | return other; | ||
| 1231 | } | ||
| 1232 | |||
| 1233 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1234 | * integers. */ | ||
| 1235 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar16 other) { | ||
| 1236 | return simd_make_uchar8(other.lo); | ||
| 1237 | } | ||
| 1238 | |||
| 1239 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1240 | * integers. */ | ||
| 1241 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar32 other) { | ||
| 1242 | return simd_make_uchar8(other.lo); | ||
| 1243 | } | ||
| 1244 | |||
| 1245 | /*! @abstract Truncates `other` to form a vector of eight 8-bit unsigned | ||
| 1246 | * integers. */ | ||
| 1247 | static inline SIMD_CFUNC simd_uchar8 simd_make_uchar8(simd_uchar64 other) { | ||
| 1248 | return simd_make_uchar8(other.lo); | ||
| 1249 | } | ||
| 1250 | |||
| 1251 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 1252 | * unsigned integers. */ | ||
| 1253 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 lo, simd_uchar8 hi) { | ||
| 1254 | simd_uchar16 result; | ||
| 1255 | result.lo = lo; | ||
| 1256 | result.hi = hi; | ||
| 1257 | return result; | ||
| 1258 | } | ||
| 1259 | |||
| 1260 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1261 | * unsigned integers. */ | ||
| 1262 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(unsigned char other) { | ||
| 1263 | simd_uchar16 result = 0; | ||
| 1264 | result.x = other; | ||
| 1265 | return result; | ||
| 1266 | } | ||
| 1267 | |||
| 1268 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1269 | * integers. The contents of the newly-created vector lanes are | ||
| 1270 | * unspecified. */ | ||
| 1271 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(unsigned char other) { | ||
| 1272 | simd_uchar16 result; | ||
| 1273 | result.x = other; | ||
| 1274 | return result; | ||
| 1275 | } | ||
| 1276 | |||
| 1277 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1278 | * unsigned integers. */ | ||
| 1279 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar2 other) { | ||
| 1280 | simd_uchar16 result = 0; | ||
| 1281 | result.xy = other; | ||
| 1282 | return result; | ||
| 1283 | } | ||
| 1284 | |||
| 1285 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1286 | * integers. The contents of the newly-created vector lanes are | ||
| 1287 | * unspecified. */ | ||
| 1288 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar2 other) { | ||
| 1289 | simd_uchar16 result; | ||
| 1290 | result.xy = other; | ||
| 1291 | return result; | ||
| 1292 | } | ||
| 1293 | |||
| 1294 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1295 | * unsigned integers. */ | ||
| 1296 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar3 other) { | ||
| 1297 | simd_uchar16 result = 0; | ||
| 1298 | result.xyz = other; | ||
| 1299 | return result; | ||
| 1300 | } | ||
| 1301 | |||
| 1302 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1303 | * integers. The contents of the newly-created vector lanes are | ||
| 1304 | * unspecified. */ | ||
| 1305 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar3 other) { | ||
| 1306 | simd_uchar16 result; | ||
| 1307 | result.xyz = other; | ||
| 1308 | return result; | ||
| 1309 | } | ||
| 1310 | |||
| 1311 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1312 | * unsigned integers. */ | ||
| 1313 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar4 other) { | ||
| 1314 | simd_uchar16 result = 0; | ||
| 1315 | result.xyzw = other; | ||
| 1316 | return result; | ||
| 1317 | } | ||
| 1318 | |||
| 1319 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1320 | * integers. The contents of the newly-created vector lanes are | ||
| 1321 | * unspecified. */ | ||
| 1322 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar4 other) { | ||
| 1323 | simd_uchar16 result; | ||
| 1324 | result.xyzw = other; | ||
| 1325 | return result; | ||
| 1326 | } | ||
| 1327 | |||
| 1328 | /*! @abstract Zero-extends `other` to form a vector of sixteen 8-bit | ||
| 1329 | * unsigned integers. */ | ||
| 1330 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar8 other) { | ||
| 1331 | simd_uchar16 result = 0; | ||
| 1332 | result.lo = simd_make_uchar8(other); | ||
| 1333 | return result; | ||
| 1334 | } | ||
| 1335 | |||
| 1336 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 1337 | * integers. The contents of the newly-created vector lanes are | ||
| 1338 | * unspecified. */ | ||
| 1339 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16_undef(simd_uchar8 other) { | ||
| 1340 | simd_uchar16 result; | ||
| 1341 | result.lo = simd_make_uchar8(other); | ||
| 1342 | return result; | ||
| 1343 | } | ||
| 1344 | |||
| 1345 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1346 | * templated and autogenerated code. */ | ||
| 1347 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar16 other) { | ||
| 1348 | return other; | ||
| 1349 | } | ||
| 1350 | |||
| 1351 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned | ||
| 1352 | * integers. */ | ||
| 1353 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar32 other) { | ||
| 1354 | return simd_make_uchar16(other.lo); | ||
| 1355 | } | ||
| 1356 | |||
| 1357 | /*! @abstract Truncates `other` to form a vector of sixteen 8-bit unsigned | ||
| 1358 | * integers. */ | ||
| 1359 | static inline SIMD_CFUNC simd_uchar16 simd_make_uchar16(simd_uchar64 other) { | ||
| 1360 | return simd_make_uchar16(other.lo); | ||
| 1361 | } | ||
| 1362 | |||
| 1363 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 1364 | * 8-bit unsigned integers. */ | ||
| 1365 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 lo, simd_uchar16 hi) { | ||
| 1366 | simd_uchar32 result; | ||
| 1367 | result.lo = lo; | ||
| 1368 | result.hi = hi; | ||
| 1369 | return result; | ||
| 1370 | } | ||
| 1371 | |||
| 1372 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1373 | * unsigned integers. */ | ||
| 1374 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(unsigned char other) { | ||
| 1375 | simd_uchar32 result = 0; | ||
| 1376 | result.x = other; | ||
| 1377 | return result; | ||
| 1378 | } | ||
| 1379 | |||
| 1380 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1381 | * integers. The contents of the newly-created vector lanes are | ||
| 1382 | * unspecified. */ | ||
| 1383 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(unsigned char other) { | ||
| 1384 | simd_uchar32 result; | ||
| 1385 | result.x = other; | ||
| 1386 | return result; | ||
| 1387 | } | ||
| 1388 | |||
| 1389 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1390 | * unsigned integers. */ | ||
| 1391 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar2 other) { | ||
| 1392 | simd_uchar32 result = 0; | ||
| 1393 | result.xy = other; | ||
| 1394 | return result; | ||
| 1395 | } | ||
| 1396 | |||
| 1397 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1398 | * integers. The contents of the newly-created vector lanes are | ||
| 1399 | * unspecified. */ | ||
| 1400 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar2 other) { | ||
| 1401 | simd_uchar32 result; | ||
| 1402 | result.xy = other; | ||
| 1403 | return result; | ||
| 1404 | } | ||
| 1405 | |||
| 1406 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1407 | * unsigned integers. */ | ||
| 1408 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar3 other) { | ||
| 1409 | simd_uchar32 result = 0; | ||
| 1410 | result.xyz = other; | ||
| 1411 | return result; | ||
| 1412 | } | ||
| 1413 | |||
| 1414 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1415 | * integers. The contents of the newly-created vector lanes are | ||
| 1416 | * unspecified. */ | ||
| 1417 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar3 other) { | ||
| 1418 | simd_uchar32 result; | ||
| 1419 | result.xyz = other; | ||
| 1420 | return result; | ||
| 1421 | } | ||
| 1422 | |||
| 1423 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1424 | * unsigned integers. */ | ||
| 1425 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar4 other) { | ||
| 1426 | simd_uchar32 result = 0; | ||
| 1427 | result.xyzw = other; | ||
| 1428 | return result; | ||
| 1429 | } | ||
| 1430 | |||
| 1431 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1432 | * integers. The contents of the newly-created vector lanes are | ||
| 1433 | * unspecified. */ | ||
| 1434 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar4 other) { | ||
| 1435 | simd_uchar32 result; | ||
| 1436 | result.xyzw = other; | ||
| 1437 | return result; | ||
| 1438 | } | ||
| 1439 | |||
| 1440 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1441 | * unsigned integers. */ | ||
| 1442 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar8 other) { | ||
| 1443 | simd_uchar32 result = 0; | ||
| 1444 | result.lo = simd_make_uchar16(other); | ||
| 1445 | return result; | ||
| 1446 | } | ||
| 1447 | |||
| 1448 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1449 | * integers. The contents of the newly-created vector lanes are | ||
| 1450 | * unspecified. */ | ||
| 1451 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar8 other) { | ||
| 1452 | simd_uchar32 result; | ||
| 1453 | result.lo = simd_make_uchar16(other); | ||
| 1454 | return result; | ||
| 1455 | } | ||
| 1456 | |||
| 1457 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 8-bit | ||
| 1458 | * unsigned integers. */ | ||
| 1459 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar16 other) { | ||
| 1460 | simd_uchar32 result = 0; | ||
| 1461 | result.lo = simd_make_uchar16(other); | ||
| 1462 | return result; | ||
| 1463 | } | ||
| 1464 | |||
| 1465 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 1466 | * integers. The contents of the newly-created vector lanes are | ||
| 1467 | * unspecified. */ | ||
| 1468 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32_undef(simd_uchar16 other) { | ||
| 1469 | simd_uchar32 result; | ||
| 1470 | result.lo = simd_make_uchar16(other); | ||
| 1471 | return result; | ||
| 1472 | } | ||
| 1473 | |||
| 1474 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1475 | * templated and autogenerated code. */ | ||
| 1476 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar32 other) { | ||
| 1477 | return other; | ||
| 1478 | } | ||
| 1479 | |||
| 1480 | /*! @abstract Truncates `other` to form a vector of thirty-two 8-bit | ||
| 1481 | * unsigned integers. */ | ||
| 1482 | static inline SIMD_CFUNC simd_uchar32 simd_make_uchar32(simd_uchar64 other) { | ||
| 1483 | return simd_make_uchar32(other.lo); | ||
| 1484 | } | ||
| 1485 | |||
| 1486 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 1487 | * 8-bit unsigned integers. */ | ||
| 1488 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 lo, simd_uchar32 hi) { | ||
| 1489 | simd_uchar64 result; | ||
| 1490 | result.lo = lo; | ||
| 1491 | result.hi = hi; | ||
| 1492 | return result; | ||
| 1493 | } | ||
| 1494 | |||
| 1495 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1496 | * unsigned integers. */ | ||
| 1497 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(unsigned char other) { | ||
| 1498 | simd_uchar64 result = 0; | ||
| 1499 | result.x = other; | ||
| 1500 | return result; | ||
| 1501 | } | ||
| 1502 | |||
| 1503 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1504 | * integers. The contents of the newly-created vector lanes are | ||
| 1505 | * unspecified. */ | ||
| 1506 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(unsigned char other) { | ||
| 1507 | simd_uchar64 result; | ||
| 1508 | result.x = other; | ||
| 1509 | return result; | ||
| 1510 | } | ||
| 1511 | |||
| 1512 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1513 | * unsigned integers. */ | ||
| 1514 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar2 other) { | ||
| 1515 | simd_uchar64 result = 0; | ||
| 1516 | result.xy = other; | ||
| 1517 | return result; | ||
| 1518 | } | ||
| 1519 | |||
| 1520 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1521 | * integers. The contents of the newly-created vector lanes are | ||
| 1522 | * unspecified. */ | ||
| 1523 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar2 other) { | ||
| 1524 | simd_uchar64 result; | ||
| 1525 | result.xy = other; | ||
| 1526 | return result; | ||
| 1527 | } | ||
| 1528 | |||
| 1529 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1530 | * unsigned integers. */ | ||
| 1531 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar3 other) { | ||
| 1532 | simd_uchar64 result = 0; | ||
| 1533 | result.xyz = other; | ||
| 1534 | return result; | ||
| 1535 | } | ||
| 1536 | |||
| 1537 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1538 | * integers. The contents of the newly-created vector lanes are | ||
| 1539 | * unspecified. */ | ||
| 1540 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar3 other) { | ||
| 1541 | simd_uchar64 result; | ||
| 1542 | result.xyz = other; | ||
| 1543 | return result; | ||
| 1544 | } | ||
| 1545 | |||
| 1546 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1547 | * unsigned integers. */ | ||
| 1548 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar4 other) { | ||
| 1549 | simd_uchar64 result = 0; | ||
| 1550 | result.xyzw = other; | ||
| 1551 | return result; | ||
| 1552 | } | ||
| 1553 | |||
| 1554 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1555 | * integers. The contents of the newly-created vector lanes are | ||
| 1556 | * unspecified. */ | ||
| 1557 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar4 other) { | ||
| 1558 | simd_uchar64 result; | ||
| 1559 | result.xyzw = other; | ||
| 1560 | return result; | ||
| 1561 | } | ||
| 1562 | |||
| 1563 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1564 | * unsigned integers. */ | ||
| 1565 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar8 other) { | ||
| 1566 | simd_uchar64 result = 0; | ||
| 1567 | result.lo = simd_make_uchar32(other); | ||
| 1568 | return result; | ||
| 1569 | } | ||
| 1570 | |||
| 1571 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1572 | * integers. The contents of the newly-created vector lanes are | ||
| 1573 | * unspecified. */ | ||
| 1574 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar8 other) { | ||
| 1575 | simd_uchar64 result; | ||
| 1576 | result.lo = simd_make_uchar32(other); | ||
| 1577 | return result; | ||
| 1578 | } | ||
| 1579 | |||
| 1580 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1581 | * unsigned integers. */ | ||
| 1582 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar16 other) { | ||
| 1583 | simd_uchar64 result = 0; | ||
| 1584 | result.lo = simd_make_uchar32(other); | ||
| 1585 | return result; | ||
| 1586 | } | ||
| 1587 | |||
| 1588 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1589 | * integers. The contents of the newly-created vector lanes are | ||
| 1590 | * unspecified. */ | ||
| 1591 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar16 other) { | ||
| 1592 | simd_uchar64 result; | ||
| 1593 | result.lo = simd_make_uchar32(other); | ||
| 1594 | return result; | ||
| 1595 | } | ||
| 1596 | |||
| 1597 | /*! @abstract Zero-extends `other` to form a vector of sixty-four 8-bit | ||
| 1598 | * unsigned integers. */ | ||
| 1599 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar32 other) { | ||
| 1600 | simd_uchar64 result = 0; | ||
| 1601 | result.lo = simd_make_uchar32(other); | ||
| 1602 | return result; | ||
| 1603 | } | ||
| 1604 | |||
| 1605 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 1606 | * integers. The contents of the newly-created vector lanes are | ||
| 1607 | * unspecified. */ | ||
| 1608 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64_undef(simd_uchar32 other) { | ||
| 1609 | simd_uchar64 result; | ||
| 1610 | result.lo = simd_make_uchar32(other); | ||
| 1611 | return result; | ||
| 1612 | } | ||
| 1613 | |||
| 1614 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1615 | * templated and autogenerated code. */ | ||
| 1616 | static inline SIMD_CFUNC simd_uchar64 simd_make_uchar64(simd_uchar64 other) { | ||
| 1617 | return other; | ||
| 1618 | } | ||
| 1619 | |||
| 1620 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed | ||
| 1621 | * (twos-complement) integers. */ | ||
| 1622 | static inline SIMD_CFUNC simd_short2 simd_make_short2(short x, short y) { | ||
| 1623 | simd_short2 result; | ||
| 1624 | result.x = x; | ||
| 1625 | result.y = y; | ||
| 1626 | return result; | ||
| 1627 | } | ||
| 1628 | |||
| 1629 | /*! @abstract Zero-extends `other` to form a vector of two 16-bit signed | ||
| 1630 | * (twos-complement) integers. */ | ||
| 1631 | static inline SIMD_CFUNC simd_short2 simd_make_short2(short other) { | ||
| 1632 | simd_short2 result = 0; | ||
| 1633 | result.x = other; | ||
| 1634 | return result; | ||
| 1635 | } | ||
| 1636 | |||
| 1637 | /*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- | ||
| 1638 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1639 | * unspecified. */ | ||
| 1640 | static inline SIMD_CFUNC simd_short2 simd_make_short2_undef(short other) { | ||
| 1641 | simd_short2 result; | ||
| 1642 | result.x = other; | ||
| 1643 | return result; | ||
| 1644 | } | ||
| 1645 | |||
| 1646 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1647 | * templated and autogenerated code. */ | ||
| 1648 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short2 other) { | ||
| 1649 | return other; | ||
| 1650 | } | ||
| 1651 | |||
| 1652 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1653 | * complement) integers. */ | ||
| 1654 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short3 other) { | ||
| 1655 | return other.xy; | ||
| 1656 | } | ||
| 1657 | |||
| 1658 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1659 | * complement) integers. */ | ||
| 1660 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short4 other) { | ||
| 1661 | return other.xy; | ||
| 1662 | } | ||
| 1663 | |||
| 1664 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1665 | * complement) integers. */ | ||
| 1666 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short8 other) { | ||
| 1667 | return other.xy; | ||
| 1668 | } | ||
| 1669 | |||
| 1670 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1671 | * complement) integers. */ | ||
| 1672 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short16 other) { | ||
| 1673 | return other.xy; | ||
| 1674 | } | ||
| 1675 | |||
| 1676 | /*! @abstract Truncates `other` to form a vector of two 16-bit signed (twos- | ||
| 1677 | * complement) integers. */ | ||
| 1678 | static inline SIMD_CFUNC simd_short2 simd_make_short2(simd_short32 other) { | ||
| 1679 | return other.xy; | ||
| 1680 | } | ||
| 1681 | |||
| 1682 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 1683 | * signed (twos-complement) integers. */ | ||
| 1684 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, short y, short z) { | ||
| 1685 | simd_short3 result; | ||
| 1686 | result.x = x; | ||
| 1687 | result.y = y; | ||
| 1688 | result.z = z; | ||
| 1689 | return result; | ||
| 1690 | } | ||
| 1691 | |||
| 1692 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 1693 | * signed (twos-complement) integers. */ | ||
| 1694 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short x, simd_short2 yz) { | ||
| 1695 | simd_short3 result; | ||
| 1696 | result.x = x; | ||
| 1697 | result.yz = yz; | ||
| 1698 | return result; | ||
| 1699 | } | ||
| 1700 | |||
| 1701 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 1702 | * signed (twos-complement) integers. */ | ||
| 1703 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 xy, short z) { | ||
| 1704 | simd_short3 result; | ||
| 1705 | result.xy = xy; | ||
| 1706 | result.z = z; | ||
| 1707 | return result; | ||
| 1708 | } | ||
| 1709 | |||
| 1710 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit signed | ||
| 1711 | * (twos-complement) integers. */ | ||
| 1712 | static inline SIMD_CFUNC simd_short3 simd_make_short3(short other) { | ||
| 1713 | simd_short3 result = 0; | ||
| 1714 | result.x = other; | ||
| 1715 | return result; | ||
| 1716 | } | ||
| 1717 | |||
| 1718 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 1719 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1720 | * unspecified. */ | ||
| 1721 | static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(short other) { | ||
| 1722 | simd_short3 result; | ||
| 1723 | result.x = other; | ||
| 1724 | return result; | ||
| 1725 | } | ||
| 1726 | |||
| 1727 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit signed | ||
| 1728 | * (twos-complement) integers. */ | ||
| 1729 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short2 other) { | ||
| 1730 | simd_short3 result = 0; | ||
| 1731 | result.xy = other; | ||
| 1732 | return result; | ||
| 1733 | } | ||
| 1734 | |||
| 1735 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 1736 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1737 | * unspecified. */ | ||
| 1738 | static inline SIMD_CFUNC simd_short3 simd_make_short3_undef(simd_short2 other) { | ||
| 1739 | simd_short3 result; | ||
| 1740 | result.xy = other; | ||
| 1741 | return result; | ||
| 1742 | } | ||
| 1743 | |||
| 1744 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1745 | * templated and autogenerated code. */ | ||
| 1746 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short3 other) { | ||
| 1747 | return other; | ||
| 1748 | } | ||
| 1749 | |||
| 1750 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1751 | * (twos-complement) integers. */ | ||
| 1752 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short4 other) { | ||
| 1753 | return other.xyz; | ||
| 1754 | } | ||
| 1755 | |||
| 1756 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1757 | * (twos-complement) integers. */ | ||
| 1758 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short8 other) { | ||
| 1759 | return other.xyz; | ||
| 1760 | } | ||
| 1761 | |||
| 1762 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1763 | * (twos-complement) integers. */ | ||
| 1764 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short16 other) { | ||
| 1765 | return other.xyz; | ||
| 1766 | } | ||
| 1767 | |||
| 1768 | /*! @abstract Truncates `other` to form a vector of three 16-bit signed | ||
| 1769 | * (twos-complement) integers. */ | ||
| 1770 | static inline SIMD_CFUNC simd_short3 simd_make_short3(simd_short32 other) { | ||
| 1771 | return other.xyz; | ||
| 1772 | } | ||
| 1773 | |||
| 1774 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 1775 | * 16-bit signed (twos-complement) integers. */ | ||
| 1776 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, short z, short w) { | ||
| 1777 | simd_short4 result; | ||
| 1778 | result.x = x; | ||
| 1779 | result.y = y; | ||
| 1780 | result.z = z; | ||
| 1781 | result.w = w; | ||
| 1782 | return result; | ||
| 1783 | } | ||
| 1784 | |||
| 1785 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 1786 | * signed (twos-complement) integers. */ | ||
| 1787 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, short y, simd_short2 zw) { | ||
| 1788 | simd_short4 result; | ||
| 1789 | result.x = x; | ||
| 1790 | result.y = y; | ||
| 1791 | result.zw = zw; | ||
| 1792 | return result; | ||
| 1793 | } | ||
| 1794 | |||
| 1795 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 1796 | * signed (twos-complement) integers. */ | ||
| 1797 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short2 yz, short w) { | ||
| 1798 | simd_short4 result; | ||
| 1799 | result.x = x; | ||
| 1800 | result.yz = yz; | ||
| 1801 | result.w = w; | ||
| 1802 | return result; | ||
| 1803 | } | ||
| 1804 | |||
| 1805 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 1806 | * signed (twos-complement) integers. */ | ||
| 1807 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, short z, short w) { | ||
| 1808 | simd_short4 result; | ||
| 1809 | result.xy = xy; | ||
| 1810 | result.z = z; | ||
| 1811 | result.w = w; | ||
| 1812 | return result; | ||
| 1813 | } | ||
| 1814 | |||
| 1815 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 1816 | * signed (twos-complement) integers. */ | ||
| 1817 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short x, simd_short3 yzw) { | ||
| 1818 | simd_short4 result; | ||
| 1819 | result.x = x; | ||
| 1820 | result.yzw = yzw; | ||
| 1821 | return result; | ||
| 1822 | } | ||
| 1823 | |||
| 1824 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 1825 | * signed (twos-complement) integers. */ | ||
| 1826 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 xy, simd_short2 zw) { | ||
| 1827 | simd_short4 result; | ||
| 1828 | result.xy = xy; | ||
| 1829 | result.zw = zw; | ||
| 1830 | return result; | ||
| 1831 | } | ||
| 1832 | |||
| 1833 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 1834 | * signed (twos-complement) integers. */ | ||
| 1835 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 xyz, short w) { | ||
| 1836 | simd_short4 result; | ||
| 1837 | result.xyz = xyz; | ||
| 1838 | result.w = w; | ||
| 1839 | return result; | ||
| 1840 | } | ||
| 1841 | |||
| 1842 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1843 | * (twos-complement) integers. */ | ||
| 1844 | static inline SIMD_CFUNC simd_short4 simd_make_short4(short other) { | ||
| 1845 | simd_short4 result = 0; | ||
| 1846 | result.x = other; | ||
| 1847 | return result; | ||
| 1848 | } | ||
| 1849 | |||
| 1850 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1851 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1852 | * unspecified. */ | ||
| 1853 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(short other) { | ||
| 1854 | simd_short4 result; | ||
| 1855 | result.x = other; | ||
| 1856 | return result; | ||
| 1857 | } | ||
| 1858 | |||
| 1859 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1860 | * (twos-complement) integers. */ | ||
| 1861 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short2 other) { | ||
| 1862 | simd_short4 result = 0; | ||
| 1863 | result.xy = other; | ||
| 1864 | return result; | ||
| 1865 | } | ||
| 1866 | |||
| 1867 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1868 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1869 | * unspecified. */ | ||
| 1870 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short2 other) { | ||
| 1871 | simd_short4 result; | ||
| 1872 | result.xy = other; | ||
| 1873 | return result; | ||
| 1874 | } | ||
| 1875 | |||
| 1876 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit signed | ||
| 1877 | * (twos-complement) integers. */ | ||
| 1878 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short3 other) { | ||
| 1879 | simd_short4 result = 0; | ||
| 1880 | result.xyz = other; | ||
| 1881 | return result; | ||
| 1882 | } | ||
| 1883 | |||
| 1884 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 1885 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1886 | * unspecified. */ | ||
| 1887 | static inline SIMD_CFUNC simd_short4 simd_make_short4_undef(simd_short3 other) { | ||
| 1888 | simd_short4 result; | ||
| 1889 | result.xyz = other; | ||
| 1890 | return result; | ||
| 1891 | } | ||
| 1892 | |||
| 1893 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1894 | * templated and autogenerated code. */ | ||
| 1895 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short4 other) { | ||
| 1896 | return other; | ||
| 1897 | } | ||
| 1898 | |||
| 1899 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1900 | * (twos-complement) integers. */ | ||
| 1901 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short8 other) { | ||
| 1902 | return other.xyzw; | ||
| 1903 | } | ||
| 1904 | |||
| 1905 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1906 | * (twos-complement) integers. */ | ||
| 1907 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short16 other) { | ||
| 1908 | return other.xyzw; | ||
| 1909 | } | ||
| 1910 | |||
| 1911 | /*! @abstract Truncates `other` to form a vector of four 16-bit signed | ||
| 1912 | * (twos-complement) integers. */ | ||
| 1913 | static inline SIMD_CFUNC simd_short4 simd_make_short4(simd_short32 other) { | ||
| 1914 | return other.xyzw; | ||
| 1915 | } | ||
| 1916 | |||
| 1917 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 1918 | * signed (twos-complement) integers. */ | ||
| 1919 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 lo, simd_short4 hi) { | ||
| 1920 | simd_short8 result; | ||
| 1921 | result.lo = lo; | ||
| 1922 | result.hi = hi; | ||
| 1923 | return result; | ||
| 1924 | } | ||
| 1925 | |||
| 1926 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1927 | * (twos-complement) integers. */ | ||
| 1928 | static inline SIMD_CFUNC simd_short8 simd_make_short8(short other) { | ||
| 1929 | simd_short8 result = 0; | ||
| 1930 | result.x = other; | ||
| 1931 | return result; | ||
| 1932 | } | ||
| 1933 | |||
| 1934 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1935 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1936 | * unspecified. */ | ||
| 1937 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(short other) { | ||
| 1938 | simd_short8 result; | ||
| 1939 | result.x = other; | ||
| 1940 | return result; | ||
| 1941 | } | ||
| 1942 | |||
| 1943 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1944 | * (twos-complement) integers. */ | ||
| 1945 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short2 other) { | ||
| 1946 | simd_short8 result = 0; | ||
| 1947 | result.xy = other; | ||
| 1948 | return result; | ||
| 1949 | } | ||
| 1950 | |||
| 1951 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1952 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1953 | * unspecified. */ | ||
| 1954 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short2 other) { | ||
| 1955 | simd_short8 result; | ||
| 1956 | result.xy = other; | ||
| 1957 | return result; | ||
| 1958 | } | ||
| 1959 | |||
| 1960 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1961 | * (twos-complement) integers. */ | ||
| 1962 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short3 other) { | ||
| 1963 | simd_short8 result = 0; | ||
| 1964 | result.xyz = other; | ||
| 1965 | return result; | ||
| 1966 | } | ||
| 1967 | |||
| 1968 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1969 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1970 | * unspecified. */ | ||
| 1971 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short3 other) { | ||
| 1972 | simd_short8 result; | ||
| 1973 | result.xyz = other; | ||
| 1974 | return result; | ||
| 1975 | } | ||
| 1976 | |||
| 1977 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit signed | ||
| 1978 | * (twos-complement) integers. */ | ||
| 1979 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short4 other) { | ||
| 1980 | simd_short8 result = 0; | ||
| 1981 | result.xyzw = other; | ||
| 1982 | return result; | ||
| 1983 | } | ||
| 1984 | |||
| 1985 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 1986 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 1987 | * unspecified. */ | ||
| 1988 | static inline SIMD_CFUNC simd_short8 simd_make_short8_undef(simd_short4 other) { | ||
| 1989 | simd_short8 result; | ||
| 1990 | result.xyzw = other; | ||
| 1991 | return result; | ||
| 1992 | } | ||
| 1993 | |||
| 1994 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 1995 | * templated and autogenerated code. */ | ||
| 1996 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short8 other) { | ||
| 1997 | return other; | ||
| 1998 | } | ||
| 1999 | |||
| 2000 | /*! @abstract Truncates `other` to form a vector of eight 16-bit signed | ||
| 2001 | * (twos-complement) integers. */ | ||
| 2002 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short16 other) { | ||
| 2003 | return simd_make_short8(other.lo); | ||
| 2004 | } | ||
| 2005 | |||
| 2006 | /*! @abstract Truncates `other` to form a vector of eight 16-bit signed | ||
| 2007 | * (twos-complement) integers. */ | ||
| 2008 | static inline SIMD_CFUNC simd_short8 simd_make_short8(simd_short32 other) { | ||
| 2009 | return simd_make_short8(other.lo); | ||
| 2010 | } | ||
| 2011 | |||
| 2012 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 2013 | * signed (twos-complement) integers. */ | ||
| 2014 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 lo, simd_short8 hi) { | ||
| 2015 | simd_short16 result; | ||
| 2016 | result.lo = lo; | ||
| 2017 | result.hi = hi; | ||
| 2018 | return result; | ||
| 2019 | } | ||
| 2020 | |||
| 2021 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2022 | * (twos-complement) integers. */ | ||
| 2023 | static inline SIMD_CFUNC simd_short16 simd_make_short16(short other) { | ||
| 2024 | simd_short16 result = 0; | ||
| 2025 | result.x = other; | ||
| 2026 | return result; | ||
| 2027 | } | ||
| 2028 | |||
| 2029 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2030 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2031 | * lanes are unspecified. */ | ||
| 2032 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(short other) { | ||
| 2033 | simd_short16 result; | ||
| 2034 | result.x = other; | ||
| 2035 | return result; | ||
| 2036 | } | ||
| 2037 | |||
| 2038 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2039 | * (twos-complement) integers. */ | ||
| 2040 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short2 other) { | ||
| 2041 | simd_short16 result = 0; | ||
| 2042 | result.xy = other; | ||
| 2043 | return result; | ||
| 2044 | } | ||
| 2045 | |||
| 2046 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2047 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2048 | * lanes are unspecified. */ | ||
| 2049 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short2 other) { | ||
| 2050 | simd_short16 result; | ||
| 2051 | result.xy = other; | ||
| 2052 | return result; | ||
| 2053 | } | ||
| 2054 | |||
| 2055 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2056 | * (twos-complement) integers. */ | ||
| 2057 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short3 other) { | ||
| 2058 | simd_short16 result = 0; | ||
| 2059 | result.xyz = other; | ||
| 2060 | return result; | ||
| 2061 | } | ||
| 2062 | |||
| 2063 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2064 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2065 | * lanes are unspecified. */ | ||
| 2066 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short3 other) { | ||
| 2067 | simd_short16 result; | ||
| 2068 | result.xyz = other; | ||
| 2069 | return result; | ||
| 2070 | } | ||
| 2071 | |||
| 2072 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2073 | * (twos-complement) integers. */ | ||
| 2074 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short4 other) { | ||
| 2075 | simd_short16 result = 0; | ||
| 2076 | result.xyzw = other; | ||
| 2077 | return result; | ||
| 2078 | } | ||
| 2079 | |||
| 2080 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2081 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2082 | * lanes are unspecified. */ | ||
| 2083 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short4 other) { | ||
| 2084 | simd_short16 result; | ||
| 2085 | result.xyzw = other; | ||
| 2086 | return result; | ||
| 2087 | } | ||
| 2088 | |||
| 2089 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit signed | ||
| 2090 | * (twos-complement) integers. */ | ||
| 2091 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short8 other) { | ||
| 2092 | simd_short16 result = 0; | ||
| 2093 | result.lo = simd_make_short8(other); | ||
| 2094 | return result; | ||
| 2095 | } | ||
| 2096 | |||
| 2097 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 2098 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2099 | * lanes are unspecified. */ | ||
| 2100 | static inline SIMD_CFUNC simd_short16 simd_make_short16_undef(simd_short8 other) { | ||
| 2101 | simd_short16 result; | ||
| 2102 | result.lo = simd_make_short8(other); | ||
| 2103 | return result; | ||
| 2104 | } | ||
| 2105 | |||
| 2106 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2107 | * templated and autogenerated code. */ | ||
| 2108 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short16 other) { | ||
| 2109 | return other; | ||
| 2110 | } | ||
| 2111 | |||
| 2112 | /*! @abstract Truncates `other` to form a vector of sixteen 16-bit signed | ||
| 2113 | * (twos-complement) integers. */ | ||
| 2114 | static inline SIMD_CFUNC simd_short16 simd_make_short16(simd_short32 other) { | ||
| 2115 | return simd_make_short16(other.lo); | ||
| 2116 | } | ||
| 2117 | |||
| 2118 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 2119 | * 16-bit signed (twos-complement) integers. */ | ||
| 2120 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 lo, simd_short16 hi) { | ||
| 2121 | simd_short32 result; | ||
| 2122 | result.lo = lo; | ||
| 2123 | result.hi = hi; | ||
| 2124 | return result; | ||
| 2125 | } | ||
| 2126 | |||
| 2127 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2128 | * signed (twos-complement) integers. */ | ||
| 2129 | static inline SIMD_CFUNC simd_short32 simd_make_short32(short other) { | ||
| 2130 | simd_short32 result = 0; | ||
| 2131 | result.x = other; | ||
| 2132 | return result; | ||
| 2133 | } | ||
| 2134 | |||
| 2135 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2136 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2137 | * lanes are unspecified. */ | ||
| 2138 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(short other) { | ||
| 2139 | simd_short32 result; | ||
| 2140 | result.x = other; | ||
| 2141 | return result; | ||
| 2142 | } | ||
| 2143 | |||
| 2144 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2145 | * signed (twos-complement) integers. */ | ||
| 2146 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short2 other) { | ||
| 2147 | simd_short32 result = 0; | ||
| 2148 | result.xy = other; | ||
| 2149 | return result; | ||
| 2150 | } | ||
| 2151 | |||
| 2152 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2153 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2154 | * lanes are unspecified. */ | ||
| 2155 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short2 other) { | ||
| 2156 | simd_short32 result; | ||
| 2157 | result.xy = other; | ||
| 2158 | return result; | ||
| 2159 | } | ||
| 2160 | |||
| 2161 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2162 | * signed (twos-complement) integers. */ | ||
| 2163 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short3 other) { | ||
| 2164 | simd_short32 result = 0; | ||
| 2165 | result.xyz = other; | ||
| 2166 | return result; | ||
| 2167 | } | ||
| 2168 | |||
| 2169 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2170 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2171 | * lanes are unspecified. */ | ||
| 2172 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short3 other) { | ||
| 2173 | simd_short32 result; | ||
| 2174 | result.xyz = other; | ||
| 2175 | return result; | ||
| 2176 | } | ||
| 2177 | |||
| 2178 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2179 | * signed (twos-complement) integers. */ | ||
| 2180 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short4 other) { | ||
| 2181 | simd_short32 result = 0; | ||
| 2182 | result.xyzw = other; | ||
| 2183 | return result; | ||
| 2184 | } | ||
| 2185 | |||
| 2186 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2187 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2188 | * lanes are unspecified. */ | ||
| 2189 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short4 other) { | ||
| 2190 | simd_short32 result; | ||
| 2191 | result.xyzw = other; | ||
| 2192 | return result; | ||
| 2193 | } | ||
| 2194 | |||
| 2195 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2196 | * signed (twos-complement) integers. */ | ||
| 2197 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short8 other) { | ||
| 2198 | simd_short32 result = 0; | ||
| 2199 | result.lo = simd_make_short16(other); | ||
| 2200 | return result; | ||
| 2201 | } | ||
| 2202 | |||
| 2203 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2204 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2205 | * lanes are unspecified. */ | ||
| 2206 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short8 other) { | ||
| 2207 | simd_short32 result; | ||
| 2208 | result.lo = simd_make_short16(other); | ||
| 2209 | return result; | ||
| 2210 | } | ||
| 2211 | |||
| 2212 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2213 | * signed (twos-complement) integers. */ | ||
| 2214 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short16 other) { | ||
| 2215 | simd_short32 result = 0; | ||
| 2216 | result.lo = simd_make_short16(other); | ||
| 2217 | return result; | ||
| 2218 | } | ||
| 2219 | |||
| 2220 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 2221 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 2222 | * lanes are unspecified. */ | ||
| 2223 | static inline SIMD_CFUNC simd_short32 simd_make_short32_undef(simd_short16 other) { | ||
| 2224 | simd_short32 result; | ||
| 2225 | result.lo = simd_make_short16(other); | ||
| 2226 | return result; | ||
| 2227 | } | ||
| 2228 | |||
| 2229 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2230 | * templated and autogenerated code. */ | ||
| 2231 | static inline SIMD_CFUNC simd_short32 simd_make_short32(simd_short32 other) { | ||
| 2232 | return other; | ||
| 2233 | } | ||
| 2234 | |||
| 2235 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit | ||
| 2236 | * unsigned integers. */ | ||
| 2237 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short x, unsigned short y) { | ||
| 2238 | simd_ushort2 result; | ||
| 2239 | result.x = x; | ||
| 2240 | result.y = y; | ||
| 2241 | return result; | ||
| 2242 | } | ||
| 2243 | |||
| 2244 | /*! @abstract Zero-extends `other` to form a vector of two 16-bit unsigned | ||
| 2245 | * integers. */ | ||
| 2246 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(unsigned short other) { | ||
| 2247 | simd_ushort2 result = 0; | ||
| 2248 | result.x = other; | ||
| 2249 | return result; | ||
| 2250 | } | ||
| 2251 | |||
| 2252 | /*! @abstract Extends `other` to form a vector of two 16-bit unsigned | ||
| 2253 | * integers. The contents of the newly-created vector lanes are | ||
| 2254 | * unspecified. */ | ||
| 2255 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2_undef(unsigned short other) { | ||
| 2256 | simd_ushort2 result; | ||
| 2257 | result.x = other; | ||
| 2258 | return result; | ||
| 2259 | } | ||
| 2260 | |||
| 2261 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2262 | * templated and autogenerated code. */ | ||
| 2263 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort2 other) { | ||
| 2264 | return other; | ||
| 2265 | } | ||
| 2266 | |||
| 2267 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2268 | * integers. */ | ||
| 2269 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort3 other) { | ||
| 2270 | return other.xy; | ||
| 2271 | } | ||
| 2272 | |||
| 2273 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2274 | * integers. */ | ||
| 2275 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort4 other) { | ||
| 2276 | return other.xy; | ||
| 2277 | } | ||
| 2278 | |||
| 2279 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2280 | * integers. */ | ||
| 2281 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort8 other) { | ||
| 2282 | return other.xy; | ||
| 2283 | } | ||
| 2284 | |||
| 2285 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2286 | * integers. */ | ||
| 2287 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort16 other) { | ||
| 2288 | return other.xy; | ||
| 2289 | } | ||
| 2290 | |||
| 2291 | /*! @abstract Truncates `other` to form a vector of two 16-bit unsigned | ||
| 2292 | * integers. */ | ||
| 2293 | static inline SIMD_CFUNC simd_ushort2 simd_make_ushort2(simd_ushort32 other) { | ||
| 2294 | return other.xy; | ||
| 2295 | } | ||
| 2296 | |||
| 2297 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 2298 | * unsigned integers. */ | ||
| 2299 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, unsigned short y, unsigned short z) { | ||
| 2300 | simd_ushort3 result; | ||
| 2301 | result.x = x; | ||
| 2302 | result.y = y; | ||
| 2303 | result.z = z; | ||
| 2304 | return result; | ||
| 2305 | } | ||
| 2306 | |||
| 2307 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 2308 | * unsigned integers. */ | ||
| 2309 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short x, simd_ushort2 yz) { | ||
| 2310 | simd_ushort3 result; | ||
| 2311 | result.x = x; | ||
| 2312 | result.yz = yz; | ||
| 2313 | return result; | ||
| 2314 | } | ||
| 2315 | |||
| 2316 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 2317 | * unsigned integers. */ | ||
| 2318 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 xy, unsigned short z) { | ||
| 2319 | simd_ushort3 result; | ||
| 2320 | result.xy = xy; | ||
| 2321 | result.z = z; | ||
| 2322 | return result; | ||
| 2323 | } | ||
| 2324 | |||
| 2325 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned | ||
| 2326 | * integers. */ | ||
| 2327 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(unsigned short other) { | ||
| 2328 | simd_ushort3 result = 0; | ||
| 2329 | result.x = other; | ||
| 2330 | return result; | ||
| 2331 | } | ||
| 2332 | |||
| 2333 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 2334 | * integers. The contents of the newly-created vector lanes are | ||
| 2335 | * unspecified. */ | ||
| 2336 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(unsigned short other) { | ||
| 2337 | simd_ushort3 result; | ||
| 2338 | result.x = other; | ||
| 2339 | return result; | ||
| 2340 | } | ||
| 2341 | |||
| 2342 | /*! @abstract Zero-extends `other` to form a vector of three 16-bit unsigned | ||
| 2343 | * integers. */ | ||
| 2344 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort2 other) { | ||
| 2345 | simd_ushort3 result = 0; | ||
| 2346 | result.xy = other; | ||
| 2347 | return result; | ||
| 2348 | } | ||
| 2349 | |||
| 2350 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 2351 | * integers. The contents of the newly-created vector lanes are | ||
| 2352 | * unspecified. */ | ||
| 2353 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3_undef(simd_ushort2 other) { | ||
| 2354 | simd_ushort3 result; | ||
| 2355 | result.xy = other; | ||
| 2356 | return result; | ||
| 2357 | } | ||
| 2358 | |||
| 2359 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2360 | * templated and autogenerated code. */ | ||
| 2361 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort3 other) { | ||
| 2362 | return other; | ||
| 2363 | } | ||
| 2364 | |||
| 2365 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2366 | * integers. */ | ||
| 2367 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort4 other) { | ||
| 2368 | return other.xyz; | ||
| 2369 | } | ||
| 2370 | |||
| 2371 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2372 | * integers. */ | ||
| 2373 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort8 other) { | ||
| 2374 | return other.xyz; | ||
| 2375 | } | ||
| 2376 | |||
| 2377 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2378 | * integers. */ | ||
| 2379 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort16 other) { | ||
| 2380 | return other.xyz; | ||
| 2381 | } | ||
| 2382 | |||
| 2383 | /*! @abstract Truncates `other` to form a vector of three 16-bit unsigned | ||
| 2384 | * integers. */ | ||
| 2385 | static inline SIMD_CFUNC simd_ushort3 simd_make_ushort3(simd_ushort32 other) { | ||
| 2386 | return other.xyz; | ||
| 2387 | } | ||
| 2388 | |||
| 2389 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 2390 | * 16-bit unsigned integers. */ | ||
| 2391 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { | ||
| 2392 | simd_ushort4 result; | ||
| 2393 | result.x = x; | ||
| 2394 | result.y = y; | ||
| 2395 | result.z = z; | ||
| 2396 | result.w = w; | ||
| 2397 | return result; | ||
| 2398 | } | ||
| 2399 | |||
| 2400 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 2401 | * unsigned integers. */ | ||
| 2402 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, unsigned short y, simd_ushort2 zw) { | ||
| 2403 | simd_ushort4 result; | ||
| 2404 | result.x = x; | ||
| 2405 | result.y = y; | ||
| 2406 | result.zw = zw; | ||
| 2407 | return result; | ||
| 2408 | } | ||
| 2409 | |||
| 2410 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 2411 | * unsigned integers. */ | ||
| 2412 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort2 yz, unsigned short w) { | ||
| 2413 | simd_ushort4 result; | ||
| 2414 | result.x = x; | ||
| 2415 | result.yz = yz; | ||
| 2416 | result.w = w; | ||
| 2417 | return result; | ||
| 2418 | } | ||
| 2419 | |||
| 2420 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 2421 | * unsigned integers. */ | ||
| 2422 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, unsigned short z, unsigned short w) { | ||
| 2423 | simd_ushort4 result; | ||
| 2424 | result.xy = xy; | ||
| 2425 | result.z = z; | ||
| 2426 | result.w = w; | ||
| 2427 | return result; | ||
| 2428 | } | ||
| 2429 | |||
| 2430 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 2431 | * unsigned integers. */ | ||
| 2432 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short x, simd_ushort3 yzw) { | ||
| 2433 | simd_ushort4 result; | ||
| 2434 | result.x = x; | ||
| 2435 | result.yzw = yzw; | ||
| 2436 | return result; | ||
| 2437 | } | ||
| 2438 | |||
| 2439 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 2440 | * unsigned integers. */ | ||
| 2441 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 xy, simd_ushort2 zw) { | ||
| 2442 | simd_ushort4 result; | ||
| 2443 | result.xy = xy; | ||
| 2444 | result.zw = zw; | ||
| 2445 | return result; | ||
| 2446 | } | ||
| 2447 | |||
| 2448 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 2449 | * unsigned integers. */ | ||
| 2450 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 xyz, unsigned short w) { | ||
| 2451 | simd_ushort4 result; | ||
| 2452 | result.xyz = xyz; | ||
| 2453 | result.w = w; | ||
| 2454 | return result; | ||
| 2455 | } | ||
| 2456 | |||
| 2457 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2458 | * integers. */ | ||
| 2459 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(unsigned short other) { | ||
| 2460 | simd_ushort4 result = 0; | ||
| 2461 | result.x = other; | ||
| 2462 | return result; | ||
| 2463 | } | ||
| 2464 | |||
| 2465 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2466 | * integers. The contents of the newly-created vector lanes are | ||
| 2467 | * unspecified. */ | ||
| 2468 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(unsigned short other) { | ||
| 2469 | simd_ushort4 result; | ||
| 2470 | result.x = other; | ||
| 2471 | return result; | ||
| 2472 | } | ||
| 2473 | |||
| 2474 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2475 | * integers. */ | ||
| 2476 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort2 other) { | ||
| 2477 | simd_ushort4 result = 0; | ||
| 2478 | result.xy = other; | ||
| 2479 | return result; | ||
| 2480 | } | ||
| 2481 | |||
| 2482 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2483 | * integers. The contents of the newly-created vector lanes are | ||
| 2484 | * unspecified. */ | ||
| 2485 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort2 other) { | ||
| 2486 | simd_ushort4 result; | ||
| 2487 | result.xy = other; | ||
| 2488 | return result; | ||
| 2489 | } | ||
| 2490 | |||
| 2491 | /*! @abstract Zero-extends `other` to form a vector of four 16-bit unsigned | ||
| 2492 | * integers. */ | ||
| 2493 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort3 other) { | ||
| 2494 | simd_ushort4 result = 0; | ||
| 2495 | result.xyz = other; | ||
| 2496 | return result; | ||
| 2497 | } | ||
| 2498 | |||
| 2499 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 2500 | * integers. The contents of the newly-created vector lanes are | ||
| 2501 | * unspecified. */ | ||
| 2502 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4_undef(simd_ushort3 other) { | ||
| 2503 | simd_ushort4 result; | ||
| 2504 | result.xyz = other; | ||
| 2505 | return result; | ||
| 2506 | } | ||
| 2507 | |||
| 2508 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2509 | * templated and autogenerated code. */ | ||
| 2510 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort4 other) { | ||
| 2511 | return other; | ||
| 2512 | } | ||
| 2513 | |||
| 2514 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2515 | * integers. */ | ||
| 2516 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort8 other) { | ||
| 2517 | return other.xyzw; | ||
| 2518 | } | ||
| 2519 | |||
| 2520 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2521 | * integers. */ | ||
| 2522 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort16 other) { | ||
| 2523 | return other.xyzw; | ||
| 2524 | } | ||
| 2525 | |||
| 2526 | /*! @abstract Truncates `other` to form a vector of four 16-bit unsigned | ||
| 2527 | * integers. */ | ||
| 2528 | static inline SIMD_CFUNC simd_ushort4 simd_make_ushort4(simd_ushort32 other) { | ||
| 2529 | return other.xyzw; | ||
| 2530 | } | ||
| 2531 | |||
| 2532 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 2533 | * unsigned integers. */ | ||
| 2534 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 lo, simd_ushort4 hi) { | ||
| 2535 | simd_ushort8 result; | ||
| 2536 | result.lo = lo; | ||
| 2537 | result.hi = hi; | ||
| 2538 | return result; | ||
| 2539 | } | ||
| 2540 | |||
| 2541 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2542 | * integers. */ | ||
| 2543 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(unsigned short other) { | ||
| 2544 | simd_ushort8 result = 0; | ||
| 2545 | result.x = other; | ||
| 2546 | return result; | ||
| 2547 | } | ||
| 2548 | |||
| 2549 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2550 | * integers. The contents of the newly-created vector lanes are | ||
| 2551 | * unspecified. */ | ||
| 2552 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(unsigned short other) { | ||
| 2553 | simd_ushort8 result; | ||
| 2554 | result.x = other; | ||
| 2555 | return result; | ||
| 2556 | } | ||
| 2557 | |||
| 2558 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2559 | * integers. */ | ||
| 2560 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort2 other) { | ||
| 2561 | simd_ushort8 result = 0; | ||
| 2562 | result.xy = other; | ||
| 2563 | return result; | ||
| 2564 | } | ||
| 2565 | |||
| 2566 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2567 | * integers. The contents of the newly-created vector lanes are | ||
| 2568 | * unspecified. */ | ||
| 2569 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort2 other) { | ||
| 2570 | simd_ushort8 result; | ||
| 2571 | result.xy = other; | ||
| 2572 | return result; | ||
| 2573 | } | ||
| 2574 | |||
| 2575 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2576 | * integers. */ | ||
| 2577 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort3 other) { | ||
| 2578 | simd_ushort8 result = 0; | ||
| 2579 | result.xyz = other; | ||
| 2580 | return result; | ||
| 2581 | } | ||
| 2582 | |||
| 2583 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2584 | * integers. The contents of the newly-created vector lanes are | ||
| 2585 | * unspecified. */ | ||
| 2586 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort3 other) { | ||
| 2587 | simd_ushort8 result; | ||
| 2588 | result.xyz = other; | ||
| 2589 | return result; | ||
| 2590 | } | ||
| 2591 | |||
| 2592 | /*! @abstract Zero-extends `other` to form a vector of eight 16-bit unsigned | ||
| 2593 | * integers. */ | ||
| 2594 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort4 other) { | ||
| 2595 | simd_ushort8 result = 0; | ||
| 2596 | result.xyzw = other; | ||
| 2597 | return result; | ||
| 2598 | } | ||
| 2599 | |||
| 2600 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 2601 | * integers. The contents of the newly-created vector lanes are | ||
| 2602 | * unspecified. */ | ||
| 2603 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8_undef(simd_ushort4 other) { | ||
| 2604 | simd_ushort8 result; | ||
| 2605 | result.xyzw = other; | ||
| 2606 | return result; | ||
| 2607 | } | ||
| 2608 | |||
| 2609 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2610 | * templated and autogenerated code. */ | ||
| 2611 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort8 other) { | ||
| 2612 | return other; | ||
| 2613 | } | ||
| 2614 | |||
| 2615 | /*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned | ||
| 2616 | * integers. */ | ||
| 2617 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort16 other) { | ||
| 2618 | return simd_make_ushort8(other.lo); | ||
| 2619 | } | ||
| 2620 | |||
| 2621 | /*! @abstract Truncates `other` to form a vector of eight 16-bit unsigned | ||
| 2622 | * integers. */ | ||
| 2623 | static inline SIMD_CFUNC simd_ushort8 simd_make_ushort8(simd_ushort32 other) { | ||
| 2624 | return simd_make_ushort8(other.lo); | ||
| 2625 | } | ||
| 2626 | |||
| 2627 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 2628 | * unsigned integers. */ | ||
| 2629 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 lo, simd_ushort8 hi) { | ||
| 2630 | simd_ushort16 result; | ||
| 2631 | result.lo = lo; | ||
| 2632 | result.hi = hi; | ||
| 2633 | return result; | ||
| 2634 | } | ||
| 2635 | |||
| 2636 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2637 | * unsigned integers. */ | ||
| 2638 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(unsigned short other) { | ||
| 2639 | simd_ushort16 result = 0; | ||
| 2640 | result.x = other; | ||
| 2641 | return result; | ||
| 2642 | } | ||
| 2643 | |||
| 2644 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2645 | * integers. The contents of the newly-created vector lanes are | ||
| 2646 | * unspecified. */ | ||
| 2647 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(unsigned short other) { | ||
| 2648 | simd_ushort16 result; | ||
| 2649 | result.x = other; | ||
| 2650 | return result; | ||
| 2651 | } | ||
| 2652 | |||
| 2653 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2654 | * unsigned integers. */ | ||
| 2655 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort2 other) { | ||
| 2656 | simd_ushort16 result = 0; | ||
| 2657 | result.xy = other; | ||
| 2658 | return result; | ||
| 2659 | } | ||
| 2660 | |||
| 2661 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2662 | * integers. The contents of the newly-created vector lanes are | ||
| 2663 | * unspecified. */ | ||
| 2664 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort2 other) { | ||
| 2665 | simd_ushort16 result; | ||
| 2666 | result.xy = other; | ||
| 2667 | return result; | ||
| 2668 | } | ||
| 2669 | |||
| 2670 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2671 | * unsigned integers. */ | ||
| 2672 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort3 other) { | ||
| 2673 | simd_ushort16 result = 0; | ||
| 2674 | result.xyz = other; | ||
| 2675 | return result; | ||
| 2676 | } | ||
| 2677 | |||
| 2678 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2679 | * integers. The contents of the newly-created vector lanes are | ||
| 2680 | * unspecified. */ | ||
| 2681 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort3 other) { | ||
| 2682 | simd_ushort16 result; | ||
| 2683 | result.xyz = other; | ||
| 2684 | return result; | ||
| 2685 | } | ||
| 2686 | |||
| 2687 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2688 | * unsigned integers. */ | ||
| 2689 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort4 other) { | ||
| 2690 | simd_ushort16 result = 0; | ||
| 2691 | result.xyzw = other; | ||
| 2692 | return result; | ||
| 2693 | } | ||
| 2694 | |||
| 2695 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2696 | * integers. The contents of the newly-created vector lanes are | ||
| 2697 | * unspecified. */ | ||
| 2698 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort4 other) { | ||
| 2699 | simd_ushort16 result; | ||
| 2700 | result.xyzw = other; | ||
| 2701 | return result; | ||
| 2702 | } | ||
| 2703 | |||
| 2704 | /*! @abstract Zero-extends `other` to form a vector of sixteen 16-bit | ||
| 2705 | * unsigned integers. */ | ||
| 2706 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort8 other) { | ||
| 2707 | simd_ushort16 result = 0; | ||
| 2708 | result.lo = simd_make_ushort8(other); | ||
| 2709 | return result; | ||
| 2710 | } | ||
| 2711 | |||
| 2712 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 2713 | * integers. The contents of the newly-created vector lanes are | ||
| 2714 | * unspecified. */ | ||
| 2715 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16_undef(simd_ushort8 other) { | ||
| 2716 | simd_ushort16 result; | ||
| 2717 | result.lo = simd_make_ushort8(other); | ||
| 2718 | return result; | ||
| 2719 | } | ||
| 2720 | |||
| 2721 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2722 | * templated and autogenerated code. */ | ||
| 2723 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort16 other) { | ||
| 2724 | return other; | ||
| 2725 | } | ||
| 2726 | |||
| 2727 | /*! @abstract Truncates `other` to form a vector of sixteen 16-bit unsigned | ||
| 2728 | * integers. */ | ||
| 2729 | static inline SIMD_CFUNC simd_ushort16 simd_make_ushort16(simd_ushort32 other) { | ||
| 2730 | return simd_make_ushort16(other.lo); | ||
| 2731 | } | ||
| 2732 | |||
| 2733 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 2734 | * 16-bit unsigned integers. */ | ||
| 2735 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 lo, simd_ushort16 hi) { | ||
| 2736 | simd_ushort32 result; | ||
| 2737 | result.lo = lo; | ||
| 2738 | result.hi = hi; | ||
| 2739 | return result; | ||
| 2740 | } | ||
| 2741 | |||
| 2742 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2743 | * unsigned integers. */ | ||
| 2744 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(unsigned short other) { | ||
| 2745 | simd_ushort32 result = 0; | ||
| 2746 | result.x = other; | ||
| 2747 | return result; | ||
| 2748 | } | ||
| 2749 | |||
| 2750 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2751 | * integers. The contents of the newly-created vector lanes are | ||
| 2752 | * unspecified. */ | ||
| 2753 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(unsigned short other) { | ||
| 2754 | simd_ushort32 result; | ||
| 2755 | result.x = other; | ||
| 2756 | return result; | ||
| 2757 | } | ||
| 2758 | |||
| 2759 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2760 | * unsigned integers. */ | ||
| 2761 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort2 other) { | ||
| 2762 | simd_ushort32 result = 0; | ||
| 2763 | result.xy = other; | ||
| 2764 | return result; | ||
| 2765 | } | ||
| 2766 | |||
| 2767 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2768 | * integers. The contents of the newly-created vector lanes are | ||
| 2769 | * unspecified. */ | ||
| 2770 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort2 other) { | ||
| 2771 | simd_ushort32 result; | ||
| 2772 | result.xy = other; | ||
| 2773 | return result; | ||
| 2774 | } | ||
| 2775 | |||
| 2776 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2777 | * unsigned integers. */ | ||
| 2778 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort3 other) { | ||
| 2779 | simd_ushort32 result = 0; | ||
| 2780 | result.xyz = other; | ||
| 2781 | return result; | ||
| 2782 | } | ||
| 2783 | |||
| 2784 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2785 | * integers. The contents of the newly-created vector lanes are | ||
| 2786 | * unspecified. */ | ||
| 2787 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort3 other) { | ||
| 2788 | simd_ushort32 result; | ||
| 2789 | result.xyz = other; | ||
| 2790 | return result; | ||
| 2791 | } | ||
| 2792 | |||
| 2793 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2794 | * unsigned integers. */ | ||
| 2795 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort4 other) { | ||
| 2796 | simd_ushort32 result = 0; | ||
| 2797 | result.xyzw = other; | ||
| 2798 | return result; | ||
| 2799 | } | ||
| 2800 | |||
| 2801 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2802 | * integers. The contents of the newly-created vector lanes are | ||
| 2803 | * unspecified. */ | ||
| 2804 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort4 other) { | ||
| 2805 | simd_ushort32 result; | ||
| 2806 | result.xyzw = other; | ||
| 2807 | return result; | ||
| 2808 | } | ||
| 2809 | |||
| 2810 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2811 | * unsigned integers. */ | ||
| 2812 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort8 other) { | ||
| 2813 | simd_ushort32 result = 0; | ||
| 2814 | result.lo = simd_make_ushort16(other); | ||
| 2815 | return result; | ||
| 2816 | } | ||
| 2817 | |||
| 2818 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2819 | * integers. The contents of the newly-created vector lanes are | ||
| 2820 | * unspecified. */ | ||
| 2821 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort8 other) { | ||
| 2822 | simd_ushort32 result; | ||
| 2823 | result.lo = simd_make_ushort16(other); | ||
| 2824 | return result; | ||
| 2825 | } | ||
| 2826 | |||
| 2827 | /*! @abstract Zero-extends `other` to form a vector of thirty-two 16-bit | ||
| 2828 | * unsigned integers. */ | ||
| 2829 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort16 other) { | ||
| 2830 | simd_ushort32 result = 0; | ||
| 2831 | result.lo = simd_make_ushort16(other); | ||
| 2832 | return result; | ||
| 2833 | } | ||
| 2834 | |||
| 2835 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 2836 | * integers. The contents of the newly-created vector lanes are | ||
| 2837 | * unspecified. */ | ||
| 2838 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32_undef(simd_ushort16 other) { | ||
| 2839 | simd_ushort32 result; | ||
| 2840 | result.lo = simd_make_ushort16(other); | ||
| 2841 | return result; | ||
| 2842 | } | ||
| 2843 | |||
| 2844 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2845 | * templated and autogenerated code. */ | ||
| 2846 | static inline SIMD_CFUNC simd_ushort32 simd_make_ushort32(simd_ushort32 other) { | ||
| 2847 | return other; | ||
| 2848 | } | ||
| 2849 | |||
| 2850 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed | ||
| 2851 | * (twos-complement) integers. */ | ||
| 2852 | static inline SIMD_CFUNC simd_int2 simd_make_int2(int x, int y) { | ||
| 2853 | simd_int2 result; | ||
| 2854 | result.x = x; | ||
| 2855 | result.y = y; | ||
| 2856 | return result; | ||
| 2857 | } | ||
| 2858 | |||
| 2859 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit signed | ||
| 2860 | * (twos-complement) integers. */ | ||
| 2861 | static inline SIMD_CFUNC simd_int2 simd_make_int2(int other) { | ||
| 2862 | simd_int2 result = 0; | ||
| 2863 | result.x = other; | ||
| 2864 | return result; | ||
| 2865 | } | ||
| 2866 | |||
| 2867 | /*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- | ||
| 2868 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2869 | * unspecified. */ | ||
| 2870 | static inline SIMD_CFUNC simd_int2 simd_make_int2_undef(int other) { | ||
| 2871 | simd_int2 result; | ||
| 2872 | result.x = other; | ||
| 2873 | return result; | ||
| 2874 | } | ||
| 2875 | |||
| 2876 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2877 | * templated and autogenerated code. */ | ||
| 2878 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int2 other) { | ||
| 2879 | return other; | ||
| 2880 | } | ||
| 2881 | |||
| 2882 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2883 | * complement) integers. */ | ||
| 2884 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int3 other) { | ||
| 2885 | return other.xy; | ||
| 2886 | } | ||
| 2887 | |||
| 2888 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2889 | * complement) integers. */ | ||
| 2890 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int4 other) { | ||
| 2891 | return other.xy; | ||
| 2892 | } | ||
| 2893 | |||
| 2894 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2895 | * complement) integers. */ | ||
| 2896 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int8 other) { | ||
| 2897 | return other.xy; | ||
| 2898 | } | ||
| 2899 | |||
| 2900 | /*! @abstract Truncates `other` to form a vector of two 32-bit signed (twos- | ||
| 2901 | * complement) integers. */ | ||
| 2902 | static inline SIMD_CFUNC simd_int2 simd_make_int2(simd_int16 other) { | ||
| 2903 | return other.xy; | ||
| 2904 | } | ||
| 2905 | |||
| 2906 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 2907 | * signed (twos-complement) integers. */ | ||
| 2908 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, int y, int z) { | ||
| 2909 | simd_int3 result; | ||
| 2910 | result.x = x; | ||
| 2911 | result.y = y; | ||
| 2912 | result.z = z; | ||
| 2913 | return result; | ||
| 2914 | } | ||
| 2915 | |||
| 2916 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 2917 | * signed (twos-complement) integers. */ | ||
| 2918 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int x, simd_int2 yz) { | ||
| 2919 | simd_int3 result; | ||
| 2920 | result.x = x; | ||
| 2921 | result.yz = yz; | ||
| 2922 | return result; | ||
| 2923 | } | ||
| 2924 | |||
| 2925 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 2926 | * signed (twos-complement) integers. */ | ||
| 2927 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 xy, int z) { | ||
| 2928 | simd_int3 result; | ||
| 2929 | result.xy = xy; | ||
| 2930 | result.z = z; | ||
| 2931 | return result; | ||
| 2932 | } | ||
| 2933 | |||
| 2934 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit signed | ||
| 2935 | * (twos-complement) integers. */ | ||
| 2936 | static inline SIMD_CFUNC simd_int3 simd_make_int3(int other) { | ||
| 2937 | simd_int3 result = 0; | ||
| 2938 | result.x = other; | ||
| 2939 | return result; | ||
| 2940 | } | ||
| 2941 | |||
| 2942 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 2943 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2944 | * unspecified. */ | ||
| 2945 | static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(int other) { | ||
| 2946 | simd_int3 result; | ||
| 2947 | result.x = other; | ||
| 2948 | return result; | ||
| 2949 | } | ||
| 2950 | |||
| 2951 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit signed | ||
| 2952 | * (twos-complement) integers. */ | ||
| 2953 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int2 other) { | ||
| 2954 | simd_int3 result = 0; | ||
| 2955 | result.xy = other; | ||
| 2956 | return result; | ||
| 2957 | } | ||
| 2958 | |||
| 2959 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 2960 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 2961 | * unspecified. */ | ||
| 2962 | static inline SIMD_CFUNC simd_int3 simd_make_int3_undef(simd_int2 other) { | ||
| 2963 | simd_int3 result; | ||
| 2964 | result.xy = other; | ||
| 2965 | return result; | ||
| 2966 | } | ||
| 2967 | |||
| 2968 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 2969 | * templated and autogenerated code. */ | ||
| 2970 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int3 other) { | ||
| 2971 | return other; | ||
| 2972 | } | ||
| 2973 | |||
| 2974 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 2975 | * (twos-complement) integers. */ | ||
| 2976 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int4 other) { | ||
| 2977 | return other.xyz; | ||
| 2978 | } | ||
| 2979 | |||
| 2980 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 2981 | * (twos-complement) integers. */ | ||
| 2982 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int8 other) { | ||
| 2983 | return other.xyz; | ||
| 2984 | } | ||
| 2985 | |||
| 2986 | /*! @abstract Truncates `other` to form a vector of three 32-bit signed | ||
| 2987 | * (twos-complement) integers. */ | ||
| 2988 | static inline SIMD_CFUNC simd_int3 simd_make_int3(simd_int16 other) { | ||
| 2989 | return other.xyz; | ||
| 2990 | } | ||
| 2991 | |||
| 2992 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 2993 | * 32-bit signed (twos-complement) integers. */ | ||
| 2994 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, int z, int w) { | ||
| 2995 | simd_int4 result; | ||
| 2996 | result.x = x; | ||
| 2997 | result.y = y; | ||
| 2998 | result.z = z; | ||
| 2999 | result.w = w; | ||
| 3000 | return result; | ||
| 3001 | } | ||
| 3002 | |||
| 3003 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3004 | * signed (twos-complement) integers. */ | ||
| 3005 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, int y, simd_int2 zw) { | ||
| 3006 | simd_int4 result; | ||
| 3007 | result.x = x; | ||
| 3008 | result.y = y; | ||
| 3009 | result.zw = zw; | ||
| 3010 | return result; | ||
| 3011 | } | ||
| 3012 | |||
| 3013 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3014 | * signed (twos-complement) integers. */ | ||
| 3015 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int2 yz, int w) { | ||
| 3016 | simd_int4 result; | ||
| 3017 | result.x = x; | ||
| 3018 | result.yz = yz; | ||
| 3019 | result.w = w; | ||
| 3020 | return result; | ||
| 3021 | } | ||
| 3022 | |||
| 3023 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3024 | * signed (twos-complement) integers. */ | ||
| 3025 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, int z, int w) { | ||
| 3026 | simd_int4 result; | ||
| 3027 | result.xy = xy; | ||
| 3028 | result.z = z; | ||
| 3029 | result.w = w; | ||
| 3030 | return result; | ||
| 3031 | } | ||
| 3032 | |||
| 3033 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3034 | * signed (twos-complement) integers. */ | ||
| 3035 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int x, simd_int3 yzw) { | ||
| 3036 | simd_int4 result; | ||
| 3037 | result.x = x; | ||
| 3038 | result.yzw = yzw; | ||
| 3039 | return result; | ||
| 3040 | } | ||
| 3041 | |||
| 3042 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 3043 | * signed (twos-complement) integers. */ | ||
| 3044 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 xy, simd_int2 zw) { | ||
| 3045 | simd_int4 result; | ||
| 3046 | result.xy = xy; | ||
| 3047 | result.zw = zw; | ||
| 3048 | return result; | ||
| 3049 | } | ||
| 3050 | |||
| 3051 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 3052 | * signed (twos-complement) integers. */ | ||
| 3053 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 xyz, int w) { | ||
| 3054 | simd_int4 result; | ||
| 3055 | result.xyz = xyz; | ||
| 3056 | result.w = w; | ||
| 3057 | return result; | ||
| 3058 | } | ||
| 3059 | |||
| 3060 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3061 | * (twos-complement) integers. */ | ||
| 3062 | static inline SIMD_CFUNC simd_int4 simd_make_int4(int other) { | ||
| 3063 | simd_int4 result = 0; | ||
| 3064 | result.x = other; | ||
| 3065 | return result; | ||
| 3066 | } | ||
| 3067 | |||
| 3068 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3069 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3070 | * unspecified. */ | ||
| 3071 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(int other) { | ||
| 3072 | simd_int4 result; | ||
| 3073 | result.x = other; | ||
| 3074 | return result; | ||
| 3075 | } | ||
| 3076 | |||
| 3077 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3078 | * (twos-complement) integers. */ | ||
| 3079 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int2 other) { | ||
| 3080 | simd_int4 result = 0; | ||
| 3081 | result.xy = other; | ||
| 3082 | return result; | ||
| 3083 | } | ||
| 3084 | |||
| 3085 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3086 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3087 | * unspecified. */ | ||
| 3088 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int2 other) { | ||
| 3089 | simd_int4 result; | ||
| 3090 | result.xy = other; | ||
| 3091 | return result; | ||
| 3092 | } | ||
| 3093 | |||
| 3094 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit signed | ||
| 3095 | * (twos-complement) integers. */ | ||
| 3096 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int3 other) { | ||
| 3097 | simd_int4 result = 0; | ||
| 3098 | result.xyz = other; | ||
| 3099 | return result; | ||
| 3100 | } | ||
| 3101 | |||
| 3102 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 3103 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3104 | * unspecified. */ | ||
| 3105 | static inline SIMD_CFUNC simd_int4 simd_make_int4_undef(simd_int3 other) { | ||
| 3106 | simd_int4 result; | ||
| 3107 | result.xyz = other; | ||
| 3108 | return result; | ||
| 3109 | } | ||
| 3110 | |||
| 3111 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3112 | * templated and autogenerated code. */ | ||
| 3113 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int4 other) { | ||
| 3114 | return other; | ||
| 3115 | } | ||
| 3116 | |||
| 3117 | /*! @abstract Truncates `other` to form a vector of four 32-bit signed | ||
| 3118 | * (twos-complement) integers. */ | ||
| 3119 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int8 other) { | ||
| 3120 | return other.xyzw; | ||
| 3121 | } | ||
| 3122 | |||
| 3123 | /*! @abstract Truncates `other` to form a vector of four 32-bit signed | ||
| 3124 | * (twos-complement) integers. */ | ||
| 3125 | static inline SIMD_CFUNC simd_int4 simd_make_int4(simd_int16 other) { | ||
| 3126 | return other.xyzw; | ||
| 3127 | } | ||
| 3128 | |||
| 3129 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 3130 | * signed (twos-complement) integers. */ | ||
| 3131 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 lo, simd_int4 hi) { | ||
| 3132 | simd_int8 result; | ||
| 3133 | result.lo = lo; | ||
| 3134 | result.hi = hi; | ||
| 3135 | return result; | ||
| 3136 | } | ||
| 3137 | |||
| 3138 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3139 | * (twos-complement) integers. */ | ||
| 3140 | static inline SIMD_CFUNC simd_int8 simd_make_int8(int other) { | ||
| 3141 | simd_int8 result = 0; | ||
| 3142 | result.x = other; | ||
| 3143 | return result; | ||
| 3144 | } | ||
| 3145 | |||
| 3146 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3147 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3148 | * unspecified. */ | ||
| 3149 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(int other) { | ||
| 3150 | simd_int8 result; | ||
| 3151 | result.x = other; | ||
| 3152 | return result; | ||
| 3153 | } | ||
| 3154 | |||
| 3155 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3156 | * (twos-complement) integers. */ | ||
| 3157 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int2 other) { | ||
| 3158 | simd_int8 result = 0; | ||
| 3159 | result.xy = other; | ||
| 3160 | return result; | ||
| 3161 | } | ||
| 3162 | |||
| 3163 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3164 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3165 | * unspecified. */ | ||
| 3166 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int2 other) { | ||
| 3167 | simd_int8 result; | ||
| 3168 | result.xy = other; | ||
| 3169 | return result; | ||
| 3170 | } | ||
| 3171 | |||
| 3172 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3173 | * (twos-complement) integers. */ | ||
| 3174 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int3 other) { | ||
| 3175 | simd_int8 result = 0; | ||
| 3176 | result.xyz = other; | ||
| 3177 | return result; | ||
| 3178 | } | ||
| 3179 | |||
| 3180 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3181 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3182 | * unspecified. */ | ||
| 3183 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int3 other) { | ||
| 3184 | simd_int8 result; | ||
| 3185 | result.xyz = other; | ||
| 3186 | return result; | ||
| 3187 | } | ||
| 3188 | |||
| 3189 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit signed | ||
| 3190 | * (twos-complement) integers. */ | ||
| 3191 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int4 other) { | ||
| 3192 | simd_int8 result = 0; | ||
| 3193 | result.xyzw = other; | ||
| 3194 | return result; | ||
| 3195 | } | ||
| 3196 | |||
| 3197 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 3198 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 3199 | * unspecified. */ | ||
| 3200 | static inline SIMD_CFUNC simd_int8 simd_make_int8_undef(simd_int4 other) { | ||
| 3201 | simd_int8 result; | ||
| 3202 | result.xyzw = other; | ||
| 3203 | return result; | ||
| 3204 | } | ||
| 3205 | |||
| 3206 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3207 | * templated and autogenerated code. */ | ||
| 3208 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int8 other) { | ||
| 3209 | return other; | ||
| 3210 | } | ||
| 3211 | |||
| 3212 | /*! @abstract Truncates `other` to form a vector of eight 32-bit signed | ||
| 3213 | * (twos-complement) integers. */ | ||
| 3214 | static inline SIMD_CFUNC simd_int8 simd_make_int8(simd_int16 other) { | ||
| 3215 | return simd_make_int8(other.lo); | ||
| 3216 | } | ||
| 3217 | |||
| 3218 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 3219 | * signed (twos-complement) integers. */ | ||
| 3220 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 lo, simd_int8 hi) { | ||
| 3221 | simd_int16 result; | ||
| 3222 | result.lo = lo; | ||
| 3223 | result.hi = hi; | ||
| 3224 | return result; | ||
| 3225 | } | ||
| 3226 | |||
| 3227 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3228 | * (twos-complement) integers. */ | ||
| 3229 | static inline SIMD_CFUNC simd_int16 simd_make_int16(int other) { | ||
| 3230 | simd_int16 result = 0; | ||
| 3231 | result.x = other; | ||
| 3232 | return result; | ||
| 3233 | } | ||
| 3234 | |||
| 3235 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3236 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3237 | * lanes are unspecified. */ | ||
| 3238 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(int other) { | ||
| 3239 | simd_int16 result; | ||
| 3240 | result.x = other; | ||
| 3241 | return result; | ||
| 3242 | } | ||
| 3243 | |||
| 3244 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3245 | * (twos-complement) integers. */ | ||
| 3246 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int2 other) { | ||
| 3247 | simd_int16 result = 0; | ||
| 3248 | result.xy = other; | ||
| 3249 | return result; | ||
| 3250 | } | ||
| 3251 | |||
| 3252 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3253 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3254 | * lanes are unspecified. */ | ||
| 3255 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int2 other) { | ||
| 3256 | simd_int16 result; | ||
| 3257 | result.xy = other; | ||
| 3258 | return result; | ||
| 3259 | } | ||
| 3260 | |||
| 3261 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3262 | * (twos-complement) integers. */ | ||
| 3263 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int3 other) { | ||
| 3264 | simd_int16 result = 0; | ||
| 3265 | result.xyz = other; | ||
| 3266 | return result; | ||
| 3267 | } | ||
| 3268 | |||
| 3269 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3270 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3271 | * lanes are unspecified. */ | ||
| 3272 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int3 other) { | ||
| 3273 | simd_int16 result; | ||
| 3274 | result.xyz = other; | ||
| 3275 | return result; | ||
| 3276 | } | ||
| 3277 | |||
| 3278 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3279 | * (twos-complement) integers. */ | ||
| 3280 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int4 other) { | ||
| 3281 | simd_int16 result = 0; | ||
| 3282 | result.xyzw = other; | ||
| 3283 | return result; | ||
| 3284 | } | ||
| 3285 | |||
| 3286 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3287 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3288 | * lanes are unspecified. */ | ||
| 3289 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int4 other) { | ||
| 3290 | simd_int16 result; | ||
| 3291 | result.xyzw = other; | ||
| 3292 | return result; | ||
| 3293 | } | ||
| 3294 | |||
| 3295 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit signed | ||
| 3296 | * (twos-complement) integers. */ | ||
| 3297 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int8 other) { | ||
| 3298 | simd_int16 result = 0; | ||
| 3299 | result.lo = simd_make_int8(other); | ||
| 3300 | return result; | ||
| 3301 | } | ||
| 3302 | |||
| 3303 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 3304 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 3305 | * lanes are unspecified. */ | ||
| 3306 | static inline SIMD_CFUNC simd_int16 simd_make_int16_undef(simd_int8 other) { | ||
| 3307 | simd_int16 result; | ||
| 3308 | result.lo = simd_make_int8(other); | ||
| 3309 | return result; | ||
| 3310 | } | ||
| 3311 | |||
| 3312 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3313 | * templated and autogenerated code. */ | ||
| 3314 | static inline SIMD_CFUNC simd_int16 simd_make_int16(simd_int16 other) { | ||
| 3315 | return other; | ||
| 3316 | } | ||
| 3317 | |||
| 3318 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 3319 | * unsigned integers. */ | ||
| 3320 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int x, unsigned int y) { | ||
| 3321 | simd_uint2 result; | ||
| 3322 | result.x = x; | ||
| 3323 | result.y = y; | ||
| 3324 | return result; | ||
| 3325 | } | ||
| 3326 | |||
| 3327 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit unsigned | ||
| 3328 | * integers. */ | ||
| 3329 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(unsigned int other) { | ||
| 3330 | simd_uint2 result = 0; | ||
| 3331 | result.x = other; | ||
| 3332 | return result; | ||
| 3333 | } | ||
| 3334 | |||
| 3335 | /*! @abstract Extends `other` to form a vector of two 32-bit unsigned | ||
| 3336 | * integers. The contents of the newly-created vector lanes are | ||
| 3337 | * unspecified. */ | ||
| 3338 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2_undef(unsigned int other) { | ||
| 3339 | simd_uint2 result; | ||
| 3340 | result.x = other; | ||
| 3341 | return result; | ||
| 3342 | } | ||
| 3343 | |||
| 3344 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3345 | * templated and autogenerated code. */ | ||
| 3346 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint2 other) { | ||
| 3347 | return other; | ||
| 3348 | } | ||
| 3349 | |||
| 3350 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3351 | * integers. */ | ||
| 3352 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint3 other) { | ||
| 3353 | return other.xy; | ||
| 3354 | } | ||
| 3355 | |||
| 3356 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3357 | * integers. */ | ||
| 3358 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint4 other) { | ||
| 3359 | return other.xy; | ||
| 3360 | } | ||
| 3361 | |||
| 3362 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3363 | * integers. */ | ||
| 3364 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint8 other) { | ||
| 3365 | return other.xy; | ||
| 3366 | } | ||
| 3367 | |||
| 3368 | /*! @abstract Truncates `other` to form a vector of two 32-bit unsigned | ||
| 3369 | * integers. */ | ||
| 3370 | static inline SIMD_CFUNC simd_uint2 simd_make_uint2(simd_uint16 other) { | ||
| 3371 | return other.xy; | ||
| 3372 | } | ||
| 3373 | |||
| 3374 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 3375 | * unsigned integers. */ | ||
| 3376 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, unsigned int y, unsigned int z) { | ||
| 3377 | simd_uint3 result; | ||
| 3378 | result.x = x; | ||
| 3379 | result.y = y; | ||
| 3380 | result.z = z; | ||
| 3381 | return result; | ||
| 3382 | } | ||
| 3383 | |||
| 3384 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 3385 | * unsigned integers. */ | ||
| 3386 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int x, simd_uint2 yz) { | ||
| 3387 | simd_uint3 result; | ||
| 3388 | result.x = x; | ||
| 3389 | result.yz = yz; | ||
| 3390 | return result; | ||
| 3391 | } | ||
| 3392 | |||
| 3393 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 3394 | * unsigned integers. */ | ||
| 3395 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 xy, unsigned int z) { | ||
| 3396 | simd_uint3 result; | ||
| 3397 | result.xy = xy; | ||
| 3398 | result.z = z; | ||
| 3399 | return result; | ||
| 3400 | } | ||
| 3401 | |||
| 3402 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned | ||
| 3403 | * integers. */ | ||
| 3404 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(unsigned int other) { | ||
| 3405 | simd_uint3 result = 0; | ||
| 3406 | result.x = other; | ||
| 3407 | return result; | ||
| 3408 | } | ||
| 3409 | |||
| 3410 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 3411 | * integers. The contents of the newly-created vector lanes are | ||
| 3412 | * unspecified. */ | ||
| 3413 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(unsigned int other) { | ||
| 3414 | simd_uint3 result; | ||
| 3415 | result.x = other; | ||
| 3416 | return result; | ||
| 3417 | } | ||
| 3418 | |||
| 3419 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit unsigned | ||
| 3420 | * integers. */ | ||
| 3421 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint2 other) { | ||
| 3422 | simd_uint3 result = 0; | ||
| 3423 | result.xy = other; | ||
| 3424 | return result; | ||
| 3425 | } | ||
| 3426 | |||
| 3427 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 3428 | * integers. The contents of the newly-created vector lanes are | ||
| 3429 | * unspecified. */ | ||
| 3430 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3_undef(simd_uint2 other) { | ||
| 3431 | simd_uint3 result; | ||
| 3432 | result.xy = other; | ||
| 3433 | return result; | ||
| 3434 | } | ||
| 3435 | |||
| 3436 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3437 | * templated and autogenerated code. */ | ||
| 3438 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint3 other) { | ||
| 3439 | return other; | ||
| 3440 | } | ||
| 3441 | |||
| 3442 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3443 | * integers. */ | ||
| 3444 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint4 other) { | ||
| 3445 | return other.xyz; | ||
| 3446 | } | ||
| 3447 | |||
| 3448 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3449 | * integers. */ | ||
| 3450 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint8 other) { | ||
| 3451 | return other.xyz; | ||
| 3452 | } | ||
| 3453 | |||
| 3454 | /*! @abstract Truncates `other` to form a vector of three 32-bit unsigned | ||
| 3455 | * integers. */ | ||
| 3456 | static inline SIMD_CFUNC simd_uint3 simd_make_uint3(simd_uint16 other) { | ||
| 3457 | return other.xyz; | ||
| 3458 | } | ||
| 3459 | |||
| 3460 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 3461 | * 32-bit unsigned integers. */ | ||
| 3462 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { | ||
| 3463 | simd_uint4 result; | ||
| 3464 | result.x = x; | ||
| 3465 | result.y = y; | ||
| 3466 | result.z = z; | ||
| 3467 | result.w = w; | ||
| 3468 | return result; | ||
| 3469 | } | ||
| 3470 | |||
| 3471 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3472 | * unsigned integers. */ | ||
| 3473 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, unsigned int y, simd_uint2 zw) { | ||
| 3474 | simd_uint4 result; | ||
| 3475 | result.x = x; | ||
| 3476 | result.y = y; | ||
| 3477 | result.zw = zw; | ||
| 3478 | return result; | ||
| 3479 | } | ||
| 3480 | |||
| 3481 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3482 | * unsigned integers. */ | ||
| 3483 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint2 yz, unsigned int w) { | ||
| 3484 | simd_uint4 result; | ||
| 3485 | result.x = x; | ||
| 3486 | result.yz = yz; | ||
| 3487 | result.w = w; | ||
| 3488 | return result; | ||
| 3489 | } | ||
| 3490 | |||
| 3491 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3492 | * unsigned integers. */ | ||
| 3493 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, unsigned int z, unsigned int w) { | ||
| 3494 | simd_uint4 result; | ||
| 3495 | result.xy = xy; | ||
| 3496 | result.z = z; | ||
| 3497 | result.w = w; | ||
| 3498 | return result; | ||
| 3499 | } | ||
| 3500 | |||
| 3501 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3502 | * unsigned integers. */ | ||
| 3503 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int x, simd_uint3 yzw) { | ||
| 3504 | simd_uint4 result; | ||
| 3505 | result.x = x; | ||
| 3506 | result.yzw = yzw; | ||
| 3507 | return result; | ||
| 3508 | } | ||
| 3509 | |||
| 3510 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 3511 | * unsigned integers. */ | ||
| 3512 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 xy, simd_uint2 zw) { | ||
| 3513 | simd_uint4 result; | ||
| 3514 | result.xy = xy; | ||
| 3515 | result.zw = zw; | ||
| 3516 | return result; | ||
| 3517 | } | ||
| 3518 | |||
| 3519 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 3520 | * unsigned integers. */ | ||
| 3521 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 xyz, unsigned int w) { | ||
| 3522 | simd_uint4 result; | ||
| 3523 | result.xyz = xyz; | ||
| 3524 | result.w = w; | ||
| 3525 | return result; | ||
| 3526 | } | ||
| 3527 | |||
| 3528 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3529 | * integers. */ | ||
| 3530 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(unsigned int other) { | ||
| 3531 | simd_uint4 result = 0; | ||
| 3532 | result.x = other; | ||
| 3533 | return result; | ||
| 3534 | } | ||
| 3535 | |||
| 3536 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3537 | * integers. The contents of the newly-created vector lanes are | ||
| 3538 | * unspecified. */ | ||
| 3539 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(unsigned int other) { | ||
| 3540 | simd_uint4 result; | ||
| 3541 | result.x = other; | ||
| 3542 | return result; | ||
| 3543 | } | ||
| 3544 | |||
| 3545 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3546 | * integers. */ | ||
| 3547 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint2 other) { | ||
| 3548 | simd_uint4 result = 0; | ||
| 3549 | result.xy = other; | ||
| 3550 | return result; | ||
| 3551 | } | ||
| 3552 | |||
| 3553 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3554 | * integers. The contents of the newly-created vector lanes are | ||
| 3555 | * unspecified. */ | ||
| 3556 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint2 other) { | ||
| 3557 | simd_uint4 result; | ||
| 3558 | result.xy = other; | ||
| 3559 | return result; | ||
| 3560 | } | ||
| 3561 | |||
| 3562 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit unsigned | ||
| 3563 | * integers. */ | ||
| 3564 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint3 other) { | ||
| 3565 | simd_uint4 result = 0; | ||
| 3566 | result.xyz = other; | ||
| 3567 | return result; | ||
| 3568 | } | ||
| 3569 | |||
| 3570 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 3571 | * integers. The contents of the newly-created vector lanes are | ||
| 3572 | * unspecified. */ | ||
| 3573 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4_undef(simd_uint3 other) { | ||
| 3574 | simd_uint4 result; | ||
| 3575 | result.xyz = other; | ||
| 3576 | return result; | ||
| 3577 | } | ||
| 3578 | |||
| 3579 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3580 | * templated and autogenerated code. */ | ||
| 3581 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint4 other) { | ||
| 3582 | return other; | ||
| 3583 | } | ||
| 3584 | |||
| 3585 | /*! @abstract Truncates `other` to form a vector of four 32-bit unsigned | ||
| 3586 | * integers. */ | ||
| 3587 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint8 other) { | ||
| 3588 | return other.xyzw; | ||
| 3589 | } | ||
| 3590 | |||
| 3591 | /*! @abstract Truncates `other` to form a vector of four 32-bit unsigned | ||
| 3592 | * integers. */ | ||
| 3593 | static inline SIMD_CFUNC simd_uint4 simd_make_uint4(simd_uint16 other) { | ||
| 3594 | return other.xyzw; | ||
| 3595 | } | ||
| 3596 | |||
| 3597 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 3598 | * unsigned integers. */ | ||
| 3599 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 lo, simd_uint4 hi) { | ||
| 3600 | simd_uint8 result; | ||
| 3601 | result.lo = lo; | ||
| 3602 | result.hi = hi; | ||
| 3603 | return result; | ||
| 3604 | } | ||
| 3605 | |||
| 3606 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3607 | * integers. */ | ||
| 3608 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(unsigned int other) { | ||
| 3609 | simd_uint8 result = 0; | ||
| 3610 | result.x = other; | ||
| 3611 | return result; | ||
| 3612 | } | ||
| 3613 | |||
| 3614 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3615 | * integers. The contents of the newly-created vector lanes are | ||
| 3616 | * unspecified. */ | ||
| 3617 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(unsigned int other) { | ||
| 3618 | simd_uint8 result; | ||
| 3619 | result.x = other; | ||
| 3620 | return result; | ||
| 3621 | } | ||
| 3622 | |||
| 3623 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3624 | * integers. */ | ||
| 3625 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint2 other) { | ||
| 3626 | simd_uint8 result = 0; | ||
| 3627 | result.xy = other; | ||
| 3628 | return result; | ||
| 3629 | } | ||
| 3630 | |||
| 3631 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3632 | * integers. The contents of the newly-created vector lanes are | ||
| 3633 | * unspecified. */ | ||
| 3634 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint2 other) { | ||
| 3635 | simd_uint8 result; | ||
| 3636 | result.xy = other; | ||
| 3637 | return result; | ||
| 3638 | } | ||
| 3639 | |||
| 3640 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3641 | * integers. */ | ||
| 3642 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint3 other) { | ||
| 3643 | simd_uint8 result = 0; | ||
| 3644 | result.xyz = other; | ||
| 3645 | return result; | ||
| 3646 | } | ||
| 3647 | |||
| 3648 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3649 | * integers. The contents of the newly-created vector lanes are | ||
| 3650 | * unspecified. */ | ||
| 3651 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint3 other) { | ||
| 3652 | simd_uint8 result; | ||
| 3653 | result.xyz = other; | ||
| 3654 | return result; | ||
| 3655 | } | ||
| 3656 | |||
| 3657 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit unsigned | ||
| 3658 | * integers. */ | ||
| 3659 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint4 other) { | ||
| 3660 | simd_uint8 result = 0; | ||
| 3661 | result.xyzw = other; | ||
| 3662 | return result; | ||
| 3663 | } | ||
| 3664 | |||
| 3665 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 3666 | * integers. The contents of the newly-created vector lanes are | ||
| 3667 | * unspecified. */ | ||
| 3668 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8_undef(simd_uint4 other) { | ||
| 3669 | simd_uint8 result; | ||
| 3670 | result.xyzw = other; | ||
| 3671 | return result; | ||
| 3672 | } | ||
| 3673 | |||
| 3674 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3675 | * templated and autogenerated code. */ | ||
| 3676 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint8 other) { | ||
| 3677 | return other; | ||
| 3678 | } | ||
| 3679 | |||
| 3680 | /*! @abstract Truncates `other` to form a vector of eight 32-bit unsigned | ||
| 3681 | * integers. */ | ||
| 3682 | static inline SIMD_CFUNC simd_uint8 simd_make_uint8(simd_uint16 other) { | ||
| 3683 | return simd_make_uint8(other.lo); | ||
| 3684 | } | ||
| 3685 | |||
| 3686 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 3687 | * unsigned integers. */ | ||
| 3688 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 lo, simd_uint8 hi) { | ||
| 3689 | simd_uint16 result; | ||
| 3690 | result.lo = lo; | ||
| 3691 | result.hi = hi; | ||
| 3692 | return result; | ||
| 3693 | } | ||
| 3694 | |||
| 3695 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3696 | * unsigned integers. */ | ||
| 3697 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(unsigned int other) { | ||
| 3698 | simd_uint16 result = 0; | ||
| 3699 | result.x = other; | ||
| 3700 | return result; | ||
| 3701 | } | ||
| 3702 | |||
| 3703 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3704 | * integers. The contents of the newly-created vector lanes are | ||
| 3705 | * unspecified. */ | ||
| 3706 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(unsigned int other) { | ||
| 3707 | simd_uint16 result; | ||
| 3708 | result.x = other; | ||
| 3709 | return result; | ||
| 3710 | } | ||
| 3711 | |||
| 3712 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3713 | * unsigned integers. */ | ||
| 3714 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint2 other) { | ||
| 3715 | simd_uint16 result = 0; | ||
| 3716 | result.xy = other; | ||
| 3717 | return result; | ||
| 3718 | } | ||
| 3719 | |||
| 3720 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3721 | * integers. The contents of the newly-created vector lanes are | ||
| 3722 | * unspecified. */ | ||
| 3723 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint2 other) { | ||
| 3724 | simd_uint16 result; | ||
| 3725 | result.xy = other; | ||
| 3726 | return result; | ||
| 3727 | } | ||
| 3728 | |||
| 3729 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3730 | * unsigned integers. */ | ||
| 3731 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint3 other) { | ||
| 3732 | simd_uint16 result = 0; | ||
| 3733 | result.xyz = other; | ||
| 3734 | return result; | ||
| 3735 | } | ||
| 3736 | |||
| 3737 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3738 | * integers. The contents of the newly-created vector lanes are | ||
| 3739 | * unspecified. */ | ||
| 3740 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint3 other) { | ||
| 3741 | simd_uint16 result; | ||
| 3742 | result.xyz = other; | ||
| 3743 | return result; | ||
| 3744 | } | ||
| 3745 | |||
| 3746 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3747 | * unsigned integers. */ | ||
| 3748 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint4 other) { | ||
| 3749 | simd_uint16 result = 0; | ||
| 3750 | result.xyzw = other; | ||
| 3751 | return result; | ||
| 3752 | } | ||
| 3753 | |||
| 3754 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3755 | * integers. The contents of the newly-created vector lanes are | ||
| 3756 | * unspecified. */ | ||
| 3757 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint4 other) { | ||
| 3758 | simd_uint16 result; | ||
| 3759 | result.xyzw = other; | ||
| 3760 | return result; | ||
| 3761 | } | ||
| 3762 | |||
| 3763 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 3764 | * unsigned integers. */ | ||
| 3765 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint8 other) { | ||
| 3766 | simd_uint16 result = 0; | ||
| 3767 | result.lo = simd_make_uint8(other); | ||
| 3768 | return result; | ||
| 3769 | } | ||
| 3770 | |||
| 3771 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 3772 | * integers. The contents of the newly-created vector lanes are | ||
| 3773 | * unspecified. */ | ||
| 3774 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16_undef(simd_uint8 other) { | ||
| 3775 | simd_uint16 result; | ||
| 3776 | result.lo = simd_make_uint8(other); | ||
| 3777 | return result; | ||
| 3778 | } | ||
| 3779 | |||
| 3780 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3781 | * templated and autogenerated code. */ | ||
| 3782 | static inline SIMD_CFUNC simd_uint16 simd_make_uint16(simd_uint16 other) { | ||
| 3783 | return other; | ||
| 3784 | } | ||
| 3785 | |||
| 3786 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 3787 | * floating-point numbers. */ | ||
| 3788 | static inline SIMD_CFUNC simd_float2 simd_make_float2(float x, float y) { | ||
| 3789 | simd_float2 result; | ||
| 3790 | result.x = x; | ||
| 3791 | result.y = y; | ||
| 3792 | return result; | ||
| 3793 | } | ||
| 3794 | |||
| 3795 | /*! @abstract Zero-extends `other` to form a vector of two 32-bit floating- | ||
| 3796 | * point numbers. */ | ||
| 3797 | static inline SIMD_CFUNC simd_float2 simd_make_float2(float other) { | ||
| 3798 | simd_float2 result = 0; | ||
| 3799 | result.x = other; | ||
| 3800 | return result; | ||
| 3801 | } | ||
| 3802 | |||
| 3803 | /*! @abstract Extends `other` to form a vector of two 32-bit floating-point | ||
| 3804 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 3805 | static inline SIMD_CFUNC simd_float2 simd_make_float2_undef(float other) { | ||
| 3806 | simd_float2 result; | ||
| 3807 | result.x = other; | ||
| 3808 | return result; | ||
| 3809 | } | ||
| 3810 | |||
| 3811 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3812 | * templated and autogenerated code. */ | ||
| 3813 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float2 other) { | ||
| 3814 | return other; | ||
| 3815 | } | ||
| 3816 | |||
| 3817 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3818 | * point numbers. */ | ||
| 3819 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float3 other) { | ||
| 3820 | return other.xy; | ||
| 3821 | } | ||
| 3822 | |||
| 3823 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3824 | * point numbers. */ | ||
| 3825 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float4 other) { | ||
| 3826 | return other.xy; | ||
| 3827 | } | ||
| 3828 | |||
| 3829 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3830 | * point numbers. */ | ||
| 3831 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float8 other) { | ||
| 3832 | return other.xy; | ||
| 3833 | } | ||
| 3834 | |||
| 3835 | /*! @abstract Truncates `other` to form a vector of two 32-bit floating- | ||
| 3836 | * point numbers. */ | ||
| 3837 | static inline SIMD_CFUNC simd_float2 simd_make_float2(simd_float16 other) { | ||
| 3838 | return other.xy; | ||
| 3839 | } | ||
| 3840 | |||
| 3841 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 3842 | * floating-point numbers. */ | ||
| 3843 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, float y, float z) { | ||
| 3844 | simd_float3 result; | ||
| 3845 | result.x = x; | ||
| 3846 | result.y = y; | ||
| 3847 | result.z = z; | ||
| 3848 | return result; | ||
| 3849 | } | ||
| 3850 | |||
| 3851 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 3852 | * floating-point numbers. */ | ||
| 3853 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float x, simd_float2 yz) { | ||
| 3854 | simd_float3 result; | ||
| 3855 | result.x = x; | ||
| 3856 | result.yz = yz; | ||
| 3857 | return result; | ||
| 3858 | } | ||
| 3859 | |||
| 3860 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 3861 | * floating-point numbers. */ | ||
| 3862 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 xy, float z) { | ||
| 3863 | simd_float3 result; | ||
| 3864 | result.xy = xy; | ||
| 3865 | result.z = z; | ||
| 3866 | return result; | ||
| 3867 | } | ||
| 3868 | |||
| 3869 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit | ||
| 3870 | * floating-point numbers. */ | ||
| 3871 | static inline SIMD_CFUNC simd_float3 simd_make_float3(float other) { | ||
| 3872 | simd_float3 result = 0; | ||
| 3873 | result.x = other; | ||
| 3874 | return result; | ||
| 3875 | } | ||
| 3876 | |||
| 3877 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 3878 | * point numbers. The contents of the newly-created vector lanes are | ||
| 3879 | * unspecified. */ | ||
| 3880 | static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(float other) { | ||
| 3881 | simd_float3 result; | ||
| 3882 | result.x = other; | ||
| 3883 | return result; | ||
| 3884 | } | ||
| 3885 | |||
| 3886 | /*! @abstract Zero-extends `other` to form a vector of three 32-bit | ||
| 3887 | * floating-point numbers. */ | ||
| 3888 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float2 other) { | ||
| 3889 | simd_float3 result = 0; | ||
| 3890 | result.xy = other; | ||
| 3891 | return result; | ||
| 3892 | } | ||
| 3893 | |||
| 3894 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 3895 | * point numbers. The contents of the newly-created vector lanes are | ||
| 3896 | * unspecified. */ | ||
| 3897 | static inline SIMD_CFUNC simd_float3 simd_make_float3_undef(simd_float2 other) { | ||
| 3898 | simd_float3 result; | ||
| 3899 | result.xy = other; | ||
| 3900 | return result; | ||
| 3901 | } | ||
| 3902 | |||
| 3903 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 3904 | * templated and autogenerated code. */ | ||
| 3905 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float3 other) { | ||
| 3906 | return other; | ||
| 3907 | } | ||
| 3908 | |||
| 3909 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3910 | * point numbers. */ | ||
| 3911 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float4 other) { | ||
| 3912 | return other.xyz; | ||
| 3913 | } | ||
| 3914 | |||
| 3915 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3916 | * point numbers. */ | ||
| 3917 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float8 other) { | ||
| 3918 | return other.xyz; | ||
| 3919 | } | ||
| 3920 | |||
| 3921 | /*! @abstract Truncates `other` to form a vector of three 32-bit floating- | ||
| 3922 | * point numbers. */ | ||
| 3923 | static inline SIMD_CFUNC simd_float3 simd_make_float3(simd_float16 other) { | ||
| 3924 | return other.xyz; | ||
| 3925 | } | ||
| 3926 | |||
| 3927 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 3928 | * 32-bit floating-point numbers. */ | ||
| 3929 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, float z, float w) { | ||
| 3930 | simd_float4 result; | ||
| 3931 | result.x = x; | ||
| 3932 | result.y = y; | ||
| 3933 | result.z = z; | ||
| 3934 | result.w = w; | ||
| 3935 | return result; | ||
| 3936 | } | ||
| 3937 | |||
| 3938 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 3939 | * floating-point numbers. */ | ||
| 3940 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, float y, simd_float2 zw) { | ||
| 3941 | simd_float4 result; | ||
| 3942 | result.x = x; | ||
| 3943 | result.y = y; | ||
| 3944 | result.zw = zw; | ||
| 3945 | return result; | ||
| 3946 | } | ||
| 3947 | |||
| 3948 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 3949 | * floating-point numbers. */ | ||
| 3950 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float2 yz, float w) { | ||
| 3951 | simd_float4 result; | ||
| 3952 | result.x = x; | ||
| 3953 | result.yz = yz; | ||
| 3954 | result.w = w; | ||
| 3955 | return result; | ||
| 3956 | } | ||
| 3957 | |||
| 3958 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 3959 | * floating-point numbers. */ | ||
| 3960 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, float z, float w) { | ||
| 3961 | simd_float4 result; | ||
| 3962 | result.xy = xy; | ||
| 3963 | result.z = z; | ||
| 3964 | result.w = w; | ||
| 3965 | return result; | ||
| 3966 | } | ||
| 3967 | |||
| 3968 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 3969 | * floating-point numbers. */ | ||
| 3970 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float x, simd_float3 yzw) { | ||
| 3971 | simd_float4 result; | ||
| 3972 | result.x = x; | ||
| 3973 | result.yzw = yzw; | ||
| 3974 | return result; | ||
| 3975 | } | ||
| 3976 | |||
| 3977 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 3978 | * floating-point numbers. */ | ||
| 3979 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 xy, simd_float2 zw) { | ||
| 3980 | simd_float4 result; | ||
| 3981 | result.xy = xy; | ||
| 3982 | result.zw = zw; | ||
| 3983 | return result; | ||
| 3984 | } | ||
| 3985 | |||
| 3986 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 3987 | * floating-point numbers. */ | ||
| 3988 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 xyz, float w) { | ||
| 3989 | simd_float4 result; | ||
| 3990 | result.xyz = xyz; | ||
| 3991 | result.w = w; | ||
| 3992 | return result; | ||
| 3993 | } | ||
| 3994 | |||
| 3995 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 3996 | * point numbers. */ | ||
| 3997 | static inline SIMD_CFUNC simd_float4 simd_make_float4(float other) { | ||
| 3998 | simd_float4 result = 0; | ||
| 3999 | result.x = other; | ||
| 4000 | return result; | ||
| 4001 | } | ||
| 4002 | |||
| 4003 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4004 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4005 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(float other) { | ||
| 4006 | simd_float4 result; | ||
| 4007 | result.x = other; | ||
| 4008 | return result; | ||
| 4009 | } | ||
| 4010 | |||
| 4011 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 4012 | * point numbers. */ | ||
| 4013 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float2 other) { | ||
| 4014 | simd_float4 result = 0; | ||
| 4015 | result.xy = other; | ||
| 4016 | return result; | ||
| 4017 | } | ||
| 4018 | |||
| 4019 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4020 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4021 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float2 other) { | ||
| 4022 | simd_float4 result; | ||
| 4023 | result.xy = other; | ||
| 4024 | return result; | ||
| 4025 | } | ||
| 4026 | |||
| 4027 | /*! @abstract Zero-extends `other` to form a vector of four 32-bit floating- | ||
| 4028 | * point numbers. */ | ||
| 4029 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float3 other) { | ||
| 4030 | simd_float4 result = 0; | ||
| 4031 | result.xyz = other; | ||
| 4032 | return result; | ||
| 4033 | } | ||
| 4034 | |||
| 4035 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 4036 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4037 | static inline SIMD_CFUNC simd_float4 simd_make_float4_undef(simd_float3 other) { | ||
| 4038 | simd_float4 result; | ||
| 4039 | result.xyz = other; | ||
| 4040 | return result; | ||
| 4041 | } | ||
| 4042 | |||
| 4043 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4044 | * templated and autogenerated code. */ | ||
| 4045 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float4 other) { | ||
| 4046 | return other; | ||
| 4047 | } | ||
| 4048 | |||
| 4049 | /*! @abstract Truncates `other` to form a vector of four 32-bit floating- | ||
| 4050 | * point numbers. */ | ||
| 4051 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float8 other) { | ||
| 4052 | return other.xyzw; | ||
| 4053 | } | ||
| 4054 | |||
| 4055 | /*! @abstract Truncates `other` to form a vector of four 32-bit floating- | ||
| 4056 | * point numbers. */ | ||
| 4057 | static inline SIMD_CFUNC simd_float4 simd_make_float4(simd_float16 other) { | ||
| 4058 | return other.xyzw; | ||
| 4059 | } | ||
| 4060 | |||
| 4061 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 4062 | * floating-point numbers. */ | ||
| 4063 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 lo, simd_float4 hi) { | ||
| 4064 | simd_float8 result; | ||
| 4065 | result.lo = lo; | ||
| 4066 | result.hi = hi; | ||
| 4067 | return result; | ||
| 4068 | } | ||
| 4069 | |||
| 4070 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4071 | * floating-point numbers. */ | ||
| 4072 | static inline SIMD_CFUNC simd_float8 simd_make_float8(float other) { | ||
| 4073 | simd_float8 result = 0; | ||
| 4074 | result.x = other; | ||
| 4075 | return result; | ||
| 4076 | } | ||
| 4077 | |||
| 4078 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4079 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4080 | * unspecified. */ | ||
| 4081 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(float other) { | ||
| 4082 | simd_float8 result; | ||
| 4083 | result.x = other; | ||
| 4084 | return result; | ||
| 4085 | } | ||
| 4086 | |||
| 4087 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4088 | * floating-point numbers. */ | ||
| 4089 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float2 other) { | ||
| 4090 | simd_float8 result = 0; | ||
| 4091 | result.xy = other; | ||
| 4092 | return result; | ||
| 4093 | } | ||
| 4094 | |||
| 4095 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4096 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4097 | * unspecified. */ | ||
| 4098 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float2 other) { | ||
| 4099 | simd_float8 result; | ||
| 4100 | result.xy = other; | ||
| 4101 | return result; | ||
| 4102 | } | ||
| 4103 | |||
| 4104 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4105 | * floating-point numbers. */ | ||
| 4106 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float3 other) { | ||
| 4107 | simd_float8 result = 0; | ||
| 4108 | result.xyz = other; | ||
| 4109 | return result; | ||
| 4110 | } | ||
| 4111 | |||
| 4112 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4113 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4114 | * unspecified. */ | ||
| 4115 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float3 other) { | ||
| 4116 | simd_float8 result; | ||
| 4117 | result.xyz = other; | ||
| 4118 | return result; | ||
| 4119 | } | ||
| 4120 | |||
| 4121 | /*! @abstract Zero-extends `other` to form a vector of eight 32-bit | ||
| 4122 | * floating-point numbers. */ | ||
| 4123 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float4 other) { | ||
| 4124 | simd_float8 result = 0; | ||
| 4125 | result.xyzw = other; | ||
| 4126 | return result; | ||
| 4127 | } | ||
| 4128 | |||
| 4129 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 4130 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4131 | * unspecified. */ | ||
| 4132 | static inline SIMD_CFUNC simd_float8 simd_make_float8_undef(simd_float4 other) { | ||
| 4133 | simd_float8 result; | ||
| 4134 | result.xyzw = other; | ||
| 4135 | return result; | ||
| 4136 | } | ||
| 4137 | |||
| 4138 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4139 | * templated and autogenerated code. */ | ||
| 4140 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float8 other) { | ||
| 4141 | return other; | ||
| 4142 | } | ||
| 4143 | |||
| 4144 | /*! @abstract Truncates `other` to form a vector of eight 32-bit floating- | ||
| 4145 | * point numbers. */ | ||
| 4146 | static inline SIMD_CFUNC simd_float8 simd_make_float8(simd_float16 other) { | ||
| 4147 | return simd_make_float8(other.lo); | ||
| 4148 | } | ||
| 4149 | |||
| 4150 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 4151 | * floating-point numbers. */ | ||
| 4152 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 lo, simd_float8 hi) { | ||
| 4153 | simd_float16 result; | ||
| 4154 | result.lo = lo; | ||
| 4155 | result.hi = hi; | ||
| 4156 | return result; | ||
| 4157 | } | ||
| 4158 | |||
| 4159 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4160 | * floating-point numbers. */ | ||
| 4161 | static inline SIMD_CFUNC simd_float16 simd_make_float16(float other) { | ||
| 4162 | simd_float16 result = 0; | ||
| 4163 | result.x = other; | ||
| 4164 | return result; | ||
| 4165 | } | ||
| 4166 | |||
| 4167 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4168 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4169 | * unspecified. */ | ||
| 4170 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(float other) { | ||
| 4171 | simd_float16 result; | ||
| 4172 | result.x = other; | ||
| 4173 | return result; | ||
| 4174 | } | ||
| 4175 | |||
| 4176 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4177 | * floating-point numbers. */ | ||
| 4178 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float2 other) { | ||
| 4179 | simd_float16 result = 0; | ||
| 4180 | result.xy = other; | ||
| 4181 | return result; | ||
| 4182 | } | ||
| 4183 | |||
| 4184 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4185 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4186 | * unspecified. */ | ||
| 4187 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float2 other) { | ||
| 4188 | simd_float16 result; | ||
| 4189 | result.xy = other; | ||
| 4190 | return result; | ||
| 4191 | } | ||
| 4192 | |||
| 4193 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4194 | * floating-point numbers. */ | ||
| 4195 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float3 other) { | ||
| 4196 | simd_float16 result = 0; | ||
| 4197 | result.xyz = other; | ||
| 4198 | return result; | ||
| 4199 | } | ||
| 4200 | |||
| 4201 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4202 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4203 | * unspecified. */ | ||
| 4204 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float3 other) { | ||
| 4205 | simd_float16 result; | ||
| 4206 | result.xyz = other; | ||
| 4207 | return result; | ||
| 4208 | } | ||
| 4209 | |||
| 4210 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4211 | * floating-point numbers. */ | ||
| 4212 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float4 other) { | ||
| 4213 | simd_float16 result = 0; | ||
| 4214 | result.xyzw = other; | ||
| 4215 | return result; | ||
| 4216 | } | ||
| 4217 | |||
| 4218 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4219 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4220 | * unspecified. */ | ||
| 4221 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float4 other) { | ||
| 4222 | simd_float16 result; | ||
| 4223 | result.xyzw = other; | ||
| 4224 | return result; | ||
| 4225 | } | ||
| 4226 | |||
| 4227 | /*! @abstract Zero-extends `other` to form a vector of sixteen 32-bit | ||
| 4228 | * floating-point numbers. */ | ||
| 4229 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float8 other) { | ||
| 4230 | simd_float16 result = 0; | ||
| 4231 | result.lo = simd_make_float8(other); | ||
| 4232 | return result; | ||
| 4233 | } | ||
| 4234 | |||
| 4235 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 4236 | * point numbers. The contents of the newly-created vector lanes are | ||
| 4237 | * unspecified. */ | ||
| 4238 | static inline SIMD_CFUNC simd_float16 simd_make_float16_undef(simd_float8 other) { | ||
| 4239 | simd_float16 result; | ||
| 4240 | result.lo = simd_make_float8(other); | ||
| 4241 | return result; | ||
| 4242 | } | ||
| 4243 | |||
| 4244 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4245 | * templated and autogenerated code. */ | ||
| 4246 | static inline SIMD_CFUNC simd_float16 simd_make_float16(simd_float16 other) { | ||
| 4247 | return other; | ||
| 4248 | } | ||
| 4249 | |||
| 4250 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed | ||
| 4251 | * (twos-complement) integers. */ | ||
| 4252 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 x, simd_long1 y) { | ||
| 4253 | simd_long2 result; | ||
| 4254 | result.x = x; | ||
| 4255 | result.y = y; | ||
| 4256 | return result; | ||
| 4257 | } | ||
| 4258 | |||
| 4259 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit signed | ||
| 4260 | * (twos-complement) integers. */ | ||
| 4261 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long1 other) { | ||
| 4262 | simd_long2 result = 0; | ||
| 4263 | result.x = other; | ||
| 4264 | return result; | ||
| 4265 | } | ||
| 4266 | |||
| 4267 | /*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- | ||
| 4268 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4269 | * unspecified. */ | ||
| 4270 | static inline SIMD_CFUNC simd_long2 simd_make_long2_undef(simd_long1 other) { | ||
| 4271 | simd_long2 result; | ||
| 4272 | result.x = other; | ||
| 4273 | return result; | ||
| 4274 | } | ||
| 4275 | |||
| 4276 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4277 | * templated and autogenerated code. */ | ||
| 4278 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long2 other) { | ||
| 4279 | return other; | ||
| 4280 | } | ||
| 4281 | |||
| 4282 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4283 | * complement) integers. */ | ||
| 4284 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long3 other) { | ||
| 4285 | return other.xy; | ||
| 4286 | } | ||
| 4287 | |||
| 4288 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4289 | * complement) integers. */ | ||
| 4290 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long4 other) { | ||
| 4291 | return other.xy; | ||
| 4292 | } | ||
| 4293 | |||
| 4294 | /*! @abstract Truncates `other` to form a vector of two 64-bit signed (twos- | ||
| 4295 | * complement) integers. */ | ||
| 4296 | static inline SIMD_CFUNC simd_long2 simd_make_long2(simd_long8 other) { | ||
| 4297 | return other.xy; | ||
| 4298 | } | ||
| 4299 | |||
| 4300 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 4301 | * signed (twos-complement) integers. */ | ||
| 4302 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long1 y, simd_long1 z) { | ||
| 4303 | simd_long3 result; | ||
| 4304 | result.x = x; | ||
| 4305 | result.y = y; | ||
| 4306 | result.z = z; | ||
| 4307 | return result; | ||
| 4308 | } | ||
| 4309 | |||
| 4310 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 4311 | * signed (twos-complement) integers. */ | ||
| 4312 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 x, simd_long2 yz) { | ||
| 4313 | simd_long3 result; | ||
| 4314 | result.x = x; | ||
| 4315 | result.yz = yz; | ||
| 4316 | return result; | ||
| 4317 | } | ||
| 4318 | |||
| 4319 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 4320 | * signed (twos-complement) integers. */ | ||
| 4321 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 xy, simd_long1 z) { | ||
| 4322 | simd_long3 result; | ||
| 4323 | result.xy = xy; | ||
| 4324 | result.z = z; | ||
| 4325 | return result; | ||
| 4326 | } | ||
| 4327 | |||
| 4328 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit signed | ||
| 4329 | * (twos-complement) integers. */ | ||
| 4330 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long1 other) { | ||
| 4331 | simd_long3 result = 0; | ||
| 4332 | result.x = other; | ||
| 4333 | return result; | ||
| 4334 | } | ||
| 4335 | |||
| 4336 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 4337 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4338 | * unspecified. */ | ||
| 4339 | static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long1 other) { | ||
| 4340 | simd_long3 result; | ||
| 4341 | result.x = other; | ||
| 4342 | return result; | ||
| 4343 | } | ||
| 4344 | |||
| 4345 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit signed | ||
| 4346 | * (twos-complement) integers. */ | ||
| 4347 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long2 other) { | ||
| 4348 | simd_long3 result = 0; | ||
| 4349 | result.xy = other; | ||
| 4350 | return result; | ||
| 4351 | } | ||
| 4352 | |||
| 4353 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 4354 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4355 | * unspecified. */ | ||
| 4356 | static inline SIMD_CFUNC simd_long3 simd_make_long3_undef(simd_long2 other) { | ||
| 4357 | simd_long3 result; | ||
| 4358 | result.xy = other; | ||
| 4359 | return result; | ||
| 4360 | } | ||
| 4361 | |||
| 4362 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4363 | * templated and autogenerated code. */ | ||
| 4364 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long3 other) { | ||
| 4365 | return other; | ||
| 4366 | } | ||
| 4367 | |||
| 4368 | /*! @abstract Truncates `other` to form a vector of three 64-bit signed | ||
| 4369 | * (twos-complement) integers. */ | ||
| 4370 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long4 other) { | ||
| 4371 | return other.xyz; | ||
| 4372 | } | ||
| 4373 | |||
| 4374 | /*! @abstract Truncates `other` to form a vector of three 64-bit signed | ||
| 4375 | * (twos-complement) integers. */ | ||
| 4376 | static inline SIMD_CFUNC simd_long3 simd_make_long3(simd_long8 other) { | ||
| 4377 | return other.xyz; | ||
| 4378 | } | ||
| 4379 | |||
| 4380 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 4381 | * 64-bit signed (twos-complement) integers. */ | ||
| 4382 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long1 z, simd_long1 w) { | ||
| 4383 | simd_long4 result; | ||
| 4384 | result.x = x; | ||
| 4385 | result.y = y; | ||
| 4386 | result.z = z; | ||
| 4387 | result.w = w; | ||
| 4388 | return result; | ||
| 4389 | } | ||
| 4390 | |||
| 4391 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 4392 | * signed (twos-complement) integers. */ | ||
| 4393 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long1 y, simd_long2 zw) { | ||
| 4394 | simd_long4 result; | ||
| 4395 | result.x = x; | ||
| 4396 | result.y = y; | ||
| 4397 | result.zw = zw; | ||
| 4398 | return result; | ||
| 4399 | } | ||
| 4400 | |||
| 4401 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 4402 | * signed (twos-complement) integers. */ | ||
| 4403 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long2 yz, simd_long1 w) { | ||
| 4404 | simd_long4 result; | ||
| 4405 | result.x = x; | ||
| 4406 | result.yz = yz; | ||
| 4407 | result.w = w; | ||
| 4408 | return result; | ||
| 4409 | } | ||
| 4410 | |||
| 4411 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 4412 | * signed (twos-complement) integers. */ | ||
| 4413 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long1 z, simd_long1 w) { | ||
| 4414 | simd_long4 result; | ||
| 4415 | result.xy = xy; | ||
| 4416 | result.z = z; | ||
| 4417 | result.w = w; | ||
| 4418 | return result; | ||
| 4419 | } | ||
| 4420 | |||
| 4421 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 4422 | * signed (twos-complement) integers. */ | ||
| 4423 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 x, simd_long3 yzw) { | ||
| 4424 | simd_long4 result; | ||
| 4425 | result.x = x; | ||
| 4426 | result.yzw = yzw; | ||
| 4427 | return result; | ||
| 4428 | } | ||
| 4429 | |||
| 4430 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 4431 | * signed (twos-complement) integers. */ | ||
| 4432 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 xy, simd_long2 zw) { | ||
| 4433 | simd_long4 result; | ||
| 4434 | result.xy = xy; | ||
| 4435 | result.zw = zw; | ||
| 4436 | return result; | ||
| 4437 | } | ||
| 4438 | |||
| 4439 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 4440 | * signed (twos-complement) integers. */ | ||
| 4441 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 xyz, simd_long1 w) { | ||
| 4442 | simd_long4 result; | ||
| 4443 | result.xyz = xyz; | ||
| 4444 | result.w = w; | ||
| 4445 | return result; | ||
| 4446 | } | ||
| 4447 | |||
| 4448 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4449 | * (twos-complement) integers. */ | ||
| 4450 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long1 other) { | ||
| 4451 | simd_long4 result = 0; | ||
| 4452 | result.x = other; | ||
| 4453 | return result; | ||
| 4454 | } | ||
| 4455 | |||
| 4456 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4457 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4458 | * unspecified. */ | ||
| 4459 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long1 other) { | ||
| 4460 | simd_long4 result; | ||
| 4461 | result.x = other; | ||
| 4462 | return result; | ||
| 4463 | } | ||
| 4464 | |||
| 4465 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4466 | * (twos-complement) integers. */ | ||
| 4467 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long2 other) { | ||
| 4468 | simd_long4 result = 0; | ||
| 4469 | result.xy = other; | ||
| 4470 | return result; | ||
| 4471 | } | ||
| 4472 | |||
| 4473 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4474 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4475 | * unspecified. */ | ||
| 4476 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long2 other) { | ||
| 4477 | simd_long4 result; | ||
| 4478 | result.xy = other; | ||
| 4479 | return result; | ||
| 4480 | } | ||
| 4481 | |||
| 4482 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit signed | ||
| 4483 | * (twos-complement) integers. */ | ||
| 4484 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long3 other) { | ||
| 4485 | simd_long4 result = 0; | ||
| 4486 | result.xyz = other; | ||
| 4487 | return result; | ||
| 4488 | } | ||
| 4489 | |||
| 4490 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 4491 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4492 | * unspecified. */ | ||
| 4493 | static inline SIMD_CFUNC simd_long4 simd_make_long4_undef(simd_long3 other) { | ||
| 4494 | simd_long4 result; | ||
| 4495 | result.xyz = other; | ||
| 4496 | return result; | ||
| 4497 | } | ||
| 4498 | |||
| 4499 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4500 | * templated and autogenerated code. */ | ||
| 4501 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long4 other) { | ||
| 4502 | return other; | ||
| 4503 | } | ||
| 4504 | |||
| 4505 | /*! @abstract Truncates `other` to form a vector of four 64-bit signed | ||
| 4506 | * (twos-complement) integers. */ | ||
| 4507 | static inline SIMD_CFUNC simd_long4 simd_make_long4(simd_long8 other) { | ||
| 4508 | return other.xyzw; | ||
| 4509 | } | ||
| 4510 | |||
| 4511 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 4512 | * signed (twos-complement) integers. */ | ||
| 4513 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 lo, simd_long4 hi) { | ||
| 4514 | simd_long8 result; | ||
| 4515 | result.lo = lo; | ||
| 4516 | result.hi = hi; | ||
| 4517 | return result; | ||
| 4518 | } | ||
| 4519 | |||
| 4520 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4521 | * (twos-complement) integers. */ | ||
| 4522 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long1 other) { | ||
| 4523 | simd_long8 result = 0; | ||
| 4524 | result.x = other; | ||
| 4525 | return result; | ||
| 4526 | } | ||
| 4527 | |||
| 4528 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4529 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4530 | * unspecified. */ | ||
| 4531 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long1 other) { | ||
| 4532 | simd_long8 result; | ||
| 4533 | result.x = other; | ||
| 4534 | return result; | ||
| 4535 | } | ||
| 4536 | |||
| 4537 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4538 | * (twos-complement) integers. */ | ||
| 4539 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long2 other) { | ||
| 4540 | simd_long8 result = 0; | ||
| 4541 | result.xy = other; | ||
| 4542 | return result; | ||
| 4543 | } | ||
| 4544 | |||
| 4545 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4546 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4547 | * unspecified. */ | ||
| 4548 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long2 other) { | ||
| 4549 | simd_long8 result; | ||
| 4550 | result.xy = other; | ||
| 4551 | return result; | ||
| 4552 | } | ||
| 4553 | |||
| 4554 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4555 | * (twos-complement) integers. */ | ||
| 4556 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long3 other) { | ||
| 4557 | simd_long8 result = 0; | ||
| 4558 | result.xyz = other; | ||
| 4559 | return result; | ||
| 4560 | } | ||
| 4561 | |||
| 4562 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4563 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4564 | * unspecified. */ | ||
| 4565 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long3 other) { | ||
| 4566 | simd_long8 result; | ||
| 4567 | result.xyz = other; | ||
| 4568 | return result; | ||
| 4569 | } | ||
| 4570 | |||
| 4571 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit signed | ||
| 4572 | * (twos-complement) integers. */ | ||
| 4573 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long4 other) { | ||
| 4574 | simd_long8 result = 0; | ||
| 4575 | result.xyzw = other; | ||
| 4576 | return result; | ||
| 4577 | } | ||
| 4578 | |||
| 4579 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 4580 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 4581 | * unspecified. */ | ||
| 4582 | static inline SIMD_CFUNC simd_long8 simd_make_long8_undef(simd_long4 other) { | ||
| 4583 | simd_long8 result; | ||
| 4584 | result.xyzw = other; | ||
| 4585 | return result; | ||
| 4586 | } | ||
| 4587 | |||
| 4588 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4589 | * templated and autogenerated code. */ | ||
| 4590 | static inline SIMD_CFUNC simd_long8 simd_make_long8(simd_long8 other) { | ||
| 4591 | return other; | ||
| 4592 | } | ||
| 4593 | |||
| 4594 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 4595 | * unsigned integers. */ | ||
| 4596 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 x, simd_ulong1 y) { | ||
| 4597 | simd_ulong2 result; | ||
| 4598 | result.x = x; | ||
| 4599 | result.y = y; | ||
| 4600 | return result; | ||
| 4601 | } | ||
| 4602 | |||
| 4603 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit unsigned | ||
| 4604 | * integers. */ | ||
| 4605 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong1 other) { | ||
| 4606 | simd_ulong2 result = 0; | ||
| 4607 | result.x = other; | ||
| 4608 | return result; | ||
| 4609 | } | ||
| 4610 | |||
| 4611 | /*! @abstract Extends `other` to form a vector of two 64-bit unsigned | ||
| 4612 | * integers. The contents of the newly-created vector lanes are | ||
| 4613 | * unspecified. */ | ||
| 4614 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2_undef(simd_ulong1 other) { | ||
| 4615 | simd_ulong2 result; | ||
| 4616 | result.x = other; | ||
| 4617 | return result; | ||
| 4618 | } | ||
| 4619 | |||
| 4620 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4621 | * templated and autogenerated code. */ | ||
| 4622 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong2 other) { | ||
| 4623 | return other; | ||
| 4624 | } | ||
| 4625 | |||
| 4626 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4627 | * integers. */ | ||
| 4628 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong3 other) { | ||
| 4629 | return other.xy; | ||
| 4630 | } | ||
| 4631 | |||
| 4632 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4633 | * integers. */ | ||
| 4634 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong4 other) { | ||
| 4635 | return other.xy; | ||
| 4636 | } | ||
| 4637 | |||
| 4638 | /*! @abstract Truncates `other` to form a vector of two 64-bit unsigned | ||
| 4639 | * integers. */ | ||
| 4640 | static inline SIMD_CFUNC simd_ulong2 simd_make_ulong2(simd_ulong8 other) { | ||
| 4641 | return other.xy; | ||
| 4642 | } | ||
| 4643 | |||
| 4644 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 4645 | * unsigned integers. */ | ||
| 4646 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z) { | ||
| 4647 | simd_ulong3 result; | ||
| 4648 | result.x = x; | ||
| 4649 | result.y = y; | ||
| 4650 | result.z = z; | ||
| 4651 | return result; | ||
| 4652 | } | ||
| 4653 | |||
| 4654 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 4655 | * unsigned integers. */ | ||
| 4656 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 x, simd_ulong2 yz) { | ||
| 4657 | simd_ulong3 result; | ||
| 4658 | result.x = x; | ||
| 4659 | result.yz = yz; | ||
| 4660 | return result; | ||
| 4661 | } | ||
| 4662 | |||
| 4663 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 4664 | * unsigned integers. */ | ||
| 4665 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 xy, simd_ulong1 z) { | ||
| 4666 | simd_ulong3 result; | ||
| 4667 | result.xy = xy; | ||
| 4668 | result.z = z; | ||
| 4669 | return result; | ||
| 4670 | } | ||
| 4671 | |||
| 4672 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned | ||
| 4673 | * integers. */ | ||
| 4674 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong1 other) { | ||
| 4675 | simd_ulong3 result = 0; | ||
| 4676 | result.x = other; | ||
| 4677 | return result; | ||
| 4678 | } | ||
| 4679 | |||
| 4680 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 4681 | * integers. The contents of the newly-created vector lanes are | ||
| 4682 | * unspecified. */ | ||
| 4683 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong1 other) { | ||
| 4684 | simd_ulong3 result; | ||
| 4685 | result.x = other; | ||
| 4686 | return result; | ||
| 4687 | } | ||
| 4688 | |||
| 4689 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit unsigned | ||
| 4690 | * integers. */ | ||
| 4691 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong2 other) { | ||
| 4692 | simd_ulong3 result = 0; | ||
| 4693 | result.xy = other; | ||
| 4694 | return result; | ||
| 4695 | } | ||
| 4696 | |||
| 4697 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 4698 | * integers. The contents of the newly-created vector lanes are | ||
| 4699 | * unspecified. */ | ||
| 4700 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3_undef(simd_ulong2 other) { | ||
| 4701 | simd_ulong3 result; | ||
| 4702 | result.xy = other; | ||
| 4703 | return result; | ||
| 4704 | } | ||
| 4705 | |||
| 4706 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4707 | * templated and autogenerated code. */ | ||
| 4708 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong3 other) { | ||
| 4709 | return other; | ||
| 4710 | } | ||
| 4711 | |||
| 4712 | /*! @abstract Truncates `other` to form a vector of three 64-bit unsigned | ||
| 4713 | * integers. */ | ||
| 4714 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong4 other) { | ||
| 4715 | return other.xyz; | ||
| 4716 | } | ||
| 4717 | |||
| 4718 | /*! @abstract Truncates `other` to form a vector of three 64-bit unsigned | ||
| 4719 | * integers. */ | ||
| 4720 | static inline SIMD_CFUNC simd_ulong3 simd_make_ulong3(simd_ulong8 other) { | ||
| 4721 | return other.xyz; | ||
| 4722 | } | ||
| 4723 | |||
| 4724 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 4725 | * 64-bit unsigned integers. */ | ||
| 4726 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong1 z, simd_ulong1 w) { | ||
| 4727 | simd_ulong4 result; | ||
| 4728 | result.x = x; | ||
| 4729 | result.y = y; | ||
| 4730 | result.z = z; | ||
| 4731 | result.w = w; | ||
| 4732 | return result; | ||
| 4733 | } | ||
| 4734 | |||
| 4735 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 4736 | * unsigned integers. */ | ||
| 4737 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong1 y, simd_ulong2 zw) { | ||
| 4738 | simd_ulong4 result; | ||
| 4739 | result.x = x; | ||
| 4740 | result.y = y; | ||
| 4741 | result.zw = zw; | ||
| 4742 | return result; | ||
| 4743 | } | ||
| 4744 | |||
| 4745 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 4746 | * unsigned integers. */ | ||
| 4747 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong2 yz, simd_ulong1 w) { | ||
| 4748 | simd_ulong4 result; | ||
| 4749 | result.x = x; | ||
| 4750 | result.yz = yz; | ||
| 4751 | result.w = w; | ||
| 4752 | return result; | ||
| 4753 | } | ||
| 4754 | |||
| 4755 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 4756 | * unsigned integers. */ | ||
| 4757 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong1 z, simd_ulong1 w) { | ||
| 4758 | simd_ulong4 result; | ||
| 4759 | result.xy = xy; | ||
| 4760 | result.z = z; | ||
| 4761 | result.w = w; | ||
| 4762 | return result; | ||
| 4763 | } | ||
| 4764 | |||
| 4765 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 4766 | * unsigned integers. */ | ||
| 4767 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 x, simd_ulong3 yzw) { | ||
| 4768 | simd_ulong4 result; | ||
| 4769 | result.x = x; | ||
| 4770 | result.yzw = yzw; | ||
| 4771 | return result; | ||
| 4772 | } | ||
| 4773 | |||
| 4774 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 4775 | * unsigned integers. */ | ||
| 4776 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 xy, simd_ulong2 zw) { | ||
| 4777 | simd_ulong4 result; | ||
| 4778 | result.xy = xy; | ||
| 4779 | result.zw = zw; | ||
| 4780 | return result; | ||
| 4781 | } | ||
| 4782 | |||
| 4783 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 4784 | * unsigned integers. */ | ||
| 4785 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 xyz, simd_ulong1 w) { | ||
| 4786 | simd_ulong4 result; | ||
| 4787 | result.xyz = xyz; | ||
| 4788 | result.w = w; | ||
| 4789 | return result; | ||
| 4790 | } | ||
| 4791 | |||
| 4792 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4793 | * integers. */ | ||
| 4794 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong1 other) { | ||
| 4795 | simd_ulong4 result = 0; | ||
| 4796 | result.x = other; | ||
| 4797 | return result; | ||
| 4798 | } | ||
| 4799 | |||
| 4800 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4801 | * integers. The contents of the newly-created vector lanes are | ||
| 4802 | * unspecified. */ | ||
| 4803 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong1 other) { | ||
| 4804 | simd_ulong4 result; | ||
| 4805 | result.x = other; | ||
| 4806 | return result; | ||
| 4807 | } | ||
| 4808 | |||
| 4809 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4810 | * integers. */ | ||
| 4811 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong2 other) { | ||
| 4812 | simd_ulong4 result = 0; | ||
| 4813 | result.xy = other; | ||
| 4814 | return result; | ||
| 4815 | } | ||
| 4816 | |||
| 4817 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4818 | * integers. The contents of the newly-created vector lanes are | ||
| 4819 | * unspecified. */ | ||
| 4820 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong2 other) { | ||
| 4821 | simd_ulong4 result; | ||
| 4822 | result.xy = other; | ||
| 4823 | return result; | ||
| 4824 | } | ||
| 4825 | |||
| 4826 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit unsigned | ||
| 4827 | * integers. */ | ||
| 4828 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong3 other) { | ||
| 4829 | simd_ulong4 result = 0; | ||
| 4830 | result.xyz = other; | ||
| 4831 | return result; | ||
| 4832 | } | ||
| 4833 | |||
| 4834 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 4835 | * integers. The contents of the newly-created vector lanes are | ||
| 4836 | * unspecified. */ | ||
| 4837 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4_undef(simd_ulong3 other) { | ||
| 4838 | simd_ulong4 result; | ||
| 4839 | result.xyz = other; | ||
| 4840 | return result; | ||
| 4841 | } | ||
| 4842 | |||
| 4843 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4844 | * templated and autogenerated code. */ | ||
| 4845 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong4 other) { | ||
| 4846 | return other; | ||
| 4847 | } | ||
| 4848 | |||
| 4849 | /*! @abstract Truncates `other` to form a vector of four 64-bit unsigned | ||
| 4850 | * integers. */ | ||
| 4851 | static inline SIMD_CFUNC simd_ulong4 simd_make_ulong4(simd_ulong8 other) { | ||
| 4852 | return other.xyzw; | ||
| 4853 | } | ||
| 4854 | |||
| 4855 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 4856 | * unsigned integers. */ | ||
| 4857 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 lo, simd_ulong4 hi) { | ||
| 4858 | simd_ulong8 result; | ||
| 4859 | result.lo = lo; | ||
| 4860 | result.hi = hi; | ||
| 4861 | return result; | ||
| 4862 | } | ||
| 4863 | |||
| 4864 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4865 | * integers. */ | ||
| 4866 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong1 other) { | ||
| 4867 | simd_ulong8 result = 0; | ||
| 4868 | result.x = other; | ||
| 4869 | return result; | ||
| 4870 | } | ||
| 4871 | |||
| 4872 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4873 | * integers. The contents of the newly-created vector lanes are | ||
| 4874 | * unspecified. */ | ||
| 4875 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong1 other) { | ||
| 4876 | simd_ulong8 result; | ||
| 4877 | result.x = other; | ||
| 4878 | return result; | ||
| 4879 | } | ||
| 4880 | |||
| 4881 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4882 | * integers. */ | ||
| 4883 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong2 other) { | ||
| 4884 | simd_ulong8 result = 0; | ||
| 4885 | result.xy = other; | ||
| 4886 | return result; | ||
| 4887 | } | ||
| 4888 | |||
| 4889 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4890 | * integers. The contents of the newly-created vector lanes are | ||
| 4891 | * unspecified. */ | ||
| 4892 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong2 other) { | ||
| 4893 | simd_ulong8 result; | ||
| 4894 | result.xy = other; | ||
| 4895 | return result; | ||
| 4896 | } | ||
| 4897 | |||
| 4898 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4899 | * integers. */ | ||
| 4900 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong3 other) { | ||
| 4901 | simd_ulong8 result = 0; | ||
| 4902 | result.xyz = other; | ||
| 4903 | return result; | ||
| 4904 | } | ||
| 4905 | |||
| 4906 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4907 | * integers. The contents of the newly-created vector lanes are | ||
| 4908 | * unspecified. */ | ||
| 4909 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong3 other) { | ||
| 4910 | simd_ulong8 result; | ||
| 4911 | result.xyz = other; | ||
| 4912 | return result; | ||
| 4913 | } | ||
| 4914 | |||
| 4915 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit unsigned | ||
| 4916 | * integers. */ | ||
| 4917 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong4 other) { | ||
| 4918 | simd_ulong8 result = 0; | ||
| 4919 | result.xyzw = other; | ||
| 4920 | return result; | ||
| 4921 | } | ||
| 4922 | |||
| 4923 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 4924 | * integers. The contents of the newly-created vector lanes are | ||
| 4925 | * unspecified. */ | ||
| 4926 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8_undef(simd_ulong4 other) { | ||
| 4927 | simd_ulong8 result; | ||
| 4928 | result.xyzw = other; | ||
| 4929 | return result; | ||
| 4930 | } | ||
| 4931 | |||
| 4932 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4933 | * templated and autogenerated code. */ | ||
| 4934 | static inline SIMD_CFUNC simd_ulong8 simd_make_ulong8(simd_ulong8 other) { | ||
| 4935 | return other; | ||
| 4936 | } | ||
| 4937 | |||
| 4938 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 4939 | * floating-point numbers. */ | ||
| 4940 | static inline SIMD_CFUNC simd_double2 simd_make_double2(double x, double y) { | ||
| 4941 | simd_double2 result; | ||
| 4942 | result.x = x; | ||
| 4943 | result.y = y; | ||
| 4944 | return result; | ||
| 4945 | } | ||
| 4946 | |||
| 4947 | /*! @abstract Zero-extends `other` to form a vector of two 64-bit floating- | ||
| 4948 | * point numbers. */ | ||
| 4949 | static inline SIMD_CFUNC simd_double2 simd_make_double2(double other) { | ||
| 4950 | simd_double2 result = 0; | ||
| 4951 | result.x = other; | ||
| 4952 | return result; | ||
| 4953 | } | ||
| 4954 | |||
| 4955 | /*! @abstract Extends `other` to form a vector of two 64-bit floating-point | ||
| 4956 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 4957 | static inline SIMD_CFUNC simd_double2 simd_make_double2_undef(double other) { | ||
| 4958 | simd_double2 result; | ||
| 4959 | result.x = other; | ||
| 4960 | return result; | ||
| 4961 | } | ||
| 4962 | |||
| 4963 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 4964 | * templated and autogenerated code. */ | ||
| 4965 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double2 other) { | ||
| 4966 | return other; | ||
| 4967 | } | ||
| 4968 | |||
| 4969 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 4970 | * point numbers. */ | ||
| 4971 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double3 other) { | ||
| 4972 | return other.xy; | ||
| 4973 | } | ||
| 4974 | |||
| 4975 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 4976 | * point numbers. */ | ||
| 4977 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double4 other) { | ||
| 4978 | return other.xy; | ||
| 4979 | } | ||
| 4980 | |||
| 4981 | /*! @abstract Truncates `other` to form a vector of two 64-bit floating- | ||
| 4982 | * point numbers. */ | ||
| 4983 | static inline SIMD_CFUNC simd_double2 simd_make_double2(simd_double8 other) { | ||
| 4984 | return other.xy; | ||
| 4985 | } | ||
| 4986 | |||
| 4987 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 4988 | * floating-point numbers. */ | ||
| 4989 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, double y, double z) { | ||
| 4990 | simd_double3 result; | ||
| 4991 | result.x = x; | ||
| 4992 | result.y = y; | ||
| 4993 | result.z = z; | ||
| 4994 | return result; | ||
| 4995 | } | ||
| 4996 | |||
| 4997 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 4998 | * floating-point numbers. */ | ||
| 4999 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double x, simd_double2 yz) { | ||
| 5000 | simd_double3 result; | ||
| 5001 | result.x = x; | ||
| 5002 | result.yz = yz; | ||
| 5003 | return result; | ||
| 5004 | } | ||
| 5005 | |||
| 5006 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 5007 | * floating-point numbers. */ | ||
| 5008 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 xy, double z) { | ||
| 5009 | simd_double3 result; | ||
| 5010 | result.xy = xy; | ||
| 5011 | result.z = z; | ||
| 5012 | return result; | ||
| 5013 | } | ||
| 5014 | |||
| 5015 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit | ||
| 5016 | * floating-point numbers. */ | ||
| 5017 | static inline SIMD_CFUNC simd_double3 simd_make_double3(double other) { | ||
| 5018 | simd_double3 result = 0; | ||
| 5019 | result.x = other; | ||
| 5020 | return result; | ||
| 5021 | } | ||
| 5022 | |||
| 5023 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 5024 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5025 | * unspecified. */ | ||
| 5026 | static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(double other) { | ||
| 5027 | simd_double3 result; | ||
| 5028 | result.x = other; | ||
| 5029 | return result; | ||
| 5030 | } | ||
| 5031 | |||
| 5032 | /*! @abstract Zero-extends `other` to form a vector of three 64-bit | ||
| 5033 | * floating-point numbers. */ | ||
| 5034 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double2 other) { | ||
| 5035 | simd_double3 result = 0; | ||
| 5036 | result.xy = other; | ||
| 5037 | return result; | ||
| 5038 | } | ||
| 5039 | |||
| 5040 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 5041 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5042 | * unspecified. */ | ||
| 5043 | static inline SIMD_CFUNC simd_double3 simd_make_double3_undef(simd_double2 other) { | ||
| 5044 | simd_double3 result; | ||
| 5045 | result.xy = other; | ||
| 5046 | return result; | ||
| 5047 | } | ||
| 5048 | |||
| 5049 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5050 | * templated and autogenerated code. */ | ||
| 5051 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double3 other) { | ||
| 5052 | return other; | ||
| 5053 | } | ||
| 5054 | |||
| 5055 | /*! @abstract Truncates `other` to form a vector of three 64-bit floating- | ||
| 5056 | * point numbers. */ | ||
| 5057 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double4 other) { | ||
| 5058 | return other.xyz; | ||
| 5059 | } | ||
| 5060 | |||
| 5061 | /*! @abstract Truncates `other` to form a vector of three 64-bit floating- | ||
| 5062 | * point numbers. */ | ||
| 5063 | static inline SIMD_CFUNC simd_double3 simd_make_double3(simd_double8 other) { | ||
| 5064 | return other.xyz; | ||
| 5065 | } | ||
| 5066 | |||
| 5067 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5068 | * 64-bit floating-point numbers. */ | ||
| 5069 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, double z, double w) { | ||
| 5070 | simd_double4 result; | ||
| 5071 | result.x = x; | ||
| 5072 | result.y = y; | ||
| 5073 | result.z = z; | ||
| 5074 | result.w = w; | ||
| 5075 | return result; | ||
| 5076 | } | ||
| 5077 | |||
| 5078 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 5079 | * floating-point numbers. */ | ||
| 5080 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, double y, simd_double2 zw) { | ||
| 5081 | simd_double4 result; | ||
| 5082 | result.x = x; | ||
| 5083 | result.y = y; | ||
| 5084 | result.zw = zw; | ||
| 5085 | return result; | ||
| 5086 | } | ||
| 5087 | |||
| 5088 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 5089 | * floating-point numbers. */ | ||
| 5090 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double2 yz, double w) { | ||
| 5091 | simd_double4 result; | ||
| 5092 | result.x = x; | ||
| 5093 | result.yz = yz; | ||
| 5094 | result.w = w; | ||
| 5095 | return result; | ||
| 5096 | } | ||
| 5097 | |||
| 5098 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 5099 | * floating-point numbers. */ | ||
| 5100 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, double z, double w) { | ||
| 5101 | simd_double4 result; | ||
| 5102 | result.xy = xy; | ||
| 5103 | result.z = z; | ||
| 5104 | result.w = w; | ||
| 5105 | return result; | ||
| 5106 | } | ||
| 5107 | |||
| 5108 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 5109 | * floating-point numbers. */ | ||
| 5110 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double x, simd_double3 yzw) { | ||
| 5111 | simd_double4 result; | ||
| 5112 | result.x = x; | ||
| 5113 | result.yzw = yzw; | ||
| 5114 | return result; | ||
| 5115 | } | ||
| 5116 | |||
| 5117 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 5118 | * floating-point numbers. */ | ||
| 5119 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 xy, simd_double2 zw) { | ||
| 5120 | simd_double4 result; | ||
| 5121 | result.xy = xy; | ||
| 5122 | result.zw = zw; | ||
| 5123 | return result; | ||
| 5124 | } | ||
| 5125 | |||
| 5126 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 5127 | * floating-point numbers. */ | ||
| 5128 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 xyz, double w) { | ||
| 5129 | simd_double4 result; | ||
| 5130 | result.xyz = xyz; | ||
| 5131 | result.w = w; | ||
| 5132 | return result; | ||
| 5133 | } | ||
| 5134 | |||
| 5135 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5136 | * point numbers. */ | ||
| 5137 | static inline SIMD_CFUNC simd_double4 simd_make_double4(double other) { | ||
| 5138 | simd_double4 result = 0; | ||
| 5139 | result.x = other; | ||
| 5140 | return result; | ||
| 5141 | } | ||
| 5142 | |||
| 5143 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5144 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5145 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(double other) { | ||
| 5146 | simd_double4 result; | ||
| 5147 | result.x = other; | ||
| 5148 | return result; | ||
| 5149 | } | ||
| 5150 | |||
| 5151 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5152 | * point numbers. */ | ||
| 5153 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double2 other) { | ||
| 5154 | simd_double4 result = 0; | ||
| 5155 | result.xy = other; | ||
| 5156 | return result; | ||
| 5157 | } | ||
| 5158 | |||
| 5159 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5160 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5161 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double2 other) { | ||
| 5162 | simd_double4 result; | ||
| 5163 | result.xy = other; | ||
| 5164 | return result; | ||
| 5165 | } | ||
| 5166 | |||
| 5167 | /*! @abstract Zero-extends `other` to form a vector of four 64-bit floating- | ||
| 5168 | * point numbers. */ | ||
| 5169 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double3 other) { | ||
| 5170 | simd_double4 result = 0; | ||
| 5171 | result.xyz = other; | ||
| 5172 | return result; | ||
| 5173 | } | ||
| 5174 | |||
| 5175 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 5176 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 5177 | static inline SIMD_CFUNC simd_double4 simd_make_double4_undef(simd_double3 other) { | ||
| 5178 | simd_double4 result; | ||
| 5179 | result.xyz = other; | ||
| 5180 | return result; | ||
| 5181 | } | ||
| 5182 | |||
| 5183 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5184 | * templated and autogenerated code. */ | ||
| 5185 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double4 other) { | ||
| 5186 | return other; | ||
| 5187 | } | ||
| 5188 | |||
| 5189 | /*! @abstract Truncates `other` to form a vector of four 64-bit floating- | ||
| 5190 | * point numbers. */ | ||
| 5191 | static inline SIMD_CFUNC simd_double4 simd_make_double4(simd_double8 other) { | ||
| 5192 | return other.xyzw; | ||
| 5193 | } | ||
| 5194 | |||
| 5195 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 5196 | * floating-point numbers. */ | ||
| 5197 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 lo, simd_double4 hi) { | ||
| 5198 | simd_double8 result; | ||
| 5199 | result.lo = lo; | ||
| 5200 | result.hi = hi; | ||
| 5201 | return result; | ||
| 5202 | } | ||
| 5203 | |||
| 5204 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5205 | * floating-point numbers. */ | ||
| 5206 | static inline SIMD_CFUNC simd_double8 simd_make_double8(double other) { | ||
| 5207 | simd_double8 result = 0; | ||
| 5208 | result.x = other; | ||
| 5209 | return result; | ||
| 5210 | } | ||
| 5211 | |||
| 5212 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5213 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5214 | * unspecified. */ | ||
| 5215 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(double other) { | ||
| 5216 | simd_double8 result; | ||
| 5217 | result.x = other; | ||
| 5218 | return result; | ||
| 5219 | } | ||
| 5220 | |||
| 5221 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5222 | * floating-point numbers. */ | ||
| 5223 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double2 other) { | ||
| 5224 | simd_double8 result = 0; | ||
| 5225 | result.xy = other; | ||
| 5226 | return result; | ||
| 5227 | } | ||
| 5228 | |||
| 5229 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5230 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5231 | * unspecified. */ | ||
| 5232 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double2 other) { | ||
| 5233 | simd_double8 result; | ||
| 5234 | result.xy = other; | ||
| 5235 | return result; | ||
| 5236 | } | ||
| 5237 | |||
| 5238 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5239 | * floating-point numbers. */ | ||
| 5240 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double3 other) { | ||
| 5241 | simd_double8 result = 0; | ||
| 5242 | result.xyz = other; | ||
| 5243 | return result; | ||
| 5244 | } | ||
| 5245 | |||
| 5246 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5247 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5248 | * unspecified. */ | ||
| 5249 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double3 other) { | ||
| 5250 | simd_double8 result; | ||
| 5251 | result.xyz = other; | ||
| 5252 | return result; | ||
| 5253 | } | ||
| 5254 | |||
| 5255 | /*! @abstract Zero-extends `other` to form a vector of eight 64-bit | ||
| 5256 | * floating-point numbers. */ | ||
| 5257 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double4 other) { | ||
| 5258 | simd_double8 result = 0; | ||
| 5259 | result.xyzw = other; | ||
| 5260 | return result; | ||
| 5261 | } | ||
| 5262 | |||
| 5263 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 5264 | * point numbers. The contents of the newly-created vector lanes are | ||
| 5265 | * unspecified. */ | ||
| 5266 | static inline SIMD_CFUNC simd_double8 simd_make_double8_undef(simd_double4 other) { | ||
| 5267 | simd_double8 result; | ||
| 5268 | result.xyzw = other; | ||
| 5269 | return result; | ||
| 5270 | } | ||
| 5271 | |||
| 5272 | /*! @abstract Returns `other` unmodified. This function is a convenience for | ||
| 5273 | * templated and autogenerated code. */ | ||
| 5274 | static inline SIMD_CFUNC simd_double8 simd_make_double8(simd_double8 other) { | ||
| 5275 | return other; | ||
| 5276 | } | ||
| 5277 | |||
| 5278 | #ifdef __cplusplus | ||
| 5279 | } /* extern "C" */ | ||
| 5280 | |||
| 5281 | namespace simd { | ||
| 5282 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit signed | ||
| 5283 | * (twos-complement) integers. */ | ||
| 5284 | static inline SIMD_CPPFUNC char2 make_char2(char x, char y) { | ||
| 5285 | return ::simd_make_char2(x, y); | ||
| 5286 | } | ||
| 5287 | |||
| 5288 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5289 | * 8-bit signed (twos-complement) integers. */ | ||
| 5290 | template <typename typeN> static SIMD_CPPFUNC char2 make_char2(typeN other) { | ||
| 5291 | return ::simd_make_char2(other); | ||
| 5292 | } | ||
| 5293 | |||
| 5294 | /*! @abstract Extends `other` to form a vector of two 8-bit signed (twos- | ||
| 5295 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5296 | * unspecified. */ | ||
| 5297 | template <typename typeN> static SIMD_CPPFUNC char2 make_char2_undef(typeN other) { | ||
| 5298 | return ::simd_make_char2_undef(other); | ||
| 5299 | } | ||
| 5300 | |||
| 5301 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 5302 | * signed (twos-complement) integers. */ | ||
| 5303 | static inline SIMD_CPPFUNC char3 make_char3(char x, char y, char z) { | ||
| 5304 | return ::simd_make_char3(x, y, z); | ||
| 5305 | } | ||
| 5306 | |||
| 5307 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 5308 | * signed (twos-complement) integers. */ | ||
| 5309 | static inline SIMD_CPPFUNC char3 make_char3(char x, char2 yz) { | ||
| 5310 | return ::simd_make_char3(x, yz); | ||
| 5311 | } | ||
| 5312 | |||
| 5313 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 5314 | * signed (twos-complement) integers. */ | ||
| 5315 | static inline SIMD_CPPFUNC char3 make_char3(char2 xy, char z) { | ||
| 5316 | return ::simd_make_char3(xy, z); | ||
| 5317 | } | ||
| 5318 | |||
| 5319 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5320 | * 8-bit signed (twos-complement) integers. */ | ||
| 5321 | template <typename typeN> static SIMD_CPPFUNC char3 make_char3(typeN other) { | ||
| 5322 | return ::simd_make_char3(other); | ||
| 5323 | } | ||
| 5324 | |||
| 5325 | /*! @abstract Extends `other` to form a vector of three 8-bit signed (twos- | ||
| 5326 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5327 | * unspecified. */ | ||
| 5328 | template <typename typeN> static SIMD_CPPFUNC char3 make_char3_undef(typeN other) { | ||
| 5329 | return ::simd_make_char3_undef(other); | ||
| 5330 | } | ||
| 5331 | |||
| 5332 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5333 | * 8-bit signed (twos-complement) integers. */ | ||
| 5334 | static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char z, char w) { | ||
| 5335 | return ::simd_make_char4(x, y, z, w); | ||
| 5336 | } | ||
| 5337 | |||
| 5338 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 5339 | * signed (twos-complement) integers. */ | ||
| 5340 | static inline SIMD_CPPFUNC char4 make_char4(char x, char y, char2 zw) { | ||
| 5341 | return ::simd_make_char4(x, y, zw); | ||
| 5342 | } | ||
| 5343 | |||
| 5344 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 5345 | * signed (twos-complement) integers. */ | ||
| 5346 | static inline SIMD_CPPFUNC char4 make_char4(char x, char2 yz, char w) { | ||
| 5347 | return ::simd_make_char4(x, yz, w); | ||
| 5348 | } | ||
| 5349 | |||
| 5350 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 5351 | * signed (twos-complement) integers. */ | ||
| 5352 | static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char z, char w) { | ||
| 5353 | return ::simd_make_char4(xy, z, w); | ||
| 5354 | } | ||
| 5355 | |||
| 5356 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 5357 | * signed (twos-complement) integers. */ | ||
| 5358 | static inline SIMD_CPPFUNC char4 make_char4(char x, char3 yzw) { | ||
| 5359 | return ::simd_make_char4(x, yzw); | ||
| 5360 | } | ||
| 5361 | |||
| 5362 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 5363 | * signed (twos-complement) integers. */ | ||
| 5364 | static inline SIMD_CPPFUNC char4 make_char4(char2 xy, char2 zw) { | ||
| 5365 | return ::simd_make_char4(xy, zw); | ||
| 5366 | } | ||
| 5367 | |||
| 5368 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 5369 | * signed (twos-complement) integers. */ | ||
| 5370 | static inline SIMD_CPPFUNC char4 make_char4(char3 xyz, char w) { | ||
| 5371 | return ::simd_make_char4(xyz, w); | ||
| 5372 | } | ||
| 5373 | |||
| 5374 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5375 | * 8-bit signed (twos-complement) integers. */ | ||
| 5376 | template <typename typeN> static SIMD_CPPFUNC char4 make_char4(typeN other) { | ||
| 5377 | return ::simd_make_char4(other); | ||
| 5378 | } | ||
| 5379 | |||
| 5380 | /*! @abstract Extends `other` to form a vector of four 8-bit signed (twos- | ||
| 5381 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5382 | * unspecified. */ | ||
| 5383 | template <typename typeN> static SIMD_CPPFUNC char4 make_char4_undef(typeN other) { | ||
| 5384 | return ::simd_make_char4_undef(other); | ||
| 5385 | } | ||
| 5386 | |||
| 5387 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 5388 | * signed (twos-complement) integers. */ | ||
| 5389 | static inline SIMD_CPPFUNC char8 make_char8(char4 lo, char4 hi) { | ||
| 5390 | return ::simd_make_char8(lo, hi); | ||
| 5391 | } | ||
| 5392 | |||
| 5393 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5394 | * 8-bit signed (twos-complement) integers. */ | ||
| 5395 | template <typename typeN> static SIMD_CPPFUNC char8 make_char8(typeN other) { | ||
| 5396 | return ::simd_make_char8(other); | ||
| 5397 | } | ||
| 5398 | |||
| 5399 | /*! @abstract Extends `other` to form a vector of eight 8-bit signed (twos- | ||
| 5400 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5401 | * unspecified. */ | ||
| 5402 | template <typename typeN> static SIMD_CPPFUNC char8 make_char8_undef(typeN other) { | ||
| 5403 | return ::simd_make_char8_undef(other); | ||
| 5404 | } | ||
| 5405 | |||
| 5406 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 5407 | * signed (twos-complement) integers. */ | ||
| 5408 | static inline SIMD_CPPFUNC char16 make_char16(char8 lo, char8 hi) { | ||
| 5409 | return ::simd_make_char16(lo, hi); | ||
| 5410 | } | ||
| 5411 | |||
| 5412 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5413 | * 8-bit signed (twos-complement) integers. */ | ||
| 5414 | template <typename typeN> static SIMD_CPPFUNC char16 make_char16(typeN other) { | ||
| 5415 | return ::simd_make_char16(other); | ||
| 5416 | } | ||
| 5417 | |||
| 5418 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit signed | ||
| 5419 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5420 | * lanes are unspecified. */ | ||
| 5421 | template <typename typeN> static SIMD_CPPFUNC char16 make_char16_undef(typeN other) { | ||
| 5422 | return ::simd_make_char16_undef(other); | ||
| 5423 | } | ||
| 5424 | |||
| 5425 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5426 | * 8-bit signed (twos-complement) integers. */ | ||
| 5427 | static inline SIMD_CPPFUNC char32 make_char32(char16 lo, char16 hi) { | ||
| 5428 | return ::simd_make_char32(lo, hi); | ||
| 5429 | } | ||
| 5430 | |||
| 5431 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5432 | * two 8-bit signed (twos-complement) integers. */ | ||
| 5433 | template <typename typeN> static SIMD_CPPFUNC char32 make_char32(typeN other) { | ||
| 5434 | return ::simd_make_char32(other); | ||
| 5435 | } | ||
| 5436 | |||
| 5437 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit signed | ||
| 5438 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5439 | * lanes are unspecified. */ | ||
| 5440 | template <typename typeN> static SIMD_CPPFUNC char32 make_char32_undef(typeN other) { | ||
| 5441 | return ::simd_make_char32_undef(other); | ||
| 5442 | } | ||
| 5443 | |||
| 5444 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 5445 | * 8-bit signed (twos-complement) integers. */ | ||
| 5446 | static inline SIMD_CPPFUNC char64 make_char64(char32 lo, char32 hi) { | ||
| 5447 | return ::simd_make_char64(lo, hi); | ||
| 5448 | } | ||
| 5449 | |||
| 5450 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixty- | ||
| 5451 | * four 8-bit signed (twos-complement) integers. */ | ||
| 5452 | template <typename typeN> static SIMD_CPPFUNC char64 make_char64(typeN other) { | ||
| 5453 | return ::simd_make_char64(other); | ||
| 5454 | } | ||
| 5455 | |||
| 5456 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit signed | ||
| 5457 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5458 | * lanes are unspecified. */ | ||
| 5459 | template <typename typeN> static SIMD_CPPFUNC char64 make_char64_undef(typeN other) { | ||
| 5460 | return ::simd_make_char64_undef(other); | ||
| 5461 | } | ||
| 5462 | |||
| 5463 | /*! @abstract Concatenates `x` and `y` to form a vector of two 8-bit | ||
| 5464 | * unsigned integers. */ | ||
| 5465 | static inline SIMD_CPPFUNC uchar2 make_uchar2(unsigned char x, unsigned char y) { | ||
| 5466 | return ::simd_make_uchar2(x, y); | ||
| 5467 | } | ||
| 5468 | |||
| 5469 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5470 | * 8-bit unsigned integers. */ | ||
| 5471 | template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2(typeN other) { | ||
| 5472 | return ::simd_make_uchar2(other); | ||
| 5473 | } | ||
| 5474 | |||
| 5475 | /*! @abstract Extends `other` to form a vector of two 8-bit unsigned | ||
| 5476 | * integers. The contents of the newly-created vector lanes are | ||
| 5477 | * unspecified. */ | ||
| 5478 | template <typename typeN> static SIMD_CPPFUNC uchar2 make_uchar2_undef(typeN other) { | ||
| 5479 | return ::simd_make_uchar2_undef(other); | ||
| 5480 | } | ||
| 5481 | |||
| 5482 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 8-bit | ||
| 5483 | * unsigned integers. */ | ||
| 5484 | static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, unsigned char y, unsigned char z) { | ||
| 5485 | return ::simd_make_uchar3(x, y, z); | ||
| 5486 | } | ||
| 5487 | |||
| 5488 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 8-bit | ||
| 5489 | * unsigned integers. */ | ||
| 5490 | static inline SIMD_CPPFUNC uchar3 make_uchar3(unsigned char x, uchar2 yz) { | ||
| 5491 | return ::simd_make_uchar3(x, yz); | ||
| 5492 | } | ||
| 5493 | |||
| 5494 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 8-bit | ||
| 5495 | * unsigned integers. */ | ||
| 5496 | static inline SIMD_CPPFUNC uchar3 make_uchar3(uchar2 xy, unsigned char z) { | ||
| 5497 | return ::simd_make_uchar3(xy, z); | ||
| 5498 | } | ||
| 5499 | |||
| 5500 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5501 | * 8-bit unsigned integers. */ | ||
| 5502 | template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3(typeN other) { | ||
| 5503 | return ::simd_make_uchar3(other); | ||
| 5504 | } | ||
| 5505 | |||
| 5506 | /*! @abstract Extends `other` to form a vector of three 8-bit unsigned | ||
| 5507 | * integers. The contents of the newly-created vector lanes are | ||
| 5508 | * unspecified. */ | ||
| 5509 | template <typename typeN> static SIMD_CPPFUNC uchar3 make_uchar3_undef(typeN other) { | ||
| 5510 | return ::simd_make_uchar3_undef(other); | ||
| 5511 | } | ||
| 5512 | |||
| 5513 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5514 | * 8-bit unsigned integers. */ | ||
| 5515 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, unsigned char z, unsigned char w) { | ||
| 5516 | return ::simd_make_uchar4(x, y, z, w); | ||
| 5517 | } | ||
| 5518 | |||
| 5519 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 8-bit | ||
| 5520 | * unsigned integers. */ | ||
| 5521 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, unsigned char y, uchar2 zw) { | ||
| 5522 | return ::simd_make_uchar4(x, y, zw); | ||
| 5523 | } | ||
| 5524 | |||
| 5525 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 8-bit | ||
| 5526 | * unsigned integers. */ | ||
| 5527 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar2 yz, unsigned char w) { | ||
| 5528 | return ::simd_make_uchar4(x, yz, w); | ||
| 5529 | } | ||
| 5530 | |||
| 5531 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 8-bit | ||
| 5532 | * unsigned integers. */ | ||
| 5533 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, unsigned char z, unsigned char w) { | ||
| 5534 | return ::simd_make_uchar4(xy, z, w); | ||
| 5535 | } | ||
| 5536 | |||
| 5537 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 8-bit | ||
| 5538 | * unsigned integers. */ | ||
| 5539 | static inline SIMD_CPPFUNC uchar4 make_uchar4(unsigned char x, uchar3 yzw) { | ||
| 5540 | return ::simd_make_uchar4(x, yzw); | ||
| 5541 | } | ||
| 5542 | |||
| 5543 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 8-bit | ||
| 5544 | * unsigned integers. */ | ||
| 5545 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar2 xy, uchar2 zw) { | ||
| 5546 | return ::simd_make_uchar4(xy, zw); | ||
| 5547 | } | ||
| 5548 | |||
| 5549 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 8-bit | ||
| 5550 | * unsigned integers. */ | ||
| 5551 | static inline SIMD_CPPFUNC uchar4 make_uchar4(uchar3 xyz, unsigned char w) { | ||
| 5552 | return ::simd_make_uchar4(xyz, w); | ||
| 5553 | } | ||
| 5554 | |||
| 5555 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5556 | * 8-bit unsigned integers. */ | ||
| 5557 | template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4(typeN other) { | ||
| 5558 | return ::simd_make_uchar4(other); | ||
| 5559 | } | ||
| 5560 | |||
| 5561 | /*! @abstract Extends `other` to form a vector of four 8-bit unsigned | ||
| 5562 | * integers. The contents of the newly-created vector lanes are | ||
| 5563 | * unspecified. */ | ||
| 5564 | template <typename typeN> static SIMD_CPPFUNC uchar4 make_uchar4_undef(typeN other) { | ||
| 5565 | return ::simd_make_uchar4_undef(other); | ||
| 5566 | } | ||
| 5567 | |||
| 5568 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 8-bit | ||
| 5569 | * unsigned integers. */ | ||
| 5570 | static inline SIMD_CPPFUNC uchar8 make_uchar8(uchar4 lo, uchar4 hi) { | ||
| 5571 | return ::simd_make_uchar8(lo, hi); | ||
| 5572 | } | ||
| 5573 | |||
| 5574 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5575 | * 8-bit unsigned integers. */ | ||
| 5576 | template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8(typeN other) { | ||
| 5577 | return ::simd_make_uchar8(other); | ||
| 5578 | } | ||
| 5579 | |||
| 5580 | /*! @abstract Extends `other` to form a vector of eight 8-bit unsigned | ||
| 5581 | * integers. The contents of the newly-created vector lanes are | ||
| 5582 | * unspecified. */ | ||
| 5583 | template <typename typeN> static SIMD_CPPFUNC uchar8 make_uchar8_undef(typeN other) { | ||
| 5584 | return ::simd_make_uchar8_undef(other); | ||
| 5585 | } | ||
| 5586 | |||
| 5587 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 8-bit | ||
| 5588 | * unsigned integers. */ | ||
| 5589 | static inline SIMD_CPPFUNC uchar16 make_uchar16(uchar8 lo, uchar8 hi) { | ||
| 5590 | return ::simd_make_uchar16(lo, hi); | ||
| 5591 | } | ||
| 5592 | |||
| 5593 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5594 | * 8-bit unsigned integers. */ | ||
| 5595 | template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16(typeN other) { | ||
| 5596 | return ::simd_make_uchar16(other); | ||
| 5597 | } | ||
| 5598 | |||
| 5599 | /*! @abstract Extends `other` to form a vector of sixteen 8-bit unsigned | ||
| 5600 | * integers. The contents of the newly-created vector lanes are | ||
| 5601 | * unspecified. */ | ||
| 5602 | template <typename typeN> static SIMD_CPPFUNC uchar16 make_uchar16_undef(typeN other) { | ||
| 5603 | return ::simd_make_uchar16_undef(other); | ||
| 5604 | } | ||
| 5605 | |||
| 5606 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5607 | * 8-bit unsigned integers. */ | ||
| 5608 | static inline SIMD_CPPFUNC uchar32 make_uchar32(uchar16 lo, uchar16 hi) { | ||
| 5609 | return ::simd_make_uchar32(lo, hi); | ||
| 5610 | } | ||
| 5611 | |||
| 5612 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5613 | * two 8-bit unsigned integers. */ | ||
| 5614 | template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32(typeN other) { | ||
| 5615 | return ::simd_make_uchar32(other); | ||
| 5616 | } | ||
| 5617 | |||
| 5618 | /*! @abstract Extends `other` to form a vector of thirty-two 8-bit unsigned | ||
| 5619 | * integers. The contents of the newly-created vector lanes are | ||
| 5620 | * unspecified. */ | ||
| 5621 | template <typename typeN> static SIMD_CPPFUNC uchar32 make_uchar32_undef(typeN other) { | ||
| 5622 | return ::simd_make_uchar32_undef(other); | ||
| 5623 | } | ||
| 5624 | |||
| 5625 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixty-four | ||
| 5626 | * 8-bit unsigned integers. */ | ||
| 5627 | static inline SIMD_CPPFUNC uchar64 make_uchar64(uchar32 lo, uchar32 hi) { | ||
| 5628 | return ::simd_make_uchar64(lo, hi); | ||
| 5629 | } | ||
| 5630 | |||
| 5631 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixty- | ||
| 5632 | * four 8-bit unsigned integers. */ | ||
| 5633 | template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64(typeN other) { | ||
| 5634 | return ::simd_make_uchar64(other); | ||
| 5635 | } | ||
| 5636 | |||
| 5637 | /*! @abstract Extends `other` to form a vector of sixty-four 8-bit unsigned | ||
| 5638 | * integers. The contents of the newly-created vector lanes are | ||
| 5639 | * unspecified. */ | ||
| 5640 | template <typename typeN> static SIMD_CPPFUNC uchar64 make_uchar64_undef(typeN other) { | ||
| 5641 | return ::simd_make_uchar64_undef(other); | ||
| 5642 | } | ||
| 5643 | |||
| 5644 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit signed | ||
| 5645 | * (twos-complement) integers. */ | ||
| 5646 | static inline SIMD_CPPFUNC short2 make_short2(short x, short y) { | ||
| 5647 | return ::simd_make_short2(x, y); | ||
| 5648 | } | ||
| 5649 | |||
| 5650 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5651 | * 16-bit signed (twos-complement) integers. */ | ||
| 5652 | template <typename typeN> static SIMD_CPPFUNC short2 make_short2(typeN other) { | ||
| 5653 | return ::simd_make_short2(other); | ||
| 5654 | } | ||
| 5655 | |||
| 5656 | /*! @abstract Extends `other` to form a vector of two 16-bit signed (twos- | ||
| 5657 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5658 | * unspecified. */ | ||
| 5659 | template <typename typeN> static SIMD_CPPFUNC short2 make_short2_undef(typeN other) { | ||
| 5660 | return ::simd_make_short2_undef(other); | ||
| 5661 | } | ||
| 5662 | |||
| 5663 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 5664 | * signed (twos-complement) integers. */ | ||
| 5665 | static inline SIMD_CPPFUNC short3 make_short3(short x, short y, short z) { | ||
| 5666 | return ::simd_make_short3(x, y, z); | ||
| 5667 | } | ||
| 5668 | |||
| 5669 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 5670 | * signed (twos-complement) integers. */ | ||
| 5671 | static inline SIMD_CPPFUNC short3 make_short3(short x, short2 yz) { | ||
| 5672 | return ::simd_make_short3(x, yz); | ||
| 5673 | } | ||
| 5674 | |||
| 5675 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 5676 | * signed (twos-complement) integers. */ | ||
| 5677 | static inline SIMD_CPPFUNC short3 make_short3(short2 xy, short z) { | ||
| 5678 | return ::simd_make_short3(xy, z); | ||
| 5679 | } | ||
| 5680 | |||
| 5681 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5682 | * 16-bit signed (twos-complement) integers. */ | ||
| 5683 | template <typename typeN> static SIMD_CPPFUNC short3 make_short3(typeN other) { | ||
| 5684 | return ::simd_make_short3(other); | ||
| 5685 | } | ||
| 5686 | |||
| 5687 | /*! @abstract Extends `other` to form a vector of three 16-bit signed (twos- | ||
| 5688 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5689 | * unspecified. */ | ||
| 5690 | template <typename typeN> static SIMD_CPPFUNC short3 make_short3_undef(typeN other) { | ||
| 5691 | return ::simd_make_short3_undef(other); | ||
| 5692 | } | ||
| 5693 | |||
| 5694 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5695 | * 16-bit signed (twos-complement) integers. */ | ||
| 5696 | static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short z, short w) { | ||
| 5697 | return ::simd_make_short4(x, y, z, w); | ||
| 5698 | } | ||
| 5699 | |||
| 5700 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 5701 | * signed (twos-complement) integers. */ | ||
| 5702 | static inline SIMD_CPPFUNC short4 make_short4(short x, short y, short2 zw) { | ||
| 5703 | return ::simd_make_short4(x, y, zw); | ||
| 5704 | } | ||
| 5705 | |||
| 5706 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 5707 | * signed (twos-complement) integers. */ | ||
| 5708 | static inline SIMD_CPPFUNC short4 make_short4(short x, short2 yz, short w) { | ||
| 5709 | return ::simd_make_short4(x, yz, w); | ||
| 5710 | } | ||
| 5711 | |||
| 5712 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 5713 | * signed (twos-complement) integers. */ | ||
| 5714 | static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short z, short w) { | ||
| 5715 | return ::simd_make_short4(xy, z, w); | ||
| 5716 | } | ||
| 5717 | |||
| 5718 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 5719 | * signed (twos-complement) integers. */ | ||
| 5720 | static inline SIMD_CPPFUNC short4 make_short4(short x, short3 yzw) { | ||
| 5721 | return ::simd_make_short4(x, yzw); | ||
| 5722 | } | ||
| 5723 | |||
| 5724 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 5725 | * signed (twos-complement) integers. */ | ||
| 5726 | static inline SIMD_CPPFUNC short4 make_short4(short2 xy, short2 zw) { | ||
| 5727 | return ::simd_make_short4(xy, zw); | ||
| 5728 | } | ||
| 5729 | |||
| 5730 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 5731 | * signed (twos-complement) integers. */ | ||
| 5732 | static inline SIMD_CPPFUNC short4 make_short4(short3 xyz, short w) { | ||
| 5733 | return ::simd_make_short4(xyz, w); | ||
| 5734 | } | ||
| 5735 | |||
| 5736 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5737 | * 16-bit signed (twos-complement) integers. */ | ||
| 5738 | template <typename typeN> static SIMD_CPPFUNC short4 make_short4(typeN other) { | ||
| 5739 | return ::simd_make_short4(other); | ||
| 5740 | } | ||
| 5741 | |||
| 5742 | /*! @abstract Extends `other` to form a vector of four 16-bit signed (twos- | ||
| 5743 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5744 | * unspecified. */ | ||
| 5745 | template <typename typeN> static SIMD_CPPFUNC short4 make_short4_undef(typeN other) { | ||
| 5746 | return ::simd_make_short4_undef(other); | ||
| 5747 | } | ||
| 5748 | |||
| 5749 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 5750 | * signed (twos-complement) integers. */ | ||
| 5751 | static inline SIMD_CPPFUNC short8 make_short8(short4 lo, short4 hi) { | ||
| 5752 | return ::simd_make_short8(lo, hi); | ||
| 5753 | } | ||
| 5754 | |||
| 5755 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5756 | * 16-bit signed (twos-complement) integers. */ | ||
| 5757 | template <typename typeN> static SIMD_CPPFUNC short8 make_short8(typeN other) { | ||
| 5758 | return ::simd_make_short8(other); | ||
| 5759 | } | ||
| 5760 | |||
| 5761 | /*! @abstract Extends `other` to form a vector of eight 16-bit signed (twos- | ||
| 5762 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5763 | * unspecified. */ | ||
| 5764 | template <typename typeN> static SIMD_CPPFUNC short8 make_short8_undef(typeN other) { | ||
| 5765 | return ::simd_make_short8_undef(other); | ||
| 5766 | } | ||
| 5767 | |||
| 5768 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 5769 | * signed (twos-complement) integers. */ | ||
| 5770 | static inline SIMD_CPPFUNC short16 make_short16(short8 lo, short8 hi) { | ||
| 5771 | return ::simd_make_short16(lo, hi); | ||
| 5772 | } | ||
| 5773 | |||
| 5774 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5775 | * 16-bit signed (twos-complement) integers. */ | ||
| 5776 | template <typename typeN> static SIMD_CPPFUNC short16 make_short16(typeN other) { | ||
| 5777 | return ::simd_make_short16(other); | ||
| 5778 | } | ||
| 5779 | |||
| 5780 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit signed | ||
| 5781 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5782 | * lanes are unspecified. */ | ||
| 5783 | template <typename typeN> static SIMD_CPPFUNC short16 make_short16_undef(typeN other) { | ||
| 5784 | return ::simd_make_short16_undef(other); | ||
| 5785 | } | ||
| 5786 | |||
| 5787 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5788 | * 16-bit signed (twos-complement) integers. */ | ||
| 5789 | static inline SIMD_CPPFUNC short32 make_short32(short16 lo, short16 hi) { | ||
| 5790 | return ::simd_make_short32(lo, hi); | ||
| 5791 | } | ||
| 5792 | |||
| 5793 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5794 | * two 16-bit signed (twos-complement) integers. */ | ||
| 5795 | template <typename typeN> static SIMD_CPPFUNC short32 make_short32(typeN other) { | ||
| 5796 | return ::simd_make_short32(other); | ||
| 5797 | } | ||
| 5798 | |||
| 5799 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit signed | ||
| 5800 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 5801 | * lanes are unspecified. */ | ||
| 5802 | template <typename typeN> static SIMD_CPPFUNC short32 make_short32_undef(typeN other) { | ||
| 5803 | return ::simd_make_short32_undef(other); | ||
| 5804 | } | ||
| 5805 | |||
| 5806 | /*! @abstract Concatenates `x` and `y` to form a vector of two 16-bit | ||
| 5807 | * unsigned integers. */ | ||
| 5808 | static inline SIMD_CPPFUNC ushort2 make_ushort2(unsigned short x, unsigned short y) { | ||
| 5809 | return ::simd_make_ushort2(x, y); | ||
| 5810 | } | ||
| 5811 | |||
| 5812 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5813 | * 16-bit unsigned integers. */ | ||
| 5814 | template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2(typeN other) { | ||
| 5815 | return ::simd_make_ushort2(other); | ||
| 5816 | } | ||
| 5817 | |||
| 5818 | /*! @abstract Extends `other` to form a vector of two 16-bit unsigned | ||
| 5819 | * integers. The contents of the newly-created vector lanes are | ||
| 5820 | * unspecified. */ | ||
| 5821 | template <typename typeN> static SIMD_CPPFUNC ushort2 make_ushort2_undef(typeN other) { | ||
| 5822 | return ::simd_make_ushort2_undef(other); | ||
| 5823 | } | ||
| 5824 | |||
| 5825 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 16-bit | ||
| 5826 | * unsigned integers. */ | ||
| 5827 | static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, unsigned short y, unsigned short z) { | ||
| 5828 | return ::simd_make_ushort3(x, y, z); | ||
| 5829 | } | ||
| 5830 | |||
| 5831 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 16-bit | ||
| 5832 | * unsigned integers. */ | ||
| 5833 | static inline SIMD_CPPFUNC ushort3 make_ushort3(unsigned short x, ushort2 yz) { | ||
| 5834 | return ::simd_make_ushort3(x, yz); | ||
| 5835 | } | ||
| 5836 | |||
| 5837 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 16-bit | ||
| 5838 | * unsigned integers. */ | ||
| 5839 | static inline SIMD_CPPFUNC ushort3 make_ushort3(ushort2 xy, unsigned short z) { | ||
| 5840 | return ::simd_make_ushort3(xy, z); | ||
| 5841 | } | ||
| 5842 | |||
| 5843 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 5844 | * 16-bit unsigned integers. */ | ||
| 5845 | template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3(typeN other) { | ||
| 5846 | return ::simd_make_ushort3(other); | ||
| 5847 | } | ||
| 5848 | |||
| 5849 | /*! @abstract Extends `other` to form a vector of three 16-bit unsigned | ||
| 5850 | * integers. The contents of the newly-created vector lanes are | ||
| 5851 | * unspecified. */ | ||
| 5852 | template <typename typeN> static SIMD_CPPFUNC ushort3 make_ushort3_undef(typeN other) { | ||
| 5853 | return ::simd_make_ushort3_undef(other); | ||
| 5854 | } | ||
| 5855 | |||
| 5856 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 5857 | * 16-bit unsigned integers. */ | ||
| 5858 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, unsigned short z, unsigned short w) { | ||
| 5859 | return ::simd_make_ushort4(x, y, z, w); | ||
| 5860 | } | ||
| 5861 | |||
| 5862 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 16-bit | ||
| 5863 | * unsigned integers. */ | ||
| 5864 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, unsigned short y, ushort2 zw) { | ||
| 5865 | return ::simd_make_ushort4(x, y, zw); | ||
| 5866 | } | ||
| 5867 | |||
| 5868 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 16-bit | ||
| 5869 | * unsigned integers. */ | ||
| 5870 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort2 yz, unsigned short w) { | ||
| 5871 | return ::simd_make_ushort4(x, yz, w); | ||
| 5872 | } | ||
| 5873 | |||
| 5874 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 16-bit | ||
| 5875 | * unsigned integers. */ | ||
| 5876 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, unsigned short z, unsigned short w) { | ||
| 5877 | return ::simd_make_ushort4(xy, z, w); | ||
| 5878 | } | ||
| 5879 | |||
| 5880 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 16-bit | ||
| 5881 | * unsigned integers. */ | ||
| 5882 | static inline SIMD_CPPFUNC ushort4 make_ushort4(unsigned short x, ushort3 yzw) { | ||
| 5883 | return ::simd_make_ushort4(x, yzw); | ||
| 5884 | } | ||
| 5885 | |||
| 5886 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 16-bit | ||
| 5887 | * unsigned integers. */ | ||
| 5888 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort2 xy, ushort2 zw) { | ||
| 5889 | return ::simd_make_ushort4(xy, zw); | ||
| 5890 | } | ||
| 5891 | |||
| 5892 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 16-bit | ||
| 5893 | * unsigned integers. */ | ||
| 5894 | static inline SIMD_CPPFUNC ushort4 make_ushort4(ushort3 xyz, unsigned short w) { | ||
| 5895 | return ::simd_make_ushort4(xyz, w); | ||
| 5896 | } | ||
| 5897 | |||
| 5898 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 5899 | * 16-bit unsigned integers. */ | ||
| 5900 | template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4(typeN other) { | ||
| 5901 | return ::simd_make_ushort4(other); | ||
| 5902 | } | ||
| 5903 | |||
| 5904 | /*! @abstract Extends `other` to form a vector of four 16-bit unsigned | ||
| 5905 | * integers. The contents of the newly-created vector lanes are | ||
| 5906 | * unspecified. */ | ||
| 5907 | template <typename typeN> static SIMD_CPPFUNC ushort4 make_ushort4_undef(typeN other) { | ||
| 5908 | return ::simd_make_ushort4_undef(other); | ||
| 5909 | } | ||
| 5910 | |||
| 5911 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 16-bit | ||
| 5912 | * unsigned integers. */ | ||
| 5913 | static inline SIMD_CPPFUNC ushort8 make_ushort8(ushort4 lo, ushort4 hi) { | ||
| 5914 | return ::simd_make_ushort8(lo, hi); | ||
| 5915 | } | ||
| 5916 | |||
| 5917 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 5918 | * 16-bit unsigned integers. */ | ||
| 5919 | template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8(typeN other) { | ||
| 5920 | return ::simd_make_ushort8(other); | ||
| 5921 | } | ||
| 5922 | |||
| 5923 | /*! @abstract Extends `other` to form a vector of eight 16-bit unsigned | ||
| 5924 | * integers. The contents of the newly-created vector lanes are | ||
| 5925 | * unspecified. */ | ||
| 5926 | template <typename typeN> static SIMD_CPPFUNC ushort8 make_ushort8_undef(typeN other) { | ||
| 5927 | return ::simd_make_ushort8_undef(other); | ||
| 5928 | } | ||
| 5929 | |||
| 5930 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 16-bit | ||
| 5931 | * unsigned integers. */ | ||
| 5932 | static inline SIMD_CPPFUNC ushort16 make_ushort16(ushort8 lo, ushort8 hi) { | ||
| 5933 | return ::simd_make_ushort16(lo, hi); | ||
| 5934 | } | ||
| 5935 | |||
| 5936 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 5937 | * 16-bit unsigned integers. */ | ||
| 5938 | template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16(typeN other) { | ||
| 5939 | return ::simd_make_ushort16(other); | ||
| 5940 | } | ||
| 5941 | |||
| 5942 | /*! @abstract Extends `other` to form a vector of sixteen 16-bit unsigned | ||
| 5943 | * integers. The contents of the newly-created vector lanes are | ||
| 5944 | * unspecified. */ | ||
| 5945 | template <typename typeN> static SIMD_CPPFUNC ushort16 make_ushort16_undef(typeN other) { | ||
| 5946 | return ::simd_make_ushort16_undef(other); | ||
| 5947 | } | ||
| 5948 | |||
| 5949 | /*! @abstract Concatenates `lo` and `hi` to form a vector of thirty-two | ||
| 5950 | * 16-bit unsigned integers. */ | ||
| 5951 | static inline SIMD_CPPFUNC ushort32 make_ushort32(ushort16 lo, ushort16 hi) { | ||
| 5952 | return ::simd_make_ushort32(lo, hi); | ||
| 5953 | } | ||
| 5954 | |||
| 5955 | /*! @abstract Truncates or zero-extends `other` to form a vector of thirty- | ||
| 5956 | * two 16-bit unsigned integers. */ | ||
| 5957 | template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32(typeN other) { | ||
| 5958 | return ::simd_make_ushort32(other); | ||
| 5959 | } | ||
| 5960 | |||
| 5961 | /*! @abstract Extends `other` to form a vector of thirty-two 16-bit unsigned | ||
| 5962 | * integers. The contents of the newly-created vector lanes are | ||
| 5963 | * unspecified. */ | ||
| 5964 | template <typename typeN> static SIMD_CPPFUNC ushort32 make_ushort32_undef(typeN other) { | ||
| 5965 | return ::simd_make_ushort32_undef(other); | ||
| 5966 | } | ||
| 5967 | |||
| 5968 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit signed | ||
| 5969 | * (twos-complement) integers. */ | ||
| 5970 | static inline SIMD_CPPFUNC int2 make_int2(int x, int y) { | ||
| 5971 | return ::simd_make_int2(x, y); | ||
| 5972 | } | ||
| 5973 | |||
| 5974 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 5975 | * 32-bit signed (twos-complement) integers. */ | ||
| 5976 | template <typename typeN> static SIMD_CPPFUNC int2 make_int2(typeN other) { | ||
| 5977 | return ::simd_make_int2(other); | ||
| 5978 | } | ||
| 5979 | |||
| 5980 | /*! @abstract Extends `other` to form a vector of two 32-bit signed (twos- | ||
| 5981 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 5982 | * unspecified. */ | ||
| 5983 | template <typename typeN> static SIMD_CPPFUNC int2 make_int2_undef(typeN other) { | ||
| 5984 | return ::simd_make_int2_undef(other); | ||
| 5985 | } | ||
| 5986 | |||
| 5987 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 5988 | * signed (twos-complement) integers. */ | ||
| 5989 | static inline SIMD_CPPFUNC int3 make_int3(int x, int y, int z) { | ||
| 5990 | return ::simd_make_int3(x, y, z); | ||
| 5991 | } | ||
| 5992 | |||
| 5993 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 5994 | * signed (twos-complement) integers. */ | ||
| 5995 | static inline SIMD_CPPFUNC int3 make_int3(int x, int2 yz) { | ||
| 5996 | return ::simd_make_int3(x, yz); | ||
| 5997 | } | ||
| 5998 | |||
| 5999 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6000 | * signed (twos-complement) integers. */ | ||
| 6001 | static inline SIMD_CPPFUNC int3 make_int3(int2 xy, int z) { | ||
| 6002 | return ::simd_make_int3(xy, z); | ||
| 6003 | } | ||
| 6004 | |||
| 6005 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6006 | * 32-bit signed (twos-complement) integers. */ | ||
| 6007 | template <typename typeN> static SIMD_CPPFUNC int3 make_int3(typeN other) { | ||
| 6008 | return ::simd_make_int3(other); | ||
| 6009 | } | ||
| 6010 | |||
| 6011 | /*! @abstract Extends `other` to form a vector of three 32-bit signed (twos- | ||
| 6012 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6013 | * unspecified. */ | ||
| 6014 | template <typename typeN> static SIMD_CPPFUNC int3 make_int3_undef(typeN other) { | ||
| 6015 | return ::simd_make_int3_undef(other); | ||
| 6016 | } | ||
| 6017 | |||
| 6018 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6019 | * 32-bit signed (twos-complement) integers. */ | ||
| 6020 | static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int z, int w) { | ||
| 6021 | return ::simd_make_int4(x, y, z, w); | ||
| 6022 | } | ||
| 6023 | |||
| 6024 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6025 | * signed (twos-complement) integers. */ | ||
| 6026 | static inline SIMD_CPPFUNC int4 make_int4(int x, int y, int2 zw) { | ||
| 6027 | return ::simd_make_int4(x, y, zw); | ||
| 6028 | } | ||
| 6029 | |||
| 6030 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6031 | * signed (twos-complement) integers. */ | ||
| 6032 | static inline SIMD_CPPFUNC int4 make_int4(int x, int2 yz, int w) { | ||
| 6033 | return ::simd_make_int4(x, yz, w); | ||
| 6034 | } | ||
| 6035 | |||
| 6036 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6037 | * signed (twos-complement) integers. */ | ||
| 6038 | static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int z, int w) { | ||
| 6039 | return ::simd_make_int4(xy, z, w); | ||
| 6040 | } | ||
| 6041 | |||
| 6042 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6043 | * signed (twos-complement) integers. */ | ||
| 6044 | static inline SIMD_CPPFUNC int4 make_int4(int x, int3 yzw) { | ||
| 6045 | return ::simd_make_int4(x, yzw); | ||
| 6046 | } | ||
| 6047 | |||
| 6048 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6049 | * signed (twos-complement) integers. */ | ||
| 6050 | static inline SIMD_CPPFUNC int4 make_int4(int2 xy, int2 zw) { | ||
| 6051 | return ::simd_make_int4(xy, zw); | ||
| 6052 | } | ||
| 6053 | |||
| 6054 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6055 | * signed (twos-complement) integers. */ | ||
| 6056 | static inline SIMD_CPPFUNC int4 make_int4(int3 xyz, int w) { | ||
| 6057 | return ::simd_make_int4(xyz, w); | ||
| 6058 | } | ||
| 6059 | |||
| 6060 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6061 | * 32-bit signed (twos-complement) integers. */ | ||
| 6062 | template <typename typeN> static SIMD_CPPFUNC int4 make_int4(typeN other) { | ||
| 6063 | return ::simd_make_int4(other); | ||
| 6064 | } | ||
| 6065 | |||
| 6066 | /*! @abstract Extends `other` to form a vector of four 32-bit signed (twos- | ||
| 6067 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6068 | * unspecified. */ | ||
| 6069 | template <typename typeN> static SIMD_CPPFUNC int4 make_int4_undef(typeN other) { | ||
| 6070 | return ::simd_make_int4_undef(other); | ||
| 6071 | } | ||
| 6072 | |||
| 6073 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6074 | * signed (twos-complement) integers. */ | ||
| 6075 | static inline SIMD_CPPFUNC int8 make_int8(int4 lo, int4 hi) { | ||
| 6076 | return ::simd_make_int8(lo, hi); | ||
| 6077 | } | ||
| 6078 | |||
| 6079 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6080 | * 32-bit signed (twos-complement) integers. */ | ||
| 6081 | template <typename typeN> static SIMD_CPPFUNC int8 make_int8(typeN other) { | ||
| 6082 | return ::simd_make_int8(other); | ||
| 6083 | } | ||
| 6084 | |||
| 6085 | /*! @abstract Extends `other` to form a vector of eight 32-bit signed (twos- | ||
| 6086 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6087 | * unspecified. */ | ||
| 6088 | template <typename typeN> static SIMD_CPPFUNC int8 make_int8_undef(typeN other) { | ||
| 6089 | return ::simd_make_int8_undef(other); | ||
| 6090 | } | ||
| 6091 | |||
| 6092 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6093 | * signed (twos-complement) integers. */ | ||
| 6094 | static inline SIMD_CPPFUNC int16 make_int16(int8 lo, int8 hi) { | ||
| 6095 | return ::simd_make_int16(lo, hi); | ||
| 6096 | } | ||
| 6097 | |||
| 6098 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6099 | * 32-bit signed (twos-complement) integers. */ | ||
| 6100 | template <typename typeN> static SIMD_CPPFUNC int16 make_int16(typeN other) { | ||
| 6101 | return ::simd_make_int16(other); | ||
| 6102 | } | ||
| 6103 | |||
| 6104 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit signed | ||
| 6105 | * (twos-complement) integers. The contents of the newly-created vector | ||
| 6106 | * lanes are unspecified. */ | ||
| 6107 | template <typename typeN> static SIMD_CPPFUNC int16 make_int16_undef(typeN other) { | ||
| 6108 | return ::simd_make_int16_undef(other); | ||
| 6109 | } | ||
| 6110 | |||
| 6111 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 6112 | * unsigned integers. */ | ||
| 6113 | static inline SIMD_CPPFUNC uint2 make_uint2(unsigned int x, unsigned int y) { | ||
| 6114 | return ::simd_make_uint2(x, y); | ||
| 6115 | } | ||
| 6116 | |||
| 6117 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6118 | * 32-bit unsigned integers. */ | ||
| 6119 | template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2(typeN other) { | ||
| 6120 | return ::simd_make_uint2(other); | ||
| 6121 | } | ||
| 6122 | |||
| 6123 | /*! @abstract Extends `other` to form a vector of two 32-bit unsigned | ||
| 6124 | * integers. The contents of the newly-created vector lanes are | ||
| 6125 | * unspecified. */ | ||
| 6126 | template <typename typeN> static SIMD_CPPFUNC uint2 make_uint2_undef(typeN other) { | ||
| 6127 | return ::simd_make_uint2_undef(other); | ||
| 6128 | } | ||
| 6129 | |||
| 6130 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 6131 | * unsigned integers. */ | ||
| 6132 | static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, unsigned int y, unsigned int z) { | ||
| 6133 | return ::simd_make_uint3(x, y, z); | ||
| 6134 | } | ||
| 6135 | |||
| 6136 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 6137 | * unsigned integers. */ | ||
| 6138 | static inline SIMD_CPPFUNC uint3 make_uint3(unsigned int x, uint2 yz) { | ||
| 6139 | return ::simd_make_uint3(x, yz); | ||
| 6140 | } | ||
| 6141 | |||
| 6142 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6143 | * unsigned integers. */ | ||
| 6144 | static inline SIMD_CPPFUNC uint3 make_uint3(uint2 xy, unsigned int z) { | ||
| 6145 | return ::simd_make_uint3(xy, z); | ||
| 6146 | } | ||
| 6147 | |||
| 6148 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6149 | * 32-bit unsigned integers. */ | ||
| 6150 | template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3(typeN other) { | ||
| 6151 | return ::simd_make_uint3(other); | ||
| 6152 | } | ||
| 6153 | |||
| 6154 | /*! @abstract Extends `other` to form a vector of three 32-bit unsigned | ||
| 6155 | * integers. The contents of the newly-created vector lanes are | ||
| 6156 | * unspecified. */ | ||
| 6157 | template <typename typeN> static SIMD_CPPFUNC uint3 make_uint3_undef(typeN other) { | ||
| 6158 | return ::simd_make_uint3_undef(other); | ||
| 6159 | } | ||
| 6160 | |||
| 6161 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6162 | * 32-bit unsigned integers. */ | ||
| 6163 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, unsigned int z, unsigned int w) { | ||
| 6164 | return ::simd_make_uint4(x, y, z, w); | ||
| 6165 | } | ||
| 6166 | |||
| 6167 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6168 | * unsigned integers. */ | ||
| 6169 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, unsigned int y, uint2 zw) { | ||
| 6170 | return ::simd_make_uint4(x, y, zw); | ||
| 6171 | } | ||
| 6172 | |||
| 6173 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6174 | * unsigned integers. */ | ||
| 6175 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint2 yz, unsigned int w) { | ||
| 6176 | return ::simd_make_uint4(x, yz, w); | ||
| 6177 | } | ||
| 6178 | |||
| 6179 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6180 | * unsigned integers. */ | ||
| 6181 | static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, unsigned int z, unsigned int w) { | ||
| 6182 | return ::simd_make_uint4(xy, z, w); | ||
| 6183 | } | ||
| 6184 | |||
| 6185 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6186 | * unsigned integers. */ | ||
| 6187 | static inline SIMD_CPPFUNC uint4 make_uint4(unsigned int x, uint3 yzw) { | ||
| 6188 | return ::simd_make_uint4(x, yzw); | ||
| 6189 | } | ||
| 6190 | |||
| 6191 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6192 | * unsigned integers. */ | ||
| 6193 | static inline SIMD_CPPFUNC uint4 make_uint4(uint2 xy, uint2 zw) { | ||
| 6194 | return ::simd_make_uint4(xy, zw); | ||
| 6195 | } | ||
| 6196 | |||
| 6197 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6198 | * unsigned integers. */ | ||
| 6199 | static inline SIMD_CPPFUNC uint4 make_uint4(uint3 xyz, unsigned int w) { | ||
| 6200 | return ::simd_make_uint4(xyz, w); | ||
| 6201 | } | ||
| 6202 | |||
| 6203 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6204 | * 32-bit unsigned integers. */ | ||
| 6205 | template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4(typeN other) { | ||
| 6206 | return ::simd_make_uint4(other); | ||
| 6207 | } | ||
| 6208 | |||
| 6209 | /*! @abstract Extends `other` to form a vector of four 32-bit unsigned | ||
| 6210 | * integers. The contents of the newly-created vector lanes are | ||
| 6211 | * unspecified. */ | ||
| 6212 | template <typename typeN> static SIMD_CPPFUNC uint4 make_uint4_undef(typeN other) { | ||
| 6213 | return ::simd_make_uint4_undef(other); | ||
| 6214 | } | ||
| 6215 | |||
| 6216 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6217 | * unsigned integers. */ | ||
| 6218 | static inline SIMD_CPPFUNC uint8 make_uint8(uint4 lo, uint4 hi) { | ||
| 6219 | return ::simd_make_uint8(lo, hi); | ||
| 6220 | } | ||
| 6221 | |||
| 6222 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6223 | * 32-bit unsigned integers. */ | ||
| 6224 | template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8(typeN other) { | ||
| 6225 | return ::simd_make_uint8(other); | ||
| 6226 | } | ||
| 6227 | |||
| 6228 | /*! @abstract Extends `other` to form a vector of eight 32-bit unsigned | ||
| 6229 | * integers. The contents of the newly-created vector lanes are | ||
| 6230 | * unspecified. */ | ||
| 6231 | template <typename typeN> static SIMD_CPPFUNC uint8 make_uint8_undef(typeN other) { | ||
| 6232 | return ::simd_make_uint8_undef(other); | ||
| 6233 | } | ||
| 6234 | |||
| 6235 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6236 | * unsigned integers. */ | ||
| 6237 | static inline SIMD_CPPFUNC uint16 make_uint16(uint8 lo, uint8 hi) { | ||
| 6238 | return ::simd_make_uint16(lo, hi); | ||
| 6239 | } | ||
| 6240 | |||
| 6241 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6242 | * 32-bit unsigned integers. */ | ||
| 6243 | template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16(typeN other) { | ||
| 6244 | return ::simd_make_uint16(other); | ||
| 6245 | } | ||
| 6246 | |||
| 6247 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit unsigned | ||
| 6248 | * integers. The contents of the newly-created vector lanes are | ||
| 6249 | * unspecified. */ | ||
| 6250 | template <typename typeN> static SIMD_CPPFUNC uint16 make_uint16_undef(typeN other) { | ||
| 6251 | return ::simd_make_uint16_undef(other); | ||
| 6252 | } | ||
| 6253 | |||
| 6254 | /*! @abstract Concatenates `x` and `y` to form a vector of two 32-bit | ||
| 6255 | * floating-point numbers. */ | ||
| 6256 | static inline SIMD_CPPFUNC float2 make_float2(float x, float y) { | ||
| 6257 | return ::simd_make_float2(x, y); | ||
| 6258 | } | ||
| 6259 | |||
| 6260 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6261 | * 32-bit floating-point numbers. */ | ||
| 6262 | template <typename typeN> static SIMD_CPPFUNC float2 make_float2(typeN other) { | ||
| 6263 | return ::simd_make_float2(other); | ||
| 6264 | } | ||
| 6265 | |||
| 6266 | /*! @abstract Extends `other` to form a vector of two 32-bit floating-point | ||
| 6267 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6268 | template <typename typeN> static SIMD_CPPFUNC float2 make_float2_undef(typeN other) { | ||
| 6269 | return ::simd_make_float2_undef(other); | ||
| 6270 | } | ||
| 6271 | |||
| 6272 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 32-bit | ||
| 6273 | * floating-point numbers. */ | ||
| 6274 | static inline SIMD_CPPFUNC float3 make_float3(float x, float y, float z) { | ||
| 6275 | return ::simd_make_float3(x, y, z); | ||
| 6276 | } | ||
| 6277 | |||
| 6278 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 32-bit | ||
| 6279 | * floating-point numbers. */ | ||
| 6280 | static inline SIMD_CPPFUNC float3 make_float3(float x, float2 yz) { | ||
| 6281 | return ::simd_make_float3(x, yz); | ||
| 6282 | } | ||
| 6283 | |||
| 6284 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 32-bit | ||
| 6285 | * floating-point numbers. */ | ||
| 6286 | static inline SIMD_CPPFUNC float3 make_float3(float2 xy, float z) { | ||
| 6287 | return ::simd_make_float3(xy, z); | ||
| 6288 | } | ||
| 6289 | |||
| 6290 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6291 | * 32-bit floating-point numbers. */ | ||
| 6292 | template <typename typeN> static SIMD_CPPFUNC float3 make_float3(typeN other) { | ||
| 6293 | return ::simd_make_float3(other); | ||
| 6294 | } | ||
| 6295 | |||
| 6296 | /*! @abstract Extends `other` to form a vector of three 32-bit floating- | ||
| 6297 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6298 | * unspecified. */ | ||
| 6299 | template <typename typeN> static SIMD_CPPFUNC float3 make_float3_undef(typeN other) { | ||
| 6300 | return ::simd_make_float3_undef(other); | ||
| 6301 | } | ||
| 6302 | |||
| 6303 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6304 | * 32-bit floating-point numbers. */ | ||
| 6305 | static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float z, float w) { | ||
| 6306 | return ::simd_make_float4(x, y, z, w); | ||
| 6307 | } | ||
| 6308 | |||
| 6309 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 32-bit | ||
| 6310 | * floating-point numbers. */ | ||
| 6311 | static inline SIMD_CPPFUNC float4 make_float4(float x, float y, float2 zw) { | ||
| 6312 | return ::simd_make_float4(x, y, zw); | ||
| 6313 | } | ||
| 6314 | |||
| 6315 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 32-bit | ||
| 6316 | * floating-point numbers. */ | ||
| 6317 | static inline SIMD_CPPFUNC float4 make_float4(float x, float2 yz, float w) { | ||
| 6318 | return ::simd_make_float4(x, yz, w); | ||
| 6319 | } | ||
| 6320 | |||
| 6321 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 32-bit | ||
| 6322 | * floating-point numbers. */ | ||
| 6323 | static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float z, float w) { | ||
| 6324 | return ::simd_make_float4(xy, z, w); | ||
| 6325 | } | ||
| 6326 | |||
| 6327 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 32-bit | ||
| 6328 | * floating-point numbers. */ | ||
| 6329 | static inline SIMD_CPPFUNC float4 make_float4(float x, float3 yzw) { | ||
| 6330 | return ::simd_make_float4(x, yzw); | ||
| 6331 | } | ||
| 6332 | |||
| 6333 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 32-bit | ||
| 6334 | * floating-point numbers. */ | ||
| 6335 | static inline SIMD_CPPFUNC float4 make_float4(float2 xy, float2 zw) { | ||
| 6336 | return ::simd_make_float4(xy, zw); | ||
| 6337 | } | ||
| 6338 | |||
| 6339 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 32-bit | ||
| 6340 | * floating-point numbers. */ | ||
| 6341 | static inline SIMD_CPPFUNC float4 make_float4(float3 xyz, float w) { | ||
| 6342 | return ::simd_make_float4(xyz, w); | ||
| 6343 | } | ||
| 6344 | |||
| 6345 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6346 | * 32-bit floating-point numbers. */ | ||
| 6347 | template <typename typeN> static SIMD_CPPFUNC float4 make_float4(typeN other) { | ||
| 6348 | return ::simd_make_float4(other); | ||
| 6349 | } | ||
| 6350 | |||
| 6351 | /*! @abstract Extends `other` to form a vector of four 32-bit floating-point | ||
| 6352 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6353 | template <typename typeN> static SIMD_CPPFUNC float4 make_float4_undef(typeN other) { | ||
| 6354 | return ::simd_make_float4_undef(other); | ||
| 6355 | } | ||
| 6356 | |||
| 6357 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 32-bit | ||
| 6358 | * floating-point numbers. */ | ||
| 6359 | static inline SIMD_CPPFUNC float8 make_float8(float4 lo, float4 hi) { | ||
| 6360 | return ::simd_make_float8(lo, hi); | ||
| 6361 | } | ||
| 6362 | |||
| 6363 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6364 | * 32-bit floating-point numbers. */ | ||
| 6365 | template <typename typeN> static SIMD_CPPFUNC float8 make_float8(typeN other) { | ||
| 6366 | return ::simd_make_float8(other); | ||
| 6367 | } | ||
| 6368 | |||
| 6369 | /*! @abstract Extends `other` to form a vector of eight 32-bit floating- | ||
| 6370 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6371 | * unspecified. */ | ||
| 6372 | template <typename typeN> static SIMD_CPPFUNC float8 make_float8_undef(typeN other) { | ||
| 6373 | return ::simd_make_float8_undef(other); | ||
| 6374 | } | ||
| 6375 | |||
| 6376 | /*! @abstract Concatenates `lo` and `hi` to form a vector of sixteen 32-bit | ||
| 6377 | * floating-point numbers. */ | ||
| 6378 | static inline SIMD_CPPFUNC float16 make_float16(float8 lo, float8 hi) { | ||
| 6379 | return ::simd_make_float16(lo, hi); | ||
| 6380 | } | ||
| 6381 | |||
| 6382 | /*! @abstract Truncates or zero-extends `other` to form a vector of sixteen | ||
| 6383 | * 32-bit floating-point numbers. */ | ||
| 6384 | template <typename typeN> static SIMD_CPPFUNC float16 make_float16(typeN other) { | ||
| 6385 | return ::simd_make_float16(other); | ||
| 6386 | } | ||
| 6387 | |||
| 6388 | /*! @abstract Extends `other` to form a vector of sixteen 32-bit floating- | ||
| 6389 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6390 | * unspecified. */ | ||
| 6391 | template <typename typeN> static SIMD_CPPFUNC float16 make_float16_undef(typeN other) { | ||
| 6392 | return ::simd_make_float16_undef(other); | ||
| 6393 | } | ||
| 6394 | |||
| 6395 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit signed | ||
| 6396 | * (twos-complement) integers. */ | ||
| 6397 | static inline SIMD_CPPFUNC long2 make_long2(long1 x, long1 y) { | ||
| 6398 | return ::simd_make_long2(x, y); | ||
| 6399 | } | ||
| 6400 | |||
| 6401 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6402 | * 64-bit signed (twos-complement) integers. */ | ||
| 6403 | template <typename typeN> static SIMD_CPPFUNC long2 make_long2(typeN other) { | ||
| 6404 | return ::simd_make_long2(other); | ||
| 6405 | } | ||
| 6406 | |||
| 6407 | /*! @abstract Extends `other` to form a vector of two 64-bit signed (twos- | ||
| 6408 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6409 | * unspecified. */ | ||
| 6410 | template <typename typeN> static SIMD_CPPFUNC long2 make_long2_undef(typeN other) { | ||
| 6411 | return ::simd_make_long2_undef(other); | ||
| 6412 | } | ||
| 6413 | |||
| 6414 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6415 | * signed (twos-complement) integers. */ | ||
| 6416 | static inline SIMD_CPPFUNC long3 make_long3(long1 x, long1 y, long1 z) { | ||
| 6417 | return ::simd_make_long3(x, y, z); | ||
| 6418 | } | ||
| 6419 | |||
| 6420 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6421 | * signed (twos-complement) integers. */ | ||
| 6422 | static inline SIMD_CPPFUNC long3 make_long3(long1 x, long2 yz) { | ||
| 6423 | return ::simd_make_long3(x, yz); | ||
| 6424 | } | ||
| 6425 | |||
| 6426 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6427 | * signed (twos-complement) integers. */ | ||
| 6428 | static inline SIMD_CPPFUNC long3 make_long3(long2 xy, long1 z) { | ||
| 6429 | return ::simd_make_long3(xy, z); | ||
| 6430 | } | ||
| 6431 | |||
| 6432 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6433 | * 64-bit signed (twos-complement) integers. */ | ||
| 6434 | template <typename typeN> static SIMD_CPPFUNC long3 make_long3(typeN other) { | ||
| 6435 | return ::simd_make_long3(other); | ||
| 6436 | } | ||
| 6437 | |||
| 6438 | /*! @abstract Extends `other` to form a vector of three 64-bit signed (twos- | ||
| 6439 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6440 | * unspecified. */ | ||
| 6441 | template <typename typeN> static SIMD_CPPFUNC long3 make_long3_undef(typeN other) { | ||
| 6442 | return ::simd_make_long3_undef(other); | ||
| 6443 | } | ||
| 6444 | |||
| 6445 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6446 | * 64-bit signed (twos-complement) integers. */ | ||
| 6447 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long1 z, long1 w) { | ||
| 6448 | return ::simd_make_long4(x, y, z, w); | ||
| 6449 | } | ||
| 6450 | |||
| 6451 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6452 | * signed (twos-complement) integers. */ | ||
| 6453 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long1 y, long2 zw) { | ||
| 6454 | return ::simd_make_long4(x, y, zw); | ||
| 6455 | } | ||
| 6456 | |||
| 6457 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6458 | * signed (twos-complement) integers. */ | ||
| 6459 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long2 yz, long1 w) { | ||
| 6460 | return ::simd_make_long4(x, yz, w); | ||
| 6461 | } | ||
| 6462 | |||
| 6463 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6464 | * signed (twos-complement) integers. */ | ||
| 6465 | static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long1 z, long1 w) { | ||
| 6466 | return ::simd_make_long4(xy, z, w); | ||
| 6467 | } | ||
| 6468 | |||
| 6469 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6470 | * signed (twos-complement) integers. */ | ||
| 6471 | static inline SIMD_CPPFUNC long4 make_long4(long1 x, long3 yzw) { | ||
| 6472 | return ::simd_make_long4(x, yzw); | ||
| 6473 | } | ||
| 6474 | |||
| 6475 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6476 | * signed (twos-complement) integers. */ | ||
| 6477 | static inline SIMD_CPPFUNC long4 make_long4(long2 xy, long2 zw) { | ||
| 6478 | return ::simd_make_long4(xy, zw); | ||
| 6479 | } | ||
| 6480 | |||
| 6481 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6482 | * signed (twos-complement) integers. */ | ||
| 6483 | static inline SIMD_CPPFUNC long4 make_long4(long3 xyz, long1 w) { | ||
| 6484 | return ::simd_make_long4(xyz, w); | ||
| 6485 | } | ||
| 6486 | |||
| 6487 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6488 | * 64-bit signed (twos-complement) integers. */ | ||
| 6489 | template <typename typeN> static SIMD_CPPFUNC long4 make_long4(typeN other) { | ||
| 6490 | return ::simd_make_long4(other); | ||
| 6491 | } | ||
| 6492 | |||
| 6493 | /*! @abstract Extends `other` to form a vector of four 64-bit signed (twos- | ||
| 6494 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6495 | * unspecified. */ | ||
| 6496 | template <typename typeN> static SIMD_CPPFUNC long4 make_long4_undef(typeN other) { | ||
| 6497 | return ::simd_make_long4_undef(other); | ||
| 6498 | } | ||
| 6499 | |||
| 6500 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6501 | * signed (twos-complement) integers. */ | ||
| 6502 | static inline SIMD_CPPFUNC long8 make_long8(long4 lo, long4 hi) { | ||
| 6503 | return ::simd_make_long8(lo, hi); | ||
| 6504 | } | ||
| 6505 | |||
| 6506 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6507 | * 64-bit signed (twos-complement) integers. */ | ||
| 6508 | template <typename typeN> static SIMD_CPPFUNC long8 make_long8(typeN other) { | ||
| 6509 | return ::simd_make_long8(other); | ||
| 6510 | } | ||
| 6511 | |||
| 6512 | /*! @abstract Extends `other` to form a vector of eight 64-bit signed (twos- | ||
| 6513 | * complement) integers. The contents of the newly-created vector lanes are | ||
| 6514 | * unspecified. */ | ||
| 6515 | template <typename typeN> static SIMD_CPPFUNC long8 make_long8_undef(typeN other) { | ||
| 6516 | return ::simd_make_long8_undef(other); | ||
| 6517 | } | ||
| 6518 | |||
| 6519 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 6520 | * unsigned integers. */ | ||
| 6521 | static inline SIMD_CPPFUNC ulong2 make_ulong2(ulong1 x, ulong1 y) { | ||
| 6522 | return ::simd_make_ulong2(x, y); | ||
| 6523 | } | ||
| 6524 | |||
| 6525 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6526 | * 64-bit unsigned integers. */ | ||
| 6527 | template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2(typeN other) { | ||
| 6528 | return ::simd_make_ulong2(other); | ||
| 6529 | } | ||
| 6530 | |||
| 6531 | /*! @abstract Extends `other` to form a vector of two 64-bit unsigned | ||
| 6532 | * integers. The contents of the newly-created vector lanes are | ||
| 6533 | * unspecified. */ | ||
| 6534 | template <typename typeN> static SIMD_CPPFUNC ulong2 make_ulong2_undef(typeN other) { | ||
| 6535 | return ::simd_make_ulong2_undef(other); | ||
| 6536 | } | ||
| 6537 | |||
| 6538 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6539 | * unsigned integers. */ | ||
| 6540 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong1 y, ulong1 z) { | ||
| 6541 | return ::simd_make_ulong3(x, y, z); | ||
| 6542 | } | ||
| 6543 | |||
| 6544 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6545 | * unsigned integers. */ | ||
| 6546 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong1 x, ulong2 yz) { | ||
| 6547 | return ::simd_make_ulong3(x, yz); | ||
| 6548 | } | ||
| 6549 | |||
| 6550 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6551 | * unsigned integers. */ | ||
| 6552 | static inline SIMD_CPPFUNC ulong3 make_ulong3(ulong2 xy, ulong1 z) { | ||
| 6553 | return ::simd_make_ulong3(xy, z); | ||
| 6554 | } | ||
| 6555 | |||
| 6556 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6557 | * 64-bit unsigned integers. */ | ||
| 6558 | template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3(typeN other) { | ||
| 6559 | return ::simd_make_ulong3(other); | ||
| 6560 | } | ||
| 6561 | |||
| 6562 | /*! @abstract Extends `other` to form a vector of three 64-bit unsigned | ||
| 6563 | * integers. The contents of the newly-created vector lanes are | ||
| 6564 | * unspecified. */ | ||
| 6565 | template <typename typeN> static SIMD_CPPFUNC ulong3 make_ulong3_undef(typeN other) { | ||
| 6566 | return ::simd_make_ulong3_undef(other); | ||
| 6567 | } | ||
| 6568 | |||
| 6569 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6570 | * 64-bit unsigned integers. */ | ||
| 6571 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong1 z, ulong1 w) { | ||
| 6572 | return ::simd_make_ulong4(x, y, z, w); | ||
| 6573 | } | ||
| 6574 | |||
| 6575 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6576 | * unsigned integers. */ | ||
| 6577 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong1 y, ulong2 zw) { | ||
| 6578 | return ::simd_make_ulong4(x, y, zw); | ||
| 6579 | } | ||
| 6580 | |||
| 6581 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6582 | * unsigned integers. */ | ||
| 6583 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong2 yz, ulong1 w) { | ||
| 6584 | return ::simd_make_ulong4(x, yz, w); | ||
| 6585 | } | ||
| 6586 | |||
| 6587 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6588 | * unsigned integers. */ | ||
| 6589 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong1 z, ulong1 w) { | ||
| 6590 | return ::simd_make_ulong4(xy, z, w); | ||
| 6591 | } | ||
| 6592 | |||
| 6593 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6594 | * unsigned integers. */ | ||
| 6595 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong1 x, ulong3 yzw) { | ||
| 6596 | return ::simd_make_ulong4(x, yzw); | ||
| 6597 | } | ||
| 6598 | |||
| 6599 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6600 | * unsigned integers. */ | ||
| 6601 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong2 xy, ulong2 zw) { | ||
| 6602 | return ::simd_make_ulong4(xy, zw); | ||
| 6603 | } | ||
| 6604 | |||
| 6605 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6606 | * unsigned integers. */ | ||
| 6607 | static inline SIMD_CPPFUNC ulong4 make_ulong4(ulong3 xyz, ulong1 w) { | ||
| 6608 | return ::simd_make_ulong4(xyz, w); | ||
| 6609 | } | ||
| 6610 | |||
| 6611 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6612 | * 64-bit unsigned integers. */ | ||
| 6613 | template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4(typeN other) { | ||
| 6614 | return ::simd_make_ulong4(other); | ||
| 6615 | } | ||
| 6616 | |||
| 6617 | /*! @abstract Extends `other` to form a vector of four 64-bit unsigned | ||
| 6618 | * integers. The contents of the newly-created vector lanes are | ||
| 6619 | * unspecified. */ | ||
| 6620 | template <typename typeN> static SIMD_CPPFUNC ulong4 make_ulong4_undef(typeN other) { | ||
| 6621 | return ::simd_make_ulong4_undef(other); | ||
| 6622 | } | ||
| 6623 | |||
| 6624 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6625 | * unsigned integers. */ | ||
| 6626 | static inline SIMD_CPPFUNC ulong8 make_ulong8(ulong4 lo, ulong4 hi) { | ||
| 6627 | return ::simd_make_ulong8(lo, hi); | ||
| 6628 | } | ||
| 6629 | |||
| 6630 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6631 | * 64-bit unsigned integers. */ | ||
| 6632 | template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8(typeN other) { | ||
| 6633 | return ::simd_make_ulong8(other); | ||
| 6634 | } | ||
| 6635 | |||
| 6636 | /*! @abstract Extends `other` to form a vector of eight 64-bit unsigned | ||
| 6637 | * integers. The contents of the newly-created vector lanes are | ||
| 6638 | * unspecified. */ | ||
| 6639 | template <typename typeN> static SIMD_CPPFUNC ulong8 make_ulong8_undef(typeN other) { | ||
| 6640 | return ::simd_make_ulong8_undef(other); | ||
| 6641 | } | ||
| 6642 | |||
| 6643 | /*! @abstract Concatenates `x` and `y` to form a vector of two 64-bit | ||
| 6644 | * floating-point numbers. */ | ||
| 6645 | static inline SIMD_CPPFUNC double2 make_double2(double x, double y) { | ||
| 6646 | return ::simd_make_double2(x, y); | ||
| 6647 | } | ||
| 6648 | |||
| 6649 | /*! @abstract Truncates or zero-extends `other` to form a vector of two | ||
| 6650 | * 64-bit floating-point numbers. */ | ||
| 6651 | template <typename typeN> static SIMD_CPPFUNC double2 make_double2(typeN other) { | ||
| 6652 | return ::simd_make_double2(other); | ||
| 6653 | } | ||
| 6654 | |||
| 6655 | /*! @abstract Extends `other` to form a vector of two 64-bit floating-point | ||
| 6656 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6657 | template <typename typeN> static SIMD_CPPFUNC double2 make_double2_undef(typeN other) { | ||
| 6658 | return ::simd_make_double2_undef(other); | ||
| 6659 | } | ||
| 6660 | |||
| 6661 | /*! @abstract Concatenates `x`, `y` and `z` to form a vector of three 64-bit | ||
| 6662 | * floating-point numbers. */ | ||
| 6663 | static inline SIMD_CPPFUNC double3 make_double3(double x, double y, double z) { | ||
| 6664 | return ::simd_make_double3(x, y, z); | ||
| 6665 | } | ||
| 6666 | |||
| 6667 | /*! @abstract Concatenates `x` and `yz` to form a vector of three 64-bit | ||
| 6668 | * floating-point numbers. */ | ||
| 6669 | static inline SIMD_CPPFUNC double3 make_double3(double x, double2 yz) { | ||
| 6670 | return ::simd_make_double3(x, yz); | ||
| 6671 | } | ||
| 6672 | |||
| 6673 | /*! @abstract Concatenates `xy` and `z` to form a vector of three 64-bit | ||
| 6674 | * floating-point numbers. */ | ||
| 6675 | static inline SIMD_CPPFUNC double3 make_double3(double2 xy, double z) { | ||
| 6676 | return ::simd_make_double3(xy, z); | ||
| 6677 | } | ||
| 6678 | |||
| 6679 | /*! @abstract Truncates or zero-extends `other` to form a vector of three | ||
| 6680 | * 64-bit floating-point numbers. */ | ||
| 6681 | template <typename typeN> static SIMD_CPPFUNC double3 make_double3(typeN other) { | ||
| 6682 | return ::simd_make_double3(other); | ||
| 6683 | } | ||
| 6684 | |||
| 6685 | /*! @abstract Extends `other` to form a vector of three 64-bit floating- | ||
| 6686 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6687 | * unspecified. */ | ||
| 6688 | template <typename typeN> static SIMD_CPPFUNC double3 make_double3_undef(typeN other) { | ||
| 6689 | return ::simd_make_double3_undef(other); | ||
| 6690 | } | ||
| 6691 | |||
| 6692 | /*! @abstract Concatenates `x`, `y`, `z` and `w` to form a vector of four | ||
| 6693 | * 64-bit floating-point numbers. */ | ||
| 6694 | static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double z, double w) { | ||
| 6695 | return ::simd_make_double4(x, y, z, w); | ||
| 6696 | } | ||
| 6697 | |||
| 6698 | /*! @abstract Concatenates `x`, `y` and `zw` to form a vector of four 64-bit | ||
| 6699 | * floating-point numbers. */ | ||
| 6700 | static inline SIMD_CPPFUNC double4 make_double4(double x, double y, double2 zw) { | ||
| 6701 | return ::simd_make_double4(x, y, zw); | ||
| 6702 | } | ||
| 6703 | |||
| 6704 | /*! @abstract Concatenates `x`, `yz` and `w` to form a vector of four 64-bit | ||
| 6705 | * floating-point numbers. */ | ||
| 6706 | static inline SIMD_CPPFUNC double4 make_double4(double x, double2 yz, double w) { | ||
| 6707 | return ::simd_make_double4(x, yz, w); | ||
| 6708 | } | ||
| 6709 | |||
| 6710 | /*! @abstract Concatenates `xy`, `z` and `w` to form a vector of four 64-bit | ||
| 6711 | * floating-point numbers. */ | ||
| 6712 | static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double z, double w) { | ||
| 6713 | return ::simd_make_double4(xy, z, w); | ||
| 6714 | } | ||
| 6715 | |||
| 6716 | /*! @abstract Concatenates `x` and `yzw` to form a vector of four 64-bit | ||
| 6717 | * floating-point numbers. */ | ||
| 6718 | static inline SIMD_CPPFUNC double4 make_double4(double x, double3 yzw) { | ||
| 6719 | return ::simd_make_double4(x, yzw); | ||
| 6720 | } | ||
| 6721 | |||
| 6722 | /*! @abstract Concatenates `xy` and `zw` to form a vector of four 64-bit | ||
| 6723 | * floating-point numbers. */ | ||
| 6724 | static inline SIMD_CPPFUNC double4 make_double4(double2 xy, double2 zw) { | ||
| 6725 | return ::simd_make_double4(xy, zw); | ||
| 6726 | } | ||
| 6727 | |||
| 6728 | /*! @abstract Concatenates `xyz` and `w` to form a vector of four 64-bit | ||
| 6729 | * floating-point numbers. */ | ||
| 6730 | static inline SIMD_CPPFUNC double4 make_double4(double3 xyz, double w) { | ||
| 6731 | return ::simd_make_double4(xyz, w); | ||
| 6732 | } | ||
| 6733 | |||
| 6734 | /*! @abstract Truncates or zero-extends `other` to form a vector of four | ||
| 6735 | * 64-bit floating-point numbers. */ | ||
| 6736 | template <typename typeN> static SIMD_CPPFUNC double4 make_double4(typeN other) { | ||
| 6737 | return ::simd_make_double4(other); | ||
| 6738 | } | ||
| 6739 | |||
| 6740 | /*! @abstract Extends `other` to form a vector of four 64-bit floating-point | ||
| 6741 | * numbers. The contents of the newly-created vector lanes are unspecified. */ | ||
| 6742 | template <typename typeN> static SIMD_CPPFUNC double4 make_double4_undef(typeN other) { | ||
| 6743 | return ::simd_make_double4_undef(other); | ||
| 6744 | } | ||
| 6745 | |||
| 6746 | /*! @abstract Concatenates `lo` and `hi` to form a vector of eight 64-bit | ||
| 6747 | * floating-point numbers. */ | ||
| 6748 | static inline SIMD_CPPFUNC double8 make_double8(double4 lo, double4 hi) { | ||
| 6749 | return ::simd_make_double8(lo, hi); | ||
| 6750 | } | ||
| 6751 | |||
| 6752 | /*! @abstract Truncates or zero-extends `other` to form a vector of eight | ||
| 6753 | * 64-bit floating-point numbers. */ | ||
| 6754 | template <typename typeN> static SIMD_CPPFUNC double8 make_double8(typeN other) { | ||
| 6755 | return ::simd_make_double8(other); | ||
| 6756 | } | ||
| 6757 | |||
| 6758 | /*! @abstract Extends `other` to form a vector of eight 64-bit floating- | ||
| 6759 | * point numbers. The contents of the newly-created vector lanes are | ||
| 6760 | * unspecified. */ | ||
| 6761 | template <typename typeN> static SIMD_CPPFUNC double8 make_double8_undef(typeN other) { | ||
| 6762 | return ::simd_make_double8_undef(other); | ||
| 6763 | } | ||
| 6764 | |||
| 6765 | } /* namespace simd */ | ||
| 6766 | #endif /* __cplusplus */ | ||
| 6767 | #endif /* SIMD_COMPILER_HAS_REQUIRED_FEATURES */ | ||
| 6768 | #endif /* SIMD_VECTOR_CONSTRUCTORS */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/sys/_types/_uintptr_t.h created+31| ... | @@ -0,0 +1,31 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2003-2012 Apple Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | #ifndef _UINTPTR_T | ||
| 29 | #define _UINTPTR_T | ||
| 30 | typedef unsigned long uintptr_t; | ||
| 31 | #endif /* _UINTPTR_T */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/sys/ioctl.h created+110| ... | @@ -0,0 +1,110 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * (c) UNIX System Laboratories, Inc. | ||
| 33 | * All or some portions of this file are derived from material licensed | ||
| 34 | * to the University of California by American Telephone and Telegraph | ||
| 35 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 36 | * the permission of UNIX System Laboratories, Inc. | ||
| 37 | * | ||
| 38 | * Redistribution and use in source and binary forms, with or without | ||
| 39 | * modification, are permitted provided that the following conditions | ||
| 40 | * are met: | ||
| 41 | * 1. Redistributions of source code must retain the above copyright | ||
| 42 | * notice, this list of conditions and the following disclaimer. | ||
| 43 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 44 | * notice, this list of conditions and the following disclaimer in the | ||
| 45 | * documentation and/or other materials provided with the distribution. | ||
| 46 | * 3. All advertising materials mentioning features or use of this software | ||
| 47 | * must display the following acknowledgement: | ||
| 48 | *	This product includes software developed by the University of | ||
| 49 | *	California, Berkeley and its contributors. | ||
| 50 | * 4. Neither the name of the University nor the names of its contributors | ||
| 51 | * may be used to endorse or promote products derived from this software | ||
| 52 | * without specific prior written permission. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 64 | * SUCH DAMAGE. | ||
| 65 | * | ||
| 66 | *	@(#)ioctl.h	8.6 (Berkeley) 3/28/94 | ||
| 67 | */ | ||
| 68 | |||
| 69 | #ifndef _SYS_IOCTL_H_ | ||
| 70 | #define _SYS_IOCTL_H_ | ||
| 71 | |||
| 72 | #include <sys/ttycom.h> | ||
| 73 | |||
| 74 | /* | ||
| 75 | * Pun for SunOS prior to 3.2. SunOS 3.2 and later support TIOCGWINSZ | ||
| 76 | * and TIOCSWINSZ (yes, even 3.2-3.5, the fact that it wasn't documented | ||
| 77 | * nonwithstanding). | ||
| 78 | */ | ||
| 79 | struct ttysize { | ||
| 80 | 	unsigned short ts_lines; | ||
| 81 | 	unsigned short ts_cols; | ||
| 82 | 	unsigned short ts_xxx; | ||
| 83 | 	unsigned short ts_yyy; | ||
| 84 | }; | ||
| 85 | #define TIOCGSIZE TIOCGWINSZ | ||
| 86 | #define TIOCSSIZE TIOCSWINSZ | ||
| 87 | |||
| 88 | #include <sys/ioccom.h> | ||
| 89 | |||
| 90 | #include <sys/filio.h> | ||
| 91 | #include <sys/sockio.h> | ||
| 92 | |||
| 93 | |||
| 94 | #include <sys/cdefs.h> | ||
| 95 | |||
| 96 | __BEGIN_DECLS | ||
| 97 | int ioctl(int, unsigned long, ...); | ||
| 98 | __END_DECLS | ||
| 99 | #endif /* !_SYS_IOCTL_H_ */ | ||
| 100 | |||
| 101 | /* | ||
| 102 | * Keep outside _SYS_IOCTL_H_ | ||
| 103 | * Compatability with old terminal driver | ||
| 104 | * | ||
| 105 | * Source level -> #define USE_OLD_TTY | ||
| 106 | * Kernel level -> always on | ||
| 107 | */ | ||
| 108 | #if defined(USE_OLD_TTY) || defined(BSD_KERNEL_PRIVATE) | ||
| 109 | #include <sys/ioctl_compat.h> | ||
| 110 | #endif /* !_SYS_IOCTL_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/sys/random.h created+40| ... | @@ -0,0 +1,40 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 1999, 2000-2005 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | |||
| 29 | #ifndef __SYS_RANDOM_H__ | ||
| 30 | #define __SYS_RANDOM_H__ | ||
| 31 | |||
| 32 | #include <sys/appleapiopts.h> | ||
| 33 | #include <sys/cdefs.h> | ||
| 34 | |||
| 35 | __BEGIN_DECLS | ||
| 36 | __OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) __TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0) | ||
| 37 | int getentropy(void* buffer, size_t size); | ||
| 38 | __END_DECLS | ||
| 39 | |||
| 40 | #endif /* __SYS_RANDOM_H__ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/sys/ttycom.h created+173| ... | @@ -0,0 +1,173 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved. | ||
| 3 | * | ||
| 4 | * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ | ||
| 5 | * | ||
| 6 | * This file contains Original Code and/or Modifications of Original Code | ||
| 7 | * as defined in and that are subject to the Apple Public Source License | ||
| 8 | * Version 2.0 (the 'License'). You may not use this file except in | ||
| 9 | * compliance with the License. The rights granted to you under the License | ||
| 10 | * may not be used to create, or enable the creation or redistribution of, | ||
| 11 | * unlawful or unlicensed copies of an Apple operating system, or to | ||
| 12 | * circumvent, violate, or enable the circumvention or violation of, any | ||
| 13 | * terms of an Apple operating system software license agreement. | ||
| 14 | * | ||
| 15 | * Please obtain a copy of the License at | ||
| 16 | * http://www.opensource.apple.com/apsl/ and read it before using this file. | ||
| 17 | * | ||
| 18 | * The Original Code and all software distributed under the License are | ||
| 19 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | ||
| 20 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, | ||
| 21 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | ||
| 22 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. | ||
| 23 | * Please see the License for the specific language governing rights and | ||
| 24 | * limitations under the License. | ||
| 25 | * | ||
| 26 | * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ | ||
| 27 | */ | ||
| 28 | /* Copyright (c) 1997 Apple Computer, Inc. All Rights Reserved */ | ||
| 29 | /*- | ||
| 30 | * Copyright (c) 1982, 1986, 1990, 1993, 1994 | ||
| 31 | *	The Regents of the University of California. All rights reserved. | ||
| 32 | * (c) UNIX System Laboratories, Inc. | ||
| 33 | * All or some portions of this file are derived from material licensed | ||
| 34 | * to the University of California by American Telephone and Telegraph | ||
| 35 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | ||
| 36 | * the permission of UNIX System Laboratories, Inc. | ||
| 37 | * | ||
| 38 | * Redistribution and use in source and binary forms, with or without | ||
| 39 | * modification, are permitted provided that the following conditions | ||
| 40 | * are met: | ||
| 41 | * 1. Redistributions of source code must retain the above copyright | ||
| 42 | * notice, this list of conditions and the following disclaimer. | ||
| 43 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 44 | * notice, this list of conditions and the following disclaimer in the | ||
| 45 | * documentation and/or other materials provided with the distribution. | ||
| 46 | * 3. All advertising materials mentioning features or use of this software | ||
| 47 | * must display the following acknowledgement: | ||
| 48 | * This product includes software developed by the University of | ||
| 49 | * California, Berkeley and its contributors. | ||
| 50 | * 4. Neither the name of the University nor the names of its contributors | ||
| 51 | * may be used to endorse or promote products derived from this software | ||
| 52 | * without specific prior written permission. | ||
| 53 | * | ||
| 54 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 55 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 56 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 57 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 64 | * SUCH DAMAGE. | ||
| 65 | * | ||
| 66 | *	@(#)ttycom.h	8.1 (Berkeley) 3/28/94 | ||
| 67 | */ | ||
| 68 | |||
| 69 | #ifndef _SYS_TTYCOM_H_ | ||
| 70 | #define _SYS_TTYCOM_H_ | ||
| 71 | |||
| 72 | #include <sys/ioccom.h> | ||
| 73 | /* | ||
| 74 | * Tty ioctl's except for those supported only for backwards compatibility | ||
| 75 | * with the old tty driver. | ||
| 76 | */ | ||
| 77 | |||
| 78 | /* | ||
| 79 | * Window/terminal size structure. This information is stored by the kernel | ||
| 80 | * in order to provide a consistent interface, but is not used by the kernel. | ||
| 81 | */ | ||
| 82 | struct winsize { | ||
| 83 | 	unsigned short ws_row; /* rows, in characters */ | ||
| 84 | 	unsigned short ws_col; /* columns, in characters */ | ||
| 85 | 	unsigned short ws_xpixel; /* horizontal size, pixels */ | ||
| 86 | 	unsigned short ws_ypixel; /* vertical size, pixels */ | ||
| 87 | }; | ||
| 88 | |||
| 89 | #define TIOCMODG _IOR('t', 3, int) /* get modem control state */ | ||
| 90 | #define TIOCMODS _IOW('t', 4, int) /* set modem control state */ | ||
| 91 | #define TIOCM_LE 0001 /* line enable */ | ||
| 92 | #define TIOCM_DTR 0002 /* data terminal ready */ | ||
| 93 | #define TIOCM_RTS 0004 /* request to send */ | ||
| 94 | #define TIOCM_ST 0010 /* secondary transmit */ | ||
| 95 | #define TIOCM_SR 0020 /* secondary receive */ | ||
| 96 | #define TIOCM_CTS 0040 /* clear to send */ | ||
| 97 | #define TIOCM_CAR 0100 /* carrier detect */ | ||
| 98 | #define TIOCM_CD TIOCM_CAR | ||
| 99 | #define TIOCM_RNG 0200 /* ring */ | ||
| 100 | #define TIOCM_RI TIOCM_RNG | ||
| 101 | #define TIOCM_DSR 0400 /* data set ready */ | ||
| 102 | /* 8-10 compat */ | ||
| 103 | #define TIOCEXCL _IO('t', 13) /* set exclusive use of tty */ | ||
| 104 | #define TIOCNXCL _IO('t', 14) /* reset exclusive use of tty */ | ||
| 105 | /* 15 unused */ | ||
| 106 | #define TIOCFLUSH _IOW('t', 16, int) /* flush buffers */ | ||
| 107 | /* 17-18 compat */ | ||
| 108 | #define TIOCGETA _IOR('t', 19, struct termios) /* get termios struct */ | ||
| 109 | #define TIOCSETA _IOW('t', 20, struct termios) /* set termios struct */ | ||
| 110 | #define TIOCSETAW _IOW('t', 21, struct termios) /* drain output, set */ | ||
| 111 | #define TIOCSETAF _IOW('t', 22, struct termios) /* drn out, fls in, set */ | ||
| 112 | #define TIOCGETD _IOR('t', 26, int) /* get line discipline */ | ||
| 113 | #define TIOCSETD _IOW('t', 27, int) /* set line discipline */ | ||
| 114 | #define TIOCIXON _IO('t', 129) /* internal input VSTART */ | ||
| 115 | #define TIOCIXOFF _IO('t', 128) /* internal input VSTOP */ | ||
| 116 | /* 127-124 compat */ | ||
| 117 | #define TIOCSBRK _IO('t', 123) /* set break bit */ | ||
| 118 | #define TIOCCBRK _IO('t', 122) /* clear break bit */ | ||
| 119 | #define TIOCSDTR _IO('t', 121) /* set data terminal ready */ | ||
| 120 | #define TIOCCDTR _IO('t', 120) /* clear data terminal ready */ | ||
| 121 | #define TIOCGPGRP _IOR('t', 119, int) /* get pgrp of tty */ | ||
| 122 | #define TIOCSPGRP _IOW('t', 118, int) /* set pgrp of tty */ | ||
| 123 | /* 117-116 compat */ | ||
| 124 | #define TIOCOUTQ _IOR('t', 115, int) /* output queue size */ | ||
| 125 | #define TIOCSTI _IOW('t', 114, char) /* simulate terminal input */ | ||
| 126 | #define TIOCNOTTY _IO('t', 113) /* void tty association */ | ||
| 127 | #define TIOCPKT _IOW('t', 112, int) /* pty: set/clear packet mode */ | ||
| 128 | #define TIOCPKT_DATA 0x00 /* data packet */ | ||
| 129 | #define TIOCPKT_FLUSHREAD 0x01 /* flush packet */ | ||
| 130 | #define TIOCPKT_FLUSHWRITE 0x02 /* flush packet */ | ||
| 131 | #define TIOCPKT_STOP 0x04 /* stop output */ | ||
| 132 | #define TIOCPKT_START 0x08 /* start output */ | ||
| 133 | #define TIOCPKT_NOSTOP 0x10 /* no more ^S, ^Q */ | ||
| 134 | #define TIOCPKT_DOSTOP 0x20 /* now do ^S ^Q */ | ||
| 135 | #define TIOCPKT_IOCTL 0x40 /* state change of pty driver */ | ||
| 136 | #define TIOCSTOP _IO('t', 111) /* stop output, like ^S */ | ||
| 137 | #define TIOCSTART _IO('t', 110) /* start output, like ^Q */ | ||
| 138 | #define TIOCMSET _IOW('t', 109, int) /* set all modem bits */ | ||
| 139 | #define TIOCMBIS _IOW('t', 108, int) /* bis modem bits */ | ||
| 140 | #define TIOCMBIC _IOW('t', 107, int) /* bic modem bits */ | ||
| 141 | #define TIOCMGET _IOR('t', 106, int) /* get all modem bits */ | ||
| 142 | #define TIOCREMOTE _IOW('t', 105, int) /* remote input editing */ | ||
| 143 | #define TIOCGWINSZ _IOR('t', 104, struct winsize) /* get window size */ | ||
| 144 | #define TIOCSWINSZ _IOW('t', 103, struct winsize) /* set window size */ | ||
| 145 | #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ | ||
| 146 | #define TIOCSTAT _IO('t', 101) /* simulate ^T status message */ | ||
| 147 | #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ | ||
| 148 | #define TIOCSCONS _IO('t', 99) /* 4.2 compatibility */ | ||
| 149 | #define TIOCCONS _IOW('t', 98, int) /* become virtual console */ | ||
| 150 | #define TIOCSCTTY _IO('t', 97) /* become controlling tty */ | ||
| 151 | #define TIOCEXT _IOW('t', 96, int) /* pty: external processing */ | ||
| 152 | #define TIOCSIG _IO('t', 95) /* pty: generate signal */ | ||
| 153 | #define TIOCDRAIN _IO('t', 94) /* wait till output drained */ | ||
| 154 | #define TIOCMSDTRWAIT _IOW('t', 91, int) /* modem: set wait on close */ | ||
| 155 | #define TIOCMGDTRWAIT _IOR('t', 90, int) /* modem: get wait on close */ | ||
| 156 | #define TIOCTIMESTAMP _IOR('t', 89, struct timeval) /* enable/get timestamp | ||
| 157 | 	 * of last input event */ | ||
| 158 | #define TIOCDCDTIMESTAMP _IOR('t', 88, struct timeval) /* enable/get timestamp | ||
| 159 | 	 * of last DCd rise */ | ||
| 160 | #define TIOCSDRAINWAIT _IOW('t', 87, int) /* set ttywait timeout */ | ||
| 161 | #define TIOCGDRAINWAIT _IOR('t', 86, int) /* get ttywait timeout */ | ||
| 162 | #define TIOCDSIMICROCODE _IO('t', 85) /* download microcode to | ||
| 163 | 	 * DSI Softmodem */ | ||
| 164 | #define TIOCPTYGRANT _IO('t', 84) /* grantpt(3) */ | ||
| 165 | #define TIOCPTYGNAME _IOC(IOC_OUT, 't', 83, 128) /* ptsname(3) */ | ||
| 166 | #define TIOCPTYUNLK _IO('t', 82) /* unlockpt(3) */ | ||
| 167 | |||
| 168 | #define TTYDISC 0 /* termios tty line discipline */ | ||
| 169 | #define TABLDISC 3 /* tablet discipline */ | ||
| 170 | #define SLIPDISC 4 /* serial IP discipline */ | ||
| 171 | #define PPPDISC 5 /* PPP discipline */ | ||
| 172 | |||
| 173 | #endif /* !_SYS_TTYCOM_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/unistd.h created+787| ... | @@ -0,0 +1,787 @@ | ||
| 1 | /* | ||
| 2 | * Copyright (c) 2000, 2002-2006, 2008-2010, 2012 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) 1998-1999 Apple Computer, Inc. All Rights Reserved | ||
| 25 | * Copyright (c) 1991, 1993, 1994 | ||
| 26 | *	The Regents of the University of California. All rights reserved. | ||
| 27 | * | ||
| 28 | * Redistribution and use in source and binary forms, with or without | ||
| 29 | * modification, are permitted provided that the following conditions | ||
| 30 | * are met: | ||
| 31 | * 1. Redistributions of source code must retain the above copyright | ||
| 32 | * notice, this list of conditions and the following disclaimer. | ||
| 33 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 34 | * notice, this list of conditions and the following disclaimer in the | ||
| 35 | * documentation and/or other materials provided with the distribution. | ||
| 36 | * 3. All advertising materials mentioning features or use of this software | ||
| 37 | * must display the following acknowledgement: | ||
| 38 | *	This product includes software developed by the University of | ||
| 39 | *	California, Berkeley and its contributors. | ||
| 40 | * 4. Neither the name of the University nor the names of its contributors | ||
| 41 | * may be used to endorse or promote products derived from this software | ||
| 42 | * without specific prior written permission. | ||
| 43 | * | ||
| 44 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | ||
| 45 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 46 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 47 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 48 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 49 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 50 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 51 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 52 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 53 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 54 | * SUCH DAMAGE. | ||
| 55 | * | ||
| 56 | *	@(#)unistd.h	8.12 (Berkeley) 4/27/95 | ||
| 57 | * | ||
| 58 | * Copyright (c) 1998 Apple Compter, Inc. | ||
| 59 | * All Rights Reserved | ||
| 60 | */ | ||
| 61 | |||
| 62 | /* History: | ||
| 63 | 7/14/99 EKN at Apple fixed getdirentriesattr from getdirentryattr | ||
| 64 | 3/26/98 CHW at Apple added real interface to searchfs call | ||
| 65 | 	3/5/98 CHW at Apple added hfs semantic system calls headers | ||
| 66 | */ | ||
| 67 | |||
| 68 | #ifndef _UNISTD_H_ | ||
| 69 | #define	_UNISTD_H_ | ||
| 70 | |||
| 71 | #include <_types.h> | ||
| 72 | #include <sys/unistd.h> | ||
| 73 | #include <Availability.h> | ||
| 74 | #include <sys/_types/_gid_t.h> | ||
| 75 | #include <sys/_types/_intptr_t.h> | ||
| 76 | #include <sys/_types/_off_t.h> | ||
| 77 | #include <sys/_types/_pid_t.h> | ||
| 78 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: | ||
| 79 | * _GCC_SIZE_T */ | ||
| 80 | #include <sys/_types/_size_t.h> | ||
| 81 | #include <sys/_types/_ssize_t.h> | ||
| 82 | #include <sys/_types/_uid_t.h> | ||
| 83 | #include <sys/_types/_useconds_t.h> | ||
| 84 | #include <sys/_types/_null.h> | ||
| 85 | |||
| 86 | #define	 STDIN_FILENO	0	/* standard input file descriptor */ | ||
| 87 | #define	STDOUT_FILENO	1	/* standard output file descriptor */ | ||
| 88 | #define	STDERR_FILENO	2	/* standard error file descriptor */ | ||
| 89 | |||
| 90 | |||
| 91 | /* Version test macros */ | ||
| 92 | /* _POSIX_VERSION and _POSIX2_VERSION from sys/unistd.h */ | ||
| 93 | #define	_XOPEN_VERSION			600		/* [XSI] */ | ||
| 94 | #define	_XOPEN_XCU_VERSION		4		/* Older standard */ | ||
| 95 | |||
| 96 | |||
| 97 | /* Please keep this list in the same order as the applicable standard */ | ||
| 98 | #define	_POSIX_ADVISORY_INFO		(-1)		/* [ADV] */ | ||
| 99 | #define	_POSIX_ASYNCHRONOUS_IO		(-1)		/* [AIO] */ | ||
| 100 | #define	_POSIX_BARRIERS			(-1)		/* [BAR] */ | ||
| 101 | #define	_POSIX_CHOWN_RESTRICTED		200112L | ||
| 102 | #define	_POSIX_CLOCK_SELECTION		(-1)		/* [CS] */ | ||
| 103 | #define	_POSIX_CPUTIME			(-1)		/* [CPT] */ | ||
| 104 | #define	_POSIX_FSYNC			200112L		/* [FSC] */ | ||
| 105 | #define	_POSIX_IPV6			200112L | ||
| 106 | #define	_POSIX_JOB_CONTROL		200112L | ||
| 107 | #define	_POSIX_MAPPED_FILES		200112L		/* [MF] */ | ||
| 108 | #define	_POSIX_MEMLOCK			(-1)		/* [ML] */ | ||
| 109 | #define	_POSIX_MEMLOCK_RANGE		(-1)		/* [MR] */ | ||
| 110 | #define	_POSIX_MEMORY_PROTECTION	200112L		/* [MPR] */ | ||
| 111 | #define	_POSIX_MESSAGE_PASSING		(-1)		/* [MSG] */ | ||
| 112 | #define	_POSIX_MONOTONIC_CLOCK		(-1)		/* [MON] */ | ||
| 113 | #define	_POSIX_NO_TRUNC			200112L | ||
| 114 | #define	_POSIX_PRIORITIZED_IO		(-1)		/* [PIO] */ | ||
| 115 | #define	_POSIX_PRIORITY_SCHEDULING	(-1)		/* [PS] */ | ||
| 116 | #define	_POSIX_RAW_SOCKETS		(-1)		/* [RS] */ | ||
| 117 | #define	_POSIX_READER_WRITER_LOCKS	200112L		/* [THR] */ | ||
| 118 | #define	_POSIX_REALTIME_SIGNALS		(-1)		/* [RTS] */ | ||
| 119 | #define	_POSIX_REGEXP			200112L | ||
| 120 | #define	_POSIX_SAVED_IDS		200112L		/* XXX required */ | ||
| 121 | #define	_POSIX_SEMAPHORES		(-1)		/* [SEM] */ | ||
| 122 | #define	_POSIX_SHARED_MEMORY_OBJECTS	(-1)		/* [SHM] */ | ||
| 123 | #define	_POSIX_SHELL			200112L | ||
| 124 | #define	_POSIX_SPAWN			(-1)		/* [SPN] */ | ||
| 125 | #define	_POSIX_SPIN_LOCKS		(-1)		/* [SPI] */ | ||
| 126 | #define	_POSIX_SPORADIC_SERVER		(-1)		/* [SS] */ | ||
| 127 | #define	_POSIX_SYNCHRONIZED_IO		(-1)		/* [SIO] */ | ||
| 128 | #define	_POSIX_THREAD_ATTR_STACKADDR	200112L		/* [TSA] */ | ||
| 129 | #define	_POSIX_THREAD_ATTR_STACKSIZE	200112L		/* [TSS] */ | ||
| 130 | #define	_POSIX_THREAD_CPUTIME		(-1)		/* [TCT] */ | ||
| 131 | #define	_POSIX_THREAD_PRIO_INHERIT	(-1)		/* [TPI] */ | ||
| 132 | #define	_POSIX_THREAD_PRIO_PROTECT	(-1)		/* [TPP] */ | ||
| 133 | #define	_POSIX_THREAD_PRIORITY_SCHEDULING	(-1)	/* [TPS] */ | ||
| 134 | #define	_POSIX_THREAD_PROCESS_SHARED	200112L		/* [TSH] */ | ||
| 135 | #define	_POSIX_THREAD_SAFE_FUNCTIONS	200112L		/* [TSF] */ | ||
| 136 | #define	_POSIX_THREAD_SPORADIC_SERVER	(-1)		/* [TSP] */ | ||
| 137 | #define	_POSIX_THREADS			200112L		/* [THR] */ | ||
| 138 | #define	_POSIX_TIMEOUTS			(-1)		/* [TMO] */ | ||
| 139 | #define	_POSIX_TIMERS			(-1)		/* [TMR] */ | ||
| 140 | #define	_POSIX_TRACE			(-1)		/* [TRC] */ | ||
| 141 | #define	_POSIX_TRACE_EVENT_FILTER	(-1)		/* [TEF] */ | ||
| 142 | #define	_POSIX_TRACE_INHERIT		(-1)		/* [TRI] */ | ||
| 143 | #define	_POSIX_TRACE_LOG		(-1)		/* [TRL] */ | ||
| 144 | #define	_POSIX_TYPED_MEMORY_OBJECTS	(-1)		/* [TYM] */ | ||
| 145 | #ifndef _POSIX_VDISABLE | ||
| 146 | #define	_POSIX_VDISABLE			0xff		/* same as sys/termios.h */ | ||
| 147 | #endif /* _POSIX_VDISABLE */ | ||
| 148 | |||
| 149 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 150 | #define	_POSIX2_C_BIND			200112L | ||
| 151 | #define	_POSIX2_C_DEV			200112L		/* c99 command */ | ||
| 152 | #define	_POSIX2_CHAR_TERM		200112L | ||
| 153 | #define	_POSIX2_FORT_DEV		(-1)		/* fort77 command */ | ||
| 154 | #define	_POSIX2_FORT_RUN		200112L | ||
| 155 | #define	_POSIX2_LOCALEDEF		200112L		/* localedef command */ | ||
| 156 | #define	_POSIX2_PBS			(-1) | ||
| 157 | #define	_POSIX2_PBS_ACCOUNTING		(-1) | ||
| 158 | #define	_POSIX2_PBS_CHECKPOINT		(-1) | ||
| 159 | #define	_POSIX2_PBS_LOCATE		(-1) | ||
| 160 | #define	_POSIX2_PBS_MESSAGE		(-1) | ||
| 161 | #define	_POSIX2_PBS_TRACK		(-1) | ||
| 162 | #define	_POSIX2_SW_DEV			200112L | ||
| 163 | #define	_POSIX2_UPE			200112L	/* XXXX no fc, newgrp, tabs */ | ||
| 164 | #endif /* __DARWIN_C_LEVEL */ | ||
| 165 | |||
| 166 | #define	__ILP32_OFF32 (-1) | ||
| 167 | #define	__ILP32_OFFBIG (-1) | ||
| 168 | |||
| 169 | #define	__LP64_OFF64 (1) | ||
| 170 | #define	__LPBIG_OFFBIG (1) | ||
| 171 | |||
| 172 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 173 | #define	_POSIX_V6_ILP32_OFF32		__ILP32_OFF32 | ||
| 174 | #define	_POSIX_V6_ILP32_OFFBIG		__ILP32_OFFBIG | ||
| 175 | #define	_POSIX_V6_LP64_OFF64		__LP64_OFF64 | ||
| 176 | #define	_POSIX_V6_LPBIG_OFFBIG		__LPBIG_OFFBIG | ||
| 177 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 178 | |||
| 179 | #if __DARWIN_C_LEVEL >= 200809L | ||
| 180 | #define	_POSIX_V7_ILP32_OFF32		__ILP32_OFF32 | ||
| 181 | #define	_POSIX_V7_ILP32_OFFBIG		__ILP32_OFFBIG | ||
| 182 | #define	_POSIX_V7_LP64_OFF64		__LP64_OFF64 | ||
| 183 | #define	_POSIX_V7_LPBIG_OFFBIG		__LPBIG_OFFBIG | ||
| 184 | #endif /* __DARWIN_C_LEVEL >= 200809L */ | ||
| 185 | |||
| 186 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 187 | #define	_V6_ILP32_OFF32 __ILP32_OFF32 | ||
| 188 | #define	_V6_ILP32_OFFBIG __ILP32_OFFBIG | ||
| 189 | #define	_V6_LP64_OFF64 __LP64_OFF64 | ||
| 190 | #define	_V6_LPBIG_OFFBIG __LPBIG_OFFBIG | ||
| 191 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 192 | |||
| 193 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 194 | /* Removed in Issue 7 */ | ||
| 195 | #define	_XBS5_ILP32_OFF32		 __ILP32_OFF32 | ||
| 196 | #define	_XBS5_ILP32_OFFBIG		 __ILP32_OFFBIG | ||
| 197 | #define	_XBS5_LP64_OFF64		 __LP64_OFF64 | ||
| 198 | #define	_XBS5_LPBIG_OFFBIG		 __LPBIG_OFFBIG | ||
| 199 | #endif /* __DARWIN_C_LEVEL < 200809L */ | ||
| 200 | |||
| 201 | #if __DARWIN_C_LEVEL >= 199506L /* This really should be XSI */ | ||
| 202 | #define	_XOPEN_CRYPT			(1) | ||
| 203 | #define	_XOPEN_ENH_I18N			(1)		/* XXX required */ | ||
| 204 | #define	_XOPEN_LEGACY			(-1)	/* no ftime gcvt, wcswcs */ | ||
| 205 | #define	_XOPEN_REALTIME			(-1)	/* no q'ed signals, mq_* */ | ||
| 206 | #define	_XOPEN_REALTIME_THREADS		(-1)	/* no posix_spawn, et. al. */ | ||
| 207 | #define	_XOPEN_SHM			(1) | ||
| 208 | #define	_XOPEN_STREAMS			(-1) /* Issue 6 */ | ||
| 209 | #define	_XOPEN_UNIX			(1) | ||
| 210 | #endif /* XSI */ | ||
| 211 | |||
| 212 | /* configurable system variables */ | ||
| 213 | #define	_SC_ARG_MAX			 1 | ||
| 214 | #define	_SC_CHILD_MAX			 2 | ||
| 215 | #define	_SC_CLK_TCK			 3 | ||
| 216 | #define	_SC_NGROUPS_MAX			 4 | ||
| 217 | #define	_SC_OPEN_MAX			 5 | ||
| 218 | #define	_SC_JOB_CONTROL			 6 | ||
| 219 | #define	_SC_SAVED_IDS			 7 | ||
| 220 | #define	_SC_VERSION			 8 | ||
| 221 | #define	_SC_BC_BASE_MAX			 9 | ||
| 222 | #define	_SC_BC_DIM_MAX			10 | ||
| 223 | #define	_SC_BC_SCALE_MAX		11 | ||
| 224 | #define	_SC_BC_STRING_MAX		12 | ||
| 225 | #define	_SC_COLL_WEIGHTS_MAX		13 | ||
| 226 | #define	_SC_EXPR_NEST_MAX		14 | ||
| 227 | #define	_SC_LINE_MAX			15 | ||
| 228 | #define	_SC_RE_DUP_MAX			16 | ||
| 229 | #define	_SC_2_VERSION			17 | ||
| 230 | #define	_SC_2_C_BIND			18 | ||
| 231 | #define	_SC_2_C_DEV			19 | ||
| 232 | #define	_SC_2_CHAR_TERM			20 | ||
| 233 | #define	_SC_2_FORT_DEV			21 | ||
| 234 | #define	_SC_2_FORT_RUN			22 | ||
| 235 | #define	_SC_2_LOCALEDEF			23 | ||
| 236 | #define	_SC_2_SW_DEV			24 | ||
| 237 | #define	_SC_2_UPE			25 | ||
| 238 | #define	_SC_STREAM_MAX			26 | ||
| 239 | #define	_SC_TZNAME_MAX			27 | ||
| 240 | |||
| 241 | #if __DARWIN_C_LEVEL >= 199309L | ||
| 242 | #define	_SC_ASYNCHRONOUS_IO		28 | ||
| 243 | #define	_SC_PAGESIZE			29 | ||
| 244 | #define	_SC_MEMLOCK			30 | ||
| 245 | #define	_SC_MEMLOCK_RANGE		31 | ||
| 246 | #define	_SC_MEMORY_PROTECTION		32 | ||
| 247 | #define	_SC_MESSAGE_PASSING		33 | ||
| 248 | #define	_SC_PRIORITIZED_IO		34 | ||
| 249 | #define	_SC_PRIORITY_SCHEDULING		35 | ||
| 250 | #define	_SC_REALTIME_SIGNALS		36 | ||
| 251 | #define	_SC_SEMAPHORES			37 | ||
| 252 | #define	_SC_FSYNC			38 | ||
| 253 | #define	_SC_SHARED_MEMORY_OBJECTS 	39 | ||
| 254 | #define	_SC_SYNCHRONIZED_IO		40 | ||
| 255 | #define	_SC_TIMERS			41 | ||
| 256 | #define	_SC_AIO_LISTIO_MAX		42 | ||
| 257 | #define	_SC_AIO_MAX			43 | ||
| 258 | #define	_SC_AIO_PRIO_DELTA_MAX		44 | ||
| 259 | #define	_SC_DELAYTIMER_MAX		45 | ||
| 260 | #define	_SC_MQ_OPEN_MAX			46 | ||
| 261 | #define	_SC_MAPPED_FILES		47	/* swap _SC_PAGESIZE vs. BSD */ | ||
| 262 | #define	_SC_RTSIG_MAX			48 | ||
| 263 | #define	_SC_SEM_NSEMS_MAX		49 | ||
| 264 | #define	_SC_SEM_VALUE_MAX		50 | ||
| 265 | #define	_SC_SIGQUEUE_MAX		51 | ||
| 266 | #define	_SC_TIMER_MAX			52 | ||
| 267 | #endif /* __DARWIN_C_LEVEL >= 199309L */ | ||
| 268 | |||
| 269 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 270 | #define	_SC_NPROCESSORS_CONF		57 | ||
| 271 | #define	_SC_NPROCESSORS_ONLN		58 | ||
| 272 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 273 | |||
| 274 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 275 | #define	_SC_2_PBS			59 | ||
| 276 | #define	_SC_2_PBS_ACCOUNTING		60 | ||
| 277 | #define	_SC_2_PBS_CHECKPOINT		61 | ||
| 278 | #define	_SC_2_PBS_LOCATE		62 | ||
| 279 | #define	_SC_2_PBS_MESSAGE		63 | ||
| 280 | #define	_SC_2_PBS_TRACK			64 | ||
| 281 | #define	_SC_ADVISORY_INFO		65 | ||
| 282 | #define	_SC_BARRIERS			66 | ||
| 283 | #define	_SC_CLOCK_SELECTION		67 | ||
| 284 | #define	_SC_CPUTIME			68 | ||
| 285 | #define	_SC_FILE_LOCKING		69 | ||
| 286 | #define	_SC_GETGR_R_SIZE_MAX		70 | ||
| 287 | #define	_SC_GETPW_R_SIZE_MAX		71 | ||
| 288 | #define	_SC_HOST_NAME_MAX		72 | ||
| 289 | #define	_SC_LOGIN_NAME_MAX		73 | ||
| 290 | #define	_SC_MONOTONIC_CLOCK		74 | ||
| 291 | #define	_SC_MQ_PRIO_MAX			75 | ||
| 292 | #define	_SC_READER_WRITER_LOCKS		76 | ||
| 293 | #define	_SC_REGEXP			77 | ||
| 294 | #define	_SC_SHELL			78 | ||
| 295 | #define	_SC_SPAWN			79 | ||
| 296 | #define	_SC_SPIN_LOCKS			80 | ||
| 297 | #define	_SC_SPORADIC_SERVER		81 | ||
| 298 | #define	_SC_THREAD_ATTR_STACKADDR	82 | ||
| 299 | #define	_SC_THREAD_ATTR_STACKSIZE	83 | ||
| 300 | #define	_SC_THREAD_CPUTIME		84 | ||
| 301 | #define	_SC_THREAD_DESTRUCTOR_ITERATIONS 85 | ||
| 302 | #define	_SC_THREAD_KEYS_MAX		86 | ||
| 303 | #define	_SC_THREAD_PRIO_INHERIT		87 | ||
| 304 | #define	_SC_THREAD_PRIO_PROTECT		88 | ||
| 305 | #define	_SC_THREAD_PRIORITY_SCHEDULING	89 | ||
| 306 | #define	_SC_THREAD_PROCESS_SHARED	90 | ||
| 307 | #define	_SC_THREAD_SAFE_FUNCTIONS	91 | ||
| 308 | #define	_SC_THREAD_SPORADIC_SERVER	92 | ||
| 309 | #define	_SC_THREAD_STACK_MIN		93 | ||
| 310 | #define	_SC_THREAD_THREADS_MAX		94 | ||
| 311 | #define	_SC_TIMEOUTS			95 | ||
| 312 | #define	_SC_THREADS			96 | ||
| 313 | #define	_SC_TRACE			97 | ||
| 314 | #define	_SC_TRACE_EVENT_FILTER		98 | ||
| 315 | #define	_SC_TRACE_INHERIT		99 | ||
| 316 | #define	_SC_TRACE_LOG			100 | ||
| 317 | #define	_SC_TTY_NAME_MAX		101 | ||
| 318 | #define	_SC_TYPED_MEMORY_OBJECTS	102 | ||
| 319 | #define	_SC_V6_ILP32_OFF32		103 | ||
| 320 | #define	_SC_V6_ILP32_OFFBIG		104 | ||
| 321 | #define	_SC_V6_LP64_OFF64		105 | ||
| 322 | #define	_SC_V6_LPBIG_OFFBIG		106 | ||
| 323 | #define	_SC_IPV6			118 | ||
| 324 | #define	_SC_RAW_SOCKETS			119 | ||
| 325 | #define	_SC_SYMLOOP_MAX			120 | ||
| 326 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 327 | |||
| 328 | #if __DARWIN_C_LEVEL >= 199506L /* Really XSI */ | ||
| 329 | #define	_SC_ATEXIT_MAX			107 | ||
| 330 | #define	_SC_IOV_MAX			56 | ||
| 331 | #define	_SC_PAGE_SIZE			_SC_PAGESIZE | ||
| 332 | #define	_SC_XOPEN_CRYPT			108 | ||
| 333 | #define	_SC_XOPEN_ENH_I18N		109 | ||
| 334 | #define	_SC_XOPEN_LEGACY		110 /* Issue 6 */ | ||
| 335 | #define	_SC_XOPEN_REALTIME		111 /* Issue 6 */ | ||
| 336 | #define	_SC_XOPEN_REALTIME_THREADS	112 /* Issue 6 */ | ||
| 337 | #define	_SC_XOPEN_SHM			113 | ||
| 338 | #define	_SC_XOPEN_STREAMS		114 /* Issue 6 */ | ||
| 339 | #define	_SC_XOPEN_UNIX			115 | ||
| 340 | #define	_SC_XOPEN_VERSION		116 | ||
| 341 | #define	_SC_XOPEN_XCU_VERSION		121 | ||
| 342 | #endif /* XSI */ | ||
| 343 | |||
| 344 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 345 | /* Removed in Issue 7 */ | ||
| 346 | #define	_SC_XBS5_ILP32_OFF32		122 | ||
| 347 | #define	_SC_XBS5_ILP32_OFFBIG		123 | ||
| 348 | #define	_SC_XBS5_LP64_OFF64		124 | ||
| 349 | #define	_SC_XBS5_LPBIG_OFFBIG		125 | ||
| 350 | #endif /* __DARWIN_C_LEVEL <= 200809L */ | ||
| 351 | |||
| 352 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 353 | #define	_SC_SS_REPL_MAX			126 | ||
| 354 | #define	_SC_TRACE_EVENT_NAME_MAX	127 | ||
| 355 | #define	_SC_TRACE_NAME_MAX		128 | ||
| 356 | #define	_SC_TRACE_SYS_MAX		129 | ||
| 357 | #define	_SC_TRACE_USER_EVENT_MAX	130 | ||
| 358 | #endif | ||
| 359 | |||
| 360 | #if __DARWIN_C_LEVEL < 200112L || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 361 | /* Removed in Issue 6 */ | ||
| 362 | #define	_SC_PASS_MAX			131 | ||
| 363 | #endif | ||
| 364 | |||
| 365 | /* 132-199 available for future use */ | ||
| 366 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 367 | #define	_SC_PHYS_PAGES			200 | ||
| 368 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 369 | |||
| 370 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 371 | #ifndef _CS_PATH /* Defined in <sys/unistd.h> */ | ||
| 372 | #define	_CS_PATH				1 | ||
| 373 | #endif | ||
| 374 | #endif | ||
| 375 | |||
| 376 | #if __DARWIN_C_LEVEL >= 200112 | ||
| 377 | #define	_CS_POSIX_V6_ILP32_OFF32_CFLAGS		2 | ||
| 378 | #define	_CS_POSIX_V6_ILP32_OFF32_LDFLAGS	3 | ||
| 379 | #define	_CS_POSIX_V6_ILP32_OFF32_LIBS		4 | ||
| 380 | #define	_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS	5 | ||
| 381 | #define	_CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS	6 | ||
| 382 | #define	_CS_POSIX_V6_ILP32_OFFBIG_LIBS		7 | ||
| 383 | #define	_CS_POSIX_V6_LP64_OFF64_CFLAGS		8 | ||
| 384 | #define	_CS_POSIX_V6_LP64_OFF64_LDFLAGS		9 | ||
| 385 | #define	_CS_POSIX_V6_LP64_OFF64_LIBS		10 | ||
| 386 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS	11 | ||
| 387 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS	12 | ||
| 388 | #define	_CS_POSIX_V6_LPBIG_OFFBIG_LIBS		13 | ||
| 389 | #define	_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS	14 | ||
| 390 | #endif | ||
| 391 | |||
| 392 | #if (__DARWIN_C_LEVEL >= 199506L && __DARWIN_C_LEVEL < 200809L) || __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 393 | /* Removed in Issue 7 */ | ||
| 394 | #define	_CS_XBS5_ILP32_OFF32_CFLAGS		20 | ||
| 395 | #define	_CS_XBS5_ILP32_OFF32_LDFLAGS		21 | ||
| 396 | #define	_CS_XBS5_ILP32_OFF32_LIBS		22 | ||
| 397 | #define	_CS_XBS5_ILP32_OFF32_LINTFLAGS		23 | ||
| 398 | #define	_CS_XBS5_ILP32_OFFBIG_CFLAGS		24 | ||
| 399 | #define	_CS_XBS5_ILP32_OFFBIG_LDFLAGS		25 | ||
| 400 | #define	_CS_XBS5_ILP32_OFFBIG_LIBS		26 | ||
| 401 | #define	_CS_XBS5_ILP32_OFFBIG_LINTFLAGS		27 | ||
| 402 | #define	_CS_XBS5_LP64_OFF64_CFLAGS		28 | ||
| 403 | #define	_CS_XBS5_LP64_OFF64_LDFLAGS		29 | ||
| 404 | #define	_CS_XBS5_LP64_OFF64_LIBS		30 | ||
| 405 | #define	_CS_XBS5_LP64_OFF64_LINTFLAGS		31 | ||
| 406 | #define	_CS_XBS5_LPBIG_OFFBIG_CFLAGS		32 | ||
| 407 | #define	_CS_XBS5_LPBIG_OFFBIG_LDFLAGS		33 | ||
| 408 | #define	_CS_XBS5_LPBIG_OFFBIG_LIBS		34 | ||
| 409 | #define	_CS_XBS5_LPBIG_OFFBIG_LINTFLAGS		35 | ||
| 410 | #endif | ||
| 411 | |||
| 412 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 413 | #define	_CS_DARWIN_USER_DIR			65536 | ||
| 414 | #define	_CS_DARWIN_USER_TEMP_DIR		65537 | ||
| 415 | #define	_CS_DARWIN_USER_CACHE_DIR		65538 | ||
| 416 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 417 | |||
| 418 | |||
| 419 | #ifdef _DARWIN_UNLIMITED_GETGROUPS | ||
| 420 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_3_2 | ||
| 421 | #error "_DARWIN_UNLIMITED_GETGROUPS specified, but -miphoneos-version-min version does not support it." | ||
| 422 | #elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_6 | ||
| 423 | #error "_DARWIN_UNLIMITED_GETGROUPS specified, but -mmacosx-version-min version does not support it." | ||
| 424 | #endif | ||
| 425 | #endif | ||
| 426 | |||
| 427 | /* POSIX.1-1990 */ | ||
| 428 | |||
| 429 | __BEGIN_DECLS | ||
| 430 | void	 _exit(int) __dead2; | ||
| 431 | int	 access(const char *, int); | ||
| 432 | unsigned int | ||
| 433 | 	 alarm(unsigned int); | ||
| 434 | int	 chdir(const char *); | ||
| 435 | int	 chown(const char *, uid_t, gid_t); | ||
| 436 | |||
| 437 | int	 close(int) __DARWIN_ALIAS_C(close); | ||
| 438 | |||
| 439 | int	 dup(int); | ||
| 440 | int	 dup2(int, int); | ||
| 441 | int	 execl(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 442 | int	 execle(const char * __path, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 443 | int	 execlp(const char * __file, const char * __arg0, ...) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 444 | int	 execv(const char * __path, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 445 | int	 execve(const char * __file, char * const * __argv, char * const * __envp) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 446 | int	 execvp(const char * __file, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 447 | pid_t	 fork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 448 | long	 fpathconf(int, int); | ||
| 449 | char	*getcwd(char *, size_t); | ||
| 450 | gid_t	 getegid(void); | ||
| 451 | uid_t	 geteuid(void); | ||
| 452 | gid_t	 getgid(void); | ||
| 453 | #if defined(_DARWIN_UNLIMITED_GETGROUPS) || defined(_DARWIN_C_SOURCE) | ||
| 454 | int	 getgroups(int, gid_t []) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_3_2, __DARWIN_EXTSN(getgroups)); | ||
| 455 | #else /* !_DARWIN_UNLIMITED_GETGROUPS && !_DARWIN_C_SOURCE */ | ||
| 456 | int	 getgroups(int, gid_t []); | ||
| 457 | #endif /* _DARWIN_UNLIMITED_GETGROUPS || _DARWIN_C_SOURCE */ | ||
| 458 | char	*getlogin(void); | ||
| 459 | pid_t	 getpgrp(void); | ||
| 460 | pid_t	 getpid(void); | ||
| 461 | pid_t	 getppid(void); | ||
| 462 | uid_t	 getuid(void); | ||
| 463 | int	 isatty(int); | ||
| 464 | int	 link(const char *, const char *); | ||
| 465 | off_t	 lseek(int, off_t, int); | ||
| 466 | long	 pathconf(const char *, int); | ||
| 467 | |||
| 468 | int	 pause(void) __DARWIN_ALIAS_C(pause); | ||
| 469 | |||
| 470 | int	 pipe(int [2]); | ||
| 471 | |||
| 472 | ssize_t	 read(int, void *, size_t) __DARWIN_ALIAS_C(read); | ||
| 473 | |||
| 474 | int	 rmdir(const char *); | ||
| 475 | int	 setgid(gid_t); | ||
| 476 | int	 setpgid(pid_t, pid_t); | ||
| 477 | pid_t	 setsid(void); | ||
| 478 | int	 setuid(uid_t); | ||
| 479 | |||
| 480 | unsigned int | ||
| 481 | 	 sleep(unsigned int) __DARWIN_ALIAS_C(sleep); | ||
| 482 | |||
| 483 | long	 sysconf(int); | ||
| 484 | pid_t	 tcgetpgrp(int); | ||
| 485 | int	 tcsetpgrp(int, pid_t); | ||
| 486 | char	*ttyname(int); | ||
| 487 | |||
| 488 | #if __DARWIN_UNIX03 | ||
| 489 | int	 ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); | ||
| 490 | #else /* !__DARWIN_UNIX03 */ | ||
| 491 | char	*ttyname_r(int, char *, size_t); | ||
| 492 | #endif /* __DARWIN_UNIX03 */ | ||
| 493 | |||
| 494 | int	 unlink(const char *); | ||
| 495 | |||
| 496 | ssize_t	 write(int __fd, const void * __buf, size_t __nbyte) __DARWIN_ALIAS_C(write); | ||
| 497 | __END_DECLS | ||
| 498 | |||
| 499 | |||
| 500 | |||
| 501 | /* Additional functionality provided by: | ||
| 502 | * POSIX.2-1992 C Language Binding Option | ||
| 503 | */ | ||
| 504 | |||
| 505 | #if __DARWIN_C_LEVEL >= 199209L | ||
| 506 | __BEGIN_DECLS | ||
| 507 | size_t	 confstr(int, char *, size_t) __DARWIN_ALIAS(confstr); | ||
| 508 | |||
| 509 | int	 getopt(int, char * const [], const char *) __DARWIN_ALIAS(getopt); | ||
| 510 | |||
| 511 | extern char *optarg;			/* getopt(3) external variables */ | ||
| 512 | extern int optind, opterr, optopt; | ||
| 513 | __END_DECLS | ||
| 514 | #endif /* __DARWIN_C_LEVEL >= 199209L */ | ||
| 515 | |||
| 516 | |||
| 517 | |||
| 518 | /* Additional functionality provided by: | ||
| 519 | * POSIX.1c-1995, | ||
| 520 | * POSIX.1i-1995, | ||
| 521 | * and the omnibus ISO/IEC 9945-1: 1996 | ||
| 522 | */ | ||
| 523 | |||
| 524 | #if __DARWIN_C_LEVEL >= 199506L | ||
| 525 | #include <_ctermid.h> | ||
| 526 | /* These F_* are really XSI or Issue 6 */ | ||
| 527 | #define F_ULOCK 0 /* unlock locked section */ | ||
| 528 | #define	F_LOCK 1 /* lock a section for exclusive use */ | ||
| 529 | #define	F_TLOCK 2 /* test and lock a section for exclusive use */ | ||
| 530 | #define	F_TEST 3 /* test a section for locks by other procs */ | ||
| 531 | |||
| 532 | __BEGIN_DECLS | ||
| 533 | |||
| 534 | /* Begin XSI */ | ||
| 535 | /* Removed in Issue 6 */ | ||
| 536 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 537 | #if !defined(_POSIX_C_SOURCE) | ||
| 538 | __deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 539 | #endif | ||
| 540 | void	*brk(const void *); | ||
| 541 | int	 chroot(const char *) __POSIX_C_DEPRECATED(199506L); | ||
| 542 | #endif | ||
| 543 | |||
| 544 | char	*crypt(const char *, const char *); | ||
| 545 | #if __DARWIN_UNIX03 | ||
| 546 | void	 encrypt(char *, int) __DARWIN_ALIAS(encrypt); | ||
| 547 | #else /* !__DARWIN_UNIX03 */ | ||
| 548 | int	 encrypt(char *, int); | ||
| 549 | #endif /* __DARWIN_UNIX03 */ | ||
| 550 | int	 fchdir(int); | ||
| 551 | long	 gethostid(void); | ||
| 552 | pid_t	 getpgid(pid_t); | ||
| 553 | pid_t	 getsid(pid_t); | ||
| 554 | |||
| 555 | /* Removed in Issue 6 */ | ||
| 556 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 557 | int	 getdtablesize(void) __POSIX_C_DEPRECATED(199506L); | ||
| 558 | int	 getpagesize(void) __pure2 __POSIX_C_DEPRECATED(199506L); | ||
| 559 | char	*getpass(const char *) __POSIX_C_DEPRECATED(199506L); | ||
| 560 | #endif | ||
| 561 | |||
| 562 | /* Removed in Issue 7 */ | ||
| 563 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200809L | ||
| 564 | char	*getwd(char *) __POSIX_C_DEPRECATED(200112L); /* obsoleted by getcwd() */ | ||
| 565 | #endif | ||
| 566 | |||
| 567 | int	 lchown(const char *, uid_t, gid_t) __DARWIN_ALIAS(lchown); | ||
| 568 | |||
| 569 | int	 lockf(int, int, off_t) __DARWIN_ALIAS_C(lockf); | ||
| 570 | |||
| 571 | int	 nice(int) __DARWIN_ALIAS(nice); | ||
| 572 | |||
| 573 | ssize_t	 pread(int __fd, void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pread); | ||
| 574 | |||
| 575 | ssize_t	 pwrite(int __fd, const void * __buf, size_t __nbyte, off_t __offset) __DARWIN_ALIAS_C(pwrite); | ||
| 576 | |||
| 577 | /* Removed in Issue 6 */ | ||
| 578 | #if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 200112L | ||
| 579 | /* Note that Issue 5 changed the argument as intprt_t, | ||
| 580 | * but we keep it as int for binary compatability. */ | ||
| 581 | #if !defined(_POSIX_C_SOURCE) | ||
| 582 | __deprecated __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 583 | #endif | ||
| 584 | void	*sbrk(int); | ||
| 585 | #endif | ||
| 586 | |||
| 587 | #if __DARWIN_UNIX03 | ||
| 588 | pid_t	 setpgrp(void) __DARWIN_ALIAS(setpgrp); | ||
| 589 | #else /* !__DARWIN_UNIX03 */ | ||
| 590 | int	 setpgrp(pid_t pid, pid_t pgrp);	/* obsoleted by setpgid() */ | ||
| 591 | #endif /* __DARWIN_UNIX03 */ | ||
| 592 | |||
| 593 | int	 setregid(gid_t, gid_t) __DARWIN_ALIAS(setregid); | ||
| 594 | |||
| 595 | int	 setreuid(uid_t, uid_t) __DARWIN_ALIAS(setreuid); | ||
| 596 | |||
| 597 | void swab(const void * __restrict, void * __restrict, ssize_t); | ||
| 598 | void	 sync(void); | ||
| 599 | int	 truncate(const char *, off_t); | ||
| 600 | useconds_t	 ualarm(useconds_t, useconds_t); | ||
| 601 | int	 usleep(useconds_t) __DARWIN_ALIAS_C(usleep); | ||
| 602 | pid_t	 vfork(void) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 603 | /* End XSI */ | ||
| 604 | |||
| 605 | int	 fsync(int) __DARWIN_ALIAS_C(fsync); | ||
| 606 | |||
| 607 | int	 ftruncate(int, off_t); | ||
| 608 | int	 getlogin_r(char *, size_t); | ||
| 609 | __END_DECLS | ||
| 610 | #endif /* __DARWIN_C_LEVEL >= 199506L */ | ||
| 611 | |||
| 612 | |||
| 613 | |||
| 614 | /* Additional functionality provided by: | ||
| 615 | * POSIX.1-2001 | ||
| 616 | * ISO C99 | ||
| 617 | */ | ||
| 618 | |||
| 619 | #if __DARWIN_C_LEVEL >= 200112L | ||
| 620 | __BEGIN_DECLS | ||
| 621 | int	 fchown(int, uid_t, gid_t); | ||
| 622 | int	 gethostname(char *, size_t); | ||
| 623 | ssize_t readlink(const char * __restrict, char * __restrict, size_t); | ||
| 624 | int	 setegid(gid_t); | ||
| 625 | int	 seteuid(uid_t); | ||
| 626 | int	 symlink(const char *, const char *); | ||
| 627 | __END_DECLS | ||
| 628 | #endif /* __DARWIN_C_LEVEL >= 200112L */ | ||
| 629 | |||
| 630 | |||
| 631 | |||
| 632 | /* Darwin extensions */ | ||
| 633 | |||
| 634 | #if __DARWIN_C_LEVEL >= __DARWIN_C_FULL | ||
| 635 | #include <sys/select.h> | ||
| 636 | |||
| 637 | #include <sys/_types/_dev_t.h> | ||
| 638 | #include <sys/_types/_mode_t.h> | ||
| 639 | #include <sys/_types/_uuid_t.h> | ||
| 640 | |||
| 641 | __BEGIN_DECLS | ||
| 642 | void	 _Exit(int) __dead2; | ||
| 643 | int	 accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t); | ||
| 644 | int	 acct(const char *); | ||
| 645 | int	 add_profil(char *, size_t, unsigned long, unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 646 | void	 endusershell(void); | ||
| 647 | int	 execvP(const char * __file, const char * __searchpath, char * const * __argv) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 648 | char	*fflagstostr(unsigned long); | ||
| 649 | int	 getdomainname(char *, int); | ||
| 650 | int	 getgrouplist(const char *, int, int *, int *); | ||
| 651 | #if defined(__has_include) | ||
| 652 | #if __has_include(<gethostuuid_private.h>) | ||
| 653 | #include <gethostuuid_private.h> | ||
| 654 | #else | ||
| 655 | #include <gethostuuid.h> | ||
| 656 | #endif | ||
| 657 | #else | ||
| 658 | #include <gethostuuid.h> | ||
| 659 | #endif | ||
| 660 | mode_t	 getmode(const void *, mode_t); | ||
| 661 | int	 getpeereid(int, uid_t *, gid_t *); | ||
| 662 | int	 getsgroups_np(int *, uuid_t); | ||
| 663 | char	*getusershell(void); | ||
| 664 | int	 getwgroups_np(int *, uuid_t); | ||
| 665 | int	 initgroups(const char *, int); | ||
| 666 | int	 issetugid(void); | ||
| 667 | char	*mkdtemp(char *); | ||
| 668 | int	 mknod(const char *, mode_t, dev_t); | ||
| 669 | int	 mkpath_np(const char *path, mode_t omode) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_5_0); /* returns errno */ | ||
| 670 | int	 mkpathat_np(int dfd, const char *path, mode_t omode) /* returns errno */ | ||
| 671 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 672 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 673 | int	 mkstemp(char *); | ||
| 674 | int	 mkstemps(char *, int); | ||
| 675 | char	*mktemp(char *); | ||
| 676 | int	 mkostemp(char *path, int oflags) | ||
| 677 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 678 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 679 | int	 mkostemps(char *path, int slen, int oflags) | ||
| 680 | 		__OSX_AVAILABLE(10.12) __IOS_AVAILABLE(10.0) | ||
| 681 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 682 | /* Non-portable mkstemp that uses open_dprotected_np */ | ||
| 683 | int	 mkstemp_dprotected_np(char *path, int dpclass, int dpflags) | ||
| 684 | 		__OSX_UNAVAILABLE __IOS_AVAILABLE(10.0) | ||
| 685 | 		__TVOS_AVAILABLE(10.0) __WATCHOS_AVAILABLE(3.0); | ||
| 686 | char *mkdtempat_np(int dfd, char *path) | ||
| 687 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 688 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 689 | int mkstempsat_np(int dfd, char *path, int slen) | ||
| 690 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 691 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 692 | int mkostempsat_np(int dfd, char *path, int slen, int oflags) | ||
| 693 | 		__OSX_AVAILABLE(10.13) __IOS_AVAILABLE(11.0) | ||
| 694 | 		__TVOS_AVAILABLE(11.0) __WATCHOS_AVAILABLE(4.0); | ||
| 695 | int	 nfssvc(int, void *); | ||
| 696 | int	 profil(char *, size_t, unsigned long, unsigned int); | ||
| 697 | |||
| 698 | __deprecated_msg("Use of per-thread security contexts is error-prone and discouraged.") | ||
| 699 | int	 pthread_setugid_np(uid_t, gid_t); | ||
| 700 | int	 pthread_getugid_np( uid_t *, gid_t *); | ||
| 701 | |||
| 702 | int	 reboot(int); | ||
| 703 | int	 revoke(const char *); | ||
| 704 | |||
| 705 | __deprecated int	 rcmd(char **, int, const char *, const char *, const char *, int *); | ||
| 706 | __deprecated int	 rcmd_af(char **, int, const char *, const char *, const char *, int *, | ||
| 707 | 		int); | ||
| 708 | __deprecated int	 rresvport(int *); | ||
| 709 | __deprecated int	 rresvport_af(int *, int); | ||
| 710 | __deprecated int	 iruserok(unsigned long, int, const char *, const char *); | ||
| 711 | __deprecated int	 iruserok_sa(const void *, int, int, const char *, const char *); | ||
| 712 | __deprecated int	 ruserok(const char *, int, const char *, const char *); | ||
| 713 | |||
| 714 | int	 setdomainname(const char *, int); | ||
| 715 | int	 setgroups(int, const gid_t *); | ||
| 716 | void	 sethostid(long); | ||
| 717 | int	 sethostname(const char *, int); | ||
| 718 | #if __DARWIN_UNIX03 | ||
| 719 | void	 setkey(const char *) __DARWIN_ALIAS(setkey); | ||
| 720 | #else /* !__DARWIN_UNIX03 */ | ||
| 721 | int	 setkey(const char *); | ||
| 722 | #endif /* __DARWIN_UNIX03 */ | ||
| 723 | int	 setlogin(const char *); | ||
| 724 | void	*setmode(const char *) __DARWIN_ALIAS_STARTING(__MAC_10_6, __IPHONE_2_0, __DARWIN_ALIAS(setmode)); | ||
| 725 | int	 setrgid(gid_t); | ||
| 726 | int	 setruid(uid_t); | ||
| 727 | int	 setsgroups_np(int, const uuid_t); | ||
| 728 | void	 setusershell(void); | ||
| 729 | int	 setwgroups_np(int, const uuid_t); | ||
| 730 | int	 strtofflags(char **, unsigned long *, unsigned long *); | ||
| 731 | int	 swapon(const char *); | ||
| 732 | int	 ttyslot(void); | ||
| 733 | int	 undelete(const char *); | ||
| 734 | int	 unwhiteout(const char *); | ||
| 735 | void	*valloc(size_t);			 | ||
| 736 | |||
| 737 | __WATCHOS_PROHIBITED __TVOS_PROHIBITED | ||
| 738 | __OS_AVAILABILITY_MSG(ios,deprecated=10.0,"syscall(2) is unsupported; " | ||
| 739 | "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") | ||
| 740 | __OS_AVAILABILITY_MSG(macosx,deprecated=10.12,"syscall(2) is unsupported; " | ||
| 741 | "please switch to a supported interface. For SYS_kdebug_trace use kdebug_signpost().") | ||
| 742 | int	 syscall(int, ...); | ||
| 743 | |||
| 744 | extern char *suboptarg;			/* getsubopt(3) external variable */ | ||
| 745 | int	 getsubopt(char **, char * const *, char **); | ||
| 746 | |||
| 747 | /* HFS & HFS Plus semantics system calls go here */ | ||
| 748 | #ifdef __LP64__ | ||
| 749 | int fgetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 750 | int fsetattrlist(int,void*,void*,size_t,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 751 | int getattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(getattrlist); | ||
| 752 | int setattrlist(const char*,void*,void*,size_t,unsigned int) __DARWIN_ALIAS(setattrlist); | ||
| 753 | int exchangedata(const char*,const char*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 754 | int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 755 | |||
| 756 | #else /* __LP64__ */ | ||
| 757 | int	fgetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 758 | int	fsetattrlist(int,void*,void*,size_t,unsigned long) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 759 | int	getattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(getattrlist); | ||
| 760 | int	setattrlist(const char*,void*,void*,size_t,unsigned long) __DARWIN_ALIAS(setattrlist); | ||
| 761 | int exchangedata(const char*,const char*,unsigned long) | ||
| 762 | 		__OSX_DEPRECATED(10.0, 10.13, "use renamex_np with the RENAME_SWAP flag") | ||
| 763 | 		__IOS_DEPRECATED(2.0, 11.0, "use renamex_np with the RENAME_SWAP flag") | ||
| 764 | 		__WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 765 | int	getdirentriesattr(int,void*,void*,size_t,unsigned long*,unsigned long*,unsigned long*,unsigned long) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 766 | |||
| 767 | #endif /* __LP64__ */ | ||
| 768 | |||
| 769 | struct fssearchblock; | ||
| 770 | struct searchstate; | ||
| 771 | |||
| 772 | int	 searchfs(const char *, struct fssearchblock *, unsigned long *, unsigned int, unsigned int, struct searchstate *) __WATCHOS_PROHIBITED __TVOS_PROHIBITED; | ||
| 773 | int	 fsctl(const char *,unsigned long,void*,unsigned int); | ||
| 774 | int	 ffsctl(int,unsigned long,void*,unsigned int) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); | ||
| 775 | |||
| 776 | #define	SYNC_VOLUME_FULLSYNC	0x01	/* Flush data and metadata to platter, not just to disk cache */ | ||
| 777 | #define SYNC_VOLUME_WAIT	0x02	/* Wait for sync to complete */ | ||
| 778 | |||
| 779 | int	fsync_volume_np(int, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); | ||
| 780 | int	sync_volume_np(const char *, int) __OSX_AVAILABLE_STARTING(__MAC_10_8, __IPHONE_6_0); | ||
| 781 | |||
| 782 | extern int optreset; | ||
| 783 | |||
| 784 | __END_DECLS | ||
| 785 | #endif /* __DARWIN_C_LEVEL >= __DARWIN_C_FULL */ | ||
| 786 | |||
| 787 | #endif /* _UNISTD_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/uuid/uuid.h created+79| ... | @@ -0,0 +1,79 @@ | ||
| 1 | /* | ||
| 2 | * Public include file for the UUID library | ||
| 3 | * | ||
| 4 | * Copyright (C) 1996, 1997, 1998 Theodore Ts'o. | ||
| 5 | * | ||
| 6 | * %Begin-Header% | ||
| 7 | * Redistribution and use in source and binary forms, with or without | ||
| 8 | * modification, are permitted provided that the following conditions | ||
| 9 | * are met: | ||
| 10 | * 1. Redistributions of source code must retain the above copyright | ||
| 11 | * notice, and the entire permission notice in its entirety, | ||
| 12 | * including the disclaimer of warranties. | ||
| 13 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in the | ||
| 15 | * documentation and/or other materials provided with the distribution. | ||
| 16 | * 3. The name of the author may not be used to endorse or promote | ||
| 17 | * products derived from this software without specific prior | ||
| 18 | * written permission. | ||
| 19 | * | ||
| 20 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
| 21 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
| 22 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF | ||
| 23 | * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE | ||
| 24 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT | ||
| 26 | * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 27 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
| 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE | ||
| 30 | * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH | ||
| 31 | * DAMAGE. | ||
| 32 | * %End-Header% | ||
| 33 | */ | ||
| 34 | |||
| 35 | #ifndef _UUID_UUID_H | ||
| 36 | #define _UUID_UUID_H | ||
| 37 | |||
| 38 | #include <sys/_types.h> | ||
| 39 | #include <sys/_types/_uuid_t.h> | ||
| 40 | |||
| 41 | #ifndef _UUID_STRING_T | ||
| 42 | #define _UUID_STRING_T | ||
| 43 | typedef __darwin_uuid_string_t uuid_string_t; | ||
| 44 | #endif /* _UUID_STRING_T */ | ||
| 45 | |||
| 46 | #define UUID_DEFINE(name, u0, u1, u2, u3, u4, u5, u6, u7, u8, u9, u10, u11, u12, u13, u14, u15) \ | ||
| 47 | 	static const uuid_t name __attribute__ ((unused)) = {u0,u1,u2,u3,u4,u5,u6,u7,u8,u9,u10,u11,u12,u13,u14,u15} | ||
| 48 | |||
| 49 | UUID_DEFINE(UUID_NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); | ||
| 50 | |||
| 51 | #ifdef __cplusplus | ||
| 52 | extern "C" { | ||
| 53 | #endif | ||
| 54 | |||
| 55 | void uuid_clear(uuid_t uu); | ||
| 56 | |||
| 57 | int uuid_compare(const uuid_t uu1, const uuid_t uu2); | ||
| 58 | |||
| 59 | void uuid_copy(uuid_t dst, const uuid_t src); | ||
| 60 | |||
| 61 | void uuid_generate(uuid_t out); | ||
| 62 | void uuid_generate_random(uuid_t out); | ||
| 63 | void uuid_generate_time(uuid_t out); | ||
| 64 | |||
| 65 | void uuid_generate_early_random(uuid_t out); | ||
| 66 | |||
| 67 | int uuid_is_null(const uuid_t uu); | ||
| 68 | |||
| 69 | int uuid_parse(const uuid_string_t in, uuid_t uu); | ||
| 70 | |||
| 71 | void uuid_unparse(const uuid_t uu, uuid_string_t out); | ||
| 72 | void uuid_unparse_lower(const uuid_t uu, uuid_string_t out); | ||
| 73 | void uuid_unparse_upper(const uuid_t uu, uuid_string_t out); | ||
| 74 | |||
| 75 | #ifdef __cplusplus | ||
| 76 | } | ||
| 77 | #endif | ||
| 78 | |||
| 79 | #endif /* _UUID_UUID_H */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.10-none/xpc/activity.h created+446| ... | @@ -0,0 +1,446 @@ | ||
| 1 | #ifndef __XPC_ACTIVITY_H__ | ||
| 2 | #define __XPC_ACTIVITY_H__ | ||
| 3 | |||
| 4 | #ifndef __XPC_INDIRECT__ | ||
| 5 | #error "Please #include <xpc/xpc.h> instead of this file directly." | ||
| 6 | // For HeaderDoc. | ||
| 7 | #include <xpc/base.h> | ||
| 8 | #endif // __XPC_INDIRECT__ | ||
| 9 | |||
| 10 | #ifdef __BLOCKS__ | ||
| 11 | |||
| 12 | XPC_ASSUME_NONNULL_BEGIN | ||
| 13 | __BEGIN_DECLS | ||
| 14 | |||
| 15 | /* | ||
| 16 | * The following are a collection of keys and values used to set an activity's | ||
| 17 | * execution criteria. | ||
| 18 | */ | ||
| 19 | |||
| 20 | /*! | ||
| 21 | * @constant XPC_ACTIVITY_INTERVAL | ||
| 22 | * An integer property indicating the desired time interval (in seconds) of the | ||
| 23 | * activity. The activity will not be run more than once per time interval. | ||
| 24 | * Due to the nature of XPC Activity finding an opportune time to run | ||
| 25 | * the activity, any two occurrences may be more or less than 'interval' | ||
| 26 | * seconds apart, but on average will be 'interval' seconds apart. | ||
| 27 | * The presence of this key implies the following, unless overridden: | ||
| 28 | * - XPC_ACTIVITY_REPEATING with a value of true | ||
| 29 | * - XPC_ACTIVITY_DELAY with a value of half the 'interval' | ||
| 30 | * The delay enforces a minimum distance between any two occurrences. | ||
| 31 | * - XPC_ACTIVITY_GRACE_PERIOD with a value of half the 'interval'. | ||
| 32 | * The grace period is the amount of time allowed to pass after the end of | ||
| 33 | * the interval before more aggressive scheduling occurs. The grace period | ||
| 34 | * does not increase the size of the interval. | ||
| 35 | */ | ||
| 36 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 37 | XPC_EXPORT | ||
| 38 | const char * const XPC_ACTIVITY_INTERVAL; | ||
| 39 | |||
| 40 | /*! | ||
| 41 | * @constant XPC_ACTIVITY_REPEATING | ||
| 42 | * A boolean property indicating whether this is a repeating activity. | ||
| 43 | */ | ||
| 44 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 45 | XPC_EXPORT | ||
| 46 | const char * const XPC_ACTIVITY_REPEATING; | ||
| 47 | |||
| 48 | /*! | ||
| 49 | * @constant XPC_ACTIVITY_DELAY | ||
| 50 | * An integer property indicating the number of seconds to delay before | ||
| 51 | * beginning the activity. | ||
| 52 | */ | ||
| 53 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 54 | XPC_EXPORT | ||
| 55 | const char * const XPC_ACTIVITY_DELAY; | ||
| 56 | |||
| 57 | /*! | ||
| 58 | * @constant XPC_ACTIVITY_GRACE_PERIOD | ||
| 59 | * An integer property indicating the number of seconds to allow as a grace | ||
| 60 | * period before the scheduling of the activity becomes more aggressive. | ||
| 61 | */ | ||
| 62 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 63 | XPC_EXPORT | ||
| 64 | const char * const XPC_ACTIVITY_GRACE_PERIOD; | ||
| 65 | |||
| 66 | |||
| 67 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 68 | XPC_EXPORT | ||
| 69 | const int64_t XPC_ACTIVITY_INTERVAL_1_MIN; | ||
| 70 | |||
| 71 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 72 | XPC_EXPORT | ||
| 73 | const int64_t XPC_ACTIVITY_INTERVAL_5_MIN; | ||
| 74 | |||
| 75 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 76 | XPC_EXPORT | ||
| 77 | const int64_t XPC_ACTIVITY_INTERVAL_15_MIN; | ||
| 78 | |||
| 79 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 80 | XPC_EXPORT | ||
| 81 | const int64_t XPC_ACTIVITY_INTERVAL_30_MIN; | ||
| 82 | |||
| 83 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 84 | XPC_EXPORT | ||
| 85 | const int64_t XPC_ACTIVITY_INTERVAL_1_HOUR; | ||
| 86 | |||
| 87 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 88 | XPC_EXPORT | ||
| 89 | const int64_t XPC_ACTIVITY_INTERVAL_4_HOURS; | ||
| 90 | |||
| 91 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 92 | XPC_EXPORT | ||
| 93 | const int64_t XPC_ACTIVITY_INTERVAL_8_HOURS; | ||
| 94 | |||
| 95 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 96 | XPC_EXPORT | ||
| 97 | const int64_t XPC_ACTIVITY_INTERVAL_1_DAY; | ||
| 98 | |||
| 99 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 100 | XPC_EXPORT | ||
| 101 | const int64_t XPC_ACTIVITY_INTERVAL_7_DAYS; | ||
| 102 | |||
| 103 | /*! | ||
| 104 | * @constant XPC_ACTIVITY_PRIORITY | ||
| 105 | * A string property indicating the priority of the activity. | ||
| 106 | */ | ||
| 107 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 108 | XPC_EXPORT | ||
| 109 | const char * const XPC_ACTIVITY_PRIORITY; | ||
| 110 | |||
| 111 | /*! | ||
| 112 | * @constant XPC_ACTIVITY_PRIORITY_MAINTENANCE | ||
| 113 | * A string indicating activity is maintenance priority. | ||
| 114 | * | ||
| 115 | * Maintenance priority is intended for user-invisible maintenance tasks | ||
| 116 | * such as garbage collection or optimization. | ||
| 117 | * | ||
| 118 | * Maintenance activities are not permitted to run if the device thermal | ||
| 119 | * condition exceeds a nominal level or if the battery level is lower than 20%. | ||
| 120 | * In Low Power Mode (on supported devices), maintenance activities are not | ||
| 121 | * permitted to run while the device is on battery, or plugged in and the | ||
| 122 | * battery level is lower than 30%. | ||
| 123 | */ | ||
| 124 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 125 | XPC_EXPORT | ||
| 126 | const char * const XPC_ACTIVITY_PRIORITY_MAINTENANCE; | ||
| 127 | |||
| 128 | /*! | ||
| 129 | * @constant XPC_ACTIVITY_PRIORITY_UTILITY | ||
| 130 | * A string indicating activity is utility priority. | ||
| 131 | * | ||
| 132 | * Utility priority is intended for user-visible tasks such as fetching data | ||
| 133 | * from the network, copying files, or importing data. | ||
| 134 | * | ||
| 135 | * Utility activities are not permitted to run if the device thermal condition | ||
| 136 | * exceeds a moderate level or if the battery level is less than 10%. In Low | ||
| 137 | * Power Mode (on supported devices) when on battery power, utility activities | ||
| 138 | * are only permitted when they are close to their deadline (90% of their time | ||
| 139 | * window has elapsed). | ||
| 140 | */ | ||
| 141 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 142 | XPC_EXPORT | ||
| 143 | const char * const XPC_ACTIVITY_PRIORITY_UTILITY; | ||
| 144 | |||
| 145 | /*! | ||
| 146 | * @constant XPC_ACTIVITY_ALLOW_BATTERY | ||
| 147 | * A Boolean value indicating whether the activity should be allowed to run | ||
| 148 | * while the computer is on battery power. The default value is false for | ||
| 149 | * maintenance priority activity and true for utility priority activity. | ||
| 150 | */ | ||
| 151 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 152 | XPC_EXPORT | ||
| 153 | const char * const XPC_ACTIVITY_ALLOW_BATTERY; | ||
| 154 | |||
| 155 | /*! | ||
| 156 | * @constant XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP | ||
| 157 | * A Boolean value indicating whether the activity should only be performed | ||
| 158 | * while device appears to be asleep. Note that the definition of screen sleep | ||
| 159 | * may vary by platform and may include states where the device is known to be | ||
| 160 | * idle despite the fact that the display itself is still powered. Defaults to | ||
| 161 | * false. | ||
| 162 | */ | ||
| 163 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 164 | XPC_EXPORT | ||
| 165 | const char * const XPC_ACTIVITY_REQUIRE_SCREEN_SLEEP; // bool | ||
| 166 | |||
| 167 | /*! | ||
| 168 | * @constant XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL | ||
| 169 | * An integer percentage of minimum battery charge required to allow the | ||
| 170 | * activity to run. A default minimum battery level is determined by the | ||
| 171 | * system. | ||
| 172 | */ | ||
| 173 | __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, | ||
| 174 | 	"REQUIRE_BATTERY_LEVEL is not implemented") | ||
| 175 | XPC_EXPORT | ||
| 176 | const char * const XPC_ACTIVITY_REQUIRE_BATTERY_LEVEL; // int (%) | ||
| 177 | |||
| 178 | /*! | ||
| 179 | * @constant XPC_ACTIVITY_REQUIRE_HDD_SPINNING | ||
| 180 | * A Boolean value indicating whether the activity should only be performed | ||
| 181 | * while the hard disk drive (HDD) is spinning. Computers with flash storage | ||
| 182 | * are considered to be equivalent to HDD spinning. Defaults to false. | ||
| 183 | */ | ||
| 184 | __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_9, __MAC_10_9, __IPHONE_7_0, __IPHONE_7_0, | ||
| 185 | 	"REQUIRE_HDD_SPINNING is not implemented") | ||
| 186 | XPC_EXPORT | ||
| 187 | const char * const XPC_ACTIVITY_REQUIRE_HDD_SPINNING; // bool | ||
| 188 | |||
| 189 | /*! | ||
| 190 | * @define XPC_TYPE_ACTIVITY | ||
| 191 | * A type representing the XPC activity object. | ||
| 192 | */ | ||
| 193 | #define XPC_TYPE_ACTIVITY (&_xpc_type_activity) | ||
| 194 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 195 | XPC_EXPORT | ||
| 196 | XPC_TYPE(_xpc_type_activity); | ||
| 197 | |||
| 198 | /*! | ||
| 199 | * @typedef xpc_activity_t | ||
| 200 | * | ||
| 201 | * @abstract | ||
| 202 | * An XPC activity object. | ||
| 203 | * | ||
| 204 | * @discussion | ||
| 205 | * This object represents a set of execution criteria and a current execution | ||
| 206 | * state for background activity on the system. Once an activity is registered, | ||
| 207 | * the system will evaluate its criteria to determine whether the activity is | ||
| 208 | * eligible to run under current system conditions. When an activity becomes | ||
| 209 | * eligible to run, its execution state will be updated and an invocation of | ||
| 210 | * its handler block will be made. | ||
| 211 | */ | ||
| 212 | XPC_DECL(xpc_activity); | ||
| 213 | |||
| 214 | /*! | ||
| 215 | * @typedef xpc_activity_handler_t | ||
| 216 | * | ||
| 217 | * @abstract | ||
| 218 | * A block that is called when an XPC activity becomes eligible to run. | ||
| 219 | */ | ||
| 220 | XPC_NONNULL1 | ||
| 221 | typedef void (^xpc_activity_handler_t)(xpc_activity_t activity); | ||
| 222 | |||
| 223 | /*! | ||
| 224 | * @constant XPC_ACTIVITY_CHECK_IN | ||
| 225 | * This constant may be passed to xpc_activity_register() as the criteria | ||
| 226 | * dictionary in order to check in with the system for previously registered | ||
| 227 | * activity using the same identifier (for example, an activity taken from a | ||
| 228 | * launchd property list). | ||
| 229 | */ | ||
| 230 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 231 | XPC_EXPORT | ||
| 232 | const xpc_object_t XPC_ACTIVITY_CHECK_IN; | ||
| 233 | |||
| 234 | /*! | ||
| 235 | * @function xpc_activity_register | ||
| 236 | * | ||
| 237 | * @abstract | ||
| 238 | * Registers an activity with the system. | ||
| 239 | * | ||
| 240 | * @discussion | ||
| 241 | * Registers a new activity with the system. The criteria of the activity are | ||
| 242 | * described by the dictionary passed to this function. If an activity with the | ||
| 243 | * same identifier already exists, the criteria provided override the existing | ||
| 244 | * criteria unless the special dictionary XPC_ACTIVITY_CHECK_IN is used. The | ||
| 245 | * XPC_ACTIVITY_CHECK_IN dictionary instructs the system to first look up an | ||
| 246 | * existing activity without modifying its criteria. Once the existing activity | ||
| 247 | * is found (or a new one is created with an empty set of criteria) the handler | ||
| 248 | * will be called with an activity object in the XPC_ACTIVITY_STATE_CHECK_IN | ||
| 249 | * state. | ||
| 250 | * | ||
| 251 | * @param identifier | ||
| 252 | * A unique identifier for the activity. Each application has its own namespace. | ||
| 253 | * The identifier should remain constant across registrations, relaunches of | ||
| 254 | * the application, and reboots. It should identify the kind of work being done, | ||
| 255 | * not a particular invocation of the work. | ||
| 256 | * | ||
| 257 | * @param criteria | ||
| 258 | * A dictionary of criteria for the activity. | ||
| 259 | * | ||
| 260 | * @param handler | ||
| 261 | * The handler block to be called when the activity changes state to one of the | ||
| 262 | * following states: | ||
| 263 | * - XPC_ACTIVITY_STATE_CHECK_IN (optional) | ||
| 264 | * - XPC_ACTIVITY_STATE_RUN | ||
| 265 | * | ||
| 266 | * The handler block is never invoked reentrantly. It will be invoked on a | ||
| 267 | * dispatch queue with an appropriate priority to perform the activity. | ||
| 268 | */ | ||
| 269 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 270 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 XPC_NONNULL3 | ||
| 271 | void | ||
| 272 | xpc_activity_register(const char *identifier, xpc_object_t criteria, | ||
| 273 | 	xpc_activity_handler_t handler); | ||
| 274 | |||
| 275 | /*! | ||
| 276 | * @function xpc_activity_copy_criteria | ||
| 277 | * | ||
| 278 | * @abstract | ||
| 279 | * Returns an XPC dictionary describing the execution criteria of an activity. | ||
| 280 | * This will return NULL in cases where the activity has already completed, e.g. | ||
| 281 | * when checking in to an event that finished and was not rescheduled. | ||
| 282 | */ | ||
| 283 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 284 | XPC_EXPORT XPC_WARN_RESULT XPC_RETURNS_RETAINED XPC_NONNULL1 | ||
| 285 | xpc_object_t _Nullable | ||
| 286 | xpc_activity_copy_criteria(xpc_activity_t activity); | ||
| 287 | |||
| 288 | /*! | ||
| 289 | * @function xpc_activity_set_criteria | ||
| 290 | * | ||
| 291 | * @abstract | ||
| 292 | * Modifies the execution criteria of an activity. | ||
| 293 | */ | ||
| 294 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 295 | XPC_EXPORT XPC_NONNULL1 XPC_NONNULL2 | ||
| 296 | void | ||
| 297 | xpc_activity_set_criteria(xpc_activity_t activity, xpc_object_t criteria); | ||
| 298 | |||
| 299 | /*! | ||
| 300 | * @enum xpc_activity_state_t | ||
| 301 | * An activity is defined to be in one of the following states. Applications | ||
| 302 | * may check the current state of the activity using xpc_activity_get_state() | ||
| 303 | * in the handler block provided to xpc_activity_register(). | ||
| 304 | * | ||
| 305 | * The application can modify the state of the activity by calling | ||
| 306 | * xpc_activity_set_state() with one of the following: | ||
| 307 | * - XPC_ACTIVITY_STATE_DEFER | ||
| 308 | * - XPC_ACTIVITY_STATE_CONTINUE | ||
| 309 | * - XPC_ACTIVITY_STATE_DONE | ||
| 310 | * | ||
| 311 | * @constant XPC_ACTIVITY_STATE_CHECK_IN | ||
| 312 | * An activity in this state has just completed a checkin with the system after | ||
| 313 | * XPC_ACTIVITY_CHECK_IN was provided as the criteria dictionary to | ||
| 314 | * xpc_activity_register. The state gives the application an opportunity to | ||
| 315 | * inspect and modify the activity's criteria. | ||
| 316 | * | ||
| 317 | * @constant XPC_ACTIVITY_STATE_WAIT | ||
| 318 | * An activity in this state is waiting for an opportunity to run. This value | ||
| 319 | * is never returned within the activity's handler block, as the block is | ||
| 320 | * invoked in response to XPC_ACTIVITY_STATE_CHECK_IN or XPC_ACTIVITY_STATE_RUN. | ||
| 321 | * | ||
| 322 | * Note: | ||
| 323 | * A launchd job may idle exit while an activity is in the wait state and be | ||
| 324 | * relaunched in response to the activity becoming runnable. The launchd job | ||
| 325 | * simply needs to re-register for the activity on its next launch by passing | ||
| 326 | * XPC_ACTIVITY_STATE_CHECK_IN to xpc_activity_register(). | ||
| 327 | * | ||
| 328 | * @constant XPC_ACTIVITY_STATE_RUN | ||
| 329 | * An activity in this state is eligible to run based on its criteria. | ||
| 330 | * | ||
| 331 | * @constant XPC_ACTIVITY_STATE_DEFER | ||
| 332 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 333 | * that the activity should be deferred (placed back into the WAIT state) until | ||
| 334 | * a time when its criteria are met again. Deferring an activity does not reset | ||
| 335 | * any of its time-based criteria (in other words, it will remain past due). | ||
| 336 | * | ||
| 337 | * IMPORTANT: | ||
| 338 | * This should be done in response to observing xpc_activity_should_defer(). | ||
| 339 | * It should not be done unilaterally. If you determine that conditions are bad | ||
| 340 | * to do your activity's work for reasons you can't express in a criteria | ||
| 341 | * dictionary, you should set the activity's state to XPC_ACTIVITY_STATE_DONE. | ||
| 342 | * | ||
| 343 | * | ||
| 344 | * @constant XPC_ACTIVITY_STATE_CONTINUE | ||
| 345 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 346 | * that the activity will continue its operation beyond the return of its | ||
| 347 | * handler block. This can be used to extend an activity to include asynchronous | ||
| 348 | * operations. The activity's handler block will not be invoked again until the | ||
| 349 | * state has been updated to either XPC_ACTIVITY_STATE_DEFER or, in the case | ||
| 350 | * of repeating activity, XPC_ACTIVITY_STATE_DONE. | ||
| 351 | * | ||
| 352 | * @constant XPC_ACTIVITY_STATE_DONE | ||
| 353 | * An application may pass this value to xpc_activity_set_state() to indicate | ||
| 354 | * that the activity has completed. For non-repeating activity, the resources | ||
| 355 | * associated with the activity will be automatically released upon return from | ||
| 356 | * the handler block. For repeating activity, timers present in the activity's | ||
| 357 | * criteria will be reset. | ||
| 358 | */ | ||
| 359 | enum { | ||
| 360 | 	XPC_ACTIVITY_STATE_CHECK_IN, | ||
| 361 | 	XPC_ACTIVITY_STATE_WAIT, | ||
| 362 | 	XPC_ACTIVITY_STATE_RUN, | ||
| 363 | 	XPC_ACTIVITY_STATE_DEFER, | ||
| 364 | 	XPC_ACTIVITY_STATE_CONTINUE, | ||
| 365 | 	XPC_ACTIVITY_STATE_DONE, | ||
| 366 | }; | ||
| 367 | typedef long xpc_activity_state_t; | ||
| 368 | |||
| 369 | /*! | ||
| 370 | * @function xpc_activity_get_state | ||
| 371 | * | ||
| 372 | * @abstract | ||
| 373 | * Returns the current state of an activity. | ||
| 374 | */ | ||
| 375 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 376 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 377 | xpc_activity_state_t | ||
| 378 | xpc_activity_get_state(xpc_activity_t activity); | ||
| 379 | |||
| 380 | /*! | ||
| 381 | * @function xpc_activity_set_state | ||
| 382 | * | ||
| 383 | * @abstract | ||
| 384 | * Updates the current state of an activity. | ||
| 385 | * | ||
| 386 | * @return | ||
| 387 | * Returns true if the state was successfully updated; otherwise, returns | ||
| 388 | * false if the requested state transition is not valid. | ||
| 389 | */ | ||
| 390 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 391 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 392 | bool | ||
| 393 | xpc_activity_set_state(xpc_activity_t activity, xpc_activity_state_t state); | ||
| 394 | |||
| 395 | /*! | ||
| 396 | * @function xpc_activity_should_defer | ||
| 397 | * | ||
| 398 | * @abstract | ||
| 399 | * Test whether an activity should be deferred. | ||
| 400 | * | ||
| 401 | * @discussion | ||
| 402 | * This function may be used to test whether the criteria of a long-running | ||
| 403 | * activity are still satisfied. If not, the system indicates that the | ||
| 404 | * application should defer the activity. The application may acknowledge the | ||
| 405 | * deferral by calling xpc_activity_set_state() with XPC_ACTIVITY_STATE_DEFER. | ||
| 406 | * Once deferred, the system will place the activity back into the WAIT state | ||
| 407 | * and re-invoke the handler block at the earliest opportunity when the criteria | ||
| 408 | * are once again satisfied. | ||
| 409 | * | ||
| 410 | * @return | ||
| 411 | * Returns true if the activity should be deferred. | ||
| 412 | */ | ||
| 413 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 414 | XPC_EXPORT XPC_WARN_RESULT XPC_NONNULL1 | ||
| 415 | bool | ||
| 416 | xpc_activity_should_defer(xpc_activity_t activity); | ||
| 417 | |||
| 418 | /*! | ||
| 419 | * @function xpc_activity_unregister | ||
| 420 | * | ||
| 421 | * @abstract | ||
| 422 | * Unregisters an activity found by its identifier. | ||
| 423 | * | ||
| 424 | * @discussion | ||
| 425 | * A dynamically registered activity will be deleted in response to this call. | ||
| 426 | * Statically registered activity (from a launchd property list) will be | ||
| 427 | * deleted until the job is next loaded (e.g. at next boot). | ||
| 428 | * | ||
| 429 | * Unregistering an activity has no effect on any outstanding xpc_activity_t | ||
| 430 | * objects or any currently executing xpc_activity_handler_t blocks; however, | ||
| 431 | * no new handler block invocations will be made after it is unregistered. | ||
| 432 | * | ||
| 433 | * @param identifier | ||
| 434 | * The identifier of the activity to unregister. | ||
| 435 | */ | ||
| 436 | __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_7_0) | ||
| 437 | XPC_EXPORT XPC_NONNULL1 | ||
| 438 | void | ||
| 439 | xpc_activity_unregister(const char *identifier); | ||
| 440 | |||
| 441 | __END_DECLS | ||
| 442 | XPC_ASSUME_NONNULL_END | ||
| 443 | |||
| 444 | #endif // __BLOCKS__ | ||
| 445 | |||
| 446 | #endif // __XPC_ACTIVITY_H__ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/_limits.h+4| ... | @@ -22,6 +22,10 @@ | ... | @@ -22,6 +22,10 @@ |
| 22 | #ifndef _I386__LIMITS_H_ | 22 | #ifndef _I386__LIMITS_H_ |
| 23 | #define _I386__LIMITS_H_ | 23 | #define _I386__LIMITS_H_ |
| 24 | 24 | ||
| 25 | #if defined (__i386__) || defined (__x86_64__) | ||
| 26 | |||
| 25 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ | 27 | #define __DARWIN_CLK_TCK 100 /* ticks per second */ |
| 26 | 28 | ||
| 29 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 30 | |||
| 27 | #endif /* _I386__LIMITS_H_ */ | 31 | #endif /* _I386__LIMITS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/_mcontext.h+4| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #ifndef __I386_MCONTEXT_H_ | 29 | #ifndef __I386_MCONTEXT_H_ |
| 30 | #define __I386_MCONTEXT_H_ | 30 | #define __I386_MCONTEXT_H_ |
| 31 | 31 | ||
| 32 | #if defined (__i386__) || defined (__x86_64__) | ||
| 33 | |||
| 32 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ | 34 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 33 | #include <sys/appleapiopts.h> | 35 | #include <sys/appleapiopts.h> |
| 34 | #include <mach/machine/_structs.h> | 36 | #include <mach/machine/_structs.h> |
| ... | @@ -209,4 +211,6 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; | ... | @@ -209,4 +211,6 @@ typedef _STRUCT_MCONTEXT32 *mcontext_t; |
| 209 | #endif | 211 | #endif |
| 210 | #endif /* _MCONTEXT_T */ | 212 | #endif /* _MCONTEXT_T */ |
| 211 | 213 | ||
| 214 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 215 | |||
| 212 | #endif /* __I386_MCONTEXT_H_ */ | 216 | #endif /* __I386_MCONTEXT_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/_param.h+3| ... | @@ -29,6 +29,8 @@ | ... | @@ -29,6 +29,8 @@ |
| 29 | #ifndef _I386__PARAM_H_ | 29 | #ifndef _I386__PARAM_H_ |
| 30 | #define _I386__PARAM_H_ | 30 | #define _I386__PARAM_H_ |
| 31 | 31 | ||
| 32 | #if defined (__i386__) || defined (__x86_64__) | ||
| 33 | |||
| 32 | #include <i386/_types.h> | 34 | #include <i386/_types.h> |
| 33 | 35 | ||
| 34 | /* | 36 | /* |
| ... | @@ -42,5 +44,6 @@ | ... | @@ -42,5 +44,6 @@ |
| 42 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) | 44 | #define __DARWIN_ALIGNBYTES32 (sizeof(__uint32_t) - 1) |
| 43 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) | 45 | #define __DARWIN_ALIGN32(p) ((__darwin_size_t)((__darwin_size_t)(p) + __DARWIN_ALIGNBYTES32) &~ __DARWIN_ALIGNBYTES32) |
| 44 | 46 | ||
| 47 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 45 | 48 | ||
| 46 | #endif /* _I386__PARAM_H_ */ | 49 | #endif /* _I386__PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/_types.h+4| ... | @@ -28,6 +28,8 @@ | ... | @@ -28,6 +28,8 @@ |
| 28 | #ifndef _BSD_I386__TYPES_H_ | 28 | #ifndef _BSD_I386__TYPES_H_ |
| 29 | #define _BSD_I386__TYPES_H_ | 29 | #define _BSD_I386__TYPES_H_ |
| 30 | 30 | ||
| 31 | #if defined (__i386__) || defined (__x86_64__) | ||
| 32 | |||
| 31 | /* | 33 | /* |
| 32 | * This header file contains integer types. It's intended to also contain | 34 | * This header file contains integer types. It's intended to also contain |
| 33 | * flotaing point and other arithmetic types, as needed, later. | 35 | * flotaing point and other arithmetic types, as needed, later. |
| ... | @@ -119,4 +121,6 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ | ... | @@ -119,4 +121,6 @@ typedef __uint32_t __darwin_socklen_t; /* socklen_t (duh) */ |
| 119 | typedef long __darwin_ssize_t; /* byte count or error */ | 121 | typedef long __darwin_ssize_t; /* byte count or error */ |
| 120 | typedef long __darwin_time_t; /* time() */ | 122 | typedef long __darwin_time_t; /* time() */ |
| 121 | 123 | ||
| 124 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 125 | |||
| 122 | #endif /* _BSD_I386__TYPES_H_ */ | 126 | #endif /* _BSD_I386__TYPES_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/eflags.h+4| ... | @@ -59,6 +59,8 @@ | ... | @@ -59,6 +59,8 @@ |
| 59 | #ifndef _I386_EFLAGS_H_ | 59 | #ifndef _I386_EFLAGS_H_ |
| 60 | #define _I386_EFLAGS_H_ | 60 | #define _I386_EFLAGS_H_ |
| 61 | 61 | ||
| 62 | #if defined (__i386__) || defined (__x86_64__) | ||
| 63 | |||
| 62 | /* | 64 | /* |
| 63 | *	i386 flags register | 65 | *	i386 flags register |
| 64 | */ | 66 | */ |
| ... | @@ -91,4 +93,6 @@ | ... | @@ -91,4 +93,6 @@ |
| 91 | #define EFL_USER_SET (EFL_IF) | 93 | #define EFL_USER_SET (EFL_IF) |
| 92 | #define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) | 94 | #define EFL_USER_CLEAR (EFL_IOPL|EFL_NT|EFL_RF) |
| 93 | 95 | ||
| 96 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 97 | |||
| 94 | #endif /* _I386_EFLAGS_H_ */ | 98 | #endif /* _I386_EFLAGS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/endian.h+3| ... | @@ -66,6 +66,8 @@ | ... | @@ -66,6 +66,8 @@ |
| 66 | #ifndef _I386__ENDIAN_H_ | 66 | #ifndef _I386__ENDIAN_H_ |
| 67 | #define _I386__ENDIAN_H_ | 67 | #define _I386__ENDIAN_H_ |
| 68 | 68 | ||
| 69 | #if defined (__i386__) || defined (__x86_64__) | ||
| 70 | |||
| 69 | #include <sys/cdefs.h> | 71 | #include <sys/cdefs.h> |
| 70 | /* | 72 | /* |
| 71 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. | 73 | * Define _NOQUAD if the compiler does NOT support 64-bit integers. |
| ... | @@ -99,4 +101,5 @@ | ... | @@ -99,4 +101,5 @@ |
| 99 | #include <sys/_endian.h> | 101 | #include <sys/_endian.h> |
| 100 | 102 | ||
| 101 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ | 103 | #endif /* defined(KERNEL) || (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) */ |
| 104 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 102 | #endif /* !_I386__ENDIAN_H_ */ | 105 | #endif /* !_I386__ENDIAN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/limits.h+4| ... | @@ -36,6 +36,8 @@ | ... | @@ -36,6 +36,8 @@ |
| 36 | #ifndef _I386_LIMITS_H_ | 36 | #ifndef _I386_LIMITS_H_ |
| 37 | #define _I386_LIMITS_H_ | 37 | #define _I386_LIMITS_H_ |
| 38 | 38 | ||
| 39 | #if defined (__i386__) || defined (__x86_64__) | ||
| 40 | |||
| 39 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> |
| 40 | #include <i386/_limits.h> | 42 | #include <i386/_limits.h> |
| 41 | 43 | ||
| ... | @@ -104,4 +106,6 @@ | ... | @@ -104,4 +106,6 @@ |
| 104 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ | 106 | #endif /* (!_POSIX_C_SOURCE && !_XOPEN_SOURCE) || _DARWIN_C_SOURCE */ |
| 105 | #endif /* !_ANSI_SOURCE */ | 107 | #endif /* !_ANSI_SOURCE */ |
| 106 | 108 | ||
| 109 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 110 | |||
| 107 | #endif /* _I386_LIMITS_H_ */ | 111 | #endif /* _I386_LIMITS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/param.h+4| ... | @@ -72,6 +72,8 @@ | ... | @@ -72,6 +72,8 @@ |
| 72 | #ifndef _I386_PARAM_H_ | 72 | #ifndef _I386_PARAM_H_ |
| 73 | #define _I386_PARAM_H_ | 73 | #define _I386_PARAM_H_ |
| 74 | 74 | ||
| 75 | #if defined (__i386__) || defined (__x86_64__) | ||
| 76 | |||
| 75 | #include <i386/_param.h> | 77 | #include <i386/_param.h> |
| 76 | 78 | ||
| 77 | /* | 79 | /* |
| ... | @@ -168,4 +170,6 @@ | ... | @@ -168,4 +170,6 @@ |
| 168 | #define DELAY(n) { int N = (n); while (--N > 0); } | 170 | #define DELAY(n) { int N = (n); while (--N > 0); } |
| 169 | #endif /* defined(KERNEL) || defined(STANDALONE) */ | 171 | #endif /* defined(KERNEL) || defined(STANDALONE) */ |
| 170 | 172 | ||
| 173 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 174 | |||
| 171 | #endif /* _I386_PARAM_H_ */ | 175 | #endif /* _I386_PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/signal.h+4| ... | @@ -33,6 +33,8 @@ | ... | @@ -33,6 +33,8 @@ |
| 33 | #ifndef _I386_SIGNAL_H_ | 33 | #ifndef _I386_SIGNAL_H_ |
| 34 | #define _I386_SIGNAL_H_ 1 | 34 | #define _I386_SIGNAL_H_ 1 |
| 35 | 35 | ||
| 36 | #if defined (__i386__) || defined (__x86_64__) | ||
| 37 | |||
| 36 | #include <sys/cdefs.h> | 38 | #include <sys/cdefs.h> |
| 37 | 39 | ||
| 38 | #ifndef _ANSI_SOURCE | 40 | #ifndef _ANSI_SOURCE |
| ... | @@ -40,4 +42,6 @@ typedef int sig_atomic_t; | ... | @@ -40,4 +42,6 @@ typedef int sig_atomic_t; |
| 40 | 42 | ||
| 41 | #endif /* ! _ANSI_SOURCE */ | 43 | #endif /* ! _ANSI_SOURCE */ |
| 42 | 44 | ||
| 45 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 46 | |||
| 43 | #endif /* _I386_SIGNAL_H_ */ | 47 | #endif /* _I386_SIGNAL_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/i386/types.h+6-2| ... | @@ -63,9 +63,12 @@ | ... | @@ -63,9 +63,12 @@ |
| 63 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 | 63 | *	@(#)types.h	8.3 (Berkeley) 1/5/94 |
| 64 | */ | 64 | */ |
| 65 | 65 | ||
| 66 | #ifndef _MACHTYPES_H_ | 66 | #ifndef _I386_MACHTYPES_H_ |
| 67 | #define _I386_MACHTYPES_H_ | ||
| 67 | #define _MACHTYPES_H_ | 68 | #define _MACHTYPES_H_ |
| 68 | 69 | ||
| 70 | #if defined (__i386__) || defined (__x86_64__) | ||
| 71 | |||
| 69 | #ifndef __ASSEMBLER__ | 72 | #ifndef __ASSEMBLER__ |
| 70 | #include <i386/_types.h> | 73 | #include <i386/_types.h> |
| 71 | #include <sys/cdefs.h> | 74 | #include <sys/cdefs.h> |
| ... | @@ -111,4 +114,5 @@ typedef int64_t user_off_t; | ... | @@ -111,4 +114,5 @@ typedef int64_t user_off_t; |
| 111 | typedef u_int64_t syscall_arg_t; | 114 | typedef u_int64_t syscall_arg_t; |
| 112 | 115 | ||
| 113 | #endif /* __ASSEMBLER__ */ | 116 | #endif /* __ASSEMBLER__ */ |
| 114 | #endif /* _MACHTYPES_H_ */ | ||
| \ No newline at end of file | |||
| 117 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 118 | #endif /* _I386_MACHTYPES_H_ */ | ||
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/_structs.h+4| ... | @@ -32,6 +32,8 @@ | ... | @@ -32,6 +32,8 @@ |
| 32 | #ifndef	_MACH_I386__STRUCTS_H_ | 32 | #ifndef	_MACH_I386__STRUCTS_H_ |
| 33 | #define	_MACH_I386__STRUCTS_H_ | 33 | #define	_MACH_I386__STRUCTS_H_ |
| 34 | 34 | ||
| 35 | #if defined (__i386__) || defined (__x86_64__) | ||
| 36 | |||
| 35 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ | 37 | #include <sys/cdefs.h> /* __DARWIN_UNIX03 */ |
| 36 | #include <machine/types.h> /* __uint8_t */ | 38 | #include <machine/types.h> /* __uint8_t */ |
| 37 | 39 | ||
| ... | @@ -1309,4 +1311,6 @@ _STRUCT_X86_CPMU_STATE64 | ... | @@ -1309,4 +1311,6 @@ _STRUCT_X86_CPMU_STATE64 |
| 1309 | }; | 1311 | }; |
| 1310 | #endif /* !__DARWIN_UNIX03 */ | 1312 | #endif /* !__DARWIN_UNIX03 */ |
| 1311 | 1313 | ||
| 1314 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 1315 | |||
| 1312 | #endif /* _MACH_I386__STRUCTS_H_ */ | 1316 | #endif /* _MACH_I386__STRUCTS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/boolean.h+4| ... | @@ -65,10 +65,14 @@ | ... | @@ -65,10 +65,14 @@ |
| 65 | #ifndef _MACH_I386_BOOLEAN_H_ | 65 | #ifndef _MACH_I386_BOOLEAN_H_ |
| 66 | #define _MACH_I386_BOOLEAN_H_ | 66 | #define _MACH_I386_BOOLEAN_H_ |
| 67 | 67 | ||
| 68 | #if defined (__i386__) || defined (__x86_64__) | ||
| 69 | |||
| 68 | #if defined(__x86_64__) && !defined(KERNEL) | 70 | #if defined(__x86_64__) && !defined(KERNEL) |
| 69 | typedef unsigned int boolean_t; | 71 | typedef unsigned int boolean_t; |
| 70 | #else | 72 | #else |
| 71 | typedef int boolean_t; | 73 | typedef int boolean_t; |
| 72 | #endif | 74 | #endif |
| 73 | 75 | ||
| 76 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 77 | |||
| 74 | #endif /* _MACH_I386_BOOLEAN_H_ */ | 78 | #endif /* _MACH_I386_BOOLEAN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/exception.h+4| ... | @@ -59,6 +59,8 @@ | ... | @@ -59,6 +59,8 @@ |
| 59 | #ifndef _MACH_I386_EXCEPTION_H_ | 59 | #ifndef _MACH_I386_EXCEPTION_H_ |
| 60 | #define _MACH_I386_EXCEPTION_H_ | 60 | #define _MACH_I386_EXCEPTION_H_ |
| 61 | 61 | ||
| 62 | #if defined (__i386__) || defined (__x86_64__) | ||
| 63 | |||
| 62 | /* | 64 | /* |
| 63 | * No machine dependent types for the 80386 | 65 | * No machine dependent types for the 80386 |
| 64 | */ | 66 | */ |
| ... | @@ -132,4 +134,6 @@ | ... | @@ -132,4 +134,6 @@ |
| 132 | */ | 134 | */ |
| 133 | #define EXC_MASK_MACHINE 0 | 135 | #define EXC_MASK_MACHINE 0 |
| 134 | 136 | ||
| 137 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 138 | |||
| 135 | #endif /* _MACH_I386_EXCEPTION_H_ */ | 139 | #endif /* _MACH_I386_EXCEPTION_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/fp_reg.h+4| ... | @@ -59,6 +59,8 @@ | ... | @@ -59,6 +59,8 @@ |
| 59 | #ifndef _I386_FP_SAVE_H_ | 59 | #ifndef _I386_FP_SAVE_H_ |
| 60 | #define _I386_FP_SAVE_H_ | 60 | #define _I386_FP_SAVE_H_ |
| 61 | 61 | ||
| 62 | #if defined (__i386__) || defined (__x86_64__) | ||
| 63 | |||
| 62 | /* | 64 | /* |
| 63 | * Control register | 65 | * Control register |
| 64 | */ | 66 | */ |
| ... | @@ -115,4 +117,6 @@ | ... | @@ -115,4 +117,6 @@ |
| 115 | #define FP_387 3 /* 80387 or 80486 */ | 117 | #define FP_387 3 /* 80387 or 80486 */ |
| 116 | #define FP_FXSR 4 /* Fast save/restore SIMD Extension */ | 118 | #define FP_FXSR 4 /* Fast save/restore SIMD Extension */ |
| 117 | 119 | ||
| 120 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 121 | |||
| 118 | #endif /* _I386_FP_SAVE_H_ */ | 122 | #endif /* _I386_FP_SAVE_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/kern_return.h+4| ... | @@ -67,8 +67,12 @@ | ... | @@ -67,8 +67,12 @@ |
| 67 | #ifndef _MACH_I386_KERN_RETURN_H_ | 67 | #ifndef _MACH_I386_KERN_RETURN_H_ |
| 68 | #define _MACH_I386_KERN_RETURN_H_ | 68 | #define _MACH_I386_KERN_RETURN_H_ |
| 69 | 69 | ||
| 70 | #if defined (__i386__) || defined (__x86_64__) | ||
| 71 | |||
| 70 | #ifndef ASSEMBLER | 72 | #ifndef ASSEMBLER |
| 71 | typedef int kern_return_t; | 73 | typedef int kern_return_t; |
| 72 | #endif /* ASSEMBLER */ | 74 | #endif /* ASSEMBLER */ |
| 73 | 75 | ||
| 76 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 77 | |||
| 74 | #endif /* _MACH_I386_KERN_RETURN_H_ */ | 78 | #endif /* _MACH_I386_KERN_RETURN_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/processor_info.h+4| ... | @@ -34,4 +34,8 @@ | ... | @@ -34,4 +34,8 @@ |
| 34 | #ifndef _MACH_I386_PROCESSOR_INFO_H_ | 34 | #ifndef _MACH_I386_PROCESSOR_INFO_H_ |
| 35 | #define _MACH_I386_PROCESSOR_INFO_H_ | 35 | #define _MACH_I386_PROCESSOR_INFO_H_ |
| 36 | 36 | ||
| 37 | #if defined (__i386__) || defined (__x86_64__) | ||
| 38 | |||
| 39 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 40 | |||
| 37 | #endif /* _MACH_I386_PROCESSOR_INFO_H_ */ | 41 | #endif /* _MACH_I386_PROCESSOR_INFO_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/rpc.h+4| ... | @@ -32,4 +32,8 @@ | ... | @@ -32,4 +32,8 @@ |
| 32 | #ifndef _MACH_I386_RPC_H_ | 32 | #ifndef _MACH_I386_RPC_H_ |
| 33 | #define _MACH_I386_RPC_H_ | 33 | #define _MACH_I386_RPC_H_ |
| 34 | 34 | ||
| 35 | #if defined (__i386__) || defined (__x86_64__) | ||
| 36 | |||
| 37 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 38 | |||
| 35 | #endif /* _MACH_I386_RPC_H_ */ | 39 | #endif /* _MACH_I386_RPC_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/thread_state.h+3-3| ... | @@ -32,11 +32,11 @@ | ... | @@ -32,11 +32,11 @@ |
| 32 | #ifndef _MACH_I386_THREAD_STATE_H_ | 32 | #ifndef _MACH_I386_THREAD_STATE_H_ |
| 33 | #define _MACH_I386_THREAD_STATE_H_ | 33 | #define _MACH_I386_THREAD_STATE_H_ |
| 34 | 34 | ||
| 35 | #if defined (__i386__) || defined (__x86_64__) | ||
| 36 | |||
| 35 | /* Size of maximum exported thread state in 32-bit words */ | 37 | /* Size of maximum exported thread state in 32-bit words */ |
| 36 | #define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */ | 38 | #define I386_THREAD_STATE_MAX (614) /* Size of biggest state possible */ |
| 37 | 39 | ||
| 38 | #if defined (__i386__) || defined(__x86_64__) | 40 | #endif /* defined (__i386__) || defined (__x86_64__) */ |
| 39 | #define THREAD_STATE_MAX I386_THREAD_STATE_MAX | ||
| 40 | #endif | ||
| 41 | 41 | ||
| 42 | #endif /* _MACH_I386_THREAD_STATE_H_ */ | 42 | #endif /* _MACH_I386_THREAD_STATE_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/thread_status.h+5-1| ... | @@ -67,10 +67,12 @@ | ... | @@ -67,10 +67,12 @@ |
| 67 | #ifndef _MACH_I386_THREAD_STATUS_H_ | 67 | #ifndef _MACH_I386_THREAD_STATUS_H_ |
| 68 | #define _MACH_I386_THREAD_STATUS_H_ | 68 | #define _MACH_I386_THREAD_STATUS_H_ |
| 69 | 69 | ||
| 70 | #if defined (__i386__) || defined (__x86_64__) | ||
| 71 | |||
| 70 | #include <mach/machine/_structs.h> | 72 | #include <mach/machine/_structs.h> |
| 73 | #include <mach/machine/thread_state.h> | ||
| 71 | #include <mach/message.h> | 74 | #include <mach/message.h> |
| 72 | #include <mach/i386/fp_reg.h> | 75 | #include <mach/i386/fp_reg.h> |
| 73 | #include <mach/i386/thread_state.h> | ||
| 74 | #include <i386/eflags.h> | 76 | #include <i386/eflags.h> |
| 75 | 77 | ||
| 76 | 78 | ||
| ... | @@ -359,4 +361,6 @@ typedef struct x86_avx512_state x86_avx512_state_t; | ... | @@ -359,4 +361,6 @@ typedef struct x86_avx512_state x86_avx512_state_t; |
| 359 | #define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT | 361 | #define MACHINE_THREAD_STATE_COUNT x86_THREAD_STATE_COUNT |
| 360 | 362 | ||
| 361 | 363 | ||
| 364 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 365 | |||
| 362 | #endif /* _MACH_I386_THREAD_STATUS_H_ */ | 366 | #endif /* _MACH_I386_THREAD_STATUS_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/vm_param.h+8-2| ... | @@ -90,6 +90,8 @@ | ... | @@ -90,6 +90,8 @@ |
| 90 | #ifndef _MACH_I386_VM_PARAM_H_ | 90 | #ifndef _MACH_I386_VM_PARAM_H_ |
| 91 | #define _MACH_I386_VM_PARAM_H_ | 91 | #define _MACH_I386_VM_PARAM_H_ |
| 92 | 92 | ||
| 93 | #if defined (__i386__) || defined (__x86_64__) | ||
| 94 | |||
| 93 | #if !defined(KERNEL) && !defined(__ASSEMBLER__) | 95 | #if !defined(KERNEL) && !defined(__ASSEMBLER__) |
| 94 | 96 | ||
| 95 | #include <mach/vm_page_size.h> | 97 | #include <mach/vm_page_size.h> |
| ... | @@ -122,9 +124,11 @@ | ... | @@ -122,9 +124,11 @@ |
| 122 | 124 | ||
| 123 | #define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL) | 125 | #define VM_MIN_ADDRESS64 ((user_addr_t) 0x0000000000000000ULL) |
| 124 | /* | 126 | /* |
| 125 | * default top of user stack... it grows down from here | 127 | * Default top of user stack, grows down from here. |
| 128 | * Address chosen to be 1G (3rd level page table entry) below SHARED_REGION_BASE_X86_64 | ||
| 129 | * minus additional 1Meg (1/2 1st level page table coverage) to allow a redzone after it. | ||
| 126 | */ | 130 | */ |
| 127 | #define VM_USRSTACK64 ((user_addr_t) 0x00007FFEEFC00000ULL) | 131 | #define VM_USRSTACK64 ((user_addr_t) (0x00007FF7C0000000ull - (1024 * 1024))) |
| 128 | 132 | ||
| 129 | /* | 133 | /* |
| 130 | * XXX TODO: Obsolete? | 134 | * XXX TODO: Obsolete? |
| ... | @@ -154,4 +158,6 @@ | ... | @@ -154,4 +158,6 @@ |
| 154 | 158 | ||
| 155 | 159 | ||
| 156 | 160 | ||
| 161 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 162 | |||
| 157 | #endif /* _MACH_I386_VM_PARAM_H_ */ | 163 | #endif /* _MACH_I386_VM_PARAM_H_ */ |
| \ No newline at end of file | |||
lib/libc/include/x86_64-macos.11-none/mach/i386/vm_types.h+11-6| ... | @@ -67,10 +67,13 @@ | ... | @@ -67,10 +67,13 @@ |
| 67 | #ifndef _MACH_I386_VM_TYPES_H_ | 67 | #ifndef _MACH_I386_VM_TYPES_H_ |
| 68 | #define _MACH_I386_VM_TYPES_H_ | 68 | #define _MACH_I386_VM_TYPES_H_ |
| 69 | 69 | ||
| 70 | #if defined (__i386__) || defined (__x86_64__) | ||
| 71 | |||
| 70 | #ifndef ASSEMBLER | 72 | #ifndef ASSEMBLER |
| 71 | 73 | ||
| 72 | #include <i386/_types.h> | 74 | #include <i386/_types.h> |
| 73 | #include <stdint.h> | 75 | #include <stdint.h> |
| 76 | #include <sys/cdefs.h> | ||
| 74 | 77 | ||
| 75 | /* | 78 | /* |
| 76 | * natural_t and integer_t are Mach's legacy types for machine- | 79 | * natural_t and integer_t are Mach's legacy types for machine- |
| ... | @@ -97,9 +100,9 @@ typedef int integer_t; | ... | @@ -97,9 +100,9 @@ typedef int integer_t; |
| 97 | * e.g. an offset into a virtual memory space. | 100 | * e.g. an offset into a virtual memory space. |
| 98 | */ | 101 | */ |
| 99 | #ifdef __LP64__ | 102 | #ifdef __LP64__ |
| 100 | typedef uintptr_t vm_offset_t; | 103 | typedef uintptr_t vm_offset_t __kernel_ptr_semantics; |
| 101 | #else /* __LP64__ */ | 104 | #else /* __LP64__ */ |
| 102 | typedef natural_t vm_offset_t; | 105 | typedef natural_t vm_offset_t __kernel_ptr_semantics; |
| 103 | #endif /* __LP64__ */ | 106 | #endif /* __LP64__ */ |
| 104 | 107 | ||
| 105 | /* | 108 | /* |
| ... | @@ -120,12 +123,12 @@ typedef natural_t vm_size_t; | ... | @@ -120,12 +123,12 @@ typedef natural_t vm_size_t; |
| 120 | * where the size of the map is not known - or we don't | 123 | * where the size of the map is not known - or we don't |
| 121 | * want to have to distinguish. | 124 | * want to have to distinguish. |
| 122 | */ | 125 | */ |
| 123 | typedef uint64_t mach_vm_address_t; | 126 | typedef uint64_t mach_vm_address_t __kernel_ptr_semantics; |
| 124 | typedef uint64_t mach_vm_offset_t; | 127 | typedef uint64_t mach_vm_offset_t __kernel_ptr_semantics; |
| 125 | typedef uint64_t mach_vm_size_t; | 128 | typedef uint64_t mach_vm_size_t; |
| 126 | 129 | ||
| 127 | typedef uint64_t vm_map_offset_t; | 130 | typedef uint64_t vm_map_offset_t __kernel_ptr_semantics; |
| 128 | typedef uint64_t vm_map_address_t; | 131 | typedef uint64_t vm_map_address_t __kernel_ptr_semantics; |
| 129 | typedef uint64_t vm_map_size_t; | 132 | typedef uint64_t vm_map_size_t; |
| 130 | 133 | ||
| 131 | typedef mach_vm_address_t mach_port_context_t; | 134 | typedef mach_vm_address_t mach_port_context_t; |
| ... | @@ -138,4 +141,6 @@ typedef mach_vm_address_t mach_port_context_t; | ... | @@ -138,4 +141,6 @@ typedef mach_vm_address_t mach_port_context_t; |
| 138 | */ | 141 | */ |
| 139 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 | 142 | #define MACH_MSG_TYPE_INTEGER_T MACH_MSG_TYPE_INTEGER_32 |
| 140 | 143 | ||
| 144 | #endif /* defined (__i386__) || defined (__x86_64__) */ | ||
| 145 | |||
| 141 | #endif /* _MACH_I386_VM_TYPES_H_ */ | 146 | #endif /* _MACH_I386_VM_TYPES_H_ */ |
| \ No newline at end of file | |||
lib/std/c/darwin.zig+9-8| ... | @@ -911,17 +911,18 @@ pub const siginfo_t = extern struct { | ... | @@ -911,17 +911,18 @@ pub const siginfo_t = extern struct { |
| 911 | 911 | ||
| 912 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. | 912 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with function name. |
| 913 | pub const Sigaction = extern struct { | 913 | pub const Sigaction = extern struct { |
| 914 | pub usingnamespace if (builtin.zig_backend == .stage1) struct { | 914 | pub const handler_fn = switch (builtin.zig_backend) { |
| 915 | pub const handler_fn = fn (c_int) callconv(.C) void; | 915 | .stage1 => fn (c_int) callconv(.C) void, |
| 916 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 916 | else => *const fn (c_int) callconv(.C) void, |
| 917 | } else struct { | 917 | }; |
| 918 | pub const handler_fn = *const fn (c_int) callconv(.C) void; | 918 | pub const sigaction_fn = switch (builtin.zig_backend) { |
| 919 | pub const sigaction_fn = *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 919 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, |
| 920 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 920 | }; | 921 | }; |
| 921 | 922 | ||
| 922 | handler: extern union { | 923 | handler: extern union { |
| 923 | handler: ?Sigaction.handler_fn, | 924 | handler: ?handler_fn, |
| 924 | sigaction: ?Sigaction.sigaction_fn, | 925 | sigaction: ?sigaction_fn, |
| 925 | }, | 926 | }, |
| 926 | mask: sigset_t, | 927 | mask: sigset_t, |
| 927 | flags: c_uint, | 928 | flags: c_uint, |
lib/std/c/dragonfly.zig+13-3| ... | @@ -1,3 +1,4 @@ | ... | @@ -1,3 +1,4 @@ |
| 1 | const builtin = @import("builtin"); | ||
| 1 | const std = @import("../std.zig"); | 2 | const std = @import("../std.zig"); |
| 2 | const maxInt = std.math.maxInt; | 3 | const maxInt = std.math.maxInt; |
| 3 | const iovec = std.os.iovec; | 4 | const iovec = std.os.iovec; |
| ... | @@ -12,7 +13,10 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; | ... | @@ -12,7 +13,10 @@ pub extern "c" fn sigaltstack(ss: ?*stack_t, old_ss: ?*stack_t) c_int; |
| 12 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; | 13 | pub extern "c" fn getrandom(buf_ptr: [*]u8, buf_len: usize, flags: c_uint) isize; |
| 13 | pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int; | 14 | pub extern "c" fn pipe2(fds: *[2]fd_t, flags: u32) c_int; |
| 14 | 15 | ||
| 15 | pub const dl_iterate_phdr_callback = fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; | 16 | pub const dl_iterate_phdr_callback = switch (builtin.zig_backend) { |
| 17 | .stage1 => fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 18 | else => *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 19 | }; | ||
| 16 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 20 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 17 | 21 | ||
| 18 | pub extern "c" fn lwp_gettid() c_int; | 22 | pub extern "c" fn lwp_gettid() c_int; |
| ... | @@ -679,8 +683,14 @@ pub const empty_sigset = sigset_t{ .__bits = [_]c_uint{0} ** _SIG_WORDS }; | ... | @@ -679,8 +683,14 @@ pub const empty_sigset = sigset_t{ .__bits = [_]c_uint{0} ** _SIG_WORDS }; |
| 679 | pub const sig_atomic_t = c_int; | 683 | pub const sig_atomic_t = c_int; |
| 680 | 684 | ||
| 681 | pub const Sigaction = extern struct { | 685 | pub const Sigaction = extern struct { |
| 682 | pub const handler_fn = fn (c_int) callconv(.C) void; | 686 | pub const handler_fn = switch (builtin.zig_backend) { |
| 683 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 687 | .stage1 => fn (c_int) callconv(.C) void, |
| 688 | else => *const fn (c_int) callconv(.C) void, | ||
| 689 | }; | ||
| 690 | pub const sigaction_fn = switch (builtin.zig_backend) { | ||
| 691 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 692 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 693 | }; | ||
| 684 | 694 | ||
| 685 | /// signal handler | 695 | /// signal handler |
| 686 | handler: extern union { | 696 | handler: extern union { |
lib/std/c/freebsd.zig+12-3| ... | @@ -35,7 +35,10 @@ pub extern "c" fn sendfile( | ... | @@ -35,7 +35,10 @@ pub extern "c" fn sendfile( |
| 35 | flags: u32, | 35 | flags: u32, |
| 36 | ) c_int; | 36 | ) c_int; |
| 37 | 37 | ||
| 38 | pub const dl_iterate_phdr_callback = fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; | 38 | pub const dl_iterate_phdr_callback = switch (builtin.zig_backend) { |
| 39 | .stage1 => fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 40 | else => *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 41 | }; | ||
| 39 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 42 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 40 | 43 | ||
| 41 | pub const pthread_mutex_t = extern struct { | 44 | pub const pthread_mutex_t = extern struct { |
| ... | @@ -998,8 +1001,14 @@ const NSIG = 32; | ... | @@ -998,8 +1001,14 @@ const NSIG = 32; |
| 998 | 1001 | ||
| 999 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 1002 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 1000 | pub const Sigaction = extern struct { | 1003 | pub const Sigaction = extern struct { |
| 1001 | pub const handler_fn = fn (c_int) callconv(.C) void; | 1004 | pub const handler_fn = switch (builtin.zig_backend) { |
| 1002 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 1005 | .stage1 => fn (c_int) callconv(.C) void, |
| 1006 | else => *const fn (c_int) callconv(.C) void, | ||
| 1007 | }; | ||
| 1008 | pub const sigaction_fn = switch (builtin.zig_backend) { | ||
| 1009 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 1010 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 1011 | }; | ||
| 1003 | 1012 | ||
| 1004 | /// signal handler | 1013 | /// signal handler |
| 1005 | handler: extern union { | 1014 | handler: extern union { |
lib/std/c/haiku.zig+9-4| ... | @@ -463,9 +463,9 @@ pub const SA = struct { | ... | @@ -463,9 +463,9 @@ pub const SA = struct { |
| 463 | }; | 463 | }; |
| 464 | 464 | ||
| 465 | pub const SIG = struct { | 465 | pub const SIG = struct { |
| 466 | pub const ERR = @intToPtr(fn (i32) callconv(.C) void, maxInt(usize)); | 466 | pub const ERR = @intToPtr(?Sigaction.handler_fn, maxInt(usize)); |
| 467 | pub const DFL = @intToPtr(fn (i32) callconv(.C) void, 0); | 467 | pub const DFL = @intToPtr(?Sigaction.handler_fn, 0); |
| 468 | pub const IGN = @intToPtr(fn (i32) callconv(.C) void, 1); | 468 | pub const IGN = @intToPtr(?Sigaction.handler_fn, 1); |
| 469 | 469 | ||
| 470 | pub const HUP = 1; | 470 | pub const HUP = 1; |
| 471 | pub const INT = 2; | 471 | pub const INT = 2; |
| ... | @@ -738,9 +738,14 @@ const NSIG = 32; | ... | @@ -738,9 +738,14 @@ const NSIG = 32; |
| 738 | 738 | ||
| 739 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 739 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 740 | pub const Sigaction = extern struct { | 740 | pub const Sigaction = extern struct { |
| 741 | pub const handler_fn = switch (builtin.zig_backend) { | ||
| 742 | .stage1 => fn (i32) callconv(.C) void, | ||
| 743 | else => *const fn (i32) callconv(.C) void, | ||
| 744 | }; | ||
| 745 | |||
| 741 | /// signal handler | 746 | /// signal handler |
| 742 | __sigaction_u: extern union { | 747 | __sigaction_u: extern union { |
| 743 | __sa_handler: fn (i32) callconv(.C) void, | 748 | __sa_handler: handler_fn, |
| 744 | }, | 749 | }, |
| 745 | 750 | ||
| 746 | /// see signal options | 751 | /// see signal options |
lib/std/c/netbsd.zig+12-3| ... | @@ -9,7 +9,10 @@ const rusage = std.c.rusage; | ... | @@ -9,7 +9,10 @@ const rusage = std.c.rusage; |
| 9 | extern "c" fn __errno() *c_int; | 9 | extern "c" fn __errno() *c_int; |
| 10 | pub const _errno = __errno; | 10 | pub const _errno = __errno; |
| 11 | 11 | ||
| 12 | pub const dl_iterate_phdr_callback = fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; | 12 | pub const dl_iterate_phdr_callback = switch (builtin.zig_backend) { |
| 13 | .stage1 => fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 14 | else => *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 15 | }; | ||
| 13 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 16 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 14 | 17 | ||
| 15 | pub extern "c" fn _lwp_self() lwpid_t; | 18 | pub extern "c" fn _lwp_self() lwpid_t; |
| ... | @@ -971,8 +974,14 @@ pub const SIG = struct { | ... | @@ -971,8 +974,14 @@ pub const SIG = struct { |
| 971 | 974 | ||
| 972 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 975 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 973 | pub const Sigaction = extern struct { | 976 | pub const Sigaction = extern struct { |
| 974 | pub const handler_fn = fn (c_int) callconv(.C) void; | 977 | pub const handler_fn = switch (builtin.zig_backend) { |
| 975 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 978 | .stage1 => fn (c_int) callconv(.C) void, |
| 979 | else => *const fn (c_int) callconv(.C) void, | ||
| 980 | }; | ||
| 981 | pub const sigaction_fn = switch (builtin.zig_backend) { | ||
| 982 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 983 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 984 | }; | ||
| 976 | 985 | ||
| 977 | /// signal handler | 986 | /// signal handler |
| 978 | handler: extern union { | 987 | handler: extern union { |
lib/std/c/openbsd.zig+12-3| ... | @@ -7,7 +7,10 @@ const iovec_const = std.os.iovec_const; | ... | @@ -7,7 +7,10 @@ const iovec_const = std.os.iovec_const; |
| 7 | extern "c" fn __errno() *c_int; | 7 | extern "c" fn __errno() *c_int; |
| 8 | pub const _errno = __errno; | 8 | pub const _errno = __errno; |
| 9 | 9 | ||
| 10 | pub const dl_iterate_phdr_callback = fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; | 10 | pub const dl_iterate_phdr_callback = switch (builtin.zig_backend) { |
| 11 | .stage1 => fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 12 | else => *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 13 | }; | ||
| 11 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 14 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 12 | 15 | ||
| 13 | pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void; | 16 | pub extern "c" fn arc4random_buf(buf: [*]u8, len: usize) void; |
| ... | @@ -1026,8 +1029,14 @@ pub const SIG = struct { | ... | @@ -1026,8 +1029,14 @@ pub const SIG = struct { |
| 1026 | 1029 | ||
| 1027 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 1030 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 1028 | pub const Sigaction = extern struct { | 1031 | pub const Sigaction = extern struct { |
| 1029 | pub const handler_fn = fn (c_int) callconv(.C) void; | 1032 | pub const handler_fn = switch (builtin.zig_backend) { |
| 1030 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 1033 | .stage1 => fn (c_int) callconv(.C) void, |
| 1034 | else => *const fn (c_int) callconv(.C) void, | ||
| 1035 | }; | ||
| 1036 | pub const sigaction_fn = switch (builtin.zig_backend) { | ||
| 1037 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 1038 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 1039 | }; | ||
| 1031 | 1040 | ||
| 1032 | /// signal handler | 1041 | /// signal handler |
| 1033 | handler: extern union { | 1042 | handler: extern union { |
lib/std/c/solaris.zig+12-3| ... | @@ -8,7 +8,10 @@ const timezone = std.c.timezone; | ... | @@ -8,7 +8,10 @@ const timezone = std.c.timezone; |
| 8 | extern "c" fn ___errno() *c_int; | 8 | extern "c" fn ___errno() *c_int; |
| 9 | pub const _errno = ___errno; | 9 | pub const _errno = ___errno; |
| 10 | 10 | ||
| 11 | pub const dl_iterate_phdr_callback = fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int; | 11 | pub const dl_iterate_phdr_callback = switch (builtin.zig_backend) { |
| 12 | .stage1 => fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 13 | else => *const fn (info: *dl_phdr_info, size: usize, data: ?*anyopaque) callconv(.C) c_int, | ||
| 14 | }; | ||
| 12 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; | 15 | pub extern "c" fn dl_iterate_phdr(callback: dl_iterate_phdr_callback, data: ?*anyopaque) c_int; |
| 13 | 16 | ||
| 14 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize; | 17 | pub extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) usize; |
| ... | @@ -952,8 +955,14 @@ pub const SIG = struct { | ... | @@ -952,8 +955,14 @@ pub const SIG = struct { |
| 952 | 955 | ||
| 953 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. | 956 | /// Renamed from `sigaction` to `Sigaction` to avoid conflict with the syscall. |
| 954 | pub const Sigaction = extern struct { | 957 | pub const Sigaction = extern struct { |
| 955 | pub const handler_fn = fn (c_int) callconv(.C) void; | 958 | pub const handler_fn = switch (builtin.zig_backend) { |
| 956 | pub const sigaction_fn = fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void; | 959 | .stage1 => fn (c_int) callconv(.C) void, |
| 960 | else => *const fn (c_int) callconv(.C) void, | ||
| 961 | }; | ||
| 962 | pub const sigaction_fn = switch (builtin.zig_backend) { | ||
| 963 | .stage1 => fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 964 | else => *const fn (c_int, *const siginfo_t, ?*const anyopaque) callconv(.C) void, | ||
| 965 | }; | ||
| 957 | 966 | ||
| 958 | /// signal options | 967 | /// signal options |
| 959 | flags: c_uint, | 968 | flags: c_uint, |
src/Compilation.zig+30-4| ... | @@ -2321,7 +2321,12 @@ pub fn update(comp: *Compilation) !void { | ... | @@ -2321,7 +2321,12 @@ pub fn update(comp: *Compilation) !void { |
| 2321 | } | 2321 | } |
| 2322 | 2322 | ||
| 2323 | fn flush(comp: *Compilation, prog_node: *std.Progress.Node) !void { | 2323 | fn flush(comp: *Compilation, prog_node: *std.Progress.Node) !void { |
| 2324 | try comp.bin_file.flush(comp, prog_node); // This is needed before reading the error flags. | 2324 | // This is needed before reading the error flags. |
| 2325 | comp.bin_file.flush(comp, prog_node) catch |err| switch (err) { | ||
| 2326 | error.FlushFailure => {}, // error reported through link_error_flags | ||
| 2327 | error.LLDReportedFailure => {}, // error reported through log.err | ||
| 2328 | else => |e| return e, | ||
| 2329 | }; | ||
| 2325 | comp.link_error_flags = comp.bin_file.errorFlags(); | 2330 | comp.link_error_flags = comp.bin_file.errorFlags(); |
| 2326 | 2331 | ||
| 2327 | const use_stage1 = build_options.omit_stage2 or | 2332 | const use_stage1 = build_options.omit_stage2 or |
| ... | @@ -2593,10 +2598,11 @@ pub fn totalErrorCount(self: *Compilation) usize { | ... | @@ -2593,10 +2598,11 @@ pub fn totalErrorCount(self: *Compilation) usize { |
| 2593 | } | 2598 | } |
| 2594 | } | 2599 | } |
| 2595 | 2600 | ||
| 2596 | // The "no entry point found" error only counts if there are no other errors. | 2601 | // The "no entry point found" error only counts if there are no semantic analysis errors. |
| 2597 | if (total == 0) { | 2602 | if (total == 0) { |
| 2598 | total += @boolToInt(self.link_error_flags.no_entry_point_found); | 2603 | total += @boolToInt(self.link_error_flags.no_entry_point_found); |
| 2599 | } | 2604 | } |
| 2605 | total += @boolToInt(self.link_error_flags.missing_libc); | ||
| 2600 | 2606 | ||
| 2601 | // Compile log errors only count if there are no other errors. | 2607 | // Compile log errors only count if there are no other errors. |
| 2602 | if (total == 0) { | 2608 | if (total == 0) { |
| ... | @@ -2693,10 +2699,30 @@ pub fn getAllErrorsAlloc(self: *Compilation) !AllErrors { | ... | @@ -2693,10 +2699,30 @@ pub fn getAllErrorsAlloc(self: *Compilation) !AllErrors { |
| 2693 | } | 2699 | } |
| 2694 | } | 2700 | } |
| 2695 | 2701 | ||
| 2696 | if (errors.items.len == 0 and self.link_error_flags.no_entry_point_found) { | 2702 | if (errors.items.len == 0) { |
| 2703 | if (self.link_error_flags.no_entry_point_found) { | ||
| 2704 | try errors.append(.{ | ||
| 2705 | .plain = .{ | ||
| 2706 | .msg = try std.fmt.allocPrint(arena_allocator, "no entry point found", .{}), | ||
| 2707 | }, | ||
| 2708 | }); | ||
| 2709 | } | ||
| 2710 | } | ||
| 2711 | |||
| 2712 | if (self.link_error_flags.missing_libc) { | ||
| 2713 | const notes = try arena_allocator.create([2]AllErrors.Message); | ||
| 2714 | notes.* = .{ | ||
| 2715 | .{ .plain = .{ | ||
| 2716 | .msg = try arena_allocator.dupe(u8, "run 'zig libc -h' to learn about libc installations"), | ||
| 2717 | } }, | ||
| 2718 | .{ .plain = .{ | ||
| 2719 | .msg = try arena_allocator.dupe(u8, "run 'zig targets' to see the targets for which zig can always provide libc"), | ||
| 2720 | } }, | ||
| 2721 | }; | ||
| 2697 | try errors.append(.{ | 2722 | try errors.append(.{ |
| 2698 | .plain = .{ | 2723 | .plain = .{ |
| 2699 | .msg = try std.fmt.allocPrint(arena_allocator, "no entry point found", .{}), | 2724 | .msg = try std.fmt.allocPrint(arena_allocator, "libc not available", .{}), |
| 2725 | .notes = notes, | ||
| 2700 | }, | 2726 | }, |
| 2701 | }); | 2727 | }); |
| 2702 | } | 2728 | } |
src/link.zig+1| ... | @@ -951,6 +951,7 @@ pub const File = struct { | ... | @@ -951,6 +951,7 @@ pub const File = struct { |
| 951 | 951 | ||
| 952 | pub const ErrorFlags = struct { | 952 | pub const ErrorFlags = struct { |
| 953 | no_entry_point_found: bool = false, | 953 | no_entry_point_found: bool = false, |
| 954 | missing_libc: bool = false, | ||
| 954 | }; | 955 | }; |
| 955 | 956 | ||
| 956 | pub const C = @import("link/C.zig"); | 957 | pub const C = @import("link/C.zig"); |
src/link/Elf.zig+3-1| ... | @@ -1719,6 +1719,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v | ... | @@ -1719,6 +1719,7 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v |
| 1719 | } | 1719 | } |
| 1720 | 1720 | ||
| 1721 | // libc dep | 1721 | // libc dep |
| 1722 | self.error_flags.missing_libc = false; | ||
| 1722 | if (self.base.options.link_libc) { | 1723 | if (self.base.options.link_libc) { |
| 1723 | if (self.base.options.libc_installation != null) { | 1724 | if (self.base.options.libc_installation != null) { |
| 1724 | const needs_grouping = self.base.options.link_mode == .Static; | 1725 | const needs_grouping = self.base.options.link_mode == .Static; |
| ... | @@ -1739,7 +1740,8 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v | ... | @@ -1739,7 +1740,8 @@ fn linkWithLLD(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node) !v |
| 1739 | .Dynamic => "libc.so", | 1740 | .Dynamic => "libc.so", |
| 1740 | })); | 1741 | })); |
| 1741 | } else { | 1742 | } else { |
| 1742 | unreachable; // Compiler was supposed to emit an error for not being able to provide libc. | 1743 | self.error_flags.missing_libc = true; |
| 1744 | return error.FlushFailure; | ||
| 1743 | } | 1745 | } |
| 1744 | } | 1746 | } |
| 1745 | } | 1747 | } |
src/translate_c.zig+10-9| ... | @@ -2945,7 +2945,6 @@ fn transDoWhileLoop( | ... | @@ -2945,7 +2945,6 @@ fn transDoWhileLoop( |
| 2945 | defer cond_scope.deinit(); | 2945 | defer cond_scope.deinit(); |
| 2946 | const cond = try transBoolExpr(c, &cond_scope.base, @ptrCast(*const clang.Expr, stmt.getCond()), .used); | 2946 | const cond = try transBoolExpr(c, &cond_scope.base, @ptrCast(*const clang.Expr, stmt.getCond()), .used); |
| 2947 | const if_not_break = switch (cond.tag()) { | 2947 | const if_not_break = switch (cond.tag()) { |
| 2948 | .false_literal => return transStmt(c, scope, stmt.getBody(), .unused), | ||
| 2949 | .true_literal => { | 2948 | .true_literal => { |
| 2950 | const body_node = try maybeBlockify(c, scope, stmt.getBody()); | 2949 | const body_node = try maybeBlockify(c, scope, stmt.getBody()); |
| 2951 | return Tag.while_true.create(c.arena, body_node); | 2950 | return Tag.while_true.create(c.arena, body_node); |
| ... | @@ -2953,7 +2952,11 @@ fn transDoWhileLoop( | ... | @@ -2953,7 +2952,11 @@ fn transDoWhileLoop( |
| 2953 | else => try Tag.if_not_break.create(c.arena, cond), | 2952 | else => try Tag.if_not_break.create(c.arena, cond), |
| 2954 | }; | 2953 | }; |
| 2955 | 2954 | ||
| 2956 | const body_node = if (stmt.getBody().getStmtClass() == .CompoundStmtClass) blk: { | 2955 | var body_node = try transStmt(c, &loop_scope, stmt.getBody(), .unused); |
| 2956 | if (body_node.isNoreturn(true)) { | ||
| 2957 | // The body node ends in a noreturn statement. Simply put it in a while (true) | ||
| 2958 | // in case it contains breaks or continues. | ||
| 2959 | } else if (stmt.getBody().getStmtClass() == .CompoundStmtClass) { | ||
| 2957 | // there's already a block in C, so we'll append our condition to it. | 2960 | // there's already a block in C, so we'll append our condition to it. |
| 2958 | // c: do { | 2961 | // c: do { |
| 2959 | // c: a; | 2962 | // c: a; |
| ... | @@ -2964,12 +2967,10 @@ fn transDoWhileLoop( | ... | @@ -2964,12 +2967,10 @@ fn transDoWhileLoop( |
| 2964 | // zig: b; | 2967 | // zig: b; |
| 2965 | // zig: if (!cond) break; | 2968 | // zig: if (!cond) break; |
| 2966 | // zig: } | 2969 | // zig: } |
| 2967 | const node = try transStmt(c, &loop_scope, stmt.getBody(), .unused); | 2970 | const block = body_node.castTag(.block).?; |
| 2968 | const block = node.castTag(.block).?; | ||
| 2969 | block.data.stmts.len += 1; // This is safe since we reserve one extra space in Scope.Block.complete. | 2971 | block.data.stmts.len += 1; // This is safe since we reserve one extra space in Scope.Block.complete. |
| 2970 | block.data.stmts[block.data.stmts.len - 1] = if_not_break; | 2972 | block.data.stmts[block.data.stmts.len - 1] = if_not_break; |
| 2971 | break :blk node; | 2973 | } else { |
| 2972 | } else blk: { | ||
| 2973 | // the C statement is without a block, so we need to create a block to contain it. | 2974 | // the C statement is without a block, so we need to create a block to contain it. |
| 2974 | // c: do | 2975 | // c: do |
| 2975 | // c: a; | 2976 | // c: a; |
| ... | @@ -2979,10 +2980,10 @@ fn transDoWhileLoop( | ... | @@ -2979,10 +2980,10 @@ fn transDoWhileLoop( |
| 2979 | // zig: if (!cond) break; | 2980 | // zig: if (!cond) break; |
| 2980 | // zig: } | 2981 | // zig: } |
| 2981 | const statements = try c.arena.alloc(Node, 2); | 2982 | const statements = try c.arena.alloc(Node, 2); |
| 2982 | statements[0] = try transStmt(c, &loop_scope, stmt.getBody(), .unused); | 2983 | statements[0] = body_node; |
| 2983 | statements[1] = if_not_break; | 2984 | statements[1] = if_not_break; |
| 2984 | break :blk try Tag.block.create(c.arena, .{ .label = null, .stmts = statements }); | 2985 | body_node = try Tag.block.create(c.arena, .{ .label = null, .stmts = statements }); |
| 2985 | }; | 2986 | } |
| 2986 | return Tag.while_true.create(c.arena, body_node); | 2987 | return Tag.while_true.create(c.arena, body_node); |
| 2987 | } | 2988 | } |
| 2988 | 2989 |
test/translate_c.zig+53-2| ... | @@ -6,6 +6,53 @@ const CrossTarget = std.zig.CrossTarget; | ... | @@ -6,6 +6,53 @@ const CrossTarget = std.zig.CrossTarget; |
| 6 | pub fn addCases(cases: *tests.TranslateCContext) void { | 6 | pub fn addCases(cases: *tests.TranslateCContext) void { |
| 7 | const default_enum_type = if (builtin.abi == .msvc) "c_int" else "c_uint"; | 7 | const default_enum_type = if (builtin.abi == .msvc) "c_int" else "c_uint"; |
| 8 | 8 | ||
| 9 | cases.add("do while with breaks", | ||
| 10 | \\void foo(int a) { | ||
| 11 | \\ do { | ||
| 12 | \\ if (a) break; | ||
| 13 | \\ } while (4); | ||
| 14 | \\ do { | ||
| 15 | \\ if (a) break; | ||
| 16 | \\ } while (0); | ||
| 17 | \\ do { | ||
| 18 | \\ if (a) break; | ||
| 19 | \\ } while (a); | ||
| 20 | \\ do { | ||
| 21 | \\ break; | ||
| 22 | \\ } while (3); | ||
| 23 | \\ do { | ||
| 24 | \\ break; | ||
| 25 | \\ } while (0); | ||
| 26 | \\ do { | ||
| 27 | \\ break; | ||
| 28 | \\ } while (a); | ||
| 29 | \\} | ||
| 30 | , &[_][]const u8{ | ||
| 31 | \\pub export fn foo(arg_a: c_int) void { | ||
| 32 | \\ var a = arg_a; | ||
| 33 | \\ while (true) { | ||
| 34 | \\ if (a != 0) break; | ||
| 35 | \\ } | ||
| 36 | \\ while (true) { | ||
| 37 | \\ if (a != 0) break; | ||
| 38 | \\ if (!false) break; | ||
| 39 | \\ } | ||
| 40 | \\ while (true) { | ||
| 41 | \\ if (a != 0) break; | ||
| 42 | \\ if (!(a != 0)) break; | ||
| 43 | \\ } | ||
| 44 | \\ while (true) { | ||
| 45 | \\ break; | ||
| 46 | \\ } | ||
| 47 | \\ while (true) { | ||
| 48 | \\ break; | ||
| 49 | \\ } | ||
| 50 | \\ while (true) { | ||
| 51 | \\ break; | ||
| 52 | \\ } | ||
| 53 | \\} | ||
| 54 | }); | ||
| 55 | |||
| 9 | cases.add("variables check for opaque demotion", | 56 | cases.add("variables check for opaque demotion", |
| 10 | \\struct A { | 57 | \\struct A { |
| 11 | \\ _Atomic int a; | 58 | \\ _Atomic int a; |
| ... | @@ -441,7 +488,9 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -441,7 +488,9 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 441 | \\pub export fn foo() void { | 488 | \\pub export fn foo() void { |
| 442 | \\ while (false) while (false) {}; | 489 | \\ while (false) while (false) {}; |
| 443 | \\ while (true) while (false) {}; | 490 | \\ while (true) while (false) {}; |
| 444 | \\ while (true) {} | 491 | \\ while (true) while (true) { |
| 492 | \\ if (!false) break; | ||
| 493 | \\ }; | ||
| 445 | \\} | 494 | \\} |
| 446 | }); | 495 | }); |
| 447 | 496 | ||
| ... | @@ -3229,7 +3278,9 @@ pub fn addCases(cases: *tests.TranslateCContext) void { | ... | @@ -3229,7 +3278,9 @@ pub fn addCases(cases: *tests.TranslateCContext) void { |
| 3229 | \\} | 3278 | \\} |
| 3230 | , &[_][]const u8{ | 3279 | , &[_][]const u8{ |
| 3231 | \\pub fn foo() callconv(.C) void { | 3280 | \\pub fn foo() callconv(.C) void { |
| 3232 | \\ if (true) {} | 3281 | \\ if (true) while (true) { |
| 3282 | \\ if (!false) break; | ||
| 3283 | \\ }; | ||
| 3233 | \\} | 3284 | \\} |
| 3234 | }); | 3285 | }); |
| 3235 | 3286 |